ALSA: HDA: Fix mic initialization in VIA auto parser
authorDavid Henningsson <david.henningsson@canonical.com>
Mon, 21 Feb 2011 09:23:18 +0000 (10:23 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 22 Feb 2011 13:02:09 +0000 (14:02 +0100)
This typo caused some microphone inputs not to be correctly
initialized on VIA codecs.

Reported-By: Mark Goldstein <goldstein.mark@gmail.com>
Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_via.c

index a76c326..63b0054 100644 (file)
@@ -567,7 +567,7 @@ static void via_auto_init_analog_input(struct hda_codec *codec)
                hda_nid_t nid = cfg->inputs[i].pin;
                if (spec->smart51_enabled && is_smart51_pins(spec, nid))
                        ctl = PIN_OUT;
-               else if (i == AUTO_PIN_MIC)
+               else if (cfg->inputs[i].type == AUTO_PIN_MIC)
                        ctl = PIN_VREF50;
                else
                        ctl = PIN_IN;