diff options
| author | Ariff Abdullah <ariff@FreeBSD.org> | 2006-01-01 18:16:13 +0000 |
|---|---|---|
| committer | Ariff Abdullah <ariff@FreeBSD.org> | 2006-01-01 18:16:13 +0000 |
| commit | cc6882e1a40dc4436f3d76c18477ba30afbb5bf7 (patch) | |
| tree | 0a45cdf1e04e0ad3052d1b4e874326c31377a50e /sys | |
| parent | 7d1a55fc97a9a55a48e2ac0605e2ccfc2e7ebb4a (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/dev/sound/pcm/channel.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 32cdf5131a01..802a50200c6a 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -361,6 +361,7 @@ chn_write(struct pcm_channel *c, struct uio *buf) return ret; } +#if 0 static int chn_rddump(struct pcm_channel *c, unsigned int cnt) { @@ -375,6 +376,7 @@ chn_rddump(struct pcm_channel *c, unsigned int cnt) sndbuf_setxrun(b, sndbuf_getxrun(b) + cnt); return sndbuf_dispose(b, NULL, cnt); } +#endif /* * Feed new data from the read buffer. Can be called in the bottom half. @@ -401,13 +403,13 @@ chn_rdfeed(struct pcm_channel *c) } #endif amt = sndbuf_getfree(bs); - if (amt < sndbuf_getready(b)) - c->xruns++; ret = (amt > 0)? sndbuf_feed(b, bs, c, c->feeder, amt) : 0; amt = sndbuf_getready(b); - if (amt > 0) - chn_rddump(c, amt); + if (amt > 0) { + c->xruns++; + sndbuf_dispose(b, NULL, amt); + } chn_wakeup(c); @@ -427,8 +429,8 @@ chn_rdupdate(struct pcm_channel *c) chn_trigger(c, PCMTRIG_EMLDMARD); chn_dmaupdate(c); ret = chn_rdfeed(c); - if (ret) - printf("chn_rdfeed: %d\n", ret); + DEB(if (ret) + printf("chn_rdfeed: %d\n", ret);) } |
