ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7 14ARP8
PATCH v2 1/1 ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7 14ARP8
From fbcfdec1bc4789f5fb5436c80fb7c085bd060dc0 Mon Sep 17 00:00:00 2001
From: Gergely Meszaros <[email protected]>
Date: Sat, 15 Jun 2024 21:29:39 +0200
Subject: [PATCH v2] 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.
---
V1 -> V2: Use existing ALC285_FIXUP_SPEAKER2_TO_DAC1 instead of ALC287_FIXUP_YOGA_PRO_7_14ARP8_BOTH_SPK_TO_DAC2.
Include legion IAH7 in fixup and function name.
sound/pci/hda/patch_realtek.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)
sound/pci/hda/patch_realtek.c +21 -1
@@ -7520,6 +7520,7 @@ enum {ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1 ,ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318 ,ALC256_FIXUP_CHROME_BOOK , + ALC287_FIXUP_LENOVO_14ARP8_LEGION_IAH7, };/* 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,__snd_hda_apply_fixup (codec, id, action,0 ); } +/* Similar to above the Lenovo Yoga Pro 7 14ARP8 PCI SSID matches the codec SSID of the +Legion Y9000X 2022 IAH7.*/ +static void alc287_fixup_lenovo_14arp8_legion_iah7 (struct hda_codec *codec, +const struct hda_fixup *fix, +int action) +{ +int id; + +if (codec->core.subsystem_id ==0x17aa386e ) + id =ALC287_FIXUP_CS35L41_I2C_2 ;/* Legion Y9000X 2022 IAH7 */ +else + id =ALC285_FIXUP_SPEAKER2_TO_DAC1 ;/* Yoga Pro 7 14ARP8 */ +__snd_hda_apply_fixup (codec, id, action,0 ); +} +/* Another hilarious PCI SSID conflict with Lenovo Legion Pro 7 16ARX8H (with * TAS2781 codec) and Legion 7i 16IAX7 (with CS35L41 codec); * we apply a corresponding fixup depending on the codec SSID instead
@@ -9658,6 +9674,10 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK, }, + [ALC287_FIXUP_LENOVO_14ARP8_LEGION_IAH7] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc287_fixup_lenovo_14arp8_legion_iah7, + }, [ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN] = { .type = HDA_FIXUP_FUNC, .v.func = alc287_fixup_yoga9_14iap7_bass_spk_pin,
@@ -10520,7 +10540,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x17aa ,0x3865 ,"Lenovo 13X" ,ALC287_FIXUP_CS35L41_I2C_2 ),SND_PCI_QUIRK (0x17aa ,0x3866 ,"Lenovo 13X" ,ALC287_FIXUP_CS35L41_I2C_2 ),SND_PCI_QUIRK (0x17aa ,0x3869 ,"Lenovo Yoga7 14IAL7" ,ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN ), -SND_PCI_QUIRK (0x17aa ,0x386e ,"Legion Y9000X 2022 IAH7" ,ALC287_FIXUP_CS35L41_I2C_2 ), +SND_PCI_QUIRK (0x17aa ,0x386e ,"Legion Y9000X 2022 IAH7 / Yoga Pro 7 14ARP8" ,ALC287_FIXUP_LENOVO_14ARP8_LEGION_IAH7 ),SND_PCI_QUIRK (0x17aa ,0x386f ,"Legion Pro 7/7i" ,ALC287_FIXUP_LENOVO_LEGION_7 ),SND_PCI_QUIRK (0x17aa ,0x3870 ,"Lenovo Yoga 7 14ARB7" ,ALC287_FIXUP_YOGA7_14ARB7_I2C ), SND_PCI_QUIRK(0x17aa, 0x3877, "Lenovo Legion 7 Slim 16ARHA7", ALC287_FIXUP_CS35L41_I2C_2),
Signature · 1 line
2.45.2
Quoted 5 lines · Gergely Mészáros
From
fbcfdec1bc4789f5fb5436c80fb7c085bd060dc0Mon Sep 17 00:00:00 2001
From: Gergely Meszaros <[email protected]>
Date: Sat, 15 Jun 2024 21:29:39 +0200
Subject: [PATCH v2] ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7 14ARP8
Somehow this patch has been submitted in a wrong way, and it brought a line break at the wrong place in the patch. Usually those tags are in the mail tags themselves.
Could you try rather with git-send-email?
thanks,
Takashi
Quoted 69 lines
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]>---
V1 -> V2: Use existingALC285_FIXUP_SPEAKER2_TO_DAC1instead ofALC287_FIXUP_YOGA_PRO_7_14ARP8_BOTH_SPK_TO_DAC2.
Include legion IAH7 in fixup and function name.sound/pci/hda/patch_realtek.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)sound/pci/hda/patch_realtek.c +1
-0@@ -7520,6 +7520,7 @@ enum {ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1 ,ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318 ,ALC256_FIXUP_CHROME_BOOK , + ALC287_FIXUP_LENOVO_14ARP8_LEGION_IAH7, };/* 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,__snd_hda_apply_fixup (codec, id, action,0 ); } +/* Similar to above the Lenovo Yoga Pro 7 14ARP8 PCI SSID matchesthe codec SSID of the
sound/pci/hda/patch_realtek.c +19
-1+Legion Y9000X 2022 IAH7.*/ +static void alc287_fixup_lenovo_14arp8_legion_iah7 (struct hda_codec *codec, +const struct hda_fixup *fix, +int action) +{ +int id; + +if (codec->core.subsystem_id ==0x17aa386e ) + id =ALC287_FIXUP_CS35L41_I2C_2 ;/* Legion Y9000X 2022 IAH7 */ +else + id =ALC285_FIXUP_SPEAKER2_TO_DAC1 ;/* Yoga Pro 7 14ARP8 */ +__snd_hda_apply_fixup (codec, id, action,0 ); +} +/* Another hilarious PCI SSID conflict with Lenovo Legion Pro 7 16ARX8H (with * TAS2781 codec) and Legion 7i 16IAX7 (with CS35L41 codec); * we apply a corresponding fixup depending on the codec SSID instead @@ -9658,6 +9674,10 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK, }, + [ALC287_FIXUP_LENOVO_14ARP8_LEGION_IAH7] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc287_fixup_lenovo_14arp8_legion_iah7, + }, [ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN] = { .type = HDA_FIXUP_FUNC, .v.func = alc287_fixup_yoga9_14iap7_bass_spk_pin,@@ -10520,7 +10540,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x17aa ,0x3865 ,"Lenovo 13X" ,ALC287_FIXUP_CS35L41_I2C_2 ),SND_PCI_QUIRK (0x17aa ,0x3866 ,"Lenovo 13X" ,ALC287_FIXUP_CS35L41_I2C_2 ),SND_PCI_QUIRK (0x17aa ,0x3869 ,"Lenovo Yoga7 14IAL7" ,ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN ), -SND_PCI_QUIRK (0x17aa ,0x386e ,"Legion Y9000X 2022 IAH7" ,ALC287_FIXUP_CS35L41_I2C_2 ), +SND_PCI_QUIRK (0x17aa ,0x386e ,"Legion Y9000X 2022 IAH7 / Yoga Pro 7 14ARP8" ,ALC287_FIXUP_LENOVO_14ARP8_LEGION_IAH7 ),SND_PCI_QUIRK (0x17aa ,0x386f ,"Legion Pro 7/7i" ,ALC287_FIXUP_LENOVO_LEGION_7 ),SND_PCI_QUIRK (0x17aa ,0x3870 ,"Lenovo Yoga 7 14ARB7" ,ALC287_FIXUP_YOGA7_14ARB7_I2C ), SND_PCI_QUIRK(0x17aa, 0x3877, "Lenovo Legion 7 Slim 16ARHA7", ALC287_FIXUP_CS35L41_I2C_2),Signature · 1 line
2.45.2