Math: Build library functions if enabled from Kconfig

This patch adds src/math/Kconfig with items CORDIC_TRIGONOMETRY_FIXED,
NUMBERS_GCD, NUMBERS_NORM, NUMBERS_VECTOR_FIND, MATH_DECIBELS, MATH_FFT,
MATH_FIR, and MATH_IIR_DF2T.

Configuration FIR and FFT were previously in src/audio/Kconfig but they
were moved to new math location for simplicity.

The build of trig.c was simplified by remove of unused UNIT_CORDIC_TEST
and CONFIG_CORDIC_TRIGONOMETRY_FIXED.

All but build details of numbers.c are handled by src/math/CMakeList.txt
if(CONFIG_X) additions. There was need to add "-DCONFIG_NUMBERS_x" into
target_compile_definitions() in test/cmocka/CMakeLists.txt because
the platforms those drop most features e.g. BYT would fail in test
case build.

Tone generator build is disabled for all platforms. It avoids select of
triginometric functions and saves RAM.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
9 files changed
tree: e956db486e4da0d14116ac8b869bc2f958a755f8
  1. .github/
  2. doc/
  3. installer/
  4. keys/
  5. scripts/
  6. smex/
  7. src/
  8. test/
  9. tools/
  10. zephyr/
  11. .gitignore
  12. .gitmodules
  13. .travis.yml
  14. CMakeLists.txt
  15. CODEOWNERS
  16. Kconfig
  17. Kconfig.sof
  18. Kconfig.xtos-build
  19. Kconfig.xtos-dbg
  20. LICENCE
  21. README.md
README.md

Sound Open Firmware

Status

GitHub Actions Build Status Gitter chat

Documentation

See docs

Running the tests

See unit testing documentation

Deployment

TODO: Add additional notes about how to deploy this on a live system

Contributing

See Contributing to the Project

License

This project is licensed under the BSD Clause 3 - see the LICENCE file for details