diff mbox series

[2/3] ALSA: hda/realtek - Enable micmute LED on and HP system

Message ID 20200430083255.5093-2-kai.heng.feng@canonical.com (mailing list archive)
State New, archived
Headers show
Series [1/3] ALSA: hda/realtek - Introduce polarity for micmute LED GPIO | expand

Commit Message

Kai-Heng Feng April 30, 2020, 8:32 a.m. UTC
Though the system uses DMIC, headset mic still uses the HDA, let's use
GPIO 0x1 to control the micmute LED.

The micmute LED GPIO has a different polarity to the mute LED GPIO, we
can use the newly added micmute_led_polarity to indicate that.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 sound/pci/hda/patch_realtek.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Takashi Iwai April 30, 2020, 5:22 p.m. UTC | #1
On Thu, 30 Apr 2020 10:32:52 +0200,
Kai-Heng Feng wrote:
> 
> Though the system uses DMIC, headset mic still uses the HDA, let's use
> GPIO 0x1 to control the micmute LED.
> 
> The micmute LED GPIO has a different polarity to the mute LED GPIO, we
> can use the newly added micmute_led_polarity to indicate that.
> 
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>

Applied to for-next branch.  Thanks.


Takashi
diff mbox series

Patch

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 3150a61befc5..6f164ccddde3 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4134,7 +4134,11 @@  static void alc269_fixup_hp_gpio_led(struct hda_codec *codec,
 static void alc285_fixup_hp_gpio_led(struct hda_codec *codec,
 				const struct hda_fixup *fix, int action)
 {
-	alc_fixup_hp_gpio_led(codec, action, 0x04, 0x00);
+	struct alc_spec *spec = codec->spec;
+
+	spec->micmute_led_polarity = 1;
+
+	alc_fixup_hp_gpio_led(codec, action, 0x04, 0x01);
 }
 
 static void alc286_fixup_hp_gpio_led(struct hda_codec *codec,