Skip to content

Commit d371085

Browse files
committed
ALSA: hda/realtek: Fix conflicting quirk for PCI SSID 17aa:3820
The recent fix for Lenovo IdeaPad 330-17IKB replaced the quirk entry, and this eventually breaks the existing quirk for Lenovo Yoga Duet 7 13ITL6 equipped with the same PCI SSID 17aa:3820. For applying a proper quirk for each model, check the codec SSID additionally. Fortunately Yoga Duet has a different codec SSID, 0x17aa3802. (Interestingly, 17aa:3802 has another conflict of SSID between another Yoga model vs 14IRP8 which we had to work around similarly.) Fixes: b1fd0d1 ("ALSA: hda/realtek: Enable headset mic on IdeaPad 330-17IKB 81DM") Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 6a7db25 commit d371085

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

sound/pci/hda/patch_realtek.c

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7525,6 +7525,7 @@ enum {
75257525
ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318,
75267526
ALC256_FIXUP_CHROME_BOOK,
75277527
ALC287_FIXUP_LENOVO_14ARP8_LEGION_IAH7,
7528+
ALC287_FIXUP_LENOVO_SSID_17AA3820,
75287529
};
75297530

75307531
/* A special fixup for Lenovo C940 and Yoga Duet 7;
@@ -7596,6 +7597,20 @@ static void alc287_fixup_lenovo_legion_7(struct hda_codec *codec,
75967597
__snd_hda_apply_fixup(codec, id, action, 0);
75977598
}
75987599

7600+
/* Yet more conflicting PCI SSID (17aa:3820) on two Lenovo models */
7601+
static void alc287_fixup_lenovo_ssid_17aa3820(struct hda_codec *codec,
7602+
const struct hda_fixup *fix,
7603+
int action)
7604+
{
7605+
int id;
7606+
7607+
if (codec->core.subsystem_id == 0x17aa3820)
7608+
id = ALC269_FIXUP_ASPIRE_HEADSET_MIC; /* IdeaPad 330-17IKB 81DM */
7609+
else /* 0x17aa3802 */
7610+
id = ALC287_FIXUP_YOGA7_14ITL_SPEAKERS; /* "Yoga Duet 7 13ITL6 */
7611+
__snd_hda_apply_fixup(codec, id, action, 0);
7612+
}
7613+
75997614
static const struct hda_fixup alc269_fixups[] = {
76007615
[ALC269_FIXUP_GPIO2] = {
76017616
.type = HDA_FIXUP_FUNC,
@@ -9832,6 +9847,10 @@ static const struct hda_fixup alc269_fixups[] = {
98329847
.chained = true,
98339848
.chain_id = ALC225_FIXUP_HEADSET_JACK
98349849
},
9850+
[ALC287_FIXUP_LENOVO_SSID_17AA3820] = {
9851+
.type = HDA_FIXUP_FUNC,
9852+
.v.func = alc287_fixup_lenovo_ssid_17aa3820,
9853+
},
98359854
};
98369855

98379856
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -10531,7 +10550,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
1053110550
SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
1053210551
SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7),
1053310552
SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS),
10534-
SND_PCI_QUIRK(0x17aa, 0x3820, "IdeaPad 330-17IKB 81DM", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
10553+
SND_PCI_QUIRK(0x17aa, 0x3820, "IdeaPad 330 / Yoga Duet 7", ALC287_FIXUP_LENOVO_SSID_17AA3820),
1053510554
SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS),
1053610555
SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF),
1053710556
SND_PCI_QUIRK(0x17aa, 0x3834, "Lenovo IdeaPad Slim 9i 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),

0 commit comments

Comments
 (0)