Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 048b11a8 authored by Phani Kumar Uppalapati's avatar Phani Kumar Uppalapati
Browse files

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.

Change-Id: I5b9a81439f1216c9b0506c11bff1ff992162fc5d
Signed-off-by: default avatarPhani Kumar Uppalapati <phaniu@codeaurora.org>
parent 416e5ce5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -47,6 +47,9 @@ enum snd_jack_types {
	SND_JACK_OC_HPHL	= 0x0000040,
	SND_JACK_OC_HPHR	= 0x0000080,
	SND_JACK_UNSUPPORTED	= 0x0000100,
	SND_JACK_MICROPHONE2    = 0x0000200,
	SND_JACK_ANC_HEADPHONE = SND_JACK_HEADPHONE | SND_JACK_MICROPHONE |
				 SND_JACK_MICROPHONE2,
	/* Kept separate from switches to facilitate implementation */
	SND_JACK_BTN_0		= 0x4000000,
	SND_JACK_BTN_1		= 0x2000000,
+1 −0
Original line number Diff line number Diff line
@@ -852,6 +852,7 @@ struct input_keymap_entry {
#define SW_HPHL_OVERCURRENT	0x0e  /* set = over current on left hph */
#define SW_HPHR_OVERCURRENT	0x0f  /* set = over current on right hph */
#define SW_UNSUPPORT_INSERT	0x10  /* set = unsupported device inserted */
#define SW_MICROPHONE2_INSERT   0x11  /* set = inserted */
#define SW_MAX			0x20
#define SW_CNT			(SW_MAX+1)

+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ static int jack_switch_types[] = {
	SW_HPHL_OVERCURRENT,
	SW_HPHR_OVERCURRENT,
	SW_UNSUPPORT_INSERT,
	SW_MICROPHONE2_INSERT,
};

static int snd_jack_dev_free(struct snd_device *device)