-
Notifications
You must be signed in to change notification settings - Fork 349
Topology2 sched domain support #9959
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
Topology2 sched domain support #9959
Conversation
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, needs some comments. Btw, can you link kernel PR here too. Thanks !
| num_input_audio_formats 415 | ||
| num_output_audio_formats 416 | ||
| no_wname_in_kcontrol_name 417 | ||
| sched_domain 418 |
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.
scheduler_domain
d3532ce to
906fff9
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
906fff9 to
ea09287
Compare
|
I finally got the DP thread to actually appear and work. First some topology language difficulties (little error somewhere but no error, and no attribute), and then finally hitting an error with gain module DP processing. The DP core needs a module that uses sink and source APIs (e.g. module process method is implemented and not only process_audio_stream, like in gain module). Thus this version now uses SRC module as it supports sink and source APIs. I've tested that it works and the DP processing thread is actually created on core 2 when audio is played to hw:0,2. |
kv2019i
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.
Looks ok. I was wondering about the duplicated tplg logic, please check inline.
| } | ||
| ] | ||
| } | ||
| } |
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 wonder if this could reuse nocodec more and just override the schedule. nocodec is one of the more complex so cloning it completely is not ideal for maintainance. For BT we have a scaled down nocodec that is easier to maintain.
DId @jsarha you consider this?
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 considered, but I could not figure out a way to do it without adding even more variables and even more IncludeByKey -sections to cavs-nocodec.conf. I feelt nocodec topology is already horrible enough to read. But yes. For this particular purpose it could actually make sense even if I do not really like the way we currently use the IncludeByKey -sections at the topology top level.
But eventually we need a major restructure to the whole topology hierarchy. More top-level files and less variation in each of them. The first in my kill list is PASSTHROUGH variable and the numerous IncludeByKey-sections sensitive to it.
But yes, I'll add one more variable and couple of more IncludeByKey-sections.
Add "scheduler_domain" attribute to all widgets. The allowed values are "LL", "DP" and "default". Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
This commit creates three new topologies, sof-mtl-nocodec-dp-test.tplg, sof-lnl-nocodec-dp-test.tplg, and sof-ptl-nocodec-dp-test.tplg. They are otherwise the same as the corresponding standard nocodec topologies, but both the src.11.1 on SSP2_Playback and src.5.1 on SSP2 Capture have scheduler_domain attribute set to "DP". Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
ea09287 to
f0195ef
Compare
|
@kv2019i in the end I survived without IncludeByKey-sections. |
kv2019i
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.
Thanks @jsarha ! I completely agree the nocodec is too complex now, but I think this is better than forking the very complex topology (and have two full versions of it to maintain).
NOTE: thesofproject/linux#5382 is needed before this PR does anything.
The PR defines a new topology2 attribute for any widget. With the scheduler_domain attribute one can select if the component defined by the widget node is execute in Low Latency thread or in Data Processing mode. The PR also adds new test topologies for testing the DP mode.