diff options
author | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2007-07-06 04:40:21 +0000 |
---|---|---|
committer | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2007-07-06 04:40:21 +0000 |
commit | d8944a7749386ed10413d532a977fcefea4f9a01 (patch) | |
tree | 302a3bb9f2703e27e9b2f4d60128724819dbd464 /sys/dev/audio.c | |
parent | a7f27ca34d81c30f487b00145683c5601018bf96 (diff) |
- enable full-duplex mode by default if a device is opened
read-write and it supports full-duplex operation.
- update documentation to match this behaviour.
see http://marc.info/?l=openbsd-tech&m=118310788926431&w=2 for
more background on this change
"patches look correct to me" marc@
Diffstat (limited to 'sys/dev/audio.c')
-rw-r--r-- | sys/dev/audio.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/audio.c b/sys/dev/audio.c index c924fbf6114..cc814273ea8 100644 --- a/sys/dev/audio.c +++ b/sys/dev/audio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: audio.c,v 1.59 2007/07/06 04:25:28 jakemsr Exp $ */ +/* $OpenBSD: audio.c,v 1.60 2007/07/06 04:40:20 jakemsr Exp $ */ /* $NetBSD: audio.c,v 1.119 1999/11/09 16:50:47 augustss Exp $ */ /* @@ -999,11 +999,9 @@ audio_open(dev, sc, flags, ifmt, p) sc->sc_eof = 0; sc->sc_playdrop = 0; - sc->sc_full_duplex = 0; -/* doesn't always work right on SB. + sc->sc_full_duplex = (flags & (FWRITE|FREAD)) == (FWRITE|FREAD) && (sc->hw_if->get_props(sc->hw_hdl) & AUDIO_PROP_FULLDUPLEX); -*/ mode = 0; if (flags & FREAD) { |