diff mbox series

ALSA: hda/realtek - Fix alienware headset mic

Message ID QB1PR01MB2337D0367C2E3ADB0010134F808C0@QB1PR01MB2337.CANPRD01.PROD.OUTLOOK.COM (mailing list archive)
State New, archived
Headers show
Series ALSA: hda/realtek - Fix alienware headset mic | expand

Commit Message

James McDonnell Sept. 16, 2019, 2:53 p.m. UTC
From: James McDonnell <james_mcdonnell@hotmail.com>
Subject: [PATCH] ALSA: hda/realtek - Fix alienware headset mic

Headset microphone quirk for alienware 15r3. Without this using
a headset with mic attached will not work.

Signed-off-by: James McDonnell <james_mcdonnell@hotmail.com>
Cc: alsa-devel@alsa-project.org
---
 sound/pci/hda/patch_realtek.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

James McDonnell Sept. 16, 2019, 10:07 p.m. UTC | #1
On Mon, Sep 16, 2019 at 11:50:42PM +0200, Takashi Iwai wrote:
> On Mon, 16 Sep 2019 16:53:38 +0200,
> James McDonnell wrote:
> > @@ -7680,6 +7690,11 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
> >  		{0x17, 0x90170110},
> >  		{0x1a, 0x03011020},
> >  		{0x21, 0x03211030}),
> > +	SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE,
> > +		{0x12, 0xb7a60140},
> > +		{0x17, 0x90170110},
> > +		{0x1a, 0x03a11030},
> > +		{0x21, 0x03211020}),
> 
> It's a slightly uncertain whether this is 100% safe to apply via the
> pin-quirk table, but also there is no big other reason to push back,
> so I applied it now.

I've been running with this patched to my kernel for a while now.
Any particular things I should do to test?

Some background on how I got to this patch was I couldn't get the mic
to work with a TRRS pinout headset. I discovered that if I set modprobe
options for laptop-amic and dell-headset-multi in a particular order
the mic would start working. I worked backwards to find this
solution.

> 
> 
> Thanks!
> 
> Takashi

Cheers,
James
Takashi Iwai Sept. 17, 2019, 5:47 a.m. UTC | #2
On Tue, 17 Sep 2019 00:07:56 +0200,
James McDonnell wrote:
> 
> On Mon, Sep 16, 2019 at 11:50:42PM +0200, Takashi Iwai wrote:
> > On Mon, 16 Sep 2019 16:53:38 +0200,
> > James McDonnell wrote:
> > > @@ -7680,6 +7690,11 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
> > >  		{0x17, 0x90170110},
> > >  		{0x1a, 0x03011020},
> > >  		{0x21, 0x03211030}),
> > > +	SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE,
> > > +		{0x12, 0xb7a60140},
> > > +		{0x17, 0x90170110},
> > > +		{0x1a, 0x03a11030},
> > > +		{0x21, 0x03211020}),
> > 
> > It's a slightly uncertain whether this is 100% safe to apply via the
> > pin-quirk table, but also there is no big other reason to push back,
> > so I applied it now.
> 
> I've been running with this patched to my kernel for a while now.
> Any particular things I should do to test?

Not in your side.  My concern is whether this may hit too widely to
other devices falsely because it's matching with the pin config
patterns.  The alternative is to match with PCI (or codec) SSID.

But the pin config matching is done in a lower priority, so let's hope
my afraid isn't true :)


thanks,

Takashi

> Some background on how I got to this patch was I couldn't get the mic
> to work with a TRRS pinout headset. I discovered that if I set modprobe
> options for laptop-amic and dell-headset-multi in a particular order
> the mic would start working. I worked backwards to find this
> solution.
> 
> > 
> > 
> > Thanks!
> > 
> > Takashi
> 
> Cheers,
> James
>
diff mbox series

Patch

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index e333b3e30e31..347fcd755571 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5745,6 +5745,7 @@  enum {
 	ALC292_FIXUP_DELL_E7X,
 	ALC292_FIXUP_DISABLE_AAMIX,
 	ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK,
+	ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE,
 	ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
 	ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE,
 	ALC275_FIXUP_DELL_XPS,
@@ -6426,6 +6427,15 @@  static const struct hda_fixup alc269_fixups[] = {
 		.chained = true,
 		.chain_id = ALC292_FIXUP_DISABLE_AAMIX
 	},
+	[ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE] = {
+		.type = HDA_FIXUP_PINS,
+		.v.pins = (const struct hda_pintbl[]) {
+			{ 0x18, 0x01a1913c }, /* headset mic w/o jack detect */
+			{ }
+		},
+		.chained_before = true,
+		.chain_id = ALC269_FIXUP_HEADSET_MODE,
+	},
 	[ALC298_FIXUP_DELL1_MIC_NO_PRESENCE] = {
 		.type = HDA_FIXUP_PINS,
 		.v.pins = (const struct hda_pintbl[]) {
@@ -7680,6 +7690,11 @@  static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
 		{0x17, 0x90170110},
 		{0x1a, 0x03011020},
 		{0x21, 0x03211030}),
+	SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE,
+		{0x12, 0xb7a60140},
+		{0x17, 0x90170110},
+		{0x1a, 0x03a11030},
+		{0x21, 0x03211020}),
 	SND_HDA_PIN_QUIRK(0x10ec0299, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
 		ALC225_STANDARD_PINS,
 		{0x12, 0xb7a60130},