Add a new field to struct cadence_codec_data to save the API ID and
set its default value to be that associated with CADENCE_CODEC_WRAPPER_ID.
If needed, this can be overwritten from userspace at runtime.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
During reset, it is only important to free the memory associated with
the runtime params, so that they can be reallocated during prepare. So
move the allocation of the cadence_codec_data to use rballoc, so that
module_free_all_memory() doesn't end up freeing it. It will be freed
during cadence_free() when the device is freed.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Remove the setup config info from all initial config data in the
codec_adapter kcontrol's. This is no longer needed.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Remove the setup cfg from struct module_datai and have one just common
config. The config sent during module init should be saved a set up config
within the module's private data if the module needs it. Modify the
cadence_codec_data and the waves_codec_data to add the setup config to
save the initial config that can be applied during prepare when it is
invoked during the reset.
Remove enum module_cfg_type and struct ca_config as they are no longer
needed.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
If module_prepare() fails, the pipeline will be reset resulting in
module_reset() getting invoked. Just return if the state is <
MODULE_IDLE which indicates that the module was never prepared.
Also, in this case, local_buff is never allocated. So, check if it is
NULL before zeroing it out to avoid DSP panic.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Remove the module ID fields from struct processing_module and struct
ca_config. The comp ID is unique across all components in topology and
can be reused to identify the modules as well.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add a new field to struct cadence_codec_data to save the API ID and
set its default value to be that associated with CADENCE_CODEC_WRAPPER_ID.
If needed, this can be overwritten from userspace at runtime.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
It looks like a change to the ipc creation was landed in parallel to the
hotword wrapper as the hotword wrapper is authored before, but comes after
in the relation chain. Solution is to update the hotword lib wrapper.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
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>