]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.5.1/alsa-hda-fix-mute-led-gpio-initialization-for-idt-codecs.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.5.1 / alsa-hda-fix-mute-led-gpio-initialization-for-idt-codecs.patch
1 From 1f43f6c1bc8d740e75b4177eb29110858bb5fea2 Mon Sep 17 00:00:00 2001
2 From: Takashi Iwai <tiwai@suse.de>
3 Date: Tue, 31 Jul 2012 10:40:05 +0200
4 Subject: ALSA: hda - Fix mute-LED GPIO initialization for IDT codecs
5
6 From: Takashi Iwai <tiwai@suse.de>
7
8 commit 1f43f6c1bc8d740e75b4177eb29110858bb5fea2 upstream.
9
10 The IDT codecs initializes the GPIO setup for mute LEDs via
11 snd_hda_sync_vmaster_hook(). This works in most cases except for the
12 very first call, which is called before PCM and control creations.
13 Thus before Master switch is set manually via alsactl, the mute LED
14 may show the wrong state, depending on the polarity.
15
16 Now it's fixed by calling the LED-status update function manually when
17 no vmaster is set yet.
18
19 Signed-off-by: Takashi Iwai <tiwai@suse.de>
20 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21
22 ---
23 sound/pci/hda/patch_sigmatel.c | 7 ++++++-
24 1 file changed, 6 insertions(+), 1 deletion(-)
25
26 --- a/sound/pci/hda/patch_sigmatel.c
27 +++ b/sound/pci/hda/patch_sigmatel.c
28 @@ -4420,7 +4420,12 @@ static int stac92xx_init(struct hda_code
29 snd_hda_jack_report_sync(codec);
30
31 /* sync mute LED */
32 - snd_hda_sync_vmaster_hook(&spec->vmaster_mute);
33 + if (spec->gpio_led) {
34 + if (spec->vmaster_mute.hook)
35 + snd_hda_sync_vmaster_hook(&spec->vmaster_mute);
36 + else /* the very first init call doesn't have vmaster yet */
37 + stac92xx_update_led_status(codec, false);
38 + }
39
40 /* sync the power-map */
41 if (spec->num_pwrs)