From owner-freebsd-questions Fri Feb 21 8: 7:28 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 09CB637B401 for ; Fri, 21 Feb 2003 08:07:27 -0800 (PST) Received: from mail019.syd.optusnet.com.au (mail019.syd.optusnet.com.au [210.49.20.160]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF17A43F93 for ; Fri, 21 Feb 2003 08:07:24 -0800 (PST) (envelope-from izzo@optushome.com.au) Received: from terminus.cable.nu (c18428.eburwd1.vic.optusnet.com.au [210.49.180.23]) by mail019.syd.optusnet.com.au (8.11.6/8.11.6) with ESMTP id h1LG7NO04556 for ; Sat, 22 Feb 2003 03:07:23 +1100 Received: (from izzo@localhost) by terminus.cable.nu (8.11.4/8.11.4) id h1LG7Ni07012 for freebsd-questions@FreeBSD.ORG; Sat, 22 Feb 2003 03:07:23 +1100 Date: Sat, 22 Feb 2003 03:07:23 +1100 From: Sam Izzo To: freebsd Subject: Re: sound card blocking problem Message-ID: <20030222030723.A6992@terminus.vic.optushome.com.au> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from b1henning@hotmail.com on Fri, Feb 21, 2003 at 09:00:29AM -0600 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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