From owner-freebsd-current@FreeBSD.ORG Tue May 23 19:26:19 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C90D816AA35; Tue, 23 May 2006 19:26:19 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D17643D62; Tue, 23 May 2006 19:26:13 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [IPv6:::1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k4NJNtGB094018; Tue, 23 May 2006 13:23:55 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 23 May 2006 13:23:55 -0600 (MDT) Message-Id: <20060523.132355.21838169.imp@bsdimp.com> To: scottl@samsco.org From: Warner Losh In-Reply-To: <44735620.9080403@samsco.org> References: <4473336F.1030900@samsco.org> <20060523.112205.115998971.imp@bsdimp.com> <44735620.9080403@samsco.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-multimedia@freebsd.org, des@des.no, freebsd-current@freebsd.org, Alexander@Leidinger.net Subject: Re: Call for testing: emu10kx driver for Creative sound cards X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2006 19:26:27 -0000 From: Scott Long Subject: Re: Call for testing: emu10kx driver for Creative sound cards Date: Tue, 23 May 2006 12:36:16 -0600 > Warner Losh wrote: > > From: Scott Long > > Subject: Re: Call for testing: emu10kx driver for Creative sound ca= rds > > Date: Tue, 23 May 2006 10:08:15 -0600 > > = > > = > >>Dag-Erling Sm=F8rgrav wrote: > >> > >>>Alexander Leidinger writes: > >>> > >>> > >>>>Quoting des@des.no (Dag-Erling Sm=F8rgrav) (Tue, 23 May 2006 14:2= 6:58 +0200): > >>>> > >>>> > >>>>>Yuriy Tsibizov writes: > >>>>> > >>>>> > >>>>>>2. Complete mixer support. Some controls that can't fit into OS= S > >>>>>>mixer are available as sysctl under debug.emu10kxX. > >>>>> > >>>>>That is not the correct place for it. Please use the device's s= ysctl > >>>>>context (obtained with device_get_sysctl_ctx()) > >>>> > >>>>This was based upon a suggestion by me. We want to get rid of mos= t > >>>>sound related syscalls (at least those which belong into the real= m of > >>>>the user, and not into the realm of the administrator). Until we = have > >>>>an application and an interface, we have to life with the sysctls= , but > >>>>to let the users know that this is not an interface but a tempora= ry > >>>>workaround, it's put into the debug MIB. I hope we will not ship > >>>>7.0-RELEASE with any such sysctl (any help appreciated). > >>> > >>> > >>>Regardless, device-specific sysctl knobs belong in the individual > >>>device's sysctl context, which automatically places them in the > >>>correct location in the dev tree and automatically destroys them w= hen > >>>the device is destroyed. Please do not create further precedent f= or > >>>breaking this rule, no matter how good your intentions. > >>> > >>>DES > >> > >>The problem is that Alexander wants these sysctls to only be tempor= ary. > >>Recall that big thread from a month or two ago about treating sysct= ls > >>as an API, and how there was heavy disagreement over how to define > >>"stable" sysctls that apps could depend on? If a temporary set of = > >>sysctls get put under the dev tree, then it risks becoming permanen= t, > >>which is not what Alexander wants. So, either we need to decide wh= at > >>parts of the sysctl to define as stable, like I asked for in the = > >>previous thread, or we need to pretend that it's not a problem that= we > >>should address, and let you and Alexander continue to argue over th= e > >>'correct place'. > > = > > = > > Then put them under the right place, but create a subtree that's "t= mp" > > = > > In general, drivers should avoid using the debug.* space. > > = > > Warner > = > But that's the problem. You just announced a rule that is in conflic= t > with rules that others have announced. All I asked for was for the = > rules to be decided on and published, and I got pushback from people > who said either that all sysctls are part of the API, or that no rule= s > should exist and that everyone should just use careful judgement, so > long as their judgement is correct. Both of these stances are absurd= .= Drivers have no business using debug.* anymore. They should migrate to the new interface that has already been in use, like DES said. Putting them in debug* doesn't make them any more or less permanant. The driver should document what is published and isn't published (approved, etc) in its man page. In this case, adding a list of the 'blessed' sysctls to the appropriate man page with a warning that says that all others are for the convenience of the driver writer and may disapper would solve the problem. Putting them under 'temp' or 'tmp' would also be a strong hint, but isn't completely necessary. Warner