From owner-svn-src-head@FreeBSD.ORG Tue May 3 15:50:22 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76C491065673; Tue, 3 May 2011 15:50:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 645688FC08; Tue, 3 May 2011 15:50:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p43FoMuB000711; Tue, 3 May 2011 15:50:22 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p43FoMhw000709; Tue, 3 May 2011 15:50:22 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201105031550.p43FoMhw000709@svn.freebsd.org> From: Andriy Gapon Date: Tue, 3 May 2011 15:50:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221388 - head/sys/dev/sound/pcm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2011 15:50:22 -0000 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