Commit Graph

12109 Commits

Author SHA1 Message Date
Adrian Warecki 902b1e5817 lib_manager: modules: move native lib support to lib_manager
Moved module type identification to lib_manager. Since llext modules place
the buildinfo structure in a separate section, API version verification has
been moved to llext_manager. Thanks to these changes, the Processing Module
Adapter is used only by IADK modules as intended. This commit also fixes an
issue with the modules_free function not being called for native modules.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-04-17 14:34:58 +03:00
Serhiy Katsyuba 784da5468e detect_test: Do not overwrite supplied threshold
Default threshold should be applied only if it was not already set
via IPC4_DETECT_TEST_SET_CONFIG call.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2024-04-17 14:34:04 +03:00
Ranjani Sridharan c77a4feb2f topology2: pcm_caps: Remove defaults for rate_min/rate_max
Use 'rates' instead to specify that 48K is the default supported rate.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-04-17 09:15:32 +03:00
Kai Vehmanen 918eff3dab platform: tigerlake: remove unused driver headers
Remove leftover driver headers that are no longer used.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-17 09:13:30 +03:00
Kai Vehmanen 7111ed266d platform: mtl: fix SSP DAI count
Fix the SSP DAI count to 3.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-17 09:12:03 +03:00
Guennadi Liakhovetski c5230a9f0d smart-amp-test: add support for the Cadence toolchain
The Cadence Xtensa cross-toolchain cannot build shared libraries,
when using it we build relocatable ELF objects instead. Update
smart-amp-test to support both formats.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-04-16 15:30:02 +01:00
Guennadi Liakhovetski 30b9470afa rimage: add support for relocatable objects
Relocatable ELF objects don't contain segments, update rimage to
prevent it from aborting in such cases.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-04-16 15:30:02 +01:00
Guennadi Liakhovetski ed33af4d33 llext: add support for building relocatable modules
Add support for relocatable objects to the llext module build system.
In such builds no ELF segments are created, so we need to process all
sections individually.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-04-16 15:30:02 +01:00
Guennadi Liakhovetski 132fdafbf4 llext: check whether the first instance is initialised
We need to tell Zephyr whether or not to perform local relocations.
Check persistent library data to distinguish the first instantiation
from the following ones.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-04-16 15:30:02 +01:00
Guennadi Liakhovetski 9dca9832d8 llext: use data size from Zephyr
Some image formats, notably relocatable objects, don't create ELF
segments. To work around this use the object data size, calculated by
Zephyr.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-04-16 15:30:02 +01:00
Guennadi Liakhovetski f9c22377a0 llext: avoid copying 32KiB of meaningless data
We're skipping unused 0x8000 bytes of data at the beginning of the
module, so we have to reduce the amount of data to be copied
accordingly.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-04-16 15:30:02 +01:00
Tobiasz Dryjanski 821f961fba smart_amp_test: fix crash due to different source formats
Smart amp test chooses a process function based on the sink only. Because
of this, there's a possibility that one of the sources has a 16bit format,
which can't be safely processed by the 32bit process function. The crash
only happened when dai_copier sent one less sample than usual to the
smart_amp. This makes total sample count an odd number, making the data in
the audio_stream buffer misaligned.

This patch changes the prepare function of smart_amp_test to consider all
the sources and sinks while deciding which process function to use.

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2024-04-16 12:42:44 +01:00
Seppo Ingalsuo a485f27757 Tools: Topology2: Add build of 96 kHz HDA topologies
The development topologies are with -/2ch/4ch DMIC for cavs25
and ace1 platforms for testing HDA with 96 kHz rate.

The build topologies names are:
	- sof-hda-generic-cavs25-4ch-48k-96k
	- sof-hda-generic-cavs25-2ch-48k-96k
	- sof-hda-generic-cavs25-4ch-96k
	- sof-hda-generic-cavs25-2ch-96k
	- sof-hda-generic-ace1-4ch-48k-96k
	- sof-hda-generic-ace1-2ch-48k-96k
	- sof-hda-generic-ace1-4ch-96k
	- sof-hda-generic-ace1-2ch-96k
	- sof-hda-generic-96k

The DMIC1 PCM ID with 96 kHz is set to 22 (capture ultrasonic).
PCM IDs definition is in:
https://github.com/thesofproject/sof/files/14021187/PCMDeviceList.txt

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-04-16 12:35:29 +01:00
Seppo Ingalsuo a22a3aa16b Tools: Topology2: Add other rates support for HDA generic
This patch modifies cavs-mixin-mixout-hda.conf with added input
and output format attributes for in_rate and out_rate. The bit_depth
attributes need to be added to as well to avoid corrupt audio.

The HDA_ANALOG_CAPTURE_RATE and HDA_ANALOG_PLAYBACK_RATE are by default
set to 48000. The topologies' characteristics are not changed with
this patch.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-04-16 12:35:29 +01:00
Seppo Ingalsuo dabb9b4fe9 Tools: Topology2: Add build of test topologies with DMIC1 enabled
Topologies with DMIC1 passthrough capture are added to development
directory with 16 and 96 kHz rates. Also a topology with DMIC0
changed to 96 kHz is added as example to test DMIC0 with other
than default rate.

The new topologies are:
	- sof-hda-generic-cavs25-4ch-48k-16k
	- sof-hda-generic-ace1-4ch-48k-16k
	- sof-mtl-sdw-cs42l42-l0-max98363-l2-4ch-48k-16k
	- sof-mtl-sdw-cs42l42-l0-max98363-l2-4ch-48k-96k
	- sof-mtl-sdw-cs42l42-l0-max98363-l2-4ch-96k
	- sof-mtl-max98360a-rt5682-4ch-48k-16k
	- sof-mtl-max98360a-rt5682-4ch-48k-96k

The DMIC1 PCM ID with 96 kHz is set to 22 (capture ultrasonic).
PCM IDs definition is in:
https://github.com/thesofproject/sof/files/14021187/PCMDeviceList.txt

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-04-16 12:35:29 +01:00
Seppo Ingalsuo 32050ba5aa Tools: Topology2: Add pass-through capture for DMIC1
This patch optionally includes dmic1-passthrough.conf if
DMIC1_ENABLE is set in topologies build to passthrough.

The sample rate of DMIC1 DAI can be set to 8 - 96 kHz with
macro DMIC1_RATE.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-04-16 12:35:29 +01:00
Seppo Ingalsuo ccf80dbdfc Tools: Topology2: Use rate definition in dmic-generic.conf
The added DMIC0_RATE allows to use the DAI, pipelines, and PCM with
any supported rate for DMIC in range 8 - 96 kHz. E.g. configure
DMIC0 to 96 kHz.

There is no change to existing functionality with default 48 kHz rate.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-04-16 12:35:29 +01:00
Seppo Ingalsuo bc7b29321e Tools: Topology2: Add format to all widgets in dmic-generic.conf
The input audio format and output audio format definitions are
missing for the copiers and IIR. The formats are added in
preparation to be able to set non-default sample rate for all
widgets.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-04-16 12:35:29 +01:00
Seppo Ingalsuo 20c7c7963f Tools: Topology2: Add DMIC1 defaults definitions
The needed defaults for DMIC1 for PCM ID and sample rate are added
similarly as for DMIC0 for later use. DMIC1 related pipelines are
not used by default so DMIC1_ENABLE is set to false.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-04-16 12:35:29 +01:00
Kai Vehmanen 537b0b321c platform: remove platform/drivers/idc.h for Intel platforms
For Zephyr builds, only definition needed from platform/drivers/idc.h
was prototype for idc_send_msg(). There's no need to keep the platform
layer just for this, so add the definition to rtos/idc.h for Zephyr
builds, and remove the platform/drivers/idc.h for all Intel platforms.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-16 14:12:34 +03:00
Kai Vehmanen fea70bd307 idc: zephyr_idc: implement idc_send_msg for non-multicore platforms
Ensure idc_send_msg() is implemented for all platforms linking
zephyr_idc. For non-multicore, idc_send_msg() will return -ENOTSUP
error.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-16 14:12:34 +03:00
Kai Vehmanen ef6e86a527 ipc: ipc4: remove use of platform/drivers/alh.h
Definitions of XTOS ALH driver interface are no longer used in
SOF tree. Remove the unnecessary inclusion in ipc4 dai.c, and all
instances of the platform alh.h header.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-16 09:02:33 +01:00
Kai Vehmanen 834f8cef7d ipc4: dai: drop code for XTOS ALH drivers
Drop support for XTOS drivers for Intel ALH DAI.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-16 09:02:33 +01:00
Kai Vehmanen 0db7caa7b1 platform: remove drivers/interrupt.h for Intel platforms
The interrupt.h interface is no longer used by any Intel platform
as all drivers have been replaced with native Zephyr drivers, so these
definitions are no longer needed.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-16 02:59:55 +03:00
Laurentiu Mihalcea c592f78e25 module: cadence: don't return on non-fatal error
Assuming the following pipeline:

   HOST ---> MA (CADENCE [MP3 DECODER]) ---> DAI

for native Zephyr SOF, data is first copied from the host
component to MA and then from Linux to the host component.
This means that the first chunk of data will be 0s (since
the host DMA buffer is zero'd via host_prepare()) instead
of useful data. Because of this, the `XA_CMD_TYPE_INIT_PROCESS`
command will return a non-fatal error (i.e:
`XA_MP3DEC_EXECUTE_NONFATAL_NEXT_SYNC_NOT_FOUND`). This
is not the case for non-native SOF since data is first copied
from Linux to host and then from host to MA so the aforementioned
command will get actual data instead of 0s.

Instead of having to alter the flow of data for native Zephyr
SOF (i.e: change the order in which data is copied), which
could impact other components and bits of the firmware, the
fix is to not return if the command returns a non-fatal error.
This way, the first chunk (i.e: the 0s) will be consumed and
the processing can start with the next chunk.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-15 20:03:37 +03:00
Tomasz Leman d534df477f pipeline: graph: Use hex format for component IDs in graph logs
Update the logging statements in pipeline-graph.c to display component IDs
in hexadecimal format. This change ensures consistency with other logging
within the system and improves the clarity of the logs when tracking
component IDs during debugging sessions.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-04-15 14:43:50 +01:00
Tomasz Leman 4a6ca60060 ipc4: helper: Convert component ID logs to hexadecimal format
Switch component ID logging to hexadecimal in ipc4/helper.c to align with
the rest of the system's logging conventions. This enhances consistency
and aids in debugging by matching the component ID format used in other
diagnostic tools.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-04-15 14:43:50 +01:00
Tomasz Leman af131ae03f pipeline: params: Display component IDs in hex format in pipeline logs
Standardize component ID logging by displaying them in hexadecimal
format across all pipeline logs. This change aligns the component ID
representation with other parts of the firmware logs where hexadecimal
is used, facilitating quicker cross-referencing and searchability for
specific components during debugging.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-04-15 14:43:50 +01:00
Tomasz Leman ff4daf1ae0 ipc4: helper: Use hex format for component IDs in ipc-helper logs
Unify the logging format for component IDs by converting them to
hexadecimal in ipc-helper.c. This change ensures consistency with other
log entries and improves the ease of identifying components when
cross-referencing with other debugging outputs that use hex notation for
component IDs.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-04-15 14:43:50 +01:00
Seppo Ingalsuo 660e27809e Tools: Topology2: Add include of mtl.conf for LNL HDA generic
This quick fix avoids build of NHLT blob for the default (TGL)
for LNL HDA generic platform.

The DMIC part of NHLT from TGL is not suitable for LNL, while a
blob for MTL can be used. A proper lnl.conf will be added later.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-04-15 14:09:04 +01:00
Kai Vehmanen e9b238f826 xtos: perf_cnt: use correct timing_counter_get()
Do not use arch_timing_counter() directly, but instead use
the public timing_counter_get().

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-15 13:54:01 +01:00
Adrian Bonislawski 031619c526 boards: mtl: enable KCPS dynamic clock control
This will enable dynamic clock control based on KCPS budget

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2024-04-15 13:48:33 +01:00
Krzysztof Frydryk 5f90a88dcb platform: register proper basefw CPS consumption on boot
On init, register consumption of 10MCPS for base fw
if CONFIG_KCPS_DYNAMIC_CLOCK_CONTROL enabled

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Signed-off-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com>
2024-04-15 13:48:33 +01:00
Krzysztof Frydryk db921487c5 pipeline: Register and unregister pipelines CPS consumption on run/pause
Register and unregister pipelines CPS consumption on run/pause

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Signed-off-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com>

+Squashed commits:
924f0d26db pipeline: print warning if 0 KCPS received
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
7bb6e7ef3b pipeline: register CPS consumption for a proper core
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
5f0c4e4c31 pipeline: make CPC data "opt-in" with fallback
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-04-15 13:48:33 +01:00
Adrian Bonislawski 6a71338c19 platform: init kcps budged before any kcps adjustments
KCPS budged should be initialized before any KCPS adjustments

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2024-04-15 13:48:33 +01:00
Adrian Bonislawski 824a7820f3 clk: remove unnecessary freq change notifications
Such notification currently is used only in non-zephyr code (ll sched)
so it is safe to remove for MTL because of some idc issues

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2024-04-15 13:48:33 +01:00
Tobiasz Dryjanski 28100904bb base_fw: Add perf measurement state set ipc
Adds performance measurement state ipc to change the state of
performance measurement.

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2024-04-12 19:21:42 +03:00
Tobiasz Dryjanski e88eab88b7 telemetry: Enable Telemetry
Add config for enabling telemetry and enable it

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2024-04-12 19:21:42 +03:00
Tobiasz Dryjanski 0419b7c5e9 telemetry: Add systick_info part of telemetry
Introduces telemetry structure into debug memory window. Adds
systick_info which counts execution time of LL tasks. DP tasks are not
supported yet.

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2024-04-12 19:21:42 +03:00
Tobiasz Dryjanski 79751cfc27 memory_window: Increase Debug Window size
Increase Debug Window (Memory window 2) size by one slot (4096 bytes).
The reason for this change is making space for telemetry functionality.

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2024-04-12 19:21:42 +03:00
Tobiasz Dryjanski de66f38b1c base_fw: add scheduler_info_get ipc
Add ipc to retrieve info about schedulers.

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2024-04-12 19:21:42 +03:00
Tobiasz Dryjanski 6afbebd259 ipc4: Add Vendor Config Get
Add Vendor Config Get, a special case of Large Config Get. Large Config Get
handling now checks for this case and extracts extended param_id from ipc
payload as param_id and handles the rest of the payload as usual. Base_fw
now uses extended param_id.

Signed-off-by: Tobiasz Dryjanski <tobiaszx.dryjanski@intel.com>
2024-04-12 19:21:42 +03:00
barry.jan 355e46f051 waves: verify payload size and initialize memory to zero to the
allocated memory in waves.c

    Enhance payload corruption handling by verifying size
    and make sure to have clean buffer before using it.

Signed-off-by: barry.jan <barry.jan@waves.com>
2024-04-12 16:42:08 +01:00
Adrian Warecki 4ff19b82d5 lib_manager: Rename lib_manager_get_library_module_desc function
The lib_manager_get_library_module_desc function was renamed to
lib_manager_get_library_manifest, which better describes what it do.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-04-12 16:55:49 +03:00
Adrian Warecki e7a71b9f9a lib_manager: Add lib_manager_get_module_manifest function
Added the lib_manager_get_module_manifest function that returns manifest
of selected module based on its id. It was performed in many places and
moving it into function simplified the code and increased its readability.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-04-12 16:55:49 +03:00
Adrian Warecki eba6e2a437 ipc4/helper: ipc4_get_comp_drv: Change parameter type to uint32_t
All calls to the ipc4_get_comp_drv function pass the uint32_t value as a
parameter, so the type of functions parameter was changed.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-04-12 16:55:49 +03:00
Guennadi Liakhovetski fc49de7e7d west: update to a newer Zephyr version
Update to a Zephyr version, containing
2ccf775396c2 ("llext: add support for relocatable objects on Xtensa")

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-04-11 11:25:06 +01:00
Seppo Ingalsuo b6aa921e02 Audio: Volume: No update of process function for every ramp value
The volume process function for pass-through can be changed
when all ramps are completed. This change that avoids processing
function lookup in worst case every 128 us is measured to
save in TGL platform about 1 MCPS from CPU_PEAK(MAX).

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-04-11 11:55:25 +03:00
Seppo Ingalsuo bc506f12c8 Audio: Volume: Jump volume directly to target when no ramp
This ensures that volume for a channel changes immediately
after receiving the control if ramp duration is zero or if
type is no fade.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-04-11 11:55:25 +03:00
Seppo Ingalsuo e23a663d13 Audio: Volume: Fix condition for identical ramp
The "is_same_volume=true" was returned if target volumes for
all channels are the same. The check omitted the fact that
start volumes for ramp can be different, e.g. one channel is
attenuated while others are 0 dB.

This change fixes the random ignore of volume ramp and smooth
transition when a volume control is changed.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-04-11 11:55:25 +03:00