From josemi@freebsd.jazztel.es  Wed Dec 15 23:17:13 2004
Return-Path: <josemi@freebsd.jazztel.es>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 9C23016A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 15 Dec 2004 23:17:13 +0000 (GMT)
Received: from smtp2.jazztel.es (smtp2.jazztel.es [62.14.3.162])
	by mx1.FreeBSD.org (Postfix) with ESMTP id B47AD43D4C
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 15 Dec 2004 23:17:12 +0000 (GMT)
	(envelope-from josemi@freebsd.jazztel.es)
Received: from antivirus
	by smtp2.jazztel.es
	with antivirus id 1CeiOM-0000SL-00
	for FreeBSD-gnats-submit@freebsd.org
	Thu, 16 Dec 2004 00:17:10 +0100
Received: from [212.106.236.248] (helo=rguez.homeunix.net)
	by smtp2.jazztel.es
	with esmtp id 1CeiOM-0000Rx-00
	for FreeBSD-gnats-submit@freebsd.org
	Thu, 16 Dec 2004 00:17:10 +0100
Received: from orion.redesjm.local (localhost.redesjm.local [127.0.0.1])
	by rguez.homeunix.net (8.13.1/8.13.1) with ESMTP id iBFNHAcN076204
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 16 Dec 2004 00:17:10 +0100 (CET)
	(envelope-from freebsd@orion.redesjm.local)
Received: (from freebsd@localhost)
	by orion.redesjm.local (8.13.1/8.13.1/Submit) id iBFNHAgP076203;
	Thu, 16 Dec 2004 00:17:10 +0100 (CET)
	(envelope-from freebsd)
Message-Id: <200412152317.iBFNHAgP076203@orion.redesjm.local>
Date: Thu, 16 Dec 2004 00:17:10 +0100 (CET)
From: Jose M Rodriguez <josemi@freebsd.jazztel.es>
Reply-To: Jose M Rodriguez <josemi@freebsd.jazztel.es>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: add snd_* modules support to /etc/rc.d/mixer
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         75137
>Category:       conf
>Synopsis:       [sound] add snd_* modules support to /etc/rc.d/mixer
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-multimedia
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 15 23:20:26 GMT 2004
>Closed-Date:    
>Last-Modified:  Mon Oct 11 19:00:08 UTC 2010
>Originator:     Jose M Rodriguez
>Release:        FreeBSD 5.3-STABLE i386
>Organization:
Redes JM
>Environment:
System: FreeBSD orion.redesjm.local 5.3-STABLE FreeBSD 5.3-STABLE #0: Wed Dec 15 00:35:47 CET 2004 root@orion.redesjm.local:/usr/obj/usr/src/sys/ORION i386


>Description:
	Add support for preload of sound modules needed for mixer operation.
	Use a blank separated list of modules in ${mixer_modules}, defined
	in /etc/rc.conf and preloaded by /etc/rc.d/mixer
>How-To-Repeat:
>Fix:

--- patch-mixer_modules begins here ---
--- /usr/src/etc/rc.d/mixer	Sun Oct 10 11:50:53 2004
+++ etc/rc.d/mixer	Thu Dec  9 23:25:41 2004
@@ -40,6 +40,22 @@
 extra_commands="reload"
 
 #
+# Install needed modules
+#
+install_mixer_modules()
+{
+    local mixer_module
+
+    if [ -n "${mixer_modules}" ]; then
+	for mixer_module in "${mixer_modules}"; do
+	    if ! /sbin/kldstat -n ${mixer_module} > /dev/null 2>&1 ; then
+		/sbin/kldload ${mixer_module}
+	    fi
+	done
+    fi
+}
+
+#
 # List current mixer devices to stdout.
 #
 list_mixers()
@@ -81,6 +97,7 @@
 {
 	local mixer
 
+	install_mixer_modules
 	for mixer in `list_mixers`; do
 		mixer_restore ${mixer}
 	done
--- patch-mixer_modules ends here ---



>Release-Note:
>Audit-Trail:

From: Jose M Rodriguez <josemi@freebsd.jazztel.es>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:  
Subject: conf/75137: add snd_* modules support to /etc/rc.d/mixer
Date: Thu, 16 Dec 2004 00:17:10 +0100 (CET)

 >Number:         75137
 >Category:       conf
 >Synopsis:       add snd_* modules support to /etc/rc.d/mixer
 >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 Dec 15 23:20:26 GMT 2004
 >Closed-Date:
 >Last-Modified:
 >Originator:     Jose M Rodriguez
 >Release:        FreeBSD 5.3-STABLE i386
 >Organization:
 Redes JM
 >Environment:
 System: FreeBSD orion.redesjm.local 5.3-STABLE FreeBSD 5.3-STABLE #0: Wed Dec 15 00:35:47 CET 2004 root@orion.redesjm.local:/usr/obj/usr/src/sys/ORION i386
 
 
 >Description:
 	Add support for preload of sound modules needed for mixer operation.
 	Use a blank separated list of modules in ${mixer_modules}, defined
 	in /etc/rc.conf and preloaded by /etc/rc.d/mixer
 >How-To-Repeat:
 >Fix:
 
 --- patch-mixer_modules begins here ---
 --- /usr/src/etc/rc.d/mixer	Sun Oct 10 11:50:53 2004
 +++ etc/rc.d/mixer	Thu Dec  9 23:25:41 2004
 @@ -40,6 +40,22 @@
  extra_commands="reload"
  
  #
 +# Install needed modules
 +#
 +install_mixer_modules()
 +{
 +    local mixer_module
 +
 +    if [ -n "${mixer_modules}" ]; then
 +	for mixer_module in "${mixer_modules}"; do
 +	    if ! /sbin/kldstat -n ${mixer_module} > /dev/null 2>&1 ; then
 +		/sbin/kldload ${mixer_module}
 +	    fi
 +	done
 +    fi
 +}
 +
 +#
  # List current mixer devices to stdout.
  #
  list_mixers()
 @@ -81,6 +97,7 @@
  {
  	local mixer
  
 +	install_mixer_modules
  	for mixer in `list_mixers`; do
  		mixer_restore ${mixer}
  	done
 --- patch-mixer_modules ends here ---
 
 
 
 >Release-Note:
 >Audit-Trail:
 >Unformatted:
 _______________________________________________
 freebsd-bugs@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
 To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"
Responsible-Changed-From-To: freebsd-bugs->jhb 
Responsible-Changed-By: glebius 
Responsible-Changed-When: Tue Jan 18 10:59:23 GMT 2005 
Responsible-Changed-Why:  
Assign to author of /etc/rc.d/mixer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=75137 

From: John Baldwin <jhb@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org, josemi@freebsd.jazztel.es
Cc: dougb@FreeBSD.org
Subject: Re: conf/75137: add snd_* modules support to /etc/rc.d/mixer
Date: Tue, 18 Jan 2005 12:42:58 -0500

 Humm, I'm not really a sound genius, I just got the mixer settings for my 
 laptop to save/restore across boot. :)  However, it strikes me that perhaps 
 the rcNG framework should include some sort of helper API for handling 
 dependent modules much like it has one for scripts to say that they require a 
 certain program to be present if they are going to run successfully rather 
 than adding a bunch of one-off hacks to various rc scripts.
 
 -- 
 John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
 "Power Users Use the Power to Serve"  =  http://www.FreeBSD.org

From: Jose M Rodriguez <josemi@freebsd.jazztel.es>
To: freebsd-gnats-submit@freebsd.org, josemi@freebsd.jazztel.es
Cc:  
Subject: Re: conf/75137: add snd_* modules support to /etc/rc.d/mixer
Date: Tue, 25 Jan 2005 21:04:30 +0100

 The main goal may be make sysinstall able of configure sound via menu.  I'm 
 not a sysinstall or rcNG expert, but this way, if usable, must be better that 
 use /boot/loader.conf.
Responsible-Changed-From-To: jhb->freebsd-multimedia 
Responsible-Changed-By: jhb 
Responsible-Changed-When: Mon Oct 11 18:58:13 UTC 2010 
Responsible-Changed-Why:  
Punt this over to the sound maintainers. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=75137 

From: John Baldwin <jhb@freebsd.org>
To: bug-followup@freebsd.org,
 josemi@freebsd.jazztel.es
Cc:  
Subject: Re: conf/75137: [sound] add snd_* modules support to /etc/rc.d/mixer
Date: Mon, 11 Oct 2010 14:57:46 -0400

 rcNG does have some builtin methods for handling klds now, but I'm not sure 
 that this change really belongs in this script.  I'm going to punt it over to 
 freebsd-multimedia@
 
 -- 
 John Baldwin
>Unformatted:
