This is cleanup of the dai_config logic to make it more robust.
The host side should send _DAI_ONFIG IPC before trigger start, it can be
at:
a. topology parsing and pipeline initialization stage, or
b. before hw_params, send _DAI_CONFIG according to runtime params.
For both #a and #b, the configured dai will be stored in the new added
dai_data.dai_config, then set at the start of .params(), while the DMA
channel will be requested later at .prepare() and freed at .reset().
There is no need for the host side to send DMA_CHAN_INVALID to ask for
freeing the DMA channel anymore, if the host side keep sending this,
it will be ignored since the dd->chan is already freed at .reset().
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reduce the number of functions we mock and use the real functions where
we can. This brings in more runtime code so will increase the test
coverage.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Decouple the IPC ABI major version from pipeline creation. This moves
struct sof_ipc_pipe_new from the pipeline and replaces it with it's
members (saving 8 bytes as no header is needed).
Add new feature specific pipeline APIs to configure pipeline at creation.
Additionally align testbench and UTs to API change.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
ipc_msg_send() and ipc_schedule_process() are IPC generic and hence can
be moved to ipc-common.
No code changes, only moves.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
comp_new() and dependencies are all specific to the IPC ABI MAJOR,
move them to IPC helper.
No code changes, move only.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
ipc_comp_new() and ipc_comp_free() are ABI specific so move to
ABI handler. Code move only, no changes.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
The m4 ifelse parameters using defn() are not working as expected.
If more than 3 parameters are passed to SSP_MULTI_CONFIG_DATA(),
the values are not correctly passed.
Fix this by removing defn() and correctly quoting the whole
ifelse section.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The m4 ifelse check on macro parameters is not working as expected.
If optional parameters are not passed, an empty string is written
to output conf file, instead of the "0" string specified in
the ifelse statement.
This has not caused functional errors as the empty string has
been interpreted as zero. Fix the logic despite this so that this
is not copied to other macros.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This code is cleverly written, any attempt to fix this error would
make the code no where near as clean. So instead we suppress.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Add cmocka unit test for FFT library, including fft with size 1024/256,
fft + ifft with SNR test, fft for 2 channels.
Implement helpers to accept samples put in comp_buffer for both real and
complex FFT, the helper fft_real_2() is implemented to speed up the FFT
for dual channels inputs up to two times. All theses helpers should be
used for unit test only.
Suggested-by: Amery Song <chao.song@intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Adds initial Fast Fourier Transform library version, now the maximum
supported window size is 1024, only the window size of the power of 2
and samples in Q1.31 format is supported.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
cordicsine input value range is [-2*pi to 2*pi]
Compared to git hub, proposed solution has following advantage
- Proposed implementation takes approx. ¼ [One fourth ] execution time
- Lookup table size is reduced from 513 to 31 with sizeof(int32) with
a saving of 481 int32 bytes
Mean and maximum value for the difference between floating to fixed point
output is 3.2136e-09 and 0.0000000596
Signed-off-by: ShriramShastry <malladi.sastry@intel.com>
IPC is aligned on at least 4 bytes, removes compiler warning about packed
data being aligned on 1 bytes.
In file included from /home/lrg/work/sof/sof/tools/testbench/file.c:23:
/home/lrg/work/sof/sof/tools/testbench/include/testbench/file.h:59:1: error: alignment 1 of ‘struct sof_ipc_comp_file’ is less than 4 [-Werror=packed-not-aligned]
59 | } __attribute__((packed));
| ^
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Will also make git commands (blame, merge, revert, rebase,
cherry-pick,...) much less likely to fail.
Also more readable and more obvious that -imacros is not nested.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Logging versions like "3:18:1" deceive Emacs (and maybe others) because
they look like an error location produced by a compiler. When compiling
Emacs wrongly believes this an error location and offers to jump to it.
The colon ':' is also a reserved character in most filesystems and an
unusual version separator.
Before:
fw abi main version: 3:18:1
fw abi main version: 3:18:1
After:
fw abi main version: 3.18.1
fw abi main version: 3.18.1
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Change to run smart_amp pipelines on DSP core 1, this will help reduce
the core 0 usage and add multi-core to the CI coverage.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Give the compiler a chance to further optimise IPC data access since it's
all on a 4 byte alignment.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This is based on early hardware information and subject to change.
The ADL topologies use the link information to avoid confusions on
configurations. The kernel tables will use the same conventions.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
remove hard-coded link numbers and make them configurable, this will
allow for reuse of the same topology when the devices are swapped
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Some devices are starting to remove the 3.5mm jack, we need a topology
for these cases.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
replaces with regular base10 indices that are easier to correlate with
kernel/DAPM logs
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
ARRAY_SIZE was being redefined, simplest option is to remove, but I think
this code has to additionally be compiled with external Fuzzer. Fix build.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Split IPC APIs out by feature so that the IPC layer to help future
IPC infrastructure changes support more than one IPC ABI MAJOR version.
No code changes here, only code partitioning and Doxygen comments.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Several files had multiple blank lines even before the removal of
platform_shared_commit(). Fix them with "cat -s"
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
platform_shared_commit() was intended to provide a managed approach to
cache coherency between all cores on Intel CAVS platforms. However this
approach was never completed and its far simpler to use uncached pointers
globally and convert to local cacheable pointer when needed. i.e. all data
is uncacheable by default on Intel platforms and cacheable only when
requested.
This PR is mostly a result of running:
find . -name "*.c" -type f | xargs sed -i -e '/platform_shared_commit/d'
find . -name "*.h" -type f | xargs sed -i -e '/platform_shared_commit/d'
But this does not catch everything so manual build testing also required.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Rename to interrupt-irqsteer.c for preparing support 8ulp platform that
is no irqsteer.
Add select IMX_INTERRUPT_IRQSTEER by default for imx8/8x/8m.
Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
This fixes checkpatch.pl warning:
WARNING: braces {} are not necessary for single statement blocks
172: FILE: src/audio/codec_adapter/codec/generic.c:172:
Signed-off-by: Bud Liviu-Alexandru <budliviu@gmail.com>
We already have cadence license snippet in SOF project LICENSE
file but this one has new Copyright years.
// Copyright (c) 2003-2014 Cadence Design Systems, Inc.
vs
// Copyright (c) 2006-2020 Cadence Design Systems, Inc.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
This files provide the interface for interacting with
Cadence binaries in order to set specific parameters
or decode API errors.
These files were received from Cadence after they kindly agreed
to release them with a permissive license.
Do not edit this by hand! Only update this when Cadence
releases a new version!
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Processing loop inside codec_adapter copy() function will take
the input buffer and try to process all the data available.
We need to 'consume' the source bytes and 'produce' the bytes
to local_buffer after each iteration not just at the end.
Failing to do so, will put wrong data for processing function
starting with second iteration.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
With compress audio the number of output bytes is usually greater
then the number of the input bytes.
Because of this, local buffer might have "valid" bytes even if the
current process operation didn't produce anything.
So, in this period we did not produce anything but we can still copy
some bytes from local_buffer to sink buffer.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Lets try and keep 3rd party codec headers as-is without any modifications.
This include doxygen as some references may be in closed headers.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>