summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2009-01-02 20:37:58 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2009-01-02 20:37:58 +0000
commitc4dd4bbc5be11c4a117feb00e408dff90767e512 (patch)
treef27f28292f4ae8201fec43921e349001a4a3568c /sys
parent14f528424baa95c1edc8ccedcd348c62620794e4 (diff)
add macros for setting/getting GPIO polarity instead of using
magic numbers from Alexey Suslikov
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/azalia.h4
-rw-r--r--sys/dev/pci/azalia_codec.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/pci/azalia.h b/sys/dev/pci/azalia.h
index f61c2ea0499..4b816774fa8 100644
--- a/sys/dev/pci/azalia.h
+++ b/sys/dev/pci/azalia.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia.h,v 1.34 2009/01/02 20:18:18 jakemsr Exp $ */
+/* $OpenBSD: azalia.h,v 1.35 2009/01/02 20:37:57 jakemsr Exp $ */
/* $NetBSD: azalia.h,v 1.6 2006/01/16 14:15:26 kent Exp $ */
/*-
@@ -380,6 +380,8 @@
#define CORB_SET_GPIO_UNSOLICITED_ENABLE_MASK 0x719
#define CORB_GET_GPIO_STICKY_MASK 0xf1a
#define CORB_SET_GPIO_STICKY_MASK 0x71a
+#define CORB_GET_GPIO_POLARITY 0xfe7
+#define CORB_SET_GPIO_POLARITY 0x7e7
#define CORB_GET_BEEP_GENERATION 0xf0a
#define CORB_SET_BEEP_GENERATION 0x70a
#define CORB_GET_VOLUME_KNOB 0xf0f
diff --git a/sys/dev/pci/azalia_codec.c b/sys/dev/pci/azalia_codec.c
index 8b38eb1c7cf..56227286b0e 100644
--- a/sys/dev/pci/azalia_codec.c
+++ b/sys/dev/pci/azalia_codec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia_codec.c,v 1.104 2009/01/02 20:35:05 jakemsr Exp $ */
+/* $OpenBSD: azalia_codec.c,v 1.105 2009/01/02 20:37:57 jakemsr Exp $ */
/* $NetBSD: azalia_codec.c,v 1.8 2006/05/10 11:17:27 kent Exp $ */
/*-
@@ -2052,7 +2052,7 @@ int
azalia_codec_gpio_quirks(codec_t *this)
{
if (this->vid == SIGMATEL_STAC9221 && this->subid == STAC9221_APPLE_ID) {
- this->comresp(this, this->audiofunc, 0x7e7, 0, NULL);
+ this->comresp(this, this->audiofunc, CORB_SET_GPIO_POLARITY, 0, NULL);
azalia_gpio_unmute(this, 0);
azalia_gpio_unmute(this, 1);
}