From owner-freebsd-multimedia@FreeBSD.ORG Fri May 6 14:04:35 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 0CC36106566B; Fri, 6 May 2011 14:04:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 759BA8FC19; Fri, 6 May 2011 14:04:33 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p46E4URm064363 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 6 May 2011 17:04:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p46E4Up3084048; Fri, 6 May 2011 17:04:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p46E4SSY084047; Fri, 6 May 2011 17:04:28 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 6 May 2011 17:04:28 +0300 From: Kostik Belousov To: Andriy Gapon Message-ID: <20110506140428.GF48734@deviant.kiev.zoral.com.ua> References: <4DC3B764.4030801@FreeBSD.org> <20110506133204.GE48734@deviant.kiev.zoral.com.ua> <4DC3F9B8.3030505@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cClFwTGwHXbya3Sb" Content-Disposition: inline In-Reply-To: <4DC3F9B8.3030505@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: 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 14:04:35 -0000 --cClFwTGwHXbya3Sb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 06, 2011 at 04:38:00PM +0300, Andriy Gapon wrote: > on 06/05/2011 16:32 Kostik Belousov said the following: > > On Fri, May 06, 2011 at 11:55:00AM +0300, 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/01= 1691.html > >> > >> In short, the following pseudo-code should do the right thing: > >> fd =3D open(/dev/dsp, O_RDWR); > >> mmap(PROT_READ, fd); > >> mmap(PROT_WRITE, fd); > >> > >> Thank you! > >=20 > > I think that you have to call PCM_GIANT_LEAVE() when returning > > EINVAL on the vm_pager_alloc() failure. >=20 > Yes, thank you. >=20 > > Your patch hardcodes an assumption that sndbufs are always > > contiguous. I was unable to convince myself that this is true. >=20 > I think that this should be true for the case when DMA is used? In the current driver, yes, but there is nothing that theoretically prevents scatter-gather from be used. > But, yes, very good point. Updated patch looks fine (for me). --cClFwTGwHXbya3Sb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk3D/+sACgkQC3+MBN1Mb4iZQACbBSmAOBM+GEy667CErS+1DF4e iWgAoOzaWmk3vaQqsrAEDN1cV65xmfoh =UCoQ -----END PGP SIGNATURE----- --cClFwTGwHXbya3Sb--