From: Dirga Yuza <dirgayuza123@gmail.com>
To: Jaroslav Kysela <perez@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Zhang Heng <zhangheng@kylinos.cn>,
Stefan Binding <sbinding@opensource.cirrus.com>,
Kailang Yang <kailang@realtek.com>
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
Dirga Yuza <dirgayuza123@gmail.com>
Subject: [PATCH] ALSA: hda/realtek: Add micmute quirk to Acer Nitro AN515-58
Date: Sun, 10 May 2026 12:58:01 +0700 [thread overview]
Message-ID: <20260510055951.9035-1-dirgayuza123@gmail.com> (raw)
The Acer Nitro AN515-58 uses GPIO 4 in active-low configuration to
control the mic-mute LED. This patch adds a fixup to register the LED
classdev and associate it with the mic-mute trigger, while chaining to
the existing headset mic fixup.
Signed-off-by: Dirga Yuza <dirgayuza123@gmail.com>
---
sound/hda/codecs/realtek/alc269.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index d720565db4aa..3f7698b28b97 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -3323,6 +3323,18 @@ static void alc256_fixup_acer_sfg16_micmute_led(struct hda_codec *codec,
alc_fixup_hp_gpio_led(codec, action, 0, 0x04);
}
+static void alc287_fixup_acer_micmute_led(struct hda_codec *codec,
+ const struct hda_fixup *fix, int action)
+{
+ struct alc_spec *spec = codec->spec;
+
+ alc_fixup_hp_gpio_led(codec, action, 0, 0x10);
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
+ spec->micmute_led_polarity = 1;
+ spec->gpio_mask |= 0x10;
+ spec->gpio_dir |= 0x10;
+ }
+}
/* for alc295_fixup_hp_top_speakers */
#include "../helpers/hp_x360.c"
@@ -4112,6 +4124,7 @@ enum {
ALC245_FIXUP_CS35L41_I2C_2_MUTE_LED,
ALC236_FIXUP_HP_DMIC,
ALC256_FIXUP_HONOR_MRB_XXX_M1020_AUDIO,
+ ALC287_FIXUP_ACER_MICMUTE_LED,
};
/* A special fixup for Lenovo C940 and Yoga Duet 7;
@@ -6664,6 +6677,12 @@ static const struct hda_fixup alc269_fixups[] = {
{ 0x1b, 0x90170110 },
{ }
}
+ },
+ [ALC287_FIXUP_ACER_MICMUTE_LED] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc287_fixup_acer_micmute_led,
+ .chained = true,
+ .chain_id = ALC2XX_FIXUP_HEADSET_MIC,
}
};
@@ -6714,7 +6733,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC),
SND_PCI_QUIRK(0x1025, 0x1534, "Acer Predator PH315-54", ALC255_FIXUP_ACER_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1025, 0x1539, "Acer Nitro 5 AN515-57", ALC2XX_FIXUP_HEADSET_MIC),
- SND_PCI_QUIRK(0x1025, 0x159c, "Acer Nitro 5 AN515-58", ALC2XX_FIXUP_HEADSET_MIC),
+ SND_PCI_QUIRK(0x1025, 0x159c, "Acer Nitro 5 AN515-58", ALC287_FIXUP_ACER_MICMUTE_LED),
SND_PCI_QUIRK(0x1025, 0x1597, "Acer Nitro 5 AN517-55", ALC2XX_FIXUP_HEADSET_MIC),
SND_PCI_QUIRK(0x1025, 0x160e, "Acer PT316-51S", ALC2XX_FIXUP_HEADSET_MIC),
SND_PCI_QUIRK(0x1025, 0x1679, "Acer Nitro 16 AN16-41", ALC2XX_FIXUP_HEADSET_MIC),
--
2.54.0
reply other threads:[~2026-05-10 6:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260510055951.9035-1-dirgayuza123@gmail.com \
--to=dirgayuza123@gmail.com \
--cc=kailang@realtek.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perez@perex.cz \
--cc=sbinding@opensource.cirrus.com \
--cc=tiwai@suse.com \
--cc=zhangheng@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox