summaryrefslogtreecommitdiff
path: root/sys/dev/audio.c
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2007-07-06 04:12:51 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2007-07-06 04:12:51 +0000
commitd0405435b05a8691731e8a22aac30630fe9072f7 (patch)
tree43e13af46c468fd00049adf65e123b1e140305df /sys/dev/audio.c
parent067c425101eda3d6b956f9d0eef6602958d4cfda (diff)
be sure to respect the pause attribute
originally from Alexandre Ratchov "patches look correct to me" marco@
Diffstat (limited to 'sys/dev/audio.c')
-rw-r--r--sys/dev/audio.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/audio.c b/sys/dev/audio.c
index e200fbfe7f0..263befa1533 100644
--- a/sys/dev/audio.c
+++ b/sys/dev/audio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: audio.c,v 1.57 2007/07/06 04:10:34 jakemsr Exp $ */
+/* $OpenBSD: audio.c,v 1.58 2007/07/06 04:12:50 jakemsr Exp $ */
/* $NetBSD: audio.c,v 1.119 1999/11/09 16:50:47 augustss Exp $ */
/*
@@ -1284,7 +1284,7 @@ audio_read(dev, uio, ioflag)
while (uio->uio_resid > 0 && !error) {
s = splaudio();
while (cb->used <= 0) {
- if (!sc->sc_rbus) {
+ if (!sc->sc_rbus && !sc->sc_rr.pause) {
error = audiostartr(sc);
if (error) {
splx(s);
@@ -1893,12 +1893,12 @@ audio_mmap(dev, off, prot)
if (cb == &sc->sc_pr) {
audio_fill_silence(&sc->sc_pparams, cb->start, cb->bufsize);
s = splaudio();
- if (!sc->sc_pbus)
+ if (!sc->sc_pbus && !sc->sc_pr.pause)
(void)audiostartp(sc);
splx(s);
} else {
s = splaudio();
- if (!sc->sc_rbus)
+ if (!sc->sc_rbus && !sc->sc_rr.pause)
(void)audiostartr(sc);
splx(s);
}
@@ -2797,11 +2797,11 @@ audiosetinfo(sc, ai)
sc->sc_rr.blksize != oldrblksize)
audio_calcwater(sc);
if ((sc->sc_mode & AUMODE_PLAY) &&
- pbus && !sc->sc_pbus)
+ pbus && !sc->sc_pbus && !sc->sc_pr.pause)
error = audiostartp(sc);
if (!error &&
(sc->sc_mode & AUMODE_RECORD) &&
- rbus && !sc->sc_rbus)
+ rbus && !sc->sc_rbus && !sc->sc_rr.pause)
error = audiostartr(sc);
err:
splx(s);