Skip to content

Commit

Permalink
ALSA: hda - Via Fix speaker-mute checks in VIA driver
Browse files Browse the repository at this point in the history
When the line-jack is plugged/unplugged, the driver must check also
the headphone jack state in addition to the line-out jack.  Currently
it checks only the line-out state and ignores the headphone.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Jul 11, 2011
1 parent 017f2a1 commit 21ce0b6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions sound/pci/hda/patch_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -1606,12 +1606,10 @@ static void via_unsol_event(struct hda_codec *codec,

res &= ~VIA_JACK_EVENT;

if (res == VIA_HP_EVENT)
if (res == VIA_HP_EVENT || res == VIA_LINE_EVENT)
via_hp_automute(codec);
else if (res == VIA_GPIO_EVENT)
via_gpio_control(codec);
else if (res == VIA_LINE_EVENT)
via_line_automute(codec, false);
}

#ifdef SND_HDA_NEEDS_RESUME
Expand Down Expand Up @@ -2535,7 +2533,6 @@ static int via_init(struct hda_codec *codec)
via_auto_init_unsol_event(codec);

via_hp_automute(codec);
via_line_automute(codec, false);

return 0;
}
Expand Down

0 comments on commit 21ce0b6

Please sign in to comment.