Commit Graph

9328 Commits

Author SHA1 Message Date
Brent Lu a6214d06b1 coredump-reader: set confirmation off
The undefined function may cause the debugger not able to run
properly. Print a "set confirm off" instruction to the beginning of
output file to solve this problem.

(xt-gdb) break _MemErrorVector
Breakpoint 1 at 0x9f180400
(xt-gdb) break _MemoryExceptionVector_text_start
Function "_MemoryExceptionVector_text_start" not defined.
Make breakpoint pending on future shared library load? (y or [n]) run
Please answer y or [n].
...

Signed-off-by: Brent Lu <brent.lu@intel.com>
2023-01-11 14:27:21 +00:00
Curtis Malainey 3b8ef3a791 owners: fix google audio component path
Forgot to update this after moving our components to a folder

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-01-11 13:26:14 +00:00
Kwasowiec, Fabiola 10e4e3f86b peakvol: select correct processing function
24/32 function is never selected due to the fact that only the size of
the container determines the selection of the function.
It should be selected based on valid_bit_depth.

Signed-off-by: Kwasowiec, Fabiola <fabiola.kwasowiec@intel.com>
2023-01-10 15:44:51 +00:00
Kai Vehmanen 90c14e56cb dai-zephyr: handle NULL case when calling dai_config_get()
As per interface documentation of dai_config_get(), the function
may return NULL if the device is not configured for the requested
direction. Handle this case explicitly.

Currently no upstream Zephyr driver returns NULL, but e.g. dmic
driver returns invalid configuration when dai_config_get() is
called with DAI_DIR_TX as direction.

Link: https://github.com/thesofproject/sof/issues/6896
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-01-09 19:24:01 +02:00
Krzysztof Frydryk e584701a01 ipc4: basefw: Handle kcps related IPCs
Handle register_kcps, resource_allocation_request for kcps,
power_state_info_get.

Signed-off-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com>
2023-01-09 15:12:13 +00:00
Krzysztof Frydryk 6b647412bf lib: Add mcps budget manager for cpu clock control
Initial implementation of MCPS budget manager.
FW can request/free MCPS usage on enabling certain FW elements. Caution
should be taken when processing on different cores, as kcps_budget_data
is uncache only. The manager will change clock source to match requested
MCPS consumption. Budget manager may interfere with manually setting
clock values!

Signed-off-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com>
2023-01-09 15:12:13 +00:00
Guennadi Liakhovetski c55d011d55 ipc: ipc4: protect memcpy_s() against human error
Add error checking to all calls to memcpy_s() in handler.c.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-09 14:35:39 +00:00
Guennadi Liakhovetski 12a553814b memcpy_s: fix the name of the last parameter
The last parameter of memcpy_s() isn't the size of the source buffer,
it's the actual number of bytes that should be copied.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-09 14:35:39 +00:00
Bard Liao 46a5d623f6 topology2: set sdw amp feedback pcm channel number
Assume an amplifier will provide 2 channels feedback.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-01-09 14:28:04 +00:00
Ranjani Sridharan f8bdef3baa module_adapter: produce/consume only from the active buffers
In the simple_copy case, source/sink modules that aren't active are
skipped when passing the buffers to the process callback. So,
produce/consume from only the active buffers that were passed to the
process callback as well.

Reported-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-01-06 16:58:47 +00:00
Ranjani Sridharan 33fa026524 module_adapter: Add flags to skip source/sink buffer invalidate/writeback
Some modules like the mixin/mixout do the invalidate/writebacks for the
source/sink buffers themselves. So, add flags in struct
processing_module to skip doing the same again in the module adapter
code.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-01-06 16:58:47 +00:00
Ranjani Sridharan fba35b13f4 mixin: Convert the component to use the module interface
Replace the comp_drv ops for the mixin component to use the
module_adapter interface. The trigger and get_attribute ops are replaced
with the module_adapter ops which do the exact same thing. The base_cfg
field from struct mixin_data is removed as it is replaced with the
base_cfg in struct module_config and all users have been updated.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-01-06 16:58:47 +00:00
Ranjani Sridharan 8c2dc1daaf module_adapter: Expand the simple_copy flag for multi sink case
Add a helper function to set up the input/output buffers for the 1:1 and
N:1 source:sink buffer configuration. Also, expand the
module_adapter_copy() function to support the simple_copy flag with the
single source and multiple sink buffer configuration.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-01-06 16:58:47 +00:00
Serhiy Katsyuba 05b903bc29 west.yml: Update Zephyr
Updates Zephyr to current top: e4fcb32451c587a3e4ba7f8bf3fc602b16f9652b.

This is to enable ALH multi-gateway feature. The required Zephyr commit
for Intel ADSP MTL is:
https://github.com/zephyrproject-rtos/zephyr/pull/53066

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-01-06 15:15:42 +00:00
Marc Herbert 75fa04de09 scripts/sudo-cwd.sh: don't try to copy missing sudoers.d/ permissions
Copying a file that does not exist obviously fails.

This bug was found when trying to switch from the current "Developer
Image" to the smaller "CI Image":
https://github.com/zephyrproject-rtos/docker-image/pkgs/container/zephyr-build

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-01-06 14:52:09 +00:00
Jaska Uimonen 39ff8cdbea west.yml: upgrade rimage to ba8534bb23
upgrade rimage to
ba8534bb23

ba8534bb23 Fix bitmap according to the IMR type
f3eef3cfb6 Fix IMR type parsing
bdba8259fe Add a command line option to set an Intel-specific PV bit
1c48208850 config: tgl-cavs: add smart amp test module config
082b6261c9 config: Add mt8188.toml

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2023-01-05 15:05:11 +02:00
Serhiy Katsyuba f32b6ac0fe ipc4: copier: Fix to avoid writing to buf above available free space
Fix only affects ALH multi-gateway feature (mux/demux routines). Adds
check for free space in buffer(s) before copying there.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-01-04 16:49:47 +00:00
Serhiy Katsyuba 3b65313560 Revert Audio: Copier: Add missing DMIC DAI index mapping to create_dai()
This reverts commit 8d166a432f.

This restores working DMIC functionality on Windows platform broken
by #6668.

ATTENTION: This will break DMIC1 (DMIC with DAI index 1) functionality
on Linux platform, DMIC0 should still work fine!
Non working DMIC1 should be fixed on Linux driver side, not this firmware.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-01-04 16:14:55 +00:00
Kai Vehmanen 1b02c92eff dai-zephyr: handle dai_config_get() errors properly
Add error check in dai_get_hw_params() for the case where
dai_config_get() returns an error.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-01-04 16:14:25 +00:00
Marc Herbert 2b85c2c358 scripts: fix check whether CMake configuration succeeded
To test whether CMake configuration can be skipped, look for either a
ninja.build or Makefile.

An existing build directory is NOT proof that CMake configuration
succeeded. When CMake configuration failed, trying to build again fails
with a super confusing "Makefile not found" error message.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-01-04 16:09:08 +00:00
Pierre-Louis Bossart 57e976ec38 topology1: add missing ADL-es8336 topologies.
The ADL integration was botched with missing topologies and errors in
topology names in the kernel.

Link: https://github.com/thesofproject/linux/issues/4111
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2023-01-04 15:58:07 +00:00
Adrian Bonislawski fef58eea86 dai-zephyr: check max block count supported by DMA
Check max block count supported by DMA using new Zephyr API
This will allow to prepare a correct config regardless of
specific DMA capabilities

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2023-01-04 16:40:51 +02:00
Marc Herbert 0658767b72 .github/sparse-zephyr: docker pull in a separate step
This saves a lot of scrolling in the next, most popular build step.

Missed in previous commit 52223eba2d (".github/zephyr: docker pull in
a separate step")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-01-04 13:51:19 +02:00
Baofeng Tian d8c2a42d80 sof debug and trace: change sof log level for some modules
Change some log level from info to dbg, those changed place are
not reporting errors, just information, so no risk and can be change
back when debugging.

From performance perspective, before and after:
Before:[11.86] <inf> ll_schedule: ll timer avg 2329, max 2887, overruns 0
after: [11.52] <inf> ll_schedule: ll timer avg 2226, max 2789, overruns 0

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-01-04 13:22:17 +02:00
Pin-chih Lin f42d015d59 topology: add more make cases for ADL
Adds cases {MAX09360A + RTNR + GOOGLE_RTC_AUDIO} and
{CS35L41 + WAVES}.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2023-01-03 14:03:05 -08:00
Brent Lu c06669e1e5 Audio: fix compile error for COMP_CROSSOVER
Linker fails to link iir_df2t() function when COMP_CROSSOVER is
enabled. Need to select MATH_IIR_DF2T in Kconfig to build the
iir_df2t() function as well.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2022-12-29 20:03:33 +02:00
Marc Herbert 8dd1fce6da .github/zephyr: fix uploads overwriting each other
From
https://github.com/actions/upload-artifact#uploading-to-the-same-artifact

> Warning: Be careful when uploading to the same artifact via multiple
> jobs as artifacts may become corrupted.

Fix bug where IPC3 and IPC4 builds were randomly overwriting each
other and the same bug with different Zephyr revisions.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-12-29 11:59:08 +02:00
Brent Lu 8a394bb526 topology: sof-jsl-rt5682: add sof-jsl-rt5682.tplg
This topology supports JSL boards which implement ALC5682I-VD/VS on
SSP0 port without speaker amplifier.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2022-12-27 12:39:12 +00:00
Marc Herbert e13c42e56f README.md: add link to discord.com/zephyr#sof channel
add link to discord.com/zephyr#sof channel

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-12-23 11:13:31 +00:00
Marc Herbert b40568b1ab README.md: fix Github status badges
- Remove Travis badge (about time!)
- Remove badge that shows the status of the last, random PR that was
  submitted.
- Add status of the new Daily Actions as recently implemented by Andrey.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-12-23 11:13:31 +00:00
Marc Herbert c6e7011e1e xtensa-build-zephyr.py: convert sof-info/ text files from CRLF to LF
Building on Windows generates CRLF text files. Standardize checksums to
LF files.

As usual, files in the build directory are left untouched.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-12-23 11:02:21 +00:00
Marc Herbert e75fcd1b45 xtensa-build-zephyr.py: search "strip" in string, not in pathlib
Fixes pylint warning "E1135 (unsupported-membership-test)". Not sure
this warning is valid because the code worked anyway but it does not
hurt.

Fixes commit bc394916d0 ("xtensa-build-zephyr.py: switch type of
InstFile() names to pathlib")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-12-23 11:02:21 +00:00
Marc Herbert 52223eba2d .github/zephyr: docker pull in a separate step
This saves a lot of scrolling in the next, most popular build step.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-12-23 11:00:38 +00:00
Jaska Uimonen 7be11aaf28 topology2: add auxiliary data classes for ssp
Auxiliary data can be added at the end of ssp data blob to enable for
example early clocks for certain platform. Add intel_ssp_aux_config.conf
that includes all possible aux data classes. These can be used inside
ssp hw_configs and will be embedded as tlv data after basic data blob.

Example of using mn_config class inside hw_config:

Object.Base.hw_config."SSP0_0" {
	id              0
	mclk_freq       38400000
	bclk_freq       256000
	tdm_slot_width  16
	format          "DSP_A"
	bclk            "codec_provider"
	fsync           "codec_provider"
	fsync_freq      16000

	Object.Base.mn_config."MN_0" {
		m_div   100
		n_div   200
	}
}

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2022-12-22 16:45:24 +00:00
Serhiy Katsyuba 3f26bf172d ipc4: copier: Add support for ALH multi-gateways
Adds ALH multi-gateway feature: functionality to mux/demux data from/into
multiple gateways.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2022-12-22 13:51:28 +00:00
Libin Yang 14474447d4 topology2: cavs-nocodec add wov support
Add the definitions of wov in cavs-nocodec.conf.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2022-12-22 09:58:44 +00:00
Libin Yang 2584500c35 topology2: add dmic-wov.conf
The dmic-wov.conf file implements the WOV feature. The connection is

DMIC ------> KPB ------------------------------> host_copier
              |                                    ^
              |                                    |
              |----> micsel ----> wov ------> virtual_widget

The DMIC and KPB is on DAI ppl.
The host_copier is on Host ppl.
The micsel, wov and virtual is on wov ppl.

The connection between host_copier and virtual_widget is a
virtual connection. The virtual_widget doesn't exist in the FW.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2022-12-22 09:58:44 +00:00
Libin Yang ef37adc288 topology2: add dai-kpb-be pipeline
dai-kpb-be pipeline contains a copier DAI component and a kpb component.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2022-12-22 09:58:44 +00:00
Libin Yang 62075a44e3 topology2: add wov-detect pipeline
wov-detect pipeline contains a micsel component, a wov component
and a virtual component. micsel component accepts 2 channels audio data and
output 1 channel audio data to the wov component. wov's keyword is a clap.
The virtual component is only used by the driver, and the FW will not
know that there is a virtual component in the pipeline. The virtual
component is used to connect the pipeline to a host copier pipeline
as per drivers requirement.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2022-12-22 09:58:44 +00:00
Libin Yang 884322bfb9 topology2: add wov support
Add the wov module support. The keyword of the wov is the sound
of clap.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2022-12-22 09:58:44 +00:00
Libin Yang a1a458efc5 topology2: add kpb support
Add the kpb component support. kpb component is used to transfer
the data to the proper pipeline based on the WOV component events.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2022-12-22 09:58:44 +00:00
Libin Yang b554075d7e topology2: add micsel support
Add the audio channel selection component support.
In case 1 output channel is selected, the component provides
the selected channel on output. In case 2 or 4 channels are selected on
output, the component works in a passthrough mode.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2022-12-22 09:58:44 +00:00
Libin Yang fbfdd6936f topology2: move payload_with_output_fmt into process token set
The token payload_with_output_fmt is process module specific,
so set it as a process module token.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Libin Yang <libin.yang@intel.com>
2022-12-22 09:58:44 +00:00
Guennadi Liakhovetski 8dfb2c8f4e mixin-mixout: fix address space mismatch
Fix address space conflicts caused by bf7aa04890 ("mixout: Convert
component to use the module adapter")

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-12-22 09:54:18 +00:00
Guennadi Liakhovetski 2f6a6bb4c6 module-adapter: fix address space mismatch
Fix address space mismatch, caused by 133eecb132 ("module_adapter: Add
APIs for coherent module source info access").

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-12-22 09:54:18 +00:00
Guennadi Liakhovetski 0144741651 coherent: allocate memory in coherent_init()
Allocating objects, intended for use with the coherent API must use
specific flags and align allocation size on a cache-line size
boundary. To rid users of these details integrate allocation and
freeing into coherent_init*() and coherent_free*() respectively.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-12-22 09:13:48 +00:00
Andrey Borisovich 80af480ecc soc: ace: fix IPC D3 power state entry
This patch fixes D3 issue - now platform enters and wakes up from
D3 correctly on first iteration. This had been achieved using Zephyr
cpu function call that redirects D3 flow to power down assembly code
sending IPC response to host just before powering down.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2022-12-22 09:43:35 +02:00
Tomasz Leman 8368a6c9f4 west.yml: upgrade zephyr to 720787f75a
Zepych update: total of 73 commits.

Changes include adding power domains to DMA interfaces and allowing to
skip context save during d3.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2022-12-21 18:20:36 +02:00
Adrian Bonislawski 7c623256cb library_manager: fix dma_deinit order
Fixes commit f90f5f9a14
dma ptr should be checked before dma->z_dev

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2022-12-21 14:42:24 +00:00
Arsen Eloglian f0a14a3f41 platform: ace: dma: update buffer period count
Fix dma buffer period count with proper value.

Signed-off-by: Arsen Eloglian <ArsenX.Eloglian@intel.com>
2022-12-21 13:54:44 +00:00