Skip to content

Commit 1a49509

Browse files
Maetveistiwai
authored andcommitted
ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7 14ARP8
Similarly to other Lenovo laptops these also have a dual speaker setup with a shared amplifier. The model also seems to have a conflicting PCI SSID with the codec SSID for the Legion Y9000X 2022 IAH7. Only tested on the Yoga Pro 7, as I don't have access to the other laptop. Signed-off-by: Gergely Meszaros <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent b1fd0d1 commit 1a49509

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

sound/pci/hda/patch_realtek.c

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7520,6 +7520,7 @@ enum {
75207520
ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1,
75217521
ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318,
75227522
ALC256_FIXUP_CHROME_BOOK,
7523+
ALC287_FIXUP_LENOVO_14ARP8_LEGION_IAH7,
75237524
};
75247525

75257526
/* A special fixup for Lenovo C940 and Yoga Duet 7;
@@ -7559,6 +7560,21 @@ static void alc287_fixup_lenovo_14irp8_duetitl(struct hda_codec *codec,
75597560
__snd_hda_apply_fixup(codec, id, action, 0);
75607561
}
75617562

7563+
/* Similar to above the Lenovo Yoga Pro 7 14ARP8 PCI SSID matches the codec SSID of the
7564+
Legion Y9000X 2022 IAH7.*/
7565+
static void alc287_fixup_lenovo_14arp8_legion_iah7(struct hda_codec *codec,
7566+
const struct hda_fixup *fix,
7567+
int action)
7568+
{
7569+
int id;
7570+
7571+
if (codec->core.subsystem_id == 0x17aa386e)
7572+
id = ALC287_FIXUP_CS35L41_I2C_2; /* Legion Y9000X 2022 IAH7 */
7573+
else
7574+
id = ALC285_FIXUP_SPEAKER2_TO_DAC1; /* Yoga Pro 7 14ARP8 */
7575+
__snd_hda_apply_fixup(codec, id, action, 0);
7576+
}
7577+
75627578
/* Another hilarious PCI SSID conflict with Lenovo Legion Pro 7 16ARX8H (with
75637579
* TAS2781 codec) and Legion 7i 16IAX7 (with CS35L41 codec);
75647580
* we apply a corresponding fixup depending on the codec SSID instead
@@ -9658,6 +9674,10 @@ static const struct hda_fixup alc269_fixups[] = {
96589674
.chained = true,
96599675
.chain_id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK,
96609676
},
9677+
[ALC287_FIXUP_LENOVO_14ARP8_LEGION_IAH7] = {
9678+
.type = HDA_FIXUP_FUNC,
9679+
.v.func = alc287_fixup_lenovo_14arp8_legion_iah7,
9680+
},
96619681
[ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN] = {
96629682
.type = HDA_FIXUP_FUNC,
96639683
.v.func = alc287_fixup_yoga9_14iap7_bass_spk_pin,
@@ -10520,7 +10540,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
1052010540
SND_PCI_QUIRK(0x17aa, 0x3865, "Lenovo 13X", ALC287_FIXUP_CS35L41_I2C_2),
1052110541
SND_PCI_QUIRK(0x17aa, 0x3866, "Lenovo 13X", ALC287_FIXUP_CS35L41_I2C_2),
1052210542
SND_PCI_QUIRK(0x17aa, 0x3869, "Lenovo Yoga7 14IAL7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
10523-
SND_PCI_QUIRK(0x17aa, 0x386e, "Legion Y9000X 2022 IAH7", ALC287_FIXUP_CS35L41_I2C_2),
10543+
SND_PCI_QUIRK(0x17aa, 0x386e, "Legion Y9000X 2022 IAH7 / Yoga Pro 7 14ARP8", ALC287_FIXUP_LENOVO_14ARP8_LEGION_IAH7),
1052410544
SND_PCI_QUIRK(0x17aa, 0x386f, "Legion Pro 7/7i", ALC287_FIXUP_LENOVO_LEGION_7),
1052510545
SND_PCI_QUIRK(0x17aa, 0x3870, "Lenovo Yoga 7 14ARB7", ALC287_FIXUP_YOGA7_14ARB7_I2C),
1052610546
SND_PCI_QUIRK(0x17aa, 0x3877, "Lenovo Legion 7 Slim 16ARHA7", ALC287_FIXUP_CS35L41_I2C_2),

0 commit comments

Comments
 (0)