Skip to content

Conversation

@ranj063
Copy link
Collaborator

@ranj063 ranj063 commented Dec 17, 2022

No description provided.

@ranj063 ranj063 force-pushed the fix/mixout_convert branch 2 times, most recently from d325b3e to 1b3742e Compare December 17, 2022 04:37
@ranj063 ranj063 marked this pull request as ready for review December 17, 2022 06:05
@ranj063 ranj063 force-pushed the fix/mixout_convert branch 5 times, most recently from 6256676 to 1c2bb38 Compare December 19, 2022 03:05
Copy link
Collaborator

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...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@lyakh the buffer_acquite(source) part will be removed in the PR #6836. So that leaves just 2 and I will verify if the ordering if correct in that one

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>
Copy link
Collaborator

@singalsu singalsu 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 to me with disclaimer that I don't know really about coherent and IPC4.

@lgirdwood lgirdwood merged commit bf7aa04 into thesofproject:main Dec 20, 2022
@kv2019i
Copy link
Collaborator

kv2019i commented Dec 20, 2022

FYI @serhiy-katsyuba-intel please check. This was already merged, but you had comments to previous PR on this topic.

@ranj063 ranj063 deleted the fix/mixout_convert branch December 20, 2022 17:42
@serhiy-katsyuba-intel
Copy link
Contributor

@kv2019i , I do not see any problems now, yet it's not easy to review -- big change.

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.

6 participants