public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: SOF: amd: fix SND_AMD_SOUNDWIRE_ACPI dependencies
@ 2024-02-04 21:22 Arnd Bergmann
  2024-02-04 21:22 ` [PATCH 2/2] ASoC: fix SND_SOC_WCD939X dependencies Arnd Bergmann
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Arnd Bergmann @ 2024-02-04 21:22 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Vijendar Mukunda
  Cc: Arnd Bergmann, Syed Saba Kareem, Venkata Prasad Potturu,
	Vinod Koul, linux-sound, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

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>
---
 sound/soc/amd/Makefile    |  2 +-
 sound/soc/amd/acp/Kconfig | 14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/sound/soc/amd/Makefile b/sound/soc/amd/Makefile
index 82e1cf864a40..ebbe49c2bbff 100644
--- a/sound/soc/amd/Makefile
+++ b/sound/soc/amd/Makefile
@@ -15,7 +15,7 @@ obj-$(CONFIG_SND_SOC_AMD_RV_RT5682_MACH) += snd-soc-acp-rt5682-mach.o
 obj-$(CONFIG_SND_SOC_AMD_RENOIR) += renoir/
 obj-$(CONFIG_SND_SOC_AMD_ACP5x) += vangogh/
 obj-$(CONFIG_SND_SOC_AMD_ACP6x) += yc/
-obj-$(CONFIG_SND_SOC_AMD_ACP_COMMON) += acp/
+obj-$(CONFIG_SND_AMD_ACP_CONFIG) += acp/
 obj-$(CONFIG_SND_AMD_ACP_CONFIG) += snd-acp-config.o
 obj-$(CONFIG_SND_SOC_AMD_RPL_ACP6x) += rpl/
 obj-$(CONFIG_SND_SOC_AMD_PS) += ps/
diff --git a/sound/soc/amd/acp/Kconfig b/sound/soc/amd/acp/Kconfig
index b3105ba9c3a3..30590a23ad63 100644
--- a/sound/soc/amd/acp/Kconfig
+++ b/sound/soc/amd/acp/Kconfig
@@ -101,13 +101,6 @@ config SND_SOC_AMD_MACH_COMMON
 	help
 	  This option enables common Machine driver module for ACP.
 
-config SND_AMD_SOUNDWIRE_ACPI
-	tristate "AMD SoundWire ACPI Support"
-	depends on ACPI
-	help
-	  This options enables ACPI helper functions for SoundWire
-	  interface for AMD platforms.
-
 config SND_SOC_AMD_LEGACY_MACH
 	tristate "AMD Legacy Machine Driver Support"
 	depends on X86 && PCI && I2C
@@ -123,3 +116,10 @@ config SND_SOC_AMD_SOF_MACH
 	  This option enables SOF sound card support for ACP audio.
 
 endif # SND_SOC_AMD_ACP_COMMON
+
+config SND_AMD_SOUNDWIRE_ACPI
+	tristate
+	depends on ACPI
+	help
+	  This options enables ACPI helper functions for SoundWire
+	  interface for AMD platforms.
-- 
2.39.2


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

* [PATCH 2/2] ASoC: fix SND_SOC_WCD939X dependencies
  2024-02-04 21:22 [PATCH 1/2] ASoC: SOF: amd: fix SND_AMD_SOUNDWIRE_ACPI dependencies Arnd Bergmann
@ 2024-02-04 21:22 ` Arnd Bergmann
  2024-02-05  8:51   ` Neil Armstrong
  2024-02-05 14:36 ` [PATCH 1/2] ASoC: SOF: amd: fix SND_AMD_SOUNDWIRE_ACPI dependencies Mark Brown
  2024-02-06  9:37 ` Mark Brown
  2 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2024-02-04 21:22 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Neil Armstrong
  Cc: Arnd Bergmann, Weidong Wang, Pierre-Louis Bossart, linux-sound,
	linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

SND_SOC_WCD939X has an optional dependency on TYPEC, so the newly added
SND_SOC_WCD939X_SDW option that selects it needs the same dependency, otherwise
it can fail randconfig builds like:

WARNING: unmet direct dependencies detected for SND_SOC_WCD939X
  Depends on [m]: SOUND [=y] && SND [=y] && SND_SOC [=y] && SND_SOC_WCD939X_SDW [=y] && (SOUNDWIRE [=y] || !SOUNDWIRE [=y]) && (TYPEC [=m]
 || !TYPEC [=m])
  Selected by [y]:
  - SND_SOC_WCD939X_SDW [=y] && SOUND [=y] && SND [=y] && SND_SOC [=y] && SOUNDWIRE [=y]
arm-linux-gnueabi-ld: sound/soc/codecs/wcd939x.o: in function `wcd939x_soc_codec_remove':
wcd939x.c:(.text+0x1950): undefined reference to `wcd_clsh_ctrl_free'
arm-linux-gnueabi-ld: sound/soc/codecs/wcd939x.o: in function `wcd939x_codec_ear_dac_event':
wcd939x.c:(.text+0x35d8): undefined reference to `wcd_clsh_ctrl_set_state'
arm-linux-gnueabi-ld: sound/soc/codecs/wcd939x.o: in function `wcd939x_codec_enable_hphr_pa':
wcd939x.c:(.text+0x39b0): undefined reference to `wcd_clsh_ctrl_set_state'
arm-linux-gnueabi-ld: wcd939x.c:(.text+0x39dc): undefined reference to `wcd_clsh_set_hph_mode'
arm-linux-gnueabi-ld: wcd939x.c:(.text+0x3bc0): undefined reference to `wcd_clsh_ctrl_set_state'

Fixes: be2af391cea0 ("ASoC: codecs: Add WCD939x Soundwire devices 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 75d88bd1dc6f..58ee431edfd8 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -2084,6 +2084,7 @@ config SND_SOC_WCD939X
 
 config SND_SOC_WCD939X_SDW
 	tristate "WCD9390/WCD9395 Codec - SDW"
+	depends on TYPEC || !TYPEC
 	select SND_SOC_WCD939X
 	select SND_SOC_WCD_MBHC
 	select REGMAP_IRQ
-- 
2.39.2


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

* Re: [PATCH 2/2] ASoC: fix SND_SOC_WCD939X dependencies
  2024-02-04 21:22 ` [PATCH 2/2] ASoC: fix SND_SOC_WCD939X dependencies Arnd Bergmann
@ 2024-02-05  8:51   ` Neil Armstrong
  0 siblings, 0 replies; 5+ messages in thread
From: Neil Armstrong @ 2024-02-05  8:51 UTC (permalink / raw)
  To: Arnd Bergmann, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai
  Cc: Arnd Bergmann, Weidong Wang, Pierre-Louis Bossart, linux-sound,
	linux-kernel

On 04/02/2024 22:22, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> SND_SOC_WCD939X has an optional dependency on TYPEC, so the newly added
> SND_SOC_WCD939X_SDW option that selects it needs the same dependency, otherwise
> it can fail randconfig builds like:
> 
> WARNING: unmet direct dependencies detected for SND_SOC_WCD939X
>    Depends on [m]: SOUND [=y] && SND [=y] && SND_SOC [=y] && SND_SOC_WCD939X_SDW [=y] && (SOUNDWIRE [=y] || !SOUNDWIRE [=y]) && (TYPEC [=m]
>   || !TYPEC [=m])
>    Selected by [y]:
>    - SND_SOC_WCD939X_SDW [=y] && SOUND [=y] && SND [=y] && SND_SOC [=y] && SOUNDWIRE [=y]
> arm-linux-gnueabi-ld: sound/soc/codecs/wcd939x.o: in function `wcd939x_soc_codec_remove':
> wcd939x.c:(.text+0x1950): undefined reference to `wcd_clsh_ctrl_free'
> arm-linux-gnueabi-ld: sound/soc/codecs/wcd939x.o: in function `wcd939x_codec_ear_dac_event':
> wcd939x.c:(.text+0x35d8): undefined reference to `wcd_clsh_ctrl_set_state'
> arm-linux-gnueabi-ld: sound/soc/codecs/wcd939x.o: in function `wcd939x_codec_enable_hphr_pa':
> wcd939x.c:(.text+0x39b0): undefined reference to `wcd_clsh_ctrl_set_state'
> arm-linux-gnueabi-ld: wcd939x.c:(.text+0x39dc): undefined reference to `wcd_clsh_set_hph_mode'
> arm-linux-gnueabi-ld: wcd939x.c:(.text+0x3bc0): undefined reference to `wcd_clsh_ctrl_set_state'
> 
> Fixes: be2af391cea0 ("ASoC: codecs: Add WCD939x Soundwire devices 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 75d88bd1dc6f..58ee431edfd8 100644
> --- a/sound/soc/codecs/Kconfig
> +++ b/sound/soc/codecs/Kconfig
> @@ -2084,6 +2084,7 @@ config SND_SOC_WCD939X
>   
>   config SND_SOC_WCD939X_SDW
>   	tristate "WCD9390/WCD9395 Codec - SDW"
> +	depends on TYPEC || !TYPEC
>   	select SND_SOC_WCD939X
>   	select SND_SOC_WCD_MBHC
>   	select REGMAP_IRQ

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

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

* Re: [PATCH 1/2] ASoC: SOF: amd: fix SND_AMD_SOUNDWIRE_ACPI dependencies
  2024-02-04 21:22 [PATCH 1/2] ASoC: SOF: amd: fix SND_AMD_SOUNDWIRE_ACPI dependencies Arnd Bergmann
  2024-02-04 21:22 ` [PATCH 2/2] ASoC: fix SND_SOC_WCD939X dependencies Arnd Bergmann
@ 2024-02-05 14:36 ` Mark Brown
  2024-02-06  9:37 ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2024-02-05 14:36 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Vijendar Mukunda,
	Arnd Bergmann, Syed Saba Kareem, Venkata Prasad Potturu,
	Vinod Koul, linux-sound, linux-kernel

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

On Sun, Feb 04, 2024 at 10:22:01PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> 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:

Please don't needlessly combine tangentially related things into a
single series, it just makes things harder to manage when they should go
to different branches.

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

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

* Re: [PATCH 1/2] ASoC: SOF: amd: fix SND_AMD_SOUNDWIRE_ACPI dependencies
  2024-02-04 21:22 [PATCH 1/2] ASoC: SOF: amd: fix SND_AMD_SOUNDWIRE_ACPI dependencies Arnd Bergmann
  2024-02-04 21:22 ` [PATCH 2/2] ASoC: fix SND_SOC_WCD939X dependencies Arnd Bergmann
  2024-02-05 14:36 ` [PATCH 1/2] ASoC: SOF: amd: fix SND_AMD_SOUNDWIRE_ACPI dependencies Mark Brown
@ 2024-02-06  9:37 ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2024-02-06  9:37 UTC (permalink / raw)
  To: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Vijendar Mukunda,
	Arnd Bergmann
  Cc: Arnd Bergmann, Syed Saba Kareem, Venkata Prasad Potturu,
	Vinod Koul, linux-sound, linux-kernel

On Sun, 04 Feb 2024 22:22:01 +0100, Arnd Bergmann wrote:
> 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!
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: SOF: amd: fix SND_AMD_SOUNDWIRE_ACPI dependencies
      commit: 69f8336e2913f12795fa0ec986bf63a8461ebfb9
[2/2] ASoC: fix SND_SOC_WCD939X dependencies
      commit: b4956275bf88a5708200713707c6c293648d39a9

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


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

end of thread, other threads:[~2024-02-06  9:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-04 21:22 [PATCH 1/2] ASoC: SOF: amd: fix SND_AMD_SOUNDWIRE_ACPI dependencies Arnd Bergmann
2024-02-04 21:22 ` [PATCH 2/2] ASoC: fix SND_SOC_WCD939X dependencies Arnd Bergmann
2024-02-05  8:51   ` Neil Armstrong
2024-02-05 14:36 ` [PATCH 1/2] ASoC: SOF: amd: fix SND_AMD_SOUNDWIRE_ACPI dependencies Mark Brown
2024-02-06  9:37 ` Mark Brown

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