Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Oct 2002 18:10:59 +0100
From:      "Ulrich 'Q' Spoerlein" <q@uni.de>
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
Message-ID:  <7e40su4hduj42eufbh2e8vfahgutah94ch@4ax.com>
In-Reply-To: <3DB57D71.5BBB31AE@FreeBSD.org>
References:  <3DB57D71.5BBB31AE@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <sobomax@FreeBSD.org>
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-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7e40su4hduj42eufbh2e8vfahgutah94ch>