summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2008-12-31 11:25:37 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2008-12-31 11:25:37 +0000
commited229a479cb9224b87e33f7b1c11a3282a66237b (patch)
treed7175be24a25cc6d6fb5d7ceb43e241fef7f7960 /sys/dev/pci
parent471d2d9fefb4cff6c695acc6c610fa66593d9bc3 (diff)
a fixed mic isn't very useful as an output device, and a fixed
speaker isn't very useful as an input device
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/azalia.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c
index 8a6d0d1f2f8..194fd903e8e 100644
--- a/sys/dev/pci/azalia.c
+++ b/sys/dev/pci/azalia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia.c,v 1.99 2008/12/31 11:23:55 jakemsr Exp $ */
+/* $OpenBSD: azalia.c,v 1.100 2008/12/31 11:25:36 jakemsr Exp $ */
/* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */
/*-
@@ -1972,6 +1972,14 @@ azalia_widget_init_pin(widget_t *this, const codec_t *codec)
return err;
this->d.pin.cap = result;
+ if (this->d.pin.device == CORB_CD_MICIN &&
+ CORB_CD_PORT(this->d.pin.config) == CORB_CD_FIXED)
+ this->d.pin.cap &= ~(COP_PINCAP_OUTPUT);
+
+ if (this->d.pin.device == CORB_CD_SPEAKER &&
+ CORB_CD_PORT(this->d.pin.config) == CORB_CD_FIXED)
+ this->d.pin.cap &= ~(COP_PINCAP_INPUT);
+
switch (this->d.pin.device) {
case CORB_CD_LINEOUT:
case CORB_CD_SPEAKER: