summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/azalia.c4
-rw-r--r--sys/dev/pci/azalia.h20
2 files changed, 16 insertions, 8 deletions
diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c
index 8d9e80015f2..35d43fe1d67 100644
--- a/sys/dev/pci/azalia.c
+++ b/sys/dev/pci/azalia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia.c,v 1.84 2008/12/21 21:25:01 jakemsr Exp $ */
+/* $OpenBSD: azalia.c,v 1.85 2008/12/22 00:03:08 jakemsr Exp $ */
/* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */
/*-
@@ -331,7 +331,7 @@ static const char *pin_devices[16] = {
AudioNline, AudioNspeaker, AudioNheadphone, AudioNcd,
"SPDIF-out", "digital-out", "modem-line", "modem-handset",
AudioNline, AudioNaux, AudioNmicrophone, "telephony",
- "SPDIF-in", "digital-in", "dev0e", "other"};
+ "SPDIF-in", "digital-in", "beep", "other"};
static const char *wtypes[16] = {
"dac", "adc", "mix", "sel", "pin", "pow", "volume",
"beep", "wid08", "wid09", "wid0a", "wid0b", "wid0c",
diff --git a/sys/dev/pci/azalia.h b/sys/dev/pci/azalia.h
index 13c69024aa0..2d77dae781d 100644
--- a/sys/dev/pci/azalia.h
+++ b/sys/dev/pci/azalia.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia.h,v 1.27 2008/12/21 20:21:24 jakemsr Exp $ */
+/* $OpenBSD: azalia.h,v 1.28 2008/12/22 00:03:08 jakemsr Exp $ */
/* $NetBSD: azalia.h,v 1.6 2006/01/16 14:15:26 kent Exp $ */
/*-
@@ -416,8 +416,10 @@
#define CORB_CD_PINK 0x9
#define CORB_CD_WHITE 0xe
#define CORB_CD_COLOR_OTHER 0xf
-#define CORB_CD_CONNECTION_MASK 0x000f0000
-#define CORB_CD_CONNECTION(x) ((x >> 16) & 0xf)
+#define CORB_CD_CONNECTION_OFFSET 16
+#define CORB_CD_CONNECTION_BITS 0xf
+#define CORB_CD_CONNECTION_MASK (CORB_CD_CONNECTION_BITS << CORB_CD_CONNECTION_OFFSET)
+#define CORB_CD_CONNECTION(x) ((x >> CORB_CD_CONNECTION_OFFSET) & CORB_CD_CONNECTION_BITS)
#define CORB_CD_CONN_UNKNOWN 0x0
#define CORB_CD_18 0x1
#define CORB_CD_14 0x2
@@ -431,7 +433,10 @@
#define CORB_CD_RJ11 0xa
#define CORB_CD_CONN_COMB 0xb
#define CORB_CD_CONN_OTHER 0xf
-#define CORB_CD_DEVICE(x) ((x >> 20) & 0xf)
+#define CORB_CD_DEVICE_OFFSET 20
+#define CORB_CD_DEVICE_BITS 0xf
+#define CORB_CD_DEVICE_MASK (CORB_CD_DEVICE_BITS << CORB_CD_DEVICE_OFFSET)
+#define CORB_CD_DEVICE(x) ((x >> CORB_CD_DEVICE_OFFSET) & CORB_CD_DEVICE_BITS)
#define CORB_CD_LINEOUT 0x0
#define CORB_CD_SPEAKER 0x1
#define CORB_CD_HEADPHONE 0x2
@@ -446,6 +451,7 @@
#define CORB_CD_TELEPHONY 0xb
#define CORB_CD_SPDIFIN 0xc
#define CORB_CD_DIGITALIN 0xd
+#define CORB_CD_BEEP 0xe
#define CORB_CD_DEVICE_OTHER 0xf
#define CORB_CD_LOCATION_MASK 0x3f000000
#define CORB_CD_LOC_GEO(x) ((x >> 24) & 0xf)
@@ -464,8 +470,10 @@
#define CORB_CD_INTERNAL 0x1
#define CORB_CD_SEPARATE 0x2
#define CORB_CD_LOC_OTHER 0x3
-#define CORB_CD_PORT_MASK 0xc0000000
-#define CORB_CD_PORT(x) ((x >> 30) & 0x3)
+#define CORB_CD_PORT_OFFSET 30
+#define CORB_CD_PORT_BITS 0x3
+#define CORB_CD_PORT_MASK (CORB_CD_PORT_BITS << CORB_CD_PORT_OFFSET)
+#define CORB_CD_PORT(x) ((x >> CORB_CD_PORT_OFFSET) & CORB_CD_PORT_BITS)
#define CORB_CD_JACK 0x0
#define CORB_CD_NONE 0x1
#define CORB_CD_FIXED 0x2