From: Takashi Iwai Date: Thu, 19 Apr 2012 10:04:03 +0000 (+0200) Subject: ALSA: hda/sigmatel - Fix inverted mute LED X-Git-Tag: v3.4~22^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e843196c697ee2c319d96e861980fb4c3e04e24;p=platform%2Fkernel%2Flinux-amlogic.git 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 Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 33a9946..4742cac 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) if (spec->gpio_led_polarity) muted = !muted; - /*polarity defines *not* muted state level*/ if (!spec->vref_mute_led_nid) { if (muted) - spec->gpio_data &= ~spec->gpio_led; /* orange */ + spec->gpio_data |= spec->gpio_led; else - spec->gpio_data |= spec->gpio_led; /* white */ + spec->gpio_data &= ~spec->gpio_led; stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, spec->gpio_data); } else {