diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-03-25 15:06:58 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-03-25 15:06:58 +0100 |
commit | 05471e4c446ca42d474b89df55bd48b0ce802717 (patch) | |
tree | 186b3db5214b87a08c02e7b5c42b4d68537d203e /sound/pci/hda/patch_realtek.c | |
parent | ALSA: hda - Fix uninitialized variable warning in alc_auto_parse_customize_de... (diff) | |
parent | ALSA: hda - Don't set invalid connection index in Realtek initialiaiton (diff) | |
download | linux-05471e4c446ca42d474b89df55bd48b0ce802717.tar.xz linux-05471e4c446ca42d474b89df55bd48b0ce802717.zip |
Merge branch 'fix/hda' into topic/hda
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 3dc2be8f3ca9..22b7c944f561 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); } |