Re: [PATCH] ASoC: rt766: fix HID dependency for SND_SOC_SDCA_HID
From: Charles Keepax
Date: Wed Sep 16 2026 - 13:44:23 EST
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