summaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-02-11 15:54:34 +0100
committerTakashi Iwai <tiwai@suse.de>2008-04-24 12:00:09 +0200
commitf0824812af1bf4f7d27e054a2ca2686385d770bb (patch)
tree9957d139cc89f3c2b84dd1989c1f6b0069103d63 /sound/pci
parent937b416027d8f79d7b37bb63b6585ea8fdf125de (diff)
downloadlinux-f0824812af1bf4f7d27e054a2ca2686385d770bb.tar.bz2
[ALSA] hda-codec - Fix automute of AD1981HD hp model
Reprogram the speaker-pin setting at each HP pin plug to make sure the spekaer auto-muting on AD1981HD hp model. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_analog.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index 7286ab86ecc4..9d0d2a1bbd64 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -1366,7 +1366,10 @@ static int ad1981_hp_master_sw_put(struct snd_kcontrol *kcontrol,
if (! ad198x_eapd_put(kcontrol, ucontrol))
return 0;
-
+ /* change speaker pin appropriately */
+ snd_hda_codec_write(codec, 0x05, 0,
+ AC_VERB_SET_PIN_WIDGET_CONTROL,
+ spec->cur_eapd ? PIN_OUT : 0);
/* toggle HP mute appropriately */
snd_hda_codec_amp_stereo(codec, 0x06, HDA_OUTPUT, 0,
HDA_AMP_MUTE,