summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorcg <cg@FreeBSD.org>2000-04-05 05:54:02 +0000
committercg <cg@FreeBSD.org>2000-04-05 05:54:02 +0000
commitce54393508db208f6cc84105810a532f66a0e9bc (patch)
treebe28be682706280bbe8b6fd7facd2d9fa6c54f3f /sys
parentaa7e4f0b1b108e1f4fbeef460453b098113b0ef3 (diff)
downloadFreeBSD-src-ce54393508db208f6cc84105810a532f66a0e9bc.zip
FreeBSD-src-ce54393508db208f6cc84105810a532f66a0e9bc.tar.gz
make poll() dtrt, previously when playing it would trigger if there was less
than 1 byte ready to play instead of room for at least 1 byte to be written. similarly for recording.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/sound/pcm/channel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c
index c95db45..91a5cd6 100644
--- a/sys/dev/sound/pcm/channel.c
+++ b/sys/dev/sound/pcm/channel.c
@@ -120,7 +120,7 @@ chn_polltrigger(pcm_channel *c)
if (c->flags & CHN_F_MAPPED)
trig = ((bs->int_count > bs->prev_int_count) || bs->first_poll);
- else trig = (((c->direction == PCMDIR_PLAY)? bs->rl : bs->fl) < lim);
+ else trig = (((c->direction == PCMDIR_PLAY)? bs->fl : bs->rl) > lim);
return trig;
}
@@ -487,7 +487,7 @@ chn_write(pcm_channel *c, struct uio *buf)
/* Wait for new free space to write new pcm samples. */
splx(s);
- timeout = (buf->uio_resid >= b->dl)? hz / 20 : 1;
+ timeout = 1; /*(buf->uio_resid >= b->dl)? hz / 20 : 1; */
ret = tsleep(b, PRIBIO | PCATCH, "pcmwr", timeout);
s = spltty();
/* if (ret == EINTR) chn_abort(c); */
OpenPOWER on IntegriCloud