Unverified Commit 05fe6284 authored by Chao Song's avatar Chao Song Committed by Mark Brown
Browse files

ASoC: Intel: soc-acpi-intel-mtl-match: add acpi match table for cdb35l56-eight-c



This patch adds acpi match table for cdb35l56-eight-c
AIC board from Cirrus Logic.

The codec layout is configured as:
    - Link0: CS42L43 Jack
    - Link1: 2x CS35L56 Speaker
    - Link2: 2x CS35L56 Speaker

Signed-off-by: default avatarChao Song <chao.song@linux.intel.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20230919020011.1896041-3-yung-chuan.liao@linux.intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 06d94b43
Loading
Loading
Loading
Loading
+78 −0
Original line number Diff line number Diff line
@@ -92,6 +92,20 @@ static const struct snd_soc_acpi_endpoint rt712_endpoints[] = {
	},
};

static const struct snd_soc_acpi_endpoint spk_2_endpoint = {
	.num = 0,
	.aggregated = 1,
	.group_position = 2,
	.group_id = 1,
};

static const struct snd_soc_acpi_endpoint spk_3_endpoint = {
	.num = 0,
	.aggregated = 1,
	.group_position = 3,
	.group_id = 1,
};

static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = {
	{
		.adr = 0x000030025D071101ull,
@@ -211,6 +225,45 @@ static const struct snd_soc_acpi_link_adr mtl_712_only[] = {
	{}
};

static const struct snd_soc_acpi_adr_device cs42l43_0_adr[] = {
	{
		.adr = 0x00003001FA424301ull,
		.num_endpoints = 1,
		.endpoints = &single_endpoint,
		.name_prefix = "cs42l43"
	}
};

static const struct snd_soc_acpi_adr_device cs35l56_1_adr[] = {
	{
		.adr = 0x00013701FA355601ull,
		.num_endpoints = 1,
		.endpoints = &spk_r_endpoint,
		.name_prefix = "cs35l56-8"
	},
	{
		.adr = 0x00013601FA355601ull,
		.num_endpoints = 1,
		.endpoints = &spk_3_endpoint,
		.name_prefix = "cs35l56-7"
	}
};

static const struct snd_soc_acpi_adr_device cs35l56_2_adr[] = {
	{
		.adr = 0x00023301FA355601ull,
		.num_endpoints = 1,
		.endpoints = &spk_l_endpoint,
		.name_prefix = "cs35l56-1"
	},
	{
		.adr = 0x00023201FA355601ull,
		.num_endpoints = 1,
		.endpoints = &spk_2_endpoint,
		.name_prefix = "cs35l56-2"
	}
};

static const struct snd_soc_acpi_link_adr rt5682_link2_max98373_link0[] = {
	/* Expected order: jack -> amp */
	{
@@ -317,6 +370,25 @@ static const struct snd_soc_acpi_link_adr cs42l42_link0_max98363_link2[] = {
	{}
};

static const struct snd_soc_acpi_link_adr mtl_cs42l43_cs35l56[] = {
	{
		.mask = BIT(0),
		.num_adr = ARRAY_SIZE(cs42l43_0_adr),
		.adr_d = cs42l43_0_adr,
	},
	{
		.mask = BIT(1),
		.num_adr = ARRAY_SIZE(cs35l56_1_adr),
		.adr_d = cs35l56_1_adr,
	},
	{
		.mask = BIT(2),
		.num_adr = ARRAY_SIZE(cs35l56_2_adr),
		.adr_d = cs35l56_2_adr,
	},
	{}
};

/* this table is used when there is no I2S codec present */
struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_sdw_machines[] = {
	/* mockup tests need to be first */
@@ -350,6 +422,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_sdw_machines[] = {
		.drv_name = "sof_sdw",
		.sof_tplg_filename = "sof-mtl-rt1318-l12-rt714-l0.tplg"
	},
	{
		.link_mask = GENMASK(2, 0),
		.links = mtl_cs42l43_cs35l56,
		.drv_name = "sof_sdw",
		.sof_tplg_filename = "sof-mtl-cs42l43-l0-cs35l56-l12.tplg",
	},
	{
		.link_mask = GENMASK(3, 0),
		.links = mtl_3_in_1_sdca,