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
This commit is contained in:
Andriy Gapon 2011-05-03 15:50:22 +00:00
parent b3fa6d2cf1
commit e3888a9820

View File

@ -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