Commit f9700d5a authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda - Fix a wrong array range check in patch_realtek.c

The commit 6a4f2ccb 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=15689Reported-by: default avatarAdrian Ulrich <kernel@blinkenlights.ch>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent d1284182
......@@ -10110,13 +10110,12 @@ static void alc882_auto_set_output_and_unmute(struct hda_codec *codec,
int idx;
alc_set_pin_output(codec, nid, pin_type);
if (dac_idx >= spec->multiout.num_dacs)
return;
if (spec->multiout.dac_nids[dac_idx] == 0x25)
idx = 4;
else {
if (spec->multiout.num_dacs >= dac_idx)
return;
else
idx = spec->multiout.dac_nids[dac_idx] - 2;
}
snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CONNECT_SEL, idx);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment