ALSA: hda/realtek: Add bass speaker quirk for Lenovo Yoga Pro 7 14IRH8
PATCH 1/1 ALSA: hda/realtek: Add bass speaker quirk for Lenovo Yoga Pro 7 14IRH8
The Lenovo Yoga Pro 7 14IRH8 suffers from missing bass speaker output and broken volume scaling (5% volume plays as loud as 100%). The system shares the PCI SSID 0x17aa:0x3852 with the older Lenovo Yoga 7 14ITL5, causing the ALSA driver to mistakenly match on the PCI subsystem ID and apply ALC287_FIXUP_YOGA7_14ITL_SPEAKERS. That quirk only powers on the amplifier without routing the 4-speaker DAC pins.
Add a fixup helper that disambiguates models by checking the HDA codec subsystem ID (codec->core.subsystem_id). When the Yoga Pro 7 14IRH8's codec SSID (0x17aa:0x38b1) is detected, apply ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN, which properly configures pin 0x17 as a speaker output and hooks it to the DAC volume controls. Fall back to ALC287_FIXUP_YOGA7_14ITL_SPEAKERS for older hardware sharing 0x3852.
--- sound/hda/codecs/realtek/alc269.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-)
sound/hda/codecs/realtek/alc269.c +26 -1
@@ -4077,6 +4077,7 @@ enum {ALC298_FIXUP_LENOVO_C940_DUET7 ,ALC287_FIXUP_LENOVO_YOGA_BOOK_9I ,ALC287_FIXUP_LENOVO_YOGA_PRO7 , +ALC287_FIXUP_YOGA7_14ITL_PRO7 ,ALC287_FIXUP_13S_GEN2_SPEAKERS ,ALC256_FIXUP_SET_COEF_DEFAULTS , ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE,
@@ -4192,6 +4193,25 @@ static void alc287_fixup_lenovo_yoga_book_9i(struct hda_codec *codec,__snd_hda_apply_fixup (codec, id, action,0 ); } +/* A special fixup for Lenovo Yoga Pro 7 14IRH8 and Yoga 7 14ITL5 +* both have the very same PCI SSID and vendor ID, so we need to +* apply different fixups depending on the subsystem ID +*/ +static void alc287_fixup_lenovo_yoga7_pro7 (struct hda_codec *codec, +const struct hda_fixup *fix, +int action) +{ +int id; + +if (codec->core.subsystem_id ==0x17aa38b1 ) + id =ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN ; +else + id =ALC287_FIXUP_YOGA7_14ITL_SPEAKERS ; + +__snd_hda_apply_fixup (codec, id, action,0 ); +} + +static const struct hda_fixup alc269_fixups[] = { [ALC269_FIXUP_GPIO2 ] = { .type =HDA_FIXUP_FUNC ,
@@ -6439,6 +6459,10 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id = ALC287_FIXUP_CS35L41_I2C_2, }, + [ALC287_FIXUP_YOGA7_14ITL_PRO7] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc287_fixup_lenovo_yoga7_pro7, + }, [ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS] = { .type = HDA_FIXUP_FUNC, .v.func = alc295_fixup_dell_inspiron_top_speakers,
@@ -7722,7 +7746,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {HDA_CODEC_QUIRK (0x17aa ,0x38cf ,"Lenovo Yoga Pro 7 14IMH9" ,ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN ),SND_PCI_QUIRK (0x17aa ,0x3847 ,"Legion 7 16ACHG6" ,ALC287_FIXUP_LEGION_16ACHG6 ),SND_PCI_QUIRK (0x17aa ,0x384a ,"Lenovo Yoga 7 15ITL5" ,ALC287_FIXUP_YOGA7_14ITL_SPEAKERS ), -SND_PCI_QUIRK (0x17aa ,0x3852 ,"Lenovo Yoga 7 14ITL5" ,ALC287_FIXUP_YOGA7_14ITL_SPEAKERS ), +SND_PCI_QUIRK (0x17aa ,0x3852 ,"Lenovo Yoga 7 14ITL5 / Pro 7 14IRH8" ,ALC287_FIXUP_YOGA7_14ITL_PRO7 ),SND_PCI_QUIRK (0x17aa ,0x3853 ,"Lenovo Yoga 7 15ITL5" ,ALC287_FIXUP_YOGA7_14ITL_SPEAKERS ),SND_PCI_QUIRK (0x17aa ,0x3855 ,"Legion 7 16ITHG6" ,ALC287_FIXUP_LEGION_16ITHG6 ), SND_PCI_QUIRK(0x17aa, 0x3865, "Lenovo 13X", ALC287_FIXUP_CS35L41_I2C_2),
@@ -7750,6 +7774,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x17aa ,0x38a8 ,"Y780P AMD VECO dual" ,ALC287_FIXUP_TAS2781_I2C ),SND_PCI_QUIRK (0x17aa ,0x38a9 ,"Thinkbook 16P" ,ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD ),SND_PCI_QUIRK (0x17aa ,0x38ab ,"Thinkbook 16P" ,ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD ), +SND_PCI_QUIRK (0x17aa ,0x38b1 ,"Lenovo Yoga Pro 7 14IRH8" ,ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN ),SND_PCI_QUIRK (0x17aa ,0x38b4 ,"Legion Slim 7 16IRH8" ,ALC287_FIXUP_CS35L41_I2C_2 ),HDA_CODEC_QUIRK (0x17aa ,0x391c ,"Lenovo Yoga 7 2-in-1 14AKP10" ,ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN ), HDA_CODEC_QUIRK(0x17aa, 0x391d, "Lenovo Yoga 7 2-in-1 16AKP10", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
Signature · 1 line
2.43.0
Quoted 8 lines · Cristian Verde
The Lenovo Yoga Pro 7 14IRH8 suffers from missing bass speaker output and broken volume scaling (5% volume plays as loud as 100%). The system shares the PCI SSID 0x17aa:0x3852 with the older Lenovo Yoga 7 14ITL5, causing the ALSA driver to mistakenly match on the PCI subsystem ID and apply
ALC287_FIXUP_YOGA7_14ITL_SPEAKERS. That quirk only powers on the amplifier without routing the 4-speaker DAC pins.
Quoted 8 lines
Add a fixup helper that disambiguates models by checking the HDA codec subsystem ID (
codec->core.subsystem_id). When the Yoga Pro 7 14IRH8's codec SSID (0x17aa:0x38b1) is detected, applyALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN, which properly configures pin0x17as a speaker output and hooks it to the DAC volume controls. Fall back toALC287_FIXUP_YOGA7_14ITL_SPEAKERSfor older hardware sharing0x3852.Signed-off-by Cristian Verde <[email protected]>
This doesn't apply cleanly on the latest code.
Please rebase to sound.git tree for-linus branch (or at least 7.3-rc2) and resubmit.
thanks,
Takashi