[alsa-devel] CONFIG_SND_DEBUG

Alan Stern stern at rowland.harvard.edu
Wed Jun 5 16:11:12 CEST 2013


On Wed, 5 Jun 2013, Takashi Iwai wrote:

> > >> Andy/Leann - apparently CONFIG_SND_DEBUG is on by default from
> > >> upstream, and we explicitly disable it. Is there any reason why we
> > >> do that?
> > >
> > > config SND_DEBUG
> > >          bool "Debug"
> > >          help
> > >            Say Y here to enable ALSA debug code.
> > >
> > > It is off by default in upstream, and the really helpful description
> > > would cirtainly tend to lead to it being disabled.  But if it is helpful
> > > to your debugging efforts David then I suspect we can enable it in Saucy
> > > and see what happens.
> > 
> > Okay, so then the ball is back in Takashi's area - if we're recommended 
> > to turn CONFIG_SND_DEBUG on, why is it off by default in the upstream 
> > Linux kernel?
> 
> It's not off as default.  Simply there is no default, just like most
> of other options.
> 
> As already mentioned, if the device is known to work well with the
> kernel, there is no reason to set it on.  Then it'll saves the memory
> and code space.  That is, for custom kernels, it's good to be off.
> But for generic kernels like distro kernel, it'd be better to take a
> safer side with more safety checks that is built in by that option.

Given this description, the symbol's name is very misleading.  Instead 
of being called CONFIG_SND_DEBUG, it should be called 
CONFIG_SND_SAFETY_CHECKS or something like that.

IMO, distributions are completely justified in turning off any symbol 
which is named (and described in the help text!) as being used for 
debugging only.

Alan Stern



More information about the Alsa-devel mailing list