]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ALSA] hda - Fix vref pincap check in alc882 auto-detection
authorKailang Yang <kailang@realtek.com.tw>
Tue, 27 May 2008 10:10:25 +0000 (12:10 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 27 May 2008 13:56:21 +0000 (15:56 +0200)
Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_realtek.c

index c659588e26d3191300eadd4a49cbfe102c313da8..8174050da15fdd11e62a3f3b0f16d5f857474910 100644 (file)
@@ -6357,7 +6357,9 @@ static void alc882_auto_init_analog_input(struct hda_codec *codec)
                        continue;
                vref = PIN_IN;
                if (1 /*i <= AUTO_PIN_FRONT_MIC*/) {
-                       if (snd_hda_param_read(codec, nid, AC_PAR_PIN_CAP) &
+                       unsigned int pincap;
+                       pincap = snd_hda_param_read(codec, nid, AC_PAR_PIN_CAP);
+                       if ((pincap >> AC_PINCAP_VREF_SHIFT) &
                            AC_PINCAP_VREF_80)
                                vref = PIN_VREF80;
                }