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.

CCS/TLV320AIC3104: AIC3104 output signal is clipped and noisy

Part Number: TLV320AIC3104

Tool/software: Code Composer Studio

Hi all,

I have a problem with my output signal. When I put a sine wave to the input the output signal doesn´t match with the input.

My configuration is as follows:

My register settings:

WriteReg_AIC(0, 0x00);		// page select
WriteReg_AIC(1, 0x80);		// software reset

WriteReg_AIC(7, 0x0A);		// left DAC to left channel and right DAC to right channel, fs(ref)=48kHz
WriteReg_AIC(37, 0xE0);		// power up left and right DAC, HPLCOM configured as single ended output
WriteReg_AIC(41, 0x00);		// DAC_L1 and DAC_R1 for routing to Line out and HP OUT, left and right DAC have independent volume control
WriteReg_AIC(43, 0x00);		// left volume, mute=off, gain=0db
WriteReg_AIC(44, 0x00);		// right volume, mute=off, gain=0db

WriteReg_AIC(38, 0x80);		// HPRCOM configured as single ended output

WriteReg_AIC(82, 0x80);		// DAC_L1 to LEFT_LOP/M (line out)
WriteReg_AIC(92, 0x80);		// DAC_R1 to RIGHT_LOP/M (line out)
WriteReg_AIC(86, 0x09);		// power up LEFT_LOP/M
WriteReg_AIC(93, 0x09);		// power up RIGHT_LOP/M

WriteReg_AIC(8, 0xC0);		// BCLK and WCLK as output (master mode)
WriteReg_AIC(9, 0x00);		// I2S mode, 16 bits (word length)
WriteReg_AIC(10, 0x00);		// no data offset

I working on this for 2 weeks and it isn´t getting better. Has somebody tipps for this problem?

Thanks forward for your answers.

Greetings

Sadullah

  • Hi, Sadullah,

    Is the issue isolated to the DAC portion of the codec? The signal with the issue is coming from the  microcontroller?.  I can see only the DAC configuration portion of the code, can you please share the ADC configuration?.

    I tested your code and although the device configuration is not as recommended, I was able to stream correct data from digital input through Line outputs.

    A general recommended device configuration would be as follows:

    1. Provide valid clocks and power supplies
    2. Configure the routing of the device, audio interface and clock settings
    3. Turn on ADC and DAC, unmute ADC and DAC.

    I would recommend you to try making a loopback with the device by tying DOUT with DIN of the codec, bypassing the microcontroller, so the input ADC signal will be directly streamed through the codec DAC. 

    Best Regards,

      -Diego Meléndez López
       Audio Applications Engineer

  • Hi Diego,

    thank you for your quick response.

    My ADC configuration is as follows:

    WriteReg_AIC(19, 0x07);		// LINE1LP to Left-ADC, single-ended, gain=0dB, power up, soft-stepping=off
    WriteReg_AIC(22, 0x07);		// LINE1RP to Right-ADC, single-ended, gain=0dB, power up, soft-stepping=off
    
    WriteReg_AIC(15, 0x00);		// left-ADC PGA is not muted, gain=0dB
    WriteReg_AIC(16, 0x00);		// right-ADC PGA is not muted, gain=0dB

    All clocks and voltages are right. See data below:

    MCLK-Signal: 12.288MHz

    WCLK-Signal: 48kHz

    BCLK-Signal: 1.536MHz

    I have fixed hardware, so I cannot change pins easily and try making loopback mode. To understand the hardware, see pictures below:

    The DOUT-Signal didn´t seem right or am I false? See picture below.

    What am I doing wrong? Is the AIC3104 not working right. Should I buy a new one?

    many greetings

    Sadullah

  • Hi, Sadullah,

    Thanks for the feedback. From the device configuration itself, there should be no issue with the operation of the device, I suspect the issue could be related to microcontroller, so it is important to try making a loopback to  isolate the issue on the codec... is there a way to disconnect the codec from your controller and tie DIN to DOUT?, i think that should be possible in the connectors shown.   

    One thing I noticed in the schematic is that the line output is missing a decoupling cap and out-of-band noise filter. Adding these components is recommended. 

    DOUT signal seems fine, It's difficult to see if the data is not corrupt, but the integrity is as expected.

    Best Regards,

      -Diego Meléndez López
       Audio Applications Engineer

  • Hi Diego,

    I was able to use the Audio-Codec in loopback mode and all is fine.
    But when the digital Signal is coming into the microcontroller, the values are wrong. The array with incoming data shows odd results. Do you have any tipps?

    many greetings

    Sadullah
  • Hi, Sadullah,

    Thanks for the feedback, I'm glad to hear the codec is working fine.If the data read by the controller is not correct, maybe the the serial interface settings of both devices are not properly matched. Do you see any signal integrity issues when the codec gets connected to the µC? . 

    Best Regards,

      -Diego Meléndez López
       Audio Applications Engineer