From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: possible problems with rc6 aplay Date: Mon, 16 Dec 2002 14:57:45 +0100 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <1040040264.1358.8.camel@Godzilla> Mime-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: Paul Davis Cc: Mark Knecht , martin-langer@gmx.de, Alsa-Devel , swpatrick@earthlink.net List-Id: alsa-devel@alsa-project.org 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/