Skip to content

ASoC: SOF: topology: allow user to add topologies by module parameter#5682

Open
bardliao wants to merge 2 commits intothesofproject:topic/sof-devfrom
bardliao:function-topology-echo-ref-alternative
Open

ASoC: SOF: topology: allow user to add topologies by module parameter#5682
bardliao wants to merge 2 commits intothesofproject:topic/sof-devfrom
bardliao:function-topology-echo-ref-alternative

Conversation

@bardliao
Copy link
Collaborator

@bardliao bardliao commented Mar 5, 2026

The virtual loop dai link is created by the machine driver and no topology is needed for the dai link. Handle it to avoid the dai_link is not supported error.
Currently, the function topology provides the basic audio function. The commit allow the users add their topologies to the topology list. So they can add their own features.

The virtual loop dai link is created by the machine driver and no
topology is needed for the dai link. Handle it to avoid the dai_link
is not supported error.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
@bardliao
Copy link
Collaborator Author

bardliao commented Mar 6, 2026

An example to test the user topologies:
options snd_sof user_topologies=sof-sdca-jack-ref-dai.tplg,sof-sdca-amp-ref.tplg

@bardliao bardliao force-pushed the function-topology-echo-ref-alternative branch from c3616a9 to cdedb94 Compare March 11, 2026 00:58
* snd_soc_tplg_component_remove(scomp) here.
*/
dev_err(scomp->dev, "tplg request firmware %s failed err: %d\n",
tplg_files[i], ret);
Copy link
Collaborator

Choose a reason for hiding this comment

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

request_firmware() warns on error already.
OK, we print similar error previously, should we note that this is user tplg request? It will be easier to see where the exact line where we failed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, I will edit the trace to specify it is a user defined topology.

*/
dev_err(scomp->dev, "tplg request firmware %s failed err: %d\n",
tplg_files[i], ret);
goto out;
Copy link
Collaborator

Choose a reason for hiding this comment

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

but, do we really want to fail if the base topologies are already loaded and ready?
I would think that we should warn and ignore the errors, what do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That is a good question. I think when a user adds the topology by module parameters means he needs it. Personally, I prefer return error to make sure the user notice the issue. But I am open on it.

@bardliao bardliao force-pushed the function-topology-echo-ref-alternative branch from cdedb94 to 3967c0c Compare March 12, 2026 01:59
Currently, the function topology provides the basic audio function. The
commit allow the users add their topologies to the topology list. So
they can add their own features.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
@bardliao bardliao force-pushed the function-topology-echo-ref-alternative branch from 3967c0c to 1581a65 Compare March 12, 2026 03:33
Copy link
Collaborator

@ujfalusi ujfalusi left a comment

Choose a reason for hiding this comment

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

@bardliao, I would love to give this a test with the compr ;)

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.

2 participants