Skip to contentSkip to conversation

drm: xlnx: zynqmp_dpsub: fix Kconfig dependencies for ASoC

PATCH In review Arnd Bergmann 2 participants 2 messages Feb 27, 2025 – Mar 12, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: xlnx: zynqmp_dpsub: fix Kconfig dependencies for ASoC

From: Arnd Bergmann <[email protected]>

The new audio code fails to build when sounds support is in a loadable module but the GPU driver is built-in:

x86_64-linux-ld: zynqmp_dp_audio.c:(.text+0x6a8): undefined reference to `devm_snd_soc_register_card'
x86_64-linux-ld: drivers/gpu/drm/xlnx/zynqmp_dp_audio.o:(.rodata+0x1bc): undefined reference to `snd_soc_info_volsw'
x86_64-linux-ld: drivers/gpu/drm/xlnx/zynqmp_dp_audio.o:(.rodata+0x1f0): undefined reference to `snd_soc_get_volsw'
x86_64-linux-ld: drivers/gpu/drm/xlnx/zynqmp_dp_audio.o:(.rodata+0x1f4): undefined reference to `snd_soc_put_volsw'

Change the Kconfig dependency to disallow the sound support in this configuration.

Fixes 3ec5c1579305 ("drm: xlnx: zynqmp_dpsub: Add DP audio support")
---
 drivers/gpu/drm/xlnx/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/xlnx/Kconfig +1 -0
index dbecca9bdd54..cfabf5e2a0bb 100644
@@ -22,6 +22,7 @@ config DRM_ZYNQMP_DPSUB_AUDIO
 	bool "ZynqMP DisplayPort Audio Support"
 	depends on DRM_ZYNQMP_DPSUB
 	depends on SND && SND_SOC
+	depends on SND_SOC=y || DRM_ZYNQMP_DPSUB=m
 	select SND_SOC_GENERIC_DMAENGINE_PCM
 	help
 	  Choose this option to enable DisplayPort audio support in the ZynqMP
Signature · 1 line
2.39.5
maintainer
#1 lore raw

Hi Arnd,

Quoted 24 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The new audio code fails to build when sounds support is in a loadable module but the GPU driver is built-in:

x86_64-linux-ld: zynqmp_dp_audio.c:(.text+0x6a8): undefined reference to `devm_snd_soc_register_card'
x86_64-linux-ld: drivers/gpu/drm/xlnx/zynqmp_dp_audio.o:(.rodata+0x1bc): undefined reference to `snd_soc_info_volsw'
x86_64-linux-ld: drivers/gpu/drm/xlnx/zynqmp_dp_audio.o:(.rodata+0x1f0): undefined reference to `snd_soc_get_volsw'
x86_64-linux-ld: drivers/gpu/drm/xlnx/zynqmp_dp_audio.o:(.rodata+0x1f4): undefined reference to `snd_soc_put_volsw'

Change the Kconfig dependency to disallow the sound support in this configuration.

Fixes 3ec5c1579305 ("drm: xlnx: zynqmp_dpsub: Add DP audio support")
---
  drivers/gpu/drm/xlnx/Kconfig | 1 +
  1 file changed, 1 insertion(+)
drivers/gpu/drm/xlnx/Kconfig +0 -0
index dbecca9bdd54..cfabf5e2a0bb 100644

drivers/gpu/drm/xlnx/Kconfig config DRM_ZYNQMP_DPSUB_AUDIO · line 28

Quoted 7 lines
drivers/gpu/drm/xlnx/Kconfig +1 -0
@@ -22,6 +22,7 @@ config DRM_ZYNQMP_DPSUB_AUDIO
  	bool "ZynqMP DisplayPort Audio Support"
  	depends on DRM_ZYNQMP_DPSUB
  	depends on SND && SND_SOC
+	depends on SND_SOC=y || DRM_ZYNQMP_DPSUB=m
  	select SND_SOC_GENERIC_DMAENGINE_PCM
  	help
  	  Choose this option to enable DisplayPort audio support in the ZynqMP

Thanks, pushing to drm-misc-next.

Tomi