| From 83ada02c2668bdf27aa07535179ce492478eb199 Mon Sep 17 00:00:00 2001 |
| From: Kailang Yang <kailang@realtek.com> |
| Date: Mon, 10 Feb 2020 16:30:26 +0800 |
| Subject: [PATCH] ALSA: hda/realtek - Add Headset Button supported for ThinkPad |
| X1 |
| |
| commit 76f7dec08fd64e9e3ad0810a1a8a60b0a846d348 upstream. |
| |
| ThinkPad want to support Headset Button control. |
| This patch will enable it. |
| |
| Signed-off-by: Kailang Yang <kailang@realtek.com> |
| Cc: <stable@vger.kernel.org> |
| Link: https://lore.kernel.org/r/7f0b7128f40f41f6b5582ff610adc33d@realtek.com |
| Signed-off-by: Takashi Iwai <tiwai@suse.de> |
| Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
| |
| diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c |
| index 6aee2f36a58c..55ca62881ecb 100644 |
| --- a/sound/pci/hda/patch_realtek.c |
| +++ b/sound/pci/hda/patch_realtek.c |
| @@ -5908,7 +5908,7 @@ enum { |
| ALC289_FIXUP_DUAL_SPK, |
| ALC294_FIXUP_SPK2_TO_DAC1, |
| ALC294_FIXUP_ASUS_DUAL_SPK, |
| - |
| + ALC285_FIXUP_THINKPAD_HEADSET_JACK, |
| }; |
| |
| static const struct hda_fixup alc269_fixups[] = { |
| @@ -7008,7 +7008,12 @@ static const struct hda_fixup alc269_fixups[] = { |
| .chained = true, |
| .chain_id = ALC294_FIXUP_SPK2_TO_DAC1 |
| }, |
| - |
| + [ALC285_FIXUP_THINKPAD_HEADSET_JACK] = { |
| + .type = HDA_FIXUP_FUNC, |
| + .v.func = alc_fixup_headset_jack, |
| + .chained = true, |
| + .chain_id = ALC285_FIXUP_SPEAKER2_TO_DAC1 |
| + }, |
| }; |
| |
| static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
| @@ -7244,8 +7249,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
| SND_PCI_QUIRK(0x17aa, 0x224c, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), |
| SND_PCI_QUIRK(0x17aa, 0x224d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), |
| SND_PCI_QUIRK(0x17aa, 0x225d, "Thinkpad T480", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
| - SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Yoga 7th", ALC285_FIXUP_SPEAKER2_TO_DAC1), |
| - SND_PCI_QUIRK(0x17aa, 0x2293, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_SPEAKER2_TO_DAC1), |
| + SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Yoga 7th", ALC285_FIXUP_THINKPAD_HEADSET_JACK), |
| + SND_PCI_QUIRK(0x17aa, 0x2293, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_THINKPAD_HEADSET_JACK), |
| SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), |
| SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), |
| SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), |
| -- |
| 2.7.4 |
| |