All of lore.kernel.org
 help / color / mirror / Atom feed
[parent not found: <20021216152035.CZFC3512.sccrgwc01.attbi.com@newmx1.fast.net>]
* Re: possible problems with rc6 aplay
@ 2002-12-16 13:57 Takashi Iwai
  2002-12-16 14:29 ` Paul Davis
  0 siblings, 1 reply; 15+ messages in thread
From: Takashi Iwai @ 2002-12-16 13:57 UTC (permalink / raw)
  To: Paul Davis; +Cc: Mark Knecht, martin-langer, Alsa-Devel, swpatrick

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/

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2002-12-23 17:18 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E18PTTN-0004YV-00@sc8-sf-list2.sourceforge.net>
2002-12-20 22:53 ` alsasound init script (Re: possible problems with rc6 aplay ) Pedro Lopez-Cabanillas
2002-12-23 13:44   ` Takashi Iwai
2002-12-23 17:18     ` Patrick Shirkey
     [not found] <20021216152035.CZFC3512.sccrgwc01.attbi.com@newmx1.fast.net>
2002-12-16 21:18 ` Mark Knecht
2002-12-17  2:51   ` Paul Davis
2002-12-17  3:46     ` Mark Knecht
2002-12-17 11:06       ` Takashi Iwai
2002-12-17 19:36         ` Fernando Pablo Lopez-Lezcano
2002-12-18 10:46           ` Takashi Iwai
2002-12-18 11:17             ` Takashi Iwai
2002-12-18 13:11               ` Mark Knecht
2002-12-20 15:10                 ` Takashi Iwai
2002-12-20 16:10                   ` Clemens Ladisch
2002-12-16 13:57 possible problems with rc6 aplay Takashi Iwai
2002-12-16 14:29 ` Paul Davis
2002-12-16 14:53   ` alsasound init script (Re: possible problems with rc6 aplay ) Takashi Iwai
2002-12-16 15:23     ` Paul Davis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.