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.

TLV320AIC3120: Headset detection problem

Part Number: TLV320AIC3120

Hi,

I'm working on one of our boards that uses the TLV320AIC3120 CODEC.

In general it is working correctly and I can change register values etc and the results are expected.

However when it comes to headset detection I cannot seem to get this to work. I set register 67 with { 0x43U, 0x80U } to enable the headset detection in the initialisation of the TLV320AIC3120. 

Then later when the everything is up and running and I plug in a headset I read tlv320_get_param(0x43U, &reg_val); and it returns 0x80U which suggest no headset detected. I also read registers 0x2CU and 0x2EU and they come back with 0x00U. I can unplug & re-plug in the headset etc but nothing changes in the registers.

The circuit is the same a seen on the development board with the appropriate jumpers in place.

Anyone have any ideas or example code?

  • Hello Matthew, 

    You mentioned you are using one of your boards, to be clear this is not a TI EVM correct?  

    if it is one of your boards, can you PM me the codec portion of the Schematic?  I'd just like to see what you have implemented. 

    We do have an application report for the AIC33/AIC310x family of devices and the Headset detection in the AIC3120 devices should be identical to those. 

    You can find the application report here: Headset Detection for TLV320AIC33 and TLV320AIC3101/4/5/6 Family

    best regards,

    -Steve Wilson

  • Hi Steve,

    Thanks for the reply. I had found the datasheet you linked to yesterday, it seems that the initial problem for me is that the detection of a headset being connected is not happening, and so the headset type detection will not happen until the headset connection is detected.

    My circuit is as below.

     Headset is connected to P5, JP17 set to 1-2 for Mic detect. R90 (0R) and R47 (2k2) fitted. Micbias, I have tried all 3 settings (2, 2.5 and AVDD).

    If with a Micbias of 3.3v (AVDD), I measure the micdect voltage it reads 2.61v, which following the rules from the data sheet should detect the presence of the headset. However register 67 returns 0x80U.

    I have a couple more boards to try, but this is the case with 2 so far. Everything else works well with audio in/out and changing of various gains so I just feel I must have a setting wrong somewhere.

    Also the 7-bit Vol ADC is powered down, Page 0 register 116 { 0x74U, 0x00U }, Page 1 Register 31 { 0x1FU, 0x84U }, /* Headphone Drivers : HPOUT output driver powered up  - CM voltage set to 1.35v */

    Thanks for looking at this 

    Matt

     

  • Hi Steve,

    I just remembered, we have by accident connected MIC1LM to AVSS on the PCB, could this be the issue? Unfortunately I have no way to disconnect this as its connected under the IC.

    Matt

  • Matt, 

    We tend to recommend that unused inputs be terminated to GND with a 0.47uf Capacitor.  as long as the MIC1LM input is never enabled, you shouldn't have a problem.  We recommend terminating for possible induced ESD events.  There are internal ESD protection diodes, but they are intended to prevent damage during handling and manufacturing. If you end up doing another PCB rev,  I would recommend making the change. 

    Regarding the Headset detection, I wonder if having the potentiometer on HPOUT would lead to a inability to detect a speaker.  the speaker is expected to be in the 8-120ohm range,  not 10k,  does anything change if you remove the pot and short the wiper to the HPOUT? 

    best regards,

    -Steve Wilson

  • Hi Steve,

    I tried shorting out the 10k pot but this didnt help, also connected a decade box (to the ear piece input) and ran the resistance up and down to see if it detected anything but not luck, I also did this on the mic input and again no detection.

    From the datasheet you provided, it seems that before detection of earpiece the detection of the headset being inserted is required due to the logic circuit. Given that the That MICDECT is 2.61v and V2 (Micbias 3.3v) calculates to be 3.21, and V1 = 1.477v then I would expect the register 67 (0x43) bits 5&6 to be 11, but all I ever read back is 0x80u from the register.

    Not sure what else to try, but thanks for the suggestions.

    Matt

  • Hi Steve,

    Interestingly I dont seem to be getting it to detect a short on the headphone. So for instance when Page 1 register 31 (1F) is set to 0x84 and a short is applied across the headphone output (C90 to 0V_AUD), I see no change in the register value.

    Its almost as if I cant read "Read only" register values or they arent getting updated?

    Matt

  • Hi Matt, 

    I've tested this again on the EVM and was able to see headphones with mic and headphones without detected. 

    When I was testing this I tried various different loads to change the voltage on the MICDET pin,  and I got a mic detection at .6V and at 2.9V,  I tried 3.1V but it didn't detect.  

    regarding the short circuit detection,  it is based off of current draw... so if the channel is idling it may not detect the short.  If you are playing audio and short the output,  it will certainly detect this. 

    best regards,

    -Steve Wilson