Commit Graph

10535 Commits

Author SHA1 Message Date
Rander Wang 5674c31c8f topology2: update pin setting to latest one
pin_index is not used so replace it with input_pin_index

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-08-21 10:58:09 +01:00
SaiSurya Ch b14dc2e2fd driver: amd: introducing initial silence in DMIC path to
remove the popping noise

Initial silence in DMIC path to remove the popping noise
during the start of DMIC.

Signed-off-by: SaiSurya Ch <saisurya.chakkaveeravenkatanaga@amd.com>
2023-08-21 10:52:51 +01:00
Peter Ujfalusi be53396359 lib_manager: Use i/dcache_invalidate_region() for cache invalidation
The i/dcache_invalidate_region wraps the sys_cache_* functions and is the
proper API to use for cache invalidation.

Fixes: 1dc6a2836d ("lib-manager: clean up memory allocations and cache handling.")
Reported-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Suggested-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-08-21 12:36:35 +03:00
Peter Ujfalusi 64c537d893 lib_manager: Add missing _sparse_force in lib_manager_store_library() error case
The fix for the memory leak missed the _sparse_force, causing sparse
warning.

Fixes: 11b9ce23f7 ("lib-manager: Free up memory for the library in case of a store error")
Reported-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-08-21 12:36:35 +03:00
Kai Vehmanen 59028ad3d1 drivers: Intel: remove Intel XTOS drivers
Now that Intel cAVS2.5 has been migrated to use native Zephyr
drivers, we have no need to keep the Intel specific XTOS
drivers in the tree anymore.

Adjust board configuration files to not refer to removed
Kconfig options.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-08-21 12:21:55 +03:00
Kai Vehmanen 35b17a41c1 platform: tigerlake: remove XTOS platform definitions
Complete migration of Intel TigerLake platform to Zephyr RTOS by
removing remaining platform definitions for XTOS for this platform.

Link: https://github.com/thesofproject/sof/issues/7248
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-08-21 12:21:55 +03:00
Kai Vehmanen ba5b755f97 platform: Intel: icelake: remove unused idc.h
Remove unused idc.h header for Intel IceLake platform (no
longer supported in SOF main).

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-08-21 12:21:55 +03:00
Kai Vehmanen 9948d439d9 app: Intel: switch cAVS2.5 configs to use IPC4 by default
The IPC3 build is no longer supported for Intel cAVS2.5 target,
so move the config overlay definitions as-is to the main
board config file.

To smoothen the transition, keep an empty IPC4 overlay file
in the tree to allow developers to update build scripts.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-08-21 12:21:55 +03:00
Kai Vehmanen 3a02dacab5 zephyr: Intel cavs25: remove non-native build
Remove all cmake rules to build SOF for Intel cAVS2.5 hardware
using non-native drivers (i.e. use XTOS drivers from SOF tree
instead of Zephyr native drivers). This is no longer supported
nor tested, so can be removed.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-08-21 12:21:55 +03:00
Kai Vehmanen 6efff4ccdb zephyr: remove mem_window.c from Intel cAVS2.5 build
Memory window management has been moved to Zephyr drivers
for this platform, so building this file on SOF side is no
longer needed.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-08-21 12:21:55 +03:00
Seppo Ingalsuo df460c8c6b Audio: Crossover: Fix a mistake in s32 processing core
The filters state need to be retrieved for every channel as
it is done in other s16 and s24 processing cores. The mistake
caused very distorted sound with waveform discontinuity every
copy period, e.g. 1 ms.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-08-18 13:19:09 -07:00
Seppo Ingalsuo 5bcbcf19f7 Audio: Crossover: Convert to module adapter
This patch contains the changes to run crossover component as
module adapter client in IPC3 and IPC4 systems. The largest change
is to use pin indices in IPC4 instead of pipeline IDs to identify
sink streams. Pipeline IDs on firmware side are temporary in IPC4.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-08-18 13:19:09 -07:00
Marcin Szkudlinski d2f96d46bd sink/src: remove unused data from struct comp_dev
min_sink_bytes and min_source_bytes were not set
nor used

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-08-18 13:03:35 +01:00
Marcin Szkudlinski cd3e20e0c8 comp_buffer: set ibs and obs in sink/src
set IBS an OBS in sink/src when creating
buffer and binding it to modules

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-08-18 13:03:35 +01:00
Marcin Szkudlinski 3538b2e06c sink_api: add ibs parameter to source structure
Input Buffer Size, the amount of data required for
processing is declared by module in IPC init_instance

This IBS value is kept in module structure, however, there
may be a module that have different IBS per each input.

There's a single source structure per connection to the module,
so it looks like a good place to store IBS there

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-08-18 13:03:35 +01:00
Marcin Szkudlinski 2a5e327372 sink_api: add OBS parameter to sink structure
Output Buffer Size, the amount of free space required for
processing is declared by module in IPC init_instance

This OBS value is kept in module structure, however, there
may be a module that have different OBS per each output.

There's a single sink structure per connection to the module,
so it looks like a good place to store OBS there

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-08-18 13:03:35 +01:00
Marcin Szkudlinski a4cc6066e9 sink_src: add cache operations to audio_stream sink/src
Audio_stream is not making cache operations on data
buffer itself, it requires that the module to
call data invalidation/writeback

Sink/source interface works differently, it removes any
responsibility from the module providing a ready to
use pointers in cached memory

this commit adds cache operations to audio_stream
sink/src implementation

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-08-18 13:03:35 +01:00
Baofeng Tian 897f5167fa audio: dai: fix the error reported by CI after enable inline
after enable inline build option, CI build is reporting not
initialize this structure, init it to remove the error.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-18 10:15:44 +03:00
Baofeng Tian 05dcf1ccde audio: zephyr: add -fno-inline-functions option to zephyr code
By enable/disable COMPILER_INLINE_FUNCTION_OPTION to control
add or remove -fno-inline-functions build option for sof zephyr
code.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-18 10:15:44 +03:00
Baofeng Tian 51556ddd63 audio: sof: remove -fno-inline-functions option for cavs2.5 and ace
remove this build option for sof build cavs2.5 and ace platform
with enable COMPILER_INLINE_FUNCTION_OPTION.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-18 10:15:44 +03:00
Baofeng Tian 01d2fd0a7a audio: add a config to sof and zephyr code
this config will be used to add or remove -fno-inline-functions
into compiler build option.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-08-18 10:15:44 +03:00
Rander Wang 9b08ce026d zephyr: cpu: use correct condition to init cpu
When converting #ifdef CONFIG_ADSP_IMR_CONTEXT_SAVE to if(IS_ENABLE(
CONFIG_ADSP_IMR_CONTEXT_SAVE), we should use if (!IS_ENABLE() ||

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-08-17 20:23:46 +03:00
Pin-chih Lin b793d1ce2b topology1: waves: add definition WAVES_SPK_ONLY
Introduced var WAVES_SPK_ONLY (depend on WAVES) for specifying the
topology requested to apply Waves module on Speaker pipeline only
(not on Heaadphones).

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2023-08-17 17:06:06 +01:00
Ranjani Sridharan 9a5cadcf2b tplg_parser: Introduce debug print helper
Useful to turn on/off the topology parsing logs at run-time.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-17 13:29:46 +01:00
Peter Ujfalusi 3a17cde8fc board: intel_adsp_cavs25_tglh: Enable support for library loading
Add the needed config options to enable the library loading support.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-08-17 13:28:11 +01:00
Peter Ujfalusi b42bbcaed7 board: intel_adsp_cavs25: Enable support for library loading
Add the needed config options to enable the library loading support.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-08-17 13:28:11 +01:00
Peter Ujfalusi b0da357b3a lib-manager: Kconfig: Make LIBRARY_MANAGER depend on MM_DRV
The lib_mananger.c does not compile without MM_DRV enabled

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-08-17 13:28:11 +01:00
Peter Ujfalusi cfed61eaec lib-manager: Fix compilation if INTEL_MODULES are not selected
The lib_manager_register_module() is basically a NOP if the INTEL_MODULES
is not enabled and in this case there is a compiler warning as well:

src/library_manager/lib_manager.c: In function 'lib_manager_register_module':
src/library_manager/lib_manager.c:362:26: warning: unused variable 'uid' [-Wunused-variable]
  362 |         struct sof_uuid *uid = (struct sof_uuid *)&mod->uuid[0];
      |                          ^~~

Instead of playing with inline ifdefs, provide a reduced function to just
print the error for this case.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-08-17 13:28:11 +01:00
Peter Ujfalusi 27b4573a68 lib-manager: Reword the module management error and debug prints
With the rewording it is going to be easier to get idea where the error
occurred from the logs.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-08-17 13:28:11 +01:00
Peter Ujfalusi 80afbacaa0 lib-manager: Cleanup LOAD_LIBRARY message handling debug and error prints
Simplify and unify the way info and errors are printed in the library
loading path.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-08-17 13:28:11 +01:00
Peter Ujfalusi 9dd3f10481 lib-manager: Add timeout handling in lib_manager_load_data_from_host()
It is better to have some sort of timeout handling while waiting for the
DMA transfer of the library from host.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-08-17 13:28:11 +01:00
Peter Ujfalusi 6ba343691a lib-manager: Drop log level for printing the library_base_address
Drop the log level to tr_dbg for printing the library_base_address and
print it only if the allocation was successful.
Allocation error will print an error.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-08-17 13:28:11 +01:00
Peter Ujfalusi 11b9ce23f7 lib-manager: Free up memory for the library in case of a store error
If lib_manager_store_data() fails to read the rest of the library we need
to free up the allocated memory.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-08-17 13:28:11 +01:00
Guennadi Liakhovetski 796a3eeb0d lib-manager: fix wrong flags
Don't overwrite flags when mapping virtual memory and don't map
data for execution.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-08-17 13:28:11 +01:00
Guennadi Liakhovetski 149d168025 lib-manager: don't restart DMA while loading a library
HDA DMA for host to DSP transfers should be started once on the
host and then once on the DSP, it shouldn't be restarted
multiple times during transfer.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Co-developed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-08-17 13:28:11 +01:00
Peter Ujfalusi 001415e917 lib-manager: Use stat.pending_length directly in data load loop
There is no need to use local variable in the loop when checking the
progression of the DMA.

Read the DMA status right after start as the DMA might already copied the
data.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-08-17 13:28:11 +01:00
Peter Ujfalusi ee1e677afc lib-manager: Remove struct lib_manager_dma_buf
Only the addr of the struct is used, no need to keep it around to
complicate things.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-08-17 13:28:11 +01:00
Guennadi Liakhovetski 1dc6a2836d lib-manager: clean up memory allocations and cache handling.
Update the memory allocation and cache handling.
Allocate comp_driver and comp_driver_info as uncached to
align with other drivers.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-08-17 13:28:11 +01:00
Guennadi Liakhovetski b58e5357f8 lib-manager: eliminate repeated memory allocations
No need to dynamically allocate memory for DMA block configuration,
it can be placed on stack.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-08-17 13:28:11 +01:00
Peter Ujfalusi dc409cdf3a lib-manager: Use kcps_adjust around the library loading
Make sure that we have the needed core frequency for the library loading.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-08-17 13:28:11 +01:00
Peter Ujfalusi a6ad6fbf3b lib-manager: Check validity of lib_id
The range of lib_id is only valid for loadable libraries in a range of
1 - MAX_LIBS (15)

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-08-17 13:28:11 +01:00
Ranjani Sridharan eac5a0a12e tplg_parser: Add support for parsing PCM headers
Parse the PCM headers and save the PCM info along with the host
component associated with the PCM.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-16 21:28:17 +03:00
Ranjani Sridharan ccd6949a24 tplg_parser: Rename pcm.c
Rename it to host.c as it is meant for setting the host widget.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-16 21:28:17 +03:00
Ranjani Sridharan 34518568f7 tplg_parser: Add support for parsing and saving route
Add an option to parse and save the routes from topology so that the
IPCs can be sent at a later time.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-08-16 21:28:17 +03:00
Serhiy Katsyuba 81bccef08d app: Enable probe for MTL
Enables extraction and injection probes for MTL platform.
NOTE: this commit does NOT enable probe log backend.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-08-16 21:21:55 +03:00
Serhiy Katsyuba 583329173e probe: Fix injection probe creation
Both extraction and injection probes require to subscribe to buffer
produce notification. Hence notification subscription logic should be
enabled for both types of probes.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-08-16 21:21:55 +03:00
Serhiy Katsyuba 6f5eabd6eb module_adapter: Enable buffer produce notifications required by probe
Probe module subscribes to buffer produce notifications in order to
perform data extraction or injection. Hence this fix is required to
enable probe feature.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-08-16 21:21:55 +03:00
Serhiy Katsyuba 3813a135d5 audio: Put buffer state log under CONFIG_SOF_LOG_DBG_BUFFER switch
comp_update_buffer_consume() and comp_update_buffer_produce() generate
too much log output. Usually such amount of logs results in many log
messages been dropped. It is also results in significant CPU load if
selected log backend formats log messages at runtime.

This patch adds a separate switch to enable these logs only when necessary.
Default value is 'n'.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-08-16 21:21:55 +03:00
Adrian Bonislawski 6f4084b4d9 probe: add support for zephyr native drivers
This patch ports probe component to use zephyr native drivers.

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-08-16 21:21:55 +03:00
Rander Wang 108df32c6b TigerLake: disable memory windows setting on sof side
Memory windows is set on zephyr side, so remove it and also remove
xsram_window for memory windows to save memory since it is not used
by ipc4.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-08-16 18:51:26 +03:00