P20 drc - convert the rc module to only use the sink/source api - #11001
P20 drc - convert the rc module to only use the sink/source api#11001piotrhoppeintel wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.
Converts the DRC module processing path from the legacy audio_stream buffer API to the sof_source/sof_sink API, and adds a dedicated cmocka process-level test to validate the new data flow.
Changes:
- Update DRC processing entrypoint to use
sof_source/sof_sinkand circular-buffer views (cir_buf_source/cir_buf_sink). - Refactor DRC kernels (generic + HiFi4) to operate on circular-buffer pointers rather than
audio_streamhelpers. - Add a new cmocka
drc_processunit test and embed coefficient blobs for enabled / passthrough modes.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| test/cmocka/src/audio/drc/drc_process.c | New cmocka test that instantiates the module adapter and directly exercises cd->drc_func() with circular-buffer views. |
| test/cmocka/src/audio/drc/cmocka_drc_coef.h | Adds generated DRC configuration blobs used by the new process test. |
| test/cmocka/src/audio/drc/CMakeLists.txt | Adds the drc_process test target and a small static audio_for_drc library to satisfy module dependencies. |
| src/audio/drc/drc_hifi4.c | Updates passthrough + delay/processing routines to use cir_buf_* sources/sinks and wrapping. |
| src/audio/drc/drc_generic.c | Same as above for the generic implementation; adds memcpy_s include usage. |
| src/audio/drc/drc.h | Updates public DRC function signature to cir_buf_source/cir_buf_sink and stores channel count in drc_comp_data. |
| src/audio/drc/drc.c | Switches module interface to .process and implements source/sink acquire/commit flow. |
|
|
||
| cmocka_test(drc_process | ||
| drc_process.c | ||
| ) |
There was a problem hiding this comment.
Done. Test moved to the Ztest framework.
Add native_sim Ztest coverage for two-channel DRC processing. Cover S16, S24, and S32 pass-through and enabled configurations through component creation, configuration, preparation, and processing. Add the minimal SOF allocator and context support required by the standalone test application while keeping existing CMocka tests and production sources unchanged. Signed-off-by: Piotr Hoppe <piotr.hoppe@intel.com>
ce1d88e to
cd35aa4
Compare
Convert the DRC module from the legacy audio_stream processing API to the modern sof_source/sof_sink API.
cd35aa4 to
1804c1e
Compare
|
All comments have been addressed. @lyakh please review. |
PR 11001: test resultsRun date: 2026-09-02 14:03 UTC Tested commit: 1804c1e18e34c73771cc8bb4129e9ca07e002b84 |
Convert the DRC module from the legacy audio_stream processing API
to the modern sof_source/sof_sink API.