Skip to contentSkip to conversation

ALSA: hda/realtek: Match Yoga Pro 9 16IAH10 quirk by codec SSID

PATCH Superseded Matt Barr 3 participants 4 messages Sep 21 – Sep 28 Sound

lore
Share & tools
lore

Matt Barr

author
#0 lore raw

PATCH 1/1 ALSA: hda/realtek: Match Yoga Pro 9 16IAH10 quirk by codec SSID

The PCI SSID quirk added for the Lenovo Yoga Pro 9 16IAH10 (PCI SSID 17aa:3846, codec SSID 17aa:3920) also matches every other machine that shares PCI SSID 17aa:3846. snd_hda_pick_fixup() tries all PCI SSID entries before it falls back to the codec SSID, so those machines now get ALC287_FIXUP_YOGA9_SPEAKER2_TO_DAC1 and never reach their own codec-SSID quirk.

The Lenovo Legion Pro 7 16IRX8H (product 82WQ) is one such machine: PCI SSID 17aa:3846, codec SSID 17aa:3884. Before this quirk it picked ALC287_FIXUP_TAS2781_I2C via the 17aa:3884 codec SSID fallback and bound its TAS2781 amplifier. With it, the codec never binds the amplifier and the internal speakers are silent:

snd_hda_codec_alc269 hdaudioC0D0: ALC287: picked fixup for PCI SSID 17aa:3846

versus, on a kernel without the quirk:

snd_hda_codec_alc269 hdaudioC0D0: ALC287: picked fixup for codec SSID 17aa:3884 snd_hda_codec_alc269 hdaudioC0D0: bound i2c-TIAS2781:00 (ops tas2781_hda_comp_ops ...)

Match the Yoga Pro 9 16IAH10 by its codec SSID instead, as was done for the Yoga Pro 7 14IMH9 / Legion 7 16ACHG6 and Yoga Slim 7 14AKP10 / Legion Slim 7 16IRH8 collisions. The Yoga Pro 9 16IAH10 still matches, through codec SSID 17aa:3920. That codec SSID is also used by the Yoga S990-16 entry further down, which will now get the same DAC routing fix. That looks like the same product, but I could not verify it.

Fixes 41d60cbfde10 ("ALSA: hda/realtek: Fix bass speaker DAC routing for Lenovo Yoga Pro 9 16IAH10")

---

sound/hda/codecs/realtek/alc269.c +4 -1
@@ -8164,7 +8164,10 @@
 	SND_PCI_QUIRK(0x17aa, 0x3834, "Lenovo IdeaPad Slim 9i 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
 	SND_PCI_QUIRK(0x17aa, 0x383d, "Legion Y9000X 2019", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS),
 	SND_PCI_QUIRK(0x17aa, 0x3843, "Lenovo Yoga 9i / Yoga Book 9i", ALC287_FIXUP_LENOVO_YOGA_BOOK_9I),
-	SND_PCI_QUIRK(0x17aa, 0x3846, "Lenovo Yoga Pro 9 16IAH10", ALC287_FIXUP_YOGA9_SPEAKER2_TO_DAC1),
+	/* Legion Pro 7 16IRX8H shares PCI SSID 17aa:3846 with Yoga Pro 9 16IAH10;
+	 * use codec SSID to distinguish them
+	 */
+	HDA_CODEC_QUIRK(0x17aa, 0x3920, "Lenovo Yoga Pro 9 16IAH10", ALC287_FIXUP_YOGA9_SPEAKER2_TO_DAC1),
 	/* Yoga Pro 7 14IMH9 shares PCI SSID 17aa:3847 with Legion 7 16ACHG6;
 	 * use codec SSID to distinguish them
 	 */
#1 lore raw

Thanks for the patch.
I agree this needs to be fixed, since it affects other sound cards.

I think it might be cleaner to reuse the existing quirk and drop the separate entry, something like this:

sound/hda/codecs/realtek/alc269.c +0 -0
@@ -8214,7 +8214,6 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
        SND_PCI_QUIRK(0x17aa, 0x3834, "Lenovo IdeaPad Slim 9i 14ITL5", 

ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),

        SND_PCI_QUIRK(0x17aa, 0x383d, "Legion Y9000X 2019", 
ALC285_FIXUP_LEGION_Y9000X_SPEAKERS),
        SND_PCI_QUIRK(0x17aa, 0x3843, "Lenovo Yoga 9i / Yoga Book 9i", 
ALC287_FIXUP_LENOVO_YOGA_BOOK_9I),
-       SND_PCI_QUIRK(0x17aa, 0x3846, "Lenovo Yoga Pro 9 16IAH10", ALC287_FIXUP_YOGA9_SPEAKER2_TO_DAC1),
        /* Yoga Pro 7 14IMH9 shares PCI SSID 17aa:3847 with Legion 7 
16ACHG6;
         * use codec SSID to distinguish them
         */
@@ -8308,7 +8307,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
        SND_PCI_QUIRK(0x17aa, 0x3912, "Lenovo Xiaoxin 14 GT", 
ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
        SND_PCI_QUIRK(0x17aa, 0x3913, "Lenovo 145", 
ALC236_FIXUP_LENOVO_INV_DMIC),
        SND_PCI_QUIRK(0x17aa, 0x391f, "Yoga S990-16 pro Quad YC Quad", 
ALC287_FIXUP_TXNW2781_I2C),
-       SND_PCI_QUIRK(0x17aa, 0x3920, "Yoga S990-16 pro Quad VECO Quad", ALC287_FIXUP_TXNW2781_I2C),
+       SND_PCI_QUIRK(0x17aa, 0x3920, "Yoga S990-16 pro Quad VECO Quad", ALC287_FIXUP_YOGA9_SPEAKER2_TO_DAC1),
        SND_PCI_QUIRK(0x17aa, 0x3929, "Thinkbook 13x Gen 5", 
ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
        SND_PCI_QUIRK(0x17aa, 0x392b, "Thinkbook 13x Gen 5", 
ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
        HDA_CODEC_QUIRK(0x17aa, 0x3936, "Legion R9000P ADR10H", 

ALC287_FIXUP_LENOVO_LEGION_AW88399),

Since both entries use the same external amplifier, reusing the existing quirk seems more consistent.

Does that look reasonable to you?

author
#2 lore raw

PATCH v2 1/1 ALSA: hda/realtek: Drop Yoga Pro 9 16IAH10 PCI SSID quirk

In reply to Matt Barr

The PCI SSID quirk added for the Lenovo Yoga Pro 9 16IAH10 (PCI SSID 17aa:3846, codec SSID 17aa:3920) also matches every other machine that shares PCI SSID 17aa:3846. snd_hda_pick_fixup() tries all PCI SSID entries before it falls back to the codec SSID, so those machines now get ALC287_FIXUP_YOGA9_SPEAKER2_TO_DAC1 and never reach their own codec-SSID quirk.

The Lenovo Legion Pro 7 16IRX8H (product 82WQ) is one such machine: PCI SSID 17aa:3846, codec SSID 17aa:3884. Before this quirk it picked ALC287_FIXUP_TAS2781_I2C via the 17aa:3884 codec SSID fallback and bound its TAS2781 amplifier. With it, the codec never binds the amplifier and the internal speakers are silent:

snd_hda_codec_alc269 hdaudioC0D0: ALC287: picked fixup for PCI SSID 17aa:3846

versus, on a kernel without the quirk:

snd_hda_codec_alc269 hdaudioC0D0: ALC287: picked fixup for codec SSID 17aa:3884 snd_hda_codec_alc269 hdaudioC0D0: bound i2c-TIAS2781:00 (ops tas2781_hda_comp_ops ...)

Drop the PCI SSID entry. The Yoga Pro 9 16IAH10 has the same amplifier as the Yoga S990-16 (codec SSID 17aa:3920), so it still gets a fixup through the codec SSID fallback, using the existing 17aa:3920 entry. Switch that entry from ALC287_FIXUP_TXNW2781_I2C to ALC287_FIXUP_YOGA9_SPEAKER2_TO_DAC1, which applies the DAC routing fix and then chains to ALC287_FIXUP_TXNW2781_I2C, so the amplifier setup is unchanged.

Fixes 41d60cbfde10 ("ALSA: hda/realtek: Fix bass speaker DAC routing for Lenovo Yoga Pro 9 16IAH10")

---
Hi Zhang,

Thank you for the quick review. Your suggestion is cleaner than my version, so this v2 uses it. I checked that the 17aa:3920 entry keeps its amplifier setup, since the new fixup chains into ALC287_FIXUP_TXNW2781_I2C.

v2: Reuse the existing 17aa:3920 entry instead of adding a codec SSID
entry, as suggested by Zhang Heng. Built against 7.2.5 and tested on a Legion Pro 7 16IRX8H without the model= workaround: the codec picks the 17aa:3884 quirk again, binds i2c-TIAS2781:00, and the speakers work. Not tested on a Yoga Pro 9 16IAH10 (no hardware).

sound/hda/codecs/realtek/alc269.c +1 -2
@@ -8164,7 +8164,6 @@
 	SND_PCI_QUIRK(0x17aa, 0x3834, "Lenovo IdeaPad Slim 9i 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
 	SND_PCI_QUIRK(0x17aa, 0x383d, "Legion Y9000X 2019", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS),
 	SND_PCI_QUIRK(0x17aa, 0x3843, "Lenovo Yoga 9i / Yoga Book 9i", ALC287_FIXUP_LENOVO_YOGA_BOOK_9I),
-	SND_PCI_QUIRK(0x17aa, 0x3846, "Lenovo Yoga Pro 9 16IAH10", ALC287_FIXUP_YOGA9_SPEAKER2_TO_DAC1),
 	/* Yoga Pro 7 14IMH9 shares PCI SSID 17aa:3847 with Legion 7 16ACHG6;
 	 * use codec SSID to distinguish them
 	 */
@@ -8258,7 +8257,7 @@
 	SND_PCI_QUIRK(0x17aa, 0x3912, "Lenovo Xiaoxin 14 GT", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
 	SND_PCI_QUIRK(0x17aa, 0x3913, "Lenovo 145", ALC236_FIXUP_LENOVO_INV_DMIC),
 	SND_PCI_QUIRK(0x17aa, 0x391f, "Yoga S990-16 pro Quad YC Quad", ALC287_FIXUP_TXNW2781_I2C),
-	SND_PCI_QUIRK(0x17aa, 0x3920, "Yoga S990-16 pro Quad VECO Quad", ALC287_FIXUP_TXNW2781_I2C),
+	SND_PCI_QUIRK(0x17aa, 0x3920, "Yoga S990-16 pro Quad VECO Quad", ALC287_FIXUP_YOGA9_SPEAKER2_TO_DAC1),
 	SND_PCI_QUIRK(0x17aa, 0x3929, "Thinkbook 13x Gen 5", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
 	SND_PCI_QUIRK(0x17aa, 0x392b, "Thinkbook 13x Gen 5", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
 	HDA_CODEC_QUIRK(0x17aa, 0x3936, "Legion R9000P ADR10H", ALC287_FIXUP_LENOVO_LEGION_AW88399),
#3 lore raw

Re: [PATCH v2] ALSA: hda/realtek: Drop Yoga Pro 9 16IAH10 PCI SSID quirk

Quoted 39 lines · Matt Barr

The PCI SSID quirk added for the Lenovo Yoga Pro 9 16IAH10 (PCI SSID 17aa:3846, codec SSID 17aa:3920) also matches every other machine that shares PCI SSID 17aa:3846. snd_hda_pick_fixup() tries all PCI SSID entries before it falls back to the codec SSID, so those machines now get ALC287_FIXUP_YOGA9_SPEAKER2_TO_DAC1 and never reach their own codec-SSID quirk.

The Lenovo Legion Pro 7 16IRX8H (product 82WQ) is one such machine: PCI SSID 17aa:3846, codec SSID 17aa:3884. Before this quirk it picked ALC287_FIXUP_TAS2781_I2C via the 17aa:3884 codec SSID fallback and bound its TAS2781 amplifier. With it, the codec never binds the amplifier and the internal speakers are silent:

snd_hda_codec_alc269 hdaudioC0D0: ALC287: picked fixup for PCI SSID 17aa:3846

versus, on a kernel without the quirk:

snd_hda_codec_alc269 hdaudioC0D0: ALC287: picked fixup for codec SSID 17aa:3884 snd_hda_codec_alc269 hdaudioC0D0: bound i2c-TIAS2781:00 (ops tas2781_hda_comp_ops ...)

Drop the PCI SSID entry. The Yoga Pro 9 16IAH10 has the same amplifier as the Yoga S990-16 (codec SSID 17aa:3920), so it still gets a fixup through the codec SSID fallback, using the existing 17aa:3920 entry. Switch that entry from ALC287_FIXUP_TXNW2781_I2C to ALC287_FIXUP_YOGA9_SPEAKER2_TO_DAC1, which applies the DAC routing fix and then chains to ALC287_FIXUP_TXNW2781_I2C, so the amplifier setup is unchanged.

Fixes 41d60cbfde10 ("ALSA: hda/realtek: Fix bass speaker DAC routing for Lenovo Yoga Pro 9 16IAH10")

---
Hi Zhang,

Thank you for the quick review. Your suggestion is cleaner than my version, so this v2 uses it. I checked that the 17aa:3920 entry keeps its amplifier setup, since the new fixup chains into ALC287_FIXUP_TXNW2781_I2C.

Quoted 5 lines

v2: Reuse the existing 17aa:3920 entry instead of adding a codec SSID
entry, as suggested by Zhang Heng. Built against 7.2.5 and tested on a Legion Pro 7 16IRX8H without the model= workaround: the codec picks the 17aa:3884 quirk again, binds i2c-TIAS2781:00, and the speakers work. Not tested on a Yoga Pro 9 16IAH10 (no hardware).

Applied now. Thanks.

Takashi