aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r--sound/pci/hda/patch_realtek.c47
1 files changed, 35 insertions, 12 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 8c5d342bd4eb..587d94f869be 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1436,6 +1436,25 @@ static void alc_automute_amp_unsol_event(struct hda_codec *codec,
1436 alc_automute_amp(codec); 1436 alc_automute_amp(codec);
1437} 1437}
1438 1438
1439static void alc889_automute_init(struct hda_codec *codec)
1440{
1441 struct alc_spec *spec = codec->spec;
1442
1443 spec->autocfg.hp_pins[0] = 0x15;
1444 spec->autocfg.speaker_pins[0] = 0x14;
1445 spec->autocfg.speaker_pins[1] = 0x16;
1446 spec->autocfg.speaker_pins[2] = 0x17;
1447 spec->autocfg.speaker_pins[3] = 0x19;
1448 spec->autocfg.speaker_pins[4] = 0x1a;
1449 alc_automute_amp(codec);
1450}
1451
1452static void alc889_intel_init_hook(struct hda_codec *codec)
1453{
1454 alc889_coef_init(codec);
1455 alc889_automute_init(codec);
1456}
1457
1439static void alc888_fujitsu_xa3530_init_hook(struct hda_codec *codec) 1458static void alc888_fujitsu_xa3530_init_hook(struct hda_codec *codec)
1440{ 1459{
1441 struct alc_spec *spec = codec->spec; 1460 struct alc_spec *spec = codec->spec;
@@ -6993,6 +7012,11 @@ static struct hda_verb alc889_eapd_verbs[] = {
6993 { } 7012 { }
6994}; 7013};
6995 7014
7015static struct hda_verb alc_hp15_unsol_verbs[] = {
7016 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
7017 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
7018 {}
7019};
6996 7020
6997static struct hda_verb alc885_init_verbs[] = { 7021static struct hda_verb alc885_init_verbs[] = {
6998 /* Front mixer: unmute input/output amp left and right (volume = 0) */ 7022 /* Front mixer: unmute input/output amp left and right (volume = 0) */
@@ -7018,7 +7042,7 @@ static struct hda_verb alc885_init_verbs[] = {
7018 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, 7042 {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
7019 7043
7020 /* Front HP Pin: output 0 (0x0c) */ 7044 /* Front HP Pin: output 0 (0x0c) */
7021 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, 7045 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
7022 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, 7046 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
7023 {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, 7047 {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
7024 /* Front Pin: output 0 (0x0c) */ 7048 /* Front Pin: output 0 (0x0c) */
@@ -8860,7 +8884,8 @@ static struct alc_config_preset alc882_presets[] = {
8860 }, 8884 },
8861 [ALC889A_INTEL] = { 8885 [ALC889A_INTEL] = {
8862 .mixers = { alc885_8ch_intel_mixer, alc883_chmode_mixer }, 8886 .mixers = { alc885_8ch_intel_mixer, alc883_chmode_mixer },
8863 .init_verbs = { alc885_init_verbs, alc885_init_input_verbs }, 8887 .init_verbs = { alc885_init_verbs, alc885_init_input_verbs,
8888 alc_hp15_unsol_verbs },
8864 .num_dacs = ARRAY_SIZE(alc883_dac_nids), 8889 .num_dacs = ARRAY_SIZE(alc883_dac_nids),
8865 .dac_nids = alc883_dac_nids, 8890 .dac_nids = alc883_dac_nids,
8866 .num_adc_nids = ARRAY_SIZE(alc889_adc_nids), 8891 .num_adc_nids = ARRAY_SIZE(alc889_adc_nids),
@@ -8872,12 +8897,14 @@ static struct alc_config_preset alc882_presets[] = {
8872 .channel_mode = alc889_8ch_intel_modes, 8897 .channel_mode = alc889_8ch_intel_modes,
8873 .capsrc_nids = alc889_capsrc_nids, 8898 .capsrc_nids = alc889_capsrc_nids,
8874 .input_mux = &alc889_capture_source, 8899 .input_mux = &alc889_capture_source,
8900 .init_hook = alc889_automute_init,
8901 .unsol_event = alc_automute_amp_unsol_event,
8875 .need_dac_fix = 1, 8902 .need_dac_fix = 1,
8876 }, 8903 },
8877 [ALC889_INTEL] = { 8904 [ALC889_INTEL] = {
8878 .mixers = { alc885_8ch_intel_mixer, alc883_chmode_mixer }, 8905 .mixers = { alc885_8ch_intel_mixer, alc883_chmode_mixer },
8879 .init_verbs = { alc885_init_verbs, alc889_init_input_verbs, 8906 .init_verbs = { alc885_init_verbs, alc889_init_input_verbs,
8880 alc889_eapd_verbs }, 8907 alc889_eapd_verbs, alc_hp15_unsol_verbs},
8881 .num_dacs = ARRAY_SIZE(alc883_dac_nids), 8908 .num_dacs = ARRAY_SIZE(alc883_dac_nids),
8882 .dac_nids = alc883_dac_nids, 8909 .dac_nids = alc883_dac_nids,
8883 .num_adc_nids = ARRAY_SIZE(alc889_adc_nids), 8910 .num_adc_nids = ARRAY_SIZE(alc889_adc_nids),
@@ -8889,7 +8916,8 @@ static struct alc_config_preset alc882_presets[] = {
8889 .channel_mode = alc889_8ch_intel_modes, 8916 .channel_mode = alc889_8ch_intel_modes,
8890 .capsrc_nids = alc889_capsrc_nids, 8917 .capsrc_nids = alc889_capsrc_nids,
8891 .input_mux = &alc889_capture_source, 8918 .input_mux = &alc889_capture_source,
8892 .init_hook = alc889_coef_init, 8919 .init_hook = alc889_intel_init_hook,
8920 .unsol_event = alc_automute_amp_unsol_event,
8893 .need_dac_fix = 1, 8921 .need_dac_fix = 1,
8894 }, 8922 },
8895 [ALC883_6ST_DIG] = { 8923 [ALC883_6ST_DIG] = {
@@ -10121,12 +10149,6 @@ static struct hda_verb alc262_eapd_verbs[] = {
10121 { } 10149 { }
10122}; 10150};
10123 10151
10124static struct hda_verb alc262_hippo_unsol_verbs[] = {
10125 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
10126 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
10127 {}
10128};
10129
10130static struct hda_verb alc262_hippo1_unsol_verbs[] = { 10152static struct hda_verb alc262_hippo1_unsol_verbs[] = {
10131 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0}, 10153 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0},
10132 {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, 10154 {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00},
@@ -11168,7 +11190,7 @@ static struct alc_config_preset alc262_presets[] = {
11168 }, 11190 },
11169 [ALC262_HIPPO] = { 11191 [ALC262_HIPPO] = {
11170 .mixers = { alc262_hippo_mixer }, 11192 .mixers = { alc262_hippo_mixer },
11171 .init_verbs = { alc262_init_verbs, alc262_hippo_unsol_verbs}, 11193 .init_verbs = { alc262_init_verbs, alc_hp15_unsol_verbs},
11172 .num_dacs = ARRAY_SIZE(alc262_dac_nids), 11194 .num_dacs = ARRAY_SIZE(alc262_dac_nids),
11173 .dac_nids = alc262_dac_nids, 11195 .dac_nids = alc262_dac_nids,
11174 .hp_nid = 0x03, 11196 .hp_nid = 0x03,
@@ -11288,7 +11310,8 @@ static struct alc_config_preset alc262_presets[] = {
11288 }, 11310 },
11289 [ALC262_BENQ_T31] = { 11311 [ALC262_BENQ_T31] = {
11290 .mixers = { alc262_benq_t31_mixer }, 11312 .mixers = { alc262_benq_t31_mixer },
11291 .init_verbs = { alc262_init_verbs, alc262_benq_t31_EAPD_verbs, alc262_hippo_unsol_verbs }, 11313 .init_verbs = { alc262_init_verbs, alc262_benq_t31_EAPD_verbs,
11314 alc_hp15_unsol_verbs },
11292 .num_dacs = ARRAY_SIZE(alc262_dac_nids), 11315 .num_dacs = ARRAY_SIZE(alc262_dac_nids),
11293 .dac_nids = alc262_dac_nids, 11316 .dac_nids = alc262_dac_nids,
11294 .hp_nid = 0x03, 11317 .hp_nid = 0x03,