Commit Graph

401 Commits

Author SHA1 Message Date
Rander Wang 9b08ce026d zephyr: cpu: use correct condition to init cpu
When converting #ifdef CONFIG_ADSP_IMR_CONTEXT_SAVE to if(IS_ENABLE(
CONFIG_ADSP_IMR_CONTEXT_SAVE), we should use if (!IS_ENABLE() ||

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-08-17 20:23:46 +03:00
Rander Wang 84befa2563 zephyr: cpu: init cpu if context save is not support
Fix multicore test issue on cavs platforms which don't support context
save now, so need to init cpu when the core boot up.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-08-16 13:43:38 +01:00
Jakub Dabek 4ac2ed4b3b vmh: fix build errors
Last commit created build errors in some configurations. Add fixes
to those issues.

Signed-off-by: Jakub Dabek <jakub.dabek@intel.com>
2023-08-02 08:45:18 +02:00
Jakub Dabek 45d56931ef memory management: Add virtual heap memory allocators
Add virtual heap allocators that allocate on proper heaps and
map physical memory where nesscessary.
Add free function that frees up the virtual heap memory and
unmaps physical memory when possible.
Virtual heap allocator allows using virtual memory as a base
for allocation and booking memory. Physical memory banks
will be mapped when needed allowing for greater flexibility
with mapping.

Signed-off-by: Jakub Dabek <jakub.dabek@intel.com>
2023-08-01 08:55:50 +02:00
Adrian Bonislawski 4832dc9388 ipc4: multi pipeline set state on different cores
This will allow to correctly set multiple pipelines state
even if they are allocated on different cores.

ipc4_set_pipeline_state will check if several cores are involved
- set ppl state if only current core requested
- process IPC on another core if only single secondary core requested
- send IDC messages if several secondary cores involved

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2023-07-31 15:55:36 +02:00
Serhiy Katsyuba 071ba084a6 Add remote get_attribute for cross core connection
To support pipelines connection between cores, ipc4_create_buffer()
must be able to create buffer shared between source and sink
components created on different cores. ipc4_create_buffer() requires
source component obs size. When both source and sink components
created on same core, ipc4_create_buffer() is executed on that core,
otherwise it is executed of core 0 (IPC processing core). So for the
case when source and sink components are created on different cores
comp_get_attribute_remote() is used to receive source obs size.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-07-26 14:39:14 +01:00
Serhiy Katsyuba a63a877dbe bind/unbind support for cross core connection
bind/unbind handler must be called from core on which component was
created.
When both source and sink components are created on same core,
bind/unbind IPC is processed on that core. However, when connected
source and sink are on different cores, IPC is processed on core 0.
Hence comp_bind_remote() and comp_unbide_remote() is added to call
bind/unbide from proper core.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-07-26 14:39:14 +01: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
Flavio Ceolin 07455c572e zephyr: s/MP_NUM_CPUS/MP_MAX_NUM_CPUS/
Zephyr uses MP_MAX_NUM_CPUS internally to represent the
number of cores available and consequently to allocate
resources. It is even expected, and checked through assert,
that these two symbols have the same value. Use different
value can lead to an undesired behavior, so lets use
MP_MAX_NUM_CPUS.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-07-25 15:27:05 +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
Rander Wang f449a22cc7 ipc4: zephyr: remove useless member in struct sof for native driver
Struct cascade_root & mn are used by xtos build only so remove them for
zephyr native driver. And these two items are too specific to intel
platforms. Remove these item also save memory.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-07-11 13:55:01 +01:00
Marcin Szkudlinski 4e8040c232 platform: ace: Add pm notifiers to support Zephyr's D3 transition
During PowerOff (D3) transition Zephyr Power Manager must have
a pointer in IMR to save the LP/HPSRAM memory before
powering off.

As zephyr has no access to IMR heap, the memory must
be allocated by SOF

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-06-28 15:32:16 +03: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
Rander Wang 2c757064b1 zephyr: wrapper: halt the system in fatal error handler
Follow the k_sys_fatal_error_handler implementation in fatal.c in
zephyr framework. Without this halt, our k_sys_fatal_error_handler
will be called copules time and result to many useless IPC messages
to host.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-06-06 17:39:58 +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
Marc Herbert 5a82b0ab53 xtensa-build-zephyr.py: add new rimage_west_configuration()
Do not make the switch yet. Make the switch in a smaller commit that can
more easily be reverted in case of a bug or some missed dependency
somewhere.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-05-26 10:47:51 +03: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
Tomasz Leman 9b4a618c52 pm: policy: d0i3: wait for ipc ack before pg
The DSP cannot enter the power gating state if it has not yet received
an ack from host after sending an ipc message.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-05-25 14:45:42 +03:00
Laurentiu Mihalcea ff0fc14c11 zephyr: include: rtos: cache.h: Remove unused macros
This commit removes CACHE_INVALIDATE and CACHE_WRITEBACK_INV
macros which are not used.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-05-25 14:26:17 +03:00
Laurentiu Mihalcea 58b96d1c7f zephyr: include: rtos: Switch to using Zephyr cache management API
Thanks to PR [1], Zephyr cache management API can now be
used on xtensa-based SoCs. As a consequence to this, there's
no longer a need to use SOF's arch/ layer for cache management.
This commit forces all SoCs which support Zephyr to use
its native cache management API.

[1]: https://github.com/zephyrproject-rtos/zephyr/pull/50136

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-05-25 14:26:17 +03: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
Kai Vehmanen 9ea2f05ac7 ipc4 : send panic on Zephyr OS panic
Send panic notification message to host when panic happens. The panic
detail is built by Zephyr framework and included in debug memory window.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Rander Wang <rander.wang@intel.com>
Co-developed-by: Rander Wang <rander.wang@intel.com>
2023-05-23 13:29:33 +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
Andrey Borisovich ab3a11338a workflows: Zephyr build-linux upgraded Docker container with Zephyr SDK
New Docker container tagged v0.26.4 contains new Zephyr SDK v0.16.1
needed to build with Zephyr main branch.
New Zephyr SDK is backward compatible with the older Zephyr revisions
so the upgrade is done for SOF manifest revisions too.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2023-05-20 01:45:42 +03:00
Laurentiu Mihalcea b185ffa6b8 zephyr_dma_domain: Give semaphore resources based on sched_comp's state upon cancel
This implies the following changes:
	1) domain_task_cancel() shall no longer receive the number
	of tasks, but, instead, will receive the task to be cancelled.

	2) zephyr_dma_domain_task_cancel() will do k_sem_give() if the
	sched_comp associated with the given task is != COMP_STATE_ACTIVE.

	3) SEM_LIMIT is changed to CONFIG_DMA_DOMAIN_SEM_LIMIT and can
	be configured.

The reasoning for the changes are the following:
	1) and 2): In the case of mixers, domain_task_cancel()'s
	num_tasks is not a reliable way to determine if the DMA
	IRQs got cut off. Let's consider the following scenario:

	We have a mixer with 1 non-registrable pipeline task and
	1 registrable pipeline task. Upon TRIGGER_STOP we'd have
	the following flow (i.MX boards):
		a) SAI_STOP => DMA IRQs get cut off.
		b) Cancel non-registrable pipeline task.
		c) Cancel registrable pipeline task.

	During b) and c), domain_task_cancel() would get the following
	arguments:
		b) domain_task_cancel(sch, 1)
		c) domain_task_cancel(sch, 1)

	This is because the non-registrable pipeline task wasn't
	dequeued before c) so, even though the DMA IRQs got cut
	off during a), zephyr_dma_domain_task_cancel() does not give
	resources to the semaphore so what happens is zephyr_ll_run()
	will no longer execute and the pipeline tasks remain queued.

	3) Since the semaphore can accumulate more than 1 resource
	at a given time (and since it's safe to make SEM_LIMIT depend
	on the load of the system), SEM_LIMIT was changed into a config.
	This allows the user to change SEM_LIMIT based on the system
	load. For example, if there's 2 non-registrable pipeline tasks
	and 1 registrable pipeline task (same scheduling component),
	an appropriate value for SEM_LIMIT should be 3 (since the
	semaphore can be given at most 3 resources during the task
	cancellation process). Of course, making SEM_LIMIT depend on
	the system load is the worst case but this way we can make sure
	that the cancelled tasks get dequeued properly.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-05-16 14:01:23 +03:00
Paul Olaru 1ae0d1a4ec drivers: imx: interrupt: Use Zephyr wrapper definitions
For the functions platform_interrupt_clear and platform_interrupt_set,
the existing definitions based on arch_interrupt_* do not compile with
the xt-clang 2023 toolchain for imx. Use the Zephyr wrapper
implementations for those for now.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2023-05-15 11:44:28 +03:00
Tomasz Leman 93947f98a4 platform: ace: notifying about idle thread readiness
Informing the primary core that the Idle thread on secondary core is
ready. During the D3 exit flow thread is not initialize again, but
restored from previously saved context.

This patch includes also zephyr version update to aba3b12e31 (total 15
commits). Changes related to intel_adsp contain refactor and fixes for
ACE secondary cores power flows.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-05-11 19:08:28 +03:00
Tomasz Leman a048951286 zephyr: cpu: secondary core idle thread init
Idle thread should be initialize only when core it booting for the first
time. Doing this again would overwrite the kernel structs and the idle
thread stack.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-05-11 19:08:28 +03: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 bcbb85a29e zephyr: wrapper: Conditionally call platform_boot_complete()
Due to the fact that on i.MX93 the host will initialize the
SOF_IPC_FW_READY sequence there's no need to call
platform_boot_complete() at the end of start_complete(). This
will be handled in the IPC3 handler.

This commit makes sure that aforementioned scenario won't
happen for i.MX93 while keeping the flow constant for the
other platforms.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-05-02 12:19:11 +03:00
Anas Nashif 54c4b88d57 zephyr: use system cache API
Use zephyr cache APIs instead of xtensa specific ones.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-04-28 10:37:55 +03:00
Marcin Szkudlinski 85b4cdd6c5 kconfig: limit DP scheduler to ACE
DP scheduler is intended to work on MTL and
future platforms only - has not been tested on
any legacy.

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-04-25 13:23:28 +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
Gerard Marull-Paretas ca68ba68f2 zephyr: update SYS_INIT calls
Update Zephyr head, and use the new call signature:
int (*init_fn)(void);

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-04-24 19:13:47 +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
Laurentiu Mihalcea f6d84391dc zephyr: include: rtos: interrupt.h: Make interrupt_get_irq work for ARM64 platforms
ARM64's GIC doesn't utilize cascaded interrupts so interrupt_get_irq
will have to return the given INTID.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-04-24 11:47:07 +03:00
Laurentiu Mihalcea f7d9e76f95 Remove unused <soc.h> header inclusions
This commit removes all occurrences of the soc.h header file
since this is not used. This also fixes build problem on i.MX93
caused by the fact that i.MX93 doesn't have a soc.h.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-04-24 11:40:53 +03:00
Laurentiu Mihalcea db3c469ee7 zephyr: include: sof: Add Zephyr version of compiler_info.h
This is required by ARM64 platforms as they don't have
an arch/compiler_info.h so the compilation would fail.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-04-24 10:23:58 +03:00
Laurentiu Mihalcea 6aa71dd6f2 zephyr: lib: alloc.c: Add heap for ARM64 platforms
This commit places the heap inside the .bss section for
all ARM64 platforms.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-04-20 12:59:24 +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
Marcin Szkudlinski 62e358231e kconfig: add DP_SCHEDULER kconfig def
some platforms don't use Zephyr, therefore they can't
use DP scheduler. Add a config option

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-03-14 14:00:28 +00:00
Marc Herbert 11441d8540 zephyr/docker-run.sh: hardcode zephyr-build img to Zephyr SDK 0.15.2
Windows has always been hardcoded to 0.15.2 in .github Actions.

Fixes the compare-linux-windows check that just started to fail in daily
build https://github.com/thesofproject/sof/actions/runs/4400264770

The ":latest" zephyr-build image was just upgraded to the Zephyr SDK
0.16.0-rc1
https://hub.docker.com/layers/zephyrprojectrtos/zephyr-build/latest/images/sha256-91ef9e556aa2a6b5ee5397536e6c441b87fbaef82b9dfc0d12287c39d884d0af?context=explore

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-03-13 21:59:42 +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
Guennadi Liakhovetski 5cbbde7986 clock: replace per-clock locks with a global one
select_cpu_clock() on cAVS currently takes all the clock locks while
adjusting them. And that function is called from clock_set_freq()
which also takes one of those locks, which leads to a recursive
spin-lock. To fix that remove per-clock spin-locks and use a global
clock lock instead.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-03-07 13:37:56 +02:00
Guennadi Liakhovetski 5a090a68cb schedule: remove schedule_task_complete()
schedule_task_complete() is never used, remove it.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-03-06 12:14:14 +00: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
Laurentiu Mihalcea 039ccee564 zephyr: Introduce Zephyr version of sof/lib/io.h
The purpose of this commit is to get rid of the dependency
on xtos/include/sof/lib/io.h when building SOF for Zephyr.
Apart from that, this commit solves or gets us closer to
solving the following issues:
	1) Compiling SOF for arm64 architecture results
	in warnings such as the following:

	"warning: cast to pointer from integer
	of different size [-Wint-to-pointer-cast]"

	2) Enabling CONFIG_SOF_ZEPHYR_STRICT_HEADERS will
	result in a compilation error. One of the causes
	for this is the fact that sof/lib/io.h doesn't
	exist.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-03-01 16:03:40 +00:00
Guennadi Liakhovetski 1b934e9d6c IDC: set IDC task priority equal to that of the IPC task
One of the functions of the IDC thread is to execute IPCs on
secondary cores, those have to be executed with the same priority as
when they're run on the primary core, i.e. with the priority of the
IPC thread. Set IDC thread priority equal to the IPC thread.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-03-01 15:30:05 +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
Laurentiu Mihalcea cb72ee08a5 sof: lib: Remove unused #include from cpu.h
All arch/ files should be only used by XTOS. Since the
include statement from cpu.h is not used at all we can safely
remove it. With this, we can make the split between Zephyr
and XTOS more clean.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-02-24 14:28:49 +02:00
Laurentiu Mihalcea 7ed1159e48 Switch to using rtos/idc.h instead of sof/drivers/idc.h
The purpose of this commit is to separate the XTOS-specifc
code from the Zephyr-specifc code found in sof/drivers/idc.h.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-02-24 14:28:49 +02:00
Laurentiu Mihalcea 0a5c049ac0 Switch to using rtos/task.h instead of sof/schedule/task.h
The purpose of this commit is to separate XTOS-specific code
from the Zephyr-specific code found in sof/schedule/task.h.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-02-24 14:28:49 +02: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
Laurentiu Mihalcea 2115a7bfea Switch to using rtos/sof.h instead of sof/sof.h
The purpose of this commit is to separate the XTOS-specifc
code from the Zephyr-specifc code found in sof/sof.h.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-02-22 13:15:06 +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
Laurentiu Mihalcea b91e253f65 include: sof: debug: Split panic.h into Zephyr and XTOS-specific headers
The purpose of this commit is to separate Zephyr-specific definitions
from XTOS-specific definitions. Based on the build, <rtos/panic.h>
will contain the required definitions.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-02-21 15:34:47 +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
ShriramShastry e6baebd54b Math: library: Add an exponential function
The 32-bit exponential library function has an accuracy
of 1e-4 and a unit in last place error of 4.5878 for
inputs from -5 to +5 (Q4.28) and outputs from 0.0067379470
to 148.4131591026 (Q9.23).

Signed-off-by: ShriramShastry <malladi.sastry@intel.com>
2023-02-20 11:17:37 +00:00
Guennadi Liakhovetski d80635054f platform: remove support for Broadwell and Haswell
Remove all support for Broadwell and Haswell platforms, they
aren't supported any more.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-02-16 16:19:36 +00:00
Guennadi Liakhovetski 89f7aa0abd platform: remove support for Baytrail and Cherrytrail
Remove all support for Baytrail and Cherrytrail platforms, they
aren't supported on the "main" branch any more. To build SOF for them
use the "table-v2.2" branch.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-02-08 13:36:04 +00:00
Serhiy Katsyuba e6e441ced5 ipc4: add IPC4 gateway
Adds IPC4 gateway. IPC4 gateway transfers audio between host
and DSP without DMA: via memory window (audio payload) and IPC4
messages (commands).

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-02-07 16:27:20 +00:00
Adrian Warecki d33af9ffbd platform: ace: watchdog: Add ll watchdog support
This commit adds watchdog support in zephyrs ll domain for ace platform.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-02-01 12:43:29 +02:00
Guennadi Liakhovetski 6b9c3caac8 zephyr: remove unused module initialisation
All SOF modules are now initialised using native Zephyr APIs, no need
any more in a dedicated ELF section. TODO: remove from linker scripts
once this is merged.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski 6b3050918a probe: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register probe with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski a6d6ed7632 waves: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register waves with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski e7a21904ac dts: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register dts with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski cfeb248275 google-hotword: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register google-hotword with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski 8bb6321c6e tdfb: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register tdfb with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski d34fe6f1d4 up-down-mixer: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register up-down-mixer with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski 12f647b753 rtnr: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register rtnr with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski 388098abeb igo-nr: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register igo-nr with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski bc7eca2bd0 google-rtc: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register google-rtc with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski 65dd48af21 multiband-drc: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register multiband-drc with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski ff81eda5d6 drc: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register drc with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski 1f48e003d0 crossover: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register crossover with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski ba73c38320 aria: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register aria with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00
Guennadi Liakhovetski e9d078b69f passthrough: convert to Zephyr native initialisation
Use SOF_MODULE_INIT() to register passthrough with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-26 16:54:57 +02:00