-
Notifications
You must be signed in to change notification settings - Fork 323
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
Pipeline2.0: step3, make all components using API instead of direct access to bsink_list and bsource_list #9478
Pipeline2.0: step3, make all components using API instead of direct access to bsink_list and bsource_list #9478
Conversation
5e5384d
to
0fe93ac
Compare
@marcinszkudlinski this touches a lot of files so lets get reviews in so that we can apply quickly when non draft and passing CI. @kv2019i @lyakh @softwarecki @abonislawski pls review. |
this commit adds functions for accessing sink_list and source_list from comp_buffer structure Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
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.
Nice, thanks @marcinszkudlinski !
Change all access to the first element of dev->bsink_list from direct to API call comp_dev_get_first_data_consumer access in pipeline management code, like module adapter, is omitted intentionally Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
this commit changes all components to use comp_dev_for_each_consumer for iteration through bsink_list pipeline code, like module adapter or ipc helpers was omitted intentionally Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
Change all access to the first element of dev->bsource_list from direct to API call comp_dev_get_first_data_producer access in pipeline management code, like module adapter, is omitted intentionally Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
0fe93ac
to
24311de
Compare
this commit changes all components to use comp_dev_for_each_producer for iteration through bsource_list pipeline code, like module adapter or ipc helpers was omitted intentionally Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
24311de
to
e48aab8
Compare
rebase & missing usage of comp_dev_for_each_producer |
@@ -634,6 +634,64 @@ struct comp_dev { | |||
#endif | |||
}; | |||
|
|||
/** | |||
* Get a pointer to a first comp_buffer object providing data to the component | |||
* The procedure will return NULL if there's no data provider |
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.
wow "procedure" takes me back to Pascal times :-)
@wszypelt @lrudyX good to merge, not sure if CI blocked ? |
#define comp_dev_for_each_consumer(_dev, _consumer) \ | ||
for (_consumer = comp_dev_get_first_data_consumer(_dev); \ | ||
_consumer != NULL; \ | ||
_consumer = comp_dev_get_next_data_consumer(_dev, _consumer)) |
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.
nit: you could code golf these two macros into one for loop expansion
another similar monster is coming... will put grammar fixes there Internal CI is OK, also not sure about jenkins |
good to merge :) |
Grammer fixes in a follow-up PR as one is planned in any case to continue the refactoring. I'll proceed now that we have a clean CI for mandatory checks (and this does touch a lot of files). |
As described here:
thesofproject/sof-docs#497
(compiled version: https://marcinszkudlinski.github.io/sof-docs/PAGES/architectures/firmware/sof-common/pipeline_2_0/pipeline2_0_discussion.html)
All buffers in the system must implement 3 types of API:
Conversion of all modules to use sink/src is a complex task, so this PR is an intermediate step, unblocking future changes in pipeline code.
The change from this PR will make possible modification way the comp_buffer list is stored and maintained in the pipeline, making the implentation more flexible. The target is to make the pipeline code independent of comp_buffer before all modules are converted to sink/src API
the change should be 100% transparent