mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-08-29 02:59:13 +00:00
ASoC: amd: acp: Fix snd_soc_acpi_mach id's duplicate symbol error
Move snd_soc_acpi_mach id's of all acp platforms form header file to
amd-acpi-mach.c file to avoid below errors.
ld.lld: error: duplicate symbol: amp_rt1019
ld.lld: error: duplicate symbol: amp_max
ld.lld: error: duplicate symbol: snd_soc_acpi_amd_acp63_acp_machines
ld.lld: error: duplicate symbol: snd_soc_acpi_amd_acp70_acp_machines
ld.lld: error: duplicate symbol: snd_soc_acpi_amd_rmb_acp_machines
ld.lld: error: duplicate symbol: snd_soc_acpi_amd_acp_machines
Fixes: 6e60db74b6
("ASoC: amd: acp: Refactor acp machine select")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202503160801.yExt0K2E-lkp@intel.com/
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://patch.msgid.link/20250317072413.88971-1-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
3cab1fc85f
commit
9c2c0ef640
@ -28,6 +28,9 @@ config SND_SOC_AMD_ACP_LEGACY_COMMON
|
||||
config SND_SOC_AMD_ACP_I2S
|
||||
tristate
|
||||
|
||||
config SND_SOC_AMD_ACPI_MACH
|
||||
tristate
|
||||
|
||||
config SND_SOC_AMD_ACP_PCM
|
||||
tristate
|
||||
select SND_SOC_ACPI if ACPI
|
||||
@ -37,6 +40,7 @@ config SND_SOC_AMD_ACP_PCI
|
||||
depends on X86 && PCI
|
||||
depends on ACPI
|
||||
select SND_SOC_AMD_ACP_LEGACY_COMMON
|
||||
select SND_SOC_AMD_ACPI_MACH
|
||||
help
|
||||
This options enables generic PCI driver for ACP device.
|
||||
|
||||
@ -47,6 +51,7 @@ config SND_AMD_ASOC_RENOIR
|
||||
select SND_SOC_AMD_ACP_I2S
|
||||
select SND_SOC_AMD_ACP_PDM
|
||||
select SND_SOC_AMD_ACP_LEGACY_COMMON
|
||||
select SND_SOC_AMD_ACPI_MACH
|
||||
depends on X86 && PCI
|
||||
help
|
||||
This option enables Renoir I2S support on AMD platform.
|
||||
@ -58,6 +63,7 @@ config SND_AMD_ASOC_REMBRANDT
|
||||
select SND_SOC_AMD_ACP_I2S
|
||||
select SND_SOC_AMD_ACP_PDM
|
||||
select SND_SOC_AMD_ACP_LEGACY_COMMON
|
||||
select SND_SOC_AMD_ACPI_MACH
|
||||
depends on AMD_NODE
|
||||
depends on X86 && PCI
|
||||
help
|
||||
@ -74,6 +80,7 @@ config SND_AMD_ASOC_ACP63
|
||||
select SND_SOC_AMD_ACP_I2S
|
||||
select SND_SOC_AMD_ACP_PDM
|
||||
select SND_SOC_AMD_ACP_LEGACY_COMMON
|
||||
select SND_SOC_AMD_ACPI_MACH
|
||||
help
|
||||
This option enables Acp6.3 I2S support on AMD platform.
|
||||
Say Y if you want to enable AUDIO on ACP6.3
|
||||
@ -88,6 +95,7 @@ config SND_AMD_ASOC_ACP70
|
||||
select SND_SOC_AMD_ACP_I2S
|
||||
select SND_SOC_AMD_ACP_PDM
|
||||
select SND_SOC_AMD_ACP_LEGACY_COMMON
|
||||
select SND_SOC_AMD_ACPI_MACH
|
||||
help
|
||||
This option enables Acp7.0 PDM support on AMD platform.
|
||||
Say Y if you want to enable AUDIO on ACP7.0
|
||||
|
@ -11,6 +11,7 @@ snd-acp-pdm-y := acp-pdm.o
|
||||
snd-acp-legacy-common-y := acp-legacy-common.o
|
||||
snd-acp-pci-y := acp-pci.o
|
||||
snd-amd-sdw-acpi-y := amd-sdw-acpi.o
|
||||
snd-amd-acpi-mach-y := amd-acpi-mach.o
|
||||
|
||||
#platform specific driver
|
||||
snd-acp-renoir-y := acp-renoir.o
|
||||
@ -32,6 +33,7 @@ obj-$(CONFIG_SND_SOC_AMD_ACP_I2S) += snd-acp-i2s.o
|
||||
obj-$(CONFIG_SND_SOC_AMD_ACP_PDM) += snd-acp-pdm.o
|
||||
obj-$(CONFIG_SND_SOC_AMD_ACP_LEGACY_COMMON) += snd-acp-legacy-common.o
|
||||
obj-$(CONFIG_SND_SOC_AMD_ACP_PCI) += snd-acp-pci.o
|
||||
obj-$(CONFIG_SND_SOC_AMD_ACPI_MACH) += snd-amd-acpi-mach.o
|
||||
|
||||
obj-$(CONFIG_SND_AMD_ASOC_RENOIR) += snd-acp-renoir.o
|
||||
obj-$(CONFIG_SND_AMD_ASOC_REMBRANDT) += snd-acp-rembrandt.o
|
||||
|
@ -137,26 +137,26 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
|
||||
chip->name = "acp_asoc_renoir";
|
||||
chip->rsrc = &rn_rsrc;
|
||||
chip->acp_hw_ops_init = acp31_hw_ops_init;
|
||||
chip->machines = snd_soc_acpi_amd_acp_machines;
|
||||
chip->machines = &snd_soc_acpi_amd_acp_machines;
|
||||
break;
|
||||
case 0x6f:
|
||||
chip->name = "acp_asoc_rembrandt";
|
||||
chip->rsrc = &rmb_rsrc;
|
||||
chip->acp_hw_ops_init = acp6x_hw_ops_init;
|
||||
chip->machines = snd_soc_acpi_amd_rmb_acp_machines;
|
||||
chip->machines = &snd_soc_acpi_amd_rmb_acp_machines;
|
||||
break;
|
||||
case 0x63:
|
||||
chip->name = "acp_asoc_acp63";
|
||||
chip->rsrc = &acp63_rsrc;
|
||||
chip->acp_hw_ops_init = acp63_hw_ops_init;
|
||||
chip->machines = snd_soc_acpi_amd_acp63_acp_machines;
|
||||
chip->machines = &snd_soc_acpi_amd_acp63_acp_machines;
|
||||
break;
|
||||
case 0x70:
|
||||
case 0x71:
|
||||
chip->name = "acp_asoc_acp70";
|
||||
chip->rsrc = &acp70_rsrc;
|
||||
chip->acp_hw_ops_init = acp70_hw_ops_init;
|
||||
chip->machines = snd_soc_acpi_amd_acp70_acp_machines;
|
||||
chip->machines = &snd_soc_acpi_amd_acp70_acp_machines;
|
||||
break;
|
||||
default:
|
||||
dev_err(dev, "Unsupported device revision:0x%x\n", pci->revision);
|
||||
|
93
sound/soc/amd/acp/amd-acpi-mach.c
Normal file
93
sound/soc/amd/acp/amd-acpi-mach.c
Normal file
@ -0,0 +1,93 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* amd-acpi-match.c - tables and support for ACP platforms
|
||||
* ACPI enumeration.
|
||||
*
|
||||
* Copyright 2025 Advanced Micro Devices, Inc.
|
||||
*/
|
||||
|
||||
#include <sound/soc-acpi.h>
|
||||
|
||||
struct snd_soc_acpi_codecs amp_rt1019 = {
|
||||
.num_codecs = 1,
|
||||
.codecs = {"10EC1019"}
|
||||
};
|
||||
|
||||
struct snd_soc_acpi_codecs amp_max = {
|
||||
.num_codecs = 1,
|
||||
.codecs = {"MX98360A"}
|
||||
};
|
||||
|
||||
struct snd_soc_acpi_mach snd_soc_acpi_amd_acp_machines[] = {
|
||||
{
|
||||
.id = "10EC5682",
|
||||
.drv_name = "acp3xalc56821019",
|
||||
.machine_quirk = snd_soc_acpi_codec_list,
|
||||
.quirk_data = &_rt1019,
|
||||
},
|
||||
{
|
||||
.id = "RTL5682",
|
||||
.drv_name = "acp3xalc5682sm98360",
|
||||
.machine_quirk = snd_soc_acpi_codec_list,
|
||||
.quirk_data = &_max,
|
||||
},
|
||||
{
|
||||
.id = "RTL5682",
|
||||
.drv_name = "acp3xalc5682s1019",
|
||||
.machine_quirk = snd_soc_acpi_codec_list,
|
||||
.quirk_data = &_rt1019,
|
||||
},
|
||||
{
|
||||
.id = "AMDI1019",
|
||||
.drv_name = "renoir-acp",
|
||||
},
|
||||
{
|
||||
.id = "ESSX8336",
|
||||
.drv_name = "acp3x-es83xx",
|
||||
},
|
||||
{},
|
||||
};
|
||||
EXPORT_SYMBOL_NS_GPL(snd_soc_acpi_amd_acp_machines, "SND_SOC_ACP_COMMON");
|
||||
|
||||
struct snd_soc_acpi_mach snd_soc_acpi_amd_rmb_acp_machines[] = {
|
||||
{
|
||||
.id = "10508825",
|
||||
.drv_name = "rmb-nau8825-max",
|
||||
.machine_quirk = snd_soc_acpi_codec_list,
|
||||
.quirk_data = &_max,
|
||||
},
|
||||
{
|
||||
.id = "AMDI0007",
|
||||
.drv_name = "rembrandt-acp",
|
||||
},
|
||||
{
|
||||
.id = "RTL5682",
|
||||
.drv_name = "rmb-rt5682s-rt1019",
|
||||
.machine_quirk = snd_soc_acpi_codec_list,
|
||||
.quirk_data = &_rt1019,
|
||||
},
|
||||
{},
|
||||
};
|
||||
EXPORT_SYMBOL_NS_GPL(snd_soc_acpi_amd_rmb_acp_machines, "SND_SOC_ACP_COMMON");
|
||||
|
||||
struct snd_soc_acpi_mach snd_soc_acpi_amd_acp63_acp_machines[] = {
|
||||
{
|
||||
.id = "AMDI0052",
|
||||
.drv_name = "acp63-acp",
|
||||
},
|
||||
{},
|
||||
};
|
||||
EXPORT_SYMBOL_NS_GPL(snd_soc_acpi_amd_acp63_acp_machines, "SND_SOC_ACP_COMMON");
|
||||
|
||||
struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_acp_machines[] = {
|
||||
{
|
||||
.id = "AMDI0029",
|
||||
.drv_name = "acp70-acp",
|
||||
},
|
||||
{},
|
||||
};
|
||||
EXPORT_SYMBOL_NS_GPL(snd_soc_acpi_amd_acp70_acp_machines, "SND_SOC_ACP_COMMON");
|
||||
|
||||
MODULE_DESCRIPTION("AMD ACP tables and support for ACPI enumeration");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Venkataprasad.potturu@amd.com");
|
@ -277,81 +277,10 @@ struct acp_resource acp70_rsrc = {
|
||||
.sram_pte_offset = 0x03800000,
|
||||
};
|
||||
|
||||
struct snd_soc_acpi_codecs amp_rt1019 = {
|
||||
.num_codecs = 1,
|
||||
.codecs = {"10EC1019"}
|
||||
};
|
||||
|
||||
struct snd_soc_acpi_codecs amp_max = {
|
||||
.num_codecs = 1,
|
||||
.codecs = {"MX98360A"}
|
||||
};
|
||||
|
||||
struct snd_soc_acpi_mach snd_soc_acpi_amd_acp_machines[] = {
|
||||
{
|
||||
.id = "10EC5682",
|
||||
.drv_name = "acp3xalc56821019",
|
||||
.machine_quirk = snd_soc_acpi_codec_list,
|
||||
.quirk_data = &_rt1019,
|
||||
},
|
||||
{
|
||||
.id = "RTL5682",
|
||||
.drv_name = "acp3xalc5682sm98360",
|
||||
.machine_quirk = snd_soc_acpi_codec_list,
|
||||
.quirk_data = &_max,
|
||||
},
|
||||
{
|
||||
.id = "RTL5682",
|
||||
.drv_name = "acp3xalc5682s1019",
|
||||
.machine_quirk = snd_soc_acpi_codec_list,
|
||||
.quirk_data = &_rt1019,
|
||||
},
|
||||
{
|
||||
.id = "AMDI1019",
|
||||
.drv_name = "renoir-acp",
|
||||
},
|
||||
{
|
||||
.id = "ESSX8336",
|
||||
.drv_name = "acp3x-es83xx",
|
||||
},
|
||||
{},
|
||||
};
|
||||
|
||||
struct snd_soc_acpi_mach snd_soc_acpi_amd_rmb_acp_machines[] = {
|
||||
{
|
||||
.id = "10508825",
|
||||
.drv_name = "rmb-nau8825-max",
|
||||
.machine_quirk = snd_soc_acpi_codec_list,
|
||||
.quirk_data = &_max,
|
||||
},
|
||||
{
|
||||
.id = "AMDI0007",
|
||||
.drv_name = "rembrandt-acp",
|
||||
},
|
||||
{
|
||||
.id = "RTL5682",
|
||||
.drv_name = "rmb-rt5682s-rt1019",
|
||||
.machine_quirk = snd_soc_acpi_codec_list,
|
||||
.quirk_data = &_rt1019,
|
||||
},
|
||||
{},
|
||||
};
|
||||
|
||||
struct snd_soc_acpi_mach snd_soc_acpi_amd_acp63_acp_machines[] = {
|
||||
{
|
||||
.id = "AMDI0052",
|
||||
.drv_name = "acp63-acp",
|
||||
},
|
||||
{},
|
||||
};
|
||||
|
||||
struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_acp_machines[] = {
|
||||
{
|
||||
.id = "AMDI0029",
|
||||
.drv_name = "acp70-acp",
|
||||
},
|
||||
{},
|
||||
};
|
||||
extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp_machines;
|
||||
extern struct snd_soc_acpi_mach snd_soc_acpi_amd_rmb_acp_machines;
|
||||
extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp63_acp_machines;
|
||||
extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_acp_machines;
|
||||
|
||||
extern const struct snd_soc_dai_ops asoc_acp_cpu_dai_ops;
|
||||
extern const struct snd_soc_dai_ops acp_dmic_dai_ops;
|
||||
|
Loading…
Reference in New Issue
Block a user