Skip to content

Commit

Permalink
ALSA: hda - Fix mute-LED GPIO initialization for IDT codecs
Browse files Browse the repository at this point in the history
The IDT codecs initializes the GPIO setup for mute LEDs via
snd_hda_sync_vmaster_hook().  This works in most cases except for the
very first call, which is called before PCM and control creations.
Thus before Master switch is set manually via alsactl, the mute LED
may show the wrong state, depending on the polarity.

Now it's fixed by calling the LED-status update function manually when
no vmaster is set yet.

Cc: <stable@vger.kernel.org> [v3.4+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Jul 31, 2012
1 parent c9dbc48 commit 1f43f6c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -4420,7 +4420,12 @@ static int stac92xx_init(struct hda_codec *codec)
snd_hda_jack_report_sync(codec);

/* sync mute LED */
snd_hda_sync_vmaster_hook(&spec->vmaster_mute);
if (spec->gpio_led) {
if (spec->vmaster_mute.hook)
snd_hda_sync_vmaster_hook(&spec->vmaster_mute);
else /* the very first init call doesn't have vmaster yet */
stac92xx_update_led_status(codec, false);
}

/* sync the power-map */
if (spec->num_pwrs)
Expand Down

0 comments on commit 1f43f6c

Please sign in to comment.