diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-02-13 09:04:06 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-02-13 09:04:06 -0500 |
commit | fc1156c0b0f7ad45ec03d919866349eeca2bf18c (patch) | |
tree | 8125e803f6e9b1e73e48e262d5b7616ac2cb0a56 /sound/pci/hda | |
parent | a1e0c3cf7fb07227fe1f26161d969101dba78287 (diff) |
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: Anisse Astier <anisse@astier.eu>
Cc: <stable@kernel.org> [v3.1+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/patch_via.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 284e311040fe..dff9a00ee8fb 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c | |||
@@ -666,6 +666,9 @@ static void via_auto_init_analog_input(struct hda_codec *codec) | |||
666 | /* init input-src */ | 666 | /* init input-src */ |
667 | for (i = 0; i < spec->num_adc_nids; i++) { | 667 | for (i = 0; i < spec->num_adc_nids; i++) { |
668 | int adc_idx = spec->inputs[spec->cur_mux[i]].adc_idx; | 668 | int adc_idx = spec->inputs[spec->cur_mux[i]].adc_idx; |
669 | /* secondary ADCs must have the unique MUX */ | ||
670 | if (i > 0 && !spec->mux_nids[i]) | ||
671 | break; | ||
669 | if (spec->mux_nids[adc_idx]) { | 672 | if (spec->mux_nids[adc_idx]) { |
670 | int mux_idx = spec->inputs[spec->cur_mux[i]].mux_idx; | 673 | int mux_idx = spec->inputs[spec->cur_mux[i]].mux_idx; |
671 | snd_hda_codec_write(codec, spec->mux_nids[adc_idx], 0, | 674 | snd_hda_codec_write(codec, spec->mux_nids[adc_idx], 0, |