Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

singalsu
Copy link
Collaborator

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.

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.

Signed-off-by: Seppo Ingalsuo <[email protected]>
@singalsu singalsu marked this pull request as ready for review September 6, 2024 15:28
Copy link
Member

@cujomalainey cujomalainey left a 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

Copy link
Collaborator

@kv2019i kv2019i left a 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.

@@ -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)
Copy link
Collaborator

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

Copy link
Member

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.

@singalsu singalsu self-assigned this Sep 20, 2024
@singalsu singalsu added this to the v2.12 milestone Sep 20, 2024
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.

4 participants