diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-03-25 10:00:15 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-03-25 10:00:15 -0400 |
commit | 6a4f2ccb467e00281470cde2dee08fe5ecde62d1 (patch) | |
tree | 3c6fcf4ec24a00a8f096fc6a2890e5d388276551 | |
parent | bae84e70d66fe46c12231082cf1c4848ea22f3ef (diff) |
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>
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 053d53d8c8b2..9a23444e9e7a 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, | |||
10043 | alc_set_pin_output(codec, nid, pin_type); | 10043 | alc_set_pin_output(codec, nid, pin_type); |
10044 | if (spec->multiout.dac_nids[dac_idx] == 0x25) | 10044 | if (spec->multiout.dac_nids[dac_idx] == 0x25) |
10045 | idx = 4; | 10045 | idx = 4; |
10046 | else | 10046 | else { |
10047 | if (spec->multiout.num_dacs >= dac_idx) | ||
10048 | return; | ||
10047 | idx = spec->multiout.dac_nids[dac_idx] - 2; | 10049 | idx = spec->multiout.dac_nids[dac_idx] - 2; |
10050 | } | ||
10048 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CONNECT_SEL, idx); | 10051 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CONNECT_SEL, idx); |
10049 | 10052 | ||
10050 | } | 10053 | } |