summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authoraugustss <augustss@NetBSD.org>1998-12-27 23:25:32 +0000
committeraugustss <augustss@NetBSD.org>1998-12-27 23:25:32 +0000
commit33f1482eceeed6fef2ef96301aee26d135f1575d (patch)
tree19be0fbf29a1575d43e6d9d2d5c70bd7144d080f /sys/dev
parent496387c419a6ac28f91104d6101e40539113081d (diff)
Make sure recording is started before we return EWOULDBLOCK in a read().
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/audio.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/audio.c b/sys/dev/audio.c
index ee4edf36162..0a59390ad7e 100644
--- a/sys/dev/audio.c
+++ b/sys/dev/audio.c
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.109 1998/12/27 22:52:23 augustss Exp $ */
+/* $NetBSD: audio.c,v 1.110 1998/12/27 23:25:32 augustss Exp $ */
/*
* Copyright (c) 1991-1993 Regents of the University of California.
@@ -1058,10 +1058,6 @@ audio_read(dev, uio, ioflag)
while (uio->uio_resid > 0 && !error) {
s = splaudio();
while (cb->used <= 0) {
- if (ioflag & IO_NDELAY) {
- splx(s);
- return (EWOULDBLOCK);
- }
if (!sc->sc_rbus) {
error = audiostartr(sc);
if (error) {
@@ -1069,6 +1065,10 @@ audio_read(dev, uio, ioflag)
return (error);
}
}
+ if (ioflag & IO_NDELAY) {
+ splx(s);
+ return (EWOULDBLOCK);
+ }
DPRINTFN(2, ("audio_read: sleep used=%d\n", cb->used));
error = audio_sleep(&sc->sc_rchan, "aud_rd");
if (error) {