Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jun 2002 14:00:27 +0200 (CEST)
From:      Martin Blapp <mbr@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   conf/39192: [PATCH] Save pcm mixer settings during reboot
Message-ID:  <200206121200.g5CC0RG38139@levais.imp.ch>

next in thread | raw e-mail | index | archive | help


>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206121200.g5CC0RG38139>