summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorariff <ariff@FreeBSD.org>2005-12-30 07:33:28 +0000
committerariff <ariff@FreeBSD.org>2005-12-30 07:33:28 +0000
commitb5131ef2293e511aed3e8c55a5e9b644f19630a0 (patch)
treeecf93fe2e9f17e49a39119597b39726efd21082d /sys
parent904d3f4de5eabd5a7ecb1f7fdc712b4ad55dec35 (diff)
downloadFreeBSD-src-b5131ef2293e511aed3e8c55a5e9b644f19630a0.zip
FreeBSD-src-b5131ef2293e511aed3e8c55a5e9b644f19630a0.tar.gz
Disable frantic DMA update within few SNDCTL_DSP_* ioctl.
This should reduce huge playback / recording latency for applications that try to act smarter and manage their own buffering (XMMS, Skype, etc.). Note to Skype + via8xxx users: Remove previous hackish "hint.pcm.<unit>.via_dxs_disabled" from kernel hint and see whether this changes cure all those annoying sound issues.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/sound/pcm/dsp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c
index 1bedd06..27fed2e 100644
--- a/sys/dev/sound/pcm/dsp.c
+++ b/sys/dev/sound/pcm/dsp.c
@@ -879,7 +879,7 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread *
struct snd_dbuf *bs = wrch->bufsoft;
CHN_LOCK(wrch);
- chn_wrupdate(wrch);
+ /* XXX abusive DMA update: chn_wrupdate(wrch); */
a->bytes = sndbuf_getfree(bs);
a->fragments = a->bytes / sndbuf_getblksz(bs);
a->fragstotal = sndbuf_getblkcnt(bs);
@@ -896,7 +896,7 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread *
struct snd_dbuf *bs = rdch->bufsoft;
CHN_LOCK(rdch);
- chn_rdupdate(rdch);
+ /* XXX abusive DMA update: chn_rdupdate(rdch); */
a->bytes = sndbuf_gettotal(bs);
a->blocks = sndbuf_getblocks(bs) - rdch->blocks;
a->ptr = sndbuf_getreadyptr(bs);
@@ -914,7 +914,7 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread *
struct snd_dbuf *bs = wrch->bufsoft;
CHN_LOCK(wrch);
- chn_wrupdate(wrch);
+ /* XXX abusive DMA update: chn_wrupdate(wrch); */
a->bytes = sndbuf_gettotal(bs);
a->blocks = sndbuf_getblocks(bs) - wrch->blocks;
a->ptr = sndbuf_getreadyptr(bs);
@@ -990,7 +990,7 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread *
struct snd_dbuf *bs = wrch->bufsoft;
CHN_LOCK(wrch);
- chn_wrupdate(wrch);
+ /* XXX abusive DMA update: chn_wrupdate(wrch); */
*arg_i = sndbuf_getready(b) + sndbuf_getready(bs);
CHN_UNLOCK(wrch);
} else
OpenPOWER on IntegriCloud