From d858f6938ee1d1f10a28ff33e2ae63a1d8115961 Mon Sep 17 00:00:00 2001 From: Ming Wei Date: Tue, 17 Jan 2017 13:36:46 -0600 Subject: [PATCH] realtime_demo_bios: add 16Khz option Signed-off-by: Ming Wei --- realtime_demo_bios/k2g/include/mcasp_cfg.h | 2 +- realtime_demo_bios/k2g/src/makefile.libs | 4 ++-- realtime_demo_bios/k2g/src/mcasp_cfg.c | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/realtime_demo_bios/k2g/include/mcasp_cfg.h b/realtime_demo_bios/k2g/include/mcasp_cfg.h index 2d5e96d..d6f4cbc 100644 --- a/realtime_demo_bios/k2g/include/mcasp_cfg.h +++ b/realtime_demo_bios/k2g/include/mcasp_cfg.h @@ -48,7 +48,7 @@ * In addition, the buffer should be of a size multiple of 128 bytes for * the cache work optimally on the C6x. */ -#define BUFLEN (960) /* Number of samples in the frame */ +#define BUFLEN ((SYS_ADC_FS_HZ/1000)*SYS_FRAME_DURATION_MS*2) /* Number of samples in the frame */ #define BUFALIGN (128) /* Alignment of buffer for use of L2 cache */ /** Number of serializers configured for Rx */ diff --git a/realtime_demo_bios/k2g/src/makefile.libs b/realtime_demo_bios/k2g/src/makefile.libs index db1526e..624c238 100644 --- a/realtime_demo_bios/k2g/src/makefile.libs +++ b/realtime_demo_bios/k2g/src/makefile.libs @@ -1,6 +1,6 @@ # # This file was generated based on the configuration script: -# C:\ti\processor_sdk_rtos_k2g_3_02_00_05\demos\audio-preprocessing\realtime_demo_bios\k2g\audioAnalogLoopbackTest.cfg +# C:\ti\processor_sdk_rtos_k2g_3_03_00_00\demos\audio-preprocessing\realtime_demo_bios\k2g\audioAnalogLoopbackTest.cfg # # This makefile may be included in other makefiles that need to build # the libraries containing the compiled source files generated as @@ -14,7 +14,7 @@ # # The absolute path to the generated source directory (at the time the # sources were generated) is: -# C:\ti\processor_sdk_rtos_k2g_3_02_00_05\demos\audio-preprocessing\realtime_demo_bios\k2g\src +# C:\ti\processor_sdk_rtos_k2g_3_03_00_00\demos\audio-preprocessing\realtime_demo_bios\k2g\src # GEN_SRC_DIR ?= ../src diff --git a/realtime_demo_bios/k2g/src/mcasp_cfg.c b/realtime_demo_bios/k2g/src/mcasp_cfg.c index 44a23b7..7e9d322 100644 --- a/realtime_demo_bios/k2g/src/mcasp_cfg.c +++ b/realtime_demo_bios/k2g/src/mcasp_cfg.c @@ -178,7 +178,11 @@ Mcasp_HwSetupData mcaspXmtSetup = { /* .xstat = */ 0x000001FF, /* reset any existing status bits */ /* .xevtctl = */ 0x00000000, /* DMA request is enabled or disabled */ { +#if (SYS_ADC_FS_HZ==16000) + /* .aclkxctl = */ 0X000000E3, /* Bit CLK Pol: falling edge, ASYNC is 1, ACLKX is internal, HF CLK to BCLK divider is 4 */ +#else /* .aclkxctl = */ 0X000000E7, /* Bit CLK Pol: falling edge, ASYNC is 1, ACLKX is internal, HF CLK to BCLK divider is 8 */ +#endif /* .ahclkxctl = */ 0x00000000, /* AHCLKX is external */ /* .xclkchk = */ 0x00000000 }, -- 2.26.2