mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: rt766: fix HID dependency for SND_SOC_SDCA_HID
@ 2026-09-15 21:16 Arnd Bergmann
  2026-09-16 15:10 ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2026-09-15 21:16 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Charles Keepax, Shuming Fan
  Cc: Arnd Bergmann, Richard Fitzgerald, Srinivas Kandagatla,
	Niranjan H Y, Ajay Kumar Nandam, Alexey Klimov, Julian Braha,
	Peng Fan, Andy Shevchenko, linux-sound, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

Selecting SND_SOC_SDCA_HID only works if HID is enabled:

WARNING: unmet direct dependencies detected for SND_SOC_SDCA_HID
  Depends on [n]: SOUND [=y] && SND [=y] && SND_SOC [=y] && SND_SOC_SDCA [=y] && (HID [=n]=y [=y] || HID [=n]=SND_SOC_SDCA [=y])
  Selected by [y]:
  - SND_SOC_RT766_SDCA_SDW [=y] && SOUND [=y] && SND [=y] && SND_SOC [=y] && SOUNDWIRE [=y] && SND_SOC_SDCA [=y]

Add this an a dependency to SND_SOC_RT766_SDCA_SDW as well.

Fixes: b50ecf5873df ("ASoC: rt766: add RT766/RT767 SDCA driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/soc/codecs/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index d3730c4da51b..35879cf79472 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -1992,6 +1992,7 @@ config SND_SOC_RT766_SDCA_SDW
 	tristate "Realtek RT766 SDCA Codec - SDW"
 	depends on SOUNDWIRE
 	depends on SND_SOC_SDCA
+	depends on HID
 	select SND_SOC_SDCA_HID
 	select SND_SOC_SDCA_IRQ
 	select REGMAP_SOUNDWIRE
-- 
2.53.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ASoC: rt766: fix HID dependency for SND_SOC_SDCA_HID
  2026-09-15 21:16 [PATCH] ASoC: rt766: fix HID dependency for SND_SOC_SDCA_HID Arnd Bergmann
@ 2026-09-16 15:10 ` Mark Brown
  2026-09-16 15:29   ` Andy Shevchenko
  2026-09-16 15:36   ` Arnd Bergmann
  0 siblings, 2 replies; 6+ messages in thread
From: Mark Brown @ 2026-09-16 15:10 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Charles Keepax,
	Shuming Fan, Arnd Bergmann, Richard Fitzgerald,
	Srinivas Kandagatla, Niranjan H Y, Ajay Kumar Nandam,
	Alexey Klimov, Julian Braha, Peng Fan, Andy Shevchenko,
	linux-sound, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 704 bytes --]

On Tue, Sep 15, 2026 at 11:16:34PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>

> Selecting SND_SOC_SDCA_HID only works if HID is enabled:

> --- a/sound/soc/codecs/Kconfig
> +++ b/sound/soc/codecs/Kconfig
> @@ -1992,6 +1992,7 @@ config SND_SOC_RT766_SDCA_SDW
>  	tristate "Realtek RT766 SDCA Codec - SDW"
>  	depends on SOUNDWIRE
>  	depends on SND_SOC_SDCA
> +	depends on HID
>  	select SND_SOC_SDCA_HID
>  	select SND_SOC_SDCA_IRQ
>  	select REGMAP_SOUNDWIRE

Should that be HID=y || HID=SND_SOC_SDCA like for SND_SOC_SDCA_HID and
SND_SOC_SDCA_CLASS?  The dependencies on _CLASS should stop the
problematic cases from actually occurring but I'm not sure if it stops
the warning.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ASoC: rt766: fix HID dependency for SND_SOC_SDCA_HID
  2026-09-16 15:10 ` Mark Brown
@ 2026-09-16 15:29   ` Andy Shevchenko
  2026-09-16 15:36   ` Arnd Bergmann
  1 sibling, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2026-09-16 15:29 UTC (permalink / raw)
  To: Mark Brown
  Cc: Arnd Bergmann, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	Charles Keepax, Shuming Fan, Arnd Bergmann, Richard Fitzgerald,
	Srinivas Kandagatla, Niranjan H Y, Ajay Kumar Nandam,
	Alexey Klimov, Julian Braha, Peng Fan, linux-sound, linux-kernel

On Wed, Sep 16, 2026 at 04:10:08PM +0100, Mark Brown wrote:
> On Tue, Sep 15, 2026 at 11:16:34PM +0200, Arnd Bergmann wrote:

...

> > config SND_SOC_RT766_SDCA_SDW
> >  	tristate "Realtek RT766 SDCA Codec - SDW"
> >  	depends on SOUNDWIRE
> >  	depends on SND_SOC_SDCA
> > +	depends on HID
> >  	select SND_SOC_SDCA_HID
> >  	select SND_SOC_SDCA_IRQ
> >  	select REGMAP_SOUNDWIRE
> 
> Should that be HID=y || HID=SND_SOC_SDCA like for SND_SOC_SDCA_HID and
> SND_SOC_SDCA_CLASS?  The dependencies on _CLASS should stop the
> problematic cases from actually occurring but I'm not sure if it stops
> the warning.

(Based just on this comment without looking into details) there is also
'depends on FOO if BAR' syntax that might be useful.


-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ASoC: rt766: fix HID dependency for SND_SOC_SDCA_HID
  2026-09-16 15:10 ` Mark Brown
  2026-09-16 15:29   ` Andy Shevchenko
@ 2026-09-16 15:36   ` Arnd Bergmann
  2026-09-16 15:54     ` Charles Keepax
  2026-09-16 15:58     ` Mark Brown
  1 sibling, 2 replies; 6+ messages in thread
From: Arnd Bergmann @ 2026-09-16 15:36 UTC (permalink / raw)
  To: Mark Brown, Arnd Bergmann
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Charles Keepax,
	Shuming Fan, Richard Fitzgerald, Srinivas Kandagatla,
	Niranjan H Y, Ajay Kumar Nandam, Alexey Klimov, Julian Braha,
	Peng Fan, Andy Shevchenko, linux-sound, linux-kernel

On Wed, Sep 16, 2026, at 17:10, Mark Brown wrote:
> On Tue, Sep 15, 2026 at 11:16:34PM +0200, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>
>> Selecting SND_SOC_SDCA_HID only works if HID is enabled:
>
>> --- a/sound/soc/codecs/Kconfig
>> +++ b/sound/soc/codecs/Kconfig
>> @@ -1992,6 +1992,7 @@ config SND_SOC_RT766_SDCA_SDW
>>  	tristate "Realtek RT766 SDCA Codec - SDW"
>>  	depends on SOUNDWIRE
>>  	depends on SND_SOC_SDCA
>> +	depends on HID
>>  	select SND_SOC_SDCA_HID
>>  	select SND_SOC_SDCA_IRQ
>>  	select REGMAP_SOUNDWIRE
>
> Should that be HID=y || HID=SND_SOC_SDCA like for SND_SOC_SDCA_HID and
> SND_SOC_SDCA_CLASS?  The dependencies on _CLASS should stop the
> problematic cases from actually occurring but I'm not sure if it stops
> the warning.

Yes. Just as I was trying to write up my presentation slides for next
week trying to explain how nobody ever gets this right, you have reminded
me that I can't do it either ;-)

How about this version?

diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 181ed1b8a6dc..f88381523ea3 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -1991,10 +1991,7 @@ config SND_SOC_RT715_SDCA_SDW
 config SND_SOC_RT766_SDCA_SDW
 	tristate "Realtek RT766 SDCA Codec - SDW"
 	depends on SOUNDWIRE
-	depends on SND_SOC_SDCA
-	depends on HID
-	select SND_SOC_SDCA_HID
-	select SND_SOC_SDCA_IRQ
+	depends on SND_SOC_SDCA_CLASS
 	select REGMAP_SOUNDWIRE
 	select REGMAP_SOUNDWIRE_MBQ
 
I think this is much clearer than the original version or my
first patch, as it avoids the fragile 'select'. If you like this
one, I'll send a v2 after this passes some more randconfig testing,
or you can apply that directly.

      Arnd

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ASoC: rt766: fix HID dependency for SND_SOC_SDCA_HID
  2026-09-16 15:36   ` Arnd Bergmann
@ 2026-09-16 15:54     ` Charles Keepax
  2026-09-16 15:58     ` Mark Brown
  1 sibling, 0 replies; 6+ messages in thread
From: Charles Keepax @ 2026-09-16 15:54 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Mark Brown, Arnd Bergmann, Liam Girdwood, Jaroslav Kysela,
	Takashi Iwai, Shuming Fan, Richard Fitzgerald,
	Srinivas Kandagatla, Niranjan H Y, Ajay Kumar Nandam,
	Alexey Klimov, Julian Braha, Peng Fan, Andy Shevchenko,
	linux-sound, linux-kernel

On Wed, Sep 16, 2026 at 05:36:02PM +0200, Arnd Bergmann wrote:
> On Wed, Sep 16, 2026, at 17:10, Mark Brown wrote:
> > On Tue, Sep 15, 2026 at 11:16:34PM +0200, Arnd Bergmann wrote:
> >> Selecting SND_SOC_SDCA_HID only works if HID is enabled:
> >
> >> --- a/sound/soc/codecs/Kconfig
> >> +++ b/sound/soc/codecs/Kconfig
> >> @@ -1992,6 +1992,7 @@ config SND_SOC_RT766_SDCA_SDW
> >>  	tristate "Realtek RT766 SDCA Codec - SDW"
> >>  	depends on SOUNDWIRE
> >>  	depends on SND_SOC_SDCA
> >> +	depends on HID
> >>  	select SND_SOC_SDCA_HID
> >>  	select SND_SOC_SDCA_IRQ
> >>  	select REGMAP_SOUNDWIRE
> >
> > Should that be HID=y || HID=SND_SOC_SDCA like for SND_SOC_SDCA_HID and
> > SND_SOC_SDCA_CLASS?  The dependencies on _CLASS should stop the
> > problematic cases from actually occurring but I'm not sure if it stops
> > the warning.
> 
> Yes. Just as I was trying to write up my presentation slides for next
> week trying to explain how nobody ever gets this right, you have reminded
> me that I can't do it either ;-)
> 
> How about this version?
> 
> diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> index 181ed1b8a6dc..f88381523ea3 100644
> --- a/sound/soc/codecs/Kconfig
> +++ b/sound/soc/codecs/Kconfig
> @@ -1991,10 +1991,7 @@ config SND_SOC_RT715_SDCA_SDW
>  config SND_SOC_RT766_SDCA_SDW
>  	tristate "Realtek RT766 SDCA Codec - SDW"
>  	depends on SOUNDWIRE
> -	depends on SND_SOC_SDCA
> -	depends on HID
> -	select SND_SOC_SDCA_HID
> -	select SND_SOC_SDCA_IRQ
> +	depends on SND_SOC_SDCA_CLASS
>  	select REGMAP_SOUNDWIRE
>  	select REGMAP_SOUNDWIRE_MBQ
>  
> I think this is much clearer than the original version or my
> first patch, as it avoids the fragile 'select'. If you like this
> one, I'll send a v2 after this passes some more randconfig testing,
> or you can apply that directly.

This seems a little odd though, as the driver doesn't actually
depend on SND_SOC_SDCA_CLASS. That builds in the actual class
driver, which this driver doesn't use, it only uses functions
from the SDCA library.

THanks,
Charles

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ASoC: rt766: fix HID dependency for SND_SOC_SDCA_HID
  2026-09-16 15:36   ` Arnd Bergmann
  2026-09-16 15:54     ` Charles Keepax
@ 2026-09-16 15:58     ` Mark Brown
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Brown @ 2026-09-16 15:58 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	Charles Keepax, Shuming Fan, Richard Fitzgerald,
	Srinivas Kandagatla, Niranjan H Y, Ajay Kumar Nandam,
	Alexey Klimov, Julian Braha, Peng Fan, Andy Shevchenko,
	linux-sound, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1084 bytes --]

On Wed, Sep 16, 2026 at 05:36:02PM +0200, Arnd Bergmann wrote:
> On Wed, Sep 16, 2026, at 17:10, Mark Brown wrote:
> > On Tue, Sep 15, 2026 at 11:16:34PM +0200, Arnd Bergmann wrote:

> >>  	depends on SOUNDWIRE
> >>  	depends on SND_SOC_SDCA
> >> +	depends on HID

> > Should that be HID=y || HID=SND_SOC_SDCA like for SND_SOC_SDCA_HID and
> > SND_SOC_SDCA_CLASS?  The dependencies on _CLASS should stop the
> > problematic cases from actually occurring but I'm not sure if it stops
> > the warning.

> Yes. Just as I was trying to write up my presentation slides for next
> week trying to explain how nobody ever gets this right, you have reminded
> me that I can't do it either ;-)

> How about this version?

...

> I think this is much clearer than the original version or my
> first patch, as it avoids the fragile 'select'. If you like this
> one, I'll send a v2 after this passes some more randconfig testing,
> or you can apply that directly.

Looks good to me but I'm not entirely confident in my Kconfig special
case knowledge, I'll wait for your new version after testing.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-16 15:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-15 21:16 [PATCH] ASoC: rt766: fix HID dependency for SND_SOC_SDCA_HID Arnd Bergmann
2026-09-16 15:10 ` Mark Brown
2026-09-16 15:29   ` Andy Shevchenko
2026-09-16 15:36   ` Arnd Bergmann
2026-09-16 15:54     ` Charles Keepax
2026-09-16 15:58     ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®