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

[BUG] SSP tplg2 fails when built with upstream alsa-utils #226 #8396

Closed
kv2019i opened this issue Oct 26, 2023 · 14 comments
Closed

[BUG] SSP tplg2 fails when built with upstream alsa-utils #226 #8396

kv2019i opened this issue Oct 26, 2023 · 14 comments
Assignees
Labels
bug Something isn't working as expected MTL Applies to Meteor Lake platform P2 Critical bugs or normal features topology Topology issues
Milestone

Comments

@kv2019i
Copy link
Collaborator

kv2019i commented Oct 26, 2023

Describe the bug
With merge of alsa-project/alsa-utils#226 , any targetting Intel devics with SSP, will no longer work with upstream SOF driver.

Following change is needed in kernel to use the upstream-built topologies:

diff --git a/sound/soc/sof/ipc4-topology.c b/sound/soc/sof/ipc4-topology.c index 6139a122d337..7d09710c5a90 100644
--- a/sound/soc/sof/ipc4-topology.c
+++ b/sound/soc/sof/ipc4-topology.c
@@ -1367,7 +1367,7 @@ static int snd_sof_get_nhlt_endpoint_data(struct snd_sof_dev *sdev, struct snd_s
 	/* find NHLT blob with matching params */
 	cfg = intel_nhlt_get_endpoint_blob(sdev->dev, ipc4_data->nhlt, dai_index, nhlt_type,
 					   bit_depth, bit_depth, channel_count, sample_rate,
-					   dir, 0);
+					   dir, 4);
 
 	if (!cfg) {
 		dev_err(sdev->dev,

@kv2019i kv2019i added bug Something isn't working as expected MTL Applies to Meteor Lake platform labels Oct 26, 2023
@kv2019i
Copy link
Collaborator Author

kv2019i commented Oct 26, 2023

@kv2019i kv2019i added the P2 Critical bugs or normal features label Oct 26, 2023
@kv2019i
Copy link
Collaborator Author

kv2019i commented Oct 26, 2023

P2 as we don't have this alsa-utils patch in our toolchain we use to create SOF releases (yet).

@ujfalusi
Copy link
Contributor

@marc-hb, FYI

@marc-hb
Copy link
Collaborator

marc-hb commented Oct 26, 2023

Comment alsa-project/alsa-utils#226 (comment) said "this was only a preview that can't be merged yet, please revert it". Was it not reverted?

@mengdonglin
Copy link
Collaborator

mengdonglin commented Oct 30, 2023

@jsarha @ranj063 Can you help look at this issue?
Can you also help review thesofproject/linux#4667 of @brentlu ?

@marc-hb marc-hb changed the title [BUG] SSP tplg2 built with upstream alsa-utils fail [BUG] SSP tplg2 fails when built with upstream alsa-utils #226 Oct 30, 2023
@btian1
Copy link
Contributor

btian1 commented Nov 7, 2023

  1. https://github.com/alsa-project/alsa-utils/pull/226,this was closed not merge.
  2. local tplg2 built file will failed to launch with latest kernel.

@lgirdwood
Copy link
Member

@jsarha @ranj063 did anyone get a chance to check this ?

@lgirdwood lgirdwood added this to the v2.8 milestone Nov 10, 2023
@lgirdwood
Copy link
Member

Adding to v2.8 for tracking, although not a v2.8 blocker

@mengdonglin mengdonglin added the topology Topology issues label Nov 15, 2023
@jsarha
Copy link
Contributor

jsarha commented Nov 19, 2023

Is this bug still valid? I see that thesofproject/linux#4667 was merged, even if alsa-project/alsa-utils#226 was not reverted.

At least I saw no problems when I built alsa-utils from upstream master (with alsa-lib from v1.2.10 tag), and used the produced alsatplg to build our topologies from sof main, and the used the produced sof-mtl-nocodec.tplg with our daily build on a Nest RVP, and tried both "aplay -D hw:0,0 -vv -d 5 -f cd /dev/zero" and "arecord -D hw:0,0 -vv -d 5 -f cd /dev/null".

Is there something more to this bug, or should this be closed?

@lgirdwood
Copy link
Member

@kv2019i still valid with latest update from @jsarha ?

@kv2019i
Copy link
Collaborator Author

kv2019i commented Nov 23, 2023

@lgirdwood @jsarha Not sure. Now the problem is that unless you have a very, very new kernel (i.e. latest sof-dev), a topology built with upstream alsa-utils will NOT work.

If we need to update the docker image for any reason, this requirement will kick in for SOF official releases as well, and bump the minimum required Linux kernel version to v6.7+ something.

I'm not comfortable with this.

(UPDATE: despite all the above, this is not really related to v2.8 release, we will be using old alsa-utils to make v2.8 still, so this is more a kernel/alsa-utils issue that is independent from SOF)

@kv2019i
Copy link
Collaborator Author

kv2019i commented Nov 29, 2023

@plbossart @ranj063 What's your take? Do we keep the alsa-utils PR and just live with the kernel dependency?

@lgirdwood
Copy link
Member

We either submit a revert to alsa-utils repo (and possibly request a point release) OR submit the above to Linux as a "Fix" patch for backporting.

If alsa-utils has NOT released this update then easiest is to revert and fix in alsa-utils ?

@kv2019i
Copy link
Collaborator Author

kv2019i commented Dec 7, 2023

No more comments, so I'll close this via thesofproject/linux#4667 . This is now sent upstream and we need to ensure it gets backported - FYI to @ujfalusi . This only affects I2S configs and if hit, happens 100% so hard to miss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected MTL Applies to Meteor Lake platform P2 Critical bugs or normal features topology Topology issues
Projects
None yet
Development

No branches or pull requests

8 participants