-
Notifications
You must be signed in to change notification settings - Fork 349
Convert #if XCHAL_HIFI logic to new CONFIG_DCBLOCK_HIFI #8733
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
Conversation
The `if XCHAL_HAVE_HIFI4` macro logic is duplicated across many source files. Starting with dcblock.h, make it generic and move it to Kconfig This adds the ability to override the max available HIFI level using Kconfig Signed-off-by: Marc Herbert <marc.herbert@intel.com>
|
To actually build with HiFi, this depends on WARNING: non-Zephyr platforms will require an XTOS equivalent of Zephyr's67513 in the SOF repo. Otherwise they will... silently disable HiFi? This is one problem with this approach: I CANNOT test XTOS because I only have Intel toolchains and there is no Intel XTOS in this branch anymore. Someone outside Intel will have to implement and test the XTOS part of this. @andyross ? |
|
|
||
| # The first valid one seems to be the default. | ||
| # If not reliably, this can also be achieved with 3 | ||
| # explicit `default` lines above. |
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.
More specifically:
default DCBLOCK_GENERIC if !XTENSA_TOOLCHAIN_HAS_HIFI
default DCBLOCK_HIFI4 if XTENSA_ARCH_HAS_HIFI4
default DCBLOCK_HIFI3 if XTENSA_ARCH_HAS_HIFI3
Also tested.
Unlike the order of the values themselves, "first valid default wins" is documented and guaranteed.
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.
ok, so does XTENSA_ARCH_HAS_HIFI3 etc come from Zephyr Kconfig ? I guess some of this is still WIP on the Zephyr side.
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.
ok, so does XTENSA_ARCH_HAS_HIFI3 etc come from Zephyr Kconfig ? I guess some of this is still WIP on the Zephyr side.
Yes, as mentioned above it's zephyrproject-rtos/zephyr#67513. It didn't draw huge crowds but the little feedback has been positive so far.
The main problem is: how to duplicate 67513 in XTOS and test it? XTOS was removed from the main branch for Intel. Maybe I can try to use a Cadence/Intel toolchain for compile-testing some non-Intel platform? Either way this will duplicate a lot of macros which are already duplicating core-isa.h. Much smaller alternative #8720 keeps relying on core-isa.h which means it has none of these problems.
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.
yes, IPC3 is one problem, another problem is non-zephyr build, then all will use generic version.
ever or never consider BUILD_ENV? I don't have a perfect solution for now, each method seems have shortcomings.
|
Alternative #8787 has been merged. |
The
if XCHAL_HAVE_HIFI4macro logic is duplicated across many source files. Starting with dcblock.h, make it generic and move it to KconfigThis adds the ability to override the max available HIFI level using Kconfig
EDIT: this is what was (I think) requested in alternative #8720 (comment)