From owner-freebsd-bugs Wed Jun 12 5: 0:13 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 14A4A37B409 for ; Wed, 12 Jun 2002 05:00:04 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g5CC04N09569; Wed, 12 Jun 2002 05:00:04 -0700 (PDT) (envelope-from gnats) Received: from levais.imp.ch (levais.imp.ch [157.161.4.66]) by hub.freebsd.org (Postfix) with ESMTP id D784937B40A for ; Wed, 12 Jun 2002 04:59:24 -0700 (PDT) Received: (from mb@localhost) by levais.imp.ch (8.11.6/8.11.5) id g5CC0RG38139; Wed, 12 Jun 2002 14:00:27 +0200 (CEST) (envelope-from mb) Message-Id: <200206121200.g5CC0RG38139@levais.imp.ch> Date: Wed, 12 Jun 2002 14:00:27 +0200 (CEST) From: Martin Blapp Reply-To: Martin Blapp To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: conf/39192: [PATCH] Save pcm mixer settings during reboot Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 39192 >Category: conf >Synopsis: [PATCH] Save pcm mixer settings during reboot >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Jun 12 05:00:03 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Martin Blapp >Release: FreeBSD 5.0-CURRENT i386 >Organization: ImproWare AG >Environment: >Description: Since I'm to laze to set the mixer settings each time I like to watch DVD's, I've made the following patch. Some tips or a better solution are welcome ! >How-To-Repeat: >Fix: Index: rc =================================================================== RCS file: /home/ncvs/src/etc/rc,v retrieving revision 1.313 diff -u -r1.313 rc --- rc 16 May 2002 02:10:03 -0000 1.313 +++ rc 12 Jun 2002 11:52:09 -0000 @@ -801,6 +801,22 @@ . /etc/rc.syscons fi +if [ -e /dev/sndstat ]; then + if [ -e /var/db/mixer.conf ]; then + mixer=`cat /var/db/mixer.conf` + counter=1 + + for value in ${mixer}; do + modulo=`expr ${counter} % 2` + if [ ${modulo} -eq 0 ]; then + mixer ${oldvalue} ${value} + fi + counter=`expr ${counter} + 1` + oldvalue=${value} + done + fi +fi + echo -n 'Additional ABI support:' # Load the SysV IPC API if requested. Index: rc.shutdown =================================================================== RCS file: /home/ncvs/src/etc/rc.shutdown,v retrieving revision 1.22 diff -u -r1.22 rc.shutdown --- rc.shutdown 18 May 2002 00:26:10 -0000 1.22 +++ rc.shutdown 12 Jun 2002 11:52:10 -0000 @@ -141,6 +141,11 @@ # Insert other shutdown procedures here +if [ -e /dev/sndstat ]; then + echo -n 'Saving pcm mixer settings:' + mixer -s > /var/db/mixer.conf +fi + # Saving firewall state tables should be done last echo -n 'Saving firewall state tables:' >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message