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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Rename SSP0, SSP1, and SSP2 playback volumes according to PCM names
they are connected to. Define the PCM names as variables so the name
can be changed in a single place.
This is how the change will look like:
'gain.1.1 Playback Volume 1' to
'gain.1.1 Pre Mixer Port0 Playback Volume'
'gain.14.1 Main Playback Volume 14' to
'gain.14.1 Post Mixer Port0 Playback Volume'
'gain.3.1 Playback Volume 3' to
'gain.3.1 Pre Mixer Port1 Playback Volume'
'gain.4.1 Main Playback Volume 4' to
'gain.4.1 Post Mixer Port1 Playback Volume'
'gain.5.1 Playback Volume 5' to
'gain.5.1 Pre Mixer Port2 Playback Volume'
'gain.6.1 Main Playback Volume 6' to
'gain.6.1 Post Mixer Port2 Playback Volume'
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Rename mixin and mixout EFX Analog Playback Eqs to follow the same
naming scheme as the mixers.
As a result of this commit Eqs are renamed in sof-hda-efx-generic.tplg
as follows:
'eqfir.2.1 2 Main playback Fir Eq' to
'eqfir.2.1 Post Mixer Analog Playback Fir Eq'
and
'eqiir.2.1 2 Main playback Iir Eq' to
'eqiir.2.1 Post Mixer Analog Playback Iir Eq'
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Rename mixin and mixout EFX Analog Playback volumes. Rewrite the names
of the mixers to better reflect their position in the topology.
As a result of this commit mixers are renamed in sof-hda-efx-generic.tplg
as follows:
'gain.1.1 1 2nd Playback Volume' to 'gain.1.1 Pre Mixer Analog Playback Volume'
and
'gain.2.1 2 Main Playback Volume' to
'gain.2.1 Post Mixer Analog Playback Volume'
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Since there is not any intrinsic on HiFi4 can get better
performance, thus share the implementation code for HiFi3
and HiFi4.
Signed-off-by: Andrula Song <andrula.song@intel.com>
Optimize the tdfb_fir_sx functions by remove the duplicated
usage of circular buffer.
Fixes: #5273.
Signed-off-by: Andrula Song <andrula.song@intel.com>
During last changes in Zephyr that implemented power transition for the
IPC Device, signature of the intel_adsp_ipc_send_message had changed
and now returns negative int error codes (previously bool on success).
Updated single function reference in SOF ipc_platform_send_msg().
Implementation had not changed as the function may return only
-EBUSY error code until the Zephyr Device Power Management option
is disabled.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
If the max_block_count attribute is zero, this may lead to
division by zero error. Handle this explicitly but reporting
error if max_block_count is zero.
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Do not unconditionally define assert() to nothing in some obscure and
unrelated array.h file.
This looks like it was a temporary hack that was missed in:
Fixes commit 6f366e2eef ("Add definition of interfaces of Intel IADK
modules."), part of PR #5848 too massive to be properly reviewed.
(docs.zephyrproject.org/latest/contribute/contributor_expectations.html)
In addition to enabling asserts when requested by a debug build (!), fix
the following messenger warning:
```
In file included
from src/include/sof/common.h:30,
from src/include/sof/audio/sink_api.h:10,
from src/include/sof/audio/module_adapter/module/module_interface.h:17,
from src/include/sof/audio/module_adapter/iadk/iadk_module_adapter.h:19,
from src/audio/module_adapter/iadk/system_agent.cpp:22:
zephyr/include/rtos/panic.h:19: error: "assert" redefined [-Werror]
19 | #define assert(x) __ASSERT_NO_MSG(x)
|
In file included from
src/audio/module_adapter/iadk/system_agent.cpp:16:
src/include/sof/audio/module_adapter/iadk/utilities/array.h:60:
note: this is the location of the previous definition
60 | #define assert(cond)
```
This warning appeared only later in messenger commit
002d4a3f66 ("Pipeline2.0: change module API to use various data")
because it started to include audio/sink_api.h in
module_interface.h. This led to the two definitions finally clashing
with each other.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Add passthrough functions implementation. If the gain of all
channels equal 0dB, then we use passthrough functions to process
the volume component.
Signed-off-by: Andrula Song <andrula.song@intel.com>
We no longer use synthetic mimx93_a55_evk_sof board but
rather we customize already existing proper mimx93_a55_evk board.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>