Skip to content
Merged
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
83 changes: 83 additions & 0 deletions sound/soc/intel/common/soc-acpi-intel-ptl-match.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,15 @@ static const struct snd_soc_acpi_adr_device rt712_vb_2_group1_adr[] = {
}
};

static const struct snd_soc_acpi_adr_device rt712_vb_3_group1_adr[] = {
{
.adr = 0x000330025D071201ull,
.num_endpoints = ARRAY_SIZE(jack_amp_g1_dmic_endpoints_endpoints),
.endpoints = jack_amp_g1_dmic_endpoints_endpoints,
.name_prefix = "rt712"
}
};

static const struct snd_soc_acpi_adr_device rt713_vb_2_adr[] = {
{
.adr = 0x000230025d071301ull,
Expand All @@ -143,6 +152,15 @@ static const struct snd_soc_acpi_adr_device rt713_vb_2_adr[] = {
}
};

static const struct snd_soc_acpi_adr_device rt713_vb_3_adr[] = {
{
.adr = 0x000330025D071301ull,
.num_endpoints = ARRAY_SIZE(jack_dmic_endpoints),
.endpoints = jack_dmic_endpoints,
.name_prefix = "rt713"
}
};

static const struct snd_soc_acpi_adr_device rt721_3_single_adr[] = {
{
.adr = 0x000330025d072101ull,
Expand Down Expand Up @@ -206,6 +224,24 @@ static const struct snd_soc_acpi_adr_device rt1320_1_group2_adr[] = {
}
};

static const struct snd_soc_acpi_adr_device rt1320_2_group1_adr[] = {
{
.adr = 0x000230025D132001ull,
.num_endpoints = 1,
.endpoints = &spk_r_endpoint,
.name_prefix = "rt1320-1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure I follow why this one needs to have the '-1' suffix for group 1 but the rt712 above does not. IIRC the -1 and -2 where related to amps, not groups.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The '-1' suffix will be used by the ucm. https://github.com/alsa-project/alsa-ucm-conf/blob/master/ucm2/sof-soundwire/rt1320.conf. It assume the '-1', '-2' prefix in the control names.

}
};

static const struct snd_soc_acpi_adr_device rt1320_2_group2_adr[] = {
{
.adr = 0x000230025D132001ull,
.num_endpoints = 1,
.endpoints = &spk_r_endpoint,
.name_prefix = "rt1320-1"
}
};

static const struct snd_soc_acpi_adr_device rt1320_3_group2_adr[] = {
{
.adr = 0x000330025D132001ull,
Expand Down Expand Up @@ -270,6 +306,25 @@ static const struct snd_soc_acpi_link_adr ptl_sdw_rt713_vb_l2_rt1320_l13[] = {
{}
};

static const struct snd_soc_acpi_link_adr ptl_sdw_rt713_vb_l3_rt1320_l12[] = {
{
.mask = BIT(3),
.num_adr = ARRAY_SIZE(rt713_vb_3_adr),
.adr_d = rt713_vb_3_adr,
},
{
.mask = BIT(1),
.num_adr = ARRAY_SIZE(rt1320_1_group2_adr),
.adr_d = rt1320_1_group2_adr,
},
{
.mask = BIT(2),
.num_adr = ARRAY_SIZE(rt1320_2_group2_adr),
.adr_d = rt1320_2_group2_adr,
},
{}
};

static const struct snd_soc_acpi_link_adr ptl_sdw_rt712_vb_l2_rt1320_l1[] = {
{
.mask = BIT(2),
Expand All @@ -284,6 +339,20 @@ static const struct snd_soc_acpi_link_adr ptl_sdw_rt712_vb_l2_rt1320_l1[] = {
{}
};

static const struct snd_soc_acpi_link_adr ptl_sdw_rt712_vb_l3_rt1320_l2[] = {
{
.mask = BIT(3),
.num_adr = ARRAY_SIZE(rt712_vb_3_group1_adr),
.adr_d = rt712_vb_3_group1_adr,
},
{
.mask = BIT(2),
.num_adr = ARRAY_SIZE(rt1320_2_group1_adr),
.adr_d = rt1320_2_group1_adr,
},
{}
};

/* this table is used when there is no I2S codec present */
struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_sdw_machines[] = {
/* mockup tests need to be first */
Expand Down Expand Up @@ -342,13 +411,27 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_sdw_machines[] = {
.machine_check = snd_soc_acpi_intel_sdca_is_device_rt712_vb,
.sof_tplg_filename = "sof-ptl-rt712-l2-rt1320-l1.tplg"
},
{
.link_mask = BIT(2) | BIT(3),
.links = ptl_sdw_rt712_vb_l3_rt1320_l2,
.drv_name = "sof_sdw",
.machine_check = snd_soc_acpi_intel_sdca_is_device_rt712_vb,
.sof_tplg_filename = "sof-ptl-rt712-l3-rt1320-l2.tplg"
},
{
.link_mask = BIT(1) | BIT(2) | BIT(3),
.links = ptl_sdw_rt713_vb_l2_rt1320_l13,
.drv_name = "sof_sdw",
.machine_check = snd_soc_acpi_intel_sdca_is_device_rt712_vb,
.sof_tplg_filename = "sof-ptl-rt713-l2-rt1320-l13.tplg"
},
{
.link_mask = BIT(1) | BIT(2) | BIT(3),
.links = ptl_sdw_rt713_vb_l3_rt1320_l12,
.drv_name = "sof_sdw",
.machine_check = snd_soc_acpi_intel_sdca_is_device_rt712_vb,
.sof_tplg_filename = "sof-ptl-rt713-l3-rt1320-l12.tplg"
},
{},
};
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_ptl_sdw_machines);
Loading