Commit Graph

10535 Commits

Author SHA1 Message Date
Dobrowolski, PawelX c66ed3eaef iadk_modules: module_init: checking type of module
In manifest is information about version of API and
depending on it we load IADK or SOF module.
Flag is showing if module is loadable. According to this information
different api is being used in loading module.

Signed-off-by: Dobrowolski, PawelX <pawelx.dobrowolski@intel.com>
2023-07-12 16:41:18 +01:00
Dobrowolski, PawelX 2cdf38c47e module_adapter: native_system_agent: Introduce call and interface
This is part of fw which helps loaded module in communication with adsp
Also it provides basic operations for creation of component driver
Common part for native loadable modules and iadk is put together and
remade into native API. That way system services are using generic
methods defined in native system service.

Signed-off-by: Dobrowolski, PawelX <pawelx.dobrowolski@intel.com>
2023-07-12 16:41:18 +01:00
Dobrowolski, PawelX e2ad42f0d3 loadable module: module api version structure
Building system for iadk modules and for native sof modules has built in
information about used api. That information we use to switch between
two different methods of registering modules.

Signed-off-by: Dobrowolski, PawelX <pawelx.dobrowolski@intel.com>
2023-07-12 16:41:18 +01:00
Trevor Wu 70c257f9ae drivers: mtk: get memif format from config of DAI component
MTK memif(DMA) can support different format from BE dai, so we don't
need to rely on the transformation of SOF DAI. After the patch, the
format of memif follows DAI component, so the format can be kept the
same in the pipeline and do format transformation via AFE if
necessary.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
2023-07-12 11:58:08 +03:00
Trevor Wu 734dbd38f0 drivers: mtk: add missing argument
One argument is lost in the debug message. Add missing rptr in the
patch.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
2023-07-12 11:58:08 +03:00
Rander Wang 6ddd6554b9 west.yml: upgrade Zephyr revision - Restore IDC interrupt on D3 exit
After exiting D3 state if IMR context save is enabled, IDC interrupt
must be re-enabled again for all cores. It fixes multicore CI test
issue.

431108d89e175: intel_adsp: ace: Restore IDC interrupt on D3 exit

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-07-12 10:16:45 +03:00
Yong Zhi e23857b641 topology2: nocodec-multicore: test multi-stream capture
Enable more complex pipelines for multi-core use cases.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-07-11 19:30:06 +01:00
Andy Ross 192d1dfc5f ipc: Fix typo in error checking
Found a oss-fuzz error I thought I'd fixed being reported again.
Turns out the fix had a typo and only fixed half the problem space.
Need to check source and sink, not source and source!

Signed-off-by: Andy Ross <andyross@google.com>
2023-07-11 14:29:06 +01:00
Daniel Baluta eac223d4b9 audio: mixer: Set correct number of sources
After commit 867ada28f we only allocate 1 buffer for mixer even if there
could be 2 input sources.

So, set correct number of sources for mixer.

Fixes 867ada28f ("audio: module_adapter: Allocate max number of input/output buffers")
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2023-07-11 14:18:33 +01:00
Pin-chih Lin 138a9d0187 smart_amp: modify the Kconfig hierarchy
To fulfill the generic layer structure for smart_amp component, one
intermediate level is added to the current Kconfig hierarchy, i.e.
COMP_SMART_AMP. The MAXIM_DSM config is moved into smart_amp/Kconfig.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2023-07-11 14:17:47 +01:00
Kwasowiec, Fabiola f8d666364a ace_version: change to correct version
For ACE we expect HW_CFG_VERSION 0x0.

Signed-off-by: Kwasowiec, Fabiola <fabiola.kwasowiec@intel.com>
2023-07-11 14:16:31 +01:00
Andy Ross 98e6c6625f audio/selector: Don't assert on input-controllable memcpy_s failure
The size argument to the memcpy_s() here is under the control of
external data and can fail on garbage.  That needs to be a runtime
failure, not an assertion.

Signed-off-by: Andy Ross <andyross@google.com>
2023-07-11 14:12:07 +01:00
Rander Wang f449a22cc7 ipc4: zephyr: remove useless member in struct sof for native driver
Struct cascade_root & mn are used by xtos build only so remove them for
zephyr native driver. And these two items are too specific to intel
platforms. Remove these item also save memory.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-07-11 13:55:01 +01:00
Mac Chiang 1fadc21187 topology2: cavs-rt5682: add sof-mtl-rt1019-rt5682 support
Due to sof_mtl_rt1019_rt5682 machine driver without BT_OFFLAD
bit and support 3 HDMI devices, so make the BT_OFFLOAD option
and subsequentially mapping SPK_ID from 7 to 6.

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
2023-07-10 15:07:56 +01:00
Mac Chiang 1e6f4e0618 topology2: cavs-rt5682: make BT offload as option
Consider the variant projects with/without bt offload feature
so include BT_OFFLOAD pipelines as an option if needed

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
2023-07-10 15:07:56 +01:00
Baofeng Tian 8937929b4e copier: remove do_endpoint_copy function
This is 1ms function calling, remove one more layer to get
better performance.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-07-07 17:05:28 +01:00
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