From eugen@grosbein.pp.ru  Wed Aug  2 15:44:10 2006
Return-Path: <eugen@grosbein.pp.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 6DD7E16A4DF
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  2 Aug 2006 15:44:10 +0000 (UTC)
	(envelope-from eugen@grosbein.pp.ru)
Received: from grosbein.pp.ru (grgw.svzserv.kemerovo.su [213.184.64.166])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 40CBC43D49
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  2 Aug 2006 15:44:06 +0000 (GMT)
	(envelope-from eugen@grosbein.pp.ru)
Received: from grosbein.pp.ru (localhost [127.0.0.1])
	by grosbein.pp.ru (8.13.6/8.13.6) with ESMTP id k72FhwFJ002403
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 2 Aug 2006 23:44:00 +0800 (KRAST)
	(envelope-from eugen@grosbein.pp.ru)
Received: (from eugen@localhost)
	by grosbein.pp.ru (8.13.6/8.13.6/Submit) id k72FhvSJ002402;
	Wed, 2 Aug 2006 23:43:57 +0800 (KRAST)
	(envelope-from eugen)
Message-Id: <200608021543.k72FhvSJ002402@grosbein.pp.ru>
Date: Wed, 2 Aug 2006 23:43:57 +0800 (KRAST)
From: Eugene Grosbein <eugen@grosbein.pp.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] /etc/rc.d/mixer should obey mixer_enable rc.conf(5) variable
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         101268
>Category:       conf
>Synopsis:       [patch] /etc/rc.d/mixer should obey mixer_enable rc.conf(5) variable
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    flz
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 02 15:50:13 GMT 2006
>Closed-Date:    Mon Jan 22 17:51:43 GMT 2007
>Last-Modified:  Mon Jan 22 18:00:44 GMT 2007
>Originator:     Eugene Grosbein
>Release:        FreeBSD 6.1-STABLE i386
>Organization:
Svyaz Service JSC
>Environment:
System: FreeBSD grosbein.pp.ru 6.1-STABLE FreeBSD 6.1-STABLE #5: Tue Jul 25 20:15:31 KRAST 2006 eu@grosbein.pp.ru:/mnt/tmp/obj/usr/local/src/sys/DADV i386
	i975XBX motherboard with onboard Intel HDA (azalia)

>Description:
	There is no way to prevent /etc/rc.d/mixer from working
	when it sees /dev/mixer* device nodes. However, there may be
	reasons to disable it. For example, i975XBX onboard audio is
	currently not supported by sound(4) audio device infrastructure.
	One can use OSS drivers to make it work but /usr/sbin/mixer
	used by /etc/rc.d/mixer cannot work with OSS's /dev/mixer* nodes.
	Hence, /etc/rc.d/mixer issues lots of errors while running
	and should be disabled.

>How-To-Repeat:
	Boot FreeBSD 6.1 using i975XBX motherboard,
	install and activate OSS driver for onboard audio.
	/etc/rc.d/mixer will see /dev/mixer* devices at shutdown time
	and will try to work with them (hopelessly).

	The following patch introduces the "mixer_enable" rc.conf(5)
	variable that defaults to the value "YES". One may use
	mixer_enable="NO" to disable stock mixer management
	and use compatible version, if any.

>Fix:

--- src/etc/rc.d/mixer.orig	Fri Feb 17 19:30:14 2006
+++ src/etc/rc.d/mixer	Wed Aug  2 23:27:23 2006
@@ -38,6 +38,7 @@
 start_cmd="mixer_start"
 reload_cmd="mixer_start"
 extra_commands="reload"
+: ${mixer_enable:=YES}
 
 #
 # List current mixer devices to stdout.
@@ -81,6 +82,7 @@
 {
 	local mixer
 
+	checkyesno mixer_enable || return
 	for mixer in `list_mixers`; do
 		mixer_restore ${mixer}
 	done
@@ -93,6 +95,7 @@
 {
 	local mixer
 
+	checkyesno mixer_enable || return
 	for mixer in `list_mixers`; do
 		mixer_save ${mixer}
 	done

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: flz 
State-Changed-When: Fri Oct 6 23:23:22 UTC 2006 
State-Changed-Why:  
I just committed a reworked patch and some documentation. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: conf/101268: commit references a PR
Date: Fri,  6 Oct 2006 23:22:29 +0000 (UTC)

 flz         2006-10-06 23:22:13 UTC
 
   FreeBSD src repository
 
   Modified files:
     etc/defaults         rc.conf 
     etc/rc.d             mixer 
     share/man/man5       rc.conf.5 
   Log:
   Introduce mixer_enable (default: YES).
   
   PR:             conf/101268
   Submitted by:   Eugene Grosbein <eugen@grosbein.pp.ru>
   Approved by:    cperciva (mentor)
   X-MFC after:    6.2-RELEASE
   Sponsored by:   FreeBSD Test-Bugathon
   
   Revision  Changes    Path
   1.298     +1 -0      src/etc/defaults/rc.conf
   1.7       +1 -0      src/etc/rc.d/mixer
   1.308     +7 -1      src/share/man/man5/rc.conf.5
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: closed->patched 
State-Changed-By: flz 
State-Changed-When: Sat Oct 7 10:14:15 UTC 2006 
State-Changed-Why:  
That's the ports reflex, killing PR. This one is only dying. 
I'll hopefully close it after the freeze. 


Responsible-Changed-From-To: freebsd-bugs->flz 
Responsible-Changed-By: flz 
Responsible-Changed-When: Sat Oct 7 10:14:15 UTC 2006 
Responsible-Changed-Why:  
That's the ports reflex, killing PR. This one is only dying. 
I'll hopefully close it after the freeze. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=101268 
State-Changed-From-To: patched->closed 
State-Changed-By: flz 
State-Changed-When: Mon Jan 22 17:51:23 UTC 2007 
State-Changed-Why:  
MFC'ed to RELENG_6. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: conf/101268: commit references a PR
Date: Mon, 22 Jan 2007 17:51:33 +0000 (UTC)

 flz         2007-01-22 17:51:17 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_6)
     etc/rc.d             mixer 
     share/man/man5       rc.conf.5 
     etc/defaults         rc.conf 
   Log:
   MFC: Introduce mixer_enable (default: YES).
   
         src/etc/rc.d/mixer: rev 1.6 -> 1.7
         src/share/man/man5/rc.conf.5: rev 1.307 -> 1.308
         src/etc/defaults/rc.conf: rev 1.297 -> 1.298
   
   PR:             conf/101268
   Submitted by:   Eugene Grosbein <eugen@grosbein.pp.ru>
   
   Revision    Changes    Path
   1.252.2.29  +1 -0      src/etc/defaults/rc.conf
   1.5.2.2     +1 -0      src/etc/rc.d/mixer
   1.256.2.28  +7 -1      src/share/man/man5/rc.conf.5
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
