aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/pci/hda/patch_realtek.c34
1 files changed, 25 insertions, 9 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 61dffb8c57fc..6cace82b2866 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3095,6 +3095,14 @@ static void alc880_auto_set_output_and_unmute(struct hda_codec *codec,
3095 } 3095 }
3096} 3096}
3097 3097
3098static int get_pin_type(int line_out_type)
3099{
3100 if (line_out_type == AUTO_PIN_HP_OUT)
3101 return PIN_HP;
3102 else
3103 return PIN_OUT;
3104}
3105
3098static void alc880_auto_init_multi_out(struct hda_codec *codec) 3106static void alc880_auto_init_multi_out(struct hda_codec *codec)
3099{ 3107{
3100 struct alc_spec *spec = codec->spec; 3108 struct alc_spec *spec = codec->spec;
@@ -3103,7 +3111,8 @@ static void alc880_auto_init_multi_out(struct hda_codec *codec)
3103 alc_subsystem_id(codec, 0x15, 0x1b, 0x14); 3111 alc_subsystem_id(codec, 0x15, 0x1b, 0x14);
3104 for (i = 0; i < spec->autocfg.line_outs; i++) { 3112 for (i = 0; i < spec->autocfg.line_outs; i++) {
3105 hda_nid_t nid = spec->autocfg.line_out_pins[i]; 3113 hda_nid_t nid = spec->autocfg.line_out_pins[i];
3106 alc880_auto_set_output_and_unmute(codec, nid, PIN_OUT, i); 3114 int pin_type = get_pin_type(spec->autocfg.line_out_type);
3115 alc880_auto_set_output_and_unmute(codec, nid, pin_type, i);
3107 } 3116 }
3108} 3117}
3109 3118
@@ -4292,8 +4301,10 @@ static void alc260_auto_init_multi_out(struct hda_codec *codec)
4292 4301
4293 alc_subsystem_id(codec, 0x10, 0x15, 0x0f); 4302 alc_subsystem_id(codec, 0x10, 0x15, 0x0f);
4294 nid = spec->autocfg.line_out_pins[0]; 4303 nid = spec->autocfg.line_out_pins[0];
4295 if (nid) 4304 if (nid) {
4296 alc260_auto_set_output_and_unmute(codec, nid, PIN_OUT, 0); 4305 int pin_type = get_pin_type(spec->autocfg.line_out_type);
4306 alc260_auto_set_output_and_unmute(codec, nid, pin_type, 0);
4307 }
4297 4308
4298 nid = spec->autocfg.speaker_pins[0]; 4309 nid = spec->autocfg.speaker_pins[0];
4299 if (nid) 4310 if (nid)
@@ -4301,7 +4312,7 @@ static void alc260_auto_init_multi_out(struct hda_codec *codec)
4301 4312
4302 nid = spec->autocfg.hp_pins[0]; 4313 nid = spec->autocfg.hp_pins[0];
4303 if (nid) 4314 if (nid)
4304 alc260_auto_set_output_and_unmute(codec, nid, PIN_OUT, 0); 4315 alc260_auto_set_output_and_unmute(codec, nid, PIN_HP, 0);
4305} 4316}
4306 4317
4307#define ALC260_PIN_CD_NID 0x16 4318#define ALC260_PIN_CD_NID 0x16
@@ -5164,8 +5175,9 @@ static void alc882_auto_init_multi_out(struct hda_codec *codec)
5164 alc_subsystem_id(codec, 0x15, 0x1b, 0x14); 5175 alc_subsystem_id(codec, 0x15, 0x1b, 0x14);
5165 for (i = 0; i <= HDA_SIDE; i++) { 5176 for (i = 0; i <= HDA_SIDE; i++) {
5166 hda_nid_t nid = spec->autocfg.line_out_pins[i]; 5177 hda_nid_t nid = spec->autocfg.line_out_pins[i];
5178 int pin_type = get_pin_type(spec->autocfg.line_out_type);
5167 if (nid) 5179 if (nid)
5168 alc882_auto_set_output_and_unmute(codec, nid, PIN_OUT, 5180 alc882_auto_set_output_and_unmute(codec, nid, pin_type,
5169 i); 5181 i);
5170 } 5182 }
5171} 5183}
@@ -6185,8 +6197,9 @@ static void alc883_auto_init_multi_out(struct hda_codec *codec)
6185 alc_subsystem_id(codec, 0x15, 0x1b, 0x14); 6197 alc_subsystem_id(codec, 0x15, 0x1b, 0x14);
6186 for (i = 0; i <= HDA_SIDE; i++) { 6198 for (i = 0; i <= HDA_SIDE; i++) {
6187 hda_nid_t nid = spec->autocfg.line_out_pins[i]; 6199 hda_nid_t nid = spec->autocfg.line_out_pins[i];
6200 int pin_type = get_pin_type(spec->autocfg.line_out_type);
6188 if (nid) 6201 if (nid)
6189 alc883_auto_set_output_and_unmute(codec, nid, PIN_OUT, 6202 alc883_auto_set_output_and_unmute(codec, nid, pin_type,
6190 i); 6203 i);
6191 } 6204 }
6192} 6205}
@@ -8182,8 +8195,9 @@ static void alc861_auto_init_multi_out(struct hda_codec *codec)
8182 alc_subsystem_id(codec, 0x0e, 0x0f, 0x0b); 8195 alc_subsystem_id(codec, 0x0e, 0x0f, 0x0b);
8183 for (i = 0; i < spec->autocfg.line_outs; i++) { 8196 for (i = 0; i < spec->autocfg.line_outs; i++) {
8184 hda_nid_t nid = spec->autocfg.line_out_pins[i]; 8197 hda_nid_t nid = spec->autocfg.line_out_pins[i];
8198 int pin_type = get_pin_type(spec->autocfg.line_out_type);
8185 if (nid) 8199 if (nid)
8186 alc861_auto_set_output_and_unmute(codec, nid, PIN_OUT, 8200 alc861_auto_set_output_and_unmute(codec, nid, pin_type,
8187 spec->multiout.dac_nids[i]); 8201 spec->multiout.dac_nids[i]);
8188 } 8202 }
8189} 8203}
@@ -8892,9 +8906,10 @@ static void alc861vd_auto_init_multi_out(struct hda_codec *codec)
8892 alc_subsystem_id(codec, 0x15, 0x1b, 0x14); 8906 alc_subsystem_id(codec, 0x15, 0x1b, 0x14);
8893 for (i = 0; i <= HDA_SIDE; i++) { 8907 for (i = 0; i <= HDA_SIDE; i++) {
8894 hda_nid_t nid = spec->autocfg.line_out_pins[i]; 8908 hda_nid_t nid = spec->autocfg.line_out_pins[i];
8909 int pin_type = get_pin_type(spec->autocfg.line_out_type);
8895 if (nid) 8910 if (nid)
8896 alc861vd_auto_set_output_and_unmute(codec, nid, 8911 alc861vd_auto_set_output_and_unmute(codec, nid,
8897 PIN_OUT, i); 8912 pin_type, i);
8898 } 8913 }
8899} 8914}
8900 8915
@@ -9867,8 +9882,9 @@ static void alc662_auto_init_multi_out(struct hda_codec *codec)
9867 9882
9868 for (i = 0; i <= HDA_SIDE; i++) { 9883 for (i = 0; i <= HDA_SIDE; i++) {
9869 hda_nid_t nid = spec->autocfg.line_out_pins[i]; 9884 hda_nid_t nid = spec->autocfg.line_out_pins[i];
9885 int pin_type = get_pin_type(spec->autocfg.line_out_type);
9870 if (nid) 9886 if (nid)
9871 alc662_auto_set_output_and_unmute(codec, nid, PIN_OUT, 9887 alc662_auto_set_output_and_unmute(codec, nid, pin_type,
9872 i); 9888 i);
9873 } 9889 }
9874} 9890}