1.. _zdsp_api: 2 3Digital Signal Processing (DSP) 4############################### 5 6.. contents:: 7 :local: 8 :depth: 2 9 10The DSP API provides an architecture agnostic way for signal processing. 11Currently, the API will work on any architecture but will likely not be 12optimized. The status of the various architectures can be found below: 13 14============ ============= 15Architecture Status 16============ ============= 17ARC Optimized 18ARM Optimized 19ARM64 Optimized 20MIPS Unoptimized 21POSIX Unoptimized 22RISCV Unoptimized 23RISCV64 Unoptimized 24SPARC Unoptimized 25X86 Unoptimized 26XTENSA Unoptimized 27============ ============= 28 29Using zDSP 30********** 31 32zDSP provides various backend options which are selected automatically for the 33application. By default, including the CMSIS module will enable all 34architectures to use the zDSP APIs. This can be done by setting:: 35 36 CONFIG_CMSIS_DSP=y 37 38If your application requires some additional customization, it's possible to 39enable :kconfig:option:`CONFIG_DSP_BACKEND_CUSTOM` which means that the 40application is responsible for providing the implementation of the zDSP 41library. 42 43Optimizing for your architecture 44******************************** 45 46If your architecture is showing as ``Unoptimized``, it's possible to add a new 47zDSP backend to better support it. To do that, a new Kconfig option should be 48added to :file:`subsys/dsp/Kconfig` along with the required dependencies and the 49``default`` set for ``DSP_BACKEND`` Kconfig choice. 50 51Next, the implementation should be added at ``subsys/dsp/<backend>/`` and 52linked in at :file:`subsys/dsp/CMakeLists.txt`. To add architecture-specific attributes, 53its corresponding Kconfig option should be added to :file:`subsys/dsp/Kconfig` and use 54them to update ``DSP_DATA`` and ``DSP_STATIC_DATA`` in :file:`include/zephyr/dsp/dsp.h`. 55 56API Reference 57************* 58 59.. doxygengroup:: math_dsp 60 61.. _subsys/dsp/Kconfig: https://github.com/zephyrproject-rtos/zephyr/blob/main/subsys/dsp/Kconfig 62.. _subsys/dsp/CMakeLists.txt: https://github.com/zephyrproject-rtos/zephyr/blob/main/subsys/dsp/CMakeLists.txt 63.. _include/zephyr/dsp/dsp.h: https://github.com/zephyrproject-rtos/zephyr/blob/main/include/zephyr/dsp/dsp.h 64