Skip to content

Conversation

@dbaluta
Copy link
Collaborator

@dbaluta dbaluta commented Sep 22, 2025

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!

Copilot AI review requested due to automatic review settings September 22, 2025 12:08
Copy link

Copilot AI left a 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 */
Copy link

Copilot AI Sep 22, 2025

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.

Suggested change
/* compute number of input buffers */
/* compute number of input buffers */
struct list_item *blist;

Copilot uses AI. Check for mistakes.
Comment on lines +321 to +324
/* compute number of output buffers */
mod->num_of_sinks = 0;
list_for_item(blist, &dev->bsink_list)
mod->num_of_sinks++;
Copy link

Copilot AI Sep 22, 2025

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.

Copilot uses AI. Check for mistakes.
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!
Copy link
Collaborator

@kv2019i kv2019i left a 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...

@dbaluta
Copy link
Collaborator Author

dbaluta commented Sep 22, 2025

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 :(

@dbaluta dbaluta merged commit 2cdf3e8 into thesofproject:main Sep 22, 2025
36 of 45 checks passed
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.

3 participants