Skip to content

audio: module_adapter: remove process_audio_stream callback - #11368

Open
softwarecki wants to merge 2 commits into
thesofproject:mainfrom
softwarecki:p20-stream
Open

softwarecki wants to merge 2 commits into
thesofproject:mainfrom
softwarecki:p20-stream

Conversation

@softwarecki

@softwarecki softwarecki commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Stop using the input_buffers and output_buffers members of struct processing_module in the cmocka tests. The dcblock, eq_fir and eq_iir tests keep the number of filled frames and produced bytes in their own test data structure. Remove the stream buffer descriptors, which were not more used by the converted modules.

Remove the legacy audio_stream processing path in module_adapter. Drop the process_audio_stream callback from struct module_interface together with struct input_stream_buffer and struct output_stream_buffer. Remove the processing type selection proc_type. The sink/source process() callback is now the only supported one.

Delete the fields of struct processing_module that served only the removed path. The cache maintenance flags are not needed with the sink/source API because source_get_data() and sink_commit_buffer() operate on the requested range only, and cache operations are performed solely for buffers shared between cores. The IPC4 bind and unbind handlers keep refreshing the
sources and sinks arrays used by prepare.

Bump SOF_MODULE_API_CURRENT_VERSION to 5.0.3 since the layout of the structures changed. Modules built against the previous version are rejected by the loaders.

All modules were converted to process() earlier, so the removed code was no longer reachable.

Depends on:

Stop using the input_buffers and output_buffers members of struct
processing_module in the cmocka tests. The dcblock, eq_fir and eq_iir tests
keep the number of filled frames and produced bytes in their own test data
structure. Remove the stream buffer descriptors, which were not more used
by the converted modules.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Remove the legacy audio_stream processing path in module_adapter. Drop the
process_audio_stream callback from struct module_interface together with
struct input_stream_buffer and struct output_stream_buffer. Remove the
processing type selection proc_type. The sink/source process() callback is
now the only supported one.

Delete the fields of struct processing_module that served only the removed
path. The cache maintenance flags are not needed with the sink/source API
because source_get_data() and sink_commit_buffer() operate on the requested
range only, and cache operations are performed solely for buffers shared
between cores. The IPC4 bind and unbind handlers keep refreshing the
sources and sinks arrays used by prepare.

Bump SOF_MODULE_API_CURRENT_VERSION to 5.0.3 since the layout of the
structures changed. Modules built against the previous version are rejected
by the loaders.

All modules were converted to process() earlier, so the removed code
was no longer reachable.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
@softwarecki
softwarecki marked this pull request as ready for review October 28, 2026 16:29
Copilot AI balanced review requested due to automatic review settings October 28, 2026 16:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

TDFB-enabled builds break because TDFB and its processing helpers still depend on the removed legacy stream-buffer API and must be migrated to the sink/source API.

1 open issue
What changed in this PR

This PR removes module_adapter’s legacy process_audio_stream path, making sink/source process() the sole supported processing callback.

Changes:

  • Remove legacy callbacks, buffer descriptors, processing-mode selection, and associated adapter code.
  • Move cmocka frame and byte tracking into test-owned data and remove obsolete allocations.
  • Bump the module API version to 5.0.3 and update processing documentation.
File Description
test/​cmocka/​src/​audio/​volume/​volume_process.c Remove obsolete descriptor resets.
test/​cmocka/​src/​audio/​mux/​mux_copy.c Remove obsolete descriptor cleanup.
test/​cmocka/​src/​audio/​mux/​demux_copy.c Remove obsolete descriptor cleanup.
test/​cmocka/​src/​audio/​module_adapter.h Remove stream descriptors from shared test data.
test/​cmocka/​src/​audio/​module_adapter_test.c Remove descriptor allocation and cleanup.
test/​cmocka/​src/​audio/​eq_iir/​eq_iir_process.c Track frames and output bytes in test data.
test/​cmocka/​src/​audio/​eq_fir/​eq_fir_process.c Replace descriptors with test-owned counters.
test/​cmocka/​src/​audio/​dcblock/​dcblock_process.c Replace descriptors with test-owned counters.
src/​include/​sof/​audio/​module_adapter/​module/​generic.h Remove legacy processing declarations and wrappers.
src/​include/​module/​module/​interface.h Remove the legacy callback and buffer types.
src/​include/​module/​module/​base.h Remove legacy processing state and fields.
src/​include/​module/​module/​api_ver.h Bump the module API to 5.0.3.
src/​audio/​module_adapter/​README.md Document the sink/source-only processing path.
src/​audio/​module_adapter/​module/​README.md Update the documented callback name.
src/​audio/​module_adapter/​module/​modules.c Remove processing-type assignment.
src/​audio/​module_adapter/​module/​generic.c Require process() and remove legacy helpers.
src/​audio/​module_adapter/​module_adapter.c Remove legacy preparation, copying, and cleanup paths.
src/​audio/​module_adapter/​module_adapter_ipc4.c Retain connection-array refresh without legacy state.
src/​audio/​module_adapter/​module_adapter_ipc3.c Remove legacy single-buffer setup.
src/​audio/​mixin_mixout/​mixin_mixout.c Remove obsolete cache-maintenance flags.
src/​audio/​asrc/​asrc.c Remove obsolete cache-maintenance flags.

Review effort: Balanced

*
* there are 2 versions of the procedure, the difference is the format of
* input/output data
* the module MUST implement it
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.

2 participants