Revert "module_adapter: Count sinks/sources during bind"#10252
Revert "module_adapter: Count sinks/sources during bind"#10252dbaluta merged 1 commit intothesofproject:mainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR reverts a commit that moved sink/source counting from the prepare phase to the bind/unbind phases. The revert is necessary because the bind/unbind approach breaks IPC3 API compatibility, where no function updates the num_sources and num_sinks counters, causing module adapter processing pipelines to fail.
- Restores sink/source counting in the prepare phase by iterating through buffer lists
- Removes sink/source counting from bind/unbind operations
- Adds counter reset in the reset function
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/audio/module_adapter/module_adapter.c | Restores source/sink counting in prepare phase and adds counter reset |
| src/audio/module_adapter/module/generic.c | Removes source/sink counting from bind/unbind operations |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| if (IS_PROCESSING_MODE_SINK_SOURCE(mod)) | ||
| return 0; | ||
|
|
||
| /* compute number of input buffers */ |
There was a problem hiding this comment.
The variable blist is used in the list_for_item macro but is not declared. This will cause a compilation error.
| /* compute number of input buffers */ | |
| /* compute number of input buffers */ | |
| struct list_item *blist; |
| /* compute number of output buffers */ | ||
| mod->num_of_sinks = 0; | ||
| list_for_item(blist, &dev->bsink_list) | ||
| mod->num_of_sinks++; |
There was a problem hiding this comment.
The variable blist is used in the list_for_item macro but is not declared. This will cause a compilation error.
This reverts commit ba3e73f. This breaks IPC3 API because not function updates the num_sources and num_sinks for IPC3. Thus any processing pipeline using module adapter will fail with: [00:00:00.003,212] <err> module_adapter: comp:1.1 no source and sink buffers connected!
kv2019i
left a comment
There was a problem hiding this comment.
Doh, we tried to cover IPC3 aspect in review, but missed the obvious one. It would be nice to have a IPC3 platform in PR testing to get immediate feedback of such breakage...
We have CI test enabled for main branch but unfortunately we can catch the errors just after they are merged :( |
This reverts commit ba3e73f.
This breaks IPC3 API because not function updates the num_sources and num_sinks for IPC3.
Thus any processing pipeline using module adapter will fail with:
[00:00:00.003,212] module_adapter: comp:1.1 no source and sink buffers connected!