* [PATCH] ASoC: Hide TLV320AIC26 configuration option for non-OpenFirwmare users
@ 2008-10-13 16:38 Mark Brown
2008-10-13 17:33 ` Takashi Iwai
0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2008-10-13 16:38 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel, Mark Brown
Since Kconfig ignores dependencies on select and other users should
select SND_SOC_TLV320AIC26 we can add a dependency on the OpenFirmware
helper to avoid exposing the menu entry to users who can't benefit from
it.
Thanks to Takashi for the suggestion.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
sound/soc/codecs/Kconfig | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 4975d85..9242889 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -70,6 +70,9 @@ config SND_SOC_TLV320AIC23
config SND_SOC_TLV320AIC26
tristate "TI TLV320AIC26 Codec support"
depends on SPI
+ # Note the Kconfig doesn't enforce dependencies - this just
+ # prevents non-OF users seeing the tristate in menus.
+ depends on SND_SOC_OF_SIMPLE
config SND_SOC_TLV320AIC3X
tristate
--
1.5.6.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] ASoC: Hide TLV320AIC26 configuration option for non-OpenFirwmare users
2008-10-13 16:38 [PATCH] ASoC: Hide TLV320AIC26 configuration option for non-OpenFirwmare users Mark Brown
@ 2008-10-13 17:33 ` Takashi Iwai
2008-10-13 18:14 ` Mark Brown
0 siblings, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2008-10-13 17:33 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel
At Mon, 13 Oct 2008 17:38:34 +0100,
Mark Brown wrote:
>
> Since Kconfig ignores dependencies on select and other users should
> select SND_SOC_TLV320AIC26 we can add a dependency on the OpenFirmware
> helper to avoid exposing the menu entry to users who can't benefit from
> it.
Hmm, I'm afraid this may disable CONFIG_SND_SOC_TLV320AIC26 when
CONFIG_SND_SOC_OF_SIMPLE=n automatically, no?
> Thanks to Takashi for the suggestion.
Actually I proposed a wrong solution. What I meant was the form using
"if" instead of "depends on":
config SND_SOC_TLV320AIC26
tristate "TI TLV320AIC26 Codec support" if SND_SOC_OF_SIMPLE
...
In this way, the selectable item appears only when
CONFIG_SND_SOC_OF_SIMPLE is set. The other dependencies remain as
they are.
Takashi
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> sound/soc/codecs/Kconfig | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> index 4975d85..9242889 100644
> --- a/sound/soc/codecs/Kconfig
> +++ b/sound/soc/codecs/Kconfig
> @@ -70,6 +70,9 @@ config SND_SOC_TLV320AIC23
> config SND_SOC_TLV320AIC26
> tristate "TI TLV320AIC26 Codec support"
> depends on SPI
> + # Note the Kconfig doesn't enforce dependencies - this just
> + # prevents non-OF users seeing the tristate in menus.
> + depends on SND_SOC_OF_SIMPLE
>
> config SND_SOC_TLV320AIC3X
> tristate
> --
> 1.5.6.5
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ASoC: Hide TLV320AIC26 configuration option for non-OpenFirwmare users
2008-10-13 17:33 ` Takashi Iwai
@ 2008-10-13 18:14 ` Mark Brown
2008-10-13 18:16 ` Mark Brown
2008-10-14 5:47 ` Takashi Iwai
0 siblings, 2 replies; 7+ messages in thread
From: Mark Brown @ 2008-10-13 18:14 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
On Mon, Oct 13, 2008 at 07:33:01PM +0200, Takashi Iwai wrote:
> Hmm, I'm afraid this may disable CONFIG_SND_SOC_TLV320AIC26 when
> CONFIG_SND_SOC_OF_SIMPLE=n automatically, no?
Yes, I'd feared that too but it doesn't do that, at least not in my
testing - the dependencies are just completely ignored.
> > Thanks to Takashi for the suggestion.
> Actually I proposed a wrong solution. What I meant was the form using
> "if" instead of "depends on":
> config SND_SOC_TLV320AIC26
> tristate "TI TLV320AIC26 Codec support" if SND_SOC_OF_SIMPLE
> ...
> In this way, the selectable item appears only when
> CONFIG_SND_SOC_OF_SIMPLE is set. The other dependencies remain as
> they are.
Ah, yes. That seems to work too and is a bit neater, though still a bit
nasty since it looks like the tristate is conditional on the
OpenFirmware support now so it's still not entirely clear that the right
thing will happen. Updated patch coming in a moment.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] ASoC: Hide TLV320AIC26 configuration option for non-OpenFirwmare users
2008-10-13 18:14 ` Mark Brown
@ 2008-10-13 18:16 ` Mark Brown
2008-10-14 5:45 ` Takashi Iwai
2008-10-14 5:47 ` Takashi Iwai
1 sibling, 1 reply; 7+ messages in thread
From: Mark Brown @ 2008-10-13 18:16 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel, Mark Brown
Make the visibility of the tristate conditional on having the OpenFirmware
helper code enabed so that users who can't use it don't see the visible
option. Kconfig ignores dependencies for select so other users are
unaffected.
Thanks to Takashi for the suggestion.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
sound/soc/codecs/Kconfig | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 4975d85..38a0e3b 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -68,7 +68,7 @@ config SND_SOC_TLV320AIC23
depends on I2C
config SND_SOC_TLV320AIC26
- tristate "TI TLV320AIC26 Codec support"
+ tristate "TI TLV320AIC26 Codec support" if SND_SOC_OF_SIMPLE
depends on SPI
config SND_SOC_TLV320AIC3X
--
1.5.4.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] ASoC: Hide TLV320AIC26 configuration option for non-OpenFirwmare users
2008-10-13 18:16 ` Mark Brown
@ 2008-10-14 5:45 ` Takashi Iwai
0 siblings, 0 replies; 7+ messages in thread
From: Takashi Iwai @ 2008-10-14 5:45 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel
At Mon, 13 Oct 2008 19:16:14 +0100,
Mark Brown wrote:
>
> Make the visibility of the tristate conditional on having the OpenFirmware
> helper code enabed so that users who can't use it don't see the visible
> option. Kconfig ignores dependencies for select so other users are
> unaffected.
>
> Thanks to Takashi for the suggestion.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Applied now. Thanks.
Takashi
> ---
> sound/soc/codecs/Kconfig | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> index 4975d85..38a0e3b 100644
> --- a/sound/soc/codecs/Kconfig
> +++ b/sound/soc/codecs/Kconfig
> @@ -68,7 +68,7 @@ config SND_SOC_TLV320AIC23
> depends on I2C
>
> config SND_SOC_TLV320AIC26
> - tristate "TI TLV320AIC26 Codec support"
> + tristate "TI TLV320AIC26 Codec support" if SND_SOC_OF_SIMPLE
> depends on SPI
>
> config SND_SOC_TLV320AIC3X
> --
> 1.5.4.3
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] ASoC: Hide TLV320AIC26 configuration option for non-OpenFirwmare users
2008-10-13 18:14 ` Mark Brown
2008-10-13 18:16 ` Mark Brown
@ 2008-10-14 5:47 ` Takashi Iwai
2008-10-14 9:04 ` Mark Brown
1 sibling, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2008-10-14 5:47 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel
At Mon, 13 Oct 2008 19:14:58 +0100,
Mark Brown wrote:
>
> On Mon, Oct 13, 2008 at 07:33:01PM +0200, Takashi Iwai wrote:
>
> > Hmm, I'm afraid this may disable CONFIG_SND_SOC_TLV320AIC26 when
> > CONFIG_SND_SOC_OF_SIMPLE=n automatically, no?
>
> Yes, I'd feared that too but it doesn't do that, at least not in my
> testing - the dependencies are just completely ignored.
>
> > > Thanks to Takashi for the suggestion.
>
> > Actually I proposed a wrong solution. What I meant was the form using
> > "if" instead of "depends on":
>
> > config SND_SOC_TLV320AIC26
> > tristate "TI TLV320AIC26 Codec support" if SND_SOC_OF_SIMPLE
> > ...
>
> > In this way, the selectable item appears only when
> > CONFIG_SND_SOC_OF_SIMPLE is set. The other dependencies remain as
> > they are.
>
> Ah, yes. That seems to work too and is a bit neater, though still a bit
> nasty since it looks like the tristate is conditional on the
> OpenFirmware support now so it's still not entirely clear that the right
> thing will happen.
Well, this is a standard technique. You can find "if EMBEDDED" in
many Kconfig items, too.
Takashi
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-10-14 9:05 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-13 16:38 [PATCH] ASoC: Hide TLV320AIC26 configuration option for non-OpenFirwmare users Mark Brown
2008-10-13 17:33 ` Takashi Iwai
2008-10-13 18:14 ` Mark Brown
2008-10-13 18:16 ` Mark Brown
2008-10-14 5:45 ` Takashi Iwai
2008-10-14 5:47 ` Takashi Iwai
2008-10-14 9:04 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.