ASoC: SOF: amd: fix SND_AMD_SOUNDWIRE_ACPI dependencies
authorArnd Bergmann <arnd@arndb.de>
Sun, 4 Feb 2024 21:22:01 +0000 (22:22 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 5 Feb 2024 14:32:28 +0000 (14:32 +0000)
commit69f8336e2913f12795fa0ec986bf63a8461ebfb9
treecb0d89c5d3b32f89671f50ab441d14348d83b2ca
parentc5d74fe6a7f4240f6060dc51dd113b8a45f6cb56
ASoC: SOF: amd: fix SND_AMD_SOUNDWIRE_ACPI dependencies

The snd-amd-sdw-acpi.ko module is under CONFIG_SND_SOC_AMD_ACP_COMMON but
selected from SoF, which causes build failures in some randconfig builds
that enable SOF but not ACP:

WARNING: unmet direct dependencies detected for SND_AMD_SOUNDWIRE_ACPI
  Depends on [n]: SOUND [=m] && SND [=m] && SND_SOC [=m] && SND_SOC_AMD_ACP_COMMON [=n] && ACPI [=y]
  Selected by [m]:
  - SND_SOC_SOF_AMD_SOUNDWIRE_LINK_BASELINE [=m] && SOUND [=m] && SND [=m] && SND_SOC [=m] && SND_SOC_SOF_TOPLEVEL [=y] && SND_SOC_SOF_AMD_TOPLEVEL [=m] && ACPI [=y]
ERROR: modpost: "amd_sdw_scan_controller" [sound/soc/sof/amd/snd-sof-amd-acp.ko] undefined!

Change the Makefile and Kconfig to allow it to get built regardless
of CONFIG_SND_SOC_AMD_ACP_COMMON.

Fixes: d948218424bf ("ASoC: SOF: amd: add code for invoking soundwire manager helper functions")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20240204212207.3158914-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/amd/Makefile
sound/soc/amd/acp/Kconfig