diff options
author | Kailang Yang <kailang@realtek.com> | 2014-11-21 02:49:11 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-11-21 04:56:52 -0500 |
commit | eaa8e5ef18fa9e09286482a4ded3a3cad36e44b2 (patch) | |
tree | 8fff843995659091518df5d4c29f70df43fa58bf /sound/pci | |
parent | 0f32fd1900e6b972f289416dbd75e92772b630cb (diff) |
ALSA: hda/realtek - Supported HP mute Led for ALC286
New HP machine supported output mute led and input mute led.
ALC286:
GPIO1 to control output mute led.
GPIO5 to control input mute led.
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 3c29a558e7db..3fcb7d951572 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -3299,6 +3299,27 @@ static void alc269_fixup_hp_gpio_led(struct hda_codec *codec, | |||
3299 | } | 3299 | } |
3300 | } | 3300 | } |
3301 | 3301 | ||
3302 | static void alc286_fixup_hp_gpio_led(struct hda_codec *codec, | ||
3303 | const struct hda_fixup *fix, int action) | ||
3304 | { | ||
3305 | struct alc_spec *spec = codec->spec; | ||
3306 | static const struct hda_verb gpio_init[] = { | ||
3307 | { 0x01, AC_VERB_SET_GPIO_MASK, 0x22 }, | ||
3308 | { 0x01, AC_VERB_SET_GPIO_DIRECTION, 0x22 }, | ||
3309 | {} | ||
3310 | }; | ||
3311 | |||
3312 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { | ||
3313 | spec->gen.vmaster_mute.hook = alc_fixup_gpio_mute_hook; | ||
3314 | spec->gen.cap_sync_hook = alc_fixup_gpio_mic_mute_hook; | ||
3315 | spec->gpio_led = 0; | ||
3316 | spec->mute_led_polarity = 0; | ||
3317 | spec->gpio_mute_led_mask = 0x02; | ||
3318 | spec->gpio_mic_led_mask = 0x20; | ||
3319 | snd_hda_add_verbs(codec, gpio_init); | ||
3320 | } | ||
3321 | } | ||
3322 | |||
3302 | /* turn on/off mic-mute LED per capture hook */ | 3323 | /* turn on/off mic-mute LED per capture hook */ |
3303 | static void alc269_fixup_hp_cap_mic_mute_hook(struct hda_codec *codec, | 3324 | static void alc269_fixup_hp_cap_mic_mute_hook(struct hda_codec *codec, |
3304 | struct snd_kcontrol *kcontrol, | 3325 | struct snd_kcontrol *kcontrol, |
@@ -4238,6 +4259,7 @@ enum { | |||
4238 | ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED, | 4259 | ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED, |
4239 | ALC282_FIXUP_ASPIRE_V5_PINS, | 4260 | ALC282_FIXUP_ASPIRE_V5_PINS, |
4240 | ALC280_FIXUP_HP_GPIO4, | 4261 | ALC280_FIXUP_HP_GPIO4, |
4262 | ALC286_FIXUP_HP_GPIO_LED, | ||
4241 | }; | 4263 | }; |
4242 | 4264 | ||
4243 | static const struct hda_fixup alc269_fixups[] = { | 4265 | static const struct hda_fixup alc269_fixups[] = { |
@@ -4705,6 +4727,10 @@ static const struct hda_fixup alc269_fixups[] = { | |||
4705 | .type = HDA_FIXUP_FUNC, | 4727 | .type = HDA_FIXUP_FUNC, |
4706 | .v.func = alc280_fixup_hp_gpio4, | 4728 | .v.func = alc280_fixup_hp_gpio4, |
4707 | }, | 4729 | }, |
4730 | [ALC286_FIXUP_HP_GPIO_LED] = { | ||
4731 | .type = HDA_FIXUP_FUNC, | ||
4732 | .v.func = alc286_fixup_hp_gpio_led, | ||
4733 | }, | ||
4708 | }; | 4734 | }; |
4709 | 4735 | ||
4710 | static const struct snd_pci_quirk alc269_fixup_tbl[] = { | 4736 | static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
@@ -4745,6 +4771,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
4745 | SND_PCI_QUIRK(0x103c, 0x226a, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), | 4771 | SND_PCI_QUIRK(0x103c, 0x226a, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), |
4746 | SND_PCI_QUIRK(0x103c, 0x226b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), | 4772 | SND_PCI_QUIRK(0x103c, 0x226b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), |
4747 | SND_PCI_QUIRK(0x103c, 0x226e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), | 4773 | SND_PCI_QUIRK(0x103c, 0x226e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), |
4774 | SND_PCI_QUIRK(0x103c, 0x2271, "HP", ALC286_FIXUP_HP_GPIO_LED), | ||
4748 | SND_PCI_QUIRK(0x103c, 0x229e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), | 4775 | SND_PCI_QUIRK(0x103c, 0x229e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), |
4749 | SND_PCI_QUIRK(0x103c, 0x22b2, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), | 4776 | SND_PCI_QUIRK(0x103c, 0x22b2, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), |
4750 | SND_PCI_QUIRK(0x103c, 0x22b7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), | 4777 | SND_PCI_QUIRK(0x103c, 0x22b7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), |