-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audio: Fix Xtensa HiFi5 build for audio processing components #9420
Audio: Fix Xtensa HiFi5 build for audio processing components #9420
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this calls for a "MIN_HIFI" macro
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem very nice if we get more HIFI versions later. Please see proposal inline. If this requires more rework, I'm fine to merge this now to unblock hifi5 work and log a bug to improve this in common.h.
src/audio/drc/drc_math.h
Outdated
@@ -18,7 +18,7 @@ | |||
/* Unmark this define to use cordic arc sine implementation. */ | |||
/* #define DRC_USE_CORDIC_ASIN */ | |||
|
|||
#if SOF_USE_HIFI(4, DRC) || SOF_USE_HIFI(3, DRC) | |||
#if SOF_USE_HIFI(5, DRC) || SOF_USE_HIFI(4, DRC) || SOF_USE_HIFI(3, DRC) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, I agree with Curtis that this seems a bit silly and we'll have same problem with HIFI6/7. I think this macro continues to be valid for code that targets a specific hifi version, but given it seems we have code that should be compiled with whatever max hifi level, I think something like:
#define SOF_MIN_HIFI(level, component) (SOF_CONFIG_HIFI(level, component) || \
» (SOF_CONFIG_HIFI(MAX, component) && level <= SOF_MAX_XCHAL_HIFI))
and then use "SOF_MIN_HIFI(3, DRC)" in this code. Can you @singalsu test this out?
specifically uses
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets unblock for now, and align on a fix for v2.12. @singalsu pls self assign this feature.
This patch avoids build error when testbench is built with a Xtensa HiFi5 tool chain. The same issue is assumed to happen in a normal firmware build as well. A new macro SOF_USE_MIN_HIFI(minlevel, component) is added. It can be used for the highest HiFi version optimization source to allow build with a toolchain that is for a higher HiFi version. E.g. build a HiFi4 module with toolchain for HiFi4 or HiFi5. The updated components those got build issues are: DCblock, DRC, FIR, TDFB, and IIR. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2901f9a
to
90938c7
Compare
This patch avoids build error when testbench is built with a Xtensa HiFi5 tool chain. The changes select for HiFi5 the best option of available HiFi4 or HiFi3 code options. No HiFi5 specific optimizations are done.
The updated components those got build issues are: DCblock, DRC, FIR, TDFB, and IIR.