Skip to content

Commit

Permalink
google_aec: Rework prepare/process() to support dynamic formats
Browse files Browse the repository at this point in the history
Big rewrite of the core processing code of AEC:

Support both S32 and S16 input and output formats, dynamically
selected at prepare() time based on stream configuration.

Copy/convert data in maximally inlined/unrolled loops, using
cleanly-generated (no duplication!) custom conversion utilities for
each format variant.

Orthogonalize and elaborate the validation code in prepare().  Check
all state for all input/output streams.

Decouple AEC operation from the input stream, filling zeros on
underflow and allowing AEC to run in circumstances where no playback
data exists and to recover when it starts/stops.  IPC3 setups can
exploit this now, unfortunately IPC4 always starts connected pipelines
from the host kernel so sees no benefit.

Fix a latency bug with the original code where it would copy the
processed results to the output stream before the call to
ProcessCapture() instead of after, leading to a needless delay.  Copy
the results as soon as they are available, if the output buffer backs
up, we'll continue at the next call to process()

Signed-off-by: Andy Ross <[email protected]>
  • Loading branch information
andyross committed Jun 11, 2024
1 parent bec4a57 commit fb41c0f
Showing 1 changed file with 311 additions and 287 deletions.
Loading

0 comments on commit fb41c0f

Please sign in to comment.