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.

enable audio loopback aic34

Other Parts Discussed in Thread: TLV320AIC34

Hi Everyone,

I have a similar question to the one being raised before in this forum, but didn't received an answer as far as I could see.

I am trying to enable loopback feature on my TLV320AIC34 EVM board, using the script provided with the installation CD, but it doesn't work.

After reading this forum, I saw that I need to short J17A pins 11 and 13 (Din_A and Dout_A) in order to use the on-board MIC, and also set SW to USB mode instead of I2S.

I did both, and also try to set WCLK and BCLK to output as suggested, but it didn't work as well.

Can someone offer some ideas?

Thanks,

Tzviel

  • Hi, Tzviel,

    Could you provide the script that you're using please? Additionally, have you tried using an external clock?

    Thank you.

    Best regards,
    Luis Fernando Rodríguez S.
  • Hello Sir, thanks for the quick response.
    I am using the default block 0x30 loopback script, I added it below:
    #######################################################################################
    # Digital Loopback Test
    # Input to MIC3L/R to ADC L/R to DOUT back to DIN to DAC Path to HP Outs
    #######################################################################################
    # reg 17/18 - MIC3L for Left ADC and MIC3R for right ADC (-6dB gain on inputs)
    i i2cfast
    w 30 11 4F F4

    # reg 19/22 - power up ADC
    w 30 13 7C
    w 30 16 7C

    # regs 15/16 - unmute ADC PGA and set to 0dB
    w 30 0F 00 00

    #######################################################################################
    # Connect DOUT to DIN for more processing in the DAC Path
    #######################################################################################
    # Left/Right DAC Data-Path = Left/Right Channel Input Data
    w 30 07 8A
    # Left DAC = "Powered-Up", Right DAC = "Powered Up", and HPLCOM Config = "Constant VCM Out"
    w 30 25 D0
    # Left DAC Vol = 0 dB
    w 30 2B 00
    # Right DAC Vol = 0 dB
    w 30 2C 00
    # DAC_L = 0 dB (analog volume)
    w 30 52 80
    # DAC_R = 0 dB (analog volume)
    w 30 5C 80
    # Power Up HPLOUT
    w 30 33 05
    # Power Up HPROUT
    w 30 41 05
    # HPRCOM Config = "Ext. Feedback/HPLCPM constant VCM"
    w 30 26 20
    # DAC_L1 routed to HPLOUT Vol. Control = 0 dB
    w 30 2F 80
    # DAC_R1 routed to HPROUT Vol. Control = 0 dB
    w 30 40 80
    # HPLOUT = 0 dB
    w 30 33 0D
    # HPROUT = 0 dB
    w 30 41 0D
  • Hi, Tzviel,

    I already checked your register configuration. It seems that it is necessary to configure more registers to route the on-board microphone to the HP output. I made the next code with two preset configurations: "On board microphone to digital output" and "Stereo playback to AC coupled headphone outputs". Additionally, I configured the BCLK and WCLK as outputs.

    w 30 07 80
    w 30 11 0F
    w 30 12 F0
    w 30 16 7C
    w 30 13 7C
    w 30 0F 00
    w 30 10 00
    w 30 19 80
    w 30 07 8A
    w 30 29 02
    w 30 2B 00
    w 30 0E C0
    w 30 25 E0
    w 30 26 10
    w 30 2F 80
    w 30 40 80
    w 30 41 0D
    w 30 33 0D
    w 30 08 40
    w 30 08 C0

    It is important to know that some jumpers must be configured in order to route the on-board microphone to the HP output. JMP2 and JMP3 must be installed and nothing should be plugged into J6. In order for the mic bias settings in the software to take effect, JMP1 should be set to connect positions 2 and 3, so that MICBIAS_A is controlled by the TLV320AIC34. Additionally, DIN_A must be routed to DOUT_A (you may use a jumper to do this connection). Finally, you must disable the USB I2S to avoid to use the WCLK and BCLK from the USB-MODEVM.

    I hope this helps you. If you still have questions, please let me know.

    Best regards,

    Luis Fernando Rodríguez S.

  • Thanks Luis!
    This is working, the only change needed was to increase the PGA gain from 0dB because of the poor quality of the on-board mic.
  • Hi Luis,

    I have another question with your permission.

    I am using the following configuration script (see details below), and from some reason the board behaves differently each time I configure it. The basic configuration always starts with:

    1. Power On

    2. Run configuration script

    Can you please take a look on this and tell me if you see something wrong?

    *******************************

    i i2cfast

    # - Set to 44.1[kHz]
    w 30 07 80

    # - MIC3R_x is not connected to the left and right ADC PGA
    w 30 11 FF

    # - MIC3L_x is not connected to the right- and left ADC PGA
    w 30 12 FF

    #Power up Left ADC
    w 30 13 04

    #Power up Right ADC
    w 30 16 04

    # -LINE2RP_x and LINE2RM_x to Right-ADC - out mic
    #Fully differential, 0db
    w 30 17 84

    #LINE1LP_x and LINE1LP_x and LINE1LM_xM_x to Left-ADC Control Register - in mic
    #Fully differential, 0db
    w 30 13 84

    #Set unselected inputs to be weakly biased with ADC common
    w 30 14 04

    # - The left-ADC PGA is not muted && Gain = 59 dB
    w 30 0F 59

    # - The right-ADC PGA is not muted && Gain = 59 dB
    w 30 10 80

    # - MICBIAS_x output is powered to 2.5 V & If digital MIC is enabled, both left and right digital MICs are available
    w 30 19 80

    #Experimental section
    #Configure Left / Right ADC as HPF with cutoff freq of 198Hz
    w 30 0C 50

    #Disable Left-AGC
    w 30 1a 00

    #Disable Right-AGC 

    w 30 1D 00

    #WCLK and BCLK

    w 30 08 40
    w 30 08 C0

    *******************************

  • Hi, Tzviel,

    It probably could be related with the clocks direction. When the clocks are configured in master mode (as outputs), it is necessary to disable the clocks from the USB I2S with SW2 of USB-MODEVM. Did you check this?

    Additionally, there are some cases when the large comments on the command-line interface window seem to affect the I2C code. Have you tried your code with smaller comments?

    Please let me know if the problem persists.

    Best regards,
    Luis Fernando Rodríguez S.
  • Hi Luis,

    Thanks, I followed your suggestions, it seems to be fine now.

    One more question - when I used the AGC, I've notice some significant differences between consecutive measures, and after a few rounds, it seems that noise level on the system was reduced permanently.

     I wonder if it is because of a learning curve of the AGC, meaning that only after a few measurements (in a constant noise environment) the AGC reach an optimal work point.

    Thanks!

    Tzviel

  • Hi, Tzviel,

    I'm glad to read that it worked!

    The AGC is really useful on the noise environment. This algorithm uses the absolute average of the signal. So, after consecutive measures in a constant noise environment, the noise will be reduced due to this algorithm. The results will give an optimal work point.

    Best regards,
    Luis Fernando Rodríguez S.