diff --git a/subsys/CMakeLists.txt b/subsys/CMakeLists.txt index 44d1f82eab8..c59492e7725 100644 --- a/subsys/CMakeLists.txt +++ b/subsys/CMakeLists.txt @@ -19,7 +19,7 @@ add_subdirectory(random) add_subdirectory(storage) add_subdirectory_ifdef(CONFIG_SETTINGS settings) add_subdirectory(fb) -add_subdirectory(dsp) +add_subdirectory_ifdef(CONFIG_DSP dsp) add_subdirectory(portability) add_subdirectory(pm) add_subdirectory(stats) diff --git a/subsys/dsp/CMakeLists.txt b/subsys/dsp/CMakeLists.txt index a8ebd0ca921..8a07484fece 100644 --- a/subsys/dsp/CMakeLists.txt +++ b/subsys/dsp/CMakeLists.txt @@ -1,8 +1,4 @@ # Copyright (c) 2022 Google LLC # SPDX-License-Identifier: Apache-2.0 -zephyr_library_named(zdsp) - add_subdirectory_ifdef(CONFIG_DSP_BACKEND_CMSIS cmsis) - -zephyr_link_libraries(zdsp) diff --git a/subsys/dsp/Kconfig b/subsys/dsp/Kconfig index e053d9f6a38..d4e203c5267 100644 --- a/subsys/dsp/Kconfig +++ b/subsys/dsp/Kconfig @@ -1,6 +1,15 @@ # Copyright (c) 2022 Google LLC # SPDX-License-Identifier: Apache-2.0 +menuconfig DSP + bool "DSP subsystem" + help + Include the DSP (Digital Signal Processing) subsystem as a part of the + Zephyr build. This enables applications to include and call into the + header. + +if DSP + config DSP_BACKEND_HAS_STATIC bool @@ -24,3 +33,5 @@ config DSP_BACKEND_CUSTOM added to the 'zdsp' build target by the application or one of its modules. endchoice + +endif # DSP diff --git a/subsys/dsp/cmsis/CMakeLists.txt b/subsys/dsp/cmsis/CMakeLists.txt index c2b1bc0e6f2..d1e6385d4b9 100644 --- a/subsys/dsp/cmsis/CMakeLists.txt +++ b/subsys/dsp/cmsis/CMakeLists.txt @@ -1,4 +1,4 @@ # Copyright (c) 2022 Google LLC # SPDX-License-Identifier: Apache-2.0 -target_include_directories(zdsp PUBLIC public) +zephyr_include_directories(public) diff --git a/tests/subsys/dsp/basicmath/prj.conf b/tests/subsys/dsp/basicmath/prj.conf index 4511e31f3aa..912a703fd9e 100644 --- a/tests/subsys/dsp/basicmath/prj.conf +++ b/tests/subsys/dsp/basicmath/prj.conf @@ -1,6 +1,7 @@ CONFIG_ZTEST=y CONFIG_ZTEST_NEW_API=y CONFIG_NEWLIB_LIBC=y +CONFIG_DSP=y CONFIG_CMSIS_DSP=y CONFIG_CMSIS_DSP_BASICMATH=y CONFIG_DSP_BACKEND_CMSIS=y