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.

TLV320AIC3101 registers configuration problem

Other Parts Discussed in Thread: TLV320AIC3101

hello Diego,

I have a board design that includes the TLV320AIC3101 codec connected to the CP2114 USB bridge. (the USB bridge is connected via USB to my PC)

Im having big problems setting up and configurating the registers for the TLV320AIC3101.

I need to use two mic inputs and two speaker outputs accordingly. (but not at the same time)

my design has the following 2 audio channels setup:

channel 1

MIC1LP and MIC1LM (pins 10,11) are connected to my differntial microphone while pin 11 is grounded.

My speakers are connected to LEFT_LOP and LEFT_LOM 

channel 2

MIC2L/LINE2L/MICDET : im using this pin (14) for a mic detect along with the MICBIAS pin (15), so my first microphone is connected to pins 14 and 16 (MIC2R).

i need the CODEC to identify that MIC2 is connected in order to use this audio channel. while MIC2 is not connected i want to be able to use channel 1 audio instead, as described above.

My speakers are connected to HPROUT for this channel2.

i am not using HPRCOM, HPLOUT, HPLCOM, RIGHT_LOP, RIGHT_LOM, MIC1RP, MIC1RM pins.

please help and advice which registers i need to configure and how to configure them.

it would help me a lot if you could send me the exact registers configuration for my setup as described above.

thank you very much

best regards

nimrod

  • Hi, nimrod,

    Welcome to E2E and thank you for your interest in our products.

    Please take a look at the following script. You may use it as a guide to configure your codec. This script is used for a codec with MCLK = 11.2986MHz; WCLK = 44.1kHz; BCLK = 2.8224MHz. MIC1LP and MIC1LM are configured in differential mode to Left ADC. MIC2R to Right ADC. Left DAC to LEFT_LOP/M and Right DAC to HPROUT.

    # MCLK = 11.2986 MHz.
    # WCLK = 44.1 kHz.
    # BCLK = 2.8224 MHz.
    # No PLL
    #
    # Page 0
    w 30 00 00
    #
    # Software reset
    w 30 01 80
    #
    # Fs(ref) settings/L-RDAC to L-R Channel
    w 30 07 8A
    #
    # Codec_Clkin source selection
    w 30 65 01
    #
    # MICBIAS is connected to AVDD
    w 30 19 c0
    #
    # MIC1LP to LADC, LADC powered on
    w 30 13 84
    #
    # MIC2R to RADC
    w 30 12 F0
    #
    # RADC powered on
    w 30 16 7C
    #
    # LADC PGA is not muted
    w 30 0f 00
    #
    # RADC PGA is not muted
    w 30 10 00
    #
    # AC-coupled driver config
    w 30 0e 80
    #
    # DAC_L1 to LEFT_LOP/M
    w 30 52 80
    #
    # DAC_R1 to HPROUT
    w 30 40 80
    #
    # Left-DAC is not muted
    w 30 2B 00
    #
    # Right-DAC is not muted
    w 30 2c 00
    #
    # DAC power
    w 30 25 C0
    #
    # LEFT_LOP/M control
    w 30 56 09
    #
    # HPROUT control
    w 30 41 09

    Please let me know if you have more questions or comments.

    Best regards,
    Luis Fernando Rodríguez S.

  • hello Luis,

    thank you very much, it seems to be working now.

    i still have a problem with the mic detection, meaning that i hear both speakers at the same time. i need that when the headset is connected in mic2L/R with the MIC DET  , i need to hear only in HPROUT and when i disconnect that headset i want to hear only in LEFT_LOM/P.

    thanks again

    nimrod

  • Hi, nimrod,

    There are three registers that can be used in order to detect the headset insertion:

    • Page 0 / Register 14 / D4: Headset Detection Flag
    • Page 0 / Register 96 / D4: Headset Detection Status
    • Page 0 / Register 97 / D2: Headset Detection Status

    Have you verified if one of these bits has any change when you connect the headset?

    Best regards,
    Luis Fernando Rodríguez S.

  • hi Luis,
    i tried looking at those registers and changed the values there, but with no response regarding the MIC detection.
    i am using a 150 ohm microphone on the MIC2 channel connected as i explained earlier.
    do you have any more suggestions?
    also, as i mentioned before, my CODEC is connected to the CP2114 USB bridge. i am trying to make the volume up/down via that bridge to work with no luck so far. Are you familiar with that USB bridge? if so, how should i configure the USB bridge resisters ?
    thank you very much
    nimrod
  • Hi, nimrod,

    The Jack/Headset Detection is used with a proper connection. Do you have configured your circuit as explained on the 11.3.10 Jack/Headset Detection section of datasheet? Do you have a similar connection?

    Additionally, I'm not familiar with the USB bridge. However, if you're looking for volume up/down, I would suggest to use the registers 43/44 (page 0) for DAC volume or registers 15/16 (page 0) for ADC PGA volume.

    I hope this helps you. Please let me know if you have more questions or comments.

    Best regards,
    Luis Fernando Rodríguez S.

  • hi Luis,

    i have the same connection in my system as mentioned in the data sheet.

    if i am using a 150 ohm microphone, what resistor value should i use for the MIC BIAS ?

    thanks again

    nimrod

  • hi Luis,

    i have another problem: once i change the volume with the WINDOWS volume bar on the the lower right corner the HPROUT goes silent but the LEFT_LOM/P is ok. any idea why that happens?

    thanks again

    nimrod

  • Hi, nimrod,

    Please take a look at the following example of the mic connection. It uses a 2.2kohm resistor from mic to MICBIAS.

    Regarding your question about the HPROUT behavior, is it possible to make another test? It must be related with the channel configuration. So, could you only change the volume of one of the two channels? I mean, could you modify the volume of the left or right channel by windows? It could give us a better approach of this issue.

    Best regards,
    Luis Fernando Rodríguez S.

  • hi Luis,

    Thank you for your response.

    I will try the mic connections as you suggested.

    Regarding the volume issue, the windows volume bar only shows me one volume bar which controls the two speakers at the same time, so i cant control left or right seperately.

    Is it maybe because of my specific CODEC registers configuration as you suggested me to configure earlier?

    Is there a way to configure the two speakers seperately so i could see two seperate volume bars in windows? maybe they are mixed together? maybe its related to the minimum volume registers values ?

    Thanks again for your help

    Nimrod

  • hi Luis,

    register 64 solves the volume issue, meaning now i can control the HPROUT volume ok but it sounds smuged with noise, like listening to a radio receiver out of tuned. 

    when i dont write anything to register 64 it sounds great but, again, when touching the volume bar, the HPROUT goes almost silent.

    thanks

    nimrod

  • hi Luis,
    even better, register 41 totaly solves the volume issue.

    thanks

    nimrod
  • hi Luis,

    I have a new issue.

    while speaking to the microphone (MIC1 or MIC2) there is a back round static noise. 

    do you have any idea how can i get rid of that back round noise? what register, if any, can control the noise level?

    thanks

    nimrod

  • Hi, nimrod,

    There're no noise control registers on the TLV320AIC3101. So, the noise issue should be removed by external components.

    Additionally, the TLV320AIC3101 supports ADC High-Pass Filter and Digital Audio Processing for Playback. If you're interested in improve the audio quality, these features could be an option. These filters can be programmed by the user to reach the desired quality.

    I hope this helps you. Please let me know if you have more questions or comments.

    Best regards,
    Luis Fernando Rodríguez S.

  • hi Luis,

    In TLV320AIC3101IRHBT codec i am having some problems while using both MIC2 and MIC1L channels at the same time (connected to different microphones).

    there seem to be some king of noise or continuous beep.

    do you have any idea or suggestions ?

    thank you

    nimrod 

  • Hi, nimrod,

    There are several root causes that could be involved with this issue. The first one is the power supplies. You should ensure that all power supplies (specially, AVDD) are regulated correctly. Please verify if this noise/continuous beep is not present on any power supply. The second one is the MICBIAS pin and analog input. Have you verified if this issue is present on these pins? We need to verify the source of the problem.

    Best regards,
    Luis Fernando Rodríguez S.