Re: BUG in 2.6.22-rc2-mm1: Parts of Alsa sound architecture broken
From: Takashi Iwai
Date: Fri Jun 08 2007 - 05:50:10 EST
At Wed, 6 Jun 2007 21:53:08 +0200,
Sam Ravnborg wrote:
>
> On Wed, Jun 06, 2007 at 09:36:48PM +0200, Jens Axboe wrote:
> > On Tue, Jun 05 2007, Takashi Iwai wrote:
> > > At Tue, 5 Jun 2007 15:25:07 +0200 (MEST),
> > > Jan Engelhardt wrote:
> > > >
> > > >
> > > > >> > >Well, I find the change of CONFIG_SND to menuconfig is fine, too.
> > > > >> > >But CONFIG_SND_PCI_DRIVERS and others don't make much sense to me.
> > > > >> > >How is it useful at all?
> > > > >> >
> > > > >> > Hah, I just tell you some of my own experience.
> > > > >> > In summer 2003, I bought the last new machine, and it got these
> > > > >> > shiny new ports they like to call USB. :)
> > > > >> > I did not have much use for it, but I left it on - you never know
> > > > >> > what standard next is the big win of the decade. And actually,
> > > > >> > it did not took long (well, summer 2005) to get my first USB device.
> > > > >> > Still, I am hell as sure I do not have USB-based sound devices
> > > > >> > anytime soon, so it would be cool to deactivate the whole usbsound
> > > > >> > menu at once. I think I said that in the patch description, did not I?
> > > > >>
> > > > >> But it's not cool to add an extra config item just for that, too.
> > > > >> And, the structure of menuconfig-if-endif is uglier than menu-endmenu.
> > > > >> That's why I feel a bit uneasy, although all these are a matter of
> > > > >> taste...
> > > > >
> > > > >Forgot to mention about another annoying drawback. Because of the new
> > > > >CONFIG_SND_*_DRIVERS, you'll have to re-select all belonging
> > > > >CONFIG_SND_*, even via config oldconfig. Putting the dependency on
> > > > >the top seems to reset the values defined in the old .config.
> > > >
> > > > Well, *I* (previously) submitted patches with "default y", but Jens
> > > > Axboe [http://lkml.org/lkml/2007/5/12/164] disagreed heavily enough to
> > > > stop that practice.
> > >
> > > Hm, I guess Jens didn't know about this side-effect.
> > >
> > > When I don't set "default y", I'll be asked for each belonging item
> > > even though I chose "y" manually for the top config
> > > (CONFIG_*_DRIVERS).
> > >
> > > Strangely, setting "default y" has no this effect...
> >
> > That sounds like a bug in the kconfig system. I still think default y is
> > an *awful* idea, but you can read why in the thread referenced above.
> It is the functionality of "default y" that is not understood.
>
> Take the following simple Kconfig file:
>
> config FOO
> bool "FOO"
> default y
>
> config BAR
> bool "BAR"
>
> What would you expect when you execute "make oldconfig"?
> You would expect to be questioned about both symbols and pressing enter
> would give you the following config:
> CONFIG_FOO=y
> #CONFIG_BAR is not set
>
> So "default y" in the oldconfig case where we add a symbol gives the
> default value if you just press enter.
>
> If you use "make menuconfig" and just enter menuconfig and exit and save
> you will end up with exact same configuration as above because menuconfig
> will select default values for all new symbols.
>
> In other words "default y" has no impact on what oldconfig asks about,
> only what value will be assigned if user decide not to change the value.
> And this is exactly what it is supposed to do and no magic "do not ask user"
> thing. That can be solved by having correct dependencies so if the
> dependencies are not solved one will not be asked.
Well, then "default y" seems sensible for the new additions like this
case (adding a menuconfig top-dependency that was formerly a simple
menu).
Anyway, I think it's another problem of kconfig that it resets the old
values when a new top-config is introduced without "default y".
Assume the following kconfig:
menu "Foo"
depends on DOH
config BAR
bool "Bar"
depends on DOH
endmenu
and an old .config file
CONFIG_DOH=y
CONFIG_BAR=y
Now, replace menu with menuconfig:
menuconfig FOO
bool "Foo"
depends on DOH
if FOO
config BAR
bool "Bar"
endif
Run make oldconfig, and you'll be asked about FOO (as expected).
Answer y, then you'll be asked again about BAR, too.
But, if "default"y is added to FOO,
menuconfig FOO
bool "Foo"
default y
depends on DOH
then it asks about FOO, but it won't ask you about BAR.
Takashi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/