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

Commit 63c5aec9 authored by Banajit Goswami's avatar Banajit Goswami Committed by Gerrit - the friendly Code Review server
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: I72d16892f2fa563c026bf90d847d9365dcf2233a
Signed-off-by: default avatarPhani Kumar Uppalapati <phaniu@codeaurora.org>
Signed-off-by: default avatarBanajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: default avatarSudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: default avatarMeng Wang <mwang@codeaurora.org>
parent 3f462363
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -61,6 +61,9 @@ enum snd_jack_types {
	SND_JACK_OC_HPHL        = 0x0040,
	SND_JACK_OC_HPHL        = 0x0040,
	SND_JACK_OC_HPHR        = 0x0080,
	SND_JACK_OC_HPHR        = 0x0080,
	SND_JACK_UNSUPPORTED    = 0x0100,
	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 */
	/* Kept separate from switches to facilitate implementation */
	SND_JACK_BTN_0		= 0x4000,
	SND_JACK_BTN_0		= 0x4000,
+2 −1
Original line number Original line Diff line number Diff line
@@ -785,7 +785,8 @@
#define SW_PEN_INSERTED		0x0f  /* set = pen inserted */
#define SW_PEN_INSERTED		0x0f  /* set = pen inserted */
#define SW_HPHL_OVERCURRENT	0x10  /* set = over current on left hph */
#define SW_HPHL_OVERCURRENT	0x10  /* set = over current on left hph */
#define SW_HPHR_OVERCURRENT	0x11  /* set = over current on right hph */
#define SW_HPHR_OVERCURRENT	0x11  /* set = over current on right hph */
#define SW_UNSUPPORT_INSERT	0x12  /* set = unsupported device inserted */
#define SW_MICROPHONE2_INSERT	0x12  /* set = inserted */
#define SW_UNSUPPORT_INSERT	0x13  /* set = unsupported device inserted */
#define SW_MAX			0x20
#define SW_MAX			0x20
#define SW_CNT			(SW_MAX+1)
#define SW_CNT			(SW_MAX+1)


+1 −0
Original line number Original line Diff line number Diff line
@@ -43,6 +43,7 @@ static int jack_switch_types[] = {
	SW_HPHL_OVERCURRENT,
	SW_HPHL_OVERCURRENT,
	SW_HPHR_OVERCURRENT,
	SW_HPHR_OVERCURRENT,
	SW_UNSUPPORT_INSERT,
	SW_UNSUPPORT_INSERT,
	SW_MICROPHONE2_INSERT,
};
};
#endif /* CONFIG_SND_JACK_INPUT_DEV */
#endif /* CONFIG_SND_JACK_INPUT_DEV */