Date: Sat, 22 Feb 2003 03:07:23 +1100 From: Sam Izzo <izzo@humbug.net> To: freebsd <freebsd-questions@FreeBSD.ORG> Subject: Re: sound card blocking problem Message-ID: <20030222030723.A6992@terminus.vic.optushome.com.au> In-Reply-To: <OE51zoxJ6sJ9amqkhqn00001a67@hotmail.com>; from b1henning@hotmail.com on Fri, Feb 21, 2003 at 09:00:29AM -0600 References: <OE51zoxJ6sJ9amqkhqn00001a67@hotmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, On Fri, Feb 21, 2003 at 09:00:29AM -0600, Brian Henning wrote: > I noticed that is FBSD4.7 that when i am using the sound device in one process > that the system blocks that device so no other processes can use the sound > device until that process is killed. I know that in windows 2000 that is not > the case, it lets multilple processes have control of the sound device at the > same time. Is there a way to make FBSD4.7 have this functionality? Does this > question make any sense? Do you mean you get the "device busy" or whatever the message is? Unfortunately I don't think you can do much about that. If a piece of software opens /dev/dsp when it starts and doesn't close it until it finishes then nothing else will be able to write to /dev/dsp. Have a look at: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/sound-setup.html for some info on how to set up "virtual channels". This is a way of having several dsp devices (/dev/dsp0.x where x is between 0 and some maximum that you specify) that are multiplixed through the one physical dsp device. Then you should set your various pieces of software to use different dsp devices (e.g. xmms might use /dev/dsp0.0, your window manager's sound server might use /dev/dsp0.1, etc). If you've got an SBLive (or probably any modern sound card) they you actually have around 48 hardware channels (i.e. 48 channels similar to the vchans mentioned above, except that they're mixed on the hardware device, freeing up the CPU). Unfortunately I don't think the current SBLive driver for FreeBSD supports utilising more than one hardware channel (current meaning even the one in 5.0). I think the way the OSS and ALSA drivers do it (I can't remember which - one of them does it this way at the very least) is to allow /dev/dsp to be opened multiple times. I'm going to have a look at putting this support in soon (or at least try to understand what's going on in the current driver - maybe it's in there already; I've never done any kernel hacking before). cheers sam To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030222030723.A6992>