From owner-freebsd-multimedia@FreeBSD.ORG Tue Apr 26 17:32:56 2011 Return-Path: Delivered-To: multimedia@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04BFB106564A for ; Tue, 26 Apr 2011 17:32:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 4A2C38FC17 for ; Tue, 26 Apr 2011 17:32:54 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id UAA27384; Tue, 26 Apr 2011 20:32:53 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4DB701C4.30802@FreeBSD.org> Date: Tue, 26 Apr 2011 20:32:52 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110309 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: multimedia@FreeBSD.org References: <4DB6F7BA.4070808@FreeBSD.org> In-Reply-To: <4DB6F7BA.4070808@FreeBSD.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Juergen Lock Subject: Re: SNDCTL_DSP_GETIPTR implementation X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2011 17:32:56 -0000 on 26/04/2011 19:50 Andriy Gapon said the following: > > Guys, > > I reading this http://manuals.opensound.com/developer/SNDCTL_DSP_GETOPTR.html > It says: "In mmap mode (only) the ptr field tells the location where the next > sample will be recorded." > In my opinion that means that we have a mistake in our code and the following > patch should be applied. But I am not sufficiently familiar with this code. It seems that with this change linux alsa lib with oss plugin works for audio recording now. E.g. in skype. Hope I wasn't sloppy with my testing again, so I will re-test. Juergen, will you be able to test this too? > --- a/sys/dev/sound/pcm/dsp.c > +++ b/sys/dev/sound/pcm/dsp.c > @@ -1655,7 +1655,7 @@ dsp_ioctl > /* 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 > > P.S. leading (indenting) whitespace in this file is a mess. -- Andriy Gapon