Commit 0dfdfc11 authored by Takashi Iwai's avatar Takashi Iwai Committed by Greg Kroah-Hartman

ALSA: hda - Fix inverted LED gpio setup for Lenovo Ideapad

commit b1974f96 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: 3e887f37 ('ALSA: hda - Add mute LED support to Lenovo Ideapad')
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7c46686b
...@@ -5578,9 +5578,9 @@ static void alc662_led_gpio1_mute_hook(void *private_data, int enabled) ...@@ -5578,9 +5578,9 @@ static void alc662_led_gpio1_mute_hook(void *private_data, int enabled)
unsigned int oldval = spec->gpio_led; unsigned int oldval = spec->gpio_led;
if (enabled) if (enabled)
spec->gpio_led &= ~0x01;
else
spec->gpio_led |= 0x01; spec->gpio_led |= 0x01;
else
spec->gpio_led &= ~0x01;
if (spec->gpio_led != oldval) if (spec->gpio_led != oldval)
snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA,
spec->gpio_led); spec->gpio_led);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment