Commit 3e843196 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda/sigmatel - Fix inverted mute LED

While refactoring the mute-LED handling for HP laptops, I messed up
the polarity check in a wrong way.  The red (or the mute-LED if any)
should appear in the muted state, corresponding to GPIO on.
Reported-by: default avatarMikko Vinni <mmvinni@yahoo.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 118cb4a4
...@@ -5063,12 +5063,11 @@ static void stac92xx_update_led_status(struct hda_codec *codec, int enabled) ...@@ -5063,12 +5063,11 @@ static void stac92xx_update_led_status(struct hda_codec *codec, int enabled)
if (spec->gpio_led_polarity) if (spec->gpio_led_polarity)
muted = !muted; muted = !muted;
/*polarity defines *not* muted state level*/
if (!spec->vref_mute_led_nid) { if (!spec->vref_mute_led_nid) {
if (muted) if (muted)
spec->gpio_data &= ~spec->gpio_led; /* orange */ spec->gpio_data |= spec->gpio_led;
else else
spec->gpio_data |= spec->gpio_led; /* white */ spec->gpio_data &= ~spec->gpio_led;
stac_gpio_set(codec, spec->gpio_mask, stac_gpio_set(codec, spec->gpio_mask,
spec->gpio_dir, spec->gpio_data); spec->gpio_dir, spec->gpio_data);
} else { } else {
......
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