public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda/realtek: enable mute LED support on ThinkBook 16p
@ 2026-04-24 11:21 Yuxuan Qiu
  2026-04-27 12:14 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Yuxuan Qiu @ 2026-04-24 11:21 UTC (permalink / raw)
  To: perex, tiwai; +Cc: linux-sound, linux-kernel, Yuxuan Qiu

On ThinkBook 16p systems the platform mute LED is present and
bound to the audio-mute trigger, but it does not react to Master
mute changes.

The affected fixup chain sets up the DAC routing, but does not enable
vmaster mute LED handling. Because of that, the generic HDA code does
not mark Master Playback Switch with SNDRV_CTL_ELEM_ACCESS_SPK_LED,
and the audio-mute trigger never receives speaker mute updates.

Add a ThinkBook-specific wrapper around alc287_fixup_bind_dacs() and
enable spec->gen.vmaster_mute_led during PRE_PROBE. This keeps the
existing DAC binding logic unchanged while allowing the normal generic
LED path to drive the mute LED.

Signed-off-by: Yuxuan Qiu <yuxuanqiu596@gmail.com>
---
 sound/hda/codecs/realtek/alc269.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index b33f42576..b79a58079 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -3694,6 +3694,17 @@ static void alc287_fixup_lenovo_thinkpad_with_alc1318(struct hda_codec *codec,
 	spec->power_hook = alc287_s4_power_gpio3_default;
 	spec->gen.pcm_playback_hook = alc287_alc1318_playback_pcm_hook;
 }
+
+static void alc287_fixup_tb_vmaster_led(struct hda_codec *codec,
+					const struct hda_fixup *fix, int action)
+{
+	struct alc_spec *spec = codec->spec;
+
+	if (action == HDA_FIXUP_ACT_PRE_PROBE)
+		spec->gen.vmaster_mute_led = 1;
+
+	alc287_fixup_bind_dacs(codec, fix, action);
+}
 /* GPIO2: mute led GPIO3: micmute led */
 static void alc245_tas2781_spi_hp_fixup_muteled(struct hda_codec *codec,
 					  const struct hda_fixup *fix, int action)
@@ -6447,7 +6458,7 @@ static const struct hda_fixup alc269_fixups[] = {
 	},
 	[ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD] = {
 		.type = HDA_FIXUP_FUNC,
-		.v.func = alc287_fixup_bind_dacs,
+		.v.func = alc287_fixup_tb_vmaster_led,
 		.chained = true,
 		.chain_id = ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI,
 	},
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: hda/realtek: enable mute LED support on ThinkBook 16p
  2026-04-24 11:21 [PATCH] ALSA: hda/realtek: enable mute LED support on ThinkBook 16p Yuxuan Qiu
@ 2026-04-27 12:14 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2026-04-27 12:14 UTC (permalink / raw)
  To: Yuxuan Qiu; +Cc: perex, tiwai, linux-sound, linux-kernel

On Fri, 24 Apr 2026 13:21:07 +0200,
Yuxuan Qiu wrote:
> 
> On ThinkBook 16p systems the platform mute LED is present and
> bound to the audio-mute trigger, but it does not react to Master
> mute changes.
> 
> The affected fixup chain sets up the DAC routing, but does not enable
> vmaster mute LED handling. Because of that, the generic HDA code does
> not mark Master Playback Switch with SNDRV_CTL_ELEM_ACCESS_SPK_LED,
> and the audio-mute trigger never receives speaker mute updates.
> 
> Add a ThinkBook-specific wrapper around alc287_fixup_bind_dacs() and
> enable spec->gen.vmaster_mute_led during PRE_PROBE. This keeps the
> existing DAC binding logic unchanged while allowing the normal generic
> LED path to drive the mute LED.
> 
> Signed-off-by: Yuxuan Qiu <yuxuanqiu596@gmail.com>

Thanks, applied now.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-27 12:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-24 11:21 [PATCH] ALSA: hda/realtek: enable mute LED support on ThinkBook 16p Yuxuan Qiu
2026-04-27 12:14 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox