diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-04-19 06:04:03 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-04-19 06:04:03 -0400 |
commit | 3e843196c697ee2c319d96e861980fb4c3e04e24 (patch) | |
tree | 9a065c1dfe64353d9954bafd9ffbf647c8d783f0 /sound/pci/hda/patch_sigmatel.c | |
parent | 118cb4a408e1c4021ac85d6c05da66bb6f57e556 (diff) |
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: Mikko Vinni <mmvinni@yahoo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_sigmatel.c')
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 33a9946b492c..4742cac26aa9 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -5063,12 +5063,11 @@ static void stac92xx_update_led_status(struct hda_codec *codec, int enabled) | |||
5063 | if (spec->gpio_led_polarity) | 5063 | if (spec->gpio_led_polarity) |
5064 | muted = !muted; | 5064 | muted = !muted; |
5065 | 5065 | ||
5066 | /*polarity defines *not* muted state level*/ | ||
5067 | if (!spec->vref_mute_led_nid) { | 5066 | if (!spec->vref_mute_led_nid) { |
5068 | if (muted) | 5067 | if (muted) |
5069 | spec->gpio_data &= ~spec->gpio_led; /* orange */ | 5068 | spec->gpio_data |= spec->gpio_led; |
5070 | else | 5069 | else |
5071 | spec->gpio_data |= spec->gpio_led; /* white */ | 5070 | spec->gpio_data &= ~spec->gpio_led; |
5072 | stac_gpio_set(codec, spec->gpio_mask, | 5071 | stac_gpio_set(codec, spec->gpio_mask, |
5073 | spec->gpio_dir, spec->gpio_data); | 5072 | spec->gpio_dir, spec->gpio_data); |
5074 | } else { | 5073 | } else { |