summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Murphy <iano200@gmail.com>2024-03-16 10:41:57 +0100
committerTakashi Iwai <tiwai@suse.de>2024-03-17 09:34:39 +0100
commitbd2d83058cc8a20a23059ad01d413fb8daf079d6 (patch)
treeed192e8cff88d3af01cee11b4c3aabfcb5cc5956
parentRevert "ALSA: usb-audio: Name feature ctl using output if input is PCM" (diff)
downloadlinux-bd2d83058cc8a20a23059ad01d413fb8daf079d6.tar.xz
linux-bd2d83058cc8a20a23059ad01d413fb8daf079d6.zip
ALSA: hda/realtek: add in quirk for Acer Swift Go 16 - SFG16-71
Keyboard has an LED that is ON/OFF when mic is muted/active - LED is controlled by GPIO pin - Patch enables led to appear in /sys/class/leds/ as hda::micmute - Enables LED when mic is MUTED - Disables LED when mic is active [ fixed white spaces by tiwai ] Signed-off-by: Ian Murphy <iano200@gmail.com> Message-ID: <20240316094157.13890-1-iano200@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/patch_realtek.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index a91d5ec29bfb..e904f62e1952 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6891,6 +6891,13 @@ static void yoga7_14arb7_fixup_i2c(struct hda_codec *cdc,
comp_generic_fixup(cdc, action, "i2c", "INT8866", "-%s:00", 1);
}
+static void alc256_fixup_acer_sfg16_micmute_led(struct hda_codec *codec,
+ const struct hda_fixup *fix, int action)
+{
+ alc_fixup_hp_gpio_led(codec, action, 0, 0x04);
+}
+
+
/* for alc295_fixup_hp_top_speakers */
#include "hp_x360_helper.c"
@@ -7374,6 +7381,7 @@ enum {
ALC289_FIXUP_DELL_CS35L41_SPI_2,
ALC294_FIXUP_CS35L41_I2C_2,
ALC245_FIXUP_CS35L56_SPI_4_HP_GPIO_LED,
+ ALC256_FIXUP_ACER_SFG16_MICMUTE_LED,
};
/* A special fixup for Lenovo C940 and Yoga Duet 7;
@@ -9569,6 +9577,10 @@ static const struct hda_fixup alc269_fixups[] = {
.chained = true,
.chain_id = ALC285_FIXUP_HP_GPIO_LED,
},
+ [ALC256_FIXUP_ACER_SFG16_MICMUTE_LED] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc256_fixup_acer_sfg16_micmute_led,
+ },
};
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -9612,6 +9624,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
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, 0x169a, "Acer Swift SFG16", ALC256_FIXUP_ACER_SFG16_MICMUTE_LED),
SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
SND_PCI_QUIRK(0x1028, 0x053c, "Dell Latitude E5430", ALC292_FIXUP_DELL_E7X),
SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS),