From: Takashi Iwai Date: Mon, 11 Feb 2008 14:54:34 +0000 (+0100) Subject: [ALSA] hda-codec - Fix automute of AD1981HD hp model X-Git-Tag: firefly_0821_release~21564^2~227 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f0824812af1bf4f7d27e054a2ca2686385d770bb;p=firefly-linux-kernel-4.4.55.git [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 --- 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,