Commit Graph

114 Commits

Author SHA1 Message Date
Marcin Szkudlinski 5de6d098d7 Revert "topology2: change the sample type for Linux audio system"
This reverts commit 196f86cde4.
2023-08-24 18:03:19 +03:00
Rander Wang 196f86cde4 topology2: change the sample type for Linux audio system
At first the sample type is set to MSB_INTEGER to follow windows
settings, but actually we use LSB_INTERGER type such as S24_4LE.
Now change the default sample type to LSB_INTERGER to align with
FW usage. For DAI copier we need to use MSB_INTERGER for hardware
requirement. Currently sample type only affect s24/c32 case, so only
change sample type in dai for this format config.

FW will use sample type to choose correct format conversion
function and can deal with Windows audio stream correctly with MSB
s24/c32 format.

out_fmt_cfg is redefined for a alsa-lib bug. Alsa-lib will first process
out_fmt_cfg = '$[($out_channels | ($out_valid_bit_depth * 256)) |
($out_sample_type * 65536)]' in base class and then deal with
out_sample_type, so error is reported. Now first define out_sample_type
and then out_fmt_cfg, everything works.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-08-22 17:51:56 +03:00
Seppo Ingalsuo 53e8b71f69 Tools: Topology2: Remove 24 bit formats from EFX pipeline
This patch makes similar change to pipeline as done earlier
for mixout-gain-dai-copier-playback.conf. The 24/32 bit formats
are deleted as unnecessacy. The audio format definition for
DRC is changed to similar style as for copier and gain.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-08-16 14:39:30 +01:00
Seppo Ingalsuo 8652395490 Tools: Topology2: Add DRC to sof-hda-efx-generic topologies
This patch adds DRC component to EFX pipeline. The DRC is very
useful for speaker output to enhance loudness and reduce
speaker distortion in loud playback.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-08-16 14:39:30 +01: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
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 6fb22d645e topology2: intel: dmic-generic: Simplify the core ID setting
When all components of a pipeline are scheduled on the same core, use
the pipeline's core_id attribute to set the core_id for all the
components in it. Also, remove the default core_id in class definitions
so that it doesn't take priority over the value passed from the pipeline
object.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-06-01 13:16:56 +03:00
Ranjani Sridharan 6e2d497371 topology2: dai-copier: num_input_pins/num_output_pins shouldn't be mandatory
Set them based on direction and the actual number of pins used.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-29 09:56:13 +03:00
Ranjani Sridharan ab9449fa08 topology2: tokens: Reduce the string length of token names
In preparation for changing the name of the DAI copier which will make
them a bit longer, reduce the token name lengths by removing the
sof_tkn_ prefix. This is required because the header names in topology
have a 44 character limit and with a long name like:
dai-copier.SSP.NoCodec-0.playback.sof_tkn_comp.uuid, the limit will be
hit. Removing the sof_tkn_ prefix will reduce the number of characters
in the tuple name headers.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-29 09:56:13 +03:00
Ranjani Sridharan 96bd6bc62d topology2: copier: Rename it to dai-copier
To make it explicit that it is only for the DAI gateway.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-29 09:56:13 +03:00
Ranjani Sridharan e9353b0eed topology2: Introduce a new pipeline class
This is specifically meant to be used with ALH DAI copiers.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-22 18:53:45 -07:00
Ranjani Sridharan b534fc6192 topology2: host-gateway-playback: Use host-copier
Replace the generic copier with host-copier in the class definition and
the instances.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00
Ranjani Sridharan ac26e70d95 topology2: host-gateway-capture: use host-copier
Replace the generic copier with host-copier in the class definition and
the instances.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00
Ranjani Sridharan 81a354e750 topology2: gain-copier-capture: Use host-copier
Replace the generic copier with host-copier in the class definition and
the instances.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00
Ranjani Sridharan 3bee3c25fc topology2: gain-playback: Use host-copier
Replace the generic copier with host-copier in the class definition.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00
Ranjani Sridharan 9e95cd288b topology2: gain-capture: Use host-copier
Replace the generic copier with host-copier in the class definition and
the instances.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00
Ranjani Sridharan eb157a5c2f topology2: mixout-gain-host-copier-capture: Use host-copier
Replace the generic copier with host-copier in the class definition.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00
Ranjani Sridharan b86acaa353 topology2: deepbuffer-playback: Use host-copier
Replace the generic copier with host-copier in the class definition and
the instances.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00
Ranjani Sridharan f942a0338a topology2: src-gain-mixin-playback: Use host-copier
Replace the generic copier with host-copier in the class definition and
the instances.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00
Ranjani Sridharan be825a8581 topology2: host-copier-gain-src-mixin-playback: Use host-copier
Replace the generic copier with host-copier in the class definition and
the instances.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00
Ranjani Sridharan f211f4c9da topology2: host-copier-gain-mixin-playback: Use host-copier
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>
2023-05-19 08:17:34 -07:00
Ranjani Sridharan 9e7ec5a3f2 Revert "topology2: cavs-nocodec: add a module copier to SSP 0 capture pipeline"
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>
2023-05-12 14:26:51 +03:00
Rander Wang 4bf7c60061 topology2: add google-rtc-aec-capture pipeline
This aec is connected to host copier

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-05-11 12:46:44 -07:00
Ranjani Sridharan fff55d4235 topology: include: pipelines: ip-gateway-capture: set default direction
It is meant for capture.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-11 19:03:21 +03:00
Ranjani Sridharan 74f324641a topology2: cavs-nocodec: add a module copier to SSP 0 capture pipeline
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>
2023-05-08 12:23:52 +03:00
Ranjani Sridharan dfe52aac14 Tools: Topology2: SRC format fixes
This patch avoids with development topology sof-hda-src-generic.tplg
the playback start failure and error seen in trace
"buffer: buffer_alloc(): new size = 0 is invalid".

The kernel selects in case of multiple output formats defined the
format that matches the input. It then caused the obs to become zero.
When the SRC is used in the mixin-based playback pipeline, its output
format is limited to 32-bits format only. So replace the multiple
output formats with a single 48K, 2ch 32-bit format.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-05-03 13:24:45 +03:00
Ranjani Sridharan 6339cfd5aa topology2: Removed period_sink/source_count attributes
These were added for use with IPC3 but since topology2 is not targeted
for IPC3, there's no need to keep them anymore.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-04-24 10:10:51 +03:00
Ranjani Sridharan b3139af01c topology2: Remove num_audio_formats attribute
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>
2023-04-24 10:10:51 +03:00
Ranjani Sridharan 9fa5d722b4 topology2: Remove 24-bit audio formats in mixin/mixout
The 24-bit formats defined in topologies will never be used because the
mixin/mixout only support 32-bit format. So remove these audio formats
from the component and pipelines audio format definitions.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-04-20 23:04:38 -07:00
Ranjani Sridharan e5eb7dfc76 topology2: tokens: Split the tokens for input/output pin index
Separate the pin index token ID for input/output pin index to avoid
collisions between the two and incorrect pin index parsing in the
kernel.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-04-20 12:19:35 -07:00
Ranjani Sridharan 78be251a44 topology2: Move common_definitions.conf
These are Intel-specific, so move them to the platform/intel folder

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-04-11 15:54:31 +03:00
Ranjani Sridharan cbe01073f6 topology2: copier: Make node_type mandatory
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>
2023-04-11 15:54:31 +03:00
Ranjani Sridharan b74c26b52c topology2: Rename passthrough-capture.conf
Rename it to host-gateway-capture to align it with the documentation.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-04-11 15:54:31 +03:00
Ranjani Sridharan 3ee2ab63a7 topology2: Rename passthrough-playback.conf
Rename it to host-gateway-playback.conf to align with the documentation.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-04-11 15:54:31 +03:00
Ranjani Sridharan 91a436ef7d topology2: Rename passthrough-capture-be
Rename it to io-gateway-capture.conf to align with the documentation.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-04-11 15:54:31 +03:00
Ranjani Sridharan a37f8f473d topology2: io-gateway: Fix a typo
Fix the typo in the pipeline name

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-04-11 15:54:31 +03:00
Ranjani Sridharan 60bc228b81 topology2: mixout-gain-smart-amp-dai-copier-playback: Do not set copier node_type
It should be set based on DAI type during pipeline instantiation.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-04-04 18:36:19 -07:00
Ranjani Sridharan de56d36240 topology2: dai-copier-be: Do not set copier node_type
It should be set based on DAI type when the pipeline is instantiated.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-04-04 18:36:19 -07:00
Ranjani Sridharan 0b6d4a7576 topology2: mixout-gain-efx-dai-copier-playback: Do not set default node_type
It should be set based on DAI type.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-04-04 18:36:19 -07:00
Ranjani Sridharan 719cb075f8 topology: mixout-gain-dai-copier-playback: Do not set default node_type
It should be set when the pipeline is instantiated based on the DAI
type.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-04-04 18:36:19 -07:00
Ranjani Sridharan ae7036dce2 topology2: io-gateway: Do not set copier node_type
It is wrong to set a default value when creating widgets objects within
pipelines and these must be set at the top-level based on the DAI type.
So remove the default value in be-dai.conf and set the node_type
whenever the pipeline is initialized.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-04-04 18:36:19 -07:00
Ranjani Sridharan afb0f73512 topology2: rename passthrough-be to io-gateway.conf
All it contains is a IO gateway copier and a pipeline widget. So rename
it accordingly.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-04-04 18:36:19 -07:00
Ranjani Sridharan 362a0781f2 topology2: Remove dma_buffer_size attribute
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>
2023-03-31 20:41:07 +03:00
Guennadi Liakhovetski 8a48c78704 topology2: add a mixin-mixout level to nocodec
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>
2023-03-13 09:59:21 +02:00
Seppo Ingalsuo d371135a63 Tools: Topology2: Add IIR high-pass with gain to DMIC capture
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>
2023-03-02 22:56:00 +00:00
Seppo Ingalsuo 7564e5fc8c Tools: Topology2: Add high-pass IIR to HDA headset capture
This patch includes to sof-hda-generic.conf the new
highpass-capture-be.conf as passthrough-capture-be.conf replacement
that adds to DAI copier pipeline the IIR high-pass filter. The
response is hard coded to 0 dB amplification and 40 Hz cut-off.

The analog microphone headsets creates a strong DC input when the bias
voltage settles. It can be even full-scale and sound very loud. The
high-pass filter suppresses such input signal.

Fixes #7116

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-03-02 22:55:43 +00:00
Chao Song 1f4bc9f948 topology2: wov-detect: correct use of define variables
To refer to a define variable, we should use
"$DEFINE_VAR_NAME". The $ symbol is required.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2023-03-02 22:26:34 +00:00
Seppo Ingalsuo 64fe2ea7d2 Tools: Topology2: Add topology to test playback SRC conversions
This patch adds to development topologies a topology
sof-hda-src-generic.tplg. It is similar to sof-hda-generic but adds
to first playback PCM pipeline a SRC component after gain. The
pipeline supports playback of S32_LE with 8 - 192 kHz rates.

The cavs/src.conf is merged to src.conf, and the SRC format
include files are brought up from cavs directory. The topology
cavs-sdw-src-gain-mixin.tplg related .conf files are updated
for common location. The missing rate_out attribute is added.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-02-16 16:21:30 +00:00
Kai Vehmanen a62fa8e418 topology2: cavs: add passthrough-capture-be pipeline
Add a separate template for capture backend pipelines. The
passthrough-be pipeline has been used as template for both playback and
capture, but we want to provide different defaults especially for the
audio formats in capture case.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-02-15 19:18:16 +02:00