BouffaloSDK is the IOT and MCU software development kit provided by the Bouffalo Lab Team, supports all the series of Bouffalo chips. Also it is the combination of bl_mcu_sdk and bl_iot_sdk
Apache License 2.0
362
stars
128
forks
source link
Poor AudioADC performance whenever AudioDAC or any DAC channels are enabled. #190
Hi,
I was looking at the auadc_audac_loopback example, and noticed that the quality of AudioADC decreases dramatically upon initializing the AudioDAC(!)
Apparently, this problem is associated with the setting of GPDAC_CH_A and / or GPDAC_CH_B.
Specifically, the following lines of code in bflb_audac.c are causing the audac to change its behavior(!?) :
if (config->output_mode & AUDAC_OUTPUT_MODE_GPDAC_CH_A) {
/ gpdac enable ch-A /
regval = getreg32(reg_base + GLB_GPDAC_ACTRL_OFFSET);
regval |= (GLB_GPDAC_A_EN | GLB_GPDAC_IOA_EN);
putreg32(regval, reg_base + GLB_GPDAC_ACTRL_OFFSET);
}
It seems that by setting GPDAC_CH_A/B the AudioADC precision decreases from 16 its to 12 bits, and the pga gain is not effective.
Same issue appears whenever enabling any of the DAC Channels, for example using:
bflb_dac_channel_enable(dac, DAC_CHANNEL_A);
bflb_dac_channel_enable(dac, DAC_CHANNEL_B);
Hi, I was looking at the auadc_audac_loopback example, and noticed that the quality of AudioADC decreases dramatically upon initializing the AudioDAC(!)
Apparently, this problem is associated with the setting of GPDAC_CH_A and / or GPDAC_CH_B.
Specifically, the following lines of code in bflb_audac.c are causing the audac to change its behavior(!?) : if (config->output_mode & AUDAC_OUTPUT_MODE_GPDAC_CH_A) { / gpdac enable ch-A / regval = getreg32(reg_base + GLB_GPDAC_ACTRL_OFFSET); regval |= (GLB_GPDAC_A_EN | GLB_GPDAC_IOA_EN); putreg32(regval, reg_base + GLB_GPDAC_ACTRL_OFFSET); }
It seems that by setting GPDAC_CH_A/B the AudioADC precision decreases from 16 its to 12 bits, and the pga gain is not effective.
Same issue appears whenever enabling any of the DAC Channels, for example using: bflb_dac_channel_enable(dac, DAC_CHANNEL_A); bflb_dac_channel_enable(dac, DAC_CHANNEL_B);
Any ideas?