Skip to contentSkip to conversation

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

PATCH New Takashi Iwai 1 participant 1 message Oct 20, 2014 Sound

lore
Share & tools
lore
#0 lore raw

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

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

---
 sound/pci/hda/patch_realtek.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/pci/hda/patch_realtek.c +2 -2
index 4c35490cf119..34b7bdb510c7 100644
@@ -5613,9 +5613,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);
Signature · 1 line
2.1.2