Repository navigation
audio: kpb: enable HiFi4 optimized paths - #11452
Merged
Merged
Conversation
Configure KPB circular buffers and HiFi intrinsics for optimized processing on HiFi4 cores. Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Simultaneous source/sink hardware wrapping and newly enabled HiFi5 intrinsics, including 24-bit helpers, require Cadence-toolchain and target-DSP validation beyond this source-only review.
No open issues 🎉
What changed in this PR
Enables optimized Key Phrase Buffer (KPB) processing on HiFi4 cores while preserving the existing HiFi3 paths.
Changes:
- Adds HiFi4/HiFi5 feature selection and a shared
KPB_HIFIguard. - Uses separate hardware circular buffers for input and output in HiFi4 microphone-selection copies.
- Extends existing optimized sample-conversion paths to the newly selected cores.
| File | Description |
|---|---|
src/include/sof/audio/kpb.h |
Defines HiFi4/HiFi5 selection and the shared HiFi optimization guard. |
src/audio/kpb.c |
Adds HiFi4 intrinsics and circular-buffer copy paths; updates guards for shared optimized conversions. |
Review effort: Balanced
PR 11452: test resultsRun date: 2026-11-13 08:27 UTC Tested commit: 7ad6a51599aba022fc9a8762c12c45f9b9f1a49e |
lgirdwood
approved these changes
Nov 13, 2026
Comment on lines
+1135
to
+1140
| #ifdef KPB_HIFI4 | ||
| AE_SETCBEGIN0(audio_stream_get_addr(istream)); | ||
| AE_SETCEND0(audio_stream_get_end_addr(istream)); | ||
| AE_SETCBEGIN1(audio_stream_get_addr(ostream)); | ||
| AE_SETCEND1(audio_stream_get_end_addr(ostream)); | ||
| #else |
Member
There was a problem hiding this comment.
A later optimization could be to make these static inline per SIMD flavor with generic C version too. That way we can remove a lot of the compile time conditionals.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Configure KPB circular buffers and HiFi intrinsics for optimized processing on HiFi4 cores.