Other Parts Discussed in Thread: TLV320AIC3104
Hello,
I'm using the TLV320AIC3104 audio convertor in one of my project. The audio convertor is connected to a Quectel EC21 Modem. Please find attached the schematic below.
The Quectel EC21 ouputs digital audio (PCM) and controls the TLV320AIC3104 with I2C. I'm trying to get the I2S mode working, but not having much success so far. Here are the steps I followed.
Parameters for the digital audio are as follows
BCLK=2048k
WCLK=8k
Quectel EC21 is the master and the TLV320AIC3104 the slave.
I need fs(ref)=8ksps, where CODEC_CLK=256 fs(ref)
I'm not using the PLL, I'm just using the Clock Divider with Q=2.
BCLK is the MCLK = 2048k
fs(ref)=2048k/(128x2)=8k which is equal to the WCLK.
1) Check if I2C is working. I wrote the required values to register 25 to change the MIC BIAS voltage and checked with a multimeter and it works. So I've ruled out any issues with I2C.
2) Here is the register programming sequence I followed.
- Software Reset by writing to register 1
- Leave Register 3 at RESET state, nothing to be changed here.
- Write value x82 to Register 102 to set CLKDIV_IN as BCLK.
- Write value 0x01 to Register 101 to set 'CODEC_CLKIN uses CLKDIV_OUT'
- No changes to Register 8 and Register 9, leave at default
- Register 17 = 0x0F,Route MIC2L to the Left ADC
- Register 18 = 0x0F,Route MIC2R to the Right ADC
- Register 40 = 0x40, Output Common-Mode Voltage Control=1.5V
- Register 25 = 0x80, MICBIAS as 2.5V
- Register 19= 0x7C, Power up Left ADC
- Register 22= 0x7C, Power up Right ADC
- Register 15 = 0x00 Unmute left PGA
- Register 16 = 0x00 Unmute right PGA
- Register 7 = 0x0A, Route Left data to Left DAC, Route Right data to Right DACc
- Register 37=0xC0, Power up Left and Right DAC
- Register 43 = 0x00, Unmute Left digital volume control, set gain to 0 dB
- Register 44 = 0x00, Unmute Right digital volume control, set gain to 0 dB
- Register 47 = 0x80, DAC_L1 to HPLOUT Volume Control Register
- Register 51 = 0x0F, HPLOUT Output Level Control
- Register 64 = 0x80, DAC_R1 to HPROUT Volume Control Register
- Register 65 = 0x0F, HPROUT Output Level Control
What am I missing here?
3) Quectel EC21 provides an audio loop function where it loops input from the MIC into the earphones, when I turn it on, I'm able hear a buzz meaning the DAC is powered on, however, the mic doesn't pick up my voice at all.
Is there any other method to test the playback and record feature using just I2C?
4) What do I with Register 37 and 38? Should some changes be made to those registers?
5) The headset detection does not seem to be working. I've checked the contents of Register 14, but no change. I tried settings bit D3=1 and checked if headset removal insert was being detected, still no change. No change to the register value of Register 96 either.
6) The audio codec is also heating up. I believe this maybe due to the HPRCOM/HPLCOM GND connection . Is that the reason?
Thank you for your help!