* [PATCH 1/2] ALSA: hda - fix a typo by changing mute_led_nid to cap_mute_led_nid
@ 2014-07-08 9:56 Hui Wang
2014-07-08 9:56 ` [PATCH 2/2] ALSA: hda - add capture mute led support in led_power_filter Hui Wang
2014-07-08 10:42 ` [PATCH 1/2] ALSA: hda - fix a typo by changing mute_led_nid to cap_mute_led_nid Takashi Iwai
0 siblings, 2 replies; 3+ messages in thread
From: Hui Wang @ 2014-07-08 9:56 UTC (permalink / raw)
To: tiwai, alsa-devel; +Cc: hui.wang, kailang, david.henningsson
BugLink: https://bugs.launchpad.net/bugs/1329580
Cc: David Henningsson <david.henningsson@canonical.com>
Cc: Kailang Yang <kailang@realtek.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
---
sound/pci/hda/patch_realtek.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 327413e..73b1759 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3529,7 +3529,7 @@ static void alc269_fixup_hp_cap_mic_mute_hook(struct hda_codec *codec,
struct alc_spec *spec = codec->spec;
unsigned int pinval, enable, disable;
- pinval = snd_hda_codec_get_pin_target(codec, spec->mute_led_nid);
+ pinval = snd_hda_codec_get_pin_target(codec, spec->cap_mute_led_nid);
pinval &= ~AC_PINCTL_VREFEN;
enable = pinval | AC_PINCTL_VREF_80;
disable = pinval | AC_PINCTL_VREF_HIZ;
--
1.8.1.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] ALSA: hda - add capture mute led support in led_power_filter
2014-07-08 9:56 [PATCH 1/2] ALSA: hda - fix a typo by changing mute_led_nid to cap_mute_led_nid Hui Wang
@ 2014-07-08 9:56 ` Hui Wang
2014-07-08 10:42 ` [PATCH 1/2] ALSA: hda - fix a typo by changing mute_led_nid to cap_mute_led_nid Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Hui Wang @ 2014-07-08 9:56 UTC (permalink / raw)
To: tiwai, alsa-devel; +Cc: hui.wang, kailang, david.henningsson
Now the led_power_filter() needs to handle 3 situations:
- only mute_led_nid is set
- only cap_mute_led_nid is set
- both mute_led_ind and cap_mute_led_nid are set
BugLink: https://bugs.launchpad.net/bugs/1329580
Cc: David Henningsson <david.henningsson@canonical.com>
Cc: Kailang Yang <kailang@realtek.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
---
sound/pci/hda/patch_realtek.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 73b1759..512582b 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3403,7 +3403,8 @@ static unsigned int led_power_filter(struct hda_codec *codec,
{
struct alc_spec *spec = codec->spec;
- if (power_state != AC_PWRST_D3 || nid != spec->mute_led_nid)
+ if (power_state != AC_PWRST_D3 || nid == 0 ||
+ (nid != spec->mute_led_nid && nid != spec->cap_mute_led_nid))
return power_state;
/* Set pin ctl again, it might have just been set to 0 */
@@ -3563,6 +3564,7 @@ static void alc269_fixup_hp_gpio_mic1_led(struct hda_codec *codec,
spec->gpio_led = 0;
spec->cap_mute_led_nid = 0x18;
snd_hda_add_verbs(codec, gpio_init);
+ codec->power_filter = led_power_filter;
}
}
--
1.8.1.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] ALSA: hda - fix a typo by changing mute_led_nid to cap_mute_led_nid
2014-07-08 9:56 [PATCH 1/2] ALSA: hda - fix a typo by changing mute_led_nid to cap_mute_led_nid Hui Wang
2014-07-08 9:56 ` [PATCH 2/2] ALSA: hda - add capture mute led support in led_power_filter Hui Wang
@ 2014-07-08 10:42 ` Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2014-07-08 10:42 UTC (permalink / raw)
To: Hui Wang; +Cc: alsa-devel, kailang, david.henningsson
At Tue, 8 Jul 2014 17:56:14 +0800,
Hui Wang wrote:
>
> BugLink: https://bugs.launchpad.net/bugs/1329580
> Cc: David Henningsson <david.henningsson@canonical.com>
> Cc: Kailang Yang <kailang@realtek.com>
> Signed-off-by: Hui Wang <hui.wang@canonical.com>
Thanks, applied both patches now.
Takashi
> ---
> sound/pci/hda/patch_realtek.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index 327413e..73b1759 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -3529,7 +3529,7 @@ static void alc269_fixup_hp_cap_mic_mute_hook(struct hda_codec *codec,
> struct alc_spec *spec = codec->spec;
> unsigned int pinval, enable, disable;
>
> - pinval = snd_hda_codec_get_pin_target(codec, spec->mute_led_nid);
> + pinval = snd_hda_codec_get_pin_target(codec, spec->cap_mute_led_nid);
> pinval &= ~AC_PINCTL_VREFEN;
> enable = pinval | AC_PINCTL_VREF_80;
> disable = pinval | AC_PINCTL_VREF_HIZ;
> --
> 1.8.1.2
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-08 10:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-08 9:56 [PATCH 1/2] ALSA: hda - fix a typo by changing mute_led_nid to cap_mute_led_nid Hui Wang
2014-07-08 9:56 ` [PATCH 2/2] ALSA: hda - add capture mute led support in led_power_filter Hui Wang
2014-07-08 10:42 ` [PATCH 1/2] ALSA: hda - fix a typo by changing mute_led_nid to cap_mute_led_nid 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.