Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Audio: Copier: Use SOF_DIV_ROUND_UP() instead of ROUND_UP()
The ROUND_UP() is provided by Zephyr headers and can't be used in testbench (IPC4) build. The ROUND_UP is defined in util.h as: "#define ROUND_UP(x, align) \ (((unsigned long)(x) + ((unsigned long)(align) - 1)) & \ ~((unsigned long)(align) - 1))" and SOF_DIV_ROUND_UP in common.h as: "#define SOF_DIV_ROUND_UP(val, div) (((val) + (div) - 1) / (div))" The round up and divide by shift in original code can be replaced with the rounding divide macro from SOF. There is no code speed impact from division since it's done in C pre-processor. The MAX_GAIN_COEFFS_CNT is much less than default 32 bit integer range, so these compute the same. Signed-off-by: Seppo Ingalsuo <[email protected]>
- Loading branch information