-
Notifications
You must be signed in to change notification settings - Fork 80
topology2: add split topologies description #507
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
Conversation
ec88ac1 to
974f4da
Compare
|
|
||
| Linux kernel can load multiple topologies, a topology for a single function. | ||
| This feature is useful when a single device is disabled in specific productuds. To achieve this, you need to split | ||
| the topology into multiple tplg files. The split topology files should be named as follows: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is more useful to handle the mix and match nature of things?
Or actually to support SDCA setups with standardized components.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, lets call out this is to support SDCA standards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to "This feature is useful to support SDCA setups with standardized components. And no need to create topologies for every new product."
| .. code-block:: bash | ||
| sdca-jack | ||
| sdca-<n>amp where n is the amp link numbers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
number of amps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it is the amp link number. For example, if there are 2 amps on the same link, n should be 1. I.e. sdca-1amp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added description for each function
|
|
||
| .. code-block:: bash | ||
| sdca-jack |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this handles headphone, headset and line jack?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it includes the "Jack Out" and "Jack In" PCMs
| sdca-jack | ||
| sdca-<n>amp where n is the amp link numbers | ||
| sdca-mic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chase build mic (analog or DMIC) and headset mic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sdca-mic is for the build mic that connected to the SDW codecs. Not headset mic. The headset mic is handled by the sdca-jack device.
| sdca-jack | ||
| sdca-<n>amp where n is the amp link numbers | ||
| sdca-mic | ||
| dmic-<n>ch where n is the channel numbers. Currently, only 2ch and 4ch are supported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not SNDW connected DMIC or SNDW connected?
'where n is the number of supported channels'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have a max number of channels ? best to say either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not SNDW connected DMIC or SNDW connected?
This is for PCH-DMIC.
do we have a max number of channels ?
Currently only 2 and 4 channels are supported. So the max number of channels is 4.
|
|
||
| .. code-block:: bash | ||
| sof-arl-sdca-2amp-id2.tplg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so in topology it is better to ship sof-arl-sdca-2amp-id[1-256].tplg to cover pretty much any place the 2amp can be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessary, the BE id of amp is fixed to 2 in the machine driver. Unless there is a special case, otherwise, -id2 is good enough.
| 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
| sdca-<n>amp where n is the amp link numbers | ||
| sdca-mic | ||
| dmic-<n>ch where n is the channel numbers. Currently, only 2ch and 4ch are supported. | ||
| sdca-hdmi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SNDW connected display audio or HDA connected display audio in a system where other codecs are SNDW?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HDA connected display audio in a system where other codecs are SNDW.
|
@ranj063 pls review |
974f4da to
ebf6107
Compare
| sof-<platform>-<function>-id<BE id number>.tplg | ||
| Where <platform> should be the platform name like mtl, lnl, etc. | ||
| And <platform> is only needed for the DMIC function. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its worth stating since this is SDCA that most/all SDCA functions we be of the form
sof-sdca-<function>
where they will reside in a platform generic SDCA directory.
If we need to add a platform (where the SDCA function has some hard dependency) we can do
sof-sdca-<function>-platform
I dont link having the ID number in the name, we should be able to define the ID when we instantiate the SDC object in the topology ?
@ranj063 pls chime in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, re the ID, now makes more sense when seen together with the cmake
"cavs-sdw\;sof-sdca-2amp-id2\;NUM_SDW_AMP_LINKS=2,SDW_JACK=false,\
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,NUM_HDMIS=0"
"cavs-sdw\;sof-sdca-mic-id4\;SDW_JACK=false,SDW_DMIC=1,NUM_HDMIS=0,\
SDW_DMIC_STREAM=Capture-SmartMic"
"cavs-sdw\;sof-sdca-hdmi-id5\;SDW_JACK=false"
"cavs-sdw\;sof-sdca-hdmi-id7\;SDW_JACK=false,HDMI1_ID=7,HDMI2_ID=8,HDMI3_ID=9"
"cavs-sdw\;sof-arl-dmic-2ch-id5\;PLATFORM=mtl,SDW_JACK=false,NUM_HDMIS=0,NUM_DMICS=2,\
PDM1_MIC_A_ENABLE=0,PDM1_MIC_B_ENABLE=0,DMIC0_ID=5,DMIC1_ID=6,PREPROCESS_PLUGINS=nhlt,\
NHLT_BIN=nhlt-sof-arl-dmic-2ch-id5.bin"
In this case I would tightly tie the ID to the backend i.e. sof-sdca-mic4 instead of sof-sdca-mic-id4 this make its clearer we mean mic4.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its worth stating since this is SDCA that most/all SDCA functions we be of the form
sof-sdca-<function>where they will reside in a platform generic SDCA directory.
Yes, but sdca is part of the function name. Eventually, we will extend the function to ssp-jack. I updated thesofproject/sof#9668 and now the sdca topologies are defined in tplg-targets-sdca-generic.cmake
If we need to add a platform (where the SDCA function has some hard dependency) we can do
sof-sdca-<function>-platformI dont link having the ID number in the name, we should be able to define the ID when we instantiate the SDC object in the topology ? @ranj063 pls chime in
Currently, the platform is only for PCH-DMIC topologies, like sof-ptl-dmic-2ch-id5. And sof-- is the naming convention.
In this case I would tightly tie the ID to the backend i.e. sof-sdca-mic4 instead of sof-sdca-mic-id4 this make its clearer we mean mic4.
It looks like the topology is for the 4th mic, but it is for the mic on the 4th BE. How about sof-sdca-be4-mic, sof-ptl-be5-dmic-2ch?
ebf6107 to
e6ba9c3
Compare
|
@lgirdwood @ujfalusi @ranj063 Could you review the PR again? One open is about where should the BE id be present on the topology name. How about |
e6ba9c3 to
57cae71
Compare
lgirdwood
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - I will merge once final open is updated.
Describe what are split topologies and how to create it. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
57cae71 to
f55dd29
Compare
Describe what are split topologies and how to create it.