This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TLV320AIC3212: Sound coming in headphones but not in speaker.

Part Number: TLV320AIC3212
Other Parts Discussed in Thread: AM5728, , TLV320AIC3262

Hi,

I purchased a tlv320aic3212 audiocodec EVM from TI and tested it using the CodecControl software from the link: - https://www.ti.com/lit/zip/slac523.

I am able to play sounds from headphone and speaker from the audiocodec EVM using the example configurations in the CodecControl software.

I have also been able to successfully port tlv320aic326x.c driver for tlv320aic3212 audiocodec on my custom board based on am5728 SOC. 

I downloaded Headphone playback script from TLV320AIC3212EVM-U Evaluation Module User's guide and ported it for linux for my custom board and I am able to hear sound from headphones (attached to headphone jack attahced to the audiocodec  on my custom board).

Now when I run class-D speaker playback script (downloaded from the Example configurations of the CodecControl Software) which I ported for my custom board, I still hear the sound from headphones and not the speaker. I am attaching both the shell scripts in .txt format

#sw reset
i2cset -f -y 3 0x18 0x00 0x00
i2cset -f -y 3 0x18 0x7f 0x00
i2cset -f -y 3 0x18 0x01 0x01

#clock config
i2cset -f -y 3 0x18 0x04 0x00
i2cset -f -y 3 0x18 0x0b 0x81
i2cset -f -y 3 0x18 0x0c 0x82
i2cset -f -y 3 0x18 0x0d 0x02
i2cset -f -y 3 0x18 0x0e 0x00

#codec initialize
i2cset -f -y 3 0x18 0x00 0x01
i2cset -f -y 3 0x18 0x01 0x00
i2cset -f -y 3 0x18 0x7a 0x01

#ASI config
i2cset -f -y 3 0x18 0x00 0x04
i2cset -f -y 3 0x18 0x01 0x20
i2cset -f -y 3 0x18 0x0a 0x00

#signal processing

i2cset -f -y 3 0x18 0x00 0x00
i2cset -f -y 3 0x18 0x3c 0x01

#dac config
i2cset -f -y 3 0x18 0x00 0x01
i2cset -f -y 3 0x18 0x03 0x00
i2cset -f -y 3 0x18 0x04 0x00
i2cset -f -y 3 0x18 0x1f 0x80
i2cset -f -y 3 0x18 0x20 0x00
i2cset -f -y 3 0x18 0x21 0x28
i2cset -f -y 3 0x18 0x23 0x10
i2cset -f -y 3 0x18 0x1b 0x33
i2cset -f -y 3 0x18 0x00 0x00
i2cset -f -y 3 0x18 0x3f 0xc0
i2cset -f -y 3 0x18 0x40 0x00

#sw reset                               
i2cset -f -y 3 0x18 0x00 0x00           
i2cset -f -y 3 0x18 0x7f 0x00           
i2cset -f -y 3 0x18 0x01 0x01           
                                        
#clock configuration                    
i2cset -f -y 3 0x18 0x04 0x00
i2cset -f -y 3 0x18 0x0b 0x81
i2cset -f -y 3 0x18 0x0c 0x82
i2cset -f -y 3 0x18 0x0d 0x00
i2cset -f -y 3 0x18 0x0e 0x80

#initialize the codec
i2cset -f -y 3 0x18 0x00 0x01
i2cset -f -y 3 0x18 0x01 0x00
i2cset -f -y 3 0x18 0x7a 0x01



#ASI config
i2cset -f -y 3 0x18 0x00 0x04
i2cset -f -y 3 0x18 0x01 0x00
i2cset -f -y 3 0x18 0x0a 0x00

#signal processing

i2cset -f -y 3 0x18 0x00 0x00
i2cset -f -y 3 0x18 0x3c 0x01

#DAC configurations
i2cset -f -y 3 0x18 0x00 0x01
i2cset -f -y 3 0x18 0x03 0x00
i2cset -f -y 3 0x18 0x04 0x00

i2cset -f -y 3 0x18 0x24 0x7f
i2cset -f -y 3 0x18 0x25 0x7f
i2cset -f -y 3 0x18 0x1c 0x7f
i2cset -f -y 3 0x18 0x1d 0x7f


i2cset -f -y 3 0x18 0x16 0xc0
i2cset -f -y 3 0x18 0x2e 0x00
i2cset -f -y 3 0x18 0x2f 0x00


i2cset -f -y 3 0x18 0x00 0x00
i2cset -f -y 3 0x18 0x3f 0xc0

i2cset -f -y 3 0x18 0x00 0x01
i2cset -f -y 3 0x18 0x16 0xc3
i2cset -f -y 3 0x18 0x30 0x41

i2cset -f -y 3 0x18 0x00 0x00
i2cset -f -y 3 0x18 0x40 0x00

i2cset -f -y 3 0x18 0x00 0x01
i2cset -f -y 3 0x18 0x2d 0x03

Can anyone help me resolve this issue ??

Regards

Vishal Maheshwari