summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2009-01-11 11:32:49 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2009-01-11 11:32:49 +0000
commit6b22b3d99c57e49faf672813f530cea9aee4aa32 (patch)
tree3a05633229395d11dd069ff68a2060c5c244154b
parent37a9506efc2905882c0557b16b6a5e3c54a2bb57 (diff)
32-bit mode for s/pdif transmitters/receivers does not really
allow transmission/reception of 32-bit audio, so don't allow it. pointed out by naddy@, thanks.
-rw-r--r--sys/dev/pci/azalia.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c
index 04436936458..1877b222d0f 100644
--- a/sys/dev/pci/azalia.c
+++ b/sys/dev/pci/azalia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia.c,v 1.112 2009/01/05 09:40:26 jakemsr Exp $ */
+/* $OpenBSD: azalia.c,v 1.113 2009/01/11 11:32:48 jakemsr Exp $ */
/* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */
/*-
@@ -1666,6 +1666,9 @@ azalia_codec_construct_format(codec_t *this, int newdac, int newadc)
for (c = 0; c < group->nconv; c++) {
chan = 0;
bits_rates = ~0;
+ if (this->w[group->conv[0]].widgetcap &
+ COP_AWCAP_DIGITAL)
+ bits_rates &= ~(COP_PCM_B32);
for (i = 0; i <= c; i++) {
nid = group->conv[i];
chan += WIDGET_CHANNELS(&this->w[nid]);
@@ -1682,6 +1685,9 @@ azalia_codec_construct_format(codec_t *this, int newdac, int newadc)
for (c = 0; c < group->nconv; c++) {
chan = 0;
bits_rates = ~0;
+ if (this->w[group->conv[0]].widgetcap &
+ COP_AWCAP_DIGITAL)
+ bits_rates &= ~(COP_PCM_B32);
for (i = 0; i <= c; i++) {
nid = group->conv[i];
chan += WIDGET_CHANNELS(&this->w[nid]);