Commit fc1156c0 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda - Fix initialization of secondary capture source on VT1705

VT1705 codec has two ADCs where the secondary ADC has no MUX but only
a fixed connection to the mic pin.  This confused the driver and it
tries always overriding the input-source selection by assumption of
the existing MUX for the secondary ADC, resulted in resetting the
input-source at each time PM (including power-saving) occurs.

The fix is simply to check the existence of MUX for secondary ADCs in
the initialization code.
Tested-by: default avatarAnisse Astier <anisse@astier.eu>
Cc: <stable@kernel.org> [v3.1+]
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent a1e0c3cf
...@@ -666,6 +666,9 @@ static void via_auto_init_analog_input(struct hda_codec *codec) ...@@ -666,6 +666,9 @@ static void via_auto_init_analog_input(struct hda_codec *codec)
/* init input-src */ /* init input-src */
for (i = 0; i < spec->num_adc_nids; i++) { for (i = 0; i < spec->num_adc_nids; i++) {
int adc_idx = spec->inputs[spec->cur_mux[i]].adc_idx; int adc_idx = spec->inputs[spec->cur_mux[i]].adc_idx;
/* secondary ADCs must have the unique MUX */
if (i > 0 && !spec->mux_nids[i])
break;
if (spec->mux_nids[adc_idx]) { if (spec->mux_nids[adc_idx]) {
int mux_idx = spec->inputs[spec->cur_mux[i]].mux_idx; int mux_idx = spec->inputs[spec->cur_mux[i]].mux_idx;
snd_hda_codec_write(codec, spec->mux_nids[adc_idx], 0, snd_hda_codec_write(codec, spec->mux_nids[adc_idx], 0,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment