Commit Graph

7640 Commits

Author SHA1 Message Date
Ranjani Sridharan 6a259b9a08 codec_adapter: cadence: set default API ID
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>
2022-01-21 12:55:38 +00:00
Chao Song daf985b082 configs: add ipc4 override config for tgl
The override config can be used to build tgl
and tgl-h firmware with IPC4 configuration.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2022-01-21 12:48:17 +00:00
Liam Girdwood 58c6fc32ea Revert "codec_adapter: cadence: set default API ID"
This reverts commit a2429fd3e9.
2022-01-21 12:03:53 +00:00
Liam Girdwood b54ec4bdbf Revert "module_interface: remove module_id"
This reverts commit 0f6e3b2ed4.
2022-01-21 12:03:53 +00:00
Liam Girdwood 975ea52ae1 Revert "codec_adapter: Remove redundant setting of avail to true"
This reverts commit 8198c33b95.
2022-01-21 12:03:53 +00:00
Liam Girdwood bdc6f4838c Revert "codec_adapter: dts: remove included header"
This reverts commit 83870122b7.
2022-01-21 12:03:53 +00:00
Liam Girdwood 6ee90bb8b9 Revert "codec_adapter: waves: remove included header"
This reverts commit ce67a76c51.
2022-01-21 12:03:53 +00:00
Liam Girdwood 0c69209737 Revert "codec_adapter: remove printing the error with -ENOSPC"
This reverts commit b4993016e6.
2022-01-21 12:03:53 +00:00
Liam Girdwood dcf3416445 Revert "codec_adapter: fix panic during reset"
This reverts commit fc3e4b32b9.
2022-01-21 12:03:53 +00:00
Liam Girdwood 26436b4c61 Revert "codec_adapter: remove macro CODEC_INTERFACE_ID()"
This reverts commit caff7a3726.
2022-01-21 12:03:53 +00:00
Liam Girdwood 1635fa4723 Revert "codec_adapter: cadece: remove unnecessary goto's and fix memory leaks"
This reverts commit 07f84ee0bf.
2022-01-21 12:03:53 +00:00
Liam Girdwood f28ec17402 Revert "codec_adapter: Remove setup config from module data"
This reverts commit 5763c74bf4.
2022-01-21 12:03:53 +00:00
Liam Girdwood 0df9dc1398 Revert "topology1: remove setup config info from all codec_adapter topologies"
This reverts commit 5062a8bf79.
2022-01-21 12:03:53 +00:00
Liam Girdwood 82fcef457d Revert "codec_adapter: cadence: Do not free codec data during reset"
This reverts commit a60df96c7d.
2022-01-21 12:03:53 +00:00
Ranjani Sridharan a60df96c7d codec_adapter: cadence: Do not free codec data during reset
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>
2022-01-21 11:36:50 +00:00
Ranjani Sridharan 5062a8bf79 topology1: remove setup config info from all codec_adapter topologies
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>
2022-01-21 11:36:50 +00:00
Ranjani Sridharan 5763c74bf4 codec_adapter: Remove setup config from module data
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>
2022-01-21 11:36:50 +00:00
Ranjani Sridharan 07f84ee0bf codec_adapter: cadece: remove unnecessary goto's and fix memory leaks
Just return the appropriate value right away when possible and fix
memory leaks.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-01-21 11:36:50 +00:00
Ranjani Sridharan caff7a3726 codec_adapter: remove macro CODEC_INTERFACE_ID()
Interface ID has been replaced with UUID. So no need for the unused
macro.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-01-21 11:36:50 +00:00
Ranjani Sridharan fc3e4b32b9 codec_adapter: fix panic during reset
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>
2022-01-21 11:36:50 +00:00
Ranjani Sridharan b4993016e6 codec_adapter: remove printing the error with -ENOSPC
The error message should be skipped for -ENOSPC in module_process().

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-01-21 11:36:50 +00:00
Ranjani Sridharan ce67a76c51 codec_adapter: waves: remove included header
waves.h has been deleted

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-01-21 11:36:50 +00:00
Ranjani Sridharan 83870122b7 codec_adapter: dts: remove included header
dts.h has been deleted.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-01-21 11:36:50 +00:00
Ranjani Sridharan 8198c33b95 codec_adapter: Remove redundant setting of avail to true
module_load_config() already sets the config avail flag to true.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-01-21 11:36:50 +00:00
Ranjani Sridharan 0f6e3b2ed4 module_interface: remove module_id
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>
2022-01-21 11:36:50 +00:00
Ranjani Sridharan a2429fd3e9 codec_adapter: cadence: set default API ID
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>
2022-01-21 11:36:50 +00:00
Curtis Malainey e1457b4071 ghd: update creation process
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>
2022-01-21 11:29:33 +00:00
Guennadi Liakhovetski 77a08b6861 ipc4: simplify logic in ipc4_trigger_chain_dma()
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>
2022-01-20 18:07:57 +00:00
Curtis Malainey 0b10a1e526 ipc4: initialize return var
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>
2022-01-20 17:41:35 +00:00
Curtis Malainey ccab5cd8a3 ipc: fix signed int overflow in macro
shifting anything into the sign bit location is technically undefined,
add unsigned marker to satisfy cppcheck

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2022-01-20 17:41:35 +00:00
Curtis Malainey 773bfc0aed copier: fix unlikely uninitialized use
cppcheck is complaining if the foreach loop doesn't run what would
happen.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2022-01-20 17:41:35 +00:00
Marc Herbert a053e04d7e trace: add Zephyr git version to the initial FW ABI banner
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>
2022-01-20 17:26:26 +00:00
Guennadi Liakhovetski 09c69b7607 platform/zephyr: remove unused macros
HEAP_LP_BUFFER_* macros aren't used in Zephyr builds, remove them.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-01-20 17:05:10 +00:00
Guennadi Liakhovetski 339e5ac217 platform/zephyr: enable power management for non-cAVS platforms
This enables hardware initialisation and power management paths for
non-cAVS platforms with Zephyr.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-01-20 17:05:10 +00:00
Guennadi Liakhovetski 079ce95b98 zephyr: (cosmetic) make a needlessly global variable static
_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>
2022-01-20 17:05:10 +00:00
Guennadi Liakhovetski 98db7915b1 zephyr: trace: fix builds with CONFIG_TRACE=n
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>
2022-01-20 17:05:10 +00:00
Guennadi Liakhovetski 1c6ae93d92 platform/zephyr: use an OS call for time stamps
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>
2022-01-20 17:05:10 +00:00
Guennadi Liakhovetski abc1673d59 memory: include memory.h explicitly, where needed
Several files use symbols, defined in memory.h, add explicit includes
for it.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-01-20 17:05:10 +00:00
aeloglix 1165dae2b5 ipc4: Move the 'dai_index' 4 bits to the right
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>
2022-01-18 17:00:01 +00:00
Brent Lu 113a49d253 topology: sof-adl-rt5682: add new topology
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>
2022-01-18 16:59:35 +00:00
YC Hung c08784b674 platform: mt8195: fix afe-memif sinegen log error
Fix log to Show sgen_id in mt8195_afe_sinegen_enable function.

Signed-off-by: YC Hung <yc.hung@mediatek.com>
2022-01-18 16:56:17 +00:00
Adrian Bonislawski 2c86a89098 ipc4: invalidate HOSTBOX for comp_new
This will allow to remove invalidate calls for each component init

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2022-01-18 16:55:57 +00:00
Adrian Bonislawski 6ecfdbf810 ipc4: report correct value for hw core count
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>
2022-01-18 16:01:02 +00:00
Lionel Koenig 07a612258e topology: Ensure PCM for detect pipeline
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>
2022-01-17 14:41:04 +01:00
Lionel Koenig 7162534498 topology: define PIPELINE_FORMAT from DAI_ADD
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>
2022-01-17 14:41:04 +01:00
Adrian Bonislawski 83373eb970 ipc4: report dsp properties to host driver
Host driver checks dsp properties

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2022-01-14 22:22:58 +00:00
Daniel Baluta e6f4930524 drivers: imx: sdma: Fix state in sdma_release
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>
2022-01-14 16:59:42 +00:00
Daniel Baluta 78d3afb0eb drivers: sai: Start SAI on RELEASE
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>
2022-01-14 16:59:42 +00:00
Marc Herbert 2ebf92f279 trace: new macro to de-duplicate the common part of the FW ABI banner
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>
2022-01-14 16:59:01 +00:00
Marc Herbert 5de4a09756 version.cmake: include scripts/ and zephyr/ in the .ldc dictionary hash
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>
2022-01-14 16:59:01 +00:00