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

Conversation

bardliao
Copy link
Collaborator

@bardliao bardliao commented Nov 1, 2024

rt712_vb on SDW link 2 and 1 rt1320 on SDW link 1 which is one of the audio configurations of Realtek Gen6 AIOC.

* its headset, amp and dmic functions.
*/
static const struct snd_soc_acpi_endpoint rt722_endpoints[] = {
static const struct snd_soc_acpi_endpoint rt_sdca_mf_endpoints[] = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

isn't this a bit too broad assumption? By the name it is covering all RT SDCA codecs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

isn't this a bit too broad assumption? By the name it is covering all RT SDCA codecs.

I think all Realtek SDCA multi function codecs can apply this endpoint array unless there is another endpoint array specific to a codec. @shumingfan Can you confirm it?

Choose a reason for hiding this comment

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

For now, only jack/mic/amp are in the multi-function codec. But I am not sure if there is any difference with the future multi-function codec.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed to jack_amp_dmic_endpoints

lgirdwood
lgirdwood previously approved these changes Nov 1, 2024
@bardliao
Copy link
Collaborator Author

bardliao commented Nov 4, 2024

Sorry, I would like to change the tplg name to sof-lnl-rt712-l2-rt1320-l1.tplg. rt1320 could use the same SDW link as rt712_vb. In that case there is still 1 rt1320, but the NUM_SDW_AMP_LINKS should be 1. IOW, NUM_SDW_AMP_LINKS can be 1 or 2 for sof-lnl-rt712-rt1320x1.tplg.

@ujfalusi
Copy link
Collaborator

ujfalusi commented Nov 6, 2024

Sorry, I would like to change the tplg name to sof-lnl-rt712-l2-rt1320-l1.tplg. rt1320 could use the same SDW link as rt712_vb. In that case there is still 1 rt1320, but the NUM_SDW_AMP_LINKS should be 1. IOW, NUM_SDW_AMP_LINKS can be 1 or 2 for sof-lnl-rt712-rt1320x1.tplg.

@bardliao, I'm not following this comment.

@bardliao
Copy link
Collaborator Author

bardliao commented Nov 6, 2024

Sorry, I would like to change the tplg name to sof-lnl-rt712-l2-rt1320-l1.tplg. rt1320 could use the same SDW link as rt712_vb. In that case there is still 1 rt1320, but the NUM_SDW_AMP_LINKS should be 1. IOW, NUM_SDW_AMP_LINKS can be 1 or 2 for sof-lnl-rt712-rt1320x1.tplg.

@bardliao, I'm not following this comment.

In short, I changed the tplg name from sof-lnl-rt712-rt1320x1 to sof-lnl-rt712-l2-rt1320-l1 thesofproject/sof#9635.
That is because if the rt1320 uses the same SDW link as rt712, NUM_SDW_AMP_LINKS should be 1. However, NUM_SDW_AMP_LINKS of sof-lnl-rt712-rt1320x1 is 2 since I assume rt1320 uses different sdw links as rt712. As a result, the sof-lnl-rt712-rt1320x1.tplg can't be used for that configuration. That's why we need sof-lnl-rt712-l2-rt1320-l1.tplg and sof-lnl-rt712-l1-rt1320-l1.tplg with different NUM_SDW_AMP_LINKS.

@ujfalusi
Copy link
Collaborator

ujfalusi commented Nov 6, 2024

sof-lnl-rt712-l2-rt1320-l1.tplg - NUM_SDW_AMP_LINKS=2
sof-lnl-rt712-l1-rt1320-l1.tplg - NUM_SDW_AMP_LINKS=1
?

sof-lnl-rt712-l1-rt1320-l2.tplg is also a valid setup?

@bardliao
Copy link
Collaborator Author

bardliao commented Nov 6, 2024

sof-lnl-rt712-l2-rt1320-l1.tplg - NUM_SDW_AMP_LINKS=2 sof-lnl-rt712-l1-rt1320-l1.tplg - NUM_SDW_AMP_LINKS=1 ?

sof-lnl-rt712-l1-rt1320-l2.tplg is also a valid setup?

Exactly

ujfalusi
ujfalusi previously approved these changes Nov 6, 2024
lgirdwood
lgirdwood previously approved these changes Nov 6, 2024
Comment on lines +550 to +549
.links = lnl_sdw_rt712_vb_l2_rt1320_l1,
.drv_name = "sof_sdw",
.sof_tplg_filename = "sof-lnl-rt712-l2-rt1320-l1.tplg"
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 -

@@ -93,6 +93,30 @@ static const struct snd_soc_acpi_endpoint jack_amp_dmic_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.

Realtek Gen6 AIOC supports rt712_vb on SoundWire link 2 and rt1320 on
SoundWire link 1.

Signed-off-by: Bard Liao <[email protected]>
@bardliao bardliao dismissed stale reviews from lgirdwood and ujfalusi via ba98473 November 8, 2024 00:26
@ranj063 ranj063 requested a review from ujfalusi November 11, 2024 00:31
@bardliao bardliao merged commit 3d1bfcd into thesofproject:topic/sof-dev Nov 11, 2024
10 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants