ALSA: add headphone over current switches

Some CODECs monitor current drawn by headphone power amplifer.
If current consumed goes over pre-defined threshold, CODEC would
communicate to host processor. Then, CODEC driver would propagate
the event so user-space application can react accordingly.
Add support to propagate over current events for both
left headphone and right headphone through ALSA jack framework.

Change-Id: Ieef36f070a4478a5a80ec4c8b0cc81464abd75ad
Signed-off-by: Patrick Lai <plai@codeaurora.org>
This commit is contained in:
Patrick Lai
2011-11-03 08:32:51 -07:00
parent 49277a6da1
commit ac510b92be
3 changed files with 6 additions and 1 deletions

View File

@@ -812,6 +812,8 @@ struct input_keymap_entry {
#define SW_KEYPAD_SLIDE 0x0a /* set = keypad slide out */
#define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */
#define SW_ROTATE_LOCK 0x0c /* set = rotate locked/disabled */
#define SW_HPHL_OVERCURRENT 0x0d /* set = over current on left hph */
#define SW_HPHR_OVERCURRENT 0x0e /* set = over current on right hph */
#define SW_MAX 0x0f
#define SW_CNT (SW_MAX+1)