Register pm_state_notifier to set ready_flag for secondary core when it
is powered up for second time after first fw boot. We can remove
CONFIG_ADSP_IMR_CONTEXT_SAVE check for cavs platform for this feature.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Adding all source files in a single, giant zephyr/CMakeLists.txt is
inconvenient and does not scale.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Adding all source files in a single, giant zephyr/CMakeLists.txt is
inconvenient and does not scale.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
New IDC request idc_comp_free() is required to delete
component located on different core than the pipline to which
the module belongs.
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
This reverts commit fbde1dccf8.
Now that CONFIG_SAMPLE_SMART_AMP has a hard, menu dependency on
CONFIG_SAMPLES, we don't need to encode Kconfig dependencies in CMake
any more.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Addition of SRC Lite module,
which only supports a subset of conversions
supported by the SRC module.
Purpose of SRC Lite module is memory optimization.
Code of SRC Lite is drastically reduced and requires
significantly less memory. When needed one of
defined conversions, driver can choose SRC Lite
module instead of SRC module to optimize memory utilization.
48 -> 16kHz
44.1 -> 16 kHz
32 -> 16 kHz
44.1 -> 48
Signed-off-by: Fabiola Kwasowiec <fabiola.kwasowiec@intel.com>
create ipc3 and ipc4 specific source file, these files will
only be used to store specific code accordingly.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
The_very_long_variable names make it hard to modify
the code and keep to under-100-characters coding
guidelines of the codebase.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The file is found from subdirectory src/audio/google. Without
fix if CONFIG_COMP_GOOGLE_HOTWORD_DETECT is enabled build fails:
CMake Error at sof/zephyr/cmake/modules/extensions.cmake:424
(add_library):
Cannot find source file:
/src/audio/google_hotword_detect.c
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The Pulse Density Modulated Microphone Interface (MICFIL) is a popular
way to deliver audio from microphones to the processor in several
applications, such as mobile telephones. However, current digital-audio
systems use multibit audio signal (also known as multibit PCM) to
represent the signal. This block implements the required digital
interface to provide a 24-bits audio signal from a PDM microphone
bitstream in a configurable output sampling rate.
This patch adds initial support for PDM MICFIL IP found on i.MX8MP
board.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
DP queue is a lockless circular buffer
providing safe consumer/producer cached operations cross cores
prerequisites:
1) incoming and outgoing data rate MUST be the same
2) Both data consumer and data producer declare
max chunk sizes they want to use (IBS/OBS)
required Buffer size:
- 2*MAX(IBS,OBS) if the larger of IBS/OBS
is multiplication of smaller
- 3*MAX(IBS,OBS) otherwise
The queue may work in 2 modes
1) local mode
in case both receiver and sender are located on
the same core and cache coherency
does not matter. dp_queue structure is located in cached memory
In this case DP Queue is a simple ring buffer
2) shared mode
In this case we need to writeback cache when new data
arrive and invalidate cache on secondary core.
dp_queue structure is located in shared memory
dpQueue is a lockless consumer/producer safe buffer.
It is achieved by having only 2 shared variables:
write_offset - can be modified by data producer only
read_offset - can be modified by data consumer only
as 32 bit operations are atomic, it is multi-thread and multi-core save
There some explanation needed how free_space and
available_data are calculated
number of avail data in circular buffer may be calculated as:
data_avail = write_offset - read_offset
and check for wrap around
if (data_avail < 0) data_avail = buffer_size + data_avail
The problem is when write_offset == read_offset,
!!! it may mean either that the buffer is empty
or the buffer is completely filled !!!
To solve the above issue having only 2 variables mentioned before:
- allow both offsets to point from 0 to DOUBLE buffer_size
- when calculating pointers to data, use:
data_bufer[offset % buffer_size]
- use double buffer size in wrap around check when calculating
available data
And now:
- write_offset == read_offset
always means "buffer empty"
- write_offset == read_offset + buffer_size
always means "buffer full"
- data_avail = write_offset - read_offset
if (data_avail < 0) data_avail = 2 * buffer_size + data_avail
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
Because module uses SYS_INIT defined in init.h. Things likely worked
because of indirect includes.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Module is using Zephyr SYS_INIT API, defined in init.h, not device.h.
Code relied on indirect includes.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The z_delayed_work field in struct task is a delayed work, so to go from
k_work to it safely there's an extra step. Add a
k_work_delayable_from_work to fix that.
This is harmless right now because k_work is the first field in
k_work_delayable but the extra step is the safe way of doing it.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This check in change eliminates the extra include isa.h header file
from the exp_fcn_hifi.c file, as it does in the exp_fcn.h file.
Signed-off-by: ShriramShastry <malladi.sastry@intel.com>
Add definitions for pipeline state change phases to be executed when a
PPL_STATE message is handled by a remote core.
The phase can be a combination of:
PREPARE and TRIGGER.
PREPARE will run a configuration (state change preparations) phase on the
pipeline
TRIGGER will run a a trigger on the pipeline
Set ONESHOT in ipc4_set_pipeline_state() to have both phases to be run in
order to avoid regression.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
In preparation to share the extension with an action, first introduce a
mask so that the idc code is prepared for a shared use of the extension.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@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>
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>
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>
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>
Fix multicore test issue on cavs platforms which don't support context
save now, so need to init cpu when the core boot up.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Add virtual heap allocators that allocate on proper heaps and
map physical memory where nesscessary.
Add free function that frees up the virtual heap memory and
unmaps physical memory when possible.
Virtual heap allocator allows using virtual memory as a base
for allocation and booking memory. Physical memory banks
will be mapped when needed allowing for greater flexibility
with mapping.
Signed-off-by: Jakub Dabek <jakub.dabek@intel.com>
This will allow to correctly set multiple pipelines state
even if they are allocated on different cores.
ipc4_set_pipeline_state will check if several cores are involved
- set ppl state if only current core requested
- process IPC on another core if only single secondary core requested
- send IDC messages if several secondary cores involved
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
To support pipelines connection between cores, ipc4_create_buffer()
must be able to create buffer shared between source and sink
components created on different cores. ipc4_create_buffer() requires
source component obs size. When both source and sink components
created on same core, ipc4_create_buffer() is executed on that core,
otherwise it is executed of core 0 (IPC processing core). So for the
case when source and sink components are created on different cores
comp_get_attribute_remote() is used to receive source obs size.
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
bind/unbind handler must be called from core on which component was
created.
When both source and sink components are created on same core,
bind/unbind IPC is processed on that core. However, when connected
source and sink are on different cores, IPC is processed on core 0.
Hence comp_bind_remote() and comp_unbide_remote() is added to call
bind/unbide from proper core.
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
This will allow the fuzzer to probe deeper into the code while also
allowing CI to build test the adapter.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Add a stub for the Waves library for the fuzzer to build against. This
will also improve build tests in CI.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Zephyr uses MP_MAX_NUM_CPUS internally to represent the
number of cores available and consequently to allocate
resources. It is even expected, and checked through assert,
that these two symbols have the same value. Use different
value can lead to an undesired behavior, so lets use
MP_MAX_NUM_CPUS.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This is part of fw which helps loaded module in communication with adsp
Also it provides basic operations for creation of component driver
Common part for native loadable modules and iadk is put together and
remade into native API. That way system services are using generic
methods defined in native system service.
Signed-off-by: Dobrowolski, PawelX <pawelx.dobrowolski@intel.com>