* [PATCH] ALSA: hda/realtek: Fix mic mute LED for the HP Spectre x360 14
@ 2021-10-20 13:12 ` Johnathon Clark
0 siblings, 0 replies; 4+ messages in thread
From: Johnathon Clark @ 2021-10-20 13:12 UTC (permalink / raw)
Cc: john.clark, Jaroslav Kysela, Takashi Iwai, Jeremy Szu,
Kailang Yang, Hui Wang, Chris Chiu, Cameron Berkenpas,
PeiSen Hou, Werner Sembach, Sami Loone, Elia Devito,
moderated list:SOUND, open list
On the 'HP Spectre x360 Convertible 14-ea0xx' the microphone mute led is
controlled by GPIO 0x04. The speaker mute LED does not seem to be
exposed by GPIO and is there not set.
Signed-off-by: Johnathon Clark <john.clark@cantab.net>
---
sound/pci/hda/patch_realtek.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 965b096f416f..79c6fb39864d 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4355,6 +4355,17 @@ static void alc287_fixup_hp_gpio_led(struct hda_codec *codec,
alc_fixup_hp_gpio_led(codec, action, 0x10, 0);
}
+static void alc245_fixup_hp_gpio_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->micmute_led_polarity = 1;
+ }
+ alc_fixup_hp_gpio_led(codec, action, 0, 0x04);
+}
+
/* turn on/off mic-mute LED per capture hook via VREF change */
static int vref_micmute_led_set(struct led_classdev *led_cdev,
enum led_brightness brightness)
@@ -6709,6 +6720,7 @@ enum {
ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
ALC287_FIXUP_HP_GPIO_LED,
ALC256_FIXUP_HP_HEADSET_MIC,
+ ALC245_FIXUP_HP_GPIO_LED,
ALC236_FIXUP_DELL_AIO_HEADSET_MIC,
ALC282_FIXUP_ACER_DISABLE_LINEOUT,
ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST,
@@ -7333,6 +7345,8 @@ static const struct hda_fixup alc269_fixups[] = {
[ALC245_FIXUP_HP_X360_AMP] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc245_fixup_hp_x360_amp,
+ .chained = true,
+ .chain_id = ALC245_FIXUP_HP_GPIO_LED
},
[ALC288_FIXUP_DELL_HEADSET_MODE] = {
.type = HDA_FIXUP_FUNC,
@@ -8432,6 +8446,10 @@ static const struct hda_fixup alc269_fixups[] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc256_fixup_tongfang_reset_persistent_settings,
},
+ [ALC245_FIXUP_HP_GPIO_LED] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc245_fixup_hp_gpio_led,
+ },
};
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
--
2.33.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] ALSA: hda/realtek: Fix mic mute LED for the HP Spectre x360 14
@ 2021-10-20 13:12 ` Johnathon Clark
0 siblings, 0 replies; 4+ messages in thread
From: Johnathon Clark @ 2021-10-20 13:12 UTC (permalink / raw)
Cc: Chris Chiu, moderated list:SOUND, Kailang Yang, Jeremy Szu,
open list, Elia Devito, Takashi Iwai, Werner Sembach, Hui Wang,
PeiSen Hou, Sami Loone, Cameron Berkenpas, john.clark
On the 'HP Spectre x360 Convertible 14-ea0xx' the microphone mute led is
controlled by GPIO 0x04. The speaker mute LED does not seem to be
exposed by GPIO and is there not set.
Signed-off-by: Johnathon Clark <john.clark@cantab.net>
---
sound/pci/hda/patch_realtek.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 965b096f416f..79c6fb39864d 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4355,6 +4355,17 @@ static void alc287_fixup_hp_gpio_led(struct hda_codec *codec,
alc_fixup_hp_gpio_led(codec, action, 0x10, 0);
}
+static void alc245_fixup_hp_gpio_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->micmute_led_polarity = 1;
+ }
+ alc_fixup_hp_gpio_led(codec, action, 0, 0x04);
+}
+
/* turn on/off mic-mute LED per capture hook via VREF change */
static int vref_micmute_led_set(struct led_classdev *led_cdev,
enum led_brightness brightness)
@@ -6709,6 +6720,7 @@ enum {
ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK,
ALC287_FIXUP_HP_GPIO_LED,
ALC256_FIXUP_HP_HEADSET_MIC,
+ ALC245_FIXUP_HP_GPIO_LED,
ALC236_FIXUP_DELL_AIO_HEADSET_MIC,
ALC282_FIXUP_ACER_DISABLE_LINEOUT,
ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST,
@@ -7333,6 +7345,8 @@ static const struct hda_fixup alc269_fixups[] = {
[ALC245_FIXUP_HP_X360_AMP] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc245_fixup_hp_x360_amp,
+ .chained = true,
+ .chain_id = ALC245_FIXUP_HP_GPIO_LED
},
[ALC288_FIXUP_DELL_HEADSET_MODE] = {
.type = HDA_FIXUP_FUNC,
@@ -8432,6 +8446,10 @@ static const struct hda_fixup alc269_fixups[] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc256_fixup_tongfang_reset_persistent_settings,
},
+ [ALC245_FIXUP_HP_GPIO_LED] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc245_fixup_hp_gpio_led,
+ },
};
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
--
2.33.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ALSA: hda/realtek: Fix mic mute LED for the HP Spectre x360 14
2021-10-20 13:12 ` Johnathon Clark
@ 2021-10-21 5:07 ` Takashi Iwai
-1 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2021-10-21 5:07 UTC (permalink / raw)
To: Johnathon Clark
Cc: Jaroslav Kysela, Takashi Iwai, Jeremy Szu, Kailang Yang,
Hui Wang, Chris Chiu, Cameron Berkenpas, PeiSen Hou,
Werner Sembach, Sami Loone, Elia Devito, moderated list:SOUND,
open list
On Wed, 20 Oct 2021 15:12:51 +0200,
Johnathon Clark wrote:
>
> On the 'HP Spectre x360 Convertible 14-ea0xx' the microphone mute led is
> controlled by GPIO 0x04. The speaker mute LED does not seem to be
> exposed by GPIO and is there not set.
>
> Signed-off-by: Johnathon Clark <john.clark@cantab.net>
Applied with a slight coding-style fix now.
thanks,
Takashi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ALSA: hda/realtek: Fix mic mute LED for the HP Spectre x360 14
@ 2021-10-21 5:07 ` Takashi Iwai
0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2021-10-21 5:07 UTC (permalink / raw)
To: Johnathon Clark
Cc: Chris Chiu, moderated list:SOUND, Kailang Yang, Jeremy Szu,
open list, Elia Devito, Takashi Iwai, Werner Sembach, Hui Wang,
PeiSen Hou, Sami Loone, Cameron Berkenpas
On Wed, 20 Oct 2021 15:12:51 +0200,
Johnathon Clark wrote:
>
> On the 'HP Spectre x360 Convertible 14-ea0xx' the microphone mute led is
> controlled by GPIO 0x04. The speaker mute LED does not seem to be
> exposed by GPIO and is there not set.
>
> Signed-off-by: Johnathon Clark <john.clark@cantab.net>
Applied with a slight coding-style fix now.
thanks,
Takashi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-21 5:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-20 13:12 [PATCH] ALSA: hda/realtek: Fix mic mute LED for the HP Spectre x360 14 Johnathon Clark
2021-10-20 13:12 ` Johnathon Clark
2021-10-21 5:07 ` Takashi Iwai
2021-10-21 5:07 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.