Instead of checking cdma->header.r.enable multiple times, handle the
!cdma->header.r.enable case first and simplify other conditionals
after that. Also fixes a possibly uninitialised variable.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
cppcheck is complaining that in theory we could return an uninitialized
value, which is true assuming bad IPC data.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
shifting anything into the sign bit location is technically undefined,
add unsigned marker to satisfy cppcheck
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Add Zephyr git version in the initial FW ABI banner. Sample output:
SHM: FW ABI 0x3014000 DBG ABI 0x5003000 tags \
SOF:v2.0-rc1-245-g4be53bca4ab5-dirty zephyr:v2.7.99-3167-g8a8abd69228d \
src hash 0xb8098c48 (ldc hash 0xb8098c48)
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This enables hardware initialisation and power management paths for
non-cAVS platforms with Zephyr.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
_smex_placeholder dowsn't have to be global, make it static.
Also no need to explicitly specify smex_placeholder_f() as inline,
the compiler will decide by itself.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
When CONFIG_TRACE is disabled in Zephyr builds, they fail because
then _DECLARE_LOG_ENTRY isn't defined.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
On generic Zephyr platform case, use an OS timer call to get a time
stamp.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Several files use symbols, defined in memory.h, add explicit includes
for it.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
I2S Node ID virtual index structure:
-first 4 bits are index of the time slot group
(uint8_t time_slot_group_index : 4)
-next 4 bits are index instance
(uint8_t i2s_instance : 4)
Therefore dai.dai_index should be moved 4 bits to the right.
Signed-off-by: aeloglix <ArsenX.Eloglian@intel.com>
Add support for boards without speaker amplifier. Just simply remove
all speaker related components and configuration.
Signed-off-by: Brent Lu <brent.lu@intel.com>
MAX_CORE_COUNT was removed in:
commit 2bd41aaf26 ("platform: remove MAX_CORE_COUNT")
CONFIG_CORE_COUNT should be used instead of CONFIG_MAX_CORE_COUNT
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
detect pipelines require PCM_ID to be define which is the case only
when they get inserted using PIPELINE_PCM_ADD.
Note that PIPELINE_PCM_ADD and PIPELINE_ADD have different signature.
Signed-off-by: Lionel Koenig <lionelk@google.com>
Pipeline extects PIPELINE_FORMAT to be defined. When including a
pipeline using DAI_ADD, DAI_FORMAT is defined but no PIPELINE_FORMAT.
Prior c687815, the last previously defined PIPELINE_FORMAT was used.
This change ensure the requested DAI_FORMAT is used in the pipeline.
This addresses bug #5193.
Signed-off-by: Lionel Koenig <lionelk@google.com>
In order to be correctly restarted after RELEASE sdma channel
status needs to be COMP_STATE_PREPARE.
Otherwise, following sdma_start() will return an error.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
SAI is stopped at PAUSE and it needs to be started again at RELEASE.
Reported-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
There was no need to copy/paste; fixes commit02c21c25ba33 ("dma-trace.c:
use new mtrace_printf() to demote FW ABI banner to INFO")
Zero observable change.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
scripts/ has kconfig defaults and CMake code that can affect the
dictionary. Note this does not fix#3890 because .config (and maybe
others) are still not hashed but it helps a bit.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
execute_process() runs in the current directory of the process invoking
cmake. This can be completely outside the git repo.
Fixes commit a5899812b7 ("version.cmake: don't trust CI to record time
and versions and log ourselves")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Include DEFAULT_PLATFORMS in SUPPORTED_PLATFORMS instead of the other
way round. SUPPORTED_PLATFORMS will always be bigger than
DEFAULT_PLATFORMS and it's easier to add a platform than remove one.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Passing spurious --board and source directory arguments to an already
build directory does not help but it does not hurt either and it
simplifies the code. It also provides a more consistent west command in
the set -x "logs", one that can be re-used in any circumstance.
The only restriction is to make sure CMAKE_ARGS is empty on all but the
first invocation but that's not new and unchanged here.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This makes it possible to clean sof_versions.h.
Also remove DOT_CONFIG_PATH copy/paste which is unused in
Zephyr.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Zephyr also a version.h too so the situation was a buggy #include mess
that (among others) dropped the SOF git version from the SOF banner when
using Zephyr. It's absolutely impossible to fix this mess while keeping
two .h files both named exactly the same and even included with the
exact same '#include version.h' line, I mean no sof/version.h or other
prefix.
As a bonus, this rename also reduces the XTOS-only confusion between
"version.h" and cavs/version.h".
Generating a file in the source tree is a serious bug (to be fixed
later), it means this file is never cleaned. Do not hide this bug with a
.gitignore rule.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
So far we support apl, glk, cml, jsl, tgl.
SSP0 or SSP2 can be used.
DMICS may or may not be present, the simplifying assumption is that we
have 0, 2 or 4channels.
the existing topology names are kept but will not be used with kernel
updates, the -ssp<N> and -dmic<N> ch suffixes will be added based on
NHLT information to avoid a need to override topology files.
A better solution would be a DAI index that can be overridden in a
topology file, but we have no interface to do so at the moment, so
brute-force combinatorial handling of all possible solutions it is.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
set the state to MODULE_PROCESSING before starting to process the
samples and reset it to MODULE_IDLE afterwards.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
SOF loves memset(). It takes great care to 0-initialise buffers and
objects. And its memset() routine only sets one byte at a time.
Optimise it to use 32-bit assignments where possible.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
base_module and boot_module are separate targets, they need
RELATIVE_FILE defined for them too.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Components those use library functions fail to run in testbench
if they are not enabled in library_defconfig. The testbench build
builds the component library but not the library dependencies. E.g.
DRC component run in testbench failed because of this. Crossover
worked because it does not currently use library functions. All such
components with functional source are enabled for completeness.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Currently pipeline reset is used by ipc3 for pipeline
free and pcm param error. It is used by ipc4 to
reinitialize pipeline, so it suitable to set pipeline
to default ready status
Signed-off-by: Rander Wang <rander.wang@intel.com>
Chain dma is only support by HDA gateway. The idea is
to copy data from host to dai directly without any process.
It is just like a pass-through pipeline.
This patch adds support by create a pass-through pipeline
internally.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Currently some of pipeline setting ipc messages are
scheduled in another thread, both ipc thread and the
schedule thread may return the status. It is work for
IPC3, but for IPC4 a batch of pipelines will be set
by single ipc message and they will be scheduled in
multiple threads, then multiple ipc messages will be
repied to host. This is invalid.
In this case error may occur in both ipc thread and
schedule thread. To update err status simple, schedule
thread will only return error to ipc thread which will
maintain error status and reply to host.
Signed-off-by: Rander Wang <rander.wang@intel.com>
(1) IPC4 does not need mixer workaround.
(2) trigger pipeline in release state for pause-running case
Signed-off-by: Rander Wang <rander.wang@intel.com>