Commit Graph

7763 Commits

Author SHA1 Message Date
Ranjani Sridharan cb80023b22 topology2: fix build issues with no command line definitions
If there are no command line definitions, the build fails because the
4th argument to the add_alsatplg2_command macro is NULL.

Fix this by using named arguments for the macro and checking for the
optional argument for command line definitions.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-01-24 12:51:11 +00:00
Seppo Ingalsuo 95d8e941cf Testbench: Enable verbose traces
Some useful algorithms internal traces are output with debug traces.
This patch enables the verbose trace (CONFIG_TRACEV) for library build.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-01-24 11:23:21 +00:00
Seppo Ingalsuo e0ec195bcd Test: Audio: Fix stdnotch_get() function issue in Matlab
The path append of current directory (.) is not correct for
the signal processing package function iirnotch. The issue does
not happen with Octave since it has pei_tseng_notch().

The standard notch function is used in all THD+N tests so this
issue has caused fail of nearly all tests with Matlab.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-01-24 11:23:21 +00:00
Seppo Ingalsuo 30012d1454 Tools: Testbench: Support for different in/out channels count and other
This patch adds to command line switch -n for output channels count.
Existing -c is for in channels, new -n is for out channels count. Out
channels count is same as input if -n is not present. Switch -q is
added to quiet the trace output if it is not needed.

The Matlab language test scripts for components are updated to use
the -t config.sh interface of comp_run.sh. It allows more flexible
control of input and output streams.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-01-24 11:23:21 +00:00
Marc Herbert 0031664403 xtensa-build-all.sh: distinguish default/working platform and WIP
The -a option was recently broken by the addition of platform(s) that
don't have a toolchain available in the Docker image. Every platform can
be built by someone but no one can built -a(ll) platforms right now.

Add a new platform array to make the distinction between default
platforms built by the -a option versus work in progress.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-01-21 17:17:09 +00:00
Marc Herbert da1d1b041e xtensa-build-all.sh: rn: remove odd ARCH=xtensa definition
No one else has it.

Gets rid of the only shellcheck warning.

Fixes commit 7453e3d571 ("scripts: add renoir support")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-01-21 17:17:09 +00:00
Marc Herbert 7f45cb7bde .github: add imx8ulp gcc build to pull request tests
Fixes commit b40a2f7d36 ("docker: Add support for i.MX8ULP platform")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-01-21 17:17:09 +00:00
Marc Herbert 62d57d699b .github: reformat platform list for qemu-boot-test
More future-proof. No functional change

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-01-21 17:17:09 +00:00
Bard Liao 7f1572f4d9 topology2: cavs-nocodec: add audio format tokens
Add audio format tokens for I2S + DMIC.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2022-01-21 17:15:38 +00:00
Guennadi Liakhovetski 92f6db8ba9 zephyr: add support for IPC4
Select correct IPC implementation depending on the selected version.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-01-21 17:05:58 +00:00
Rander Wang db4d081040 ipc4: fix a regression issue on windows
The issue was found when testing 44.1khz stream on windows.
We should use input format of copier to set source buffer fmt,
not output fmt which may be dai output fmt and different from
source fmt.

According to spec, copier only support one input source and
four output sinks, so we don't need to check source list.

Tested on windows.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-01-21 16:57:38 +00:00
Adrian Bonislawski 34be14f644 ipc4: add Aria module support for ipc4
Automatic Regressive Input Amplifier Module
ARIA applies variable gain into incoming signal.
Applied gain is in range <1, 2 power attenuation>
Currently ARIA introduces gain transition and
algorithmic latency equal to 1 ms.
At initial release only hifi3 version is supported

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2022-01-21 16:56:58 +00:00
Ranjani Sridharan ddcdadb68f 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 12:55:38 +00:00
Ranjani Sridharan bfd5e61768 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 12:55:38 +00:00
Ranjani Sridharan 692299f2a6 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 12:55:38 +00:00
Ranjani Sridharan 5c3262a6a9 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 12:55:38 +00:00
Ranjani Sridharan eaaea60b65 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 12:55:38 +00:00
Ranjani Sridharan 8effa4ff3d 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 12:55:38 +00:00
Ranjani Sridharan c75d794913 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 12:55:38 +00:00
Ranjani Sridharan 2874b17a8b codec_adapter: waves: remove included header
waves.h has been deleted

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-01-21 12:55:38 +00:00
Ranjani Sridharan 7475929bc7 codec_adapter: dts: remove included header
dts.h has been deleted.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-01-21 12:55:38 +00:00
Ranjani Sridharan 993037ceb1 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 12:55:38 +00:00
Ranjani Sridharan 2dba175d61 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 12:55:38 +00:00
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