mt6592 修改acoustic loopback时延时
时间:10-02
整理:3721RD
点击:
[DESCRIPTION]
acoustic loopback时,需要增加延时。
[SOLUTION]
请找 MD source code 里面的 mcu/driver/audio/src/v1/spc_drv.c 下面这行:
#define ACLOOPBACK_DELAY 12 // unit is 20ms
就可以调节 delay. 但不可以超过 32 .
// -----------------------------------------------------------------------
-----
// Loopback
// -----------------------------------------------------------------------
-----
#define ACLOOPBACK_FRAME_BUF_NO (32) // REMIND: should be pow of 2
#define ACLOOPBACK_NB_FRAME_SIZE (160)
#define ACLOOPBACK_DELAY 12 // unit is 20ms
static uint16
gSpc_acLoopback_PCM_BUF[ACLOOPBACK_FRAME_BUF_NO][ACLOOPBACK_NB_FRAME_SIZE]
;
// static uint16
gSpc_acLoopback_PCM_DL_BUF[ACLOOPBACK_FRAME_BUF_NO][ACLOOPBACK_NB_FRAME_SI
ZE];
typedef struct
{
uint32 delay;
uint32 tmp_w;
uint32 tmp_r;
// uint32 DL_tmp_w;
// uint32 DL_tmp_r;
} _SPC_ACOUSTIC_LOOPBACK_T;
static _SPC_ACOUSTIC_LOOPBACK_T gSpc_acLoopback;
void AcousticLoopback_PCM2WAY_UL_HisrHdl()
acoustic loopback时,需要增加延时。
[SOLUTION]
请找 MD source code 里面的 mcu/driver/audio/src/v1/spc_drv.c 下面这行:
#define ACLOOPBACK_DELAY 12 // unit is 20ms
就可以调节 delay. 但不可以超过 32 .
// -----------------------------------------------------------------------
-----
// Loopback
// -----------------------------------------------------------------------
-----
#define ACLOOPBACK_FRAME_BUF_NO (32) // REMIND: should be pow of 2
#define ACLOOPBACK_NB_FRAME_SIZE (160)
#define ACLOOPBACK_DELAY 12 // unit is 20ms
static uint16
gSpc_acLoopback_PCM_BUF[ACLOOPBACK_FRAME_BUF_NO][ACLOOPBACK_NB_FRAME_SIZE]
;
// static uint16
gSpc_acLoopback_PCM_DL_BUF[ACLOOPBACK_FRAME_BUF_NO][ACLOOPBACK_NB_FRAME_SI
ZE];
typedef struct
{
uint32 delay;
uint32 tmp_w;
uint32 tmp_r;
// uint32 DL_tmp_w;
// uint32 DL_tmp_r;
} _SPC_ACOUSTIC_LOOPBACK_T;
static _SPC_ACOUSTIC_LOOPBACK_T gSpc_acLoopback;
void AcousticLoopback_PCM2WAY_UL_HisrHdl()
认真学习,天天向上!
谢谢分享