Commit 21ce0b65 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda - Via Fix speaker-mute checks in VIA driver

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: default avatarTakashi Iwai <tiwai@suse.de>
parent 017f2a10
...@@ -1606,12 +1606,10 @@ static void via_unsol_event(struct hda_codec *codec, ...@@ -1606,12 +1606,10 @@ static void via_unsol_event(struct hda_codec *codec,
res &= ~VIA_JACK_EVENT; res &= ~VIA_JACK_EVENT;
if (res == VIA_HP_EVENT) if (res == VIA_HP_EVENT || res == VIA_LINE_EVENT)
via_hp_automute(codec); via_hp_automute(codec);
else if (res == VIA_GPIO_EVENT) else if (res == VIA_GPIO_EVENT)
via_gpio_control(codec); via_gpio_control(codec);
else if (res == VIA_LINE_EVENT)
via_line_automute(codec, false);
} }
#ifdef SND_HDA_NEEDS_RESUME #ifdef SND_HDA_NEEDS_RESUME
...@@ -2535,7 +2533,6 @@ static int via_init(struct hda_codec *codec) ...@@ -2535,7 +2533,6 @@ static int via_init(struct hda_codec *codec)
via_auto_init_unsol_event(codec); via_auto_init_unsol_event(codec);
via_hp_automute(codec); via_hp_automute(codec);
via_line_automute(codec, false);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment