Merge branch 'fix/hda' into for-linus

+22 -15
+22 -15
sound/pci/hda/patch_realtek.c
··· 1093 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 1106 static void alc_auto_init_amp(struct hda_codec *codec, int type) 1097 1107 { 1098 1108 unsigned int tmp; ··· 1120 1110 case ALC_INIT_DEFAULT: 1121 1111 switch (codec->vendor_id) { 1122 1112 case 0x10ec0260: 1123 - snd_hda_codec_write(codec, 0x0f, 0, 1124 - AC_VERB_SET_EAPD_BTLENABLE, 2); 1125 - snd_hda_codec_write(codec, 0x10, 0, 1126 - AC_VERB_SET_EAPD_BTLENABLE, 2); 1113 + set_eapd(codec, 0x0f, 1); 1114 + set_eapd(codec, 0x10, 1); 1127 1115 break; 1128 1116 case 0x10ec0262: 1129 1117 case 0x10ec0267: 1130 1118 case 0x10ec0268: 1131 1119 case 0x10ec0269: 1120 + case 0x10ec0270: 1132 1121 case 0x10ec0272: 1133 1122 case 0x10ec0660: 1134 1123 case 0x10ec0662: 1135 1124 case 0x10ec0663: 1136 1125 case 0x10ec0862: 1137 1126 case 0x10ec0889: 1138 - snd_hda_codec_write(codec, 0x14, 0, 1139 - AC_VERB_SET_EAPD_BTLENABLE, 2); 1140 - snd_hda_codec_write(codec, 0x15, 0, 1141 - AC_VERB_SET_EAPD_BTLENABLE, 2); 1127 + set_eapd(codec, 0x14, 1); 1128 + set_eapd(codec, 0x15, 1); 1142 1129 break; 1143 1130 } 1144 1131 switch (codec->vendor_id) { ··· 1843 1836 #ifdef CONFIG_SND_HDA_POWER_SAVE 1844 1837 static void alc889_power_eapd(struct hda_codec *codec, int power) 1845 1838 { 1846 - snd_hda_codec_write(codec, 0x14, 0, 1847 - AC_VERB_SET_EAPD_BTLENABLE, power ? 2 : 0); 1848 - snd_hda_codec_write(codec, 0x15, 0, 1849 - AC_VERB_SET_EAPD_BTLENABLE, power ? 2 : 0); 1839 + set_eapd(codec, 0x14, power); 1840 + set_eapd(codec, 0x15, power); 1850 1841 } 1851 1842 #endif 1852 1843 ··· 9478 9473 .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_modes), 9479 9474 .channel_mode = alc883_3ST_6ch_modes, 9480 9475 .need_dac_fix = 1, 9476 + .const_channel_count = 6, 9481 9477 .num_mux_defs = 9482 9478 ARRAY_SIZE(alc888_2_capture_sources), 9483 9479 .input_mux = alc888_2_capture_sources, ··· 10383 10377 struct alc_spec *spec = codec->spec; 10384 10378 10385 10379 spec->autocfg.hp_pins[0] = 0x15; 10386 - spec->autocfg.speaker_pins[0] = 0x0c; /* HACK: not actually a pin */ 10380 + spec->autocfg.speaker_pins[0] = 0x14; 10387 10381 } 10388 10382 10389 10383 static struct snd_kcontrol_new alc262_hp_t5735_mixer[] = { ··· 11794 11788 .num_channel_mode = ARRAY_SIZE(alc262_modes), 11795 11789 .channel_mode = alc262_modes, 11796 11790 .input_mux = &alc262_capture_source, 11797 - .unsol_event = alc_automute_amp_unsol_event, 11791 + .unsol_event = alc_sku_unsol_event, 11798 11792 .setup = alc262_hp_t5735_setup, 11799 - .init_hook = alc_automute_amp, 11793 + .init_hook = alc_inithook, 11800 11794 }, 11801 11795 [ALC262_HP_RP5700] = { 11802 11796 .mixers = { alc262_hp_rp5700_mixer }, ··· 12547 12541 dac = 0x02; 12548 12542 break; 12549 12543 case 0x15: 12544 + case 0x21: 12550 12545 dac = 0x03; 12551 12546 break; 12552 12547 default: