28
DS1113F1
CS4399
4.4 Headphone Presence Detect
4.4.1
Headphone Presence Detect
The CS4399 supports headphone presence-detect capability via the HP_DETECT sense pin. HP_DETECT is debounced
to filter out brief events before being reported to the corresponding presence-detect status bit and generating an interrupt
if appropriate.
4.4.1.1 Headphone Detect Methods
CS4399 can detect the presence or absence of a plug. For a headphone-presence detect, a sense pin is connected to a
terminal on the receptacle such that, if no plug is inserted, the pin is floating. If a plug is inserted, the pin is shorted to the
tip (T) terminal. The presence detect function is accomplished by having a small current source inside the CS4399 to pull
up the pin if it is left floating (no plug). If a plug is inserted and the sense pin is shorted to headphone output, the sense
pin is shorted to the output signal and, therefore, is pulled below a certain threshold via the output stage of the HP amp.
Thus, a low level at the sense pin indicates plug inserted, and a high level at the sense pin indicates plug removed.
4.4.1.2 Headphone Detect Registers
This section describes the behavior and interaction of the headphone-detect debounce register fields. See
reference.
Figure 4-8. Headphone Detect Block Diagram
• HPDETECT_CTRL configures the operation of the HP detect circuit.
• HPDETECT_INV inverts the signal from the HP detect circuit.
• HPDETECT_FALL_DBC_TIME configures the HP_DETECT falling debounce time.
• HPDETECT_RISE_DBC_TIME configures the HP_DETECT rising debounce time.
• HPDETECT_PLUG_DBC shows the falling-edge-debounced version of HP_DETECT signal.
• HPDETECT_UNPLUG_DBC shows the rising-edge-debounced version of HP_DETECT signal.
• HPDETECT_PLUG_INT shows the headphone plug-in event status.
• HPDETECT_UNPLUG_INT shows the headphone unplug event status.
• HPDETECT_PLUG_INT_MASK is the interrupt mask of headphone plug-in event status.
• HPDETECT_UNPLUG_INT_MASK is the interrupt mask of headphone unplug event status.
4.4.1.3 Headphone Detect and Interrupts Setup Instructions
The following steps are required for activation of headphone-detect debounce interrupt status:
1. Ensure the I
2
C is ready to respond to control port command.
2. Clear the interrupt masks.
HP_DETECT
0
1
HP Detect Block
No
Delay
HP Detect
Plug/Unplug
Detect
HP Detect
Plug/Unplug Interrupt
Mask
HP Detect
Plug/Unplug Interrupt
Status
Interrupt Handler Block
INT
Read
Deasserts INT
FALL_DEBOUNCE
RISE DEBOUNCE
No
Delay
HP Detect
Debounced Status