Skip to content

tools: plugin: module: noise suppression: rework module to use sink/source - #11255

Open
softwarecki wants to merge 1 commit into
thesofproject:mainfrom
softwarecki:p20-ns
Open

softwarecki wants to merge 1 commit into
thesofproject:mainfrom
softwarecki:p20-ns

Conversation

@softwarecki

Copy link
Copy Markdown
Collaborator

Rework the noise suppression module to only use the sink/source api to prepare sof for the full transition to pipeline 2.0.

…ource

Rework the noise suppression module to only use the sink/source api to
prepare sof for the full transition to pipeline 2.0.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>

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.

Copilot review overview

🟡 Changes recommended

Compilation errors and unsafe model-frame sizing must be corrected.

Review effort: Balanced
Findings: 3 High severity · 1 Low severity

Open (4)
What changed in this PR

Reworks OpenVINO noise suppression for the pipeline 2.0 source/sink API.

Changes:

  • Replaces legacy stream-buffer processing.
  • Adds circular source/sink buffer handling.
  • Updates the C/C++ processing interface.
File Description
noise_suppression.c Adopts source/sink processing.
noise_suppression_interface.h Updates the processing contract.
noise_suppression_interface.cpp Processes circular buffers directly.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +67 to +68
frames = source_get_data_frames_available(source);
frames = MIN(frames, sink_get_free_frames(sink));
int16_t *input_data = (int16_t *)audio_stream_get_rptr(source);
int16_t *output_data = (int16_t *)audio_stream_get_wptr(sink);
uint32_t frame_count = input_buffers[0].size;
const int16_t *input_data = static_cast<const int16_t >(source->ptr);
inp = (char *)source->addr +
((char *)inp - (char *)source->end_addr);
/* split each channel samples and convert to floating point */
for (size_t i = 0, i < frame_count; i++) {
Comment on lines 52 to +54
ns_process(struct processing_module *mod,
struct input_stream_buffer *input_buffers, int num_input_buffers,
struct output_stream_buffer *output_buffers, int num_output_buffers)
struct sof_source **sources, int num_of_sources,
struct sof_sink **sinks, int num_of_sinks)
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