aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-04-05 17:25:13 -0400
committerTakashi Iwai <tiwai@suse.de>2010-04-05 17:36:16 -0400
commitf9700d5a4575e7fb343df10a1d29d425e4b81082 (patch)
tree3a5f062f63a45dbf7da8deb53304e360ae24b905 /sound
parentd12841827a6de120199609dadb6ff4ec99bd90ea (diff)
ALSA: hda - Fix a wrong array range check in patch_realtek.c
The commit 6a4f2ccb467e00281470cde2dee08fe5ecde62d1 introduced a wrong comparision for the array range check, which effectively skips the whole initialization of DAC connections. Fixed now. Reference: bko#15689 https://bugzilla.kernel.org/show_bug.cgi?id=15689 Reported-by: Adrian Ulrich <kernel@blinkenlights.ch> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-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}