From owner-freebsd-multimedia@FreeBSD.ORG Fri May 6 16:21:50 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 9B0EF106564A; Fri, 6 May 2011 16:21:50 +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 811878FC12; Fri, 6 May 2011 16:21:49 +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 TAA26448; Fri, 06 May 2011 19:21:46 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4DC4201A.9050909@FreeBSD.org> Date: Fri, 06 May 2011 19:21:46 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110504 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: John Baldwin References: <4DC3B764.4030801@FreeBSD.org> <201105060900.08672.jhb@freebsd.org> In-Reply-To: <201105060900.08672.jhb@freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org, multimedia@FreeBSD.org Subject: Re: dsp mmap change 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: Fri, 06 May 2011 16:21:50 -0000 on 06/05/2011 16:00 John Baldwin said the following: > On Friday, May 06, 2011 4:55:00 am Andriy Gapon wrote: >> >> I would like to ask for a review and/or testing of the following patch: >> http://people.freebsd.org/~avg/dev_dsp_mmap.diff >> >> It's supposed to fix an issue described here: >> http://lists.freebsd.org/pipermail/freebsd-multimedia/2011- > February/011691.html >> >> In short, the following pseudo-code should do the right thing: >> fd = open(/dev/dsp, O_RDWR); >> mmap(PROT_READ, fd); >> mmap(PROT_WRITE, fd); > > Are the buffers statically allocated? My reading of code indicates that the buffers are allocated on a sound driver attach and freed when it's detaching. -- Andriy Gapon