summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-03-25 15:00:15 +0100
committerTakashi Iwai <tiwai@suse.de>2010-03-25 15:00:15 +0100
commit6a4f2ccb467e00281470cde2dee08fe5ecde62d1 (patch)
tree3c6fcf4ec24a00a8f096fc6a2890e5d388276551 /sound/pci/hda/patch_realtek.c
parentbae84e70d66fe46c12231082cf1c4848ea22f3ef (diff)
downloadop-kernel-dev-6a4f2ccb467e00281470cde2dee08fe5ecde62d1.zip
op-kernel-dev-6a4f2ccb467e00281470cde2dee08fe5ecde62d1.tar.gz
ALSA: hda - Don't set invalid connection index in Realtek initialiaiton
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>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r--sound/pci/hda/patch_realtek.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 053d53d..9a23444 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -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);
}
OpenPOWER on IntegriCloud