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>
This patch adds library for discrete cosine transform (DCT)
computation. The DCT initialize functions returns a matrix
and the actual DCT transform is matrix multiply operation.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
With IPC4 volume_set_config() is called from
module_set_large_config() with the host mailbox used as a
configuration source. Data there is written by the host, therefore
any DSP cache contents for that area is invalid. volume_set_config()
does invalidate local cache for that area but it's doing it too late
- after calling module_set_configuration() which already reads the
data. This leads to sporadic wrong configuration readings. Move cache
invalidation before module_set_configuration() to fix that.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
SOF always tries to register both scheduling domains - timer and DMA,
even though the DMA domain isn't used in current topologies on newer
architectures and isn't supported under Zephyr. Degrade the error
message printed upon each boot due to this lack of support to a
warning.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
FullTest variable is by default 0. When fulltest is required,
set the variable and run the script like,
$ FullTest=1 ./scripts/host-testbench.sh
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Expand to more components with process_test. Components for test are
volume, eq-iir, eq-fir, dcblock, drc, multiband-drc, src and tdfb.
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
When series of tests are run, only last result with same component is
saved. Make unique output filename. For now adding bits per sample
at the end of file, all the logs can be saved.
Ideally datetime string would be good. I keep it as FIXME.
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
fulltest param to control quick chirp test only or full test
including all quality tests.
As minor clean up, unused parameter in thdnf_mask() and test_run_process()
is removed.
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
No functional change. Set common function indentation and add comment
sections for better readability.
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Buffer allocation can fail, return an error instead of dereferencing
a NULL pointer.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Threaded and unthreaded versions of the coherent API must not be
mixed. Use the threaded version consistently.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
mixin-mixout uses the coherent API to access the .mixed_data_info
array, therefore it has to be allocated as uncached, otherwise
initialisation changes get discarded by cache invalidation.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Add IPC4 support for extraction & injection probes
IPC4 header changes, checksum calculation
moved checksum from header to the end of data packet
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
The patch introduced in this commit:
SHA-1: 68345fb168
* module_adapter: Add support for IPC4 in module_adapter_new
broke previous implementation of iadk_modules.c, sice loadable
modueles needs congiguration size to be passed from IPC handler
to the module code. These changes resolves that issue.
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>