aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/patch_realtek.c30
1 files changed, 19 insertions, 11 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index c85da5766d39..bf729f518f87 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -8725,7 +8725,8 @@ static void alc262_hippo1_unsol_event(struct hda_codec *codec,
8725 8725
8726/* 8726/*
8727 * fujitsu model 8727 * fujitsu model
8728 * 0x14 = headphone/spdif-out, 0x15 = internal speaker 8728 * 0x14 = headphone/spdif-out, 0x15 = internal speaker,
8729 * 0x1b = port replicator headphone out
8729 */ 8730 */
8730 8731
8731#define ALC_HP_EVENT 0x37 8732#define ALC_HP_EVENT 0x37
@@ -8733,6 +8734,8 @@ static void alc262_hippo1_unsol_event(struct hda_codec *codec,
8733static struct hda_verb alc262_fujitsu_unsol_verbs[] = { 8734static struct hda_verb alc262_fujitsu_unsol_verbs[] = {
8734 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT}, 8735 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
8735 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, 8736 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
8737 {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
8738 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
8736 {} 8739 {}
8737}; 8740};
8738 8741
@@ -8773,12 +8776,16 @@ static void alc262_fujitsu_automute(struct hda_codec *codec, int force)
8773 unsigned int mute; 8776 unsigned int mute;
8774 8777
8775 if (force || !spec->sense_updated) { 8778 if (force || !spec->sense_updated) {
8776 unsigned int present; 8779 unsigned int present_int_hp, present_dock_hp;
8777 /* need to execute and sync at first */ 8780 /* need to execute and sync at first */
8778 snd_hda_codec_read(codec, 0x14, 0, AC_VERB_SET_PIN_SENSE, 0); 8781 snd_hda_codec_read(codec, 0x14, 0, AC_VERB_SET_PIN_SENSE, 0);
8779 present = snd_hda_codec_read(codec, 0x14, 0, 8782 present_int_hp = snd_hda_codec_read(codec, 0x14, 0,
8780 AC_VERB_GET_PIN_SENSE, 0); 8783 AC_VERB_GET_PIN_SENSE, 0);
8781 spec->jack_present = (present & 0x80000000) != 0; 8784 snd_hda_codec_read(codec, 0x1B, 0, AC_VERB_SET_PIN_SENSE, 0);
8785 present_dock_hp = snd_hda_codec_read(codec, 0x1b, 0,
8786 AC_VERB_GET_PIN_SENSE, 0);
8787 spec->jack_present = (present_int_hp & 0x80000000) != 0;
8788 spec->jack_present |= (present_dock_hp & 0x80000000) != 0;
8782 spec->sense_updated = 1; 8789 spec->sense_updated = 1;
8783 } 8790 }
8784 if (spec->jack_present) { 8791 if (spec->jack_present) {
@@ -8820,12 +8827,13 @@ static int alc262_fujitsu_master_sw_put(struct snd_kcontrol *kcontrol,
8820 long *valp = ucontrol->value.integer.value; 8827 long *valp = ucontrol->value.integer.value;
8821 int change; 8828 int change;
8822 8829
8823 change = snd_hda_codec_amp_update(codec, 0x14, 0, HDA_OUTPUT, 0, 8830 change = snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0,
8824 HDA_AMP_MUTE, 8831 HDA_AMP_MUTE,
8825 valp[0] ? 0 : HDA_AMP_MUTE); 8832 valp ? 0 : HDA_AMP_MUTE);
8826 change |= snd_hda_codec_amp_update(codec, 0x14, 1, HDA_OUTPUT, 0, 8833 change |= snd_hda_codec_amp_stereo(codec, 0x1b, HDA_OUTPUT, 0,
8827 HDA_AMP_MUTE, 8834 HDA_AMP_MUTE,
8828 valp[1] ? 0 : HDA_AMP_MUTE); 8835 valp ? 0 : HDA_AMP_MUTE);
8836
8829 if (change) 8837 if (change)
8830 alc262_fujitsu_automute(codec, 0); 8838 alc262_fujitsu_automute(codec, 0);
8831 return change; 8839 return change;