我们通过 I2S 接口和 nRF52840主控制器将压电式触点麦克风与 TLV320AIC3206编解码器搭配使用。 以16位11025Hz 的频率对音频进行采样、并通过 BLE/USB 传输到 Android 应用。 编解码器一直在运行、在暂停期间接收到的数据被丢弃。 从断电开始、无论录制时间有多长、录制环境有多安静或多安静、一切都能正常工作。 但是、每次暂停并通过 BLE 恢复流式传输后、音频都会逐渐产生噪声。 尽管我有一个高通滤波器、但有时还有直流偏移。 但是、如果我点击麦克风、噪音就会消失、但如果我暂停并再次录制、它将再次逐渐发出噪音。 但是、这不是通过 USB 流式传输实现的。 我不使用自动增益控制。 请帮助我解决此问题。
以下是寄存器配置的核心部分:
{ 0x00, 0x00 }, // Page 0
{ 0x12, 0x83 }, // Power up NADC with 3 div
{ 0x13, 0x85 }, // Power up MADC with 5 div
{ 0x51, 0x42 }, // Power up Right ADC channels
{ 0x54, 0x28 }, // Right Digital Volume 20db
//fine tune gain page 114
{ 0x52, 0x00 }, // Reg 82: Unmute Left and Right ADC Digital Volume Control
//page 115
{ 0x56, 0x00 }, // disable left AGC
{ 0x00, 0x01 }, // Page 1
{ 0x01, 0x08 }, // Disable weak AVDD to DVDD connection
{ 0x02, 0x00 }, // Enable master analog power control
{ 0x0A, 0x40 }, // Set input common mode to 0.75V
{ 0x3D, 0x04 }, // Select ADC PTM_R4
{ 0x7B, 0x01 }, // Set REF charging time to 40ms
{ 0x34, 0x00 }, // IN1L not routed to LEFT_P
{ 0x36, 0x00 }, // do not Route Common Mode to LEFT_M
{ 0x37, 0x04 }, // Route IN3R to RIGHT_P with 10K input impedance
{ 0x39, 0x40 }, // Route Common Mode to RIGHT_M with impedance of 10K by CM1R
{ 0x3C, 0x5f }, // Reg 60: Unmute Right MICPGA, Gain selection 47.5dB
{ 0x00, 0x00 }, // Page 0
//page 114
{ 0x51, 0x41 }, // Power up Right ADC channels
// ADC Volume Control Soft-Stepping Control
// 00: ADC Volume Control changes by 1 gain step per ADC Word Clock
// 01: ADC Volume Control changes by 1 gain step per two ADC Word Clocks
//page 115
{ 0x54, 0x10 }, // Right Digital Volume 8db
//fine tune gain page 114
{ 0x52, 0x80 }, // Reg 82: Unmute Right ADC Digital Volume Control
//page 115
{ 0x56, 0x00 }, // disable left AGC
30Hz 高通滤波器设置:
codec_biquad_cfg_30hz[] =
{
/*
Text "* Sample Rate = 11025"
Text "* Filter 5 High Pass 2nd Order Butterworth, 30 Hz Fc 0.0 dB "
Text "* BQ: H(z) = (N0 + 2*N1/z + N2/(z2)) / (8388608 - 2*D1/z - D2/(z2))"
Text "* Filter Coefficients in format N0, N1, N2, D1, D2"
Text "* 1O: H(z) = (N0 + N1/z) / (8388608 - D1/z)"
Text "* Filter Coefficients in format N0, N1, D1"
Text "* Filter 5 BQ "
0x7E762C
0x8189D4
0x7E762C
0x7E73CF
0x830EEB
*/
{0x00, 0x00}, // set page 0
{0x3d, 0x05}, // PRB_R5 selected (Page 0, Register 61)
{0x00, 0x09}, // set page 9
// BIQUAD A
{0x2C, 0x7e}, // C39 (Pg 9, Reg 44,45,46)
{0x2D, 0x76}, //
{0x2E, 0x2c}, //
{0x30, 0x81}, // C40 (Pg 9, Reg 48,49,50)
{0x31, 0x89}, //
{0x32, 0xd4}, //
{0x34, 0x7e}, // C41 (Pg 9, Reg 52,53,54)
{0x35, 0x76}, //
{0x36, 0x2c}, //
{0x38, 0x7e}, // C42 (Pg 9, Reg 56,57,58)
{0x39, 0x73}, //
{0x3A, 0xcf}, //
{0x3C, 0x83}, // C43 (Pg 9, Reg 60,61,62)
{0x3D, 0x0e}, //
{0x3E, 0xeb}, //
};
以下是编解码器的原理图、暂停时的波形正在恢复:

波形4和5中的 MIC 点击:
