I am trying to configure TLV320AIC3111 as an input only mode. I am able to get the audio samples but have one issue now. While there is no audio, there is some sound heard which I think is because of some misconfiguration of registers.
Following is the configuration I want to achieve.
Sampling Freq: 8000Hz
Clock source: Codec
Microphone: Single ended electret microphone
Following are the registers configuration:
// Select Page 0 0, 0x00 // S/W Reset 1, 0x01 // PLL_clkin = MCLK = 2.048MHz, codec_clkin = MCLK 4, 0x00 // PLL Power down, P = 1, R = 1 5, 0x11 // J = 4 6, 0x04 // D = 0000, D(13:8) = 0 7, 0x00 // D(7:0) = 0 8, 0x00 // Mode is I2S, wordlength is 16 27, 0x0C // NDAC is powered up and set to 1 11, 0x81 // MDAC is powered up and set to 2 12, 0x82 // NADC is powered up and set to 1 18, 0x81 // MADC is powered up and set to 2 19, 0x82 // AOSR = 128 20, 0x80 // IADC = 384 21, 0x80 // BCLK N-divider, BCLK divider N = 4 30, 0x84 // Select Page 1 0, 0x01 // MIC BIAS = AVDD 46, 0x0B // MICPGA P = MIC 20k 48, 0x80 // MICPGA M - CM 20k 49, 0x20 // Select Page 0 0, 0x00 // POWERUP ADC channel 81, 0x80 // ADC digital volume control coarse 0dB (12dB - 20dB) 83, 0x00 // UNMUTE ADC channel 82, 0x00
If I change MIC bias from AVDD to 2V. sound is better but some prrr kind of sound is heard.
How to select proper mic bias and remove the prrr kind of constant noise in background. Does it has to do something with MIC PGA feed-forward resistance? How to select its value?