This updates documentation to reflect that now param id is only 2 bytes
followed by 2 bytes codec id.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
We want to be able to play different compress stream types
using the same topology:
e.g
$ cplay -I MP3 -d 0 -c 0 sample.mp3
[ end of playback ]
$ cplay -I AAC -d 0 -c 0 sample.aac
Some static parameters for compress streams are set up in
topology bytes in the form:
[0:3]: param ID
[4:7]: size in bytes
[8:n-1]: data[]
We need now a way to specify codec ID, so we borrow 2 bytes from param
ID, like this:
[0:3]: (param ID, codec ID)
[4:7]: size in bytes
[8:n-1]: data[]
Using 0 for codec ID means 'dont care'. Topologies supporting just 1
codec are not affected and need not to be changed.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
The allocated packet should accommodate the header, the data, and the
checksum. The header size was missing from the condition from the
beginning, even if its there in realloc parameter. The bug should be
harmless waste of cycles thou.
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
The sync_word_at() only checks for two things, if the len parameter is
greater than sizeof(uint32_t) and if the memory pointed p parameter
holds PROBE_EXTRACT_SYNC_WORD value. Now that the available bytes is
checked just before sync_word_at() call, the whole function starts to
look a bit pointless.
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
Drop IPC3 probe DMA framing and use IPC4 framing for IPC3 mode
too. This change simplifies the code quite a bit. After this change
both the SOF firmware and sof-probe demux tool should be updated at
the same time.
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
Environment variables like XTENSA_SYSTEM are an absolute CMake
pain. Add a link to the CMake FAQ and a one-line description why.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The next step is to find how to extract the (too many?) errors.
In the mean time this already makes sure the build process never bitrots
and that it will always possible to use sparse. It also "documents" how
to use sparse: just copy/paste the commands run by CI.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Don't ask the user to delete the build directory when they are using the
option that deletes the build directory.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
In case mixin pipeline is running but mixout pipeline
is not -- do not discard source data but block source
pipeline until at least one sink (mixout) started.
A typical topology is to have mixin and mixout in separate
pipelines. Often, mixout pipeline is started a few milliseconds
later after mixin pipeline. In such case mixin pipeline should
be blocked until mixout pipeline started to do not loose any
audio periods.
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
`./xtensa-build-zephyr.py -i IPC3 mtl` builds the MTL default: IPC4.
This is wrong, remove the misleading "IPC3" option which never did
anything at all.
Fix the --help string to describe what actually happens. This is a build
script, no need for fancy abstractions and indirections that don't even
match reality. Just tell it like it is.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The MTL support added conditional build for topology2 based on CONFIG_CAVS
or CONFIG_ACE.
This is wrong for several reasons:
There is not ace directory present
The Kconfig system is not used when building topologies, so we are ending
up not building topology2 files at all.
There is no reason why CAVS and ACE topologies should be exclusive.
Fixes: 784bce763c ("mtl: Added meteorlake platform to the build system")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Added new mtl platform to xtensa-build-zephyr.py.
Added ace directories to cmake files.
Added ACE to kconfig.
Add Meteorlake platform to be built with Zephyr under
CONFIG_ACE_VERSION_1_5 flag.
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>
Define a dedicated .heap section in case of zephyr build.
Such explicit section is required to allow for unmapping
of unused physical pages which can be later used for
loadable library/modules support.
Signed-off-by: Rafal Redzimski <rafal.f.redzimski@intel.com>
This commit defines a new value HW_CFG_VERSION containing
the hardware version of the platform.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
This commit adds empty header files required to build
a project successfully. The templates for the required
functions have also been added.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Change aclk to max or minimum during playback,capture
usecases start and stop based on dmic status.
Signed-off-by: Balakishorepati <balaKishore.pati@amd.com>
This patch adds a helper to convert first_block/last_block
indicator to module_cfg_fragment_position enum, which is more
efficient than if-else test.
Signed-off-by: Chao Song <chao.song@linux.intel.com>
During module_reset and module_free Calls, pointers are not
getting reset to NULL which causes dangling pointer exceptions.
Initialize pointers to NULL after deallocating the memory.
Signed-off-by: Balakishorepati <balaKishore.pati@amd.com>
Both Broadwell and Baytrail are not supported in zephyr and those
Kconfigs are not defined anywhere, neither in SOF nor in zephyr.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add the test infrastructure for setting up and freeing a module and use
it in the volume unit test.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Currently lp_mode setting is not included by topology binary
since lp_mode is not defined as a attribute. This patch adds
it in pipeline.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Update Zephyr to 0956647aaf6bd2b1e840adcc86db503f274d84a9 (3.2.0-rc1
plus a few fixes merged to upstreamed after the tag).
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This reverts commit d5f8cb9eab.
This commit is not required if the setup and runtime configs are unified
and the payload size is set to right value.
Signed-off-by: Joe.Cheng <joe.cheng@xperi.com>
This patch adds to reference Mel filterbank the parameter
shift that is used to compensate in logarithmic power spectrum
the previously applied bitshift for linear spectrum values. The
added parameter is needed to test compatibility with C
implementation of the filterbank.
The test vectors were re-generated to include effect of shift
parameter values 0 - 3. The previous test used only value 0.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch fixes a mistake in compensating linear spectrum bitshift
gain into logarithmic power spectrum. The bitshift done for linear
spectrum as needs to be squared for power spectrum. Due to
calculating in logarithmic domain the square converts to multiply
by two.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Buffer notifier events are registered with buffer's uncached address
as a key, so notifier events must use the same.
Fixes: 95485f05b5 ("buffer: pass locked buffers to notification
recipients")
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Continue changes in commit c194125b83 ("zephyr: add
notifier_register(ipc_send_queued_msg) in task_main_start()") and
implement the delayed IPC msg sending in Zephyr work queue.
The old implementation did not cover cases where IPC needed to be resent
when no active LL scheduler tasks were active.
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>
Code can now include <rtos/cache.h> which can wrap onto rtos cache
APIs. Will wrap onto Zephyr generic cache API when ready.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Code can now include <rtos/alloc.h> and uses thinly wrapped Zephyr
native for most uses. Wrapping can be removed over time.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Code can now include <rtos/interrupt.h> and uses native Zephyr IRQ API
for most uses. Some wrapping still exists which can be removed over
time. IMX is missing IRQ driver in Zephyr so falls back to xtos IRQ
driver.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Code can now include <rtos/timer.h> and uses native Zephyr timer API
for most uses. Some wrapping still exists which can be removed over
time.
Signed-off-by: Liam Girdwood <liam.r.girdwood@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>
This patch adds 16 bit DCT matrix generation tests. The reference
DCT matrices are generated with Matlab or Octave with script ref_dct.m.
The test in dct.c compares SOF DCT lib generated matrix to reference
matrix and checks absolute and RMS error.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>