diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-04-07 06:27:32 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-04-07 06:49:05 -0400 |
commit | 0e53f3440925aa36fe3bd2307e5fa0238a66f8bf (patch) | |
tree | f4d72a5c8574b4d0cb047337f398fe2a59fa9977 /sound | |
parent | 5402e4cb80dc2cb407ca07e31cb7668ba45e5320 (diff) |
ALSA: hda - Unmute mixer dynamically in alc662 auto-parser
Instead of static init array, better to determine the connection and
the mute status of the pin/mixer/DAC route dynamically. This fixes the
uninitialized mixer 0x0f on ALC892.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 8406248236fe..e3756a7ebee2 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -19319,14 +19319,21 @@ static void alc662_auto_set_output_and_unmute(struct hda_codec *codec, | |||
19319 | hda_nid_t srcs[HDA_MAX_CONNECTIONS]; | 19319 | hda_nid_t srcs[HDA_MAX_CONNECTIONS]; |
19320 | 19320 | ||
19321 | alc_set_pin_output(codec, nid, pin_type); | 19321 | alc_set_pin_output(codec, nid, pin_type); |
19322 | /* need the manual connection? */ | ||
19323 | num = snd_hda_get_connections(codec, nid, srcs, ARRAY_SIZE(srcs)); | 19322 | num = snd_hda_get_connections(codec, nid, srcs, ARRAY_SIZE(srcs)); |
19324 | if (num <= 1) | ||
19325 | return; | ||
19326 | for (i = 0; i < num; i++) { | 19323 | for (i = 0; i < num; i++) { |
19327 | if (alc662_mix_to_dac(codec, srcs[i]) != dac) | 19324 | if (alc662_mix_to_dac(codec, srcs[i]) != dac) |
19328 | continue; | 19325 | continue; |
19329 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CONNECT_SEL, i); | 19326 | /* need the manual connection? */ |
19327 | if (num > 1) | ||
19328 | snd_hda_codec_write(codec, nid, 0, | ||
19329 | AC_VERB_SET_CONNECT_SEL, i); | ||
19330 | /* unmute mixer widget inputs */ | ||
19331 | snd_hda_codec_write(codec, srcs[i], 0, | ||
19332 | AC_VERB_SET_AMP_GAIN_MUTE, | ||
19333 | AMP_IN_UNMUTE(0)); | ||
19334 | snd_hda_codec_write(codec, srcs[i], 0, | ||
19335 | AC_VERB_SET_AMP_GAIN_MUTE, | ||
19336 | AMP_IN_UNMUTE(1)); | ||
19330 | return; | 19337 | return; |
19331 | } | 19338 | } |
19332 | } | 19339 | } |