The num_output_pins was set for pass-through path but missed in normal
path. Without it Linux kernel driver wouldn't set second output pin
format for dai copier which connects smart amp and gain module.
Signed-off-by: Rander Wang <rander.wang@intel.com>
This patch changes all cavs-nocodec.conf based topologies to
use exponential Windows fade curve_type in gain components. It
is done to ensure the ramp gets tested after change of gain
curve_type default to linear.
The gain in included deep buffer playback pipeline (hw:0,31) and
in mixer pipeline (hw:0,41) are not changed because they are used
also in normal topologies. Also in capture direction DMIC raw
(hw:0,10) remains curve_type 2. Other gains are curve_type 1
Windows fade.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
We need to care about audio user experience and peak MCPS
usage in production topologies.
The alsabat test is disturbed by the longer ramp so the
change can be reverted from nocodec topologies. Those
topologies are never used by end users. Also the peak MCPS
mitigation is not relevant for test topologies, as long as
higher MCPS is not triggering error reports. The curve
duration is restored without explicit set to the default 20 ms.
Fixes: #8238
Fixes: d0d74a477f
("Tools: Topology2: Change in capture gain
curve_duration to 50 m")
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This change increases the ramp duration from 20 ms to 50 ms. It
lowers the peak load of peak volume component due to longer same
gain value blocks. The internal update rate for gain becomes 250 us
instead of 125 us. The longer fade-in ramp also conceals better
possible analog capture start transients.
This changes for 4ch capture for gain.11.1 in sof-hda-generic-4ch.tplg
from
CPU_PEAK(MAX) = 21.95
PEAK(MAX)/AVG(AVG) = 7.51
to
CPU_PEAK(MAX) = 9.07
PEAK(MAX)/AVG(AVG) = 3.12
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds 8 - 192 kHz playback and capture SRC to nocodec
topologies such sof-tgl-nocodec.tplg. It enables testing of SRC
component with IPC4 via the SSP loopback in the nocodec topologies
E.g. Play random noise at 44.1 kHz and capture it as 32 kHz. The
SSP loopback runs internally at 48 kHz.
aplay -Dhw:0,2 -f S32_LE -c 2 -r 44100 -d 10 -t raw /dev/random
arecord -Dhw:0,2 -f S16_LE -c 2 -r 32000 -d 10 /tmp/recording.wav
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
DMIC now is controlled by two variables, PASSHTHROUGH
and NUM_DMICS, we should consider the values for both
variables to decide the inclusion of DMIC pipelines,
routes, widgets, etc.
Fixes: #7931
Signed-off-by: Chao Song <chao.song@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>
Rename cavs-nocodec capture PCMs. The current PCM names are confusing. These
should be better names for them. The former
"ssp-capture" is now "Port0 2nd Capture",
"DMIC0 Raw" is now "DMIC SFX1", and
"DMIC0 Raw 2" is now "DMIC SFX2".
The PCMs in question have extra gains in the path to simulate processing.
Also the mixer name is changed to compensate for the matching "Capture"
substring in the end of the PCM name, that is part of the mixer name,
to avoid "Capture Capture" tautology.
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Change the naming from dai-copier.<copier_type>.<pipeline_id>.<instance>
to dai_copier.<copier_type>.<stream_name.<direction>.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Rename cavs-nocodec.conf DMIC0 volumes. Define variables for the
associated PCM names and refer to them in the mixer names. The changes
shown in sof-tgl-nocodec.tplg are:
'gain.18.1 Capture Raw Volume 1' > 'gain.18.1 Post Demux DMIC0 Raw Capture Volu'
'gain.19.1 Main Capture Volume 3' > 'gain.19.1 Pre Demux DMIC0 Raw Capture Volum'
'gain.20.1 Capture Raw Volume 2' > 'gain.20.1 Post Demux DMIC0 Raw 2 Capture Vo'
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Rename SSP0 capture related volumes. Define a variable for PCM name
and refer to it in the mixer names.
Using sof-tgl-nocodec.tplg the changes are:
'gain.8.1 Host Capture Volume' > 'gain.8.1 Pre Demux Port0 Capture Volume'
'gain.7.1 Main Capture Volume 1' > 'gain.7.1 Post Demux Port0 Capture Volume'
'gain.17.1 Main Capture Volume 2' > 'gain.17.1 Post Demux ssp-capture Capture Vo'
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.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 in sof-tgl-nocodec.tplg:
'gain.1.1 Playback Volume 1' > 'gain.1.1 Pre Mixer Port0 Playback Volume'
'gain.2.1 Main Playback Volume 2' > 'gain.2.1 Post Mixer Port0 Playback Volume'
'gain.3.1 Playback Volume 3' > 'gain.3.1 Pre Mixer Port1 Playback Volume'
'gain.5.1 Playback Volume 5' > 'gain.5.1 Pre Mixer Port2 Playback Volume'
'gain.6.1 Main Playback Volume 6' > 'gain.6.1 Post Mixer Port2 Playback Volume'
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Since IncludeByKey uses Regular expressions to validate text match,
the expression [1-1000] does not filter number between 1 to 1000 as
intended. For example, DEEPBUFFER_FW_DMA_MS=0 results in matched while
DEEPBUFFER_FW_DMA_MS=5 returns not found, fix with regex flavor pattern.
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Replace the generic copier with host-copier in the class definition and
the instances.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Replace the generic copier with host-copier in the class definition and
the instances.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Replace the generic copier with host-copier in the class definition and
the instances.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Replace the generic copier with host-copier in the class definition and
the instances.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Replace the generic copier with host-copier object in the pipeline class
definition and all its instances.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
DAI copiers now support multiple sinks. So revert the temporary
workaround in the cavs-nocodec topology.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add the host and io gateway pipelines when the passthrough option is
chosen and connect them directly.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
In preparation for generating simple copier->copier pipelines, add an
option to make the processing pipelines conditional. There is no change
in functionality or definitions. This is purely to make it easier to
exclude these pipelines/pcms/routes from the final topology.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add a module copier between the DAI copier and gain in preparation for
optimizing the single endpoint DAI copiers. This optimization will
temporarily make multiple sinks unsupported with DAI copiers. This
feature will be re-introduced in a follow up PR and the module copier
will be removed then.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This has been replaced by num_input_audio_formats and
num_output_audio_formats. So remove the attribute from all components
and mark the token ID as deprecated.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Introduce a new class for module-to-module copiers and make node_type
mandatory for the copier class.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Move and rename the hw_config class to
platform/intel/hw_config_cardinal_clk.conf.
This hw_config is specific to Intel SSP DAI that use the cardinal clock
for the mclk frequency.
Ideally, this class should have immutable mclk_frequency and link clock
source. But because the alsatplg compiler expects the name of the hw
config class to be "hw_config" without any extensions, it is left as
modifiable for now. Once the topology compiler is modified, this will be
made immutable in a follow up PR.
Also, introduce a new hw_config_simple.conf file that contains the
hw_config definition for the HDA/DMIC/SDW type DAIs with only the ID and
name attributes.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add the SSP blob version and set it based on the platform.
Co-developed-by: Jaska Uimonen <jaska.uimonen@intel.com>
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
There's been a recent kernel change to compute the DMA buffer size using
the ibs/obs. So this attribute no longer needs to be set in the
topology.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
There is pinmux conflict between SSP1 and DMIC
on MTL RVP, add a new nocodec topology target
for MTL, on which only SSP0 and SSP2 are enabled.
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Add a second level of mixin-mixout mixing and a PCM to the nocodec
topology.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This patch replaces in DMIC0 capture the gain.N.1 component with IIR
high-pass. The gain has been a placeholder
dai-copier-gain-module-copier-capture.conf while the EQ component has
not been available. The pipeline is replaced by
otherwise similar dai-copier-eqiir-module-copier-capture.conf.
The dmic-default.conf sets the default IIR response to 40 Hz
high-pass with 0 dB gain. The topologies will get only the high-pass
filter but no amplification. The default is changed in
sof-hda-generic.conf to 20 dB gain to address the too silent capture
because these topologies for generic Linux end users do not contain
any other capture enhancements.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Where there more than 1 object of the same type defined at the same node
level, use arrays to define the object. For example, we can define 2
routes as follows:
Object.Base.route [
{
source "smart_amp.2.1"
sink "copier.SSP.2.1"
}
{
source "mixin.1.1"
sink "mixout.2.1"
}
]
This allows us to merge 2 arrays from different conf files without
needing to make their instance ID's unique.
Assume we add another route in a separate conf file like below:
Object.Base.route [
{
source "gain.5.1"
sink "copier.5.1"
}
]
The alsatplg compiler will merge them as follows resulting in 3 route
objects.
Object.Base.route [
{
source "smart_amp.2.1"
sink "copier.SSP.2.1"
}
{
source "mixin.1.1"
sink "mixout.2.1"
}
{
source "gain.5.1"
sink "copier.5.1"
}
]
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
As the copier can do format conversions, and many pipeline components
can do conversions as well, it is important for the topology to define a
single format to use in the "dai_out" copier. This ensures deterministic
behaviour with the driver.
Implement this behaviour by switching topologies to use the
passthrough-capture-be pipeline as template for the backend capture
pipelines.
The previously used passthrough-be template is problematic as
the base class already defines multiple audio formats, with multiple
different sample formats. The new passthrough-capture-be only defines
one sample format by default and is a better starting point as a base
class.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Use mixout-gain-smart-amp-dai-copier-playback pipeline
for SSP0 DAI playback.
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Use the input/output pin terminology consistently to align with the
kernel driver and avoid any confusion.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Insert a second copier into the DMIC0 stream to generate a total of
three PCMs from it.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Use the simplified pipeline with just one module-type copier
connecting two pipelines.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Currently copier components of the module type are used in pairs -
one on each pipeline, connecting to each other. This isn't necessary.
It's enough to have one such copier component on the side, that does
forking. Add a single-copier capture pipeline variane and switch
DMIC over to it.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This patch will support multiple capture streams with DMIC. The pcm stream
is composed of two pipelines: (1) copier host <- gain <- copier module
(2) copier module <-gain <- copier DMIC. We need to use copier module
to connect two pipelines because of the restriction with the ref FW that
the gain module can only be connected to modules that are in the same
pipeline
Signed-off-by: Rander Wang <rander.wang@intel.com>
In preparation for making it easier to write topology conf files that
can be conditionally included without having to worry about conflicting
node ID's for objects between the included file and the top-level conf
file, modify all classes to include an instance attribute. This means
that irrespective of the object type, all objects will be instantiated
as follows:
Object.Widget.gain.1 {} or Object.Base.pdm_config.2 {} etc
The instance ID's are typically only meant for the alsatplg compiler to
differentiate the nodes in the conf file and are not relevant for the
kernel or the firmware. This change will allow the alsatplg compiler to
be modified to automatically make the node ID's unique before
conditionally including conf files.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add an instance attribute and make the name attribute mandatory for the
hw_config objects. This is required because the topology2 compiler allows
for expansion of string values with variable definitions. So, if we
wanted to expand the name from a variable definition(as shown below), it
is only possible if it were a normal attribute instead of the node ID as
it is currently.
Define {
SSP0_HW_CONFIG_NAME "SSP0"
}
Object.DAI.SSP.1 {
dai_index 0
Object.Base.hw_config.1 {
name $SSP0_HW_CONFIG_NAME
}
}
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>