TLV320AIC3104EVM-K: Audio leakage between left and right handset MICs

Part Number: TLV320AIC3104EVM-K

Separate handsets (L and R), handset MICs connected to IN2L and IN2R mic inputs.
Common bias voltage (2.5V) applied to each MIC thru MICBIAS and JMP10.

1kHz sine wave played thru external speaker, LEFT handset MIC at speaker, RIGHT handset out of speaker proximity.

Apparent audio leakage from LEFT to RIGHT channel, see image.

Codec config provided.

### CODEC 1
################################################################
# CODEC 1 — TWO MONO HEADSETS
################################################################
# page zero, reset
w 30 00 00
w 30 01 80
# BCLK -> PLLCLK_IN and CLKDIV_IN
w 30 66 A0
# PLL on, Q=2, P=1
w 30 03 91
# PLL J=32, D=0
w 30 04 80
# I2S flow: DACL=I2S_L, DACR=I2S_R
w 30 07 0A
# I2S 32-bit word length; use 0x20 for 24-bit
w 30 09 30
################################################################
# MICROPHONE SETUP
################################################################
# Mic bias (2.5VDC)
w 30 19 80
# Headset0 mic: MIC2L -> ADCL
# Headset1 mic: MIC2R -> ADCR
w 30 11 0F
w 30 12 F0
# ADC power on
w 30 16 7C
w 30 13 7C
# PGA gain +12dB
w 30 0F 18
w 30 10 18
################################################################
# HEADPHONE OUT
################################################################
# DAC output switching: linked DAC volume behavior
w 30 29 02
# DAC digital volume control set to 0dB
w 30 2B 00
w 30 2C 00
# turn DAC on, HPLCOM=SE
w 30 25 E0
# HPRCOM=SE
w 30 26 10
# power up, unmute HPLOUT, HPROUT
w 30 33 0D
w 30 41 0D
################################################################
# VOLUME / ROUTING
################################################################
# Headset0: PGA_L + DAC_L1 -> HPLOUT
w 30 2E A4
w 30 2F 80
# Headset1: PGA_R + DAC_R1 -> HPROUT
w 30 3F A4
w 30 40 80
################################################################
# ADC HPF
################################################################
# page one
w 30 00 01
# Left channel HPF coeffs
# N0=32768*e^(-2*PI*8/48000)=32734
w 30 41 7f
w 30 42 DE
# N1=-N0=-32734
w 30 43 80
w 30 44 22
# D1=N0=32734
w 30 45 7f
w 30 46 DE
# Right channel HPF coeffs
# N0=32768*e^(-2*PI*8/48000)=32734
w 30 47 7f
w 30 48 DE
# N1=-N0=-32734
w 30 49 80
w 30 4A 22
# D1=N0=32734
w 30 4B 7f
w 30 4C DE
# page zero
w 30 00 00
# HPF coeff select: Use programmable coeffs
w 30 6B C0
# enable ADC HPF
w 30 0C 50

 

3104EVM_LtoR_Audio_leakage.png

  • Hi Stephen,

    It's not recommended to change ADC filter coefficients while the ADC is already running. Can you sequence the code such that all powerups/unmutes are at the end?

    Thank you,
    Jeff McPherson

  • Thanks Jeff.
    We'll re-sequence and let you know.

    An aside, is it just me or is it more difficult to login to the forum to reply to posts now?
    Firefox and Edge, multiple attempts resulted in failed logins.

    Steve

  • Hi Steve,

    I haven't noticed but I'll pass the feedback along to the website devs just in case something is going wrong.

    Thanks,

    Jeff McPherson

  • Hi Jeff,

    We re-sequenced the code and we still have the audio leakage problem.

    The problem occurs on one system and we have not been able to recreate it on a second system.

    Both systems are running the same configuration code so it seems like it may be specific to one system.
    The problem system is with the software development team so we haven't done any hardware debugging on it yet, that'll be happening soon.

    Config code shown below.


    Any thoughts?

    Thanks.

    Steve

    ### CODEC 1 7-20-26
    ################################################################
    # CODEC 1 — TWO MONO HEADSETS
    ################################################################
    # Sequence (TI guidance): clocks/routing/HPF/DAC+HP route while powered down;
    # all power-ups and unmutes at the end (do not change HPF coeffs with ADC running).

    # page zero, soft reset
    w 30 00 00
    w 30 01 80

    ################################################################
    # CLOCKS / I2S
    ################################################################
    # BCLK -> PLLCLK_IN and CLKDIV_IN
    w 30 66 A0
    # PLL on, Q=2, P=1
    w 30 03 91
    # PLL J=32, D=0
    w 30 04 80
    # I2S flow: DACL=I2S_L, DACR=I2S_R
    w 30 07 0A
    # I2S 32-bit word length; use 0x20 for 24-bit
    w 30 09 30

    ################################################################
    # INPUT ROUTING (ADC still off)
    ################################################################
    # Headset0 mic: MIC2L -> ADCL
    # Headset1 mic: MIC2R -> ADCR
    w 30 11 0F
    w 30 12 F0

    ################################################################
    # PGA gain while muted (D7=1); unmute after ADC power-up
    ################################################################
    # +12 dB, muted
    w 30 0F 98
    w 30 10 98

    ################################################################
    # ADC HPF — programmable ~8 Hz @ 48 kHz (ADC still off)
    # Coeffs: forum.bela.io/.../7
    ################################################################
    w 30 00 01
    # Left: N0=32734, N1=-32734, D1=32734
    w 30 41 7f
    w 30 42 DE
    w 30 43 80
    w 30 44 22
    w 30 45 7f
    w 30 46 DE
    # Right: same
    w 30 47 7f
    w 30 48 DE
    w 30 49 80
    w 30 4A 22
    w 30 4B 7f
    w 30 4C DE
    w 30 00 00
    # HPF coeff select: programmable
    w 30 6B C0
    # enable ADC HPF
    w 30 0C 50

    ################################################################
    # OUTPUT ROUTING / LEVELS (before DAC/HP power)
    ################################################################
    # DAC output switching: linked DAC volume behavior
    w 30 29 02
    # DAC digital volume 0 dB (unmuted value; DAC still powered down)
    w 30 2B 00
    w 30 2C 00
    # HPRCOM=SE (config)
    w 30 26 10
    # Headset0: PGA_L + DAC_L1 -> HPLOUT
    w 30 2E A4
    w 30 2F 80
    # Headset1: PGA_R + DAC_R1 -> HPROUT
    w 30 3F A4
    w 30 40 80

    ################################################################
    # POWER-UP / UNMUTE (last)
    ################################################################
    # Mic bias (2.5VDC)
    w 30 19 80
    # ADC power on
    w 30 16 7C
    w 30 13 7C
    # turn DAC on, HPLCOM=SE
    w 30 25 E0
    # power up, unmute HPLOUT, HPROUT
    w 30 33 0D
    w 30 41 0D
    # unmute PGA at +12 dB
    w 30 0F 18
    w 30 10 18

  • Hi Stephen,

    The code sequence looks correct to me, and if it's working for the system you have then there is likely not much to do from the software point of view.

    When you get the second system back I would verify that both systems are taking the same writes i.e. the same register dump, especially those ADC coefficients as well as the input path configurations.

    I would also try an AB swap of the devices to see if the issue follows a device or a board.

    Best regards,
    Jeff McPherson

  • Thanks Jeff.


    We'll be looking at the hardware and swapping boards over the next few days.
    Will update.

    Steve