Commit Graph

8762 Commits

Author SHA1 Message Date
Rafal Redzimski e7120ce2a1 platform: ace: define a dedicated heap section
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>
2022-09-21 15:15:26 +02:00
Adrian Warecki 722134ec33 base_fw: Add support for multiple platforms
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>
2022-09-21 15:15:26 +02:00
Adrian Warecki 76e7f08281 mtl: Add dummy header/source files required by SOF
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>
2022-09-21 15:15:26 +02:00
Adrian Warecki d5967d1913 platform: mtl: Add meteorlake plaftom
Added base files of meteorlake plaftom:
  Board configuration
  CPU, clock and memory configuration
  Platform bootstrap code
  IPC driver wrapper for Zephyr IPC API for ACE1.5 platforms.

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>
2022-09-21 15:15:26 +02:00
Balakishorepati 1bca97ad4c drivers:amd: Fix aclk issue in standalone dmic usecase
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>
2022-09-19 12:17:04 +01:00
Chao Song 998795c38d module_adapter: add helper for module config fragment position
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>
2022-09-16 17:02:49 +01:00
Balakishorepati 53b3bc6a95 module_adapter:Fix dangling pointer issue in module reset
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>
2022-09-16 16:49:40 +01:00
Anas Nashif ddc104c66d zephyr: both BDW and BYT are not supported in zephyr
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>
2022-09-16 15:32:25 +01:00
Ranjani Sridharan 21587cee71 test: Add test infrastructure for module adapter
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>
2022-09-15 16:41:55 +01:00
Ranjani Sridharan 68866f2c1f test: volume: remove unused code
Volume component no longer does format conversion. Remove the unused
test code.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-09-15 16:41:55 +01:00
Rander Wang 93d159d7fb topology2: add lp_mode as a attribute in pipeline
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>
2022-09-15 14:15:08 +01:00
Kai Vehmanen d525235e0e west.yml: upgrade Zephyr to 3.2.0-rc1 level
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>
2022-09-15 13:54:24 +01:00
Damian Nikodem a823958a8d xtensa-build-zephyr: pass sof build version to rimage
Rimage expects to receive fw_ver_build to prepare the manifest.

Signed-off-by: Damian Nikodem <damian.nikodem@intel.com>
2022-09-15 09:19:16 +02:00
Joe.Cheng 87de994f49 topology1:remove runtime config from DTS topologies
Follow PR#5190, remove runtime config from DTS topologies

Signed-off-by: Joe.Cheng <joe.cheng@xperi.com>
2022-09-14 12:08:36 +01:00
Joe.Cheng ac7f8b0ae6 module_adapter:dts: revert the change "return zero when param is invalid"
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>
2022-09-14 12:08:36 +01:00
Seppo Ingalsuo d3b58acab9 Test: cmocka: Add shift parameter to Mel filterbank reference
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>
2022-09-14 12:06:32 +01:00
Seppo Ingalsuo 86c12c8630 Math: Auditory: Fix the use of bitshift parameter
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>
2022-09-14 12:06:32 +01:00
Guennadi Liakhovetski 1bd8635c0b buffer: fix notifier events
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>
2022-09-12 16:52:37 +01:00
Kai Vehmanen 38d92effc4 ipc4: use delayed work queue for IPC resends
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>
2022-09-12 16:50:29 +01:00
Kai Vehmanen a815089a25 app: set CONFIG_SCHED_CPU_MASK_PIN_ONLY=y for all SOF builds
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>
2022-09-12 16:50:29 +01:00
Liam Girdwood 27a3d7c2af header: rtos: use rtos specific version of cache.h
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>
2022-09-12 11:44:27 +01:00
Liam Girdwood e8733b4f4c header: rtos: use rtos specific version of clk.h
Code can now include <rtos/clk.h>. API is not yet wrapped to Zephyr.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2022-09-12 11:44:27 +01:00
Liam Girdwood 4843516ab8 header: rtos: use rtos specific version of alloc.h
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>
2022-09-12 11:44:27 +01:00
Liam Girdwood e7d1b7bbf9 header: rtos: use rtos specific version of interrupt.h
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>
2022-09-12 11:44:27 +01:00
Liam Girdwood e42f4a6e63 header: rtos: use rtos specific version of timer.h
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>
2022-09-12 11:44:27 +01:00
Kai Vehmanen c950c6525e app: overlays: disable ADSP logging backend for IPC4 targets
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>
2022-09-12 10:33:43 +01:00
Seppo Ingalsuo 957cebf64c Test: cmocka: Add test for DCT library
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>
2022-09-09 13:57:22 +01:00
Seppo Ingalsuo 84df70aabf Math: Add DCT transform library
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>
2022-09-09 13:57:22 +01:00
Adrian Bonislawski 58ba94b253 dai-zephyr: add support for DAI_INTEL_HDA
This patch will add support for DAI_INTEL_HDA
in dai-zephyr like in legacy dai

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2022-09-09 13:55:08 +01:00
Guennadi Liakhovetski 4e0f0dec1f volume: fix cache invalidation in volume_set_config()
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>
2022-09-09 13:54:01 +01:00
Adrian Bonislawski 365658ca5e aria: LOG_MODULE_REGISTER for zephyr logging
This will fix build with zephyr logging enabled

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2022-09-09 11:26:26 +01:00
Adrian Bonislawski 82e628fe10 up_down_mixer: LOG_MODULE_REGISTER for zephyr logging
This will fix build with zephyr logging enabled

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2022-09-09 11:26:26 +01:00
Adrian Bonislawski 55f4a29f24 dai-zephyr: fix dai_get_fifo_depth
This will fix dai_get_fifo_depth() and return correct value

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2022-09-09 11:25:34 +01:00
Kai Vehmanen 50e9b3069f coherent: fix building with CONFIG_ASSERT=y
arch_is_in_isr() is not an exported function. Use k_is_in_isr()
instead.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-09-09 11:25:04 +01:00
Guennadi Liakhovetski 1e9a709ee7 ll-schedule: degrade an error message to a warning
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>
2022-09-09 11:23:52 +01:00
Fred Oh 8136e514bf host-testbench.sh: add FullTest variable and set 0 by default
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>
2022-09-07 22:09:33 +01:00
Fred Oh 6b744bcc63 host-testbench.sh: use process_test.m for 8 components
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>
2022-09-07 22:09:33 +01:00
Fred Oh fe7f44e287 .github: add octave packages for testbench
process_test requires octave. Before running octave,
signal and io pakcages should be loaded.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2022-09-07 22:09:33 +01:00
Fred Oh 51abaff072 Tools: Testbench: add suffix to keep all the logs
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>
2022-09-07 22:09:33 +01:00
Fred Oh d9d5842654 Tools: Testbench: add fulltest parameter in process_test
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>
2022-09-07 22:09:33 +01:00
Fred Oh 7eb9863cdc Tools: Testbench: apply common indentation for functions
No functional change. Set common function indentation and add comment
sections for better readability.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2022-09-07 22:09:33 +01:00
Fred Oh 86e6e4e5b0 Tools: Testbench: fix typo in copyright year
Obvious typo in copyright year, it is 2022.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2022-09-07 22:09:33 +01:00
Guennadi Liakhovetski b17a467c7d copier: handle an allocation failure correctly
Buffer allocation can fail, return an error instead of dereferencing
a NULL pointer.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-09-07 22:01:41 +01:00
Guennadi Liakhovetski b1c514d6cd mixin-mixout: use the _thread coherent API version consistently
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>
2022-09-07 21:56:27 +01:00
Guennadi Liakhovetski f37ab591bb mixin: allocate .mixed_data_info as uncached
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>
2022-09-07 21:56:27 +01:00
Adrian Bonislawski 26b48aa221 probes: enable by default
This will enable probes by default for CAVS platforms

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2022-09-07 21:54:47 +01:00
Adrian Bonislawski dac5759fe6 probes: add IPC4 support
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>
2022-09-07 21:54:47 +01:00
Jaroslaw Stelter de889c554b library_manager: module_adapter: Enable build of library manager and IADK modules
Add the library manager and IADK modules to build.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2022-09-07 18:05:11 +01:00
Jaroslaw Stelter e76c236801 module_adapter: Fix iadk module component compilation.
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>
2022-09-07 18:05:11 +01:00
Jaroslaw Stelter 359326b8db library_manager: Fix library_manager compilation issue
Fix typo. Add changes required after removing some old definitions.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2022-09-07 18:05:11 +01:00