Skip to content

Conversation

@marc-hb
Copy link
Collaborator

@marc-hb marc-hb commented Jan 25, 2024

  1. The if XCHAL_HAVE_HIFI4 macro logic is duplicated across many source files. Starting with dcblock.h, make it generic and move it to common.h

  2. Add the ability to override the max available HIFI level using Kconfig

…on.h

1. The `if XCHAL_HAVE_HIFI4` macro logic is duplicated across many
source files. Starting with dcblock.h, make it generic and move it to
common.h

2. Add the ability to override the max available HIFI level using
Kconfig

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
@marc-hb
Copy link
Collaborator Author

marc-hb commented Jan 25, 2024

This is #8720 but with a Kconfig choice instead + some minor cleanups.

@marc-hb
Copy link
Collaborator Author

marc-hb commented Jan 25, 2024

#define SOF_USE_HIFI(level, component) (SOF_CONFIG_HIFI(level, component) || \
(SOF_CONFIG_HIFI(MAX, component) && level == SOF_MAX_XCHAL_HIFI))

#ifndef __XCC__ // Cadence toolchains: either xt-xcc or xt-clang.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those will eventually be removed, I am fully understand you have 100% confidence on these definitions, however, it is still have possibility to have unexpected situations to handling, if introduce new bugs, then what we got(less code duplicate) is less than what we lost, just my opinion.

Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @marc-hb - lets replicate for other modules.
@cujomalainey fyi - this will allow us to select HiFi level module by module to help integration and testing of upstream xtensa clang HiFi support.

#include "dcblock.h"

#ifdef DCBLOCK_HIFI4
#if SOF_USE_HIFI(4, DCBLOCK)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrula-song or anyone working with HiFi5 please make/submit this temporary change until dcblock_hifi5.c exists:

Suggested change
#if SOF_USE_HIFI(4, DCBLOCK)
#if SOF_USE_HIFI(4, DCBLOCK) || SOF_USE_HIFI(5, DCBLOCK)

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