Commit Graph

8911 Commits

Author SHA1 Message Date
Guennadi Liakhovetski 6f38baa1a0 probe: don't store pointers to configuration data
probe configuration data, passed to probe_point_add() cannot be used
outside of the scope of the function, therefore storing pointers to
it for later use is invalid. The pointer is only used in the
notification handler to extract the buffer ID. Use the ID from the
probes' persistent data instead.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-10-26 15:56:49 +01:00
Tomasz Leman ab3ad0151a ace: cpu: cpu management for mtl
This patch adds implementation of core power state changing functions
for meteorlake. Code uses zephyr kernel api provided by power manager.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2022-10-26 13:27:25 +01:00
Tomasz Leman b6a4bb682c platform: Kconfig: add timeout for disabling secondary core
Count of loops used when waiting for secondary core to enter OFF state
in transition to D3 state.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2022-10-26 13:27:25 +01:00
Tomasz Leman e973f5245e zephyr: cpu: moving outside of the wrapper
Moving core management code out of the wrapper for solutions builded
with zephyr.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2022-10-26 13:27:25 +01:00
Andrula Song 96506488c8 Audio: EQ-FIR: fix the shift round bugs
Fix the shift round bugs caused by not suitable
xtensa intrinsics.

Signed-off-by: Andrula Song <xiaoyuan.song@intel.com>
2022-10-26 13:26:21 +01:00
Rander Wang 1447d43aac ipc4: fw_reg: add more description for fw_reg
Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-10-25 13:21:58 +01:00
Rander Wang f897921490 ipc4: refine dsp core comments
Found by Linux patch review.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-10-25 13:21:58 +01:00
Guennadi Liakhovetski e961e442ba copier: (cosmetic) fix alignment
Fix two cases of misalignment.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-10-25 10:34:08 +01:00
Guennadi Liakhovetski 54455d592f ipc4: (cosmetic) convert several if-else chains to switch-case
Where applicable, switch-case provides better readability than
chained if-else, replace several such cases.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-10-25 10:34:08 +01:00
Ming Jen Tai 4a438b962b rtnr: refine set/get component data procedure
This commit refines the following procedures to
make it more stable on different platforms.

1.  The initial data( not config ) defined in the topology
is empty. On some platforms rtnr_get_comp_data
might be called with the size equals 0 during
initialization. We only do the memcpy_s when the size
is valid.

2. There are 3 control widgets in RTNR topology. During
initialization, the initial data could be received via IPC
in the form of config+data+switch or config only. In
either case we now just copy the preceding portion
of the data since it has the required config.

Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
2022-10-25 10:32:51 +01:00
Ievgen Ganakov 7029fb7b01 detect_test: add ipc4 support
Add ipc4 support for KD module keeping ipc3
backward compatibility. Add ipc4 model blob
handler based on large_config_set architecture

Signed-off-by: Ievgen Ganakov <ievgen.ganakov@intel.com>
2022-10-25 09:11:13 +02:00
Marc Herbert 3a9413eebd xtensa-build-zephyr.py: restore lost reproducible .ri checksum
At the end of the build, parse the .ri file and print a reproducible
checksum of the its content.

This feature was in xtensa-build-zephyr.sh but never made it to the .py
conversion. It was lost when the .sh file was deleted in commit
ef028f634a ("Removed obsolete xtensa-build-zephyr.sh")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-10-24 16:15:12 +01:00
Marc Herbert 367df306b6 sof_ri_info: minor BinReader logging fix to support pathlib
Switch to an f-string which automatically converts the argument to a
string.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-10-24 16:15:12 +01:00
Ranjani Sridharan 06226d00b0 ipc4: handler: Don't reset pipeline before STOP trigger
When setting the SOF_IPC4_PIPELINE_STATE_RESET for a pipeline,
pipeline_trigger() gets invoked first but the actual STOP trigger
execution could get delayed until the next invocation of the pipeline
task. In this case, pipeline_reset() must be invoked only after the STOP
trigger has completed. Fix this by calling pipeline_reset() in
set_pipeline_state() only if the trigger is not delayed. Also, add the
call to pipeline_reset() in pipeline_task_cmd() after the successful
completion of the STOP trigger.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-10-24 18:07:01 +03:00
Ranjani Sridharan 60ac9b714f pipeline-graph: remove assert in pipeline_new()
Log the memcpy_s() failure and return NULL so that the IPC won't time
out.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-10-24 15:23:54 +03:00
Marc Herbert de90f55657 .github: extract standalone testbench.yml from Main Actions
Divide and Conquer.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-10-24 12:20:11 +01:00
MARUTHI MACHANI 07d401af9d drivers:amd:four channel dmic configurations
configurations to support dmic for four channels for amd
platforms.

Signed-off-by: MARUTHI MACHANI <maruthi.machani@amd.com>
2022-10-24 12:16:29 +01:00
MARUTHI MACHANI 2a8fd7d206 platform:amd:support for fence register change
support for IRAM fence register change.

Signed-off-by: MARUTHI MACHANI <maruthi.machani@amd.com>
2022-10-24 12:16:29 +01:00
MARUTHI MACHANI 252e7e7559 topology1: support for dmic with 4 channels
Topology support to configure dmic with
four channels for amd platforms.

Signed-off-by: MARUTHI MACHANI <maruthi.machani@amd.com>
2022-10-24 12:16:29 +01:00
Ranjani Sridharan 337bd8ea72 ipc4: handler: make error message more informative
<err> ipc: ipc4: 0 failed err 12
The above error isn't so informative.

Replace the target number with the actual IPC message names.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-10-24 12:15:34 +01:00
Marc Herbert ce28e09bd3 xtensa-build-zephyr.py: west update --depth 5 --narrow
Restore previous optimization. Can easily be undone with
git -C zephyr/ fetch --unshallow.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-10-24 12:10:45 +01:00
Marc Herbert 9a3a518644 xtensa-build-zephyr.py: pass -j option to west -> ninja
This is especially useful when compiling each C file requires a
network round-trip to a license server

Also stop overriding the ninja default when building rimage.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-10-24 12:10:45 +01:00
Piotr Kmiecik da5edbdf7d ace_v1x: host system time set and get
Base firmware functionality for setting and getting host system time.

Signed-off-by: Piotr Kmiecik <piotrx.kmiecik@intel.com>
2022-10-24 14:08:48 +03:00
Ranjani Sridharan 0b69384473 ipc4: handler: skip trigger if pipeline is already paused
This will avoid the pipeline walk and all the NOP's in each module
trigger when the pipeline is already paused.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-10-24 14:03:33 +03:00
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