Run Esd, Arts, Jack and OSS

From FBSD_tips

Jump to: navigation, search

There are a number of different sound servers and services, so in order to be as flexible as possible and avoid rebooting or restarting desktop environments just to take advantage the attributes or one or the other here is how to run them all simultaneously. This leverages the FreeBSD virtual audio channel feature of the sound system to run Jack, Artsd and OSS simulteanously :

1st, oad the sound driver :

kldload snd

Then set up 5 virtual channels:

sysctl hw.snd.pcm0.vchans=5
sysctl hw.snd.maxautovchans=5

There should now be a number of dsp devices in /dev :

# ls -l /dev/dsp*
crw-rw-rw-  1 root  wheel    0, 140 Oct  3 00:15 /dev/dsp0.0
crw-rw-rw-  1 root  wheel    0, 143 Sep 11 19:05 /dev/dsp0.1
crw-rw-rw-  1 root  wheel    1,  36 Sep 11 19:05 /dev/dsp0.2
crw-rw-rw-  1 root  wheel    1,  39 Sep 11 19:05 /dev/dsp0.3
crw-rw-rw-  1 root  wheel    1,  42 Oct  3 00:16 /dev/dsp0.4

Leaving the 1st sound device for applications written for OSS to talk to, set up artsd (in control panel) to use /dev/dsp0.1. Check that is is running :

ps -ax | grep artsd
1136  ??  S     18:25.62 /usr/local/bin/artsd -F 10 -S 4096 -s 60 -m artsmessage -c drkonqi -l 3 -f

Set up Jack to run on the 3rd dev (/dev/dsp0.2) :

jackd -d oss  --device /dev/dsp0.2 &

Lastly, run the Enlightenment sound daemon :

esd -beeps -d /dev/dsp0.4 &

Caveats and limitations.

  • While all devices can play at the same time (and will be mixed to the output of the sound card), only one can open the audio device to record.

Further information: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/sound-setup.html

Also of some note is the open sourcing of the previously commercial 4front OSS drivers. They are in the ports collection here  : /usr/ports/audio/oss/

Gongo 05:35, 3 October 2007 (UTC)

Personal tools