* [PATCH] ALSA: hda/realtek: Add quirk for HP Spectre x360 2-in-1 Laptop 16-f2xxx
@ 2026-11-22 22:02 Abhiraj Dutta via B4 Relay
2026-11-22 22:12 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Abhiraj Dutta via B4 Relay @ 2026-11-22 22:02 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai
Cc: linux-sound, linux-kernel, stable, Abhiraj Dutta
From: Abhiraj Dutta <abhirajdutta7@gmail.com>
The HP Spectre x360 16-f2xxx (SSID 103c:891e) has the same speaker
problem as the 14-eu0xxx and 16-aa0xxx: the BIOS marks the treble
speaker pin 0x14 as unconnected, so only the bass speakers on 0x17
play. The mute and mic-mute LEDs don't work either.
Use the existing EU0XXX pin fixup and chain ALC245_FIXUP_HP_X360_MUTE_LEDS.
The mute LED is on COEF 0x0b bits 2-3 and the mic-mute LED on GPIO2
(active low), which is what that fixup already handles. Unlike the
16-aa0xxx, the bass speaker amp works without toggling GPIO0, so the
EU0XXX variant is enough.
Under SOF the PCI SSID on this machine reads as 103c:0000, so the entry
is matched against the codec SSID.
Tested on a 16-f2xxx: all four speakers play and both LEDs follow the
mute state.
Cc: stable@vger.kernel.org
Signed-off-by: Abhiraj Dutta <abhirajdutta7@gmail.com>
---
sound/hda/codecs/realtek/alc269.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index d38be4d50..edfd5ebe8 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -4524,6 +4524,7 @@ enum {
ALC256_FIXUP_HEADPHONE_AMP_VOL,
ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX,
ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX,
+ ALC245_FIXUP_HP_SPECTRE_X360_16_F2XXX,
ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A,
ALC285_FIXUP_ASUS_GA403U,
ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC,
@@ -7226,6 +7227,12 @@ static const struct hda_fixup alc269_fixups[] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc245_fixup_hp_spectre_x360_16_aa0xxx,
},
+ [ALC245_FIXUP_HP_SPECTRE_X360_16_F2XXX] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc245_fixup_hp_spectre_x360_eu0xxx,
+ .chained = true,
+ .chain_id = ALC245_FIXUP_HP_X360_MUTE_LEDS
+ },
[ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc245_fixup_hp_zbook_firefly_g12a,
@@ -7869,6 +7876,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x8902, "HP OMEN 16", ALC285_FIXUP_HP_MUTE_LED),
SND_PCI_QUIRK(0x103c, 0x890e, "HP 255 G8 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
SND_PCI_QUIRK(0x103c, 0x8919, "HP Pavilion Aero Laptop 13-be0xxx", ALC287_FIXUP_HP_GPIO_LED),
+ SND_PCI_QUIRK(0x103c, 0x891e, "HP Spectre x360 2-in-1 Laptop 16-f2xxx", ALC245_FIXUP_HP_SPECTRE_X360_16_F2XXX),
SND_PCI_QUIRK(0x103c, 0x896d, "HP ZBook Firefly 16 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x896e, "HP EliteBook x360 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x8971, "HP EliteBook 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
---
base-commit: d1458f8c2282975f2bd7467cd3c3cf4c0c58c1ca
change-id: 20261122-hp-spectre-16-f2-quirk-32093ab0be47
Best regards,
--
Abhiraj Dutta <abhirajdutta7@gmail.com>
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] ALSA: hda/realtek: Add quirk for HP Spectre x360 2-in-1 Laptop 16-f2xxx
2026-11-22 22:02 [PATCH] ALSA: hda/realtek: Add quirk for HP Spectre x360 2-in-1 Laptop 16-f2xxx Abhiraj Dutta via B4 Relay
@ 2026-11-22 22:12 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-11-22 22:12 UTC (permalink / raw)
To: Abhiraj Dutta; +Cc: linux-sound
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] ALSA: hda/realtek: duplicate LED registration and leak in
16-f2xxx fixup
--
commit 1e1f85383f6e0d271a8e66afdced2477c34a6570
Author: Abhiraj Dutta <abhirajdutta7@gmail.com>
ALSA: hda/realtek: Add quirk for HP Spectre x360 2-in-1 Laptop 16-f2xxx
This commit adds a quirk entry and fixup for the HP Spectre x360 16-f2xxx
(SSID 103c:891e) to enable the treble speakers and configure the mute and
mic-mute LEDs.
> diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
> index d38be4d500b21..edfd5ebe8b084 100644
> --- a/sound/hda/codecs/realtek/alc269.c
> +++ b/sound/hda/codecs/realtek/alc269.c
[ ... ]
> @@ -7226,6 +7227,12 @@ static const struct hda_fixup alc269_fixups[] = {
> .type = HDA_FIXUP_FUNC,
> .v.func = alc245_fixup_hp_spectre_x360_16_aa0xxx,
> },
> + [ALC245_FIXUP_HP_SPECTRE_X360_16_F2XXX] = {
> + .type = HDA_FIXUP_FUNC,
> + .v.func = alc245_fixup_hp_spectre_x360_eu0xxx,
> + .chained = true,
> + .chain_id = ALC245_FIXUP_HP_X360_MUTE_LEDS
> + },
> [ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A] = {
> .type = HDA_FIXUP_FUNC,
> .v.func = alc245_fixup_hp_zbook_firefly_g12a,
[Severity: High]
Does chaining ALC245_FIXUP_HP_X360_MUTE_LEDS here register the mute and
mic-mute LED class devices twice?
alc245_fixup_hp_spectre_x360_eu0xxx() already runs both LED fixups directly:
sound/hda/codecs/realtek/alc269.c:alc245_fixup_hp_spectre_x360_eu0xxx() {
...
cs35l41_fixup_i2c_two(codec, fix, action);
alc245_fixup_hp_mute_led_coefbit(codec, fix, action);
alc245_fixup_hp_gpio_led(codec, fix, action);
}
Chaining ALC245_FIXUP_HP_X360_MUTE_LEDS invokes
alc245_fixup_hp_mute_led_coefbit() and alc245_fixup_hp_gpio_led() a second
time. In create_mute_led_cdev(), the second registration allocates and
registers duplicate led_classdev instances and overwrites
spec->led_cdevs[LED_AUDIO_MUTE] and spec->led_cdevs[LED_AUDIO_MICMUTE], so
snd_hda_gen_spec_free() leaves the first devm-allocated led_classdev
structures registered in the LED core after they are freed on unbind
(use-after-free).
The 103c:891e quirk entry can use ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX
directly without adding ALC245_FIXUP_HP_SPECTRE_X360_16_F2XXX.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261122-hp-spectre-16-f2-quirk-v1-1-2011ef8986fb@gmail.com?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-22 22:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-22 22:02 [PATCH] ALSA: hda/realtek: Add quirk for HP Spectre x360 2-in-1 Laptop 16-f2xxx Abhiraj Dutta via B4 Relay
2026-11-22 22:12 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox