Skip to content

Commit

Permalink
ALSA: hda - Fix default polarity of mute-LED GPIO on 92HD83x/88x codecs
Browse files Browse the repository at this point in the history
The previous commit caused a regression on HP laptops with 92HD83x/88x
codecs.  The default polarity of mute-LED GPIO is inverted on these
devices.

Reference: Novell bnc#578190
	https://bugzilla.novell.com/show_bug.cgi?id=578190

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Feb 9, 2010
1 parent b99a776 commit dce17d4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -4790,7 +4790,7 @@ static void set_hp_led_gpio(struct hda_codec *codec)
* Need more information on whether it is true across the entire series.
* -- kunal
*/
static int find_mute_led_gpio(struct hda_codec *codec)
static int find_mute_led_gpio(struct hda_codec *codec, int default_polarity)
{
struct sigmatel_spec *spec = codec->spec;
const struct dmi_device *dev = NULL;
Expand All @@ -4817,7 +4817,7 @@ static int find_mute_led_gpio(struct hda_codec *codec)
*/
if (!hp_blike_system(codec->subsystem_id)) {
set_hp_led_gpio(codec);
spec->gpio_led_polarity = 1;
spec->gpio_led_polarity = default_polarity;
return 1;
}
}
Expand Down Expand Up @@ -5343,7 +5343,7 @@ static int patch_stac92hd83xxx(struct hda_codec *codec)

codec->patch_ops = stac92xx_patch_ops;

if (find_mute_led_gpio(codec))
if (find_mute_led_gpio(codec, 0))
snd_printd("mute LED gpio %d polarity %d\n",
spec->gpio_led,
spec->gpio_led_polarity);
Expand Down Expand Up @@ -5705,7 +5705,7 @@ static int patch_stac92hd71bxx(struct hda_codec *codec)
}
}

if (find_mute_led_gpio(codec))
if (find_mute_led_gpio(codec, 1))
snd_printd("mute LED gpio %d polarity %d\n",
spec->gpio_led,
spec->gpio_led_polarity);
Expand Down

0 comments on commit dce17d4

Please sign in to comment.