Commit Graph

181 Commits

Author SHA1 Message Date
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