--------------------- PatchSet 3119 Date: 2005/04/13 14:37:50 Author: tiwai Branch: HEAD Tag: (none) Log: Summary: hda: fix vref cap and ctl values Fix some vref defines so they are valid for the different bits in the pin cap and pin control registers. Please apply. Signed-off-by: Matt Members: pci/hda/hda_codec.h:1.4->1.5 pci/hda/hda_generic.c:1.3->1.4 Index: /sound/pci/hda/hda_codec.h diff -u /sound/pci/hda/hda_codec.h.old /sound/pci/hda/hda_codec.h --- /sound/pci/hda/hda_codec.h.old Tue Feb 22 09:17:58 2005 +++ /sound/pci/hda/hda_codec.h Wed Apr 13 06:37:50 2005 @@ -176,15 +176,21 @@ #define AC_PINCAP_OUT (1<<4) /* output capable */ #define AC_PINCAP_IN (1<<5) /* input capable */ #define AC_PINCAP_BALANCE (1<<6) /* balanced I/O capable */ -#define AC_PINCAP_VREF (7<<8) +#define AC_PINCAP_VREF (0x37<<8) #define AC_PINCAP_VREF_SHIFT 8 #define AC_PINCAP_EAPD (1<<16) /* EAPD capable */ -/* Vref status (used in pin cap and pin ctl) */ -#define AC_PIN_VREF_HIZ (1<<0) /* Hi-Z */ -#define AC_PIN_VREF_50 (1<<1) /* 50% */ -#define AC_PIN_VREF_GRD (1<<2) /* ground */ -#define AC_PIN_VREF_80 (1<<4) /* 80% */ -#define AC_PIN_VREF_100 (1<<5) /* 100% */ +/* Vref status (used in pin cap) */ +#define AC_PINCAP_VREF_HIZ (1<<0) /* Hi-Z */ +#define AC_PINCAP_VREF_50 (1<<1) /* 50% */ +#define AC_PINCAP_VREF_GRD (1<<2) /* ground */ +#define AC_PINCAP_VREF_80 (1<<4) /* 80% */ +#define AC_PINCAP_VREF_100 (1<<5) /* 100% */ +/* Vref setting (used in pin ctl) */ +#define AC_PINCTL_VREF_HIZ (0) /* Hi-Z */ +#define AC_PINCTL_VREF_50 (1) /* 50% */ +#define AC_PINCTL_VREF_GRD (2) /* ground */ +#define AC_PINCTL_VREF_80 (4) /* 80% */ +#define AC_PINCTL_VREF_100 (5) /* 100% */ /* Amplifier capabilities */ Index: /sound/pci/hda/hda_generic.c diff -u /sound/pci/hda/hda_generic.c.old /sound/pci/hda/hda_generic.c --- /sound/pci/hda/hda_generic.c.old Tue Mar 22 07:34:38 2005 +++ /sound/pci/hda/hda_generic.c Wed Apr 13 06:37:50 2005 @@ -426,7 +426,7 @@ return "Line"; case AC_JACK_CD: if (pinctl) - *pinctl |= AC_PIN_VREF_GRD; + *pinctl |= AC_PINCTL_VREF_GRD; return "CD"; case AC_JACK_AUX: if ((location & 0x0f) == AC_JACK_LOC_FRONT)