关于普通MIC数据降噪配置的几个说明:
CONFIG_DNS_ENC_ENABLE必须打开
需要在配置MIC的时候参数把dns_enable置1
需要链接libdns.a和libjlsp.a库,工程需要添加 apps/common/jl_math/jl_fft.c
//蓝牙通话降噪配置
#define AEC_EN BIT(0)
#define NLP_EN BIT(1)
#define ANS_EN BIT(2)
#define AGC_EN BIT(3)
#define DNS_EN BIT(5)
/aec module enable bit define/
#define AEC_MODE_ADVANCE (AEC_EN | NLP_EN | ANS_EN)
struct aec_s_attr aec_param = {0};
aec_param.EnableBit = AEC_MODE_ADVANCE | DNS_EN;
req.enc.aec_attr = &aec_param;
req.enc.aec_enable = 1;
get_cfg_file_aec_config(&aec_param);
aec_param.AGC_echo_look_ahead = 100;
aec_param.AGC_echo_hold = 400;
aec_param.ES_Unconverge_OverDrive = aec_param.ES_MinSuppress;
if (req.enc.sample_rate == 16000) {
aec_param.wideband = 1;
aec_param.hw_delay_offset = 50;
} else {
aec_param.wideband = 0;
aec_param.hw_delay_offset = 75;
}
err = server_request(__this->enc_server, AUDIO_REQ_ENC, &req);