aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorMatt <matt@embeddedalley.com>2005-04-13 08:37:50 -0400
committerJaroslav Kysela <perex@suse.cz>2005-05-29 04:00:51 -0400
commit1a12de1edf234b54ce94971d5604f85809c391b9 (patch)
tree099cd910f5a313f17838e96740b50493ef16877c /sound/pci/hda
parenteb8caf30f4c059ddfdfa32b6034549622953db6f (diff)
[ALSA] hda: fix vref cap and ctl values
HDA Codec driver,HDA generic driver 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 <matt@embeddedalley.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/hda_codec.h20
-rw-r--r--sound/pci/hda/hda_generic.c2
2 files changed, 14 insertions, 8 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index c9e9dc9c7c98..042bcfc6dbbd 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -176,15 +176,21 @@ enum {
176#define AC_PINCAP_OUT (1<<4) /* output capable */ 176#define AC_PINCAP_OUT (1<<4) /* output capable */
177#define AC_PINCAP_IN (1<<5) /* input capable */ 177#define AC_PINCAP_IN (1<<5) /* input capable */
178#define AC_PINCAP_BALANCE (1<<6) /* balanced I/O capable */ 178#define AC_PINCAP_BALANCE (1<<6) /* balanced I/O capable */
179#define AC_PINCAP_VREF (7<<8) 179#define AC_PINCAP_VREF (0x37<<8)
180#define AC_PINCAP_VREF_SHIFT 8 180#define AC_PINCAP_VREF_SHIFT 8
181#define AC_PINCAP_EAPD (1<<16) /* EAPD capable */ 181#define AC_PINCAP_EAPD (1<<16) /* EAPD capable */
182/* Vref status (used in pin cap and pin ctl) */ 182/* Vref status (used in pin cap) */
183#define AC_PIN_VREF_HIZ (1<<0) /* Hi-Z */ 183#define AC_PINCAP_VREF_HIZ (1<<0) /* Hi-Z */
184#define AC_PIN_VREF_50 (1<<1) /* 50% */ 184#define AC_PINCAP_VREF_50 (1<<1) /* 50% */
185#define AC_PIN_VREF_GRD (1<<2) /* ground */ 185#define AC_PINCAP_VREF_GRD (1<<2) /* ground */
186#define AC_PIN_VREF_80 (1<<4) /* 80% */ 186#define AC_PINCAP_VREF_80 (1<<4) /* 80% */
187#define AC_PIN_VREF_100 (1<<5) /* 100% */ 187#define AC_PINCAP_VREF_100 (1<<5) /* 100% */
188/* Vref setting (used in pin ctl) */
189#define AC_PINCTL_VREF_HIZ (0) /* Hi-Z */
190#define AC_PINCTL_VREF_50 (1) /* 50% */
191#define AC_PINCTL_VREF_GRD (2) /* ground */
192#define AC_PINCTL_VREF_80 (4) /* 80% */
193#define AC_PINCTL_VREF_100 (5) /* 100% */
188 194
189 195
190/* Amplifier capabilities */ 196/* Amplifier capabilities */
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index 69f7b6c4cf83..c233e7f1a74a 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -426,7 +426,7 @@ static const char *get_input_type(struct hda_gnode *node, unsigned int *pinctl)
426 return "Line"; 426 return "Line";
427 case AC_JACK_CD: 427 case AC_JACK_CD:
428 if (pinctl) 428 if (pinctl)
429 *pinctl |= AC_PIN_VREF_GRD; 429 *pinctl |= AC_PINCTL_VREF_GRD;
430 return "CD"; 430 return "CD";
431 case AC_JACK_AUX: 431 case AC_JACK_AUX:
432 if ((location & 0x0f) == AC_JACK_LOC_FRONT) 432 if ((location & 0x0f) == AC_JACK_LOC_FRONT)