Hi,
I'm trying to use TLV320AIC3104 as an audio codec communicating by I2S in slave mode with ZYNQ.
A audio signal is plugged to LINE1LP/LINE1LM and LEFT_LOP/LEFT_LOM differentially. The MCLK, BCLK and WCLK is provided by ZYNQ and their values are 19.2MHZ, 1024KHz and 16KHz respectively. I also shorted the DOUT and DIN signals of codec, to see the input signal of mic(LINE1LP/LINE1LM) at the output of speaker(LEFT_LOP/LEFT_LOM).
The I2C registers are below.Diagram also.
My problem is that i cannot see anything at the output of LINE1LP/LINE1LM while i feed the input LINE1LP/LINE1LM pins with 10KHz sine signal. I check the registers value with value that i write there and they are matched. I see something on DOUT when I power up ADC. Also, when i by-pass line1lp/line1lm signals to left_lop/left_lom i see the signal correctly. I can also bypass signal from pga to left_lop/left_lom and again i can see the signal correctly. I couldnt find the problem could you please help me?
Thank you and Best regards,
audio_codec_write_data_reg(AUDIO_CODEC_TLV_320_I2C_ID, PAGE_SELECT, PAGE0_SELECT);
audio_codec_write_data_reg(AUDIO_CODEC_TLV_320_I2C_ID, AUDIO_CODEC_RESET, SOFT_RESET);
/* Sample Rate and Master Clock Frequency */
audio_codec_write_data_reg(AUDIO_CODEC_TLV_320_I2C_ID, 2, 0x44); /*0xAA = 8 khz 0x44 = 16 khz 0100: DAC fS = fS(ref)/3 */
audio_codec_write_data_reg(AUDIO_CODEC_TLV_320_I2C_ID, 4, (5<<2)); /*J value = 5*/
audio_codec_write_data_reg(AUDIO_CODEC_TLV_320_I2C_ID, 5, (1200>>6)); /* Most 8 bit of 14 Bit D*/
audio_codec_write_data_reg(AUDIO_CODEC_TLV_320_I2C_ID, 6, (1200 & 0x3F) <<2 ); /* Least 6 bit of 14 Bit D*/
audio_codec_write_data_reg(AUDIO_CODEC_TLV_320_I2C_ID, 11, 1); /*R = 1*/
audio_codec_write_data_reg(AUDIO_CODEC_TLV_320_I2C_ID, 3, 0x81); /*PLL disable P=1, Q=16?(CLKDIV_OUT) */
/* Sample Rate and Master Clock Frequency */
/* Number of Bits and Digital Audio Format */
audio_codec_write_data_reg(AUDIO_CODEC_TLV_320_I2C_ID, 8, 0x00); /*BCLK and WCLK are input pins*/
audio_codec_write_data_reg(AUDIO_CODEC_TLV_320_I2C_ID, 9, 0); /*I2S mode, Audio data word length = 16 bits */
/* Number of Bits and Digital Audio Format */
/* Signal Path Through the AIC3104 */
audio_codec_write_data_reg(AUDIO_CODEC_TLV_320_I2C_ID, 19, 0x84); /* Route Line1LP to the Left ADC, Power up Left ADC, Fully differential mode*/
audio_codec_write_data_reg(AUDIO_CODEC_TLV_320_I2C_ID, 15, 0x00); /* Unmute Left PGA, set gain to 0 dB*/
audio_codec_write_data_reg(AUDIO_CODEC_TLV_320_I2C_ID, 7, 0x08); /* Route Left data to Left DAC*/
audio_codec_write_data_reg(AUDIO_CODEC_TLV_320_I2C_ID, 37, 0x80); /* Power up Left DAC’s*/
audio_codec_write_data_reg(AUDIO_CODEC_TLV_320_I2C_ID, 43, 0x00); /* Unmute Left digital volume control, set gain to 0 dB*/
audio_codec_write_data_reg(AUDIO_CODEC_TLV_320_I2C_ID, 82, 0x80); /* Route Left DAC output to Left line outs*/
audio_codec_write_data_reg(AUDIO_CODEC_TLV_320_I2C_ID, 86, 0x09); /* Power up Left line out ± (differential), set gain to 0dB*/