summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2009-09-12 09:21:29 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2009-09-12 09:21:29 +0000
commit164736bd059d0cbfd8ef6da3b220485deb414db0 (patch)
tree87d3187da0d9c3249b53496f82b1ebf8a67d3d2b /sys/dev/pci
parente5963dfce9d18d7e51a6323e09b205b299300e5e (diff)
there are machines that have more than one fixed speaker. use
the one with the lowest association.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/azalia.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c
index 3fed01eb792..df6bc36d091 100644
--- a/sys/dev/pci/azalia.c
+++ b/sys/dev/pci/azalia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia.c,v 1.151 2009/09/12 09:11:52 jakemsr Exp $ */
+/* $OpenBSD: azalia.c,v 1.152 2009/09/12 09:21:28 jakemsr Exp $ */
/* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */
/*-
@@ -1409,9 +1409,13 @@ azalia_codec_init(codec_t *this)
case CORB_CD_FIXED:
switch (this->w[i].d.pin.device) {
case CORB_CD_SPEAKER:
- this->speaker = i;
- this->spkr_dac =
- azalia_codec_find_defdac(this, i, 0);
+ if ((this->speaker == -1) ||
+ (this->w[i].d.pin.association <
+ this->w[this->speaker].d.pin.association)) {
+ this->speaker = i;
+ this->spkr_dac =
+ azalia_codec_find_defdac(this, i, 0);
+ }
break;
case CORB_CD_MICIN:
this->mic = i;