Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Paul Davis <paul@linuxaudiosystems.com>
Cc: Mark Knecht <markknecht@attbi.com>,
	martin-langer@gmx.de,
	Alsa-Devel <alsa-devel@lists.sourceforge.net>,
	swpatrick@earthlink.net
Subject: Re: possible problems with rc6 aplay
Date: Mon, 16 Dec 2002 14:57:45 +0100	[thread overview]
Message-ID: <s5h4r9et6au.wl@alsa2.suse.de> (raw)
In-Reply-To: <E18NvZT-0004yb-00@sc8-sf-list1.sourceforge.net>

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/

  reply	other threads:[~2002-12-16 13:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-15 21:59 possible problems with rc6 aplay patrick reardon
2002-12-15 22:15 ` Mark Knecht
2002-12-16  3:13 ` Paul Davis
2002-12-16  4:38   ` Mark Knecht
2002-12-16 10:17     ` Martin Langer
2002-12-16 12:04       ` Mark Knecht
2002-12-16 13:49         ` Paul Davis
2002-12-16 13:57           ` Takashi Iwai [this message]
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
2002-12-16 14:36         ` possible problems with rc6 aplay Martin Langer
2002-12-16 14:51           ` Paul Davis
     [not found]           ` <20021216144807.8950gmx1@mx005-rz3.gmx.net>
2002-12-17 17:54             ` clock mode problem [was: possible problems with rc6 aplay] Martin Langer
     [not found] <20021216134609.VYJW9197.sccrgwc02.attbi.com@newmx2.fast.net>
2002-12-16 21:20 ` possible problems with rc6 aplay Mark Knecht
     [not found] <200212151910.18nLEb5ck3NZFjX0@robin>
2002-12-16 22:53 ` patrick reardon
2002-12-17  1:44   ` Mark Knecht
2002-12-17  2:48   ` Paul Davis
     [not found] <200212161844.18o7IP2Gs3NZFjV0@sparrow.mail.pas.earthlink.net>
2002-12-17 17:08 ` patrick reardon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5h4r9et6au.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=markknecht@attbi.com \
    --cc=martin-langer@gmx.de \
    --cc=paul@linuxaudiosystems.com \
    --cc=swpatrick@earthlink.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox