linux/sound/soc/amd/Kconfig
Vijendar Mukunda 56437a561f
ASoC: amd: fix for soundwire build dependencies for legacy stack
The SND_SOC_AMD_SOUNDWIRE Kconfig symbol has build dependency on
SOUNDWIRE_AMD. It gets it wrong for a configuration involving
SND_SOC_AMD_SOUNDWIRE_LINK_BASELINE=y,SND_SOC_AMD_PS=y and SOUNDWIRE_AMD=m,
which results in a link failure:

ld: vmlinux.o: in function `amd_sdw_probe':
>> sound/soc/amd/ps/pci-ps.c:271:(.text+0x1d51eff):
	undefined reference to `sdw_amd_probe'
ld: vmlinux.o: in function `acp63_sdw_machine_select':
>> sound/soc/amd/ps/pci-ps.c:294:(.text+0x1d525d5):
	undefined reference to `sdw_amd_get_slave_info'
ld: vmlinux.o: in function `amd_sdw_exit':
>> sound/soc/amd/ps/pci-ps.c:280:(.text+0x1d538ce):
	undefined reference to `sdw_amd_exit'

Add a top level check config that forbids any of the AMD ACP drivers
with version >= 6.3 from being built-in with CONFIG_SOUNDWIRE_AMD=m.
Move SND_AMD_ACP_CONFIG common dependency config to
SND_SOC_AMD_ACP63_TOPLEVEL config.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202404061257.khJml82D-lkp@intel.com/
Fixes: a806793f23 ("ASoC: amd: simplify soundwire dependencies for legacy stack")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://msgid.link/r/20240408180229.3287220-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-09 18:14:18 +01:00

187 lines
5.7 KiB
Plaintext

# SPDX-License-Identifier: GPL-2.0-only
config SND_SOC_AMD_ACP
tristate "AMD Audio Coprocessor support"
help
This option enables ACP DMA support on AMD platform.
config SND_SOC_AMD_CZ_DA7219MX98357_MACH
tristate "AMD CZ support for DA7219, RT5682 and MAX9835"
select CLK_FIXED_FCH
select SND_SOC_DA7219
select SND_SOC_RT5682_I2C
select SND_SOC_MAX98357A
select SND_SOC_ADAU7002
select REGULATOR
depends on SND_SOC_AMD_ACP && I2C && GPIOLIB && ACPI
help
This option enables machine driver for DA7219, RT5682 and MAX9835.
config SND_SOC_AMD_CZ_RT5645_MACH
tristate "AMD CZ support for RT5645"
select SND_SOC_RT5645
depends on SND_SOC_AMD_ACP && I2C
help
This option enables machine driver for rt5645.
config SND_SOC_AMD_ST_ES8336_MACH
tristate "AMD ST support for ES8336"
select SND_SOC_ACPI if ACPI
select SND_SOC_ES8316
depends on SND_SOC_AMD_ACP && ACPI
depends on I2C
help
This option enables machine driver for Jadeite platform
using es8336 codec.
Say m if you have such a device.
If unsure select "N".
config SND_SOC_AMD_ACP3x
tristate "AMD Audio Coprocessor-v3.x support"
depends on X86 && PCI
help
This option enables ACP v3.x I2S support on AMD platform
config SND_SOC_AMD_RV_RT5682_MACH
tristate "AMD RV support for RT5682"
select CLK_FIXED_FCH
select SND_SOC_RT5682_I2C
select SND_SOC_MAX98357A
select SND_SOC_CROS_EC_CODEC
select I2C_CROS_EC_TUNNEL
select SND_SOC_RT1015
select SND_SOC_RT1015P
depends on SND_SOC_AMD_ACP3x && I2C && CROS_EC && GPIOLIB
help
This option enables machine driver for RT5682 and MAX9835.
config SND_SOC_AMD_RENOIR
tristate "AMD Audio Coprocessor - Renoir support"
select SND_AMD_ACP_CONFIG
depends on X86 && PCI
help
This option enables ACP support for Renoir platform
config SND_SOC_AMD_RENOIR_MACH
tristate "AMD Renoir support for DMIC"
select SND_SOC_DMIC
depends on SND_SOC_AMD_RENOIR && GPIOLIB
help
This option enables machine driver for DMIC
config SND_SOC_AMD_ACP5x
tristate "AMD Audio Coprocessor-v5.x I2S support"
depends on X86 && PCI
select SND_AMD_ACP_CONFIG
help
This option enables ACP v5.x support on AMD platform
By enabling this flag build will trigger for ACP PCI driver,
ACP DMA driver, CPU DAI driver.
config SND_SOC_AMD_VANGOGH_MACH
tristate "AMD Vangogh support for NAU8821/CS35L41/MAX98388"
select SND_SOC_NAU8821
select SND_SOC_CS35L41_SPI
select SND_SOC_MAX98388
select SND_AMD_ACP_CONFIG
depends on SND_SOC_AMD_ACP5x && I2C && SPI_MASTER
help
This option enables machine driver for Vangogh platform
using NAU8821 and either CS35L41 or MAX98388 codecs.
Say m if you have such a device.
If unsure select "N".
config SND_SOC_AMD_ACP6x
tristate "AMD Audio Coprocessor-v6.x Yellow Carp support"
select SND_AMD_ACP_CONFIG
depends on X86 && PCI
help
This option enables Audio Coprocessor i.e ACP v6.x support on
AMD Yellow Carp platform. By enabling this flag build will be
triggered for ACP PCI driver, ACP PDM DMA driver.
Say m if you have such a device.
If unsure select "N".
config SND_SOC_AMD_YC_MACH
tristate "AMD YC support for DMIC"
select SND_SOC_DMIC
depends on SND_SOC_AMD_ACP6x
help
This option enables machine driver for Yellow Carp platform
using dmic. ACP IP has PDM Decoder block with DMA controller.
DMIC can be connected directly to ACP IP.
Say m if you have such a device.
If unsure select "N".
config SND_AMD_ACP_CONFIG
tristate "AMD ACP configuration selection"
select SND_SOC_ACPI if ACPI
help
This option adds an auto detection to determine which ACP
driver modules to use
source "sound/soc/amd/acp/Kconfig"
config SND_SOC_AMD_RPL_ACP6x
tristate "AMD Audio Coprocessor-v6.2 RPL support"
depends on X86 && PCI
help
This option enables Audio Coprocessor i.e. ACP v6.2 support on
AMD RPL platform. By enabling this flag build will be
triggered for ACP PCI driver.
Say m if you have such a device.
If unsure select "N".
config SND_SOC_AMD_ACP63_TOPLEVEL
tristate "support for AMD platforms with ACP version >= 6.3"
default SND_AMD_ACP_CONFIG
depends on SND_AMD_ACP_CONFIG
depends on SOUNDWIRE_AMD || !SOUNDWIRE_AMD
depends on X86 || COMPILE_TEST
help
This adds support for AMD platforms with ACP version >= 6.3.
Say Y if you have such a device.
If unsure select "N".
if SND_SOC_AMD_ACP63_TOPLEVEL
config SND_SOC_AMD_SOUNDWIRE_LINK_BASELINE
tristate
select SND_AMD_SOUNDWIRE_ACPI if ACPI
config SND_SOC_AMD_SOUNDWIRE
tristate "Support for SoundWire based AMD platforms"
default SND_SOC_AMD_SOUNDWIRE_LINK_BASELINE
depends on SND_SOC_AMD_SOUNDWIRE_LINK_BASELINE
depends on ACPI
depends on SOUNDWIRE_AMD
help
This adds support for SoundWire for AMD platforms.
Say Y if you want to enable SoundWire links with SOF.
If unsure select "N".
config SND_SOC_AMD_PS
tristate "AMD Audio Coprocessor-v6.3 Pink Sardine support"
select SND_SOC_AMD_SOUNDWIRE_LINK_BASELINE
depends on X86 && PCI && ACPI
help
This option enables Audio Coprocessor i.e ACP v6.3 support on
AMD Pink sardine platform. By enabling this flag build will be
triggered for ACP PCI driver, ACP PDM DMA driver, ACP SoundWire
DMA driver.
Say m if you have such a device.
If unsure select "N".
config SND_SOC_AMD_PS_MACH
tristate "AMD PINK SARDINE support for DMIC"
select SND_SOC_DMIC
depends on SND_SOC_AMD_PS
help
This option enables machine driver for Pink Sardine platform
using dmic. ACP IP has PDM Decoder block with DMA controller.
DMIC can be connected directly to ACP IP.
Say m if you have such a device.
If unsure select "N".
endif