-
Notifications
You must be signed in to change notification settings - Fork 349
Convert mixout to use the module adapter #6833
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
d325b3e to
1b3742e
Compare
1b3742e to
f47e63d
Compare
6256676 to
1c2bb38
Compare
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 isn't something introduced or changed by this PR, but this might bight us at some point. This code does
source_c = buffer_acquire(source);
mod_source_info = module_source_info_acquire(mod->source_info);
sink_c = buffer_acquire(sink);
So far with no cross-core linking these just convert between cached and uncached addresses. But when we enable that, this can translate to up to 3 nested locks. And I'm not sure they're taken in the same order everywhere...
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.
Introduce struct module_source_info that will be used to keep track of all the source modules that are bound to a module. Also, add a new field, source_info in struct processing_module to save the source information for each module. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add module_source_info_acquire/release() for coherent access to the module's source_info data. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Define the bind/unbind comp driver ops for the module_adapter which will be used to update the source device pointers in the source_info table. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
When module_reset() returns a non-zero value, print an error if needed and return immediately. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
The check for status counts for modules with multiple sources is only applicable for IPC3. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Initialize the hw_params to 0 before passing it to the individual components in the pipeline. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Convert the mixout module to use the module adapter. The bind/unbind/get_attribute ops in the mixout module have been moved to the module_adapter ops and is functionally the same as with the comp_drv ops. The struct mixout_data struct has been simplified to contain 2 fields as the source info table has been moved to struct processing_module and rename the consumed_yet_not_produced_frames field in struct mixout_data to pending_frames. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
1c2bb38 to
6dad788
Compare
singalsu
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 to me with disclaimer that I don't know really about coherent and IPC4.
|
FYI @serhiy-katsyuba-intel please check. This was already merged, but you had comments to previous PR on this topic. |
|
@kv2019i , I do not see any problems now, yet it's not easy to review -- big change. |
No description provided.