From owner-freebsd-multimedia Thu Oct 31 0:53:29 2002 Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0401637B401 for ; Thu, 31 Oct 2002 00:53:28 -0800 (PST) Received: from wrzx35.rz.uni-wuerzburg.de (wrzx35.rz.uni-wuerzburg.de [132.187.3.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6DA2643E97 for ; Thu, 31 Oct 2002 00:53:16 -0800 (PST) (envelope-from q@uni.de) Received: from wrzx30.rz.uni-wuerzburg.de (wrzx30.rz.uni-wuerzburg.de [132.187.1.30]) by wrzx35.rz.uni-wuerzburg.de (8.8.8/8.8.8/uniwue-MM-1.05) with ESMTP id JAA05281 for ; Thu, 31 Oct 2002 09:53:14 +0100 (MET) Received: from localhost (localhost [127.0.0.1]) by virusscan.rz.uni-wuerzburg.de (Postfix) with ESMTP id 73A4115BEA for ; Thu, 31 Oct 2002 09:51:00 +0100 (CET) Received: from wrzx37.rz.uni-wuerzburg.de (wrzx37.rz.uni-wuerzburg.de [132.187.3.37]) by wrzx30.rz.uni-wuerzburg.de (Postfix) with ESMTP id 925FC16764 for ; Thu, 31 Oct 2002 09:39:11 +0100 (CET) Received: from frodo.galgenberg.net (galgenberg.net [132.187.222.250]) by wrzx37.rz.uni-wuerzburg.de (Postfix) with SMTP id 08E7391C for ; Wed, 30 Oct 2002 18:11:00 +0100 (CET) Received: (qmail 10306 invoked from network); 30 Oct 2002 17:10:59 -0000 Received: from gb-007.galgenberg.net (HELO roadrunner) (132.187.222.7) by galgenberg.net with SMTP; 30 Oct 2002 17:10:59 -0000 From: "Ulrich 'Q' Spoerlein" To: orion@FreeBSD.org, stable@FreeBSD.org, multimedia@FreeBSD.org Cc: gerald@FreeBSD.org Subject: Re: mmap'ed sound buffer doesn't work in -stable, but works in -current Date: Wed, 30 Oct 2002 18:10:59 +0100 Organization: Hier koennte Ihre Werbung stehen! Message-ID: <7e40su4hduj42eufbh2e8vfahgutah94ch@4ax.com> References: <3DB57D71.5BBB31AE@FreeBSD.org> In-Reply-To: <3DB57D71.5BBB31AE@FreeBSD.org> X-Mailer: Forte Agent 1.91/32.564 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS (Rechenzentrum Universitaet Wuerzburg) Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Tue, 22 Oct 2002 19:31:45 +0300, you wrote: looks like it didn't get to this list the first time.. :) On Tue, 22 Oct 2002 19:31:45 +0300 Maxim Sobolev wrote: >When investigating the problem with running Apple's QuickTime player >under wine in 4.7 (it works like a charm in -current) I've found that >mmap'ed sound buffer doesn't work in -stable, but works in -current. >In -stable, after mmap'ing dsp device any attempt to write into the >mapped memory results in SIGBUS, which obviously kills wine. > >Attached please find a simple test case, which illustrates the >problem. The problem has been verified on original Creative SB16 ISA >and Intel 82801BA (ICH2), so that it is unlikely to be an issue with a >specific driver/hardware. > >Any ideas what could be wrong? I am puzzled, because the audio code is >essentially the same in -stable and in -current. same problem here with SB Live and 4.7-Stable and -Current (some days old). this not only troubles the QT Player, but linux-quake2(from id)/quake2/quakeforge are affected too. if you change the mmap() line to this: p = mmap(NULL, info.fragstotal * info.fragsize, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); the mmap() call will work, but you get an access denied, changeing the way fd is opened will make your code (and quake) work on -stable: fd = open("/dev/dsp", O_RDWR); the problem is, i need the mmap() call to work for the original quake2 compiled for linux from id Software themselves. so if anyone could look into this issue i would be very glad. it looks like pcm needs Read/Write access to the buffer on -stable (though writing should be all that is needed) And thank you Maxim for narrowing this down to such a simple code fragement. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message