Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

topology2: add split topologies description #507

Merged
merged 1 commit into from
Feb 13, 2025
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
47 changes: 47 additions & 0 deletions developer_guides/topology2/topology2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1332,6 +1332,53 @@ You can use the ``-P`` switch to convert a 2.0 configuration file to the 1.0 con

alsatplg <-D args=values> -P input.conf -o output.conf

Split topologies
****************

Linux kernel can load multiple topologies, a topology for a single function.
This feature is useful to support SDCA setups with standardized components. And no need to create topologies
for every new product. To achieve this, you need to split the topology into multiple tplg files.
The split topology files should be named as follows:

.. code-block:: bash

sof-<platform>-<function>-id<BE id number>.tplg

Currently <platform> is only needed for the DMIC function and not needed for SDCA functions in general.
It should be mtl, lnl, etc.

Where <function> should be one of

.. code-block:: bash

sdca-jack: SDCA headphone and headset.
sdca-<n>amp: SDCA amp, where n is the amp link numbers.
sdca-mic: SDCA host mic.
dmic-<n>ch: PCH DMIC, where n is the number of supported channels. Currently, only 2ch and 4ch are supported.
hdmi-pcm<id>: HDMI with PCM id starts from <id>. The <id> is 3 for the "sof-hda-dsp" card and 5 for other cards.


For example

.. code-block:: bash

sof-sdca-2amp-id2.tplg
sof-sdca-mic-id4.tplg
sof-arl-dmic-2ch-id5.tplg
sof-hdmi-pcm5-id7.tplg

The split topologies are the subset of the monolithic topology. Usually, you just need to add a description with proper
macro settings to disable the features that you don't need and set the first BE ID that in the topology in the cmake file
to generate the split topologies.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can these topologies have dependencies in order of loading them, that one topology refers to some component from other topology?
LIke direct routing audio from mic to speaker via some processing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't support this so far. Currently, all split topologies are independent.


For example

.. code-block:: bash

"cavs-sdw\;sof-arl-sdca-2amp-id2\;PLATFORM=mtl,NUM_SDW_AMP_LINKS=2,SDW_JACK=false,\
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,NUM_HDMIS=0"


Topology reminders
******************

Expand Down
Loading