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>
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>
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>
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>
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>
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>
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>
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>