ASoC: SDCA: fix HID dependency
Subsystems (3)
PATCH 1/1 ASoC: SDCA: fix HID dependency
From: Arnd Bergmann <[email protected]>
It is not possible to enable SND_SOC_SDCA_HID when SND_SOC_SDCA is built-in but HID is in a loadable module, as that results in a link failure:
x86_64-linux-ld: sound/soc/sdca/sdca_functions.o: in function `find_sdca_entity_hide':
sdca_functions.c:(.text+0x25b): undefined reference to `sdca_add_hid_device'
Change SND_SOC_SDCA_HID into a 'bool' option that can only be enabled if this results in a working build, and change the Makefile so this driver is a loadable module if possible.
--- sound/soc/sdca/Kconfig | 3 ++- sound/soc/sdca/Makefile | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-)
sound/soc/sdca/Kconfig +2 -1
@@ -12,8 +12,9 @@ config SND_SOC_SDCA_OPTIONAL def_tristate SND_SOC_SDCA || !SND_SOC_SDCA config SND_SOC_SDCA_HID - tristate "SDCA HID support" + bool "SDCA HID support" depends on SND_SOC_SDCA && HID + depends on HID=y || HID=SND_SOC_SDCA config SND_SOC_SDCA_IRQ tristate
sound/soc/sdca/Makefile +3 -1
@@ -5,5 +5,7 @@ snd-soc-sdca-hid-y := sdca_hid.o snd-soc-sdca-irq-y := sdca_interrupts.o obj-$(CONFIG_SND_SOC_SDCA) += snd-soc-sdca.o -obj-$(CONFIG_SND_SOC_SDCA_HID) += snd-soc-sdca-hid.o +ifdef CONFIG_SND_SOC_SDCA_HID +obj-$(CONFIG_SND_SOC_SDCA) += snd-soc-sdca-hid.o +endif obj-$(CONFIG_SND_SOC_SDCA_IRQ) += snd-soc-sdca-irq.o
Signature · 1 line
2.39.5
Charles Keepax
maintainerQuoted 8 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
It is not possible to enable
SND_SOC_SDCA_HIDwhenSND_SOC_SDCAis built-in but HID is in a loadable module, as that results in a link failure:x86_64-linux-ld:
sound/soc/sdca/sdca_functions.o: in function `find_sdca_entity_hide':
sdca_functions.c:(.text+0x25b): undefined reference to `sdca_add_hid_device'
Quoted 7 lines
Change
SND_SOC_SDCA_HIDinto a 'bool' option that can only be enabled if this results in a working build, and change theMakefileso this driver is a loadable module if possible.Fixes ac558015dfd8 ("ASoC: SDCA: add a HID device for HIDE entity")Signed-off-by Arnd Bergmann <[email protected]>---
Thanks for spotting this.
Quoted 9 lines
sound/soc/sdca/Kconfig | 3 ++- sound/soc/sdca/Makefile | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-)sound/soc/sdca/Kconfig +0
-0
sound/soc/sdca/Kconfig config SND_SOC_SDCA_OPTIONAL · line 17
Quoted 7 lines
sound/soc/sdca/Kconfig +2
-1@@ -12,8 +12,9 @@ config SND_SOC_SDCA_OPTIONAL def_tristate SND_SOC_SDCA || !SND_SOC_SDCA config SND_SOC_SDCA_HID - tristate "SDCA HID support" + bool "SDCA HID support" depends on SND_SOC_SDCA && HID + depends on HID=y || HID=SND_SOC_SDCA
Does it perhaps make more sense to add a (HID || !HID) dependency on SND_SOC_SDCA and leave the dependencies here alone? I feel like that lets the Kconfig figure out the right settings for SND_SOC_SDCA automatically, rather than just disappearing the SDCA HID option when HID and SDCA are set incompatibly.
Quoted 8 lines
sound/soc/sdca/Kconfig +0
-0config SND_SOC_SDCA_IRQ tristatesound/soc/sdca/Makefile +0
-0
sound/soc/sdca/Makefile snd-soc-sdca-hid-y := sdca_hid.o · line 10
Quoted 7 lines
sound/soc/sdca/Makefile +3
-1@@ -5,5 +5,7 @@ snd-soc-sdca-hid-y := sdca_hid.o snd-soc-sdca-irq-y := sdca_interrupts.o obj-$(CONFIG_SND_SOC_SDCA) += snd-soc-sdca.o -obj-$(CONFIG_SND_SOC_SDCA_HID) += snd-soc-sdca-hid.o +ifdef CONFIG_SND_SOC_SDCA_HID +obj-$(CONFIG_SND_SOC_SDCA) += snd-soc-sdca-hid.o +endif
Yeah I think making HID more of an option on the module rather than a module in its own right makes a lot of sense.
We should probably do something similar with the IRQ stuff I will look at doing a patch for that once we have sorted this one.
Thanks,
Charles
Quoted 13 lines · Charles Keepax
sound/soc/sdca/Kconfig config SND_SOC_SDCA_OPTIONAL · line 17
Quoted 6 lines · Arnd Bergmann
config
SND_SOC_SDCA_HIDsound/soc/sdca/Kconfig +2
-1- tristate "SDCA HID support" + bool "SDCA HID support" depends on SND_SOC_SDCA && HID + depends on HID=y || HID=SND_SOC_SDCADoes it perhaps make more sense to add a (HID || !HID) dependency on
SND_SOC_SDCAand leave the dependencies here alone? I feel like that lets theKconfigfigure out the right settings forSND_SOC_SDCAautomatically, rather than just disappearing the SDCA HID option when HID and SDCA are set incompatibly.
The problem is that SND_SOC_SDCA is not a user-visible option but instead gets selected by SND_SOC_ACPI_INTEL_SDCA_QUIRKS, which itself gets selected indirectly.
It could work, but then the 'depends on HID || !HID' would need to be under SND_SST_ATOM_HIFI2_PLATFORM_ACPI and anything else that might select SND_SOC_ACPI_INTEL_MATCH, SND_SOC_ACPI_INTEL_SDCA_QUIRKS, or SND_SOC_SDCA in the future.
Arnd
Charles Keepax
maintainerQuoted 15 lines · Arnd Bergmann
Quoted 13 lines · Charles Keepax
sound/soc/sdca/Kconfig config SND_SOC_SDCA_OPTIONAL · line 17
Quoted 6 lines · Arnd Bergmann
config
SND_SOC_SDCA_HIDsound/soc/sdca/Kconfig +2
-1- tristate "SDCA HID support" + bool "SDCA HID support" depends on SND_SOC_SDCA && HID + depends on HID=y || HID=SND_SOC_SDCADoes it perhaps make more sense to add a (HID || !HID) dependency on
SND_SOC_SDCAand leave the dependencies here alone? I feel like that lets theKconfigfigure out the right settings forSND_SOC_SDCAautomatically, rather than just disappearing the SDCA HID option when HID and SDCA are set incompatibly.
Quoted 8 lines
The problem is that
SND_SOC_SDCAis not a user-visible option but instead gets selected bySND_SOC_ACPI_INTEL_SDCA_QUIRKS, which itself gets selected indirectly.It could work, but then the 'depends on HID || !HID' would need to be under
SND_SST_ATOM_HIFI2_PLATFORM_ACPIand anything else that might selectSND_SOC_ACPI_INTEL_MATCH,SND_SOC_ACPI_INTEL_SDCA_QUIRKS, orSND_SOC_SDCAin the future.
Ah yes I forgot things are selected by the Intel stuff, at least the double depends on HID can be changed though? ie.
depends on SND_SOC_SDCA
depends on HID=y || HID=SND_SOC_SDCA
Thanks,
Charles
Quoted 8 lines · Charles Keepax
Quoted 6 lines · Arnd Bergmann
Quoted 1 line · Charles Keepax
On Tue, Jul 08, 2025 at 08:46:06PM +0200, Arnd Bergmann wrote:
It could work, but then the 'depends on HID || !HID' would need to be under
SND_SST_ATOM_HIFI2_PLATFORM_ACPIand anything else that might selectSND_SOC_ACPI_INTEL_MATCH,SND_SOC_ACPI_INTEL_SDCA_QUIRKS, orSND_SOC_SDCAin the future.
Quoted 5 lines
Ah yes I forgot things are selected by the Intel stuff, at least the double depends on HID can be changed though? ie.
depends on
SND_SOC_SDCA
depends on HID=y || HID=SND_SOC_SDCA
Yes, that functionally the same, I wasn't sure which one you'd prefer. Let me know if I should send a v2.
Arnd
Quoted 9 lines · Arnd Bergmann
Quoted 8 lines · Charles Keepax
Quoted 6 lines · Arnd Bergmann
Quoted 1 line · Charles Keepax
On Tue, Jul 08, 2025 at 08:46:06PM +0200, Arnd Bergmann wrote:
It could work, but then the 'depends on HID || !HID' would need to be under
SND_SST_ATOM_HIFI2_PLATFORM_ACPIand anything else that might selectSND_SOC_ACPI_INTEL_MATCH,SND_SOC_ACPI_INTEL_SDCA_QUIRKS, orSND_SOC_SDCAin the future.
Quoted 8 lines
Quoted 5 lines
Ah yes I forgot things are selected by the Intel stuff, at least the double depends on HID can be changed though? ie.
depends on
SND_SOC_SDCA
depends on HID=y || HID=SND_SOC_SDCAYes, that functionally the same, I wasn't sure which one you'd prefer. Let me know if I should send a v2.
Yeah lets do a v2 without the duplicated depends and feel free to add:
Also thanks for the patience with my questions. I will have a look at moving the IRQ bits over to a similar scheme to keep things consisent and hopefully avoid future issues.
Thanks,
Charles
Mark Brown
maintainerQuoted 11 lines · Arnd Bergmann
It is not possible to enable
SND_SOC_SDCA_HIDwhenSND_SOC_SDCAis built-in but HID is in a loadable module, as that results in a link failure:x86_64-linux-ld:
sound/soc/sdca/sdca_functions.o: in function `find_sdca_entity_hide':
sdca_functions.c:(.text+0x25b): undefined reference to `sdca_add_hid_device'Change
SND_SOC_SDCA_HIDinto a 'bool' option that can only be enabled if this results in a working build, and change theMakefileso this driver is a loadable module if possible.[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: SDCA: fix HID dependency
commit: ad4655653a6c463026ed3c300e5fb34f39abff48
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