diff options
author | Sudheer Papothi <spapothi@codeaurora.org> | 2016-02-23 09:08:21 +0530 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:09:53 -0700 |
commit | 5d092152c955a90c1fb820692a522e801e94e767 (patch) | |
tree | 7de89bc997ab516546f42d869b7a73a177bc30de | |
parent | 545e868e0583cf4372bb0e5d8ba3db826d87b4ef (diff) |
ALSA: jack: Add support to report second microphone
ALSA jack framework currently supports reporting only
one single microphone. Add support to report presence of
second microphone to userspace.
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
-rw-r--r-- | include/sound/jack.h | 3 | ||||
-rw-r--r-- | include/uapi/linux/input-event-codes.h | 1 | ||||
-rw-r--r-- | sound/core/jack.c | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/include/sound/jack.h b/include/sound/jack.h index 9b60df639f6f..424f8fbae601 100644 --- a/include/sound/jack.h +++ b/include/sound/jack.h @@ -61,6 +61,9 @@ enum snd_jack_types { SND_JACK_OC_HPHL = 0x0040, SND_JACK_OC_HPHR = 0x0080, SND_JACK_UNSUPPORTED = 0x0100, + SND_JACK_MICROPHONE2 = 0x0200, + SND_JACK_ANC_HEADPHONE = SND_JACK_HEADPHONE | SND_JACK_MICROPHONE | + SND_JACK_MICROPHONE2, /* Kept separate from switches to facilitate implementation */ SND_JACK_BTN_0 = 0x4000, diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h index b97184a4175e..88956276c8ab 100644 --- a/include/uapi/linux/input-event-codes.h +++ b/include/uapi/linux/input-event-codes.h @@ -751,6 +751,7 @@ #define SW_MUTE_DEVICE 0x0e /* set = device disabled */ #define SW_HPHL_OVERCURRENT 0x0f /* set = over current on left hph */ #define SW_HPHR_OVERCURRENT 0x10 /* set = over current on right hph */ +#define SW_MICROPHONE2_INSERT 0x11 /* set = inserted */ #define SW_UNSUPPORT_INSERT 0x12 /* set = unsupported device inserted */ #define SW_MAX 0x20 #define SW_CNT (SW_MAX+1) diff --git a/sound/core/jack.c b/sound/core/jack.c index 72fad57c3530..45e9781b592e 100644 --- a/sound/core/jack.c +++ b/sound/core/jack.c @@ -42,6 +42,7 @@ static int jack_switch_types[] = { SW_HPHL_OVERCURRENT, SW_HPHR_OVERCURRENT, SW_UNSUPPORT_INSERT, + SW_MICROPHONE2_INSERT, }; static int snd_jack_dev_disconnect(struct snd_device *device) |