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.

TLV320AIC3254: LOOPBACK in codec

Part Number: TLV320AIC3254


We are using TLV320AIC3254 CODEC and trying to route the signal from DAC which is routed to LOL from left DAC and right DAC and the inputs to the DAC are given from ADC through loopback mode i.e. Stereo ADC output routed to Stereo DAC  by configuring the REGISTER 29 in PAGE 0.

Please find the register values attached for the DAC and ADC. We are not able to get the routed signal from DAC and we are giving 1KHz sine wave from the IN2L input to ADC.

WCLK - 48 KHz

BCLK - 1.536MHz

MCLK -12.288MHz

/*************DAC REGISTER VALUES*********/
(0x30,0,0);      
(0x30,1,1); 
(0x30,0x04,0x00);
(0x30,0x0b,0x81);
(0x30,0x0c,0x82);
(0x30,0x0d,0x00);
(0x30,0x0e,0x80);
(0x30,0x1b,0x00);
(0x30,0x1c,0x00);
(0x30,0x3c,0x08);
(0x30,0,0);
(0x30,0x1f,0x00);
(0x30,0x20,0x00);
(0x30,0x21,0x00);
(0x30,0x25,0xCC);

(0x30,0x26,0x00);
(0x30,0x3B,0x0A);
(0x30,0x0f,0x02);
(0x30,0x10,0x00);
(0x30,0x11,0x08);
(0x30,0x15,0x01);
(0x30,0x16,0x00);
(0x30,0x3E,0x00);
(0x30,0,1); 
(0x30,1,8);     
(0x30,2,0);
(0x30,0x7b,1);
(0x30,14,0x18); 
(0x30,10,0x4B); 
(0x30,3,0);
(0x30,4,0);
(0x30,0x09,0x08)
(0x30,0x0E,18);
(0x30,0x12,0);
(0x30,18,0x1B);  
(0x30,0,0);
(0x30,0x3f,0xD6);
(0x30,0x40,0x00);
(0x30,0x41,10);
(0x30,0x42,10);


/*********ADC REGISTER VALUES**********/

(0x30,0,0);
(0x30,1,1);
(0x30,0x15,0x01);
(0x30,0x16,0x00);
(0x30,0x0f,0x02);
(0x30,0x10,0x00);
(0x30,0x12,0x81);
(0x30,0x13,0x82);
(0x30,0x14,0x80);

(0x30,0x0f,0x02);
(0x30,0x10,0x00);
(0x30,0x11,0x08);
(0x30,0x15,0x01);
(0x30,0x16,0x00);
(0x30,0x3E,0x00);
(0x30,0x24,0xee);
(0x30,0,1);       
(0x30,0x3D,0xff); 
(0x30,0x47,0x32); 

(0x30,0x7B,0x01); 
(0x30,52,0x30); 
(0x30,54,0x03); 
(0x30,55,0x03);
(0x30,57,0x03);

(0x30,0,0);       
(0x30,0x51,0xC0); 
(0x30,0x52,0x00); 
(0x30,0x1d,0x11); 



 


 







Please guide us if we are missing any registers.

Thanks and Regards

A.Mounika

  • Hi Mounika,

    Thanks for sharing the configuration. In addition, could you please read the following registers and share their contents.

    1. Page 0, Register 0x24, 0x25, 0x26, 0x2A, 0x2C, 0x2D

    2. Page 1, Register 0x3E, 0x3F

    Best Regards.

  • Hi,

    Page 0-

    0x24 - 0xee

    0x25 - 0xcc

    0x26 - 0x11

    0x2A - 0X00

    0X2C - 0X00

    0X2D - 0X00

    Page 1

    0x3f - 0xe7

    0x3e - we have not used

    Thanks and Regards

    A.Mounika

  • Hi,

    Page 0-

    0x24 - 0xee

    0x25 - 0xcc

    0x26 - 0x11

    0x2A - 0X00

    0X2C - 0X00

    0X2D - 0X00

    Page 1

    0x3f - 0xe7

    0x3e - we have not used

    Thanks and Regards

    A.Mounika

  • Hi,

    One more thing, is it necessary to use minidsp for ADC and DAC in loopback mode and if not in which type of specific thing we use them.

    Thanks and Regards,

    A.Mounika.

  • Hi Mounika,

    Loop back works for PRB as well as miniDSP modes. I think the issue is with the configuration.

    In the text file that you attached, you have one set of register configurations for DAC followed by another set of configurations for ADC.

    You are setting P0_R1 = 0x01 twice - first at the start of DAC configuration and again at the start of ADC configuration.

    (0x30,0,0);
    (0x30,1,1);

    Software reset has to be done at the start and only once. When software reset is done again after DAC configuration then the DAC registers get reset.

    I also see a lot of redundant writes, once for the DAC and then for the ADC. It is better to combine them.

    Shown below is a script for loop-back on the EVM-K.

    Best Regards.


    # Software Reset
    w 30 00 00
    w 30 01 01

    # Page 0
    w 30 00 00
    ###############
    w 30 12 81 82 # NADC MADC
    w 30 3D 01     # ADC PRB
    w 30 53 14 14 # ADC Volume
    ###############
    w 30 0B 81 82 # NDAC MDAC
    w 30 3C 08    # DAC PRB
    w 30 41 00 00 # DAC Volume
    ###############

    # Page 1
    w 30 00 01
    ############
    w 30 01 08 # AVDD Weak Connection
    w 30 02 00 # LDO
    w 30 3D 00 # Power Tune
    w 30 47 32 # Quick Charge
    w 30 7B 01 # Reference Power Up

    # Onboard Mic Routing
    w 30 33 40 # MIC Bias
    w 30 34 04 # IN3L
    w 30 36 04 # IN3R
    w 30 3B 00 # Left PGA
    w 30 3C 00 # Right PGA

    # HP Driver Routing/Gain/Powerup
    w 30 14 25    #
    w 30 0C 08 08 #
    w 30 0E 08 08 #
    w 30 09 3C    #
    w 30 10 00 00 #
    w 30 12 00 00 #
    ############

    # Page 0
    w 30 00 00
    ############
    w 30 3F D6 # DAC Powerup
    w 30 40 00  # DAC Unmute
    ############
    w 30 51 C0 # ADC Power Up
    w 30 52 00  # Unmute ADC
    ############

    # Loopback ADC to DAC
    w 30 00 00
    w 30 1d 10