Skip to content

Commit 0ac32a3

Browse files
wangwillian0tiwai
authored andcommitted
ALSA: hda/realtek: Add special fixup for Lenovo 14IRP8
Lenovo Slim/Yoga Pro 9 14IRP8 requires a special fixup because there is a collision of its PCI SSID (17aa:3802) with Lenovo Yoga DuetITL 2021 codec SSID. Fixes: 3babae9 ("ALSA: hda/tas2781: Add tas2781 HDA driver") Link: https://bugzilla.kernel.org/show_bug.cgi?id=208555 Link: https://lore.kernel.org/all/d5b42e483566a3815d229270abd668131a0d9f3a.camel@irl.hu Cc: stable@vger.kernel.org Signed-off-by: Willian Wang <git@willian.wang> Reviewed-by: Gergo Koteles <soyer@irl.hu> Link: https://lore.kernel.org/r/170879111795.8.6687687359006700715.273812184@willian.wang Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent c1947ce commit 0ac32a3

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

sound/pci/hda/patch_realtek.c

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7444,6 +7444,7 @@ enum {
74447444
ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE,
74457445
ALC287_FIXUP_YOGA7_14ITL_SPEAKERS,
74467446
ALC298_FIXUP_LENOVO_C940_DUET7,
7447+
ALC287_FIXUP_LENOVO_14IRP8_DUETITL,
74477448
ALC287_FIXUP_13S_GEN2_SPEAKERS,
74487449
ALC256_FIXUP_SET_COEF_DEFAULTS,
74497450
ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
@@ -7495,6 +7496,26 @@ static void alc298_fixup_lenovo_c940_duet7(struct hda_codec *codec,
74957496
__snd_hda_apply_fixup(codec, id, action, 0);
74967497
}
74977498

7499+
/* A special fixup for Lenovo Slim/Yoga Pro 9 14IRP8 and Yoga DuetITL 2021;
7500+
* 14IRP8 PCI SSID will mistakenly be matched with the DuetITL codec SSID,
7501+
* so we need to apply a different fixup in this case. The only DuetITL codec
7502+
* SSID reported so far is the 17aa:3802 while the 14IRP8 has the 17aa:38be
7503+
* and 17aa:38bf. If it weren't for the PCI SSID, the 14IRP8 models would
7504+
* have matched correctly by their codecs.
7505+
*/
7506+
static void alc287_fixup_lenovo_14irp8_duetitl(struct hda_codec *codec,
7507+
const struct hda_fixup *fix,
7508+
int action)
7509+
{
7510+
int id;
7511+
7512+
if (codec->core.subsystem_id == 0x17aa3802)
7513+
id = ALC287_FIXUP_YOGA7_14ITL_SPEAKERS; /* DuetITL */
7514+
else
7515+
id = ALC287_FIXUP_TAS2781_I2C; /* 14IRP8 */
7516+
__snd_hda_apply_fixup(codec, id, action, 0);
7517+
}
7518+
74987519
static const struct hda_fixup alc269_fixups[] = {
74997520
[ALC269_FIXUP_GPIO2] = {
75007521
.type = HDA_FIXUP_FUNC,
@@ -9379,6 +9400,10 @@ static const struct hda_fixup alc269_fixups[] = {
93799400
.type = HDA_FIXUP_FUNC,
93809401
.v.func = alc298_fixup_lenovo_c940_duet7,
93819402
},
9403+
[ALC287_FIXUP_LENOVO_14IRP8_DUETITL] = {
9404+
.type = HDA_FIXUP_FUNC,
9405+
.v.func = alc287_fixup_lenovo_14irp8_duetitl,
9406+
},
93829407
[ALC287_FIXUP_13S_GEN2_SPEAKERS] = {
93839408
.type = HDA_FIXUP_VERBS,
93849409
.v.verbs = (const struct hda_verb[]) {
@@ -10251,7 +10276,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
1025110276
SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340),
1025210277
SND_PCI_QUIRK(0x17aa, 0x334b, "Lenovo ThinkCentre M70 Gen5", ALC283_FIXUP_HEADSET_MIC),
1025310278
SND_PCI_QUIRK(0x17aa, 0x3801, "Lenovo Yoga9 14IAP7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
10254-
SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga DuetITL 2021", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
10279+
SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga Pro 9 14IRP8 / DuetITL 2021", ALC287_FIXUP_LENOVO_14IRP8_DUETITL),
1025510280
SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
1025610281
SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7),
1025710282
SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS),

0 commit comments

Comments
 (0)