Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
google_aec: Rework prepare/process() to support dynamic formats
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