From owner-freebsd-questions@FreeBSD.ORG Sun Feb 10 04:15:08 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4E6116A418 for ; Sun, 10 Feb 2008 04:15:08 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from gaia.nimnet.asn.au (nimbin.lnk.telstra.net [139.130.45.143]) by mx1.freebsd.org (Postfix) with ESMTP id 64B5913C447 for ; Sun, 10 Feb 2008 04:15:06 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (smithi@localhost) by gaia.nimnet.asn.au (8.8.8/8.8.8R1.5) with SMTP id PAA14053; Sun, 10 Feb 2008 15:14:50 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Sun, 10 Feb 2008 15:14:49 +1100 (EST) From: Ian Smith To: Andreas Davour In-Reply-To: <20080209193652.4D48516A4A0@hub.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-questions@freebsd.org Subject: Re: Unlock /dev/dsp? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Feb 2008 04:15:08 -0000 On Sat, 9 Feb 2008 20:17:48 +0100 (CET) Andreas Davour wrote: > I have begin to find it annoying that when I have a Firefox running with > a page with a youtube link it it, I can't at the same time play a mp3 > file with mplayer. When I try I get an error saying that /dev/dsp is > busy. Is there a way to make it play me some music anyway? > > I use KDE if that matters. See sound(4) .. you want to set up some virtual channels, eg in /etc/sysctl.conf (though you can set them manually meanwhile) hw.snd.verbose=2 hw.snd.pcm0.vchans=4 hw.snd.maxautovchans=4 smithi on paqi% ls -lrt /dev/dsp* crw-rw-rw- 1 root wheel 30, 11 Nov 28 01:27 /dev/dspr0.0 crw-rw-rw- 1 root wheel 30, 0x00050005 Nov 28 01:27 /dev/dspW0.5 crw-rw-rw- 1 root wheel 30, 0x00040005 Nov 28 01:27 /dev/dspW0.4 crw-rw-rw- 1 root wheel 30, 0x00030005 Nov 28 01:27 /dev/dspW0.3 crw-rw-rw- 1 root wheel 30, 0x00020005 Nov 28 01:27 /dev/dspW0.2 crw-rw-rw- 1 root wheel 30, 0x00010005 Nov 28 01:27 /dev/dspW0.1 crw-rw-rw- 1 root wheel 30, 5 Nov 28 01:27 /dev/dspW0.0 crw-rw-rw- 1 root wheel 30, 0x00050003 Nov 28 01:27 /dev/dsp0.5 crw-rw-rw- 1 root wheel 30, 0x00040003 Nov 28 01:27 /dev/dsp0.4 crw-rw-rw- 1 root wheel 30, 0x00030003 Nov 28 01:27 /dev/dsp0.3 crw-rw-rw- 1 root wheel 30, 0x00020003 Nov 28 01:27 /dev/dsp0.2 crw-rw-rw- 1 root wheel 30, 0x00010003 Nov 28 01:27 /dev/dsp0.1 crw-rw-rw- 1 root wheel 30, 3 Feb 10 15:06 /dev/dsp0.0 If you use the KDE sound setup, you could specify say /dev/dsp0.2 for KDE noises. Other programs (mplayer, xmms ..) will use a free channel, and you can run as many others as you like (if you like cacophony :) You can run 'cat /dev/sndstat' to see what's using what. cheers, Ian