7.1. Using independent sound cards

Note

In case you do not use devfs, you may need to create additional device files. Take a look at The Linux Sound HOWTO, for information on how to setup additional sound cards.

7.1.1. Using arts demon (artsd)

We have to specify different sound devices for the different Xsessions/Displays. This is done by using the following options of artsd:

Add these lines to your Window Manager start-up script (of course, with the proper arguments for your setup):


real_display=`echo $DISPLAY | sed "s/://" | sed "s/\..*//"`
case "$real_display" in
        0)
        artsd -F 10 -S 4096 -D /dev/dsp -s 5 -m artsmessage -l 3 -f &
        ;;
        1)
        artsd -F 10 -S 4096 -D /dev/dsp1 -s 5 -m artsmessage -l 3 -f &
        ;;
        2)
        artsd -F 10 -S 4096 -a alsa -D hw:4,0 -s 5 -m artsmessage -l 3 -f &
        ;;
esac
        

And at the end of the file:

artsshell -q terminate

Here is an example for /usr/X11R6/bin/startenlightenment:


#!/bin/sh
#   License: GPL

real_display=`echo $DISPLAY | sed "s/://" | sed "s/\..*//"`
case "$real_display" in
        0)
        artsd -F 10 -S 4096 -D /dev/dsp -s 5 -m artsmessage -l 3 -f &
        ;;
        1)
        artsd -F 10 -S 4096 -D /dev/dsp1 -s 5 -m artsmessage -l 3 -f &
        ;;
        2)
        artsd -F 10 -S 4096 -a alsa -D hw:2,0 -s 5 -m artsmessage -l 3 -f &
        ;;
esac

/usr/X11R6/bin/enlightenment
artsshell -q terminate
        

This will start 3 arts demons for 3 X servers.

  1. Demon will use the first OSS sound device for the 1st X server.

  2. Demon will use the second OSS sound device for the 2nd X server.

  3. Demon will use the Alsa sound device for the 3rd X server (requires feedback).