Skip to content

Commit

Permalink
ASoC: Intel: soc-acpi-intel-mtl-match: add acpi match table for cdb35…
Browse files Browse the repository at this point in the history
…l56-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: Chao Song <[email protected]>
  • Loading branch information
Chao Song authored and bardliao committed Sep 7, 2023
1 parent b941ab4 commit 4a884f7
Showing 1 changed file with 78 additions and 0 deletions.
78 changes: 78 additions & 0 deletions sound/soc/intel/common/soc-acpi-intel-mtl-match.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,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,
Expand Down Expand Up @@ -236,6 +250,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 */
{
Expand Down Expand Up @@ -342,6 +395,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 */
Expand Down Expand Up @@ -375,6 +447,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,
Expand Down

0 comments on commit 4a884f7

Please sign in to comment.