2021-08-02 19:08:33

by Nathan Chancellor

[permalink] [raw]
Subject: [PATCH] ASoC: Intel: boards: Fix CONFIG_SND_SOC_SDW_MOCKUP select

When CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH is enabled without
CONFIG_EXPERT, there is a Kconfig warning about unmet dependencies:

WARNING: unmet direct dependencies detected for SND_SOC_SDW_MOCKUP
Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] &&
EXPERT [=n] && SOUNDWIRE [=y]
Selected by [y]:
- SND_SOC_INTEL_SOUNDWIRE_SOF_MACH [=y] && ...

Selecting a symbol does not account for dependencies so if symbol A
selects symbol B which depends on symbol C, symbol B or its select of
symbol A should depend on symbol C as well.

Make the CONFIG_SND_SOC_SDW_MOCKUP select in
CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH depend on CONFIG_EXPERT as the
help text for CONFIG_SND_SOC_SDW_MOCKUP indicates it is intended to be a
development option.

Fixes: 0ccac3bcf356 ("ASoC: Intel: boards: sof_sdw: add SoundWire mockup codecs for tests")
Signed-off-by: Nathan Chancellor <[email protected]>
---

An alternative here is if CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH wants
to unconditionally select CONFIG_SND_SOC_SDW_MOCKUP, the "depends on
EXPERT" can be moved to the prompt (tristate "..." if EXPERT). I am
happy to send a new patch if that is what is desired.

sound/soc/intel/boards/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/Kconfig b/sound/soc/intel/boards/Kconfig
index 046955bf717c..8284c46d7435 100644
--- a/sound/soc/intel/boards/Kconfig
+++ b/sound/soc/intel/boards/Kconfig
@@ -602,7 +602,7 @@ config SND_SOC_INTEL_SOUNDWIRE_SOF_MACH
select SND_SOC_DMIC
select SND_SOC_INTEL_HDA_DSP_COMMON
select SND_SOC_INTEL_SOF_MAXIM_COMMON
- select SND_SOC_SDW_MOCKUP
+ select SND_SOC_SDW_MOCKUP if EXPERT
help
Add support for Intel SoundWire-based platforms connected to
MAX98373, RT700, RT711, RT1308 and RT715

base-commit: 170c0d7460fc4aa522995ae4096b5a442f50a1fc
--
2.32.0.264.g75ae10bc75



2021-08-02 21:09:40

by Pierre-Louis Bossart

[permalink] [raw]
Subject: Re: [PATCH] ASoC: Intel: boards: Fix CONFIG_SND_SOC_SDW_MOCKUP select



On 8/2/21 2:03 PM, Nathan Chancellor wrote:
> When CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH is enabled without
> CONFIG_EXPERT, there is a Kconfig warning about unmet dependencies:
>
> WARNING: unmet direct dependencies detected for SND_SOC_SDW_MOCKUP
> Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] &&
> EXPERT [=n] && SOUNDWIRE [=y]
> Selected by [y]:
> - SND_SOC_INTEL_SOUNDWIRE_SOF_MACH [=y] && ...
>
> Selecting a symbol does not account for dependencies so if symbol A
> selects symbol B which depends on symbol C, symbol B or its select of
> symbol A should depend on symbol C as well.
>
> Make the CONFIG_SND_SOC_SDW_MOCKUP select in
> CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH depend on CONFIG_EXPERT as the
> help text for CONFIG_SND_SOC_SDW_MOCKUP indicates it is intended to be a
> development option.
>
> Fixes: 0ccac3bcf356 ("ASoC: Intel: boards: sof_sdw: add SoundWire mockup codecs for tests")
> Signed-off-by: Nathan Chancellor <[email protected]>
> ---
>
> An alternative here is if CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH wants
> to unconditionally select CONFIG_SND_SOC_SDW_MOCKUP, the "depends on
> EXPERT" can be moved to the prompt (tristate "..." if EXPERT). I am
> happy to send a new patch if that is what is desired.

Thanks for the patch Nathan, I added this depends on EXPERT and forgot
about it when I updated the machine driver.

Maybe a better alternate would be

imply SND_SOC_SDW_MOCKUP

We don't necessarily want the EXPERT part to be shown in the machine
driver lists.


>
> sound/soc/intel/boards/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/intel/boards/Kconfig b/sound/soc/intel/boards/Kconfig
> index 046955bf717c..8284c46d7435 100644
> --- a/sound/soc/intel/boards/Kconfig
> +++ b/sound/soc/intel/boards/Kconfig
> @@ -602,7 +602,7 @@ config SND_SOC_INTEL_SOUNDWIRE_SOF_MACH
> select SND_SOC_DMIC
> select SND_SOC_INTEL_HDA_DSP_COMMON
> select SND_SOC_INTEL_SOF_MAXIM_COMMON
> - select SND_SOC_SDW_MOCKUP
> + select SND_SOC_SDW_MOCKUP if EXPERT
> help
> Add support for Intel SoundWire-based platforms connected to
> MAX98373, RT700, RT711, RT1308 and RT715
>
> base-commit: 170c0d7460fc4aa522995ae4096b5a442f50a1fc
>

2021-08-02 21:26:15

by Nathan Chancellor

[permalink] [raw]
Subject: [PATCH v2] ASoC: Intel: boards: Fix CONFIG_SND_SOC_SDW_MOCKUP select

When CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH is enabled without
CONFIG_EXPERT, there is a Kconfig warning about unmet dependencies:

WARNING: unmet direct dependencies detected for SND_SOC_SDW_MOCKUP
Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] &&
EXPERT [=n] && SOUNDWIRE [=y]
Selected by [y]:
- SND_SOC_INTEL_SOUNDWIRE_SOF_MACH [=y] && ...

Selecting a symbol does not account for dependencies. There are three
ways to resolve this:

1. Make CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH select
CONFIG_SND_SOC_SDW_MOCKUP only if CONFIG_EXPERT is set.

2. Make CONFIG_SND_SOC_SDW_MOCKUP's prompt depend on CONFIG_EXPERT so
that it can be selected by options that only depend on
CONFIG_SOUNDWIRE but still appear as a prompt to the user when
CONFIG_EXPERT is set.

3. Make CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH imply
CONFIG_SND_SOC_SDW_MOCKUP, which will select
CONFIG_SND_SOC_SDW_MOCKUP when its dependencies are enabled but still
allow the user to disable it.

Go with the third option as it gives the most flexibility while
retaining the original intent of the select.

Fixes: 0ccac3bcf356 ("ASoC: Intel: boards: sof_sdw: add SoundWire mockup codecs for tests")
Suggested-by: Pierre-Louis Bossart <[email protected]>
Signed-off-by: Nathan Chancellor <[email protected]>
---

v1 -> v2:

* Switch to imply rather than select ... if ... (Pierre-Louis).

* Reword commit message to explain different solutions rather than
explain the problem in depth.

sound/soc/intel/boards/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/Kconfig b/sound/soc/intel/boards/Kconfig
index 046955bf717c..61b71d6c44cf 100644
--- a/sound/soc/intel/boards/Kconfig
+++ b/sound/soc/intel/boards/Kconfig
@@ -602,7 +602,7 @@ config SND_SOC_INTEL_SOUNDWIRE_SOF_MACH
select SND_SOC_DMIC
select SND_SOC_INTEL_HDA_DSP_COMMON
select SND_SOC_INTEL_SOF_MAXIM_COMMON
- select SND_SOC_SDW_MOCKUP
+ imply SND_SOC_SDW_MOCKUP
help
Add support for Intel SoundWire-based platforms connected to
MAX98373, RT700, RT711, RT1308 and RT715

base-commit: 170c0d7460fc4aa522995ae4096b5a442f50a1fc
--
2.32.0.264.g75ae10bc75


2021-09-02 15:07:01

by Pierre-Louis Bossart

[permalink] [raw]
Subject: Re: [PATCH v2] ASoC: Intel: boards: Fix CONFIG_SND_SOC_SDW_MOCKUP select



On 8/2/21 4:24 PM, Nathan Chancellor wrote:
> When CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH is enabled without
> CONFIG_EXPERT, there is a Kconfig warning about unmet dependencies:
>
> WARNING: unmet direct dependencies detected for SND_SOC_SDW_MOCKUP
> Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] &&
> EXPERT [=n] && SOUNDWIRE [=y]
> Selected by [y]:
> - SND_SOC_INTEL_SOUNDWIRE_SOF_MACH [=y] && ...
>
> Selecting a symbol does not account for dependencies. There are three
> ways to resolve this:
>
> 1. Make CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH select
> CONFIG_SND_SOC_SDW_MOCKUP only if CONFIG_EXPERT is set.
>
> 2. Make CONFIG_SND_SOC_SDW_MOCKUP's prompt depend on CONFIG_EXPERT so
> that it can be selected by options that only depend on
> CONFIG_SOUNDWIRE but still appear as a prompt to the user when
> CONFIG_EXPERT is set.
>
> 3. Make CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH imply
> CONFIG_SND_SOC_SDW_MOCKUP, which will select
> CONFIG_SND_SOC_SDW_MOCKUP when its dependencies are enabled but still
> allow the user to disable it.
>
> Go with the third option as it gives the most flexibility while
> retaining the original intent of the select.
>
> Fixes: 0ccac3bcf356 ("ASoC: Intel: boards: sof_sdw: add SoundWire mockup codecs for tests")
> Suggested-by: Pierre-Louis Bossart <[email protected]>
> Signed-off-by: Nathan Chancellor <[email protected]>

This patch was missed, maybe because I didn't provide a formal ack on my
own suggestion, so here goes:

Acked-by: Pierre-Louis Bossart <[email protected]>

Mark, can you add it to 5.15 fixes please? Thank you.
-Pierre

2021-09-02 20:06:04

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v2] ASoC: Intel: boards: Fix CONFIG_SND_SOC_SDW_MOCKUP select

On Thu, Sep 02, 2021 at 10:02:18AM -0500, Pierre-Louis Bossart wrote:
> On 8/2/21 4:24 PM, Nathan Chancellor wrote:
> > When CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH is enabled without
> > CONFIG_EXPERT, there is a Kconfig warning about unmet dependencies:

> > Signed-off-by: Nathan Chancellor <[email protected]>

> This patch was missed, maybe because I didn't provide a formal ack on my
> own suggestion, so here goes:

> Acked-by: Pierre-Louis Bossart <[email protected]>

It looks like this was sent in reply to an old thread so got deleted
along with the old thread. In any case I don't have it any more...


Attachments:
(No filename) (647.00 B)
signature.asc (499.00 B)
Download all attachments

2021-09-03 00:42:30

by Nathan Chancellor

[permalink] [raw]
Subject: [PATCH for-5.15 v3] ASoC: Intel: boards: Fix CONFIG_SND_SOC_SDW_MOCKUP select

When CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH is enabled without
CONFIG_EXPERT, there is a Kconfig warning about unmet dependencies:

WARNING: unmet direct dependencies detected for SND_SOC_SDW_MOCKUP
Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] &&
EXPERT [=n] && SOUNDWIRE [=y]
Selected by [y]:
- SND_SOC_INTEL_SOUNDWIRE_SOF_MACH [=y] && ...

Selecting a symbol does not account for dependencies. There are three
ways to resolve this:

1. Make CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH select
CONFIG_SND_SOC_SDW_MOCKUP only if CONFIG_EXPERT is set.

2. Make CONFIG_SND_SOC_SDW_MOCKUP's prompt depend on CONFIG_EXPERT so
that it can be selected by options that only depend on
CONFIG_SOUNDWIRE but still appear as a prompt to the user when
CONFIG_EXPERT is set.

3. Make CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH imply
CONFIG_SND_SOC_SDW_MOCKUP, which will select
CONFIG_SND_SOC_SDW_MOCKUP when its dependencies are enabled but still
allow the user to disable it.

Go with the third option as it gives the most flexibility while
retaining the original intent of the select.

Fixes: 0ccac3bcf356 ("ASoC: Intel: boards: sof_sdw: add SoundWire mockup codecs for tests")
Suggested-by: Pierre-Louis Bossart <[email protected]>
Acked-by: Pierre-Louis Bossart <[email protected]>
Signed-off-by: Nathan Chancellor <[email protected]>
---

v2 -> v3:

* Rebase on current for-5.15.

* Add Ack tag from Pierre-Louis.

v1 -> v2:

* Switch to imply rather than select ... if ... (Pierre-Louis).

* Reword commit message to explain different solutions rather than
explain the problem in depth.

sound/soc/intel/boards/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/Kconfig b/sound/soc/intel/boards/Kconfig
index 046955bf717c..61b71d6c44cf 100644
--- a/sound/soc/intel/boards/Kconfig
+++ b/sound/soc/intel/boards/Kconfig
@@ -602,7 +602,7 @@ config SND_SOC_INTEL_SOUNDWIRE_SOF_MACH
select SND_SOC_DMIC
select SND_SOC_INTEL_HDA_DSP_COMMON
select SND_SOC_INTEL_SOF_MAXIM_COMMON
- select SND_SOC_SDW_MOCKUP
+ imply SND_SOC_SDW_MOCKUP
help
Add support for Intel SoundWire-based platforms connected to
MAX98373, RT700, RT711, RT1308 and RT715

base-commit: 4f89ff026ddbaab49dba993ad2dc757920d0ad49
--
2.33.0

2021-09-03 10:29:57

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH for-5.15 v3] ASoC: Intel: boards: Fix CONFIG_SND_SOC_SDW_MOCKUP select

On Thu, Sep 02, 2021 at 11:12:18AM -0700, Nathan Chancellor wrote:
> When CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH is enabled without
> CONFIG_EXPERT, there is a Kconfig warning about unmet dependencies:

To repeat what I already said in this thread: the reason this will have
got buried last time is that you sent the prior version in reply to an
old thread. This new version has also been sent in reply to an old
thread which almost had the same effect. Please stop doing that, and
also please pay attention to feedback.

Please don't send new patches in reply to old patches or serieses, this
makes it harder for both people and tools to understand what is going
on - it can bury things in mailboxes and make it difficult to keep track
of what current patches are, both for the new patches and the old ones.


Attachments:
(No filename) (826.00 B)
signature.asc (499.00 B)
Download all attachments

2021-09-03 15:18:13

by Nathan Chancellor

[permalink] [raw]
Subject: Re: [PATCH for-5.15 v3] ASoC: Intel: boards: Fix CONFIG_SND_SOC_SDW_MOCKUP select

On Fri, Sep 03, 2021 at 11:27:38AM +0100, Mark Brown wrote:
> On Thu, Sep 02, 2021 at 11:12:18AM -0700, Nathan Chancellor wrote:
> > When CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH is enabled without
> > CONFIG_EXPERT, there is a Kconfig warning about unmet dependencies:
>
> To repeat what I already said in this thread: the reason this will have
> got buried last time is that you sent the prior version in reply to an
> old thread. This new version has also been sent in reply to an old
> thread which almost had the same effect. Please stop doing that, and
> also please pay attention to feedback.

Sorry, I was not meaning to ignore feedback. I interpreted "this was
sent in reply..." as "Pierre-Louis's message was sent in reply..." not
"the v2 patch was sent in reply...".

> Please don't send new patches in reply to old patches or serieses, this
> makes it harder for both people and tools to understand what is going
> on - it can bury things in mailboxes and make it difficult to keep track
> of what current patches are, both for the new patches and the old ones.

For the record, the documentation for sending patches has the "Explicit
In-Reply-To headers" section, which frowns on doing this for multi-patch
series but never mentions this for single patches. I have never had a
maintainer complain about me doing this in the over three years that I
have been doing this. It is helpful for me as a developer to see the
review history of a patch at times so keeping them altogether is nice
but if this is going to be a problem, I'll just get in the habit of
providing links to the previous postings on lore.kernel.org in the
changelog section. Maybe the documentation could be updated to frown
upon adding In-Reply-To headers to new versions of patches period? I can
draft up a patch to clarify that.

Do you want me to resend v3 without an In-Reply-To header or can you
pick it up as is?

Cheers,
Nathan

2021-09-03 16:19:51

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH for-5.15 v3] ASoC: Intel: boards: Fix CONFIG_SND_SOC_SDW_MOCKUP select

On Thu, 2 Sep 2021 11:12:18 -0700, Nathan Chancellor wrote:
> When CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH is enabled without
> CONFIG_EXPERT, there is a Kconfig warning about unmet dependencies:
>
> WARNING: unmet direct dependencies detected for SND_SOC_SDW_MOCKUP
> Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] &&
> EXPERT [=n] && SOUNDWIRE [=y]
> Selected by [y]:
> - SND_SOC_INTEL_SOUNDWIRE_SOF_MACH [=y] && ...
>
> [...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: Intel: boards: Fix CONFIG_SND_SOC_SDW_MOCKUP select
commit: b3dded7e2f98e2672deb9606514c0e13e3094640

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

2021-09-03 16:34:47

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH for-5.15 v3] ASoC: Intel: boards: Fix CONFIG_SND_SOC_SDW_MOCKUP select

On Fri, Sep 03, 2021 at 08:14:30AM -0700, Nathan Chancellor wrote:

> For the record, the documentation for sending patches has the "Explicit
> In-Reply-To headers" section, which frowns on doing this for multi-patch
> series but never mentions this for single patches. I have never had a
> maintainer complain about me doing this in the over three years that I

I don't *mind*, there's just a chance I won't notice a patch that
appears in the middle of a thread which submitters tend to mind - the
issue is that I'm blissfully unaware. It was more that you were doing
the exact same thing again in response to it being explicitly identified
as an issue.

> changelog section. Maybe the documentation could be updated to frown
> upon adding In-Reply-To headers to new versions of patches period? I can
> draft up a patch to clarify that.

Not everyone has a process which causes issues here (and even for me I'd
only notice if the old thread was still in my inbox), but I certainly
wouldn't be against it. Note that if you're trying to make everything
super rules based you also need to cover the case of people trying to
incrementally fix a series by sending new versions of patches in the
middle of it which is an even worse mess.


Attachments:
(No filename) (1.23 kB)
signature.asc (499.00 B)
Download all attachments