At Mon, 16 Dec 2002 08:49:35 -0500, Paul Davis wrote: > > >Martin, > > That might certainly be an answer. How would this amixer switch get > >st in the first place? I wouldn't mind doing it by hand once as long as > >it was then loaded after that. > > what you want is a short startup script (typically in somewhere under > /etc/rc.d, but unfortunately this varies somewhat from linux > distribution to linux distribution). it would look like this: > > #!/bin/sh > > HAMMERFALL=0 # change to match the card number of the > # Hammerfall, as shown in /proc/asound/cards > CLOCK_MODE=0 # auto-sync, the default condition. > CLOCK_MODE_NAME="autosync" > > case $1 in > start) if [ -f /some/path/to/this-host-is-master ] ; then > CLOCK_MODE=1 > CLOCK_MODE_NAME="master" > else > CLOCK_MODE=2 > CLOCK_MODE_NAME="word clock" > fi > echo "Setting Hammerfall to $CLOCK_MODE_NAME mode ..." > amixer -c $HAMMERFALL cset \ > iface=PCM,name='Sync Mode',numid=7 $CLOCK_MODE > esac > exit 0 > > then, just create the file /some/path/to/this-host-is-master on one > machine, and it will automatically set the Master switch when it boots > up. the other machine will remain in AutoSync mode - if they are > connected via word clock, you probably want to change that as well, > using the same script.
the standard alsasound init script can call a card-dependent script under /etc/alsa.d as the last initialization phase. for example, you can create the file above as /etc/alsa.d/rme9652 (with exec bit). as other examples, you can load the soundfont on this script for emu10k1 or sbawe. many distributions use /etc/sysconfig/XXX file for a local configuration, btw. in this style, create a file (e.g. /etc/sysconfig/rme9652) containing the variable definitions such like: HAMMERFALL=0 CLOCK_MODE=1 CLOCK_MODE_NAME="master" and call ". /etc/sysconfig/rme9652" at the beginning of the script. ciao, Takashi ------------------------------------------------------- This sf.net email is sponsored by: With Great Power, Comes Great Responsibility Learn to use your power at OSDN's High Performance Computing Channel http://hpc.devchannel.org/ _______________________________________________ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel