svn commit: r221388 - head/sys/dev/sound/pcm

Andriy Gapon avg at FreeBSD.org
Tue May 3 15:50:22 UTC 2011


Author: avg
Date: Tue May  3 15:50:22 2011
New Revision: 221388
URL: http://svn.freebsd.org/changeset/base/221388

Log:
  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

Modified:
  head/sys/dev/sound/pcm/dsp.c

Modified: head/sys/dev/sound/pcm/dsp.c
==============================================================================
--- head/sys/dev/sound/pcm/dsp.c	Tue May  3 15:12:01 2011	(r221387)
+++ head/sys/dev/sound/pcm/dsp.c	Tue May  3 15:50:22 2011	(r221388)
@@ -1655,7 +1655,7 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd
 				/* 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


More information about the svn-src-head mailing list