Date: Fri, 6 May 2011 17:04:28 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Andriy Gapon <avg@freebsd.org> Cc: current@freebsd.org, multimedia@freebsd.org Subject: Re: dsp mmap change Message-ID: <20110506140428.GF48734@deviant.kiev.zoral.com.ua> In-Reply-To: <4DC3F9B8.3030505@FreeBSD.org> References: <4DC3B764.4030801@FreeBSD.org> <20110506133204.GE48734@deviant.kiev.zoral.com.ua> <4DC3F9B8.3030505@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] 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/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); > >> > >> Thank you! > > > > I think that you have to call PCM_GIANT_LEAVE() when returning > > EINVAL on the vm_pager_alloc() failure. > > Yes, thank you. > > > Your patch hardcodes an assumption that sndbufs are always > > contiguous. I was unable to convince myself that this is true. > > 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). [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk3D/+sACgkQC3+MBN1Mb4iZQACbBSmAOBM+GEy667CErS+1DF4e iWgAoOzaWmk3vaQqsrAEDN1cV65xmfoh =UCoQ -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110506140428.GF48734>
