-
Notifications
You must be signed in to change notification settings - Fork 349
Revert "module_adapter: Count sinks/sources during bind" #10252
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
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.
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 */ |
Copilot
AI
Sep 22, 2025
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.
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++; |
Copilot
AI
Sep 22, 2025
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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!