Commit Graph

241 Commits

Author SHA1 Message Date
Guennadi Liakhovetski 753e363f0f mixin-mixout: make modular
Convert mixin-mixout to a loadable llext module.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-05-14 14:37:44 +01:00
Guennadi Liakhovetski 05e69e1bb9 llext: update to use add_llext_target()
Zephyr now provides a convenient cmake API for LLEXT modules, update
SOF to use it by defining common cmake functions.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-05-14 14:37:44 +01:00
Tomasz Lissowski 4f3e4f98ac cadence: add support for mp3 encoder
This adds support for Cadence MP3 Encoder module.

Signed-off-by: Tomasz Lissowski <tomasz.lissowski@intel.com>
2024-05-09 10:49:09 +01:00
Andy Ross e7f76eec4d platform/posix: Unbreak fuzzer support
Upstream Zephyr moved the LLVM fuzzer entry point out of the arch
layer and made it an app responsibility, so we broke.  Add back the
support here that got removed.

Fixes #9101

Signed-off-by: Andy Ross <andyross@google.com>
2024-05-09 11:13:15 +03:00
Kai Vehmanen b10ec85ebd audio: base_fw: do not use platform interface for vendor extensions
In commit 14c4e86757 ("audio: base_fw: add platform layer to IPC4
hw_config data"), the platform specific code was moved to platform
layer.

This commit implements a lighter weight abstraction for the moved
code. Instead of using the platform layer, the Intel specific vendor
code is added directly in base_fw_intel.c and guarded by a Kconfig.
All other IPC4 build targets will use an empty implementation.

This avoids the need to add a platform definition for all IPC4 targets.
The common implementation in base_fw.c is sufficient to cover all
mandatory functionality required e.g. by the upstream SOF Linux driver's
IPC4 implementation.

The interfaces are renamed to refer to "vendor" instead of "platform",
to avoid any confusion with the platform layer with the new
implementation.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-05-08 09:41:28 +01:00
Guennadi Liakhovetski 9a2d1a6f05 module: support multi-module builds
To be able to build and sign multiple modules within one build we
need to unify name generation. For signing we invoke something like
west sign -i smart_amp_test
which means, that the west sign utility must be able to locate the
module binary directory and recognise files in it using only that
input file name. It will then create signed llext images inside those
binary directories too, so that deployment scripts can find and
recognise them there. We unify the naming as
${MODULE}_llext - for the binary directory,
${MODULE}.so - ELF file for signing in that directory
${MODULE}.llext - final signed extension
llext.uuid - a file with a list of UUIDs, provided by this extension

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-05-07 10:51:34 +03:00
Laurentiu Mihalcea 65b8a32f27 nxp: imx8ulp: switch to native Zephyr drivers and timer domain
Switch to Zephyr native drivers and timer domain. This
includes:
	1) Switching all imx8ulp topologies to timer domain.
	2) Disabling Zephyr DMA domain
	3) Various interrupt-related fixes via Kconfig-related
	ifdef logic.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-25 14:12:41 +03:00
Laurentiu Mihalcea 9737e124bc nxp: imx8/imx8x: switch to native Zephyr drivers and timer domain
This commit includes all necessary changes for switching
to timer domain and Zephyr native drivers on imx8 and imx8x.
This consists of:
	1) Switching all imx8 topologies to timer domain.
	2) Disabling Zephyr DMA domain
	3) Various interrupt-related fixes via Kconfig-related
	ifdef logic.

This commit includes all necessary changes for switching
to native Zephyr drivers on imx8/imx8x.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-23 12:20:31 +01:00
Kai Vehmanen 14c4e86757 audio: base_fw: add platform layer to IPC4 hw_config data
Some of the IPC4 HW_CONFIG fields are platform specific and cannot be
filled with generic code.

Handle this functionality by separating platform specific parts of
base_fw to a new base_fw_platform.h interface. Move out existing code
for Intel cAVS and ACE platforms. Add a new stub implementation for
posix platform. This posix stub can be also used as a starting point
when adding IPC4 support to new platforms.

This platform construct can be later used to move out other
vendor and platform data out from base_fw.c.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-17 16:20:48 +01:00
Tobiasz Dryjanski 0419b7c5e9 telemetry: Add systick_info part of telemetry
Introduces telemetry structure into debug memory window. Adds
systick_info which counts execution time of LL tasks. DP tasks are not
supported yet.

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2024-04-12 19:21:42 +03:00
Laurentiu Mihalcea f0740ed103 west.yml: update Zephyr to 1f55be8b42df
Contains the following squashed SOF commits:

nxp: imx8ulp: change SOC name to MIMX8UD7
zephyr: CMakeLists.txt use new `CONFIG_SOC_C` for 8ULP
cmake: update configs for NXP ADSP

and the following Zephyr patches affecting SOF:

951763939034 nxp: imx8ulp: change SOC name to MIMX8UD7
b8214b673970 dts: xtensa: nxp_imx8: add SAI1 node
a0e32f07ef76 dts: intel_adsp: ace: update host dma copy alignment
3fde2c50c6ef tracing: add intel ADSP memory window backend
6b9d01f995c7 intel_adsp/ace: power: No pending transaction before power gate
6ea749de5283 arch: rename arch_start_cpu() to arch_cpu_start()
b69d2486fee6 kernel: rename Z_KERNEL_STACK_BUFFER to K_KERNEL_STACK_BUFFER
1f55be8b42df nxp: imx8: change CONFIG_SOC_<name> to match the value
688fbb53aeb2 intel_adsp: ace: Fix sparse error

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-04-02 13:13:07 +03:00
Laurentiu Mihalcea aaf2f11eb9 nxp: imx93: Switch to native Zephyr drivers and timer domain
Starting with this commit, i.MX93 now uses the timer domain
in conjunction with the Zephyr native drivers.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-03-25 15:12:00 +02:00
Guennadi Liakhovetski 980b1c64f2 smart-amp-test: make a loadable module
Convert the smart-amp-test in its IPC4 version to a loadable LLEXT
module. Use an overlay configuration to select between monolithic and
modular builds.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-03-08 16:25:28 +02:00
Kai Vehmanen 22b3518601 west.yml: update Zephyr to f9f44b6dcdd
Switch back to main Zephyr repository and commit f9f44b6dcdd.

This includes following squashed SOF commits that are
needed to adapt to HWMv2 changes in Zephyr:

zephyr: app: scripts: intel_adsp: change board names to HWMv2
zephyr: sof: update board name for HWMv2
zephyr: intel_adsp: Change ACE SoC name to HWMv2
app: boards: imx93: updates for zephyr hwmv2

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-03-08 13:16:58 +02:00
Andrula Song 0b3b5740aa Audio: Mixin_mixout: Add HiFi5 implementation.
Add HiFi5 implementation of mix functions, compared with
HiFi3 version, can reduce about 27% cycles.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2024-02-27 10:57:02 +00:00
Andrula Song 97a50e3243 Audio: Fix the kconfig error of mixin_mixout.
Fixes the commit f4d043724d ("Audio: Move components related config
to subfolder").

Due to a copy/paste error, the content of mixin_mixout/Kconfig has
been a copy of aria/Kconfig. This patch fixes the copy/paste error,
and adds IPC version dependence for COMP_MIXER and COMP_MIXIN_MIXOUT.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2024-02-23 11:46:15 +00:00
Guennadi Liakhovetski bd5c24b282 lib-manager: fork a copy for LLEXT support
This forks a slightly earlier version of library loading code for
upcoming LLEXT support.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-01-26 17:56:14 +02:00
Andrula Song 10f0e387c9 Audio: ARIA: Add HiFi5 implementation
Add HiFi5 implementation of aria algorithm functions, compared with
HiFi3 version, can reduce about 10% cycles.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2024-01-24 12:21:49 +00:00
Seppo Ingalsuo c1e5a21156 Math: Restore fast look-up table based sine function
This patch adds function sofm_lut_sin_fixed_16b(). It was
used earlier in SOF with name sin_fixed() but was remove
at add of Cordic trigonometric library. This sine function
can be used in hot code parts. Due to look-up table usage it
consumes more .bss RAM than cordic version.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-01-11 15:33:52 +00:00
Seppo Ingalsuo 8852db8b6c Zephyr: Patch Zephyr CMakeLists with exponential source files
In Zephyr CMakeLists, add exponential source files to facilitate
the compilation of math C and HiFi code.

Signed-off-by: shastry <malladi.sastry@intel.com>
2024-01-08 13:54:00 +00:00
Andy Ross e802aa7b49 zephyr: Update GOOGLE_RTC_AUDIO_PROCESSING
Unbreak the Zephyr build when this is enabled, and add the needed bits
to produce a working executable.

This is mostly just a recapitulation of the existing integration,
which means that it's manually pulling in bits from the Cadence
toolchain it needs.  SOF isn't yet using the Zephyr C++ integration
(which isn't xt-clang aware yet), nor does it really want to as SOF
itself includes no such code.  Zephyr doesn't have a "C++ binary
linkage only" feature yet.

Signed-off-by: Andy Ross <andyross@google.com>
2024-01-08 11:03:07 +02:00
Baofeng Tian 28e065258f audio: crossover: split out ipc3 and ipc4 specific code
This is a clean up, purpose is declutter headers, toml files,
Readme.md etc per module basis, since today everything is
scattered in current code base.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2024-01-04 13:43:24 +00:00
Baofeng Tian ae464443c8 Audio: mux: split mux code with ipc3 and ipc4
This is a clean up, purpose is de-cluster headers, toml files,
Readme.md etc per module basis, since today everything is
scattered in current code base.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-12-11 14:08:50 +02:00
Andrula Song 7494ee7e83 Audio: ASRC: Split IPC version code to speclfic file
Move IPC3 related code to asrc_ipc3.c and IPC4 related code
to asrc_ipc4.c.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2023-12-11 13:10:12 +02:00
Guennadi Liakhovetski c8ecb88355 test: add a simple VMH test
This adds an initial Virtual Memory Heap test.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-12-08 15:29:06 +02:00
Guennadi Liakhovetski 7b5d1bbe39 test: add boot-time ztest-based testing
Add a ZTEST test-suite to run SOF boot-time self-tests at the time of
the first FW_GEN_MSG IPC.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-12-08 15:29:06 +02:00
Andrula Song 6563320273 zephyr/cmake: Fix the FIR math lib c files including errors
Fix the mistake of FIR lib files, we should include FIR math
lib .c files base on CONFIG_MATH_FIR instead of CONFIG_COMP_FIR.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2023-12-06 14:27:54 +02:00
Baofeng Tian e72056769c Audio: dcblock: split dcblock with ipc3 and ipc4 specific code
Split dcblock with ipc3 and ipc4 specific code.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-12-04 20:56:25 +02:00
Baofeng Tian f93f7d423f Audio: multiband drc: split out ipc3 and ipc4 specific code
Split out ipc3 and ipc4 specific code from mulitband_drc.c.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-12-04 10:43:35 +02:00
Joe Cheng ce4acfd171 audio: dts: move dts code to standalone folder
This was suggested in PR#8389. Since the module uses
module_interface, it doesn't have to put it under module_adaper/module/.
Move dts codes from src/audo/module_adapter/module/ to src/audio/codec.

Signed-off-by: Joe Cheng <joe.cheng@xperi.com>
2023-12-01 16:20:29 +02:00
Joe Cheng 089435e008 module_adapter: dts: import DTS library from third_party
Update the path to import DTS library from third_party/lib/ instead of
src/audio/module_adapter/lib/release/.
This action was requested in PR#8379.

Signed-off-by: Joe Cheng <joe.cheng@xperi.com>
2023-12-01 16:20:29 +02:00
Marc Herbert 330d73eec1 cmake: a few new add_local_sources[_ifdef]() compatibility macros
For reducing CMake duplication and centralization, see #8260

Not used yet.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-11-29 14:52:36 +00:00
Marc Herbert 98d5efc3a7 zephyr/cmake: remove now unused SOF_IPC_PATH variable
Fixes commit 1bd9e0d2c7 ("cmake/zephyr: decentralize src/ipc/")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-11-29 14:52:36 +00:00
Andrula Song 807471497a Audio: DRC: Add HiFi4 implementation of DRC
Add HiFi4 implementation of DRC.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2023-11-27 11:16:21 +02:00
Adrian Warecki f21670b3b2 module: sink: source: Move sink/source api headers to module
Moved header files to the module directory to separate an shared interface
used by sof and native loadable modules.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-11-24 16:17:46 +00:00
Baofeng Tian 03a4c38a3d audio: tdfb: split ipc3 and ipc4 specific code
Split out ipc3 and ipc4 specific code from tdfb module, also
refined header files for new source file.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-11-17 12:05:58 +02:00
Baofeng Tian 5e40ac7c90 Audio: eq_fir: move out eq_fir ipc3 and ipc4 specific code
Move out ipc3 and ipc4 specific code to corresponding source file.
Also, move some common functions to header file.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-11-16 16:43:50 +02:00
Joe Cheng 98d492ab94 zephyr : import dts library
Importing DTS library here to ensure DTS library is built into SOF
firmware as a static library.

Signed-off-by: Joe Cheng <joe.cheng@xperi.com>
2023-11-14 08:20:54 -08:00
Marc Herbert 1bd9e0d2c7 cmake/zephyr: decentralize src/ipc/
Adding all source files in a single, giant zephyr/CMakeLists.txt is
inconvenient and does not scale.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-11-08 16:53:28 +00:00
Marc Herbert ef563ebfe3 cmake/zephyr: decentralize src/init/
Adding all source files in a single, giant zephyr/CMakeLists.txt is
inconvenient and does not scale.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-11-08 16:53:28 +00:00
Zhang Peng 8447952438 zephyr: build: add support for imx8ulp
Build SOF with Zephyr for i.MX8ULP platform.

Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
2023-11-06 09:34:37 +01:00
Marc Herbert 09eae9beb4 Revert "samples: Fix zephyr config"
This reverts commit fbde1dccf8.

Now that CONFIG_SAMPLE_SMART_AMP has a hard, menu dependency on
CONFIG_SAMPLES, we don't need to encode Kconfig dependencies in CMake
any more.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-11-02 12:49:08 +02:00
Fabiola Kwasowiec 90fef5afd2 src_lite: add module
Addition of SRC Lite module,
which only supports a subset of conversions
supported by the SRC module.

Purpose of SRC Lite module is memory optimization.
Code of SRC Lite is drastically reduced and requires
significantly less memory. When needed one of
defined conversions, driver can choose SRC Lite
module instead of SRC module to optimize memory utilization.

48 -> 16kHz
44.1 -> 16 kHz
32 -> 16 kHz
44.1 -> 48

Signed-off-by: Fabiola Kwasowiec <fabiola.kwasowiec@intel.com>
2023-10-26 17:08:29 +03:00
Baofeng Tian 9e0f7eecec audio: eq_iir: create generic/ipc3/ipc4 source files for eq_iir
Create generic ipc3 ipc4 source files and move related code
into these source files.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-10-20 14:57:24 +01:00
Marc Herbert fd497c906a
Merge e330fb4ec7 into 5b5566f534 2023-10-11 16:16:37 +02:00
Anas Nashif 5b5566f534 zephyr: remove stray } from RIMAGE_CONFIG_PATH
A stray } is at the end of RIMAGE_CONFIG_PATH causing issues when
signing images.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-11 17:07:08 +03:00
Baofeng Tian 48616b2092 audio: module adapter: create ipc3 and ipc4 specific source file
create ipc3 and ipc4 specific source file, these files will
only be used to store specific code accordingly.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-10-10 14:56:20 +03:00
Marc Herbert f55338a985 Switch Zephyr build to new sof/tools/rimage location
Switch away from the independent rimage submodule. Long story in
https://github.com/thesofproject/sof/issues/8178 and others.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-09 13:06:12 -07:00
Marc Herbert e08b2c2043 zephyr/cmake: add new ${RIMAGE_TOP} constant
In preparation for changing it, see
   https://github.com/thesofproject/sof/issues/8178

No functional change yet.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-05 17:34:00 +03:00
Seppo Ingalsuo f57e478f4c Zephyr: Fix path to google_hotword_detect.c
The file is found from subdirectory src/audio/google. Without
fix if CONFIG_COMP_GOOGLE_HOTWORD_DETECT is enabled build fails:

CMake Error at sof/zephyr/cmake/modules/extensions.cmake:424
(add_library):
Cannot find source file:
/src/audio/google_hotword_detect.c

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-09-25 10:35:27 -07:00
Daniel Baluta 7ca9a2eb8a driver: imx: Add PDM MICFIL driver
The Pulse Density Modulated Microphone Interface (MICFIL) is a popular
way to deliver audio from microphones to the processor in several
applications, such as mobile telephones. However, current digital-audio
systems use multibit audio signal (also known as multibit PCM) to
represent the signal. This block implements the required digital
interface to provide a 24-bits audio signal from a PDM microphone
bitstream in a configurable output sampling rate.

This patch adds initial support for PDM MICFIL IP found on i.MX8MP
board.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2023-09-20 14:43:11 +03:00
Baofeng Tian 9fdbf1c398 audio: src: split src ipc3 and ipc4 specific file
create new files to cover ipc3 and ipc4 specific code.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-09-13 12:06:57 +03:00
Marcin Szkudlinski bec031a7a3 dp: introduce dp_queue
DP queue is a lockless circular buffer
providing safe consumer/producer cached operations cross cores

prerequisites:
 1) incoming and outgoing data rate MUST be the same
 2) Both data consumer and data producer declare
    max chunk sizes they want to use (IBS/OBS)

required Buffer size:
	- 2*MAX(IBS,OBS) if the larger of IBS/OBS
          is multiplication of smaller
	- 3*MAX(IBS,OBS) otherwise

The queue may work in 2 modes
1) local mode
   in case both receiver and sender are located on
   the same core and cache coherency
   does not matter. dp_queue structure is located in cached memory
   In this case DP Queue is a simple ring buffer

2) shared mode
   In this case we need to writeback cache when new data
   arrive and invalidate cache on secondary core.
   dp_queue structure is located in shared memory

dpQueue is a lockless consumer/producer safe buffer.
It is achieved by having only 2 shared variables:

 write_offset - can be modified by data producer only
 read_offset - can be modified by data consumer only

 as 32 bit operations are atomic, it is multi-thread and multi-core save

There some explanation needed how free_space and
available_data are calculated

number of avail data in circular buffer may be calculated as:
	data_avail = write_offset - read_offset
  and check for wrap around
	if (data_avail < 0) data_avail = buffer_size + data_avail

The problem is when write_offset == read_offset,
!!! it may mean either that the buffer is empty
    or the buffer is completely filled !!!

To solve the above issue having only 2 variables mentioned before:
 - allow both offsets to point from 0 to DOUBLE buffer_size
 - when calculating pointers to data, use:
         data_bufer[offset % buffer_size]
 - use double buffer size in wrap around check when calculating
   available data

And now:
  - write_offset == read_offset
		always means "buffer empty"
  - write_offset == read_offset + buffer_size
		always means "buffer full"

  - data_avail = write_offset - read_offset
	if (data_avail < 0) data_avail = 2 * buffer_size + data_avail

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-09-12 15:11:44 +03:00
ShriramShastry 31453ceca3 Math: Library: Add the HiFi3, HiFi4, HiFi5 exponential function
This check in change eliminates the extra include isa.h header file
from the exp_fcn_hifi.c file, as it does in the exp_fcn.h file.

Signed-off-by: ShriramShastry <malladi.sastry@intel.com>
2023-08-31 15:22:43 +01:00
Baofeng Tian 7d9a3ca030 audio: volume: move volume out from module adapter
move volume from module adapter to src/audio directory, it is a
critical audio component.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-30 13:49:48 +01:00
Baofeng Tian 550968b169 audio: volume: create ipc3 and ipc4 specific file
create ipc3 and ipc4 specific files and used to cover specific
functions.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-30 13:49:48 +01:00
Kai Vehmanen 0b79666a6d platform: tigerlake: remove CAVS_LPS support
Remove support for Intel cAVS Low Power Sequencer for Power Management.
This code is specific to XTOS builds for Tiger Lake (cAVS)
platforms and no longer used in Zephyr builds.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-08-23 12:58:46 +03:00
Kai Vehmanen 3a02dacab5 zephyr: Intel cavs25: remove non-native build
Remove all cmake rules to build SOF for Intel cAVS2.5 hardware
using non-native drivers (i.e. use XTOS drivers from SOF tree
instead of Zephyr native drivers). This is no longer supported
nor tested, so can be removed.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-08-21 12:21:55 +03:00
Kai Vehmanen 6efff4ccdb zephyr: remove mem_window.c from Intel cAVS2.5 build
Memory window management has been moved to Zephyr drivers
for this platform, so building this file on SOF side is no
longer needed.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-08-21 12:21:55 +03:00
Baofeng Tian 05dcf1ccde audio: zephyr: add -fno-inline-functions option to zephyr code
By enable/disable COMPILER_INLINE_FUNCTION_OPTION to control
add or remove -fno-inline-functions build option for sof zephyr
code.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-18 10:15:44 +03:00
Curtis Malainey c5f00bfde7 audio: dsm: add stub for maxim dsm
Add a stub for the library so fuzzers and CI can compile the adapter

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-26 13:31:36 +01:00
Curtis Malainey 266a8f82b7 audio: rtnr: add stub for testing
Fuzzing and CI only stub library

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-26 13:31:36 +01:00
Curtis Malainey 3c6f2c1c63 audio: igo: add igo stub library
Added for CI and fuzz testing

Also remove exec permissions on related source files

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-26 13:31:36 +01:00
Curtis Malainey d28785ce73 audio: dts: Add library stub
This will allow the fuzzer to probe deeper into the code while also
allowing CI to build test the adapter.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-26 13:31:36 +01:00
Curtis Malainey 74a0e0f1fe audio: waves: add maxx stub
Add a stub for the Waves library for the fuzzer to build against. This
will also improve build tests in CI.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-26 13:31:36 +01:00
Curtis Malainey fbde1dccf8 samples: Fix zephyr config
Samples should not be built without the kconfig option

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-24 12:03:21 +03:00
Curtis Malainey 011de4a094 audio: dsm: fix include path
Header is not in the include directory, add inclusion directive

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-19 14:21:37 +03:00
Curtis Malainey 9d51b5c10f audio: delete switch component
mostly not implemented and hasn't been meaningfully touched in > 3 yr.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-14 12:33:10 +01:00
Dobrowolski, PawelX 2cdf38c47e module_adapter: native_system_agent: Introduce call and interface
This is part of fw which helps loaded module in communication with adsp
Also it provides basic operations for creation of component driver
Common part for native loadable modules and iadk is put together and
remade into native API. That way system services are using generic
methods defined in native system service.

Signed-off-by: Dobrowolski, PawelX <pawelx.dobrowolski@intel.com>
2023-07-12 16:41:18 +01:00
Andrula Song 607f086638 Audio: Volume: Split the hifi files into hifi3 and hifi4 version
Split the hifi version code into hifi3 and hifi4 version files.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2023-06-22 10:33:16 +03:00
Marcin Szkudlinski 05871a16de pipeline2.0: add source/sink api to audio_stream
Make audio_stream capable of using pipeline2.0
sink and source API
This change makes integration of sink/src api
possible in incremental way

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-06-19 16:26:08 +02:00
Marcin Szkudlinski 305f8a2088 pipeline2.0: introduce sink/source utilities
There are many operations on sink/source that may be put into a
common library. This is the place for it.

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-06-19 16:26:08 +02:00
Marcin Szkudlinski 7462552f12 pipeline2.0: introduce a sink API
this is a definition of API to sink of audio data

THE SINK is any component that can store data somehow
and provide a buffer to be filled with data at request.
The sink API does not define how the data will be processed/used

 The user - a module - sees this API as a destination
            it must send data to
 The IMPLEMENTATION - audio_stream, DP Queue -
            sees this as a producer that PROVIDES data for processing

Examples of components that should expose SINK api
 - /dev/null
     all the data stored in sink buffer are just simply discarded
 - I2S sender
     Data stored in sink buffer will be sent to the external world
 - a memory ring buffer
     data stored in the buffer will be sent to another module
     (usually using source API, but it does not matter in fact).

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-06-19 16:26:08 +02:00
Marcin Szkudlinski ff6ca2b78f pipeline2.0: introduce a source API
this is a definition of API to source of audio data

THE SOURCE is any component in the system that have data
stored somehow and can give the data outside at request.
The source API does not define who and how has produced
the data
  The user - a module - sees this as a producer that
             PROVIDES data for processing
  The IMPLEMENTATION - audio_stream, DP Queue - sees
             this API as a destination it must send data to

Examples of components that should expose source API:
  - DMIC. Data are coming from the outside world,
          stores in tmp buffer and can be presented
	  to the rest of the system using source_api
  - a memory ring buffer
	Data are coming from other module
        (usually using sink_api, but it does not matter in fact)

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-06-19 16:26:08 +02:00
ShriramShastry c069197b63 Math: Library: Add the hifi4 exponential function
The 32-bit HiFi4 exponential library function has an accuracy of 1e-4,
a unit in last place error of 5.60032793, and output ranges from
0.0067379470 to 148.4131591026 for inputs from -5 to +5 (Q4.28) (Q9.23).

Signed-off-by: ShriramShastry <malladi.sastry@intel.com>
2023-06-16 12:17:09 +03:00
Marc Herbert c7af3c5b3b Kconfig: don't fall back on CONFIG_TIGERLAKE
There's really no reason to fall back on a default "platform" and pick
up a bunch of other, totally random settings.

Now the following command fails immediately with a useful `platform not
defined` error message instead of stopping with a cryptic
`platform/trace/trace.h: No such file or directory` after successfully
compiling half the .c files in a Frankenstein CONFIG_uration.

```
  west build -p --board mimx8mm_evk_a53 modules/audio/sof/app
```

More context in #7192.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-06-13 11:11:14 +03:00
Baofeng Tian 63b1264a74 copier-dai: create new file for dai specific code
Move copier.c dai specific code to copier_dai.c

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-06-02 10:30:52 -07:00
Baofeng Tian 6024a26c90 copier-host: add new file copier_host.c to copier folder
This new file is used to maintain host related code that used
by copier.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-05-25 17:12:52 -07:00
Jaroslaw Stelter 02635875fb lnl: Lunarlake configuration
Add initial LNL configuration.
Enable building for xt-clang.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-05-24 18:52:53 +03:00
Ievgen Ganakov 7ae382ddbb ams: add helper functions
Every module which needs AMS for notifications uses the same flow when
configuring itself as a consumer or producer for such notifications.

Add AMS helper functions to avoid code repetition.

Signed-off-by: Ievgen Ganakov <ievgen.ganakov@intel.com>
2023-05-24 15:47:07 +03:00
Baofeng Tian 5957916faa copier: rename ipcgtw.c and move it to copier folder
ipcgtw only used in copier, so move it to copier folder and rename
it to copier_ipcgtw.c

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-05-22 19:38:33 -07:00
Andrula Song 250a17c449 Smart_amp: Split dummy smart_amp to IPC3/IPC4 version
Split smart_amp_test.c to IPC3 version smart_amp_test_ipc3.c
and IPC4 version smart_amp_test_ipc4.c

Signed-off-by: Andrula Song <andrula.song@intel.com>
2023-05-08 12:21:14 +03:00
Laurentiu Mihalcea 2b30188f1b zephyr: CMakeLists.txt: Add support for building SOF for i.MX93
This commit introduces support in the CMakeLists.txt of Zephyr for
building SOF for i.MX93 platform.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-04-25 13:04:58 +03:00
Marc Herbert ed7c57ba32 zephyr/CMakeLists.txt: remove '..' in include paths
CMake seems to behave differently on Linux and Windows: it generates
different `-I` command line parameters. This results in spurious
`__FILE__` mismatches and non-reproducible builds when using
CONFIG_ASSERT, see example in #7428.

On Windows, '..' seem resolved more often which also seems to convert
forward slashes to backslashes.

They are also less readable and wasting a bit of space. Remove them
using cmake_path(SET ...)

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-04-24 12:04:26 +03:00
Daniel Baluta 3f3c1e5084 zephyr: Make CONFIG_DMA_DOMAIN no longer experimental
DMA domain with Zephyr works fine for i.MX platforms. So, remove
"experimental" from description and enable it by default for i.MX
platforms.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2023-04-05 12:31:46 +01:00
Jaska Uimonen e9cfb64f0d zephyr: cavs: use zephyr pm, clk and dma glue
Start using zephyr pm_runtime, clk and dma glue code in cavs25 native
drivers build. Move the files from ace/lib into zephyr/lib.

Also update west.yaml to related zephyr commit as power related
files have been moved to zephyr side.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2023-03-27 12:37:26 +03:00
Andrula Song abd81a1383 Audio: Dcblock: Add HiFi3 implementation of dcblock
Add HiFi3 implementation of dcblock processing functions.
Compared with generic C version, the 16 bit format can save
about 48.1% cycles, and 48.4% for 24 bit format and 52.6%
for 32 bit.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2023-03-21 22:17:01 +00:00
Marcin Szkudlinski 3ee1d78738 scheduling: add Data Processing scheduler type
The DP scheduler is a scheduler based on Zephyr preemptible
threads. It will start each SOF task as a separate Zephyr
thread.
At current implementation the scheduler can trigger each
task/thread periodically or on demand.
TODO: more sophisticated scheduling decisions, with deadline
and task budgets calculations.

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-03-14 14:00:28 +00:00
Andrula Song 802cffad0d Audio: Dcblock: Add HiFi4 implementation of dcblock
Add HiFi4 implementation of dcblock processing functions.
Compared with generic C version, the 16 bit format can save
about 54.8% cycles, and 53.1% for 24 bit format and 49.1%
for 32 bit.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2023-03-10 11:37:45 +02:00
Przemyslaw Blaszkowski 4d3bd81c02 aria: add generic processing functions
Add non-HIFI processing functions for non-Xtensa configurations.

Signed-off-by: Przemyslaw Blaszkowski <przemyslaw.blaszkowski@intel.com>
2023-03-09 13:54:32 +00:00
Guennadi Liakhovetski b637889efb platform: remove support for cAVS 2.0 platforms
Remove all support for cAVS 2.0 platformsm including Ice Lake and
Jasper Lake, they aren't supported any more.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-03-07 14:02:18 +02:00
Piotr Makaruk 1f710923dd ipc4: add file for notifications initializations
Add separate file for notifications initializations. All generic
initializations could be stored in one place. Add initialization for
generic xrun notification message which can be sent by gateway.

Signed-off-by: Piotr Makaruk <piotr.makaruk@intel.com>
2023-03-03 15:53:36 +00:00
Guennadi Liakhovetski dc9ba281d7 platform: remove support for cAVS 1.8 platforms
Remove all support for cAVS 1.8 platformsm including Cannon Lake,
Comet Lake, Whiskey Lake and Coffee Lake, they aren't supported
any more.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-03-02 23:02:37 +00:00
Rander Wang 8d5e3a8b52 ipc4: enable google AEC building for zephyr
Enable dummy AEC building support but still need to
enable google AEC in overlay file for chrome.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-03-02 14:51:04 -08:00
Guennadi Liakhovetski 0f0acaae94 platform: remove support for cAVS 1.5 platforms
Remove all support for cAVS 1.5 platformsm including Apollo Lake,
Sky Lake, Kaby Lake, Broxton and Gemini Lake, they aren't supported
any more.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-03-02 11:28:23 +00:00
Andrey Borisovich 33d95bc723 Set SOF C++ language standard to C++17 for Zephyr builds
Recent changes to Zephyr header files written in C++
use templates and features provided by the C++14 standard.
Meteorlake board that is built with Zephyr has some C++ code
that uses those headers.
We upgrade straight to C++17 since it is newest standard currently
supported by xt-clang toolchain.
This change does not affect any other boards since the do not
have any C++ code as the time of writing.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2023-02-28 14:59:41 +00:00
Krzysztof Frydryk 10e1172ea5 ams: Add initial AMS implementation
Add Asynchronous Messaging Service. This can be used to communicate between
modules.
Asynchronous Messages are one-way messages from one producer to one or
multiple registered consumers. Messages between modules on different
cores are sent through IDC. All inter-core communication must be proxied
by the main core.

Signed-off-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com>
2023-02-28 09:10:29 +01:00
Jaska Uimonen 1e21a5d2fc zephyr: lib: move cpu.c from lib-zephyr
Move zephyr cpu.c from "unnecessary" lib-zephyr to lib/zephyr.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2023-02-23 22:17:07 +00:00
Andrula Song 6b91a55328 Audio: Fix the peak volume calculation error in volume component
Fix the peak volume calculation error in volume component, calculate
the maximum absolute value of input as peak volume as close source
firmware did.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2023-02-21 15:51:33 +00:00
Guennadi Liakhovetski 17fbf7de22 platform: remove support for Sue Creek
Remove all support for Sue Creek platforms, it isn't supported any
more.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-02-20 15:46:16 +00:00