aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-07-06 07:10:42 -0400
committerTakashi Iwai <tiwai@suse.de>2011-07-07 03:31:13 -0400
commitcd51155676b1c0f44604e304109cb9739a54ea7e (patch)
tree911db103a7d9b94020482cbedf146d252b29fec9 /sound
parentbb8bf4d40cb67dac12106746067994c38229de69 (diff)
ALSA: hda - Initialize DACs in ALC662 auto-parser mode
The initialization of DACs was missing in ALC662 parser code. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_realtek.c36
1 files changed, 24 insertions, 12 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 3cd21040555a..62853e3bda83 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -18970,26 +18970,38 @@ static void alc662_auto_set_output_and_unmute(struct hda_codec *codec,
18970 hda_nid_t dac) 18970 hda_nid_t dac)
18971{ 18971{
18972 int i, num; 18972 int i, num;
18973 hda_nid_t mix;
18973 hda_nid_t srcs[HDA_MAX_CONNECTIONS]; 18974 hda_nid_t srcs[HDA_MAX_CONNECTIONS];
18974 18975
18975 alc_set_pin_output(codec, nid, pin_type); 18976 alc_set_pin_output(codec, nid, pin_type);
18977 nid = alc_go_down_to_selector(codec, nid);
18976 num = snd_hda_get_connections(codec, nid, srcs, ARRAY_SIZE(srcs)); 18978 num = snd_hda_get_connections(codec, nid, srcs, ARRAY_SIZE(srcs));
18977 for (i = 0; i < num; i++) { 18979 for (i = 0; i < num; i++) {
18978 if (alc_auto_mix_to_dac(codec, srcs[i]) != dac) 18980 if (alc_auto_mix_to_dac(codec, srcs[i]) != dac)
18979 continue; 18981 continue;
18980 /* need the manual connection? */ 18982 mix = srcs[i];
18981 if (num > 1) 18983 break;
18982 snd_hda_codec_write(codec, nid, 0,
18983 AC_VERB_SET_CONNECT_SEL, i);
18984 /* unmute mixer widget inputs */
18985 snd_hda_codec_write(codec, srcs[i], 0,
18986 AC_VERB_SET_AMP_GAIN_MUTE,
18987 AMP_IN_UNMUTE(0));
18988 snd_hda_codec_write(codec, srcs[i], 0,
18989 AC_VERB_SET_AMP_GAIN_MUTE,
18990 AMP_IN_UNMUTE(1));
18991 return;
18992 } 18984 }
18985 if (!mix)
18986 return;
18987
18988 /* need the manual connection? */
18989 if (num > 1)
18990 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CONNECT_SEL, i);
18991 /* unmute mixer widget inputs */
18992 snd_hda_codec_write(codec, mix, 0, AC_VERB_SET_AMP_GAIN_MUTE,
18993 AMP_IN_UNMUTE(0));
18994 snd_hda_codec_write(codec, mix, 0, AC_VERB_SET_AMP_GAIN_MUTE,
18995 AMP_IN_UNMUTE(1));
18996 /* initialize volume */
18997 if (query_amp_caps(codec, dac, HDA_OUTPUT) & AC_AMPCAP_NUM_STEPS)
18998 nid = dac;
18999 else if (query_amp_caps(codec, mix, HDA_OUTPUT) & AC_AMPCAP_NUM_STEPS)
19000 nid = mix;
19001 else
19002 return;
19003 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE,
19004 AMP_OUT_ZERO);
18993} 19005}
18994 19006
18995static void alc662_auto_init_multi_out(struct hda_codec *codec) 19007static void alc662_auto_init_multi_out(struct hda_codec *codec)