Updated zephyr to the latest version with
the necessary patches
a requried kconfig option is added because of
https://github.com/zephyrproject-rtos/zephyr/pull/51738
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
Heap memory profiling is based on runtime zephyr API.
It will print out each memory allocation with allocated bytes
and free bytes, display as below:
zephyr: heap allocatd: 22c0 free: 152a90 max allocated: 1000
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
PERFORMANCE_COUNTERS_RUN_AVERAGE is not an independent macro,
it depend on: PERFORMANCE_COUNTERS, so it is duplicated,
remove this macro and use one macro to control this module,
also reduced unnecessary profiling log print.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
Set the CONFIG_COMP_VOLUME_WINDOWS_FADE to use the windows fadr ramp
function in the gain module.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Necessary configuration options of the mtl board
have been enabled.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Signed-off-by: Konrad Leszczynski <konrad.leszczynski@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Signed-off-by: Rafal Redzimski <rafal.f.redzimski@intel.com>
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Rename ace ipc zephyr stubb as ipc-zephyr.c as it is a generic interface
towards zephyr cavs/ace ipc drivers. Change existing zephyr ace/mtl
makefile reference to it and start using it in cavs/tgl ipc4 zephyr
native drivers builds. Tgl ipc3 builds will still use sof cavs ipc
driver.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
After add this file, with -o app/perf_overlay.conf in build command
line, profiling functionality will be enabled and mtrace/sof log will
have performance data for further analysis.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
Set the logging thread stack size explicitly for SOF builds
and use a safe default of 4096 bytes. Individual board overlays
can override this default to save stack space.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Set CONFIG_LOG_BUFFER_SIZE=4096 for all SOF builds.
As SOF uses DEFERRED mode for logging, the frontend buffer for
logs must be large enough to cover all typical burts of messages.
Tests using CONFIG_LOG_MEM_UTILIZATION debugging infrastructure,
show that maximum buffer usage is over 2048 bytes in typical
sof-test run on a SOF nocodec topology, tested on Intel TGL
hardware.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Logging output of SOF is sporadic in nature (unless debug configuration
is used) and it cannot be assumed that a steady flow of log messages
is output at all times. During stable state, there are either no or very
few messages output. When the DSP pipeline state is modified, there is
a flurry of event. Similarly upon errors, a burst of log messages is
output.
For better balance between delay in writing logs, and limiting overhead
of the logging thread, set new defaults to:
CONFIG_LOG_PROCESS_TRIGGER_THRESHOLD=5
CONFIG_LOG_PROCESS_THREAD_SLEEP_MS=100
The SLEEP_MS sets an upper bound how long a single log message can
stay in the log frontend buffer.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Calls to log messages are done in many places in SOF code,
including latency sensitive low-latency code paths. To minimize
the cost to low-latency path, use CONFIG_LOG_MODE_DEFERRED=y
by default for all SOF Zephyr builds. This will offload log
processing and output to a separate low priority thread.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
In many places of SOF code, assumption is that code is only run
on a specific core. This allows to reduce overhead of cache
coherency management. For example this is used in the IPC stack.
In Zephyr, we can force threads to be pinned by default using
the CONFIG_SCHED_CPU_MASK_PIN_ONLY setting. Enable this setting
for all SOF builds.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Each logging backend has an overhead and we don't need two backends
writing to SRAM windows, so disable ADSP and keep MTRACE for IPC4
targets. Other targets will continue to use ADSP backend.
Due to a limitation in upstream Kconfig options, this change
will force a change in timestamp formatting as disabling ADSP
will disable CONFIG_LOG_BACKEND_FORMAT_TIMESTAMP=y. Mitigate
this by enabling CONFIG_LOG_OUTPUT_FORMAT_LINUX_TIMESTAMP=y.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The zephyr header zephyr.h should be only used with
CONFIG_LEGACY_INCLUDE_PATH, which is deprecate by both
Zephyr and SOF.
The latest zephyr main will complain if zephyr.h is
used but CONFIG_LEGACY_INCLUDE_PATH disabled.
This patch deprecates zephyr.h and uses kernel.h instead,
so that we don't break with latest zephyr.
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Enable the Zephyr based mtrace backend for all Intel IPC4 platforms.
Also enable routing SOF logs to Zephyr and bump the default
logging level to INFO.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Moved hardcoded cycles values for DMIC IO from dmic.h header
to per-platform configuration file (defconfig files for
non-Zephyr builds and app/boards for Zephyr builds).
Added new entry to intel drivers Kconfig - CONFIG_DMIC_HW_IOCLK.
Modification of this clock value may be used for testing purposes
like building firmware for FPGA or simulator.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
Remove duplicate configs with base IPC4 overlay and add PM related
configs to be able to compile upstream Zephyr SSP changes.
Also enable ALH native driver.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
The native drivers zephyr build requires significantly more configs to
be set, so add those to separate overlay. This overlay can be used with
the -o switch when using the xtensa-build-zephyr script.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Remove overlays as they are the same board configurations available in
app/.
Keep common overlays and change script to reflect those changes.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Make the main SOF app part of SOF, where it belongs. No need for any
overlays (which just duplicated the sample .conf anyways) and one place
to build everything.
This now does not depend on zephyr samples, which have a different
purpose completely.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>