Commit Graph

226 Commits

Author SHA1 Message Date
Rander Wang 0b537cba4d ipc4: init gain & mixin components for zephyr
Fix issue of ipc4 pipeline initialization with zephyr enabled.
Need to initialize these two components. Gain module is another
type of volume without peak volume support and mixin has subset
function of mixer.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-03-01 22:50:17 +00:00
Kai Vehmanen f1e3c934f0 zephyr: use z_init_cpu() if Zephyr 3.0.99 or newer
Use the new interface to initialize non-primary cores before
enabling them with arch_start_cpu(). This interface is not
available in Zephyr 3.0.0, but is mandatory in later release.

Depends on Zephyr commit 2b210cb3db05 ("kernel: Refactor SMP cpu
initialization a bit").

BugLink: https://github.com/thesofproject/sof/issues/5456
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-03-01 22:47:01 +00:00
Kai Vehmanen 760f5ddea2 zephyr: fix race in secondary core power-up
z_wrapper_cpu_enable_secondary_core() may be called
repeatedly on a core that is already running. Add a check
to ensure we do not try to restart a core that is already
running.

Also add a check for ready_flag as done in upstream Zephyr
kernel/smp.c to ensure z_wrapper_cpu_enable_secondary_core()
does not return until the target core has finished its
startup and arch_cpu_active() returns true.

BugLink: https://github.com/thesofproject/sof/issues/5446
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-03-01 22:47:01 +00:00
Marc Herbert e2db3bcdb9 .github: switch to new xtensa-build-zephyr.py
Switch Github Actions away from older shell script.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-02-24 14:54:50 +00:00
Daniel Baluta b06f2cfe23 zephyr: add codec adapter components
This enables codec_adapter and cadence/passhtrough codecs
with SOF on Zephyr.

passthrough codec can be used as it is, but cadence codec
will also need codec libraries from cadence.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2022-02-18 21:12:24 +00:00
Guennadi Liakhovetski d0057a7def Revert "zephyr: add a generic Zephyr platform"
This reverts commits e0ff1b16d8,
339e5ac217 and
09c69b7607. A different approach will
be used for making SOF a platform-agnostic Zephyr application.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-02-11 11:18:54 +00:00
Chao Song 487363fb1b zephyr: add copier and base_fw components
The two components copier and base_fw are
essential to IPC4 support on SOF on Zephyr.

This patch integrates the build of the two
components to SOF build with zephyr RTOS.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2022-02-11 11:02:19 +00:00
Marc Herbert 425a200113 zephyr: replace obsolete README section with link to sof-docs
Replaced with
https://thesofproject.github.io/latest/getting_started/build-guide/build-with-zephyr.html

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-02-07 10:43:28 +00:00
Seppo Ingalsuo beb0610148 Math: IIR: Move IIR DF2T initialize helpers to library
The DF2T IIR core has been moved earlier to library but the
helper functions for configuring it were left to EQ component.
This patch eases use of IIR core from other components. The
file src/audio/eq_iir/iir.c is moved to src/math. There are no
changes except of remove iir.h since the contents specific
for DF2T type were merged to iir_df2t.h

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-02-04 10:02:55 +00:00
Kai Vehmanen 6363a86309 zephyr: add missing call to smp_timer_init to secondary core init
To align with Zephyr smp.c:smp_init_top(), add the missing call to
smp_timer_init() in secondary_init() of the SOF wrapper. Also
add inline documentation why we are open-coding the function on
SOF side.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-02-04 09:33:56 +00:00
Kai Vehmanen 10f4669ccc Revert "zephyr: implement arch_cpu_disable_core()"
This reverts commit 414089aa44.

Failures hit with 4core cAVS2.5 configuraions, so this has
to be reverted. We need an implementation that keeps both
Zephyr (and SOF runtime-DSP if still used) in the loop.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-02-02 15:48:30 +00:00
Kai Vehmanen 378d7b7822 zephyr: always use Zephyr interface to power up secondary cores
Currently there is code to power up secondary cores both
in Zephyr architecture hooks in wrapper.c, as well as in
SOF runtime-PM driver.

Some of this is necessary overlap until full replacement of
SOF runtime-PM is available. But for secondary core power up,
we can already clean up the flow and hook the Zephyr core
enable code to runtime-PM driver directly. This fixes startup
issues seen on Intel cAvS2.5 platforms.

Core power-down is left intentionally for runtime-PM driver
to handle as the related interface in Zephyr is not ready
for use yet.

BugLink: https://github.com/thesofproject/sof/issues/5018
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-02-02 10:40:42 +00:00
Kai Vehmanen 414089aa44 zephyr: implement arch_cpu_disable_core()
Add implementation of secondary core disable with a call
to SOF runtime-PM framework.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-02-01 15:25:48 +00:00
Marc Herbert f30892d966 Revert "zephyr: (cosmetic) make a needlessly global variable static"
This reverts commit 079ce95b98.

As explained in the comment that it modified, predicted in the #5159
discussion and reproduced in test #5290 /
https://github.com/thesofproject/sof/runs/4988844402, this commit broke
'CONFIG_TRACE=n'. Simple reproduction steps:

 $ rm -rf zephyrproject/build-apl

 $ echo 'CONFIG_TRACE=n' >> \
    boards/xtensa/intel_adsp_cavs15/intel_adsp_cavs15_defconfig

 $ sof/scripts/xtensa-build-zephyr.sh [ -p /path/to/zephyrproject ]  apl

fw abi main version:	3.20.1
fw abi dbg version:	5.3.0
warning: can't find section .static_log_entries in zephyr/zephyr.elf
error: section .static_log_entries can't be found
error: unable to write dictionaries, -22

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-01-31 11:02:23 +00:00
Marc Herbert 361fbf4504 zephyr/cmake: remove obsolete cmake 3.12 version test
Zephyr requires CMake 3.21 and SOF requires 3.13, see
commit a0acad3414 ("CMake: require version 3.13")

Fixes commit 4b2edf8eed ("zephyr: wrapper: complete zephyr support for
working audio")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-01-26 10:14:15 -08:00
Guennadi Liakhovetski 92f6db8ba9 zephyr: add support for IPC4
Select correct IPC implementation depending on the selected version.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-01-21 17:05:58 +00:00
Guennadi Liakhovetski 079ce95b98 zephyr: (cosmetic) make a needlessly global variable static
_smex_placeholder dowsn't have to be global, make it static.
Also no need to explicitly specify smex_placeholder_f() as inline,
the compiler will decide by itself.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-01-20 17:05:10 +00:00
Guennadi Liakhovetski 1c6ae93d92 platform/zephyr: use an OS call for time stamps
On generic Zephyr platform case, use an OS timer call to get a time
stamp.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-01-20 17:05:10 +00:00
Marc Herbert 12f4834e40 zephyr: move GENERATED_DIRECTORY from source tree to build directory
This makes it possible to clean sof_versions.h.

Also remove DOT_CONFIG_PATH copy/paste which is unused in
Zephyr.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-01-14 16:56:29 +00:00
Marc Herbert deb0e7340e Rename generated version.h to sof_versions.h
Zephyr also a version.h too so the situation was a buggy #include mess
that (among others) dropped the SOF git version from the SOF banner when
using Zephyr. It's absolutely impossible to fix this mess while keeping
two .h files both named exactly the same and even included with the
exact same '#include version.h' line, I mean no sof/version.h or other
prefix.

As a bonus, this rename also reduces the XTOS-only confusion between
"version.h" and cavs/version.h".

Generating a file in the source tree is a serious bug (to be fixed
later), it means this file is never cleaned. Do not hide this bug with a
.gitignore rule.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-01-14 16:56:29 +00:00
Guennadi Liakhovetski e0ff1b16d8 zephyr: add a generic Zephyr platform
When built with Zephyr, SOF ideally should be a fully platform-
agnostic application. All platform-specific code should reside in
Zephyr itself, including core architecture and platform
infrastructures and drivers. To prepare for this transition we add a
generic SOF-Zephyr platform. It is based on the current Tiger Lake
architecture and should be usable for cAVS 2.5 and newer systems.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-12-31 08:06:24 +00:00
Guennadi Liakhovetski aa767fd5ce zephyr: remove non-existent directories from CMakeLists.txt
Two directories for cAVS 2.0 and 2.5 in Zephyr CMakeLists.txt don't
exist. They're safely ignored, but remove them to avoid confusion.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-12-20 22:58:27 +00:00
Marc Herbert c30dffcc35 zephyr/cmake: BUILD_ALWAYS for smex and sof-logger
Discovered the hard way that the Zephyr build assumes sof-logger is
always up to date when present. It's not clear from cmake's
ExternalProject documentation why that is the case. In any case
BUILD_ALWAYS fixes the issue and takes very little time because it does
not rebuild sof-logger from scratch. BUILD_ALWAYS is already used for
XTOS.

Fixes commit f6c71c21d0 ("zephyr/CMakeLists.txt: build smex and
sof-logger")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-12-03 10:21:20 +00:00
Marc Herbert dda2b385f0 zephyr/atomic.h: add a no-op cast: (long)atomic_read()
Zephyr commit 174cb7f9f183 switched 'atomic_t' from 'int' to
'long' and broke SOF compilation as shown below.

Recent SOF commit 970d7d61ec ("zephyr: update print messages for
64-bit atomics") switched all atomic_read() logs to "%ld" instead of
"%d" which fixed compilation with Zephyr after the switch but broke it
with Zephyr _before_ the switch.

This no-op (long) cast makes SOF compatible with Zephyr both before and
after the switch.

Note the sof-logger does not make any difference between %ld and %d and
does not care.

Sample failure:

src/lib/dma.c: In function 'dma_get': sof/src/include/sof/trace/trace.h:290
 error: format '%d' expects argument of type 'int', but
 argument 5 has type 'atomic_val_t' {aka 'long int'} [-Werror=format=]

 290 |   printk("%llu " format "\n", platform_timer_get(NULL), \
     |                 ^~~~~~~

sof/src/lib/dma.c:119:2: note: in expansion of macro 'tr_info'

 119 |  tr_info(&dma_tr, "..., busy channels = %d", atomic_read(...))

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-11-19 11:16:50 +00:00
Bartosz Kokoszko ec63f3a70e pm_runtime: prepare secondary cores for power down in d0->d0ix flow
Primary core during going to D0i3 state disables all another cores
in platform_pg_int_handler() function. Before it secondary cores
should be prepared (disable interrupts, perform writeback) in order
to make proper restore flow after D0i3->D0 transition.

This commit adds cpu_secondary_cores_prepare_d0ix() function in
ipc_pm_gate() handler, which sends idc to secondary cores
with information that they should perform preparation for power down
in the next platform_wait_for_interrupt() invocation. In
platform_wait_for_interrupt() there is cpu_power_down_core()
invocation with CPU_POWER_DOWN_MEMORY_ON (performs writeback/invalidate,
disables interrupts), when proper flag is set.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2021-11-08 13:25:44 +00:00
Adrian Bonislawski e62855935d lps: restore secondary cores on wake up
This will add missing secondary cores restore on wake up,
simple pm_runtime_get(PM_RUNTIME_DSP, PLATFORM_PRIMARY_CORE_ID)
in lps is not enough in multicore scenario

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2021-11-08 13:25:44 +00:00
Guennadi Liakhovetski 0a3342f5d3 zephyr: (cosmetic) simplify a preprocessor conditional
Simplify a preprocessor conditional compilation in zone_is_cached().

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-10-27 14:09:39 +01:00
Guennadi Liakhovetski a1392bb0de zephyr: use all available memory for the heap
Instead of hard-coding a guessed heap size, obtain remaining free
SRAM from the linker and use it completely for the heap.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-10-27 14:09:39 +01:00
Marc Herbert a03e5386dc trace: add _log_nodict() and enable DMA trace for Zephyr
As of July 2021 we support (too) many tracing options and this
duplication is unfortunately the only way I found to support them all
while giving the compiler the opportunity to optimize away as many
strings as possible.

Supported configurations:

- Systems with limited memory and zero space for full strings, must use
  SOF dictionary only.
- Systems with enough space for all strings to be in memory.
- Anything in between

- Support to duplicate only important message to both the DMA and the
  mailbox (the default)
- CONFIG_TRACEM: supports duplicating ALL messages to both the DMA and
  the mailbox
- CONFIG_TRACEV: supports deleting verbose statements at compile time to
  save space
- CONFIG_TRACE: support turning off all traces at compile-time

- SOF dict trace de-duplication a.k.a. "adaptive filtering"

- Dynamic log levels per component

- Redirection to Zephyr's shared memory tracing that requires full strings.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-10-26 21:54:11 +01:00
Guennadi Liakhovetski 1ef769dd87 zephyr: apl: further reduce heap size
Recent changes increased the size of various sections, breaking
linkage again. We need to make the linker calculate the heap size
automatically but until that is ready, reduce the heap size further
to fix the current breakage.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-10-21 15:59:13 +01:00
Kai Vehmanen de408a2349 zephyr: trigger system panic if MEM_ZONE_SYS alloc fails
As per documentation in include/sof/lib/alloc.h, rmalloc from
MEM_ZONE_SYS will always succeed. In the unlikely case the alloc
fails, trigger a system panic in rmalloc().

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2021-10-18 15:58:42 +01:00
Kai Vehmanen 15885b76e1 zephyr: make SYS and RUNTIME zones cached
Add caching to more heap zones. With addition of SYS, SYS_RUNTIME
and RUNTIME the mapping is now aligned with XTOS allocator.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2021-10-18 15:43:16 +01:00
Kai Vehmanen ba4406e2b7 zephyr: align non-cached allocs to PLATFORM_DCACHE_ALIGN
The XTOS allocator aligns non-cachec allocations to the platform
cacheline size. Test results indicate some SOF application code
relies on this behaviour, so align Zephyr's rmalloc implementation
to match the behaviour.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2021-10-15 09:28:28 +01:00
Kai Vehmanen 9567c97fb3 zephyr: enable cached heap by default for Intel cAVS platforms
Set default as yes for SOF_ZEPHYR_HEAP_CACHED for Intel cAVS.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2021-10-15 09:28:28 +01:00
Kai Vehmanen 956a587663 zephyr: reimplement cached heap zone on single Zephyr sys_heap
Implement the cached SOF heap zones using a single sys_heap
object.

Compared to old implementation which used two separate sys_heaps,
this implementation enables dynamic cached/uncached partitioning
of the heap.

To ensure coherency of the Zephyr heap operation, if cached heap
is enabled, all allocations must be aligned to dcache linesize.

Add a Kconfig option CONFIG_SOF_ZEPHYR_HEAP_CACHED to turn on/off
the cached heap logic, with default set to no for all platforms.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2021-10-15 09:28:28 +01:00
Andy Ross f0415135ea zephyr: Correct heap cache management
The heap code was invalidating blocks on allocation, but that's the
wrong side of the pipe.  By definition, new heap memory
will/should/must be written before being used (because the memory is
undefined), so any cached contents are irrelevant as they'll be
overwritten.

But when the user is finished with the block and frees it, there may
still be live dirty cache lines in the region on the current CPU.
Those must be invalidated, otherwise they will be evicted from the
cache at some point in the future, on top of the memory region now
being used for different purposes on another CPU.

Remove the invalidate on allocation.  Add it back in free.  Leverage a
new Zephyr sys_heap_usable_size() routine to get the size so we don't
have to store it in an extra header.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-10-15 09:28:28 +01:00
Guennadi Liakhovetski 4337831643 zephyr: further reduce the size of heap on APL with XCC
Building SOF with Zephyr for Apollolake with XCC fails because of
insufficient RAM. Reduce the heap size to fix the problem.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-10-14 14:01:57 +01:00
Iuliana Prodan a79614295f zephyr: build: add support for imx8m
Build SOF with Zephyr for i.MX8MP platform.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-10-04 10:34:26 +03:00
Marc Herbert 63ce1d6b51 zephyr/docker-build: fix "stale" ZEPHYR_SDK_INSTALL_DIR comment
It's apparently not stale but "stable".

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-09-29 16:58:24 +01:00
Marc Herbert 1b4b3a575b zephyr/docker-build: unset stale ZEPHYR_SDK_INSTALL_DIR, symlink toolchains
Currently set to obsolete 0.12.4. Better remove it here for everyone
rather than overriding it in Github Actions only.

Also symlinks the toolchains in /opt to /home to fix autodetection

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-09-28 16:13:27 +01:00
Marc Herbert a0ab594045 zephyr/docker-build.sh: pass arguments through to xtensa-build-zephyr.sh
Allows passing compilation flags and any other argument.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-09-09 15:48:18 +01:00
Keyon Jie 1e2d574356 zephyr: wrapper: hardcode SIZEs to unblock building
We have change the size of runtime_shared zone to be decided at link
stage, here hardcode HEAP_RUNTIME_SHARED_SIZE to unblock the Zephyr
building.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-09-09 09:36:31 +01:00
Guennadi Liakhovetski e38b07db97 zephyr: (cosmetic) fix indentation
Fix indentation in edf_schedule.c

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-09-07 13:34:31 +01:00
Iuliana Prodan 0065719234 zephyr: add cache_attr.c in zephyr_library_sources
COMPILER_WORKAROUND_CACHE_ATTR is also enabled on Zephyr,
but the cache_attr.c file is not compiled since is not added in
zephyr_library_sources.

Without this fix, we get:
cache.h:110: undefined reference to `glb_is_cached'

I've added the file for all platforms since cache_attr.c is generic.


Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-08-27 14:00:10 +01:00
Iuliana Prodan b531898f6d zephyr: wrapper: make sof_heap global again
sof_heap variable is used by all platform, with or
without ENABLE_CACHED_HEAP.

Without this fix, on i.MX with Zephyr we get:
error: 'sof_heap' undeclared (first use in this function);

Fixes: fed69b6a34 ("zephyr: wrapper: disable cached heap on Intel platforms")
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-08-27 14:00:10 +01:00
Kai Vehmanen fed69b6a34 zephyr: wrapper: disable cached heap on Intel platforms
Tests with dynamic-pipeline topologies increase the complexity
of alloc/free patterns for heap and these tests have uncovered
new issues with heap corruption. Tests are reporting failed
allocs although heap still has free space. Running same test
with cached heap disabled shows no failures.

The cached heap is already disabled for IMX targets, so build on
this code and add a local ENABLE_CACHED_HEAP define to toggle
the cached heap.

BugLink: https://github.com/thesofproject/sof/issues/4494
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2021-08-24 20:31:10 +01:00
Kai Vehmanen 63eda919d3 zephyr: unify CTX_SAVE handling for Zephyr
Clean up the ifdefs for ipc_pm_context_save(). By implementing
platform_timer_stop() in the Zephyr wrapper, the original context
save sequence can be used also for Zephyr builds.

By doing this, we can fix issues with IPC timeout on CTX_SAVE.
Disabling all interrupts before the IPC reply is needed also on
Zephyr.

BugLink: https://github.com/thesofproject/sof/issues/4507
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2021-08-12 19:48:09 +01:00
Anas Nashif d486a9ff98 kconfig: allow SOF Kconfig to be included in other projects
When the SOF Kconfig is included in other projects, the main menu should
not be that of SOF, rather it should be of the project including SOF.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-08-04 12:34:39 +01:00
Rander Wang 23c0839e4a ipc: share some utility functions for ipc4 path
Ipc3 & Ipc4 will share some component operations.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2021-08-03 15:17:37 +01:00
Pierre-Louis Bossart 9410e84de2 Revert "trace: add _log_nodict() and enable DMA trace for Zephyr"
This reverts commit 57ee04f2d9.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-07-30 15:25:09 -05:00
Iuliana Prodan 214518edea zephyr: wrapper: add notifier_register(ipc_send_queued_msg) for SOF_SCHEDULE_LL_DMA
In XTOS SOF, ipc_send_queued_msg() is run by task_main_primary_core().
In Zephyr we need to schedule ipc_send_queued_msg() using a notifier
triggered by the periodic ll_scheduler.
This is similar to commit c194125b83 ("zephyr:
add notifier_register(ipc_send_queued_msg) in task_main_start()")

For i.MX we need to use this temporary fix for SOF_SCHEDULE_LL_DMA, also.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-07-27 14:43:44 +01:00
Iuliana Prodan 65a33a537c zephyr: imx: enable second level interrupts handling
On i.MX the DMA interrupts are routed via IRQ_STEER.
In order for this to work we need to:
- make any second level interrupts handling go
through interrupt-irqsteer.c;
- use first level interrupt handling from
wrapper.c.

TODO: Implement a driver for the IRQ_STEER in Zephyr,
to replace the legacy code (interrupt-irqsteer.c).

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-07-27 14:43:44 +01:00
Iuliana Prodan daa122f7c2 zephyr: imx: use ll_schedule instead of zephyr_ll
For now, zephyr_ll is limited to timer_domain.

For i.MX we use dma_domain, so keep the ll_schedule
from SOF, until we extend the zephyr_ll for DMA_IRQ.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-07-27 14:43:44 +01:00
Iuliana Prodan b96077cde0 zephyr: intel: remove zephyr_ll from mandatory files
Remove zephyr_ll.c from mandatory files for building
SOF with Zephyr and include it where necessary: in CAVS 1.5,
CAVS 1.8, CAVS 2.0 and CAVS 2.5.

While here, add ll_schedule for BROADWELL and BAYTRAIL
when building SOF with Zephyr.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-07-27 14:43:44 +01:00
Marc Herbert 57ee04f2d9 trace: add _log_nodict() and enable DMA trace for Zephyr
As of July 2021 we support (too) many tracing options and this
duplication is unfortunately the only way I found to support them all
while giving the compiler the opportunity to optimize away as many
strings as possible.

Supported configurations:

- Systems with limited memory and zero space for full strings, must use
  SOF dictionary only.
- Systems with enough space for all strings to be in memory.
- Anything in between

- Support to duplicate only important message to both the DMA and the
  mailbox (the default)
- CONFIG_TRACEM: supports duplicating ALL messages to both the DMA and
  the mailbox
- CONFIG_TRACEV: supports deleting verbose statements at compile time to
  save space
- CONFIG_TRACE: support turning off all traces at compile-time

- SOF dict trace de-duplication a.k.a. "adaptive filtering"

- Dynamic log levels per component

- Redirection to Zephyr's shared memory tracing that requires full strings.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-07-26 19:41:55 +01:00
Seppo Ingalsuo 4f8cf51b6f Drivers: Intel: DMIC: Add NHLT binary data based configuration
This patch adds to DMIC driver support for binary data based HW
registers setup. The driver mode is selected in Kconfig.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-19 13:17:49 +01:00
Seppo Ingalsuo c5f50f533f Drivers: Intel: DMIC: Separate decimation filters setup computation
This patch moves the run-time decimation factors search and filter
coefficients scaling code to separate module as preparation to add
more functionality to the driver. There are no changes to
functionality.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-19 13:17:49 +01:00
Seppo Ingalsuo 922cb6af7c Drivers: Intel: DMIC: Move driver code to subdirectory dmic
In preparation for more functionality the module is moved
to own directory similarly as other DAI drivers.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-19 13:17:49 +01:00
Marc Herbert 2802f2a40a zephyr/docker-build.sh: apt-get install tree
To show the staging area at the end of the Zephyr build

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-07-13 15:56:49 +01:00
Marc Herbert ca6e3c3bff zephyr: add smex_placeholder()
SMEX cannot do empty dictionaries.

This adds 8 bytes of .bss and 32 bytes of .text

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-07-13 15:56:49 +01:00
Marc Herbert f6c71c21d0 zephyr/CMakeLists.txt: build smex and sof-logger
Temporary solution until we switch to the Zephyr logger.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-07-13 15:56:49 +01:00
Marc Herbert 6c9bbd6fef zephyr/CMakeLists.txt: explain why we need if(CONFIG_SOF)
Not obvious plus many SOF developers are new to west.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-07-13 15:56:49 +01:00
Marc Herbert 58e7028346 zephyr/module.yml: add URL, name: and comment out default values
Add URL to documentation for convenience.

Our module name should not depend on the folder name.

Comment out default values to show that we use the defaults.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-07-13 15:56:49 +01:00
Guennadi Liakhovetski 871f1825c3 zephyr: fix memory allocation coherency
Commit 34bb9b7282 ("zephyr: wrapper: build SOF with Zephyr for imx")
broke coherent memory allocations on Intel DSP platforms. Restore the
original code.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-07-13 12:20:48 +03:00
Marc Herbert 259b8ce559 zephyr/wrapper.c: add "temporary fix" comment to ipc_send_queued_msg()
As requested in previous PR #4428

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-07-07 15:58:38 +01:00
Iuliana Prodan 4c06d00084 zephyr: wrapper: include arch/xtensa/cache.h if CONFIG_KERNEL_COHERENCE not set
When building SOF with Zephyr, for i.MX, we get the following
error: undefined reference to `z_xtensa_cache_inv'.

i.MX has only one DSP core, so CONFIG_KERNEL_COHERENCE is not set.

Therefore include arch/xtensa/cache.h, where z_xtensa_cache_inv
is defined and implemented, in cases when the kernel is not built in
a mode where all shared data is placed in uncached memory.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-07-06 14:22:37 +03:00
Iuliana Prodan 34bb9b7282 zephyr: wrapper: build SOF with Zephyr for imx
When building SOF with Zephyr for i.MX the following
additional adjustments, to the wrapper, are required:
1. include heapmem variable in .heap_mem section,
otherwise the HEAP_SIZE is duplicated in two sections and
the sdram0 region overflows;
2. no need to split heap into shared and unshared since
we only have 1 DSP core; In this case, the kernel will
never be built in a mode where all shared data is placed
in multiprocessor-coherent (generally "uncached") memory.
3. use simple interrupt_get_irq() to get the Linux interrupt
and later pass it to irq_steer;
4. use Xtensa timer, as we do now with SOF and XTOS.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-07-06 14:22:37 +03:00
Iuliana Prodan 894f28fbda zephyr: build: add initial support for imx
Build SOF with Zephyr for i.MX platforms.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-07-06 14:22:37 +03:00
Guennadi Liakhovetski a439ea93f6 zephyr: ll-schedule: switch over to a simplified implementation
Switch SOF under Zephyr to use a simplified native low-latency
scheduler implementation.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-07-02 14:10:30 +01:00
Marc Herbert 50eb5c9ca2 trace.c: add mtrace_printf() low-level shortcut
Direct access to mbox shared memory logging when DMA tracing is
either not initialized yet or disabled or found broken for any
reason.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-06-29 23:11:41 +01:00
Marc Herbert c194125b83 zephyr: add notifier_register(ipc_send_queued_msg) in task_main_start()
Fixes #4356

In XTOS SOF, ipc_send_queued_msg() is run by task_main_primary_core(),
the initialization of which has a hard and circular dependency with the
initialization of the EDF scheduler. This EDF scheduler is not part of
Zephyr. Because of the circular dependency it does not seem
possible (nor desirable?) to refactor this code and make it compatible
with Zephyr. So schedule ipc_send_queued_msg() differently in Zephyr:
using a notifier triggered by the periodic Low Latency scheduler.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-06-29 23:04:04 +01:00
Kai Vehmanen 985c5b5685 zephyr: split the heap into shared and non shared
To increase performance of audio application code, the SOF heap should
be mapped to cached address region on platforms with aliased
cached/uncached memory layout.

This splits the heap into two and maps the SOF_MEM_ZONE_BUFFER to
the cached heap and all rest to uncached heap.

The raw heap memory area is still mapped to uncached memory, even for
the cached heap. The allocated blocks are converted to cached addresses
and passed to SOF users of rmalloc() and rballoc_align(). To ensure
application buffers do not share cachelines with heap metadata chunks,
allocation sizes are rounded up to integer multiples of platform
cacheline size.

BugLink: https://github.com/thesofproject/sof/issues/4306
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2021-06-28 20:07:02 +01:00
Liam Girdwood d62e9267f6 ipc: split IPC major code into IPC specific directories
Prepare for supporting new IPC major versions by partitioning
IPC code into directories.

This is a code move only, no code changes except Makefiles.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-05-31 13:08:20 +01:00
Iuliana Prodan 4475f604aa zephyr: trace: remove useless #ifdef __ZEPHYR__ macro
Commit 8357dcf793 ("zephyr: trace: use zephyr utilities when enabled")
added Zephyr's sys/printk.h in order to fix:
warning: implicit declaration of function 'printk'.

Remove #ifdef __ZEPHYR__ macro since this is not needed, because
the whole file is for Zephyr only.

Fixes: 8357dcf793 ("zephyr: trace: use zephyr utilities when enabled")
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-05-24 16:01:05 +01:00
Guennadi Liakhovetski 56cb4f08f6 schedule: (cosmetic) remove three redundant variable initialisations
Remove redundant ret initialisation in two versions of
schedule_task_init_edf() and in schedule_task_init_ll().

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-05-24 11:17:22 +01:00
Iuliana Prodan 8357dcf793 zephyr: trace: use zephyr utilities when enabled
Use the Zephyr sys/printk.h when Zephyr RTOS is used.

Suggested-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-05-21 15:56:58 +01:00
Liam Girdwood 45918aa19b dai: abstract the DAI hardware configuration
Currently the DAI HW configuration is tightly bound to the IPC major
version and IPC structures. Provide a mechanism whereby different
IPC data structures can be passed for DAI configuration.

This change does the following changes.

1) Pass a common ipc_config_dai structure to all dai config call. This
allows retention of common logic that uses this common data.

2) Provide a IPC specific private data pointer to the dai config that
can be interpreted by the DAI as custom data. Today this is the
existing IPC, but it could also support an NHLT binary register blob in
the future.

3) Splits ipc specific code out of src/audio/dai.c and into
src/ipc/ipc3-dai.c.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-05-20 14:01:34 +01:00
Guennadi Liakhovetski f1f5abab0d zephyr: split timer domain
timer_domain.c contains a lot of Zephyr- and XTOS-specific code and
relatively little common code. Aplit it into two files instead of
using a large number of #ifdef instructions.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-05-20 12:41:07 +01:00
Marc Herbert 55025f6343 zephyr/docker-build.sh: remove apt update / install libssl-dev
The Zephyr image has been updated in
https://github.com/zephyrproject-rtos/docker-image/pull/58

This will save some time and even better avoid llvm.org
glitches like this one:

https://github.com/thesofproject/sof/pull/4089/checks?check_run_id=2554961695

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-13 12:00:45 +01:00
Guennadi Liakhovetski beb7d7f93c zephyr: fix schedule_edf_task_cancel() return value
schedule_edf_task_cancel() should return 0 or an error code, whereas
k_work_cancel_delayable() returns flags, depending on the state of
the task being cancelled. Return value of schedule_task_cancel()
is never checked so this bug had no negative effect on SOF.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-05-10 15:05:40 +01:00
Anas Nashif 1c805dbec9 zephyr: move to new workq APIs
Convert remaining work queue APIs and remove to be deprecated calls.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-05-10 15:05:40 +01:00
Kai Vehmanen 798226afcf zephyr: fix key-phrase-buffer init in wrapper
The key-phrase-buffer (kpb) component can be included in
Zephyr-based builds, but the component is not initialized
properly in the builds.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2021-05-06 14:45:05 +01:00
Kai Vehmanen bc6888ecab zephyr: add sample-smart-amp component to the wrapper
Add the sample-smart-amp to the wrapper build if the component
is enabled in build config.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2021-05-06 14:45:05 +01:00
Guennadi Liakhovetski 59d2318a4c zephyr: schedule: enable multi-core scheduling
Initialise LL-schedulers on secondary cores too, which also
requires per-core scheduler data.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-05-05 11:03:35 +01:00
Guennadi Liakhovetski 3fefbf55f9 zephyr: notifier: per-core notifier support
Notifier data has to be per-core and its allocation is
performed in init_system_notify(), no need to also do it in
architecture code.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-05-05 11:03:35 +01:00
Guennadi Liakhovetski 084b851e33 zephyr: fix multicore booting and status management
sof_main() doesn't run on secondary cores. Instead we provide
a new function, that initialises a dummy thread, runs SOF
initialisation by calling secondary_core_init() and switches
over to the dummy thread.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-05-05 11:03:35 +01:00
Guennadi Liakhovetski b406ca1ae8 zephyr: make timer-domain and EDF threads per-core
When running on Zephyr, timer domain and EDF scheduling is
implemented by per-core work queues. Make sure they only run
on designated cores.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-05-05 11:03:35 +01:00
Guennadi Liakhovetski 385586a5f6 zephyr: implement IDC using P4WQ
When running on Zephyr we use P4WQ to implement inter-core
messaging.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-05-05 11:03:35 +01:00
Guennadi Liakhovetski fad27f13d1 zephyr: remove LOG_* API left-over
Remove a log-module declaration to eliminate unused static
variables until we return to using the LOH_* Zephyr API.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-05-04 16:10:49 +01:00
Guennadi Liakhovetski e111252a5f zephyr: move library platform code to platform.c
Move logging code and static data to platform/library and
declare a LOG module properly.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-05-04 16:10:49 +01:00
Marc Herbert 014a386dfb .github: add Zephyr build
Use the official image from the Zephyr project
https://github.com/zephyrproject-rtos/docker-image

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-04-30 11:12:29 +01:00
Guennadi Liakhovetski b617910feb zephyr: fix logging build breakage
The use of Zephyr LOG_*() API in SOF is breaking compilation.
Replace it with with the native trace logging until a proper
fix is available.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-04-27 12:11:41 +01:00
Guennadi Liakhovetski 975fa04088 zephyr: allow building with dynamic interrupts disabled
SOF registers IRQ handlers dynamically, therefore disabling
support for dynamic interrupts for SOF builds doesn't make
much sense. However, this can be used to at least increase
compile-time testing coverage and potentially enable
applications, not using dynamic interrupt registration.

BugLink: https://github.com/thesofproject/sof/issues/4044
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-04-22 14:04:45 +01:00
Guennadi Liakhovetski 3e8526110c zephyr: fix build: add a missing IPC file
Commit b3f195e92a ("zephyr: fix build with recent file name
changes.") partially fixed a regression, caused by 4e436f8570
("ipc: split out ipc functions into separate files.")
partially. This patch completes the fix.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-04-22 14:03:49 +01:00
yxh 5447a4f7b1 cmake file: PLATFORM variable is empty
When CONFIG_LIBRARY is enabled, but the architecture that
exists in sof is not enabled, the "PLATFORM" variable in
the zephyr\CMakeLists.txt file is empty, resulting in an
error in the include path.
The modification here is to get the correct include
path under this condition

Signed-off-by: yxh <yangxiaohuamail@gmail.com>
2021-04-21 09:18:14 +01:00
Liam Girdwood b3f195e92a zephyr: fix build with recent file name changes.
Align the Zephyr build to recent file name changes.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-04-19 14:46:10 +01:00
Marc Herbert 5aeb29b554 zephyr/cmake: stop trying to build removed pipeline_static.c
Fixes commit 093589899a ("pipeline: remove legacy static pipeline
support") that broke zephyr compilation.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-04-05 11:42:33 +03:00
Liam Girdwood 4875c44609 pipeline: split pipeline up by function.
Split the pipeline logic up into stream, params, graph, scheduling and xrun
so that it easier to follow and understand. This is to help on the TSC work
to integrate the codec adaptor into core logic.

This PR is all mechanical code moves. There are NO functional changes. Some
function that were static are now public.

Followup patches will add more documentation updates alongside.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-04-01 21:46:29 +01:00
Anas Nashif f4e4ca752a Revert "zephyr: fixed cached rimage path"
This reverts commit f4c9c28bc5.

This is no longer needed as we removed local copy of rimage from
zephyr/ext.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-02-11 20:19:15 +00:00
Anas Nashif a97d166121 zephyr: reference local Kconfig
Reference Kconfig in zephyr module file which is evaluated by Zephyr
directly. This will eliminate the need for including the SOF Kconfig
directly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-02-11 20:19:15 +00:00
Guennadi Liakhovetski 372d3873bd zephyr: make sure non-atomic 64-bit timer is consistent
The Zephyr timer implementation reads high and low 32 bits
in a non-atomic way. Add a loop to make sure the read is
consistent.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-02-03 16:35:10 +00:00
Guennadi Liakhovetski 9ac38d8828 zephyr: fix regression: add platform_timer_get_atomic()
Recently added platform_timer_get_atomic() has to be
implemented for Zephyr too.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-02-03 16:35:10 +00:00
Guennadi Liakhovetski f4c9c28bc5 zephyr: fixed cached rimage path
Fix the cached rimage path to the temporary cloned rimage location.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-01-22 13:35:29 +00:00
Guennadi Liakhovetski b580a787da zephyr: update for unsupported arch builds
Add some files from src/platform/library/ to generic arch
builds with Zephyr.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-01-11 16:11:42 +00:00
Guennadi Liakhovetski 7531d6bd07 zephyr: add a cache variable with a rimage configuration path
zephyr needs a path to rimage configuration files, add it to
cmake cache.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-01-08 10:24:07 +00:00
Guennadi Liakhovetski a25cf0f1ba zephyr: fix breakage after a recent logging extention
Commit fee7d9c660 ("trace: Introduce adaptive
rate-limiting/suppression of repeated messages") broke Zephyr build.
Add the missing parameter.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-12-01 13:58:55 +00:00
Guennadi Liakhovetski c8ae78ab0e zephyr: fix a path to a header, build LPS conditionally
Use a correct path to the cAVS memory.h header, build cAVS LPS
only when the respective Kconfig option is selected.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-11-27 16:32:32 +00:00
Guennadi Liakhovetski 1d39806f4e zephyr: extend the wrapper for generic architecture support
When building SOF with Zephyr for unsupported architectures
the following additional adjustments to the wrapper are required:
1. define HEAP_RUNTIME_SIZE
2. implement stubs for interrupt handlich code
3. remove arch_timer_get_system() as it's provided by a header
4. hardcode "return 0;" for platform_timer_get()
5. disable sys_module_init() which anyway isn't yet functional
   under Zephyr
6. add dummy platform_init() and platform_boot_complete()
7. add log_const_sof

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-11-21 16:22:54 +00:00
Guennadi Liakhovetski ddbf5255d2 zephyr: set ARCH to "host" when not building for Xtensa
When building for unsupported architectures under Zephyr set ARCH
to "host" to use generic headers.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-11-21 16:22:54 +00:00
Guennadi Liakhovetski a91219eb79 zephyr: remove infinite recursion on Broadwell
Broadwell support with Zephyr had only been dry-coded, it has never
been tested, and it contains an infinite recursion bug: functions
platform_timer_get() and arch_timer_get_system() call each other
infinitely. Break the recursion formally, until a proper fix is
available.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-11-18 11:37:37 +00:00
Guennadi Liakhovetski 375a46d176 zephyr: only build trace support if enabled in the configuration
Files under src/trace should only be built if CONFIG_TRACE is selected
in configuration.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-11-18 11:37:37 +00:00
Andy Ross 2664fc30fb zephyr/wrapper: Disable check for CONFIG_SYS_HEAP_ALIGNED_ALLOC
This kconfig variable no longer exists in upstream Zephyr (the feature
it used to control is now zero-overhead and always enabled).

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-11-16 11:23:50 +00:00
Guennadi Liakhovetski b672923809 zephyr: adjust for new location of audio component samples
Audio component samples have been moved to a new location, fix Zephyr
builds to account for it.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-10-23 10:16:55 +01:00
Guennadi Liakhovetski 9a02ffdeb7 zephyr: fix compiler warnings due to recent Zephyr changes
Fix two compiler warnings, introduced by recent Zephyr changes.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-10-23 10:16:55 +01:00
Karol Trzcinski 095e3ac8ae ipc: Remove probe_support from mailbox
This information is already provided by extended manifest,
so there is no need to double it in runtime code.
It allows to save 28 bytes from .DATA and  128 bytes from .TEXT
for cnl platform.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-10-12 11:41:11 +01:00
Karol Trzcinski 737bdb877f ipc: Remove cc_version from mailbox
This information is already provided by extended manifest,
so there is no need to double it in runtime code.
It allows to save 92 bytes from .DATA and 128 bytes from .TEXT
for cnl platform.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-10-12 11:41:11 +01:00
Guennadi Liakhovetski 94ed4ca325 zephyr: remote the platform_timer_set() wrapper
platform_timer_set() isn't called from Zephyr any more, remote it.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-10-01 22:06:40 +01:00
Guennadi Liakhovetski fa5eee2463 zephyr: fix iir and fir file renaming
Two recent commits moved and renamed some of eq-iir and eq-fir files,
without updating zephyr cmake files.

fixes ab4a608198 ("Audio: Move FIR core to math library")
fixes baa43558f6 ("sof: math: move iir_df2t function to src/math")
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-09-15 09:40:23 +01:00
Guennadi Liakhovetski 047f08f20e uuid: use a pointer instead of casting it to an integer
UUID objects are represented by struct sof_uuid_entry instances in SOF.
Instead of casting pointers to them to integers for passing around,
carry them as pointers until they have to be cast to integers for
packing into data structures. This also fixes printing UUID, using a
"%pU" format.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-09-15 09:33:29 +01:00
Liam Girdwood 87c23eb3ce zephyr: fix build for new sof git hashes.
Git hashes need exported for Zephyr build.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-08-25 09:47:10 +01:00
Liam Girdwood 4b2edf8eed zephyr: wrapper: complete zephyr support for working audio
This patch finalises the wrapper to allow LL scheduling of
timer domain audio, EDF sccheduling of IPC, trace re-direction
and kconfig build support.

There are still many items that are WIP and have been marked with
TODO: comments.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-08-14 15:07:34 +01:00
Andrei Emeltchenko 8b2359b210 zephyr: Update README to add instruction for debug loggin on qmeu
Mention using LOG_BACKEND_XTENSA_SIM backend for console.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-07-23 14:58:25 +01:00
Liam Girdwood 620d68f292 zephyr: readme: add qemu instructions.
Add instructions for running on qemu.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-04-21 20:34:34 +01:00
Liam Girdwood f73319019b zephyr: add README with integration instructions
Some initial information to help developers.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-04-21 20:34:34 +01:00
Liam Girdwood 207c6fdbee zephyr: add wrappers to bridge between Zephyr and SOF APIs.
Add a wrapper to convert SOF API calls to Zephyr equivalents. This allows
development to continue in parallel with xtos/HAL and Zephyr RTOSes until
parity is reached.

The initlial Zephyr APIs to be used are HAL, boot, IRQs, scheduling and
memory. The wrapper reflects this and will probably grow until feature
parity is reached when it can be deleted (as Zephyr APIs can be used
directly).

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-04-21 20:34:34 +01:00
Liam Girdwood de41202f8f zephyr: build: Add initial build support for SOF application.
Builds an initial Zephyr SOF audio module. This will be the starting
point for the porting work.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-04-16 21:01:43 +01:00