linux-sound.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda/realtek: Enable Mute LED on HP OMEN 16 Laptop xd000xx
@ 2025-03-29 15:41 Sharan Kumar M
  2025-03-31  9:31 ` Takashi Iwai
  0 siblings, 1 reply; 7+ messages in thread
From: Sharan Kumar M @ 2025-03-29 15:41 UTC (permalink / raw)
  To: tiwai; +Cc: linux-sound, linux-kernel, Sharan Kumar M

This patch adds the HP OMEN 16 Laptop xd000xx to enable mute led.
it uses ALC245_FIXUP_HP_MUTE_LED_COEFBIT with a slight modification setting mute_led_coef.off to 0(it was set to 4 i guess 
in that function) which i referred to your previous patch disscusion https://bugzilla.kernel.org/show_bug.cgi?id=214735 .
i am not sure whether i can modify the current working function so i added another version calling
ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT. and both works for me.

Tested on 6.13.4-arch1-1 to 6.14.0-arch1-1


Signed-off-by: Sharan Kumar M <sharweshraajan@gmail.com>


---
 sound/pci/hda/patch_realtek.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index b4fe681ec3cb..98abec3833a0 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4743,6 +4743,22 @@ static void alc245_fixup_hp_mute_led_coefbit(struct hda_codec *codec,
 	}
 }
 
+static void alc245_fixup_hp_mute_led_v1_coefbit(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->mute_led_polarity = 0;
+		spec->mute_led_coef.idx = 0x0b;
+		spec->mute_led_coef.mask = 1 << 3;
+		spec->mute_led_coef.on = 1 << 3;
+		spec->mute_led_coef.off = 0;
+		snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
+	}
+}
+
 /* turn on/off mic-mute LED per capture hook by coef bit */
 static int coef_micmute_led_set(struct led_classdev *led_cdev,
 				enum led_brightness brightness)
@@ -7911,6 +7927,7 @@ enum {
 	ALC245_FIXUP_TAS2781_SPI_2,
 	ALC287_FIXUP_YOGA7_14ARB7_I2C,
 	ALC245_FIXUP_HP_MUTE_LED_COEFBIT,
+	ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT,
 	ALC245_FIXUP_HP_X360_MUTE_LEDS,
 	ALC287_FIXUP_THINKPAD_I2S_SPK,
 	ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD,
@@ -10164,6 +10181,10 @@ static const struct hda_fixup alc269_fixups[] = {
 		.type = HDA_FIXUP_FUNC,
 		.v.func = alc245_fixup_hp_mute_led_coefbit,
 	},
+	[ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT] = {
+		.type = HDA_FIXUP_FUNC,
+		.v.func = alc245_fixup_hp_mute_led_v1_coefbit,
+	},
 	[ALC245_FIXUP_HP_X360_MUTE_LEDS] = {
 		.type = HDA_FIXUP_FUNC,
 		.v.func = alc245_fixup_hp_mute_led_coefbit,
@@ -10658,6 +10679,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x103c, 0x8b97, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
 	SND_PCI_QUIRK(0x103c, 0x8bb3, "HP Slim OMEN", ALC287_FIXUP_CS35L41_I2C_2),
 	SND_PCI_QUIRK(0x103c, 0x8bb4, "HP Slim OMEN", ALC287_FIXUP_CS35L41_I2C_2),
+	SND_PCI_QUIRK(0x103c, 0x8bcd, "HP Omen 16-xd0xxx", ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT),
 	SND_PCI_QUIRK(0x103c, 0x8bdd, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
 	SND_PCI_QUIRK(0x103c, 0x8bde, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
 	SND_PCI_QUIRK(0x103c, 0x8bdf, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] ALSA: hda/realtek: Enable Mute LED on HP OMEN 16 Laptop xd000xx
@ 2025-07-11  6:23 Sharan Kumar Muthu Saravanan
  2025-07-11  7:34 ` Takashi Iwai
  0 siblings, 1 reply; 7+ messages in thread
From: Sharan Kumar Muthu Saravanan @ 2025-07-11  6:23 UTC (permalink / raw)
  To: tiwai; +Cc: linux-sound, linux-kernel

this patch makes the mute led brighter since the previous patch i
submitted was dim

Tested on 6.15.5-arch1-1

Signed-off-by: Sharan Kumar M <sharweshraajan@gmail.com>

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 060db37eab83..062d439e753d 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4753,7 +4753,7 @@ static void
alc245_fixup_hp_mute_led_v1_coefbit(struct hda_codec *codec,
        if (action == HDA_FIXUP_ACT_PRE_PROBE) {
                spec->mute_led_polarity = 0;
                spec->mute_led_coef.idx = 0x0b;
-               spec->mute_led_coef.mask = 1 << 3;
+               spec->mute_led_coef.mask = 3 << 2;
                spec->mute_led_coef.on = 1 << 3;
                spec->mute_led_coef.off = 0;
                snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
---

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] ALSA: hda/realtek: Enable Mute LED on HP OMEN 16 Laptop xd000xx
@ 2025-07-17  3:02 Sharan Kumar Muthu Saravanan
  2025-07-17  9:53 ` Takashi Iwai
  0 siblings, 1 reply; 7+ messages in thread
From: Sharan Kumar Muthu Saravanan @ 2025-07-17  3:02 UTC (permalink / raw)
  To: tiwai; +Cc: linux-sound, linux-kernel

this patch is to fix my previous Commit e518230 i have fixed mute led
but for by This patch corrects the coefficient mask value introduced
in commit e518230, which was intended to enable the mute LED
functionality. During testing, multiple values were evaluated, and an
incorrect value was mistakenly included in the final commit. This
update fixes that error by applying the correct mask value for proper
mute LED behavior.

Tested on 6.15.5-arch1-1

Signed-off-by: M SHARAN KUMAR <sharweshraajan@gmail.com>

---
 sound/pci/hda/patch_realtek.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 060db37eab83..062d439e753d 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4753,7 +4753,7 @@ static void
alc245_fixup_hp_mute_led_v1_coefbit(struct hda_codec *codec,
  if (action == HDA_FIXUP_ACT_PRE_PROBE) {
  spec->mute_led_polarity = 0;
  spec->mute_led_coef.idx = 0x0b;
- spec->mute_led_coef.mask = 1 << 3;
+ spec->mute_led_coef.mask = 3 << 2;
  spec->mute_led_coef.on = 1 << 3;
  spec->mute_led_coef.off = 0;
  snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
-- 
2.50.1

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

end of thread, other threads:[~2025-07-17 10:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-29 15:41 [PATCH] ALSA: hda/realtek: Enable Mute LED on HP OMEN 16 Laptop xd000xx Sharan Kumar M
2025-03-31  9:31 ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2025-07-11  6:23 Sharan Kumar Muthu Saravanan
2025-07-11  7:34 ` Takashi Iwai
2025-07-17  3:02 Sharan Kumar Muthu Saravanan
2025-07-17  9:53 ` Takashi Iwai
2025-07-17 10:07   ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).