Skip to content

Commit a4904b3

Browse files
wangwillian0gregkh
authored andcommitted
ALSA: hda/realtek: Add special fixup for Lenovo 14IRP8
commit 0ac32a3 upstream. 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/[email protected] Cc: [email protected] Signed-off-by: Willian Wang <[email protected]> Reviewed-by: Gergo Koteles <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 5cdf76f commit a4904b3

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

sound/pci/hda/patch_realtek.c

+26-1
Original file line numberDiff line numberDiff line change
@@ -7352,6 +7352,7 @@ enum {
73527352
ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE,
73537353
ALC287_FIXUP_YOGA7_14ITL_SPEAKERS,
73547354
ALC298_FIXUP_LENOVO_C940_DUET7,
7355+
ALC287_FIXUP_LENOVO_14IRP8_DUETITL,
73557356
ALC287_FIXUP_13S_GEN2_SPEAKERS,
73567357
ALC256_FIXUP_SET_COEF_DEFAULTS,
73577358
ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
@@ -7401,6 +7402,26 @@ static void alc298_fixup_lenovo_c940_duet7(struct hda_codec *codec,
74017402
__snd_hda_apply_fixup(codec, id, action, 0);
74027403
}
74037404

7405+
/* A special fixup for Lenovo Slim/Yoga Pro 9 14IRP8 and Yoga DuetITL 2021;
7406+
* 14IRP8 PCI SSID will mistakenly be matched with the DuetITL codec SSID,
7407+
* so we need to apply a different fixup in this case. The only DuetITL codec
7408+
* SSID reported so far is the 17aa:3802 while the 14IRP8 has the 17aa:38be
7409+
* and 17aa:38bf. If it weren't for the PCI SSID, the 14IRP8 models would
7410+
* have matched correctly by their codecs.
7411+
*/
7412+
static void alc287_fixup_lenovo_14irp8_duetitl(struct hda_codec *codec,
7413+
const struct hda_fixup *fix,
7414+
int action)
7415+
{
7416+
int id;
7417+
7418+
if (codec->core.subsystem_id == 0x17aa3802)
7419+
id = ALC287_FIXUP_YOGA7_14ITL_SPEAKERS; /* DuetITL */
7420+
else
7421+
id = ALC287_FIXUP_TAS2781_I2C; /* 14IRP8 */
7422+
__snd_hda_apply_fixup(codec, id, action, 0);
7423+
}
7424+
74047425
static const struct hda_fixup alc269_fixups[] = {
74057426
[ALC269_FIXUP_GPIO2] = {
74067427
.type = HDA_FIXUP_FUNC,
@@ -9285,6 +9306,10 @@ static const struct hda_fixup alc269_fixups[] = {
92859306
.type = HDA_FIXUP_FUNC,
92869307
.v.func = alc298_fixup_lenovo_c940_duet7,
92879308
},
9309+
[ALC287_FIXUP_LENOVO_14IRP8_DUETITL] = {
9310+
.type = HDA_FIXUP_FUNC,
9311+
.v.func = alc287_fixup_lenovo_14irp8_duetitl,
9312+
},
92889313
[ALC287_FIXUP_13S_GEN2_SPEAKERS] = {
92899314
.type = HDA_FIXUP_VERBS,
92909315
.v.verbs = (const struct hda_verb[]) {
@@ -10134,7 +10159,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
1013410159
SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340),
1013510160
SND_PCI_QUIRK(0x17aa, 0x334b, "Lenovo ThinkCentre M70 Gen5", ALC283_FIXUP_HEADSET_MIC),
1013610161
SND_PCI_QUIRK(0x17aa, 0x3801, "Lenovo Yoga9 14IAP7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
10137-
SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga DuetITL 2021", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
10162+
SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga Pro 9 14IRP8 / DuetITL 2021", ALC287_FIXUP_LENOVO_14IRP8_DUETITL),
1013810163
SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
1013910164
SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7),
1014010165
SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS),

0 commit comments

Comments
 (0)