]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ALSA] hda-codec - Fix automute of AD1981HD hp model
authorTakashi Iwai <tiwai@suse.de>
Mon, 11 Feb 2008 14:54:34 +0000 (15:54 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 24 Apr 2008 10:00:09 +0000 (12:00 +0200)
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>
sound/pci/hda/patch_analog.c

index 7286ab86ecc4bbdb34ea82ee95027e58168f8e24..9d0d2a1bbd6461308e060454c2d0ff8d2f719b98 100644 (file)
@@ -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,