Instead of allocating channel data for each channel separately,
allocate them in a single array.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
On multiple occasions local variables are used for only one
intermediate operation and can easily be eliminated with no loss of
clarity. This increases code density to allow better overview.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Compiler emits a warning about possibly uninitialized use of valid_bytes
and container_bytes. Add an explicit return that covers this case.
The code has a "assert(false)" statement already, but this is not
sufficient and the compiler rightly warns about this.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Kconfig options with no description cannot be selected from
defconfig. They can only be selected from other Kconfig options.
This means, that CONFIG_INCOHERENT doesn't get selected on TGL. Move
it to Kconfig to fix this.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Failing to properly acquire buffer objects for access leads to a
CI regression.
BugLink: https://github.com/thesofproject/sof/issues/6075
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The DMA buffer in dai.c has to use cached alias for access. Besides
the pointer can be NULL, which has to be checked for.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
setup config data was removed with commit
5763c74bf4 ("codec_adapter: Remove setup config from module data")
update documentation to reflect this.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
No functional change, this is a pure re-ordering of the matrix
parameters to put the shorter ones first which helps see more in narrow
columns like when looking as build logs on github.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Stop immediately when `west build` fails. Do no keep going and show a
totally unrelated smex build failure.
Also fix error message when zephyr/ is missing.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Make the new -p pristine build option also delete the staging_dir. This
solves a problem where the following sequence was leaving a stale
platform1 build in staging:
xtensa-build-zephyr.py -p platform1
< code >
xtensa-build-zephyr.py -p platform2
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Update zephyr to commit 8e55e59c5917 ('arch: introduce config DCLS').
Fixes build errors due to missing core-isa.h with tgl Intel target with
gcc build chain.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
After Zephyr commit:
855216f582d2 ("kconfig: default to LEGACY_INCLUDE_PATH=n")
we get a compile time error because legacy include paths are not
supported by default.
Fix this by adding 'zephyr/' prefix in proper places.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
We apparently missed quite a few platforms with SSP1, and SSP5 is also
needed for APL/GLK.
One day we'll have a better way to add topologies, but so far it's
brute-force combinatorial addition. Oh well.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This reverts commit e4a5359440.
we need to bring the daily tests back to normal, reverting until the
issue is fixed.
Nothing personal or agenda-based, it's just standard CI practice to
revert what broke the mainline - even more important to do so before
the week-end stress tests.
BugLink: https://github.com/thesofproject/sof/issues/6075
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Use hifi3 instructions implement new format conversion functions
of pcm_func_vc_map except pcm_convert_s24_c32_to_s24_c24_link_gtw.
since there are still some bugs in it and it's for windows only.
Will implement this function after those bugs fixed and verified
as the original assumption of author.
Signed-off-by: Andrula Song <xiaoyuan.song@intel.com>
It's faster like this and we also want platform-specific failures to be
identify as such and not block compilation of other platforms.
Also removed obsolete comment that sneaked in previous commit by
mistake and remove duplicate "zephyr" in the job name.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
next_tick and start logic is unnecessary for
a strictly periodic Zephyr-based LL scheduler implementation
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
The native drivers zephyr build requires significantly more configs to
be set, so add those to separate overlay. This overlay can be used with
the -o switch when using the xtensa-build-zephyr script.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Zephyr has appended "zephyr" to its include path, so use that
in sof zephyr includes in the dai code.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
This reverts commit 3aff4598f7.
This commit causes pipelines that convert from 44.1khz to 48khz to
freeze, when the firmware is compiled with Xtensa toolchain.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Restore ability to use (and test!) zephyr/docker-build.sh locally
without overwriting work in progress.
Fixes commit b371373f7d ("scripts: docker-build.sh updated with
changes from xtensa-build-zephyr.py")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Connecting buffers belongs to pipeline initialisation, it can be done
completely on the master core.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Kconfig options with no description cannot be selected from
defconfig. They can only be selected from other Kconfig options.
This means, that CONFIG_INCOHERENT doesn't get selected on TGL. Move
it to Kconfig to fix this.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
test_keyword_params() must acquire and release the source buffer
appropriately for access.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
When a component or a buffer is freed, it has to be made inaccessible
from everywhere. Make sure to always delete buffers from lists in
such cases and also to use correct direction macros.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Buffers, attached to mixers, can be remaining parts of pipelines,
being freed. Then their component pointers might no longer point to
valid components. Check them before dereferencing.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Freeing components and buffers is performed one by one from IPC
commands, sent by the host. When a component is freed, buffers,
connected to it might still exist and keep pointers to the component,
that is being freed. Then, for example if such a buffer is also
connected to a mixer from a different pipeline, that other pipeline
might still be active. Then the mixer might walk its connected
pipelines and come across the no longer existing component. Remove
those stale pointers to avoid such issues.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Both IPC3 and IPC4 stream termination paths use uncached buffer
addresses, which can contain stale data with core-local buffers. Fix
both to use cached buffer aliases.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Buffer control structures are accessed at run-time via their cached
aliases. But buffer enumeration involves accessing list headers,
embedded in those control structures. To be able to use the standard
list traversal routines that access is performed via uncached
aliases. Therefore the life-cycle of a buffer control object looks as
follows:
- initialisation
1. allocate memory
2. obtain a cached alias
3. use cached access to initialise the audio stream
4. release cached access
5. initialise some fields, using the uncached alias
- linking
6. add to the list
7. obtain a cached alias
8. bind to a component
9. release cached access
- run-time
10. scan buffer list
11. obtain a cached alias
12. use the buffer
13. release cached access
This patch fixes buffer object initialisation and linking to ensure
data consistency between cached and uncached accesses.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Current component object cache synchronisation is wrong. Firstly
component objects are always allocated with uncached addresses, so no
cached access ever takes place. Secondly cache manipution should be
performed via cached addresses. Thirdly if we decide to access
component objects via cached addresses we'll likely use the coferent
API to do this. Remove wrong cache manipulation to fix cases with
componentson different cores within a single pipeline.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Previously we temporarily added two functions
comp_update_buffer_cached_produce() and
comp_update_buffer_cached_consume() to be able to migrate users of
comp_update_buffer_produce() and comp_update_buffer_consume() to them
respectively. Now that all users have been migrated we can remove
original implementations and restore original names.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Zephyr removed support for header inclusion without the zephyr/ path.
Update SOF with correct paths.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Added versioning to scripts/xtensa-build-zephyr.py to get version
information when incompatible changes are done to the script.
Added yml schema version number to west.yml manifest.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
Removed old flags from python script call and replaced with
new one. Added one more working directory to zephyr-build container
now SOF is placed in /workdir/sof and west workspace in /workdir .
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
xtensa-build-zephyr.py had been using some execute_command
calls when building rimage and using rimage keys over
symlink from modules/audio/sof. Changed it so that calls are
executed now over normal sof directory and symlink is not needed
for script execution.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
Added new flag for non-interactive mode that should be used
when script is invoked programmatically.
In default (interactive) mode user is asked using a prompt whether to
reinitialize west manifest if it is initialized to manifest other
than SOFs.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
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>