From owner-freebsd-hackers Sun Aug 8 13: 3:57 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from janus.syracuse.net (janus.syracuse.net [205.232.47.15]) by hub.freebsd.org (Postfix) with ESMTP id D072614FD1 for ; Sun, 8 Aug 1999 13:03:48 -0700 (PDT) (envelope-from green@FreeBSD.org) Received: from localhost (green@localhost) by janus.syracuse.net (8.9.3/8.8.7) with ESMTP id QAA43929; Sun, 8 Aug 1999 16:02:05 -0400 (EDT) X-Authentication-Warning: janus.syracuse.net: green owned process doing -bs Date: Sun, 8 Aug 1999 16:02:05 -0400 (EDT) From: "Brian F. Feldman" X-Sender: green@janus.syracuse.net To: Osokin Sergey Cc: hackers@FreeBSD.org Subject: Re: rc addition proposal: mixer In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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