Skip to content

Conversation

@jsarha
Copy link
Contributor

@jsarha jsarha commented Apr 7, 2025

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.

Copy link
Member

@lgirdwood lgirdwood left a 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
Copy link
Member

Choose a reason for hiding this comment

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

scheduler_domain

@jsarha jsarha force-pushed the topology2_sched_domain_support branch from d3532ce to 906fff9 Compare April 8, 2025 14:15
Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

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

LGTM

@jsarha jsarha force-pushed the topology2_sched_domain_support branch from 906fff9 to ea09287 Compare April 22, 2025 20:52
@jsarha
Copy link
Contributor Author

jsarha commented Apr 22, 2025

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.

@jsarha jsarha marked this pull request as ready for review April 22, 2025 20:57
@jsarha jsarha requested a review from ranj063 as a code owner April 22, 2025 20:57
Copy link
Collaborator

@kv2019i kv2019i left a 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.

}
]
}
}
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Jyri Sarha added 2 commits April 23, 2025 21:43
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>
@jsarha jsarha force-pushed the topology2_sched_domain_support branch from ea09287 to f0195ef Compare April 23, 2025 19:39
@jsarha
Copy link
Contributor Author

jsarha commented Apr 24, 2025

@kv2019i in the end I survived without IncludeByKey-sections.

Copy link
Collaborator

@kv2019i kv2019i left a 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).

@kv2019i kv2019i merged commit 1ed3cbe into thesofproject:main Apr 28, 2025
44 of 49 checks passed
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.

3 participants