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: soc-acpi-intel-lnl-match: add rt712_vb + rt1320 support #5223

Merged
merged 1 commit into from
Nov 11, 2024
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
63 changes: 63 additions & 0 deletions sound/soc/intel/common/soc-acpi-intel-lnl-match.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,30 @@ static const struct snd_soc_acpi_endpoint rt722_endpoints[] = {
},
};

static const struct snd_soc_acpi_endpoint jack_amp_g1_dmic_endpoints_endpoints[] = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I cannot see where you;re reusing jack_amp_dmic_endpoints that you renamed in the first commit @bardliao

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I didn't reuse that one because it will only work for the configuration without additional amps.

Copy link
Collaborator

Choose a reason for hiding this comment

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

then do you want to drop it for now. It doesnt make sense in this PR and the commit specifically says you are going to reuse in the following commit and then you ont

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, dropped.

/* Jack Endpoint */
{
.num = 0,
.aggregated = 0,
.group_position = 0,
.group_id = 0,
},
/* Amp Endpoint, work as spk_l_endpoint */
{
.num = 1,
.aggregated = 1,
.group_position = 0,
.group_id = 1,
},
/* DMIC Endpoint */
{
.num = 2,
.aggregated = 0,
.group_position = 0,
.group_id = 0,
},
};

static const struct snd_soc_acpi_endpoint cs42l43_endpoints[] = {
{ /* Jack Playback Endpoint */
.num = 0,
Expand Down Expand Up @@ -198,6 +222,15 @@ static const struct snd_soc_acpi_adr_device rt1712_3_single_adr[] = {
}
};

static const struct snd_soc_acpi_adr_device rt712_vb_2_group1_adr[] = {
{
.adr = 0x000230025D071201ull,
.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 rt722_0_single_adr[] = {
{
.adr = 0x000030025d072201ull,
Expand Down Expand Up @@ -252,6 +285,15 @@ static const struct snd_soc_acpi_adr_device rt1318_2_group1_adr[] = {
}
};

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

static const struct snd_soc_acpi_adr_device rt713_0_adr[] = {
{
.adr = 0x000031025D071301ull,
Expand Down Expand Up @@ -410,6 +452,21 @@ static const struct snd_soc_acpi_link_adr lnl_sdw_rt713_l0_rt1318_l1[] = {
{}
};

static const struct snd_soc_acpi_link_adr lnl_sdw_rt712_vb_l2_rt1320_l1[] = {
{
.mask = BIT(2),
.num_adr = ARRAY_SIZE(rt712_vb_2_group1_adr),
.adr_d = rt712_vb_2_group1_adr,
},
{
.mask = BIT(1),
.num_adr = ARRAY_SIZE(rt1320_1_group1_adr),
.adr_d = rt1320_1_group1_adr,
},
{}
};

/* this table is used when there is no I2S codec present */
/* this table is used when there is no I2S codec present */
struct snd_soc_acpi_mach snd_soc_acpi_intel_lnl_sdw_machines[] = {
/* mockup tests need to be first */
Expand Down Expand Up @@ -485,6 +542,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_lnl_sdw_machines[] = {
.drv_name = "sof_sdw",
.sof_tplg_filename = "sof-lnl-rt713-l0-rt1318-l1.tplg"
},
{
.link_mask = BIT(1) | BIT(2),
.links = lnl_sdw_rt712_vb_l2_rt1320_l1,
.drv_name = "sof_sdw",
.sof_tplg_filename = "sof-lnl-rt712-l2-rt1320-l1.tplg"
Comment on lines +547 to +549
Copy link
Member

@lgirdwood lgirdwood Nov 6, 2024

Choose a reason for hiding this comment

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

nitpick: need to be careful as we are mixing _ with - for strings in the same structure.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

nitpick: need to be careful as we are mixing _ with - for strings in the same structure.

Agree, the convention is to use -

},
{},
};
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_lnl_sdw_machines);
Loading