Skip to content

Commit 7022946

Browse files
Sharwesh05gregkh
authored andcommitted
ALSA: hda/realtek: Enable Mute LED on HP OMEN 16 Laptop xd000xx
commit e518230 upstream. 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> Cc: <stable@vger.kernel.org> Link: https://patch.msgid.link/20250329154105.7618-2-sharweshraajan@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent d2a2076 commit 7022946

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

sound/pci/hda/patch_realtek.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4744,6 +4744,22 @@ static void alc245_fixup_hp_mute_led_coefbit(struct hda_codec *codec,
47444744
}
47454745
}
47464746

4747+
static void alc245_fixup_hp_mute_led_v1_coefbit(struct hda_codec *codec,
4748+
const struct hda_fixup *fix,
4749+
int action)
4750+
{
4751+
struct alc_spec *spec = codec->spec;
4752+
4753+
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4754+
spec->mute_led_polarity = 0;
4755+
spec->mute_led_coef.idx = 0x0b;
4756+
spec->mute_led_coef.mask = 1 << 3;
4757+
spec->mute_led_coef.on = 1 << 3;
4758+
spec->mute_led_coef.off = 0;
4759+
snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
4760+
}
4761+
}
4762+
47474763
/* turn on/off mic-mute LED per capture hook by coef bit */
47484764
static int coef_micmute_led_set(struct led_classdev *led_cdev,
47494765
enum led_brightness brightness)
@@ -7851,6 +7867,7 @@ enum {
78517867
ALC287_FIXUP_TAS2781_I2C,
78527868
ALC287_FIXUP_YOGA7_14ARB7_I2C,
78537869
ALC245_FIXUP_HP_MUTE_LED_COEFBIT,
7870+
ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT,
78547871
ALC245_FIXUP_HP_X360_MUTE_LEDS,
78557872
ALC287_FIXUP_THINKPAD_I2S_SPK,
78567873
ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD,
@@ -10084,6 +10101,10 @@ static const struct hda_fixup alc269_fixups[] = {
1008410101
.type = HDA_FIXUP_FUNC,
1008510102
.v.func = alc245_fixup_hp_mute_led_coefbit,
1008610103
},
10104+
[ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT] = {
10105+
.type = HDA_FIXUP_FUNC,
10106+
.v.func = alc245_fixup_hp_mute_led_v1_coefbit,
10107+
},
1008710108
[ALC245_FIXUP_HP_X360_MUTE_LEDS] = {
1008810109
.type = HDA_FIXUP_FUNC,
1008910110
.v.func = alc245_fixup_hp_mute_led_coefbit,
@@ -10569,6 +10590,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
1056910590
SND_PCI_QUIRK(0x103c, 0x8b97, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
1057010591
SND_PCI_QUIRK(0x103c, 0x8bb3, "HP Slim OMEN", ALC287_FIXUP_CS35L41_I2C_2),
1057110592
SND_PCI_QUIRK(0x103c, 0x8bb4, "HP Slim OMEN", ALC287_FIXUP_CS35L41_I2C_2),
10593+
SND_PCI_QUIRK(0x103c, 0x8bcd, "HP Omen 16-xd0xxx", ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT),
1057210594
SND_PCI_QUIRK(0x103c, 0x8bdd, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
1057310595
SND_PCI_QUIRK(0x103c, 0x8bde, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
1057410596
SND_PCI_QUIRK(0x103c, 0x8bdf, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),

0 commit comments

Comments
 (0)