Skip to content

Commit

Permalink
ALSA: hda - Don't set invalid connection index in Realtek initialiaiton
Browse files Browse the repository at this point in the history
Skip initialization of connections of DAC widgets that aren't used,
which resulted in invalid verb parameters.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Mar 25, 2010
1 parent bae84e7 commit 6a4f2cc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -10043,8 +10043,11 @@ static void alc882_auto_set_output_and_unmute(struct hda_codec *codec,
alc_set_pin_output(codec, nid, pin_type);
if (spec->multiout.dac_nids[dac_idx] == 0x25)
idx = 4;
else
else {
if (spec->multiout.num_dacs >= dac_idx)
return;
idx = spec->multiout.dac_nids[dac_idx] - 2;
}
snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CONNECT_SEL, idx);

}
Expand Down

0 comments on commit 6a4f2cc

Please sign in to comment.