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.

TLV320AIC3204EVM-K: Audio forum

  • Hello Aurelian,

    Can you probe the DOUT line and the analog outputs and send the scope shots? Are you seeing any data out on DOUT and is there a DC common mode voltage on the analog outputs?

    Regards,

    Aaron Estrada

  • Hi Aaron,

    First of all I can tell you what I have done. I succeeded analog loop, this mean generate at microphone and measured at headphone out.

    The digital loop doesn't work. This mean the signal generated at microphone is missing at headphone out.

    The problems seems to be at analog to digital and digital to analog blocs.

    In the following i play a file to PC (400Hz). I received at DIN but i don't have signal at headphone out.

    Yellow probe=WCLK

    Blue probe=DIN(TP20)

    Purple probe=HPL

  • Hi Aurelian,

    Based on your last comment, it seems as though recording is not an issue. You can record on a PC as well as play an audio signal on HPL via internal bypass path. Is my understanding correct?

    There should be a common mode on the HPL and HPR outputs when powered on. This doesn't seem to be the case in your scope shot (probe is DC coupled too). I am curious as to why this is, especially since you were able to play a signal using the bypass path.

    A couple more questions here...

    • Are you using a preset configuration? I would recommend running a record and playback preset to configure the device for both. (Note you need to modify the script you run last to remove the software reset or the first preset run will be removed. You can do this by selecting the preset and then going to the script tab right next to the preset tab and modify the script there.)
    • How are you connecting DOUT to DIN?
    • Have you tried the digital loopback in the GUI? This internally routes the ADC output to the DAC input. 

    Regards,

    Aaron Estrada

  • Hi Aaron,

    I can't  record on PC the signal from microphone codec, also the signal from PC can't play at codec output.

    The DIN and DOUT are connected to TAS1020BPFB. I use evaluation board TLV320AIC3204EVM-K.

    I made a script with my codec configuration. I generated signal at IN3L, IN3R and I received nothing at TP9 (DOUT). I play a file to PC, I found signal to TP20 DIN, but I received nothing at HEADPHONE OUT.

    This is the script:

    ###############################################
    # Software Reset
    ###############################################
    #
    # Select Page 0
    w 30 00 00
    #
    # Initialize the device through software reset
    w 30 01 01
    #
    ###############################################
    
    
    
    ###############################################
    # Clock Settings
    # ---------------------------------------------
    # The codec receives: MCLK = 11.2896 MHz,
    # BLCK = 2.8224 MHz, WCLK = 44.1 kHz
    ###############################################
    #
    # Select Page 0
    w 30 00 00
    #
    # NADC = 1, MADC = 2
    w 30 12 81 82
    #
    ###############################################
    #
    # Select Page 0
    w 30 00 00
    #
    # NDAC = 1, MDAC = 2
    w 30 0b 81 82
    #
    ###############################################
    
    
    ###############################################
    # Signal Processing Settings
    ###############################################
    #
    # Select Page 0
    w 30 00 00
    #
    # Set the ADC Mode to PRB_P1
    w 30 3d 01
    #
    # Set the DAC Mode to PRB_P8
    w 30 3c 08
    #
    ###############################################
    
    
    
    ###############################################
    # Initialize Codec
    ###############################################
    #
    # Select Page 1
    w 30 00 01
    #
    # Disable weak AVDD in presence of external
    # AVDD supply
    w 30 01 08
    #
    # Enable Master Analog Power Control
    w 30 02 00
    #
    # Select ADC PTM_R4
    w 30 3d 00
    #
    # Set the input powerup time to 3.1ms (for ADC)
    w 30 47 32
    #
    # Set the REF charging time to 40ms
    w 30 7b 01
    #
    ###############################################
    
    
    
    ###############################################
    # Recording Setup
    ###############################################
    #
    # Select Page 1
    w 30 00 01
    #
    # Route IN3L to LEFT_P with 10K input impedance
    w 30 34 04
    #
    # Route IN3R to LEFT_M with 10K input impedance
    w 30 36 04
    #
    # Unmute Left MICPGA
    w 30 3b 00
    #
    # Unmute Right MICPGA
    w 30 3c 00
    #
    # Select Page 0
    w 30 00 00
    #
    # Power up LADC/RADC
    w 30 51 c0
    #
    # Unmute LADC/RADC
    w 30 52 00
    #
    ###############################################
    # Playback Setup
    ###############################################
    #
    # Select Page 1
    w 30 00 01
    #
    # De-pop
    w 30 14 25
    #
    # Route LDAC/RDAC to HPL/HPR
    w 30 0c 08 08
    #
    # Route LDAC/RDAC to LOL/LOR
    w 30 0e 08 08
    #
    # Set the DAC PTM mode to PTM_P1
    w 30 03 08 08
    #
    # Power up HPL/HPR and LOL/LOR drivers
    w 30 09 3C
    #
    # Unmute HPL/HPR driver, 0dB Gain
    w 30 10 00 00
    #
    # Unmute LOL/LOR driver, 0dB Gain
    w 30 12 00 00
    #
    # Select Page 0
    w 30 00 00
    #
    # DAC => 0dB
    w 30 41 00 00
    #
    # Power up LDAC/RDAC
    w 30 3f d6
    #
    # Unmute LDAC/RDAC
    w 30 40 00
    #
    
    ###############################################

  • Hi Aurelian,

    Thanks for sharing and apologies for the delay in my response. 

    I went ahead and ran this configuration on an EVM and found that the HPL and HPR outputs were attenuated even though there is 0dB gain in the paths and I was playing a full scale signal. I went ahead and ran a preset script and saw an expected full scale output. I am wondering if you can try this on your end. Can you run a preset playback script and see if you can play audio from your PC to the CODEC? Additionally, can you run a record preset script and see if you can now record/see data on DOUT?

    How are you configuring the EVM? Are you using the command line interface? I am looking into why there was some attenuation and removed the record writes in your script and the output was still attenuated. 

    Regards,
    Aaron Estrada

  • Hi Aaron,

    I tried all the tests it still doesn't work.

    EVM has been configured according documentation. At codec digital path the clock signals (measured):

    MCLK=44.1KHz

    BCLK=2.8224MHz

    MCLK=11.289MHz

    Do you have a functional configuration for EVM?

  • Hi Aurelian,

    Attached below is a record/playback script I used to record and playback audio on the EVM using Audacity. 

    ###############################################
    # Clock Settings
    # ---------------------------------------------
    # The codec receives: MCLK = 11.2896 MHz,
    # BLCK = 2.8224 MHz, WCLK = 44.1 kHz
    ###############################################
    #
    # Select Page 0
    w 30 00 00
    #
    # NDAC = 1, MDAC = 2
    w 30 0b 81 82
    #
    # NADC = 1, MADC = 2
    w 30 12 81 82
    #
    ###############################################
    # Signal Processing Settings
    ###############################################
    #
    # Select Page 0
    w 30 00 00
    #
    # Set the DAC Mode to PRB_P8
    w 30 3c 08
    #
    # Set the ADC Mode to PRB_P1
    w 30 3d 01
    #
    ###############################################
    # Initialize Codec
    ###############################################
    #
    # Select Page 1
    w 30 00 01
    #
    # Disable weak AVDD in presence of external
    # AVDD supply
    w 30 01 08
    #
    # Enable Master Analog Power Control
    w 30 02 00
    #
    # Set the input powerup time to 3.1ms (for ADC)
    # w 30 47 32
    #
    # Set the REF charging time to 40ms
    w 30 7b 01
    #
    # Select ADC PTM_R4
    w 30 3d 00
    #
    ###############################################
    # Playback Setup
    ###############################################
    #
    # Select Page 1
    w 30 00 01
    #
    # De-pop
    w 30 14 25
    #
    # Route LDAC/RDAC to HPL/HPR
    w 30 0c 08 08
    #
    # Route LDAC/RDAC to LOL/LOR
    w 30 0e 08 08
    #
    # Power up HPL/HPR and LOL/LOR drivers
    w 30 09 3C
    #
    # Unmute HPL/HPR driver, 0dB Gain
    w 30 10 00 00
    #
    # Unmute LOL/LOR driver, 0dB Gain
    w 30 12 00 00
    #
    # Select Page 0
    w 30 00 00
    #
    # DAC => 0dB
    w 30 41 00 00
    #
    # Power up LDAC/RDAC
    w 30 3f d6
    #
    # Unmute LDAC/RDAC
    w 30 40 00
    #
    ###############################################
    # Recording Setup
    ###############################################
    #
    # Select Page 1
    w 30 00 01
    #
    # Route IN1L to LEFT_P with 20K input impedance
    w 30 34 80
    #
    # Route Common Mode to LEFT_M with impedance of 20K
    w 30 36 80
    #
    # Route IN1R to RIGHT_P with input impedance of 20K
    w 30 37 80
    #
    # Route Common Mode to RIGHT_M with impedance of 20K
    w 30 39 80
    #
    # Unmute Left MICPGA, Gain selection of 6dB to make channel gain 0dB
    # Register of 6dB with input impedance of 20K => Channel Gain of 0dB
    w 30 3b 0c
    #
    # Unmute Right MICPGA, Gain selection of 6dB to make channel gain 0dB
    # Register of 6dB with input impedance of 20K => Channel Gain of 0dB
    w 30 3c 0c
    #
    # Select Page 0
    w 30 00 00
    #
    # Power up LADC/RADC
    w 30 51 c0
    #
    # Unmute LADC/RADC
    w 30 52 00
    #
    ###############################################
    

    I have also included some images of the audacity recording as well as a scope shot of HPL/HPR to show that both recording and playback is working. 

    Let me know if this script works. If it does not, I recommend trying the digital loopback test. I didn't receive confirmation if you had tried digital loopback and if not, you can go to the Digital settings section, then Clocks/Interface and click on the Audio Interface tab. You should see the following screen and here you can select Digital Loopback. this will internally route DOUT to DIN. Please make sure the script has been loaded before selecting Digital Loopback.

    Regards,

    Aaron Estrada

  • Hi Aaron,

    Good news. Now is working. You helped me a lot. After you confirmed to me that I was using the correct configuration, I understood that the problem was in hardware.

    The IOVDD on mother board was 1.20V. The codec has VDD=1.8V. This mean the clock signals provided by mother board were to small.

    On mother board I found the next configuration:

    1- ON

    2-OFF

    3-OFF

    4-OFF

    5-OFF

    6-ON

    7-ON

    8-ON

    For this configuration the voltage IOVDD=1.20V

    ---- I made changes:

    8-OFF

    IOVDD=1.83V

    Many thanks!