aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/pci/hda/patch_realtek.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 24bbc47dcea2..d403ee825ef6 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -10773,23 +10773,28 @@ static void alc882_auto_init_hp_out(struct hda_codec *codec)
10773 hda_nid_t pin, dac; 10773 hda_nid_t pin, dac;
10774 int i; 10774 int i;
10775 10775
10776 for (i = 0; i < ARRAY_SIZE(spec->autocfg.hp_pins); i++) { 10776 if (spec->autocfg.line_out_type != AUTO_PIN_HP_OUT) {
10777 pin = spec->autocfg.hp_pins[i]; 10777 for (i = 0; i < ARRAY_SIZE(spec->autocfg.hp_pins); i++) {
10778 if (!pin) 10778 pin = spec->autocfg.hp_pins[i];
10779 break; 10779 if (!pin)
10780 dac = spec->multiout.hp_nid; 10780 break;
10781 if (!dac) 10781 dac = spec->multiout.hp_nid;
10782 dac = spec->multiout.dac_nids[0]; /* to front */ 10782 if (!dac)
10783 alc882_auto_set_output_and_unmute(codec, pin, PIN_HP, dac); 10783 dac = spec->multiout.dac_nids[0]; /* to front */
10784 alc882_auto_set_output_and_unmute(codec, pin, PIN_HP, dac);
10785 }
10784 } 10786 }
10785 for (i = 0; i < ARRAY_SIZE(spec->autocfg.speaker_pins); i++) { 10787
10786 pin = spec->autocfg.speaker_pins[i]; 10788 if (spec->autocfg.line_out_type != AUTO_PIN_SPEAKER_OUT) {
10787 if (!pin) 10789 for (i = 0; i < ARRAY_SIZE(spec->autocfg.speaker_pins); i++) {
10788 break; 10790 pin = spec->autocfg.speaker_pins[i];
10789 dac = spec->multiout.extra_out_nid[0]; 10791 if (!pin)
10790 if (!dac) 10792 break;
10791 dac = spec->multiout.dac_nids[0]; /* to front */ 10793 dac = spec->multiout.extra_out_nid[0];
10792 alc882_auto_set_output_and_unmute(codec, pin, PIN_OUT, dac); 10794 if (!dac)
10795 dac = spec->multiout.dac_nids[0]; /* to front */
10796 alc882_auto_set_output_and_unmute(codec, pin, PIN_OUT, dac);
10797 }
10793 } 10798 }
10794} 10799}
10795 10800