public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda/realtek: fix mute/micmute LEDs don't work for HP 200 G2i
@ 2025-11-26  2:51 Dirk Su
  2025-11-26  7:57 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Dirk Su @ 2025-11-26  2:51 UTC (permalink / raw)
  Cc: dirk.su, Jaroslav Kysela, Takashi Iwai, Kailang Yang,
	Stefan Binding, Chris Chiu, linux-sound, linux-kernel

HP 200 G2i needs quirk to make mic-mute/audio-mute working.

Signed-off-by: Dirk Su <dirk.su@canonical.com>
---
 sound/hda/codecs/realtek/alc269.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 70299e359ba0..a8e1ec92349f 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -1656,6 +1656,13 @@ static void alc236_fixup_hp_mute_led_micmute_vref(struct hda_codec *codec,
 	alc236_fixup_hp_micmute_led_vref(codec, fix, action);
 }
 
+static void alc236_fixup_hp_mute_led_micmute_gpio(struct hda_codec *codec,
+				const struct hda_fixup *fix, int action)
+{
+	alc236_fixup_hp_mute_led_coefbit2(codec, fix, action);
+	alc236_fixup_hp_gpio_led(codec, fix, action);
+}
+
 static inline void alc298_samsung_write_coef_pack(struct hda_codec *codec,
 						  const unsigned short coefs[2])
 {
@@ -3790,6 +3797,7 @@ enum {
 	ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED,
 	ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED,
 	ALC288_FIXUP_SURFACE_SWAP_DACS,
+	ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO,
 };
 
 /* A special fixup for Lenovo C940 and Yoga Duet 7;
@@ -5323,6 +5331,10 @@ static const struct hda_fixup alc269_fixups[] = {
 		.type = HDA_FIXUP_FUNC,
 		.v.func = alc236_fixup_hp_mute_led_micmute_vref,
 	},
+	[ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO] = {
+		.type = HDA_FIXUP_FUNC,
+		.v.func = alc236_fixup_hp_mute_led_micmute_gpio,
+	},
 	[ALC236_FIXUP_LENOVO_INV_DMIC] = {
 		.type = HDA_FIXUP_FUNC,
 		.v.func = alc_fixup_inv_dmic,
@@ -6760,6 +6772,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x103c, 0x8e60, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2),
 	SND_PCI_QUIRK(0x103c, 0x8e61, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2),
 	SND_PCI_QUIRK(0x103c, 0x8e62, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2),
+	SND_PCI_QUIRK(0x103c, 0x8ec1, "HP 200 G2i", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
 	SND_PCI_QUIRK(0x103c, 0x8ed5, "HP EliteBook 8 Flip G2i 13", ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED),
 	SND_PCI_QUIRK(0x103c, 0x8ed6, "HP EliteBook 8 G2i 13", ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED),
 	SND_PCI_QUIRK(0x103c, 0x8ed7, "HP EliteBook 8 G2i 14", ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED),
-- 
2.43.0


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

* Re: [PATCH] ALSA: hda/realtek: fix mute/micmute LEDs don't work for HP 200 G2i
  2025-11-26  2:51 [PATCH] ALSA: hda/realtek: fix mute/micmute LEDs don't work for HP 200 G2i Dirk Su
@ 2025-11-26  7:57 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2025-11-26  7:57 UTC (permalink / raw)
  To: Dirk Su
  Cc: Jaroslav Kysela, Takashi Iwai, Kailang Yang, Stefan Binding,
	Chris Chiu, linux-sound, linux-kernel

On Wed, 26 Nov 2025 03:51:30 +0100,
Dirk Su wrote:
> 
> HP 200 G2i needs quirk to make mic-mute/audio-mute working.
> 
> Signed-off-by: Dirk Su <dirk.su@canonical.com>

This could be with a chained fixup instead, e.g.

	[ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO] = {
		.type = HDA_FIXUP_FUNC,
		.v.func = alc236_fixup_hp_mute_led_coefbit2,
		.chained = true,
		.chain_id = ALC236_FIXUP_HP_GPIO_LED,
	},

Care to resubmit in this style?


thanks,

Takashi

> ---
>  sound/hda/codecs/realtek/alc269.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
> index 70299e359ba0..a8e1ec92349f 100644
> --- a/sound/hda/codecs/realtek/alc269.c
> +++ b/sound/hda/codecs/realtek/alc269.c
> @@ -1656,6 +1656,13 @@ static void alc236_fixup_hp_mute_led_micmute_vref(struct hda_codec *codec,
>  	alc236_fixup_hp_micmute_led_vref(codec, fix, action);
>  }
>  
> +static void alc236_fixup_hp_mute_led_micmute_gpio(struct hda_codec *codec,
> +				const struct hda_fixup *fix, int action)
> +{
> +	alc236_fixup_hp_mute_led_coefbit2(codec, fix, action);
> +	alc236_fixup_hp_gpio_led(codec, fix, action);
> +}
> +
>  static inline void alc298_samsung_write_coef_pack(struct hda_codec *codec,
>  						  const unsigned short coefs[2])
>  {
> @@ -3790,6 +3797,7 @@ enum {
>  	ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED,
>  	ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED,
>  	ALC288_FIXUP_SURFACE_SWAP_DACS,
> +	ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO,
>  };
>  
>  /* A special fixup for Lenovo C940 and Yoga Duet 7;
> @@ -5323,6 +5331,10 @@ static const struct hda_fixup alc269_fixups[] = {
>  		.type = HDA_FIXUP_FUNC,
>  		.v.func = alc236_fixup_hp_mute_led_micmute_vref,
>  	},
> +	[ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO] = {
> +		.type = HDA_FIXUP_FUNC,
> +		.v.func = alc236_fixup_hp_mute_led_micmute_gpio,
> +	},
>  	[ALC236_FIXUP_LENOVO_INV_DMIC] = {
>  		.type = HDA_FIXUP_FUNC,
>  		.v.func = alc_fixup_inv_dmic,
> @@ -6760,6 +6772,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
>  	SND_PCI_QUIRK(0x103c, 0x8e60, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2),
>  	SND_PCI_QUIRK(0x103c, 0x8e61, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2),
>  	SND_PCI_QUIRK(0x103c, 0x8e62, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2),
> +	SND_PCI_QUIRK(0x103c, 0x8ec1, "HP 200 G2i", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
>  	SND_PCI_QUIRK(0x103c, 0x8ed5, "HP EliteBook 8 Flip G2i 13", ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED),
>  	SND_PCI_QUIRK(0x103c, 0x8ed6, "HP EliteBook 8 G2i 13", ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED),
>  	SND_PCI_QUIRK(0x103c, 0x8ed7, "HP EliteBook 8 G2i 14", ALC245_FIXUP_HP_TAS2781_SPI_MUTE_LED),
> -- 
> 2.43.0
> 

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

end of thread, other threads:[~2025-11-26  7:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-26  2:51 [PATCH] ALSA: hda/realtek: fix mute/micmute LEDs don't work for HP 200 G2i Dirk Su
2025-11-26  7:57 ` Takashi Iwai

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