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.

Signal Routing on TLV320AIC3263EVM-U Mic to Dout1 / PC to Din1

Other Parts Discussed in Thread: TLV320AIC3263EVM-U

I'm trying to configure the codec such that data from my PC is played to the headset speaker.  Microphone data is then sent from the headset mic to the PC.

What I'm experiencing is audio from the PC not only plays in the headset but is also looped back to the ADC.   The PC gets the microphone plus the audio playing on the PC.   By the diagrams and user guides I don't see how this is possible. 

There is no analog coupling int he circuit.  Mic is not simply picking up on the speaker output which I validated via scope as well as physically disconnecting the speaker output.

The mic works just fine, as does the speaker individually.   Just not together. I want digital audio data from the PC in on DIN1 and  Mic and mic ONLY on Dout1.   My configuration is listed below.  What am I doing wrong?

#########################################################################################
# Headphone Playback, Setup A, High Performance, High Output Power, 48kHz Sampling Rate
# AVDDx_18, HVDD_18, CPVDD_18 = 1.8V; IOVDDx, MICBIAS_VDD, RECVDD_33 = 3.3V;
# SVDD, SPK_V = 5V, DVdd = 1.8V
# MCLK = 12.288MHz
# PLL Disabled, DOSR = 128, PRB_P1
# Audio Serial Interface #1 used with WCLK & BCLK as inputs to the device
#########################################################################################

#########################################################################################
# Software Reset
#########################################################################################
w 30 00 00 # Initialize to Page 0
w 30 7f 00 # Initialize to Book 0
w 30 01 01 # Initialize the device through software reset
d 1 # Delay 1 millisecond

#########################################################################################
# FIFO Configuration
#########################################################################################
w 30 00 00 # Select Page 0
w 30 7f 78 # Select Book 120
w 30 32 80 # Enable DAC FIFO
w 30 7f 64 # Select Book 100
w 30 32 80 # Enable ADC FIFO
w 30 7f 00 # Select Book 0

#########################################################################################
# Power and Analog Configuration
#########################################################################################
w 30 00 01 # Select Page 1
w 30 01 00 # Disable weak AVDD to DVDD connection, make analog supplies available
w 30 7a 01 # REF charging time = 40ms
w 30 21 28 # CP divider = 4, 500kHz, Runs off 8MHz oscillator
w 30 23 10 # Charge Pump to power up on Ground-Centered Headphone Power-up
w 30 08 00 # Full chip CM = 0.9V (Setup A)
w 30 03 00 # PTM_P3, High Performance (Setup A)
w 30 04 00 # PTM_P3, High Performance (Setup A)

#########################################################################################
# Clock configuration
# MCLK = 12.288 MHz, BCLK = 3.072 MHz, WCLK = 48 kHz (slave)
#########################################################################################
w 30 00 00 # Select Page 0
w 30 04 00 # Set DAC_CLKIN as MCLK -- default not mandatory to program
w 30 0b 81 # NDAC = 1
w 30 0c 82 # MDAC = 2 (Setup A)
w 30 0d 00 # Program the OSR of DAC to 128 to get
w 30 0e 80 # DAC_FS = DAC_MOD_CLK / DOSR = 6.144MHz / 128 = 48kHz

#########################################################################################
# Audio Serial Interface Routing Configuration - Audio Serial Interface #1
# ASI #1 playback
#########################################################################################
w 30 00 04 # Select Page 4
w 30 01 00 # I2S mode, 16-bit
w 30 0a 00 # Route ASI#1 WCLK and BCLK to WCLK1 pin and BCLK1 pin
w 30 08 50 # Left Channel DAC and Primary ASI's Right channel data to
# Right Channel DAC

#########################################################################################
# ADC Input Channel Configuration --- IN1L
#########################################################################################
w 30 00 01 # Select Page 1
w 30 08 00 # Set the input common mode to 0.9V
w 30 33 40 # Mic Bias enabled, Source = Avdd, 1.62V
w 30 34 80 # Route IN1L and CM1 to LEFT ADCPGA with 20K input impedance
w 30 36 80
w 30 3B 3C # Left Channel Analog ADC PGA = 30 dB
w 30 3D 00 # ADC Analog programmed for PTM_R4
w 30 00 00 # Select Page 0
w 30 51 C0 # Power-up ADC Channel
w 30 52 00 # Unmute ADC channel and Fine Gain = 0dB


#########################################################################################
# Signal Processing Settings
#########################################################################################
w 30 00 00 # Select Page 0
w 30 3c 01 # Set the DAC Mode to PRB_P1 (Setup A)

#########################################################################################
# Output Channel Configuration
#########################################################################################
w 30 00 00 # Select Page 0
w 30 3f c0 # Power up the Left and Right DAC Channels with route the Primary
# ASI's left channel data to Left DAC and right channel to Right DAC
w 30 40 00 # Unmute the DAC digital volume control
w 30 00 01 # Select Page 1
w 30 09 00 # HP Sizing = 100% (Setup A)
w 30 1f 85 # Headphone in Ground-centered Mode, HPL Gain=5dB (Setup A)
w 30 20 85 # HPR To have same gain as HPL, set to 5dB (Setup A)
w 30 1b 33 # Enable DAC to HPL/R and power-up HPL/R

#########################################################################################
# ADC Input Channel Configuration --- IN1L
#########################################################################################
w 30 00 01 # Select Page 1
w 30 08 00 # Set the input common mode to 0.9V
w 30 33 40 # Mic Bias enabled, Source = Avdd, 1.62V
w 30 34 80 # Route IN1L and CM1 to LEFT ADCPGA with 20K input impedance
w 30 36 80
w 30 3B 3C # Left Channel Analog ADC PGA = 30 dB
w 30 3D 00 # ADC Analog programmed for PTM_R4
w 30 00 00 # Select Page 0
w 30 51 C0 # Power-up ADC Channel
w 30 52 00 # Unmute ADC channel and Fine Gain = 0dB

  • Hi Matthew,

    Try the script below. Changes were done in Power and Analog Configuration, Clock configuration and ADC Input Channel Configuration (MICBIAS). Let me know if it works.

    #########################################################################################
    # Headphone Playback, Setup A, High Performance, High Output Power, 48kHz Sampling Rate
    # ADC Stereo Record - High Performance
    # SE input signal from IN1L
    # AVDDx_18, HVDD_18, CPVDD_18 = 1.8V; IOVDDx, MICBIAS_VDD, RECVDD_33 = 3.3V;
    # SVDD, SPK_V = 5V, DVdd = 1.8V
    # MCLK = 12.288MHz
    # PLL Disabled, DOSR = 128, PRB_P1
    # Audio Serial Interface #1 used with WCLK & BCLK as inputs to the device
    #########################################################################################
    
    #########################################################################################
    # Software Reset
    #########################################################################################
    w 30 00 00 # Initialize to Page 0
    w 30 7f 00 # Initialize to Book 0
    w 30 01 01 # Initialize the device through software reset
    d 1        # Delay 1 millisecond
    
    #########################################################################################
    # FIFO Configuration
    #########################################################################################
    w 30 00 00 # Select Page 0
    w 30 7f 78 # Select Book 120
    w 30 32 80 # Enable DAC FIFO
    w 30 7f 64 # Select Book 100
    w 30 32 80 # Enable ADC FIFO
    w 30 7f 00 # Select Book 0
    
    #########################################################################################
    # Power and Analog Configuration
    #########################################################################################
    w 30 00 01 # Select Page 1
    w 30 01 00 # Disable weak AVDD to DVDD connection, make analog supplies available
    w 30 7a 01 # REF charging time = 40ms
    w 30 79 33 # Set the quick charge of input coupling cap for analog inputs
    w 30 21 28 # CP divider = 4, 500kHz, Runs off 8MHz oscillator
    w 30 23 10 # Charge Pump to power up on Ground-Centered Headphone Power-up
    w 30 08 00 # Full chip CM = 0.9V (Setup A)
    w 30 03 00 # PTM_P3, High Performance (Setup A)
    w 30 04 00 # PTM_P3, High Performance (Setup A)
    
    #########################################################################################
    # Clock configuration
    # MCLK = 12.288 MHz, BCLK = 3.072 MHz, WCLK = 48 kHz (slave)
    #########################################################################################
    w 30 00 00 # Select Page 0
    w 30 04 00 # Set DAC_CLKIN as MCLK -- default not mandatory to program
    w 30 0b 81 # NDAC = 1
    w 30 0c 82 # MDAC = 2 (Setup A)
    w 30 0d 00 # Program the OSR of DAC to 128 to get
    w 30 0e 80 # DAC_FS = DAC_MOD_CLK / DOSR = 6.144MHz / 128 = 48kHz
    w 30 12 81 # Power Up NADC, NADC = 1
    w 30 13 82 # Power Up MADC, MADC = 2
    w 30 14 80 # Program the OSR of ADC to 128,
               # ADC_FS = ADC_MOD_CLK / AOSR = 6.144MHz / 128 = 48kHz
    
    #########################################################################################
    # Audio Serial Interface Routing Configuration - Audio Serial Interface #1
    # ASI #1 playback
    #########################################################################################
    w 30 00 04 # Select Page 4
    w 30 01 00 # I2S mode, 16-bit
    w 30 0a 00 # Route ASI#1 WCLK and BCLK to WCLK1 pin and BCLK1 pin
    w 30 08 50 # Left Channel DAC and Primary ASI's Right channel data to
               # Right Channel DAC
    
    #########################################################################################
    # Signal Processing Settings
    #########################################################################################
    w 30 00 00 # Select Page 0
    w 30 3c 01 # Set the DAC Mode to PRB_P1 (Setup A)
    w 30 3d 01 # Set the ADC PRB Mode to PRB_R1
    
    #########################################################################################
    # ADC Input Channel Configuration --- IN1L
    #########################################################################################
    w 30 00 01 # Select Page 1
    w 30 08 00 # Set the input common mode to 0.9V
    w 30 33 C0 # Mic Bias enabled, Source = Avdd, 2.16V
    w 30 34 80 # Route IN1L and CM1 to LEFT ADCPGA with 20K input impedance
    w 30 36 80
    w 30 3B 3C # Left Channel Analog ADC PGA = 30 dB
    w 30 3D 00 # ADC Analog programmed for PTM_R4
    w 30 00 00 # Select Page 0
    w 30 51 C0 # Power-up ADC Channel
    w 30 52 00 # Unmute ADC channel and Fine Gain = 0dB
    
    #########################################################################################
    # Output Channel Configuration
    #########################################################################################
    w 30 00 00 # Select Page 0
    w 30 3f c0 # Power up the Left and Right DAC Channels with route the Primary
               # ASI's left channel data to Left DAC and right channel to Right DAC
    w 30 40 00 # Unmute the DAC digital volume control
    w 30 00 01 # Select Page 1
    w 30 09 00 # HP Sizing = 100% (Setup A)
    w 30 1f 85 # Headphone in Ground-centered Mode, HPL Gain=5dB (Setup A)
    w 30 20 85 # HPR To have same gain as HPL, set to 5dB (Setup A)
    w 30 1b 33 # Enable DAC to HPL/R and power-up HPL/R
    

    Regards,

    J-

  • J,

    Seems like the issue is still there. If you scope the DIN (J18) and DOUT (J17) pins on the EVM you'll see what I mean. I'm using a stock audio file in media player to send data to the EVM. Start and stop the audio and you'll see the data appear on Dout in addition to the Mic data.

    Oddly if you don't plug in a mic no data seems to be sent from DIN to DOUT. If you have a mic attached and play the audio as described above you can see it looping through the AGC block using the CodecControl.exe. I ran the test again with just a mic and no speakers to make sure it wasn't somehow coupling to the mic.

    I'm using the sound recorder built into windows to capture the data back from the EVM.

    It seems as if the digital audio from ASI1 in is being sent through the ADC and mixing with the Mic. Again I'm perplexed as to how this can happen.

    Thanks

    MT
  • MT,

    Do you have PurePath Studio installed? If you use the tone generator component on the miniDSP_A side connected to DOUT component, it will help narrow down where the problem is.

    Regards,

    J-

  • J,

    I do have PurePath installed.  Sending a tone to the I2S output I record only the tone on the PC.  I'm sending audio to I2S in with media player which I can hear through the handset. In this configuration I record only the tone.

      

    If a tone is sent into the DAC and record as shown below I get both the tone and my voice on the recorded audio.

    In simplest terms this was my configuration.  Mic data in to the digital out and digital in from the pc to the handset.   If you record the audio on the PC end you get both the music plus the voice data.

    Let me know your thoughts,

    MT

  • MT,

    For J14 jack, check the J1 and J2 jumper settings. Make sure they match the type of headset you are using. Some headsets are left-right-mic-gnd and others are left-right-gnd-mic. The schematic in the TLV320AIC3263EVM-U User Guide has a table that shows how to configure these jumpers.

    Regards,

    J-

  • J

    I had switched from a set of headphones to a handheld receiver.   Your jumper suggestion prompted me to reevaluate the wiring to the new handset.   I found a grounding issue that was causing my problem.   To the Codec's credit it sounded really good which made me think it was a register issue.   Things seem to be working appropriately now.

    Thank you for the support,

    MT

  • MT,

    Glad to hear it is working now.

    Regards,
    J-
  • hi  j,

                       I also faced same problem..please explain to me how can you solved  that issue(on DOUT pin i am getting continuous data)