Commit Graph

8887 Commits

Author SHA1 Message Date
Guennadi Liakhovetski a9c5a1bb78 module_adapter: mark data buffers as cached
Module adapter code uses struct input_stream_buffer and
struct output_stream_buffer to pass generic data to individual
modules for processing. Further, modules implementing the
.simple_copy option pass a cached pointer to struct audio_stream
which is already acquired at the generic code level. That means,
that in those cases .data contains cached memory aliases. This
patch marks the .data pointer as cached.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-10-24 11:49:23 +01:00
Marc Herbert adce544450 xtensa-build-zephyr.py: simplify installation, prepare for more files
Simplify the final installation code to prepare for installing more
files. Zero functional change.

Notably perform the cavs naming trick inside the build directory first
which allows using a destination directory instead of a destination file.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-10-21 20:02:11 +03:00
Marc Herbert ab7c1a2c7b xtensa-build-zephyr.py: de-interleave signing and installation code
Very minor, zero-change re-ordering to make the next commit easier to
review. Fixes commit 762f63bf8b ("xtensa-build-zephyr: add option to
build FW in cavs naming style")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-10-21 20:02:11 +03:00
Marc Herbert a42592eda1 xtensa-build-zephyr.py: don't make "." a special case in tree listing
Small simplification.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-10-21 20:02:11 +03:00
Marc Herbert 0497212dca xtensa-build-zephyr.py: sort glob(**/*) list used for tree display
`pathlib.glob()` (and filesystems in general) provide no ordering
guarantee, which is likely why every glob() example in
https://docs.python.org/3/library/pathlib.html#pathlib.Path.glob
is sorted(). Follow these examples and use `sorted()`.

Fix error handling to run _before_ the `list index out of range`
exception hits. Also make it fatal now because there's no more any good
reason for this to fail.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-10-21 20:02:11 +03:00
Marc Herbert 6cba64d2cb xtensa-build-zephyr.py: fix a few minor pylint warnings
Declare globals at the top level.
Stop shadowing globals.
Replace `== or ==` with `in [ ]`.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-10-21 20:02:11 +03:00
Marc Herbert b5abf6c8f3 xtensa-build-zephyr: disable pylint bad-whitespace, module-doc, global
Also re-organize the header.

Absolutely zero functional change.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-10-21 20:02:11 +03:00
Ranjani Sridharan 9200231e0e topology2: cavs-passthrough-hdmi: remove the option for HDA passthrough only
cavs-passthrough-hda.conf doesn't exist anymore.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-10-21 15:54:58 +01:00
Ranjani Sridharan c3a6e4d681 topology2: cavs-mixin-mixout-hda: Don't use mixin/mixout for capture
Just use passthrough instead.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-10-21 15:54:58 +01:00
Joe.Cheng ecb03cbc73 config:renoir:enable EQ IIR in DTS config
Enable EQ IIR

Signed-off-by: Joe.Cheng <joe.cheng@xperi.com>
2022-10-21 15:50:48 +01:00
Ranjani Sridharan fcec2f78b9 ipc4: (cosmetic) Fix typos
Purely cosmetic. No change in code.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-10-21 16:34:01 +03:00
Seppo Ingalsuo 2841dc93c2 [SKIP CI] Tools: Test: Audio: Fix standard low-pass help text
Fix a confusing mistake high-pass -> low_pass and typo. It's
only a user help text change for "help stdlpf".

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-10-21 12:24:25 +01:00
Kai Vehmanen c7674e85e9 audio: buffer: fix crash with IPC4 build and DBG log level
A null dereference is hit when comp_update_buffer_produce() or
comp_update_buffer_consume() is called with either a NULL
buffer->sink or buffer->source. This condition happens
regularly in IPC4 builds.

Issue is limited to SOF builds with logging at DEBUG level.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-10-21 12:14:41 +01:00
Ming Jen Tai d77331fce1 rtnr: Set 5ms period for RTNR on MT8195
With the  release of RTNR version 20220728,
period for capturing pipeline requires at least 5ms.

This commit set 5ms period for RTNR in
MT8195 topology.

Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
2022-10-21 12:10:07 +01:00
Ranjani Sridharan 73a413a38f ipc4_overlay: tgl/tgl-h: Add CONFIG_COMP_VOLUME_WINDOWS_FADE
Set the CONFIG_COMP_VOLUME_WINDOWS_FADE to use the windows fadr ramp
function in the gain module.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-10-20 17:57:55 +03:00
Ranjani Sridharan 1ea364620f topology2: gain: Fix curve_type
log and linear are not supported with IPC4. Use no_fade and fade
instead and set the default to fade.

This should fix the following error seen with volume prepare():
volume: comp:9 0x60003 volume_prepare(): invalid cd->ramp_func

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-10-20 17:57:55 +03:00
Kwasowiec, Fabiola 8083eb0156 copier: set conversion function for all pins
conversion function and out_fmt
is set only for first pin

Signed-off-by: "Kwasowiec, Fabiola" <fabiola.kwasowiec@intel.com>
2022-10-20 11:09:53 +02:00
Kwasowiec, Fabiola d102d098e5 mux: implement ipc4 support
mux module does not support ipc4

Signed-off-by: "Kwasowiec, Fabiola" <fabiola.kwasowiec@intel.com>
2022-10-20 11:09:53 +02:00
Kwasowiec, Fabiola cd2c44389f west.yml: upgrade rimage to 3ee717eebc
upgrade rimage to
3ee717eebc

3ee717eebc probe: mtl.toml invaliv probe type
1f4a36e21f mux: fix module type
dcfd11bc4d mux: add mux cfg to list of modules
d957e0368b rimage: make ace15 signing to support openssl3
a1b6e6db33 manifest: add fw_ver_micro to manifest
fb28357912 config: mtl: add probe module

Signed-off-by: Kwasowiec, Fabiola <fabiola.kwasowiec@intel.com>
2022-10-20 11:09:53 +02:00
Seppo Ingalsuo ab8c150b93 [SKIP CI] Tools: Test: Fix upper band limit in THD+N SRC test
This patch fixes the upper frequency for distortion plus noise
measurement. The min(fs1, fs2) leaves part of upper band unmeasured
and gives a too good looking THD+N performance figure when output
rate is higher than input rate. The proper way is to measure the
(near) full output rate bandwidth.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-10-19 16:20:43 +01:00
Seppo Ingalsuo f3fee13471 Tools: Test: Fix false success if no processing happened
The test is treated passed if there were no failed cases. The fix in
this patch is to force one failed case if both failed and passed counts
are zeros. Then the upper level test scripts/host-testbench.sh reports
correctly the test fail.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-10-19 14:37:00 +01:00
Marc Herbert 6adf9acbad .github/sparse: add MTL
Add the wrong compiler currently expected by the Zephyr build system,
very easy one-line change later, get sparse results for MTL NOW!

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-10-19 16:36:41 +03:00
Daniel Baluta 1893ea34d3 module_adapter: Fix compile time error
After commit e101aadcd1 ("module_adapter: drop the comp_get_module_data() macro")
API prototype was changed to accept a `processing_module` instead of a
`comp_dev` but `dev` was still used inside passthrough_codec_free which
generates a compile time error:

src/audio/module_adapter/module/passthrough.c:110:12: error: 'dev'
undeclared (first use in this function)
  comp_info(dev, "passthrough_codec_free()");

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2022-10-19 15:25:08 +03:00
Serhiy Katsyuba 5c6bac459f ipc4: fix for mixout not working after reset
Fixes a bug in mixout_reset(): mixin pointers in mixed data info
should not be cleared on reset. They should only be set on bind
and cleared on unbind.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2022-10-19 13:53:59 +03:00
Kai Vehmanen b683d96dfe library_manager: fix compiler warnings with gcc 12.1.0
Fix one local variable that may be uninitialized and string formatting
for buffer addresses (uintptr_t is long unsigned type).

Tested with gcc 12.1.0 (Zephyr SDK 0.15.0).

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-10-18 19:49:16 -05:00
Adrian Warecki 449b25a865 mtl: memory: Get memory windows configuration from DT
The sizes and locations of the memory windows are taken
from the device tree.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2022-10-18 16:10:37 +03:00
Adrian Warecki 447b365b62 mtl: board: Update mtl board configuration
Necessary configuration options of the mtl board
have been enabled.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Signed-off-by: Konrad Leszczynski <konrad.leszczynski@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Signed-off-by: Rafal Redzimski <rafal.f.redzimski@intel.com>
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2022-10-18 16:10:37 +03:00
Adrian Warecki 02152c3dcf ace: dma: Add temporary dma ops to allow get attributes
The attributes of the dma controllers must be moved
to the zephyr. Until then, we will use a own copy of the
get_attribute function from the alh and dw_dma drivers.
Thanks to this, we can completely disable it building
in the configuration.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2022-10-18 16:10:37 +03:00
Adrian Warecki ac33ac128b ace: dma: Add dma configuration
Added code containing configuration of the dma channels.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Signed-off-by: Konrad Leszczynski <konrad.leszczynski@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Signed-off-by: Rafal Redzimski <rafal.f.redzimski@intel.com>
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2022-10-18 16:10:37 +03:00
Adrian Warecki c47a0bf6ff ace: clock: Update clock definitions
Added code with clock definitions

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Signed-off-by: Konrad Leszczynski <konrad.leszczynski@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Signed-off-by: Rafal Redzimski <rafal.f.redzimski@intel.com>
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2022-10-18 16:10:37 +03:00
Tomasz Lissowski 8c60a56fef ipc4: add mixing-based processing in channel selector
Add mixing-based processing in channel selector to implement
capabilities resulting from IPC4 configuration. Enable flexible
channels count (from 1 to 8) independently for input and output.

Signed-off-by: Tomasz Lissowski <tomasz.lissowski@intel.com>
2022-10-18 14:09:48 +03:00
Baofeng Tian 47c52ccfe4 Component: move comp_copy from header file to source file an
On sof zephyr ipc4 build, component performance profiling logs can't
be enabled due to current xcc compiler does not support inline
logging in header file, logs as below:

  log_level undeclared (first use in this function)
  log_current_const_data undeclared (first use in this function)

Move comp_copy to component.c can resolve this limitation.
However, this brings another cmocka issue for mixer unit test,
this patch also fixed cmocka mixer unit test issue.

BugLink: https://github.com/zephyrproject-rtos/zephyr/issues/43786
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2022-10-18 13:42:53 +03:00
Baofeng Tian 177b61457f performance: perf cnt bugfix for profiling
Current hw cycle is based on 38400000, and perf cnt module did not consider
the clock wrap case, i.e the later cycle maybe small than the previous one.
so add code to handle this situation.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2022-10-18 13:41:37 +03:00
Baofeng Tian 32129b9bf4 component: add frames and period info to component performance profiling
Frames and period are key information for time calculation, with these
and sample rate, it would be easy to get current component consumed data
in time domain. CI script also easy to get these information for
further calculation.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2022-10-18 13:40:03 +03:00
Balakishorepati a28dde6702 drivers:amd: fix acp clock based on usecases.
Switch between ACLK and internal clock based on
active usecases and clock requirement.

Signed-off-by: Balakishorepati <balaKishore.pati@amd.com>
2022-10-18 11:06:32 +01:00
Kai Vehmanen 838d001390 pipeline: add pipeline and component ids to pipe_foo() output for Zephyr
The component and pipeline identifiers were direct part of the older
SOF dictionary format. This information was added directly to encoded
output and was not part of the log message. When using Zephyr logging
subsystem, this type of audio specific information has be to put
as part of the log messages like any other log content.

Modify pipe_{err,warn,info,dbg} macros to add pipeline and component
identifiers to all printed log messages.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-10-18 09:01:23 +03:00
Kai Vehmanen bae8457c78 buffer: add pipeline and component ids to buf_foo() output for Zephyr
The component and pipeline identifiers were direct part of the older
SOF dictionary format. This information was added directly to encoded
output and was not part of the log message. When using Zephyr logging
subsystem, this type of audio specific information has be to put
as part of the log messages like any other log content.

Modify buf_{err,warn,info,dbg} macros to add buffer pipeline
and buffer-id identifiers to all printed log messages.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-10-18 09:01:23 +03:00
Kai Vehmanen cef9544f06 component: add pipeline and component ids to comp_foo() output for Zephyr
The component and pipeline identifiers were direct part of the older
SOF dictionary format. This information was added directly to encoded
output and was not part of the log message. When using Zephyr logging
subsystem, this type of audio specific information has be to put
as part of the log messages like any other log content.

Modify comp_{err,warn,info,dbg} macros to add component pipeline
and component identifiers to all printed log messages.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-10-18 09:01:23 +03:00
Daniel Baluta de739dd89c zephyr: Fix cycle counting on i.MX
On i.MX8 k_cycle_get_64 always returns 0 so use sof_cycle_get_64
instead.

There is no better solution to support 64bit cycle counting for i.MX
and will have to stick with this implementation.

Fixes: c3c94fc515 ("header: rtos: use rtos specific version of wait.h")
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2022-10-18 08:57:39 +03:00
Ranjani Sridharan 51501bfcef ipc4: handler: skip setting state when pipeline is already active
No need to proceed if the pipeline is already active.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-10-18 08:55:36 +03:00
Jaska Uimonen 251ee59b2e ipc: rename ace ipc zephyr stubb as ipc-zephyr.c
Rename ace ipc zephyr stubb as ipc-zephyr.c as it is a generic interface
towards zephyr cavs/ace ipc drivers. Change existing zephyr ace/mtl
makefile reference to it and start using it in cavs/tgl ipc4 zephyr
native drivers builds. Tgl ipc3 builds will still use sof cavs ipc
driver.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2022-10-17 17:01:09 +03:00
Marc Herbert 5a30534aab sof_ri_info: add platform aliases to DSP_MEM_SPACE_EXT
Fixes this error:
```
No platform found in name "sof-rpl.ri"; unknown memory layout.
```

... and shows the Memory Layout.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-10-17 16:38:38 +03:00
Kai Vehmanen c807d6844b Revert "topology2: nocodec: add volume and mixer support"
This reverts commit 5594ad3512.
2022-10-14 18:23:01 +03:00
Kai Vehmanen f07f5ed823 Revert "topology2: fix multi-stream test issue in ci"
This reverts commit 321bfde913.
2022-10-14 18:23:01 +03:00
Kai Vehmanen fb07f450d7 ipc4: dai: reduce get_llp_reg_info log verbosity
The "get_llp_reg_info(): gpdma id 32 out of array bounds."
message is hit constantly with current mainline topologies with
no apparent impact to functinality.

The log is printed at a very high rate, which causes CPU and SRAM
traffic pressure that affects test execution.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-10-14 15:58:24 +03:00
Baofeng Tian 33ea9ea5ab profiling task: modify task profiling with performance counter macro
This patch is used to make sure profiling code only can be run
with performance profiling build, and unify all performance profiling
with same format and usage.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2022-10-14 12:08:03 +03:00
Rander Wang 321bfde913 topology2: fix multi-stream test issue in ci
Duplicated dai index results to module initialization
faiure in multi-stream test. Dai 2 should be used by
stream nocodec-2.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-10-14 08:10:25 +03:00
Marc Herbert 8fd351ea9a west.yml: add warning to keep git submodules in sync
Trying avoid out-of-sync situations like commit a3b3c525d1 ("west:
update to newer rimage baseline").

Also explain why sof cannot be cloned as "sof2"

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-10-13 10:47:49 -07:00
Marc Herbert 6fc6940e1c rimage: update submodule to 542924d70c, back in sync with west.yml
Fixes commit a3b3c525d1 ("west: update to newer rimage baseline")

542924d70c config: tgl-h-cavs: add probe module
5b076f1738 config: tgl-cavs: add probe module
6b4848e25d mtl: Add UPDWMIX module to the manifest
d50aefcb63 manifest max size for loadable modules
d94cfc9cc6 mtl: add MicSel support
5504179137 Add lib_code module type.
12bb327122 toml: add tgl-h config file for IPC4
452847ddc0 mtl: Add SRC module to the manifest

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-10-13 10:47:49 -07:00
Kai Vehmanen 5702939836 west.yml: upgrade Zephyr to ed661a6c6909
Upgrade Zephyr from 0956647aaf6bd2b1e840adcc86db503f274d84a9 to
ed661a6c6909b338035b026cfc101ddda65ab8eb (1020 commits, including
441 since v3.2.0 tag).

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-10-13 14:55:26 +03:00