6.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 how to setup additional sound cards

6.1.1. Using arts demon (artsd)

we have to specify different sound device for the different Xsessions / Displays

this is done by using the following options of artsd

add this 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 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

6.1.2. Using esound demon (esd)

we have to specify different sound device for the different Xsessions / Displays

this is done by using the following options of esd

add this 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)
        esd -d /dev/dsp -as 5 &
        ;;
        1)
        esd -d /dev/dsp1 -as 5 &
        ;;
        2)
        esd -d /dev/dsp2 -as 5 &
        ;;
esac

and at the end of the file:

esd -terminate

here is example for /usr/X11R6/bin/startenlightenment

#!/bin/sh
#   License: GPL

real_display=`echo $DISPLAY | sed "s/://" | sed "s/\..*//"`
case "$real_display" in
        0)
        esd -d /dev/dsp -as 5 &
        ;;
        1)
        esd -d /dev/dsp1 -as 5 &
        ;;
        2)
        esd -d /dev/dsp2 -as 5 &
        ;;
esac

/usr/X11R6/bin/enlightenment
esd -terminate

this will start 3 esound 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