Commit Graph

10319 Commits

Author SHA1 Message Date
Ranjani Sridharan 541bc539df audio: copier: Remove get_endpoint_buffer()
It is only used in the multi-endpoint case, so use the
multi_endpoint_buffer directly.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-07-07 17:05:28 +01:00
Ranjani Sridharan e424b874a4 audio: copier: Split up module copier and multi-endpoint copies
In preparation for converting the copier to use the module interface,
split up the multi-endpoint DAI copy and the module copier copy cases.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-07-07 17:05:28 +01:00
Ranjani Sridharan 1a96df1e63 audio: copier: Add a helper function to copy to all sinks
This will be used to separate multi-endpoint DAI copy from the module
copier copy.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-07-07 17:05:28 +01:00
Baofeng Tian 9bba34caf6 copier: convert unbind to module interface
Convert copier unbind to module interface.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-07-07 17:05:28 +01:00
Baofeng Tian f3521641d3 copier: change set/get config to module interface
Use standard module set and get config interface in copier.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-07-07 17:05:28 +01:00
Baofeng Tian 5e9a012a13 copier: change prepare and parameter to module interface
Use module parameter instead of device parameters.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-07-07 17:05:28 +01:00
Baofeng Tian 98a16b8d3f copier: change free and reset to module interface
Add new function to implement free and reset module interface.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-07-07 17:05:28 +01:00
Baofeng Tian 4f0b4c483c copier: change copier new with module interface
Set dev private as module interface, create new copier_init
to meet module interface requirement, and change all copier_data
related code.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-07-07 17:05:28 +01:00
Jaroslaw Stelter 83343c51bb lnl: app: Fix configuration for D3 flow
LNL configuration must be updated to fix D3 flow
on ACE 2.0 platform.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-07-07 15:49:36 +01:00
Ranjani Sridharan 3bcd8669f7 audio: copier_dai: Remove unused variable
drv is left over from the previous implementation when a DAI component
was created for each copier. Remove it as it isn't really used anymore.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-07-07 14:08:33 +01:00
Pierre-Louis Bossart 3029a0cc38 topology2: cavs-sdw: fix bad index in passthrough mode
When PASSTHROUGH is true, the topology generation throws this error:

ALSA lib dapm.c:247:(tplg_build_routes) undefined source widget/stream
'host-copier.0.playback'

using the pcm_id 2 used for the host copier fixes the issue.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2023-07-07 12:11:16 +01:00
Bard Liao b267012f22 Topology2: sdw-amp-generic: add missing num_input_pins
num_input_pins was missing in passthrough mode.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-07-06 10:58:32 -07:00
Ranjani Sridharan b92ba5557a audio: asrc: Clean up the timestamp functions
Remove the ret variable in all functions.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-07-06 17:14:05 +01:00
Tomasz Leman d4a48f0b67 sof: tlv: pointer to const as arg for tlv_next
Changing argument for tlv_next from regular pointer to pointer to const
value. Function doesn't change value of passed argument.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-07-06 17:12:16 +01:00
Tomasz Leman 968027b6c2 base_fw: replace of ipc4_tuple structure with sof_tlv
ipc4_tuple and sof_tlv represent the same data type. The new structure
is globally available and can be used elsewhere.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-07-06 17:12:16 +01:00
Tomasz Leman e80af3330f header: sof: add header with tlv struct
Adding a header file containing definitions of the TLV structure and
related functions.

Most of the code is a copy of the functionality added for the BaseFw
module in the 3efd78048d commit. The only difference are the names change
of the base structure, functions and field in the structure.

A new feature is a function that allows to find TLV value of the
indicated type.

Co-developed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-07-06 17:12:16 +01:00
Ranjani Sridharan 867ada28fe audio: module_adapter: Allocate max number of input/output buffers
Allocate input/output buffers based on the maximum number of
sources/sinks supported by the module. The current logic would only
allocate 1 input/output buffer if the module prepare is invoked before
all its sinks/sources are bound.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-07-06 17:10:06 +01:00
Ranjani Sridharan 99ac62566d audio: module_adapter: Add new fields in struct processing_module
Add a couple of new fields for setting the max number of sources/sinks
supported by each module. Set the max sources/sinks for all modules.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-07-06 17:10:06 +01:00
Baofeng Tian 8adbb85044 perf_cnt: simplify the difference calculation for cycles
Previously, due to cycle get max is UINT32_MAX, so check
and wrap cycles based on INT32_MAX, however, unsigned int can wrap
automatically with minus, remove the check and make
perf difference calculation more simple.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-07-05 19:59:08 -07:00
Seppo Ingalsuo 2fb0c1d811 Tools: Topology2: Add a development HDA generic MCPS benchmark topology
This patch builds new development topologies
sof-hda-benchmark-generic-<tgl/mtl/lnl>.tplg to evaluate performance
of a set of playback components.

The topology for PCM0P playback is

host-copier.0 --> gain.1.1 --> mixin.1.1 -->
	mixout.2.1 --> aria.2.1 --> gain.2.1  --> mixin
	mixout.3.1 --> dai-copier.HDA

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-07-04 16:09:57 +01:00
Jaska Uimonen 8380946137 topology1: test topology for tgl nocodec mux
Add test topology for muxing 2 pipelines into 1 with SSP dai and
capturing the result from loopback.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2023-07-04 15:37:21 +01:00
MARUTHI MACHANI 22c013a381 platform:amd:increase runtime memory for simultaneous usecases
increase runtime memory for simultaneous usecases

Signed-off-by: MARUTHI MACHANI <maruthi.machani@amd.com>
2023-07-04 15:18:52 +01:00
MARUTHI MACHANI 388075ec82 topology1:amd: comments update
topology comments update

Signed-off-by: MARUTHI MACHANI <maruthi.machani@amd.com>
2023-07-04 15:18:52 +01:00
MARUTHI MACHANI 3fa5085a4e topology1:amd: topology changes to support virtual playback passthrough for mux
Topology changes to support virtual playback passthrough for mux

Signed-off-by: MARUTHI MACHANI <maruthi.machani@amd.com>
2023-07-04 15:18:52 +01:00
Bard Liao a6fa09cca7 Topology2: add sof-tgl-rt711-rt1308-rt715 topology
Add sof-tgl-rt711-rt1308-rt715 topology for topology2.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-07-04 15:18:27 +01:00
Bard Liao 4fa2ad4261 Topology2: sdw-amp-generic: add 2nd amp feedback when SDW_AMP_FEEDBACK
is true

Currently, we add the 2nd sdw amp feedback unconditionally. It will lead
to an issue when aggregated apms don't support feedback function.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-07-04 15:18:27 +01:00
Bard Liao cc3b75665f Topology2: hdmi: use macro to set HDMI BE name
HDMI BE name may not be iDispx.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-07-04 15:13:56 +01:00
Ranjani Sridharan b1ce311540 topology2: pipelines: dai-copier-eqiir-module-copier-capture: Replace audio_format object
Use the input_audio_format/output_audio_format objects explicitly.
Also, add the 4ch audio format in the class definition as this is only
instantiated once in dmic-generic.conf and needs support for both
formats.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-07-04 15:10:35 +01:00
Ranjani Sridharan 511f680b02 topology2: pipelines: io-gateway: Replace audio_format object
Use the input_audio_format/output_audio_format objects explicitly.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-07-04 15:10:35 +01:00
Ranjani Sridharan 914b855d72 topology2: components: mixout: Replace audio_format object
Use the input_audio_format/output_audio_format objects explicitly.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-07-04 15:10:35 +01:00
Ranjani Sridharan 7ad6659b9e topology2: components: mixin: Replace audio_format object
Use the input_audio_format/output_audio_format objects explicitly.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-07-04 15:10:35 +01:00
Seppo Ingalsuo 7458312a76 Tools: Testbench: Remove unnecessary scheduling component find
The pcm_dev is no more used in the code. It also causes a
problem with "error: ipc get comp" with some topologies, where
p->sched_id is missing. This fix helps testbech to parse a
topology like

pcm0p --> buf2.0 --> muxdemux --> buf1.0 --> ssp0.out
                        ^
pcm1p --> buf3.0 -------|

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-07-03 17:13:45 +01:00
Jyri Sarha 593563b69e topology2: cavs-mixin-mixout-efx-hda.conf: Uppercase IIR and FIR
Make these last IIR and FIR acronyms in the kcontrol names uppercase.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-07-03 16:13:37 +01:00
Kai Vehmanen 3fef488d8f app: add logging_mipisystcat_overlay.conf overlay config
Add an overlay config to build SOF with MIPI Sys-T Catalog
logging enabled.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-07-03 16:11:22 +01:00
Curtis Malainey f43bb81949 volume: fix log message to match caller
Likely artifact from module adapter conversion

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-06-30 12:09:42 -07:00
Jyri Sarha 50f5c8fbdc topology2: Rename remaining non mixer kcontrols to follow new naming scheme
Rename all remaining kcontrols to follow the new naming scheme that is
already used for all mixers.

This commit changes kcontrol names as follows:

cavs-nocodec.conf:
'smart_amp_init' -> 'Main Playback and Port0 smart_amp_init'

cavs-mixin-mixout-hda.conf:
'4 Main capture Iir Eq' -> 'Analog Capture IIR Eq'

dmic-generic.conf:
'DMIC0 capture Iir Eq' -> 'DMIC0 Capture IIR Eq'

sdw-jack-generic.conf:
'4 Main capture Iir Eq' -> 'Jack In Capture IIR Eq'

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-06-30 13:24:56 +03:00
Guennadi Liakhovetski 3e3d0cdeab buffer: prevent cache corruption
Recent research discovered a set of potential issues related with
cache prefetch. Specifically it seems like uncached access to memory
can cause cache prefetch. This can cause problems in buffer_attach()
and buffer_detach() where buffers are added to or removed from lists
respectively via uncached addresses, after which they can be used via
cached addresses. Add proper cache synchronisation and interrupt
locking to protect against such memory corruption.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-06-30 10:53:43 +03:00
Seppo Ingalsuo 4bdbe3bf7b Audio: Fix IPC4 sink component buffer parameters set for S24_LE
The frame_fmt from
audio_stream_fmt_conversion(32, 24, &frame_fmt, &valid_fmt) is
SOF_IPC_FRAME_S32_LE (2). valid_fmt is SOF_IPC_FRAME_S24_4LE (1).

Set of member frame_fmt from struct sof_ipc_stream_params should
be done with valid_fmt instead to get the components to handle
the S24_LE stream correctly.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-06-30 09:58:56 +03:00
Chao Song 98a70f6f05 lib_manager: lib_manager_dma_init: remove duplicated code
The code to get buffer address alignment is duplicated
in lib_manager_dma_init() and its caller. As the code
is useless in lib_manager_dma_init(), thus remove it
in this patch.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2023-06-29 17:30:22 +03:00
Marc Herbert b8a38072bc xtensa-build-zephyr.py: add support for aliases (ADL-->TGL etc.)
This restores parity with the installer/GNUmakefile in the stable-v2.2
branch and simplifies CI deployment.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-06-29 12:38:42 +03:00
Jyri Sarha a3814c58b9 topology2: sdw-jack-generic.conf: Rename mixers
Rename mixers according to the new naming convention by referring to
the associated PCM name and the position in the topology. Create
defines for PCM names so the name is only in one place. Adds a define
for the capture PCM too. The commit also updates the PCM names while
adding the defines.

This produces following changes, on PCM names:
'Jack in' -> 'Jack In'
'Jack out' -> 'Jack Out'

and on mixer names:
'1 Playback Volume 0' -> 'Pre Mixer Jack Out Playback Volume'
'2 Main Playback Volume' -> 'Post Mixer Jack Out Playback Volume'

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-06-28 17:17:15 +03:00
Jyri Sarha 2af91434b5 topology2: cavs-sdw-src-gain-mixin.conf: Rename mixers
Rename mixers according to the new naming convention by referring to
the associated PCM name and the position in the topology. Create
defines for PCM names so the name is only in one place. The commit
also updates the PCM names while adding the defines.

This produces following changes, on PCM names:
'Jack in' -> 'Jack In'
'Jack Out' -> 'Jack Out'

and on mixer names:
'Src Playback Volume' -> 'Pre Mixer Jack Out Playback Volume'
'Main Playback Volume' -> 'Post Mixer Jack Out Playback Volume'

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-06-28 17:17:15 +03:00
Jyri Sarha bda1bcd5bc topology2: cavs-rt5682.conf: Rename mixers
Rename mixers according to the new naming convention by referring to
the associated PCM name and the position in the topology. Create defines
for PCM names so the name is only in one place.

This produces following changes:

'Playback Volume 1' -> 'Pre Mixer Headset Playback Volume'
'Playback Volume 3' -> 'Pre Mixer Speaker Playback Volume'
'Main Playback Volume 2' -> 'Post Mixer Headset Playback Volume'
'Main Playback Volume 4' -> 'Post Mixer Speaker Playback Volume'

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-06-28 17:17:15 +03:00
Andrey Borisovich 53d471b566 ipc4: notify Host on the failed IPC Device power transition
During IPC Device power transition errors may be encountered related to
invalid system state or IPC messages waiting to be send.
In this case we are going to send an IPC response to Host bypassing
schedulers. IPC Device will not change power state when errors occur
preventing whole system from the suspend.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2023-06-28 15:32:16 +03:00
Andrey Borisovich 965e1c1bf0 board: intel_adsp_ace15_mtpm: Enabled MTL IMR context save
Enabled CONFIG_ADSP_IMR_CONTEXT_SAVE option in Kconfig
in the board configuration.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2023-06-28 15:32:16 +03:00
Andrey Borisovich 015488b4e1 ipc4: added D3 support using Zephyr Power Manager API
Added IPC4 callbacks 'suspend_handler' and 'resume_handler'
to control Zephyr IPC driver.

Co-developed-by: Tomasz Leman <tomasz.m.leman@intel.com>
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2023-06-28 15:32:16 +03:00
Andrey Borisovich 80f27b2f7e board: intel_adsp_ace15_mtpm: disabled CONFIG_PM_DEVICE_RUNTIME_EXCLUSIVE
Zephyr turns on by default CONFIG_PM_DEVICE_RUNTIME_EXCLUSIVE option
what causes Devices using Zephyr Device System Power Manager to
be ignored during SoC power transition. Disabled this option so we
can use default Zephyr kernel behavior to shut down Devices.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2023-06-28 15:32:16 +03:00
Marcin Szkudlinski 4e8040c232 platform: ace: Add pm notifiers to support Zephyr's D3 transition
During PowerOff (D3) transition Zephyr Power Manager must have
a pointer in IMR to save the LP/HPSRAM memory before
powering off.

As zephyr has no access to IMR heap, the memory must
be allocated by SOF

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
2023-06-28 15:32:16 +03:00
Seppo Ingalsuo ee6eb1b169 Audio: Module adapter: Add simplified one source to one sink copy
This patch adds a simplified version of audio stream copy for
module adapter clients with one source and one sink. The overhead
of discovering multiple source and sink buffers is avoided.

The module_adapter_bind() and module_adapter_unbind() functions
are changed to detect multiple sources or sinks condition
to control the used simple copy function. The mod->source and
mod->sink pointers to buffers are updated when there's only
one source and sink.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-06-28 13:59:29 +03:00
Laurentiu Mihalcea 4e4018a434 sof-ci-jenkins: zephyr-override-template: Whitelist nxp_hal
This commit allows the CI to make use of the nxp_hal which
is required by i.MX8M. Without it, the build would fail.

Fixes: e9f1531

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-06-28 13:38:59 +03:00