diff options
| -rw-r--r-- | sound/pci/hda/patch_realtek.c | 37 | 
1 files changed, 22 insertions, 15 deletions
| diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 3f92def752fd..da34095c707f 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
| @@ -1093,6 +1093,16 @@ static void alc889_coef_init(struct hda_codec *codec) | |||
| 1093 | snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, tmp|0x2010); | 1093 | snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, tmp|0x2010); | 
| 1094 | } | 1094 | } | 
| 1095 | 1095 | ||
| 1096 | /* turn on/off EAPD control (only if available) */ | ||
| 1097 | static void set_eapd(struct hda_codec *codec, hda_nid_t nid, int on) | ||
| 1098 | { | ||
| 1099 | if (get_wcaps_type(get_wcaps(codec, nid)) != AC_WID_PIN) | ||
| 1100 | return; | ||
| 1101 | if (snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_EAPD) | ||
| 1102 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_EAPD_BTLENABLE, | ||
| 1103 | on ? 2 : 0); | ||
| 1104 | } | ||
| 1105 | |||
| 1096 | static void alc_auto_init_amp(struct hda_codec *codec, int type) | 1106 | static void alc_auto_init_amp(struct hda_codec *codec, int type) | 
| 1097 | { | 1107 | { | 
| 1098 | unsigned int tmp; | 1108 | unsigned int tmp; | 
| @@ -1110,25 +1120,22 @@ static void alc_auto_init_amp(struct hda_codec *codec, int type) | |||
| 1110 | case ALC_INIT_DEFAULT: | 1120 | case ALC_INIT_DEFAULT: | 
| 1111 | switch (codec->vendor_id) { | 1121 | switch (codec->vendor_id) { | 
| 1112 | case 0x10ec0260: | 1122 | case 0x10ec0260: | 
| 1113 | snd_hda_codec_write(codec, 0x0f, 0, | 1123 | set_eapd(codec, 0x0f, 1); | 
| 1114 | AC_VERB_SET_EAPD_BTLENABLE, 2); | 1124 | set_eapd(codec, 0x10, 1); | 
| 1115 | snd_hda_codec_write(codec, 0x10, 0, | ||
| 1116 | AC_VERB_SET_EAPD_BTLENABLE, 2); | ||
| 1117 | break; | 1125 | break; | 
| 1118 | case 0x10ec0262: | 1126 | case 0x10ec0262: | 
| 1119 | case 0x10ec0267: | 1127 | case 0x10ec0267: | 
| 1120 | case 0x10ec0268: | 1128 | case 0x10ec0268: | 
| 1121 | case 0x10ec0269: | 1129 | case 0x10ec0269: | 
| 1130 | case 0x10ec0270: | ||
| 1122 | case 0x10ec0272: | 1131 | case 0x10ec0272: | 
| 1123 | case 0x10ec0660: | 1132 | case 0x10ec0660: | 
| 1124 | case 0x10ec0662: | 1133 | case 0x10ec0662: | 
| 1125 | case 0x10ec0663: | 1134 | case 0x10ec0663: | 
| 1126 | case 0x10ec0862: | 1135 | case 0x10ec0862: | 
| 1127 | case 0x10ec0889: | 1136 | case 0x10ec0889: | 
| 1128 | snd_hda_codec_write(codec, 0x14, 0, | 1137 | set_eapd(codec, 0x14, 1); | 
| 1129 | AC_VERB_SET_EAPD_BTLENABLE, 2); | 1138 | set_eapd(codec, 0x15, 1); | 
| 1130 | snd_hda_codec_write(codec, 0x15, 0, | ||
| 1131 | AC_VERB_SET_EAPD_BTLENABLE, 2); | ||
| 1132 | break; | 1139 | break; | 
| 1133 | } | 1140 | } | 
| 1134 | switch (codec->vendor_id) { | 1141 | switch (codec->vendor_id) { | 
| @@ -1836,10 +1843,8 @@ static void alc889_acer_aspire_8930g_setup(struct hda_codec *codec) | |||
| 1836 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 1843 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 
| 1837 | static void alc889_power_eapd(struct hda_codec *codec, int power) | 1844 | static void alc889_power_eapd(struct hda_codec *codec, int power) | 
| 1838 | { | 1845 | { | 
| 1839 | snd_hda_codec_write(codec, 0x14, 0, | 1846 | set_eapd(codec, 0x14, power); | 
| 1840 | AC_VERB_SET_EAPD_BTLENABLE, power ? 2 : 0); | 1847 | set_eapd(codec, 0x15, power); | 
| 1841 | snd_hda_codec_write(codec, 0x15, 0, | ||
| 1842 | AC_VERB_SET_EAPD_BTLENABLE, power ? 2 : 0); | ||
| 1843 | } | 1848 | } | 
| 1844 | #endif | 1849 | #endif | 
| 1845 | 1850 | ||
| @@ -9473,6 +9478,7 @@ static struct alc_config_preset alc882_presets[] = { | |||
| 9473 | .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_modes), | 9478 | .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_modes), | 
| 9474 | .channel_mode = alc883_3ST_6ch_modes, | 9479 | .channel_mode = alc883_3ST_6ch_modes, | 
| 9475 | .need_dac_fix = 1, | 9480 | .need_dac_fix = 1, | 
| 9481 | .const_channel_count = 6, | ||
| 9476 | .num_mux_defs = | 9482 | .num_mux_defs = | 
| 9477 | ARRAY_SIZE(alc888_2_capture_sources), | 9483 | ARRAY_SIZE(alc888_2_capture_sources), | 
| 9478 | .input_mux = alc888_2_capture_sources, | 9484 | .input_mux = alc888_2_capture_sources, | 
| @@ -10377,7 +10383,7 @@ static void alc262_hp_t5735_setup(struct hda_codec *codec) | |||
| 10377 | struct alc_spec *spec = codec->spec; | 10383 | struct alc_spec *spec = codec->spec; | 
| 10378 | 10384 | ||
| 10379 | spec->autocfg.hp_pins[0] = 0x15; | 10385 | spec->autocfg.hp_pins[0] = 0x15; | 
| 10380 | spec->autocfg.speaker_pins[0] = 0x0c; /* HACK: not actually a pin */ | 10386 | spec->autocfg.speaker_pins[0] = 0x14; | 
| 10381 | } | 10387 | } | 
| 10382 | 10388 | ||
| 10383 | static struct snd_kcontrol_new alc262_hp_t5735_mixer[] = { | 10389 | static struct snd_kcontrol_new alc262_hp_t5735_mixer[] = { | 
| @@ -11788,9 +11794,9 @@ static struct alc_config_preset alc262_presets[] = { | |||
| 11788 | .num_channel_mode = ARRAY_SIZE(alc262_modes), | 11794 | .num_channel_mode = ARRAY_SIZE(alc262_modes), | 
| 11789 | .channel_mode = alc262_modes, | 11795 | .channel_mode = alc262_modes, | 
| 11790 | .input_mux = &alc262_capture_source, | 11796 | .input_mux = &alc262_capture_source, | 
| 11791 | .unsol_event = alc_automute_amp_unsol_event, | 11797 | .unsol_event = alc_sku_unsol_event, | 
| 11792 | .setup = alc262_hp_t5735_setup, | 11798 | .setup = alc262_hp_t5735_setup, | 
| 11793 | .init_hook = alc_automute_amp, | 11799 | .init_hook = alc_inithook, | 
| 11794 | }, | 11800 | }, | 
| 11795 | [ALC262_HP_RP5700] = { | 11801 | [ALC262_HP_RP5700] = { | 
| 11796 | .mixers = { alc262_hp_rp5700_mixer }, | 11802 | .mixers = { alc262_hp_rp5700_mixer }, | 
| @@ -12541,6 +12547,7 @@ static int alc268_new_analog_output(struct alc_spec *spec, hda_nid_t nid, | |||
| 12541 | dac = 0x02; | 12547 | dac = 0x02; | 
| 12542 | break; | 12548 | break; | 
| 12543 | case 0x15: | 12549 | case 0x15: | 
| 12550 | case 0x21: | ||
| 12544 | dac = 0x03; | 12551 | dac = 0x03; | 
| 12545 | break; | 12552 | break; | 
| 12546 | default: | 12553 | default: | 
