summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound
diff options
context:
space:
mode:
authorariff <ariff@FreeBSD.org>2006-12-07 07:48:58 +0000
committerariff <ariff@FreeBSD.org>2006-12-07 07:48:58 +0000
commitd770315d70f16cc06db5f53ed1d810cca8b49982 (patch)
treec99cd29d9fc61caf3d966d433c2a6c13ff4b2064 /sys/dev/sound
parent87429f2deaa5e5f8c6a8f6e0518580a5b5f8b50d (diff)
downloadFreeBSD-src-d770315d70f16cc06db5f53ed1d810cca8b49982.zip
FreeBSD-src-d770315d70f16cc06db5f53ed1d810cca8b49982.tar.gz
Don't try to workaround broken apps (if any). If this still the case,
lets fix the broken apps instead.
Diffstat (limited to 'sys/dev/sound')
-rw-r--r--sys/dev/sound/pcm/channel.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c
index d88f0e2..3fd8a3e 100644
--- a/sys/dev/sound/pcm/channel.c
+++ b/sys/dev/sound/pcm/channel.c
@@ -353,27 +353,12 @@ chn_wrintr(struct pcm_channel *c)
int
chn_write(struct pcm_channel *c, struct uio *buf)
{
- int ret, newsize, count, sz;
+ int ret, count, sz;
struct snd_dbuf *bs = c->bufsoft;
void *off;
int t, x, togo, p;
CHN_LOCKASSERT(c);
- /*
- * XXX Certain applications attempt to write larger size
- * of pcm data than c->blocksize2nd without blocking,
- * resulting partial write. Expand the block size so that
- * the write operation avoids blocking.
- */
- if ((c->flags & CHN_F_NBIO) && buf->uio_resid > sndbuf_getblksz(bs)) {
- DEB(device_printf(c->dev, "broken app, nbio and tried to write %d bytes with fragsz %d\n",
- buf->uio_resid, sndbuf_getblksz(bs)));
- newsize = 16;
- while (newsize < min(buf->uio_resid, CHN_2NDBUFMAXSIZE / 2))
- newsize <<= 1;
- chn_setblocksize(c, sndbuf_getblkcnt(bs), newsize);
- DEB(device_printf(c->dev, "frags reset to %d x %d\n", sndbuf_getblkcnt(bs), sndbuf_getblksz(bs)));
- }
ret = 0;
count = hz;
OpenPOWER on IntegriCloud