Skip to content

Conversation

@uvvpavel
Copy link
Collaborator

@uvvpavel uvvpavel commented Nov 3, 2025

No description provided.

@uvvpavel uvvpavel requested a review from Copilot November 3, 2025 12:40
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 refactors the AEC (Acoustic Echo Cancellation) processing framework to support configurable thread counts (1-5 threads) through a unified implementation, replacing separate thread-specific implementations. The changes introduce auto-generated configuration files and task distribution schemes.

  • Unified aec_process_frame() function replacing separate aec_process_frame_1thread() and aec_process_frame_2threads() functions
  • Python script to auto-generate AEC configuration and task distribution headers/sources
  • Consolidated library target fwk_voice::example::aec_proc_frame replacing separate aec1thread and aec2thread targets

Reviewed Changes

Copilot reviewed 31 out of 31 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
test/shared/python/generate_task_distribution_scheme.py Enhanced generator script with better documentation, pathlib usage, and improved code formatting
examples/bare-metal/shared_src/aec/aec_process_frame.c Unified AEC processing function with conditional compilation for 1-5 threads and x86/XS3A platforms
examples/bare-metal/shared_src/aec/aec_process_frame_1thread.c Removed single-threaded implementation (replaced by unified version)
examples/bare-metal/shared_src/CMakeLists.txt Updated library target from thread-specific to unified aec_proc_frame
test/lib_aec/aec_unit_tests/CMakeLists.txt Updated dependency to unified library target
test/lib_adec/*/CMakeLists.txt Updated dependencies and removed conditional thread-count logic
examples/bare-metal//src/.{c,h} Updated function calls and included auto-generated config files
examples/bare-metal/*/src/aec_config.h Auto-generated configuration headers with thread count and channel parameters
examples/bare-metal/*/src/aec_task_distribution.{h,c} Auto-generated task distribution structures and data
Comments suppressed due to low confidence (3)

examples/bare-metal/shared_src/aec/aec_process_frame.c:75

  • Index error in 5-thread case: line 75 uses par_struct[3] instead of par_struct[4]. This causes the 5th thread to execute the same task as the 4th thread instead of its own assigned task.
    examples/bare-metal/shared_src/aec/aec_process_frame.c:350
  • Incorrect parameter: should pass num_x_channels instead of num_y_channels when calculating X_EMA. This function call is for processing reference channels (X), not microphone channels (Y).
    examples/bare-metal/shared_src/aec/aec_process_frame.c:369
  • Incorrect parameter: should pass num_x_channels instead of num_y_channels when performing X_FFT. This function call processes reference channel FFTs (X), not microphone channel FFTs (Y).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@uvvpavel uvvpavel requested a review from Allan-xmos November 3, 2025 13:16
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