aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-03-25 15:06:58 +0100
committerTakashi Iwai <tiwai@suse.de>2010-03-25 15:06:58 +0100
commit05471e4c446ca42d474b89df55bd48b0ce802717 (patch)
tree186b3db5214b87a08c02e7b5c42b4d68537d203e /sound/pci/hda/patch_realtek.c
parent7fb5622326bf98437e629e94f8710eb12a90b30d (diff)
parent6a4f2ccb467e00281470cde2dee08fe5ecde62d1 (diff)
Merge branch 'fix/hda' into topic/hda
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r--sound/pci/hda/patch_realtek.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 3dc2be8f3ca..22b7c944f56 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2601,8 +2601,6 @@ static int alc_build_controls(struct hda_codec *codec)
return err;
}
- alc_free_kctls(codec); /* no longer needed */
-
/* assign Capture Source enums to NID */
kctl = snd_hda_find_mixer_ctl(codec, "Capture Source");
if (!kctl)
@@ -2671,6 +2669,9 @@ static int alc_build_controls(struct hda_codec *codec)
}
}
}
+
+ alc_free_kctls(codec); /* no longer needed */
+
return 0;
}
@@ -10122,8 +10123,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);
}