The generic ipc device (struct ipc_comp_dev) assumes
the ID is unique among component, pipeline and buffer,
it is essential for existing ipc_get_comp_by_id()
function to work. This assumption is true for IPC3
but never holds true for IPC4.
The existing IPC4 code uses a trick to make the ID unique,
which also makes the component ID can not comply with
IPC4 primary message. In the IPC4 primary message,
module_id takes the first 16 bits, and instance_id
takes next 8 bits. But the component ID is composed
by 'module_id << 16 | instance_id', we don't see issues
because 'module_id==0' is taken by BringUp and BaseFw
module. So the ID for component doesn't collide with
the ID for pipeline.
In this patch, a new function considering type and
ID is added; four macros for getting component,
buffer and pipeline are added.
This patch prepares for the correction of component ID.
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Remove support for Intel cAVS Low Power Sequencer for Power Management.
This code is specific to XTOS builds for Tiger Lake (cAVS)
platforms and no longer used in Zephyr builds.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Build error info is as follows when compiling with xt-xx toolchain:
1.redefinition of ‘i’
2.‘for’ loop initial declaration used outside C99 mode
Fix the above error.
Signed-off-by: Hailong Fan <hailong.fan@mediatek.corp-partner.google.com>
Adjust valid format in copier for some types of dai gateway which
need to use MSB type.
Currently sample type only affect the copier module so we don't do
it in audio_stream_fmt_conversion.
Signed-off-by: Rander Wang <rander.wang@intel.com>
At first the sample type is set to MSB_INTEGER to follow windows
settings, but actually we use LSB_INTERGER type such as S24_4LE.
Now change the default sample type to LSB_INTERGER to align with
FW usage. For DAI copier we need to use MSB_INTERGER for hardware
requirement. Currently sample type only affect s24/c32 case, so only
change sample type in dai for this format config.
FW will use sample type to choose correct format conversion
function and can deal with Windows audio stream correctly with MSB
s24/c32 format.
out_fmt_cfg is redefined for a alsa-lib bug. Alsa-lib will first process
out_fmt_cfg = '$[($out_channels | ($out_valid_bit_depth * 256)) |
($out_sample_type * 65536)]' in base class and then deal with
out_sample_type, so error is reported. Now first define out_sample_type
and then out_fmt_cfg, everything works.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Remove gateway type and direction for pcm conversion check and will move
them to copier module. This will make pcm conversion check more general
and simple. Also remove s16/c32 for gateway since it is never used.
Signed-off-by: Rander Wang <rander.wang@intel.com>
For sample format with 24 bits valid sample bit and 32 bits container,
valid sample is at msb 24bits if IPC4_TYPE_MSB_INTEGER is set.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Remove code segments in platform.c that are no longer used
in the tigerlake platform configuration. This includes code related
to IPC3, GPIO, SPI, DMA scheduling domain and XTOS. Additionally interrupt
initialization via platform_interrupt_init() can be removed as it is
a no-op in Zephyr builds.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Zephyr native platforms do not need to have low-level definitions
in the platform.h file. These are now handled by Zephyr board files,
so stick to a single place for the definitions and remove the values
from here.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Remove Intel Tiger Lake from available XTOS platforms in arch/xtensa.
Now done in sof/zephyr/CMakeLists.txt instead.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Remove the Tiger Lake defconfig and override files for
XTOS builds. These platforms are now supported with Zephyr which
has its own config files.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This reverts commit b0da357b3a.
The lib_manager now can be compiled without MM_DRV, there is no
need to keep the option to depend on it anymore.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
The module allocate/free uses APIs from MM_DRV but it does not declare
dependency on it.
Make the code compile in the case when MM_DRV is not selected by only
providing a reduced allocate/free functions with a print only.
Use a local define (PAGE_SZ) to store the page size to be used in the
library manager code and in case of !MM_DRV set it to a default 4096 which
is also used by the rimage when creating the manifest for the libraries.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
There's no need for src_get_copy_limits to return
an exit code. The simple true/false if there's enough
data for processing is fine
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
This is a modification of module API - add is_ready_to_process call
In case of LL modules all modules have "copy" or "process" method
called periodically, regardless if they're ready to process or not
In case of DP processing the module must have enough data on all
its inputs, enough space for result storage on all outputs, etc.
Unfortunately simply check of number of bytes at all sources/sinks
may not be sufficient (i.e. in case of variable rate audio formats)
The is_ready_to_process call will be called when DP scheduler makes
decision if the module is to be scheduled at this LL tick or not.
If the module wants its thread to start (and process called) it should
return TRUE
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
Generate compress and PCM mixer topology file for i.MX8 and i.MX8MP
with wm8962 codec based on sof-imx8-compr-wm8960-mixer.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Combine topology files for i.MX8MP and i.MX8 using different
variables like SAI_INDEX and CODEC.
Based on CODEC use the proper STREAM_NAME.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Set no_wname_in_kcontrol_name attribute default to true to for all
widgets.
This change will drop widget name prefixes from all kcontrols created
from currently defined widgets, as they all include
widget-common.conf. In practice this means that for example "gain.2.1
Post Mixer Analog Playback Volume" becomes just "Post Mixer Analog
Playback Volume" and same for all kcontrols.
This behavior can be reverted per widget basis by setting
no_wname_in_kcontrol_name attribute to false in the relevant widget.
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Adds "no_wname_in_kcontrol_name" token, and the associated boolean
attribute to generic component attributes.
If the attribute is set to true for a widget then non of its
associated kcontrols names will have the widget name as a prefix. For
example "gain.2.1 Post Mixer Analog Playback Volume" becomes just
"Post Mixer Analog Playback Volume".
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>