Bug 75137

Summary: [sound] add snd_* modules support to /etc/rc.d/mixer
Product: Base System Reporter: Jose M Rodriguez <josemi>
Component: confAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed Not A Bug    
Severity: Affects Only Me CC: christos
Priority: Normal    
Version: 5.3-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch-mixer_modules none

Description Jose M Rodriguez 2004-12-15 23:17:10 UTC
>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"
Comment 1 Jose M Rodriguez 2004-12-15 23:20:26 UTC
	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
Comment 2 Gleb Smirnoff freebsd_committer freebsd_triage 2005-01-18 10:59:23 UTC
Responsible Changed
From-To: freebsd-bugs->jhb

Assign to author of /etc/rc.d/mixer.
Comment 3 John Baldwin freebsd_committer freebsd_triage 2005-01-18 17:42:58 UTC
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
Comment 4 Jose M Rodriguez 2005-01-25 20:04:30 UTC
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.
Comment 5 John Baldwin freebsd_committer freebsd_triage 2010-10-11 19:57:46 UTC
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
Comment 6 John Baldwin freebsd_committer freebsd_triage 2010-10-11 19:58:13 UTC
Responsible Changed
From-To: jhb->freebsd-multimedia

Punt this over to the sound maintainers.
Comment 7 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:22 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 8 Christos Margiolis freebsd_committer freebsd_triage 2024-01-30 13:40:18 UTC
As jhb mentioned ages ago, this doesn't really belong in this script. Closing.