Date: Sun, 8 Aug 1999 16:02:05 -0400 (EDT) From: "Brian F. Feldman" <green@FreeBSD.org> To: Osokin Sergey <osa@etrust.ru> Cc: hackers@FreeBSD.org Subject: Re: rc addition proposal: mixer Message-ID: <Pine.BSF.4.10.9908081512540.38017-100000@janus.syracuse.net> In-Reply-To: <Pine.BSF.4.10.9908082259160.458-100000@ozz.etrust.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 8 Aug 1999, Osokin Sergey wrote: > > > > Now in current i use following script (aka mixer.sh) for install sound > environment: > > #!/bin/sh > mixer vol 36 > mixer synth 36 > mixer pcm 36 > mixer line 36 > mixer cd 68 > > Maybe add to rc.conf all features of mixer? > (aka vol, bass & etc) Yes, I've added all of them. Now, you'd want the following in rc.conf, in your case: mixers="0" # or whatever you want to call it mixer_0_dev="/dev/mixer0" # This is optional, of course mixer_0_vol="36" mixer_0_synth="36" mixer_0_pcm="36" mixer_0_line="36" mixer_0_cd="68" > > Rgdz, > Osokin Sergey aka oZZ, > osa@etrust.ru Here are all the diffs. --- src/etc/rc.orig Sun Aug 8 15:01:19 1999 +++ src/etc/rc Sun Aug 8 15:04:26 1999 @@ -168,6 +168,11 @@ . /etc/rc.pccard fi +# configure audio devices +if [ -f /etc/rc.audio ]; then + . /etc/rc.audio +fi + # start up the initial network configuration. if [ -f /etc/rc.network ]; then . /etc/rc.network # We only need to do this once. --- src/etc/defaults/rc.conf.orig Sun Aug 8 15:16:59 1999 +++ src/etc/defaults/rc.conf Sun Aug 8 15:37:01 1999 @@ -191,6 +191,19 @@ ############################################################## +### Sound device options ################################### +############################################################## + +#mixer_names="0 1" # List of mixer variable names. +#mixer_0_dev="" # Set this to your mixer device, or leave unset to + # get /dev/mixer. +#mixer_0_vol="80:80" # Set the master volume. +#mixer_1_dev="/dev/mixer1" +#mixer_1_vol="90:90" +#mixer_1_pcm="75:75" + # See mixer(8) for more possible mixer devices. + +############################################################## ### Miscellaneous administrative options ################### ############################################################## --- /dev/null Sun Aug 8 16:00:00 1999 +++ src/etc/rc.audio Sun Aug 8 16:01:10 1999 @@ -0,0 +1,23 @@ +#!/bin/sh +# +# Audio device configuration +# +# $Id$ +# + +for mname in "$mixers"; do + if eval [ -n \""\$mixer_$mname_dev"\" ]; then + eval mixer=\""mixer -f \$mixer_$mname_dev"\" + else + mixer="mixer" + fi + + mdevs=`$mixer 2>/dev/null | cut -d' ' -f2` + if [ -n "$mdevs" ]; then + for mdev in $mdevs recsrc; do + if eval [ -n \""\$mixer_${mname}_$mdev"\" ]; then + eval \$mixer \$mdev \"\$mixer_${mname}_$mdev\" + fi + done >/dev/null + fi +done Brian Fundakowski Feldman _ __ ___ ____ ___ ___ ___ green@FreeBSD.org _ __ ___ | _ ) __| \ FreeBSD: The Power to Serve! _ __ | _ \._ \ |) | http://www.FreeBSD.org/ _ |___/___/___/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9908081512540.38017-100000>