Added usage of west manifest in the script to update both
SOF and zephyr dependencies.
Renamed "clone-mode" to "update" flag - the logic where
sof dependencies and zephyr with dependencies is cloned.
Removed "point-mode" from script as it will no longer work
(west manifests require fixed directory structure).
Removed "zephyr revision" or "-z" argument as it is no longer
needed (now revision may be set in west.yml manifest).
Added "-p" pristine flag to rebuild platforms while removing build
directory.
Co-developed-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com>
Signed-off-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com>
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
Added west.yaml file, that manages zephyr repo and its dependencies.
Additionally west manifest may now control sof submodules.
Added submanifests directory with README.txt file so the
submanifests directory exists in version control - otherwise
west update command returns error. This is bug described in
https://github.com/zephyrproject-rtos/west/issues/594 .
Co-developed-by: Andrey Borisovich <andrey.borisovich@intel.com>
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
Signed-off-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com>
Don't fail immediately when the driver is not loaded. Use inotify
instead to wait for /sys/kernel/debug/sof/[e]trace to appear.
This makes it possible to start before the driver is loaded which
reduces considerably the chances of missing early logs.
Fixes a small part of https://github.com/thesofproject/linux/issues/3275
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Open /sys/kernel/debug/sof/fw_version _after_
/sys/kernel/debug/sof/[e]trace because reading the former is optional
and the latter is not.
So when the driver is not loaded, we get the same (missing trace) error
trace message whether we use the -n option or not.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
If operation of disabling secondary core fails at any of the steps, host
will only learn about it after checking the SPA/CPA bits.
This patch adds checking core state after it disabling. If core will be
still active ipc response will report error.
Additionally, it removes an outdated comment.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Add possibility to apply gain to mixed sources to avoid
mixed output saturation. Gain (attenuation) is configurable
per source and comes from host via IPC4 large config set.
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Because of the fact that some platforms use a software host DMA
(e.g: i.MX8QM) pipeline_copy() implicitly calls
pipeline_get_timestamp() when a host copy operation occurs.
The issue with this is that when the host copy operation
occurs, pipeline_for_each() is in the middle of a pipeline
graph traversal. Because of this, pipeline_get_timestamp()
is not able to get to the DAI because it will stop the
pipeline graph traversal at the host buffer (because
of the fact that the 'walking' flag of the buffer is set
to true). This is bad because this way, pipeline_get_timestamp()
is unable to get the updated dai position.
The aim of this fix is to bypass the conditioned pipeline graph
traversal (based on the 'walking' flag) and use an unconditioned
pipeline graph traversal (pipeline_get_dai_comp())
in order to reach the DAI component and get its updated position.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Originally, pipeline_get_dai_comp would be able to find the
DAI only for the PLAYBACK case because the direction would
be hardcoded and would be PPL_DIR_DOWNSTREAM.
The aim of this change is to make pipeline_get_dai_comp more
general and give it the ability to find the DAI for the
CAPTURE case as well.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
This file provides the flexibility to test any Zephyr commit in Linux
CI without any pollution of `git -C sof describe --dirty`. See (too)
long discussion in #6005 for details.
This new file will have no effect until #6005 is merged. However it can
and SHOULD be merged before #6005 because #6005 is backwards
incompatible and requires a "flag day" and the synchronization of
several moving parts. So merging this commit earlier means having one
less moving part to synchronize and it will simplify "flag day"
rehearsals.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Patch a0ff2bb277 added field .gain to configuration data for
src_generate() but the previous generator scripts were not
updated to set it. This patch fixes in them the error about
undefined gain by setting it to previous -1 dB default.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch updates the SRC tool to export same guidance for
Doxygen as added by a previous patch for coefficients
header files. The added comments to begin and end are:
/** \cond GENERATED_BY_TOOLS_TUNE_SRC */
/** \endcond */
The impacted headers remain identical so they don't need update.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
With Zephyr, SOF uses k_cycle_get_64() API in order to
count clock cycles.
Not all platforms have a 64bit counter (e.g i.MX dsp integration
only has xtensa timer which is limited to 32 bits).
So, instead of using k_cycle_get_64 introduce new API sof_cycle_get_64
which keeps the existing behavior for platforms which define
CONFIG_TIMER_HAS_64BIT_CYCLE_COUNTER, otherwise use k_uptime_ticks().
See comments from @andyross at
https://github.com/zephyrproject-rtos/zephyr/pull/48318
Suggested-by: Andy Ross <andrew.j.ross@intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Prefer to use source components direction, rather than dai direction when
setting pipeline components direction. Accept first direction set in
pipeline. This properly handles
host_copier -> module -> host_copier pipelines.
Signed-off-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com>
while simultaneous playback and internal mic capture usecases
are running, there is a case where dmic driver was clearing the
playback interrupt.This might cause noise in playback or no audio
in speaker.Done changes to clear only dmic interrupt status only
in dmic irq handler.
Signed-off-by: Balakishorepati <balaKishore.pati@amd.com>
Group together the Cadence main Kconfig option with the options related
to various Cadence based codecs.
This is only a visual fix.
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
When module adapter is enabled, it is best to keep the new related
options next to it, rather than one option after that.
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
Deprecate the usage of circular buffer check while doing convert, and
use 2-way and 4-way xtensa instructions first to optimize the converter
functions, and process the left samples one by one to avoid potential
risk of memory access overrun. Here are the results:
Optimize pcm_convert_s16_to_s24 and save about 38% cycles;
Optimize pcm_convert_s24_to_s16 and save about 25% cycles;
Optimize pcm_convert_s16_to_s32 and save about 39% cycles;
Optimize pcm_convert_s32_to_s16 and save about 40% cycles;
Optimize pcm_convert_s32_to_s24 and save about 38% cycles;
Optimize pcm_convert_s24_to_s32 and save about 47% cycles;
Signed-off-by: Andrula Song <xiaoyuan.song@intel.com>
Fill in cfg.rate to be used by zephyr native drivers as rate is not
always present in ipc config.
Signed-off-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com>
Fix the memory overrun risk of odd samples to be processed.
Since the 2-way xtensa instruction would always process 2
samples and there would be risk of memory overrun at the
boundary of buffer.
Signed-off-by: Andrula Song <xiaoyuan.song@intel.com>
Added glue logic to integrate with module adapter
the loadable modules developed under Intel
IADK Framework.
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
IADK based modules uses two interfaces to communicate with
base firmware:
- ProcessingModuleInterface;
- SystemServices.
Implementation of both with C++->C wrappers are added in
these files. Additionally system_agent component is
responsible for integration of both communications path
after module loading.
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
Add header files with definitions needed to build wrappers
for run time integration of 3rd party modules developed
with Intel IADK framework.
Note: file naming and localization is kept from IADK Framework
to be able to integrate or also rebuild and integrate original
3rd party modules without their code modifications.
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
These defines need to be included in C++ wrappers for
ProcesingModuleInterface defined in Intel IADK based
3rd party modules. Move it to separate file to not include
whole sof stuff there.
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
Add a new component attribute COMP_ATTR_BASE_CONFIG to retrieve the base
config from the modules instead of using ipc4_comp_get_base_module_cfg().
Also, implement the get_attribute API for all the components that support
IPC4.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
When using simple_copy for components like volume, there is no need to
allocate intermediate sink buffers. So, move the check before the
calculation for sink buffers size.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Since volume component uses the module interface, vol_data should be
accessed module_get_private_data() instead of comp_get_drvdata().
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Since we do not know the size of the IPC payload, just pass the pointer
to the mailbox data and let me module handle it during it's init. No
need to copy the data into the module config.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Instead of acquiring and releasing buffers locally multiple times,
do that once for the .prepare() method.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Instead of acquiring and releasing buffers locally multiple times,
do that once for .copy() and .params() methods.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Instead of acquiring and releasing buffers locally multiple times,
do that once for .copy() and .prepare() methods.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Instead of acquiring and releasing buffers locally multiple times,
do that once for the .copy() method.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Instead of acquiring and releasing buffers locally multiple times,
do that once for .copy(), .params() and .prepare() methods.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Instead of acquiring and releasing buffers locally multiple times,
do that once for .copy() and .params() methods.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Instead of acquiring and releasing buffers locally multiple times,
do that once for .copy() and .prepare() methods.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The config name was changed in zephyr to INTEL_ADSP_TIMER to accommodate
non-cavs platforms. Align with upstream zephyr so we can deprecate it in
zephyr.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This script had been rewritten to python xtensa-build-zephyr.py
script and is no longer used in CI.
Due to changes to sof processes related to Zephyr integration
this script will no longer be maintained.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
For some reason we added DMIC-based topologies for all platforms
except GLK and APL.
This should be back-ported to 2.2 stable.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
The condition statement is wrong in set_pipeline_state() when handling
SOF_IPC4_PIPELINE_STATE_RESET cmd.
Signed-off-by: Libin Yang <libin.yang@intel.com>
Add missing `ALL` keyword so a bare `make` or `ninja` without any
argument runs doxygen by default instead of doing nothing at all. There
is a single target so really no reason not to build it. It's not
required anymore to know the secret word `make doc`.
Note this CMakeLists.txt is not included by any other CMakeLists.txt
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
sof-docs/Makefile used to require building doxygen inside the `sof/doc/`
sources. This was a very bad idea, in-source builds have been
discouraged by CMake since forever. It made it very hard to clean CMake
files in `sof/doc/` (`make clean` does obviously NOT deletes CMake
files)
gitignore was being enrolled to cover up this CMake crime. This was
de-hardcoded 2 years ago in sof-docs commit 2d664c658c14 and much more
recently sof-docs stopped recommending in-source builds in sof-docs
commit 9788c4be32cf. So there's no need to ignore in-source CMake files
any more. If someone still makes the mistake of building sof/doc/
(or anything else) in-source, the lack of .gitignore will now help them
clean up.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>