]> git.hungrycats.org Git - linux/commitdiff
ALSA: hda - Fix inverted LED gpio setup for Lenovo Ideapad
authorTakashi Iwai <tiwai@suse.de>
Mon, 20 Oct 2014 09:26:57 +0000 (11:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Oct 2014 16:43:12 +0000 (09:43 -0700)
commit b1974f965a506c131b60cd3e483340884e831920 upstream.

We implemented in a wrong way for mute LED on Lenovo Ideapad; the bit
must be flipped.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=16373
Fixes: 3e887f379d8a ('ALSA: hda - Add mute LED support to Lenovo Ideapad')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/hda/patch_realtek.c

index 4fc339e777db0bfe378fd352875d16f5cd9f3d2e..b7b293cc710e2f6f68ee67ae9f9a5bb7aff15545 100644 (file)
@@ -5786,9 +5786,9 @@ static void alc662_led_gpio1_mute_hook(void *private_data, int enabled)
        unsigned int oldval = spec->gpio_led;
 
        if (enabled)
-               spec->gpio_led &= ~0x01;
-       else
                spec->gpio_led |= 0x01;
+       else
+               spec->gpio_led &= ~0x01;
        if (spec->gpio_led != oldval)
                snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA,
                                    spec->gpio_led);