Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASoC: Intel: Add matches for Cirrus Logic CDB35L56 boards #5253

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
213 changes: 213 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 @@ -441,6 +441,44 @@ static const struct snd_soc_acpi_adr_device cs42l43_0_adr[] = {
}
};

/* CS42L43 - speaker DAI aggregated with 4 amps */
static const struct snd_soc_acpi_endpoint cs42l43_4amp_spkagg_endpoints[] = {
{ /* Jack Playback Endpoint */
.num = 0,
.aggregated = 0,
.group_position = 0,
.group_id = 0,
},
{ /* DMIC Capture Endpoint */
.num = 1,
.aggregated = 0,
.group_position = 0,
.group_id = 0,
},
{ /* Jack Capture Endpoint */
.num = 2,
.aggregated = 0,
.group_position = 0,
.group_id = 0,
},
{ /* Speaker Playback Endpoint */
.num = 3,
.aggregated = 1,
.group_position = 4,
.group_id = 1,
},
};

/* CS42L43 on link3 aggregated with 4 amps */
static const struct snd_soc_acpi_adr_device cs42l43_l3_4amp_spkagg_adr[] = {
{
.adr = 0x00033001FA424301ull,
.num_endpoints = ARRAY_SIZE(cs42l43_4amp_spkagg_endpoints),
.endpoints = cs42l43_4amp_spkagg_endpoints,
.name_prefix = "cs42l43"
}
};

static const struct snd_soc_acpi_endpoint cs35l56_l_fb_endpoints[] = {
{ /* Speaker Playback Endpoint */
.num = 0,
Expand Down Expand Up @@ -501,6 +539,81 @@ static const struct snd_soc_acpi_endpoint cs35l56_3_fb_endpoints[] = {
},
};

static const struct snd_soc_acpi_endpoint cs35l56_4_fb_endpoints[] = {
{ /* Speaker Playback Endpoint */
.num = 0,
.aggregated = 1,
.group_position = 4,
.group_id = 1,
},
{ /* Feedback Capture Endpoint */
.num = 1,
.aggregated = 1,
.group_position = 4,
.group_id = 2,
},
};

static const struct snd_soc_acpi_endpoint cs35l56_5_fb_endpoints[] = {
{ /* Speaker Playback Endpoint */
.num = 0,
.aggregated = 1,
.group_position = 5,
.group_id = 1,
},
{ /* Feedback Capture Endpoint */
.num = 1,
.aggregated = 1,
.group_position = 5,
.group_id = 2,
},
};

static const struct snd_soc_acpi_endpoint cs35l56_6_fb_endpoints[] = {
{ /* Speaker Playback Endpoint */
.num = 0,
.aggregated = 1,
.group_position = 6,
.group_id = 1,
},
{ /* Feedback Capture Endpoint */
.num = 1,
.aggregated = 1,
.group_position = 6,
.group_id = 2,
},
};

static const struct snd_soc_acpi_endpoint cs35l56_7_fb_endpoints[] = {
{ /* Speaker Playback Endpoint */
.num = 0,
.aggregated = 1,
.group_position = 7,
.group_id = 1,
},
{ /* Feedback Capture Endpoint */
.num = 1,
.aggregated = 1,
.group_position = 7,
.group_id = 2,
},
};

static const struct snd_soc_acpi_adr_device cs35l56_0_adr[] = {
{
.adr = 0x00003301FA355601ull,
.num_endpoints = 1,
.endpoints = &spk_l_endpoint,
.name_prefix = "AMP1"
},
{
.adr = 0x00003201FA355601ull,
.num_endpoints = 1,
.endpoints = &spk_2_endpoint,
.name_prefix = "AMP2"
}
};

static const struct snd_soc_acpi_adr_device cs35l56_1_adr[] = {
{
.adr = 0x00013701FA355601ull,
Expand Down Expand Up @@ -531,6 +644,60 @@ static const struct snd_soc_acpi_adr_device cs35l56_2_adr[] = {
}
};

static const struct snd_soc_acpi_adr_device cs35l56_0_fb_adr[] = {
{
.adr = 0x00003301FA355601ull,
.num_endpoints = ARRAY_SIZE(cs35l56_l_fb_endpoints),
.endpoints = cs35l56_l_fb_endpoints,
.name_prefix = "AMP1"
},
{
.adr = 0x00003201FA355601ull,
.num_endpoints = ARRAY_SIZE(cs35l56_2_fb_endpoints),
.endpoints = cs35l56_2_fb_endpoints,
.name_prefix = "AMP2"
},
{
.adr = 0x00003101FA355601ull,
.num_endpoints = ARRAY_SIZE(cs35l56_4_fb_endpoints),
.endpoints = cs35l56_4_fb_endpoints,
.name_prefix = "AMP3"
},
{
.adr = 0x00003001FA355601ull,
.num_endpoints = ARRAY_SIZE(cs35l56_6_fb_endpoints),
.endpoints = cs35l56_6_fb_endpoints,
.name_prefix = "AMP4"
},
};

static const struct snd_soc_acpi_adr_device cs35l56_1_fb_adr[] = {
{
.adr = 0x00013701FA355601ull,
.num_endpoints = ARRAY_SIZE(cs35l56_r_fb_endpoints),
.endpoints = cs35l56_r_fb_endpoints,
.name_prefix = "AMP8"
},
{
.adr = 0x00013601FA355601ull,
.num_endpoints = ARRAY_SIZE(cs35l56_3_fb_endpoints),
.endpoints = cs35l56_3_fb_endpoints,
.name_prefix = "AMP7"
},
{
.adr = 0x00013501FA355601ull,
.num_endpoints = ARRAY_SIZE(cs35l56_5_fb_endpoints),
.endpoints = cs35l56_5_fb_endpoints,
.name_prefix = "AMP6"
},
{
.adr = 0x00013401FA355601ull,
.num_endpoints = ARRAY_SIZE(cs35l56_7_fb_endpoints),
.endpoints = cs35l56_7_fb_endpoints,
.name_prefix = "AMP5"
},
};

static const struct snd_soc_acpi_adr_device cs35l56_2_r_adr[] = {
{
.adr = 0x00023201FA355601ull,
Expand Down Expand Up @@ -825,6 +992,40 @@ static const struct snd_soc_acpi_link_adr cs42l43_link0_cs35l56_link2_link3[] =
{}
};

static const struct snd_soc_acpi_link_adr cs42l43_link3_cs35l56_x4_link0_link1_spkagg[] = {
/* Expected order: jack -> amp */
{
.mask = BIT(3),
.num_adr = ARRAY_SIZE(cs42l43_l3_4amp_spkagg_adr),
.adr_d = cs42l43_l3_4amp_spkagg_adr,
},
{
.mask = BIT(1),
.num_adr = 2,
.adr_d = cs35l56_1_adr,
},
{
.mask = BIT(0),
.num_adr = 2,
.adr_d = cs35l56_0_adr,
},
{}
};

static const struct snd_soc_acpi_link_adr mtl_cs35l56_x8_link0_link1_fb[] = {
{
.mask = BIT(1),
.num_adr = ARRAY_SIZE(cs35l56_1_fb_adr),
.adr_d = cs35l56_1_fb_adr,
},
{
.mask = BIT(0),
.num_adr = ARRAY_SIZE(cs35l56_0_fb_adr),
.adr_d = cs35l56_0_fb_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 @@ -901,12 +1102,24 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_sdw_machines[] = {
.drv_name = "sof_sdw",
.sof_tplg_filename = "sof-mtl-cs42l43-l0-cs35l56-l23.tplg",
},
{
.link_mask = BIT(0) | BIT(1) | BIT(3),
.links = cs42l43_link3_cs35l56_x4_link0_link1_spkagg,
.drv_name = "sof_sdw",
.sof_tplg_filename = "sof-mtl-cs42l43-l3-cs35l56-l01-spkagg.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 = BIT(0) | BIT(1),
.links = mtl_cs35l56_x8_link0_link1_fb,
.drv_name = "sof_sdw",
.sof_tplg_filename = "sof-mtl-cs35l56-l01-fb8.tplg"
},
{
.link_mask = BIT(0),
.links = mtl_cs42l43_l0,
Expand Down
Loading
Loading