summaryrefslogtreecommitdiff
path: root/sys/dev/usb/uaudio.c
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2009-11-03 08:07:28 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2009-11-03 08:07:28 +0000
commitc91d02ab55d9970f0b33daa0787b834daaf20085 (patch)
tree062ca2a014533200ee67df96af8261a523ba5ffd /sys/dev/usb/uaudio.c
parentda220728dd8ee96ba2497e11d7cdb40077ffab29 (diff)
don't claim to support full-duplex if the device doesn't support both
recording and playback
Diffstat (limited to 'sys/dev/usb/uaudio.c')
-rw-r--r--sys/dev/usb/uaudio.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/usb/uaudio.c b/sys/dev/usb/uaudio.c
index 2b6af9c9974..ee8236c3b2f 100644
--- a/sys/dev/usb/uaudio.c
+++ b/sys/dev/usb/uaudio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uaudio.c,v 1.66 2009/11/03 08:04:38 jakemsr Exp $ */
+/* $OpenBSD: uaudio.c,v 1.67 2009/11/03 08:07:27 jakemsr Exp $ */
/* $NetBSD: uaudio.c,v 1.90 2004/10/29 17:12:53 kent Exp $ */
/*
@@ -2177,8 +2177,15 @@ uaudio_round_blocksize(void *addr, int blk)
int
uaudio_get_props(void *addr)
{
- return (AUDIO_PROP_FULLDUPLEX | AUDIO_PROP_INDEPENDENT);
+ struct uaudio_softc *sc = addr;
+ int props;
+
+ props = AUDIO_PROP_INDEPENDENT;
+ if ((sc->sc_mode & (AUMODE_PLAY | AUMODE_RECORD)) ==
+ (AUMODE_PLAY | AUMODE_RECORD))
+ props |= AUDIO_PROP_FULLDUPLEX;
+ return props;
}
void