mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02:00
ASoC: amd: acp: add RT711, RT714 & RT1316 support for ACP7.0 platform
Add support for corresponding codecs on ACP7.0 platform hardware configuration. SDW0: RT711 Jack SDW0: RT1316 Left Speaker SDW0: RT1316 Right Speaker SDW1: RT714 DMIC Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20250207062819.1527184-23-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
638ad2bdb2
commit
187150671d
|
|
@ -22,7 +22,7 @@ snd-acp70-y := acp70.o
|
|||
snd-acp-mach-y := acp-mach-common.o
|
||||
snd-acp-legacy-mach-y := acp-legacy-mach.o acp3x-es83xx/acp3x-es83xx.o
|
||||
snd-acp-sof-mach-y := acp-sof-mach.o
|
||||
snd-soc-acpi-amd-match-y := amd-acp63-acpi-match.o
|
||||
snd-soc-acpi-amd-match-y := amd-acp63-acpi-match.o amd-acp70-acpi-match.o
|
||||
snd-acp-sdw-mach-y := acp-sdw-mach-common.o
|
||||
snd-acp-sdw-sof-mach-y += acp-sdw-sof-mach.o
|
||||
snd-acp-sdw-legacy-mach-y += acp-sdw-legacy-mach.o
|
||||
|
|
|
|||
88
sound/soc/amd/acp/amd-acp70-acpi-match.c
Normal file
88
sound/soc/amd/acp/amd-acp70-acpi-match.c
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* amd-acp70-acpi-match.c - tables and support for ACP 7.0 & ACP7.1
|
||||
* ACPI enumeration.
|
||||
*
|
||||
* Copyright 2025 Advanced Micro Devices, Inc.
|
||||
*/
|
||||
|
||||
#include <sound/soc-acpi.h>
|
||||
#include "../mach-config.h"
|
||||
|
||||
static const struct snd_soc_acpi_endpoint single_endpoint = {
|
||||
.num = 0,
|
||||
.aggregated = 0,
|
||||
.group_position = 0,
|
||||
.group_id = 0
|
||||
};
|
||||
|
||||
static const struct snd_soc_acpi_endpoint spk_l_endpoint = {
|
||||
.num = 0,
|
||||
.aggregated = 1,
|
||||
.group_position = 0,
|
||||
.group_id = 1
|
||||
};
|
||||
|
||||
static const struct snd_soc_acpi_endpoint spk_r_endpoint = {
|
||||
.num = 0,
|
||||
.aggregated = 1,
|
||||
.group_position = 1,
|
||||
.group_id = 1
|
||||
};
|
||||
|
||||
static const struct snd_soc_acpi_adr_device rt711_rt1316_group_adr[] = {
|
||||
{
|
||||
.adr = 0x000030025D071101ull,
|
||||
.num_endpoints = 1,
|
||||
.endpoints = &single_endpoint,
|
||||
.name_prefix = "rt711"
|
||||
},
|
||||
{
|
||||
.adr = 0x000030025D131601ull,
|
||||
.num_endpoints = 1,
|
||||
.endpoints = &spk_l_endpoint,
|
||||
.name_prefix = "rt1316-1"
|
||||
},
|
||||
{
|
||||
.adr = 0x000032025D131601ull,
|
||||
.num_endpoints = 1,
|
||||
.endpoints = &spk_r_endpoint,
|
||||
.name_prefix = "rt1316-2"
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_soc_acpi_adr_device rt714_adr[] = {
|
||||
{
|
||||
.adr = 0x130025d071401ull,
|
||||
.num_endpoints = 1,
|
||||
.endpoints = &single_endpoint,
|
||||
.name_prefix = "rt714"
|
||||
}
|
||||
};
|
||||
|
||||
static const struct snd_soc_acpi_link_adr acp70_4_in_1_sdca[] = {
|
||||
{ .mask = BIT(0),
|
||||
.num_adr = ARRAY_SIZE(rt711_rt1316_group_adr),
|
||||
.adr_d = rt711_rt1316_group_adr,
|
||||
},
|
||||
{
|
||||
.mask = BIT(1),
|
||||
.num_adr = ARRAY_SIZE(rt714_adr),
|
||||
.adr_d = rt714_adr,
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_sdw_machines[] = {
|
||||
{
|
||||
.link_mask = BIT(0) | BIT(1),
|
||||
.links = acp70_4_in_1_sdca,
|
||||
.drv_name = "amd_sdw",
|
||||
},
|
||||
{},
|
||||
};
|
||||
EXPORT_SYMBOL(snd_soc_acpi_amd_acp70_sdw_machines);
|
||||
|
||||
MODULE_DESCRIPTION("AMD ACP7.0 & ACP7.1 tables and support for ACPI enumeration");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Vijendar.Mukunda@amd.com");
|
||||
|
|
@ -26,6 +26,7 @@ extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp63_sof_machines[];
|
|||
extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp63_sdw_machines[];
|
||||
extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp63_sof_sdw_machines[];
|
||||
extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_sof_machines[];
|
||||
extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_sdw_machines[];
|
||||
|
||||
struct config_entry {
|
||||
u32 flags;
|
||||
|
|
|
|||
|
|
@ -632,7 +632,11 @@ static int snd_acp63_probe(struct pci_dev *pci,
|
|||
dev_err(&pci->dev, "ACP platform devices creation failed\n");
|
||||
goto de_init;
|
||||
}
|
||||
adata->machines = snd_soc_acpi_amd_acp63_sdw_machines;
|
||||
if (adata->acp_rev >= ACP70_PCI_REV)
|
||||
adata->machines = snd_soc_acpi_amd_acp70_sdw_machines;
|
||||
else
|
||||
adata->machines = snd_soc_acpi_amd_acp63_sdw_machines;
|
||||
|
||||
ret = acp63_machine_register(&pci->dev);
|
||||
if (ret) {
|
||||
dev_err(&pci->dev, "ACP machine register failed\n");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user