From owner-freebsd-multimedia Mon Jul 31 9:36:52 2000 Delivered-To: freebsd-multimedia@freebsd.org Received: from lor.watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (Postfix) with ESMTP id 8223437BC4F for ; Mon, 31 Jul 2000 09:36:44 -0700 (PDT) (envelope-from luoqi@watermarkgroup.com) Received: (from luoqi@localhost) by lor.watermarkgroup.com (8.10.1/8.10.1) id e6VGSrB23755; Mon, 31 Jul 2000 12:28:53 -0400 (EDT) Date: Mon, 31 Jul 2000 12:28:53 -0400 (EDT) From: Luoqi Chen Message-Id: <200007311628.e6VGSrB23755@lor.watermarkgroup.com> To: gandalf@vilnya.demon.co.uk, luoqi@watermarkgroup.com, multimedia@FreeBSD.ORG, sreid@sea-to-sky.net Subject: Re: State of sound support in 4.1-R ? Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > The mmap support is somewhat broken. The way dsp_mmap() tries to figure > out > > which channel to use is wrong, see the comment in sndmmap(). The format > > check in dsp_mmap() prevented me from running quake, quake (or other id > games) > > does a mmap before setting the format. So it is probably a good idea to > > reinitialize the channel to use one of the natural formats instead of > returning > > a failure. > > actually, the comment for sndmmap() is wrong. the oss spec defines the mmap > protection flags as the method of selecting the read or write buffer so we > comply with that, but for a vm issue. > Then the spec has fundamental problems: in our vm systems, a vm object (in our case, the sound device) and an offset within this object uniquely identifies a page, protection is just an attribute of this page, the content of this page doesn't change magically because you switch from read to write. > mmap prior to setting the format should work, if it doesn't i'd be > interested in seeing the code that is trying to do this and failing. > It goes like this, the native format of my soundcard is 16bit, quake opens /dev/dsp, which supposed to be 8bit, mmaps it, and then sets format to 16bit. > -cg > -lq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message