Add helper function to parse muiltiple DMA config tlv structures
added to copier Init Instance IPC in case of SNDW FW aggregation.
To be able to find correct config we need to iterate over the
sequence of DMA tlv with the same tlv type. Thus, we need to check
if device_address value (which contains PDI) is equal to device_id
parameter (passed with alh_id value).
Signed-off-by: Ievgen Ganakov <ievgen.ganakov@intel.com>
Add host_dma_config array to be able to keep multiple
DMA tlv pointers. This change is needed to enable SNDW
FW aggregation using HD-A DMA on LNL
Signed-off-by: Ievgen Ganakov <ievgen.ganakov@intel.com>
Adding make file changes to generate the topology file for the products
which doesn't have no ssp-based audio codec but need to support
HDMI audio playback and HDMI-in capture via I2S.
Signed-off-by: Balamurugan C <balamurugan.c@intel.com>
override the default HDMI DAI link id's by using make
define parameters instead of fixed in file.
Signed-off-by: Balamurugan C <balamurugan.c@intel.com>
Adding HEADSET_CODEC macro and guarded the SSP configuration handling
under this macro.By this changes we can generate the topology
configuration for the products which has no headset codec.
Signed-off-by: Balamurugan C <balamurugan.c@intel.com>
1. The `if XCHAL_HAVE_HIFI4` macro logic is duplicated across many
source files. Starting with dcblock.h, make it generic and move it to
common.h
2. Add the ability to override the max available HIFI level using
Kconfig
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Instead of including TOML files for each platform explicitly, add a
generic platform.toml, that will contain all respective platform
TOML files, and select the correct one, based on build configucation.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
A part of mtl.toml.h is also needed for loadable modules, built for
MTL. Extract it into a separate file.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Buffers, where modules are stored originally, don't need their caches
to be synchronised - they're only used as a data storage and only
accessed via cached aliases. But when final buffers are allocated,
from which modules are actually run, those buffers do indeed need
cache synchronisation.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Currently segment sizes are calculated from page counts, stored in
module manifests. This restricts us to only using page size-aligned
segment sizes. In case of not page size-aligned ELF sections this can
lead to wasted memory. To avoid this store segment sizes in full-size
per-module variables to access them at any time.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
.bss splitting is specific to system-service module loading, LLEXT
uses a traditional shared .bss ELF section.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Currently only page size-aligned .text and .rodata sections are
supported. Remove this limitation by prepadding the address to
restore the alignment.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This forks a slightly earlier version of library loading code for
upcoming LLEXT support.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
We need to be able to distinguish LLEXT loadable dynamically linkable
modules at run-time. Add a new type for them. Compatibility is
preserved.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
No need to re-calculate cdma_comp in ipc4_process_chain_dma(), keep
using the already calculated value.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This patch adds usage of authentication API to check
library signature. If feature enabled it will block loading of
library without valid signature.
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
For ACE platforms library authentication could be done using external
entity - rom_ext. This module reside in L3 memory space and provides
verification functionality. Following code expose that API to SOF.
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
This change avoids error, seen with testbench build for
MTL platform with "scripts/rebuild-testbench.sh -p mtl":
sof/src/include/sof/audio/igo_nr/igo_nr_comp.h:29:27:
error: field 'config' with variable sized type
'struct sof_igo_nr_config' not at the end of a struct or class
is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end]
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The layout is configured as:
- Link0: CS42L43 Jack and mics
- Link2: 2x CS35L56 Speaker (amps 3 and 4, right)
- Link3: 2x CS35L56 Speaker (amps 1 and 2, left)
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
When a stream is triggered to start, host kernel first sendis trigger
start ipc message to fw and then start host dma for this stream.
Ipc_wait_for_compound_msg is used to wait for all pipelines in the
stream to be complete and need to be done fast since it blocks host
to start hda dma. The reverted commit adds a 10 ms delay and results
to host copier xrun warning for it can't get data from host dma.
And this commit also makes a negative effect for stream_start_offset
calculation which is for the difference between dai gateway and
host gateway. We calculate it in host start function but host dma is
started 10ms later, so there will be at least 10ms data error.
This reverts commit 909a3277f1.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Remove the temporary workaround and add HDMI on all MeteorLake
products. If this breaks stuff, well we need to fix hit ASAP.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Fix handling of input_pins free. Module reset can be called multiple times,
so move the resource release to module_adapter_free().
Fixes: 7046004384 ("module_adapter_ipc4: Save and pre-parse base_cfg_ext data")
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Using Compiler version: aarch64-poky-linux-gcc (GCC) 13.2.0
we get the following error:
tools/logger/convert.c: In function 'convert':
tools/logger/convert.c:357:34: error: '%*s' directive output between 4294967264 and 4294967284 bytes exceeds 'INT_MAX' [-Werror=format-overflow=]
| 357 | fprintf(out_fd, "%*s(us)%*s ", -ts_width, " TIMESTAMP", ts_width, "DELTA");
| | ^~~ ~~~~~~~~~~~~
| In file included from /opt/builds/OBNand/build/tmp/work/armv8a-poky-linux/sof-tools/2.8.0/recipe-sysroot/usr/include/stdio.h:964,
| from /opt/builds/OBNand/build/tmp/work/armv8a-poky-linux/sof-tools/2.8.0/git/tools/logger/convert.h:13,
| from /opt/builds/OBNand/build/tmp/work/armv8a-poky-linux/sof-tools/2.8.0/git/tools/logger/convert.c:21:
| In function 'fprintf',
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The sof-adl-rt711-l0-rt1316-l13-rt714-l2 similar to
sof-adl-rt711-l0-rt1308-l12-rt715-l3 with the SDW DMIC on different link.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
The sof-adl-rt711-l0-rt1308-l12-rt715-l3 is identical configuration as
sof-tgl-rt711-rt1308-rt715
At the same time update the comments for better organization.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
The target name for the production should have been more precise as it
ended up:
ninja -C tools/build_tools/ help
topology2_dev: phony
...
topology2_dev_sof-tgl-nocodec: phony
topology2_dev_sof-tgl-nocodec-crossover-2way: phony
...
topology2_prod: phony
...
topology2_sof-hda-generic: phony
topology2_sof-hda-generic-2ch: phony
...
Change it to be consistent:
topology2_dev: phony
...
topology2_dev_sof-tgl-nocodec: phony
topology2_dev_sof-tgl-nocodec-crossover-2way: phony
...
topology2_prod: phony
...
topology2_prod_sof-hda-generic: phony
topology2_prod_sof-hda-generic-2ch: phony
...
No functional change.
Suggested-by: Marc Herbert <marc.herbert@intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
A loadable library can contain a several modules marked as lib_code. This
modules contains code shared by a multiple modules.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
The previous code have several issues:
* Did not support empty data segment.
* It assumed that certain types of segments would be at fixed indexes,
without taking into account their flags/types.
* Incorrect handling of mapping error. If the virtual address cannot be
mapped because is already in use, the error handler will unmap this
address.
* If there is an error loading one of the modules marked as lib_code,
previously loaded modules are not unloaded.
This commit fixes the above issues.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
In SOF we have a two type loadable modules, IADK and native whose are
sharing the same registering mechanism but for C++/C needs IADK is using
adapter which translates methods for SOF needs.
Native loadable module is not using any additional adapters and returns
pointer for API used in built-in modules and loadable.
Signed-off-by: Dobrowolski, PawelX <pawelx.dobrowolski@intel.com>
Add HiFi5 implementation of aria algorithm functions, compared with
HiFi3 version, can reduce about 10% cycles.
Signed-off-by: Andrula Song <andrula.song@intel.com>
A code analysis shows a tentative missing ipc_msg_fre() leading to a
memory leak.
This problem was found with a code analysis - the actual code with
XRUN_NOTIFICATIONS_ENABLE was NOT tested.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
CONFIG_IPC4_XRUN_NOTIFICATIONS_ENABLE does not exist, replace by valid
Kconfig.
This is just a search and replace patch, it's quite likely this
Kconfig option is bit-rot quality level since it was NEVER compiled
in.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
The CHAIN_DMA code relies on the component code unfortunately without
a symmetry between memory allocation and release.
ipc4_chain_manager_create() relies on the ipc4_add_comp_dev() helper,
which internally allocate 20 bytes for an icd item included in a list.
ipc4_chain_dma_state() directly releases the component, without
removing the icd item from the list.
This slow memory leak, combined with alignment requirements, gradually
prevents a DMA buffer from being allocated.
This patch adds a search in the list and frees the item. With this
modification the CHAIN_DMA stress tests can loop forever.
Closes: https://github.com/thesofproject/sof/issues/8751
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Except for trace file, there is no usage for META in sof
source code, posix and xtos are all aligned with zephyr definiton.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
Everyone should use deployable builds by default. Don't switch the
default behavior yet but add a --no-deployable-build option in case
anyone is stuck.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Merge the avs-tplg and sof-ace-tplg under a common production directory.
After a successful build CMake will copy the topology files to a target
directory from where they can be copied to DUT/release:
$ tree tools/build_tools/topology/topology2/target
tools/build_tools/topology/topology2/target
├── development
│ ├── cavs-sdw-hdmi.tplg
│ ├── cavs-sdw-src-gain-mixin.tplg
...
│ ├── sof-tgl-nocodec-rtcaec.tplg
│ └── sof-tgl-nocodec.tplg
├── sof-ace-tplg -> sof-ipc4-tplg
└── sof-ipc4-tplg
├── sof-adl-rt711-4ch.tplg
├── sof-adl-rt711-l0-rt1316-l12-rt714-l3.tplg
...
├── sof-tgl-rt712.tplg
└── sof-tgl-rt715-rt711-rt1308-mono.tplg
The sof-hda-generic-2/4ch.tplg will be generated without embedded NHLT as
it is not used under normal circumstance.
Two flavor of the generic topology is generated for CAVS2.5 and ACE1/2 with
included NHLT binary in case it is used by existing users, but it is
unlikely.
As noted in the documentation, on the deployed system a symlink is needed
for ACE1/2 platforms for backwards compatibility:
sof-ace-tplg -> sof-ipc4-tplg
Link: https://github.com/thesofproject/sof-docs/blob/master/getting_started/intel_debug/introduction.rst#2-topology-file
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
This patch ensures that the DMA buffer is reloaded when
partial_size is non-zero, even if copy_bytes is zero.
This condition typically occurs at the end of a stream,
where the last data chunk does not meet the condition
for reload DMA buffer, leaving a non-zero partial_size.
Signed-off-by: Damian Nikodem <damian.nikodem@intel.com>
The source sink API is needed for DP (data processing) scheduler
that is needed for 16 ms schedule rate.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>