diff options
author | Andriy Gapon <avg@FreeBSD.org> | 2011-05-03 15:50:22 +0000 |
---|---|---|
committer | Andriy Gapon <avg@FreeBSD.org> | 2011-05-03 15:50:22 +0000 |
commit | e3888a982033e5db7f2843654f81bee47641c26e (patch) | |
tree | 0044c0169a6c53b17c89253995d87acd9cfd49e2 | |
parent | b3fa6d2cf1eea1b02acc2bee3b61d71fb9afe5ec (diff) | |
download | src-e3888a982033e5db7f2843654f81bee47641c26e.tar.gz src-e3888a982033e5db7f2843654f81bee47641c26e.zip |
SNDCTL_DSP_GETIPTR: set pointer to sndbuf_getfreeptr()
Rationale:
- unlike current behavior this seems to be compliant with OSS
specification:
http://manuals.opensound.com/developer/SNDCTL_DSP_GETIPTR.html
- this seems to meet expectations of some OSS programs compiled for or
ported from Linux, e.g. ALSA OSS plugin
- this doesn't seem to break any programs as far as current testing
shows
Tested by: nox, hselasky
MFC after: 4 days
Notes
Notes:
svn path=/head/; revision=221388
-rw-r--r-- | sys/dev/sound/pcm/dsp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 19801b2e694c..66d0c8c13ef4 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -1655,7 +1655,7 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, /* XXX abusive DMA update: chn_rdupdate(rdch); */ a->bytes = sndbuf_gettotal(bs); a->blocks = sndbuf_getblocks(bs) - rdch->blocks; - a->ptr = sndbuf_getreadyptr(bs); + a->ptr = sndbuf_getfreeptr(bs); rdch->blocks = sndbuf_getblocks(bs); CHN_UNLOCK(rdch); } else |