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.

TLV320AIC3204: Headset button detection

Hi all,

Well, following on my other thread on the topic... I've managed to implement polling (currently fixed at every 200msec) of the interrupt flags.  Interrupts are read when the INT1 or INT2 lines are raised too but this at least allows us to monitor for when the button on the headset is released.

So far so good.  However, if the user plugs in the headset with the button already pressed... the CODEC thinks a stereo headset is plugged in, and doesn't make any attempt to re-detect the headset when the button is released.  This is a severe problem for us, as we're using this button as a hook switch on a handset... so it will be "pressed" most of the time, including at device power-up.  I can turn off headset detection and turn it back on again, this results in quite a bit of noise since it acts like someone is unplugging and replugging the headset until such time as the button is released -- then on the next "plug-in" it behaves normally.

Is there a workaround other than to continually disable and re-enable the headset detection in order to re-detect the headset type?

Regards,

Stuart Longland

  • Stuart,

    As you mentioned, if a button is pressed while inserting the plug it will be registered as stereo headset because DETECT is shorted to ground at that instant.

    If the codec is configured as ADC->DOUT and DIN->DAC, then there shouldn't be pops. If the ADC data is looped into the DAC side (e.g. sidetone), then I'd recommend to set the input section gain to a low level (or mute) until the correct headset type is detected.

    Regards,

    J-

  • J Arbona said:

    Stuart,

    As you mentioned, if a button is pressed while inserting the plug it will be registered as stereo headset because DETECT is shorted to ground at that instant.

    Indeed, now is there a way to otherwise tell the CODEC either to :-

    1. Take another look... or
    2. Tell it explicitly what sort of headset to look for?

    J Arbona said:

    If the codec is configured as ADC->DOUT and DIN->DAC, then there shouldn't be pops. If the ADC data is looped into the DAC side (e.g. sidetone), then I'd recommend to set the input section gain to a low level (or mute) until the correct headset type is detected.

    Pops shouldn't be an issue, if need be, we just delay the start of transmission by .1 of a second or so, clipping off the loud "pop". However, if the device is powered up with what it thinks are stereo headphones, we need a way to be able to convince the CODEC that its original assessment was incorrect.

    Is it possible for the CODEC to re-detect the headset when the button is released?

  • Stuart,

    You can disable and re-enable the headset detection to re-detect the headset type when the button is released.

    Regards,

    J-