aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/pci/hda/patch_realtek.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 547206296d7b..c7730dbb9ddb 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -10110,13 +10110,12 @@ static void alc882_auto_set_output_and_unmute(struct hda_codec *codec,
10110 int idx; 10110 int idx;
10111 10111
10112 alc_set_pin_output(codec, nid, pin_type); 10112 alc_set_pin_output(codec, nid, pin_type);
10113 if (dac_idx >= spec->multiout.num_dacs)
10114 return;
10113 if (spec->multiout.dac_nids[dac_idx] == 0x25) 10115 if (spec->multiout.dac_nids[dac_idx] == 0x25)
10114 idx = 4; 10116 idx = 4;
10115 else { 10117 else
10116 if (spec->multiout.num_dacs >= dac_idx)
10117 return;
10118 idx = spec->multiout.dac_nids[dac_idx] - 2; 10118 idx = spec->multiout.dac_nids[dac_idx] - 2;
10119 }
10120 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CONNECT_SEL, idx); 10119 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CONNECT_SEL, idx);
10121 10120
10122} 10121}