Commit Graph

1518 Commits

Author SHA1 Message Date
Seppo Ingalsuo a8f2b845ce Tools: Topology2: Define only same channels counts for DMIC0 dai-copier
This patch defines e.g. for sof-hda-generic-2ch.tplg DMIC0 only
stereo formats as s16/24/32. Similarly for e.g. sof-hda-generic-4ch.tplg
only four channels formats are defined.

The reduction of input formats options avoids the issue with kernel
that it possibly selects invalid channels count for DMIC0 DAI when
the channels count in connected pipelines varies due to processing
components.

The output formats are reduced similarly since copier always has
the same input and output channels count.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-05-23 14:32:12 +03:00
Seppo Ingalsuo b6f1bba44f Tools: Topology1: Change name of default DRC test blob
The tplg1 blobs are still used with IPC3 testbench test pipelines.

The updated script example_drc.m exports the blob used for DRC
test with name "speaker_default" so, the blob file name to include
to test pipeline is changed. The blob content is same as before.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-05-22 16:20:03 +01:00
Pierre-Louis Bossart 69249fb75b topology2: add mtl-rt712 topologies version
For some reason the sof-mtl-rt712-l0 topology was not created despite
being listed in the kernel, and we now need the rt712 VB support with
an additional SmartMic path.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2024-05-16 18:11:29 +03:00
Seppo Ingalsuo b02a852053 Tools: Topology2: Add benchmark topologies for TDFB component
This patch adds s16/s24/s32 format test topologies for the
time domain fixed beamformer component.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-05-14 14:42:46 +01:00
Seppo Ingalsuo a81a235ae6 Tools: Topology2: Intel: Add 16 and 24 bit DMIC DAI copier format option
This patch allows the kernel to choose 16 bit format if the DMIC
NHLT is missing the recommended 32 bit mode blob. The 24 bits is
also in theory possible so it is added for completeness.

The DAI copier is converting the output format for internal pipelines
into S32_LE format, so the other operation is not impacted. For systems
with 32 bit DMIC NHLT there is no impact.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-05-09 11:19:12 +03:00
Kai Vehmanen d533d4290e topology2: common_definitions: improve SAMPLE_TYPE documentation
Clarify documentation of SAMPLE_TYPE_MSB_INTEGER sample type
value and fix documentation of SAMPLE_TYPE_LSB_INTEGER. These
definitions are often confused with integer endianness, which is
not related. Clarify this better.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-05-09 11:14:12 +03:00
Bard Liao 4a761f6d60 Topology2: add mtl rt713 rt1318 rt1713 support
Two configurations for sof-mtl-rt713-l0-rt1318-l12-rt1713-l3 and
sof-mtl-rt713-l0-rt1318-l1-rt1713-l3.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2024-05-08 09:56:31 +01:00
Seppo Ingalsuo 07c9043516 Tools: Topology2: Use for LNL own platform configuration lnl.conf
The new lnl.conf is copy of mtl.conf but DMIC_DRIVER_VERSION needs
to be increased by one for a small registers change.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-05-06 12:33:41 +03:00
Yong Zhi 18ab8c2468 topology2: cavs-rt5682: expose spk core_id for overriding
Port from nocodec topology for multi-core validation.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2024-04-30 13:17:42 +03:00
Kai Vehmanen 278ecc5b74 topology2: intel: bt-generic.conf: fix rate constraints
Commit c77a4feb2f ("topology2: pcm_caps: Remove defaults for
rate_min/rate_max") changed how rate constraints are described in
topology. After this change, the rate_min/max was ignored by SOF Linux
driver and the rate was incorrectly limited to 48000Hz for these
topologies.

Fix this issue by enumerating the supported sampling rates with "rates".

Link: https://github.com/thesofproject/sof/issues/9067
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-26 13:04:35 +01:00
Laurentiu Mihalcea 65b8a32f27 nxp: imx8ulp: switch to native Zephyr drivers and timer domain
Switch to Zephyr native drivers and timer domain. This
includes:
	1) Switching all imx8ulp topologies to timer domain.
	2) Disabling Zephyr DMA domain
	3) Various interrupt-related fixes via Kconfig-related
	ifdef logic.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-25 14:12:41 +03:00
Peter Ujfalusi aa60e65c6b topology2: intel: deep-buffer: Adjust the buffer_size_min only
There is no benefit on changing the period/buffer size_max as it is set
by default to a reasonably large value already.
What matters is the buffer_size_min: it needs to be larger than the
amount of data that one DMA burst will transfer, which is equal to the
DeepBuffer size. For safety reasons the minimum buffer size has to be
larger than this.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-04-24 16:27:52 +03:00
Peter Ujfalusi bba6a4cb04 topology2: common: pcm_caps: Revisit default period and buffer sizes
Increase the default period_size_max to a much larger value which is
commonly used by sound cards from 16384 to 2097152.

Adjust the buffer_size limits to minimum 384 (2 * period_size_min) and the
maximum to 4194304 (2 * period_size_max).

Applications do not need to use these large buffers, but there is no
technical reason to not allow them, like they available on other sound
hardware.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-04-24 16:27:52 +03:00
Peter Ujfalusi b3a6d1c570 topology2: common: pcm_caps: Increase periods_max from 16 to 1024
There is no technical reason to limit how many periods applications use.
Generic sound cards tends to allow 32768 periods (period size range
is 16 - 524288) but that is an overshot, let's raise the limit to 1024.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-04-24 16:27:52 +03:00
Laurentiu Mihalcea 9737e124bc nxp: imx8/imx8x: switch to native Zephyr drivers and timer domain
This commit includes all necessary changes for switching
to timer domain and Zephyr native drivers on imx8 and imx8x.
This consists of:
	1) Switching all imx8 topologies to timer domain.
	2) Disabling Zephyr DMA domain
	3) Various interrupt-related fixes via Kconfig-related
	ifdef logic.

This commit includes all necessary changes for switching
to native Zephyr drivers on imx8/imx8x.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-23 12:20:31 +01:00
Mac Chiang 4c1cd870e6 topology2: add rt1318 and rt714 support on LNL
This patch adds following hardware configuration on LNL product:

SDW link0: RT714 DMIC
SDW link1: RT1318 Left Speaker
SDW link2: RT1318 Right Speaker

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
2024-04-22 13:44:29 +01:00
Peter Ujfalusi 3f7a589678 topology2: intel: hdmi-generic: Update rates and format support in pcm.caps
With ChainDMA the HDMI PCM can support IEC958_SUBFRAME_LE and the rate
is not limited to 48K only.

To be able to use bytestream passthrough (DD/DTS/etc).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-04-17 12:47:18 +01:00
Ranjani Sridharan c77a4feb2f topology2: pcm_caps: Remove defaults for rate_min/rate_max
Use 'rates' instead to specify that 48K is the default supported rate.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-04-17 09:15:32 +03:00
Seppo Ingalsuo a485f27757 Tools: Topology2: Add build of 96 kHz HDA topologies
The development topologies are with -/2ch/4ch DMIC for cavs25
and ace1 platforms for testing HDA with 96 kHz rate.

The build topologies names are:
	- sof-hda-generic-cavs25-4ch-48k-96k
	- sof-hda-generic-cavs25-2ch-48k-96k
	- sof-hda-generic-cavs25-4ch-96k
	- sof-hda-generic-cavs25-2ch-96k
	- sof-hda-generic-ace1-4ch-48k-96k
	- sof-hda-generic-ace1-2ch-48k-96k
	- sof-hda-generic-ace1-4ch-96k
	- sof-hda-generic-ace1-2ch-96k
	- sof-hda-generic-96k

The DMIC1 PCM ID with 96 kHz is set to 22 (capture ultrasonic).
PCM IDs definition is in:
https://github.com/thesofproject/sof/files/14021187/PCMDeviceList.txt

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-04-16 12:35:29 +01:00
Seppo Ingalsuo a22a3aa16b Tools: Topology2: Add other rates support for HDA generic
This patch modifies cavs-mixin-mixout-hda.conf with added input
and output format attributes for in_rate and out_rate. The bit_depth
attributes need to be added to as well to avoid corrupt audio.

The HDA_ANALOG_CAPTURE_RATE and HDA_ANALOG_PLAYBACK_RATE are by default
set to 48000. The topologies' characteristics are not changed with
this patch.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-04-16 12:35:29 +01:00
Seppo Ingalsuo dabb9b4fe9 Tools: Topology2: Add build of test topologies with DMIC1 enabled
Topologies with DMIC1 passthrough capture are added to development
directory with 16 and 96 kHz rates. Also a topology with DMIC0
changed to 96 kHz is added as example to test DMIC0 with other
than default rate.

The new topologies are:
	- sof-hda-generic-cavs25-4ch-48k-16k
	- sof-hda-generic-ace1-4ch-48k-16k
	- sof-mtl-sdw-cs42l42-l0-max98363-l2-4ch-48k-16k
	- sof-mtl-sdw-cs42l42-l0-max98363-l2-4ch-48k-96k
	- sof-mtl-sdw-cs42l42-l0-max98363-l2-4ch-96k
	- sof-mtl-max98360a-rt5682-4ch-48k-16k
	- sof-mtl-max98360a-rt5682-4ch-48k-96k

The DMIC1 PCM ID with 96 kHz is set to 22 (capture ultrasonic).
PCM IDs definition is in:
https://github.com/thesofproject/sof/files/14021187/PCMDeviceList.txt

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-04-16 12:35:29 +01:00
Seppo Ingalsuo 32050ba5aa Tools: Topology2: Add pass-through capture for DMIC1
This patch optionally includes dmic1-passthrough.conf if
DMIC1_ENABLE is set in topologies build to passthrough.

The sample rate of DMIC1 DAI can be set to 8 - 96 kHz with
macro DMIC1_RATE.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-04-16 12:35:29 +01:00
Seppo Ingalsuo ccf80dbdfc Tools: Topology2: Use rate definition in dmic-generic.conf
The added DMIC0_RATE allows to use the DAI, pipelines, and PCM with
any supported rate for DMIC in range 8 - 96 kHz. E.g. configure
DMIC0 to 96 kHz.

There is no change to existing functionality with default 48 kHz rate.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-04-16 12:35:29 +01:00
Seppo Ingalsuo bc7b29321e Tools: Topology2: Add format to all widgets in dmic-generic.conf
The input audio format and output audio format definitions are
missing for the copiers and IIR. The formats are added in
preparation to be able to set non-default sample rate for all
widgets.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-04-16 12:35:29 +01:00
Seppo Ingalsuo 20c7c7963f Tools: Topology2: Add DMIC1 defaults definitions
The needed defaults for DMIC1 for PCM ID and sample rate are added
similarly as for DMIC0 for later use. DMIC1 related pipelines are
not used by default so DMIC1_ENABLE is set to false.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-04-16 12:35:29 +01:00
Seppo Ingalsuo 660e27809e Tools: Topology2: Add include of mtl.conf for LNL HDA generic
This quick fix avoids build of NHLT blob for the default (TGL)
for LNL HDA generic platform.

The DMIC part of NHLT from TGL is not suitable for LNL, while a
blob for MTL can be used. A proper lnl.conf will be added later.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-04-15 14:09:04 +01:00
Bard Liao 2e71793421 Topology2: sof-tgl-rt712: remove SDWx from stream name
The widget name size will exceed the character limit and lead to below
error

failed to find module info for widget
alh-copier.SDW0-Playback-SimpleJack.0 with UUID
00000000-0000-0000-0000-000000000000

Shorten the stream name to fix it.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2024-04-09 13:13:51 +03:00
Kai Vehmanen 07b762e0ae topology2: pipeline: add constraints on pipeline.priority attribute
Add constraints on valid pipeline priority values and document
the semantics so that 0 is considered the highest priority and such
pipeline should be run first.

The range matches definitions in include/ipc4/pipeline.h and
SOF_IPC4_MAX_PIPELINE_PRIORITY.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-05 21:13:37 +03:00
Pierre-Louis Bossart 1e9a497316 topology2: add support for MTL HP Omen14
This device has RT711 on link0, RT1316 on link3 and 2 PCH-attached DMICs.

Add 3 configurations with no DMIC, 4 DMIC and 2 DMIC. For now no
support for -pdm1.

Link: https://github.com/thesofproject/linux/issues/4880
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2024-04-05 13:54:03 +03:00
Laurentiu Mihalcea aaf2f11eb9 nxp: imx93: Switch to native Zephyr drivers and timer domain
Starting with this commit, i.MX93 now uses the timer domain
in conjunction with the Zephyr native drivers.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-03-25 15:12:00 +02:00
Laurentiu Mihalcea 2711784ed5 tools: topology1: imx8ulp: change protocol and BCLK polarity
The BT codec used by the IW416 chip expects FSYNC to be
asserted for only one BCLK. Also, FSYNC should be active HIGH.
As such, change from I2S protocol to DSP_A protocol since the
configurations made for this protocol inside the SAI driver
are more suited.

Also, by default, the BT codec drives data on BCLK rising
edge and samples it on falling edge. With the DSP_A protocol,
the SAI driver also has the same configuration, which is wrong
since we can't drive and sample on the same edge and cycle. As such,
invert BCLK polarity such that the SAI will drive on rising edge
and sample on falling edge.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-03-25 12:31:02 +02:00
Laurentiu Mihalcea bbd20a9766 tools: topology1: imx8ulp: correct BCLK frequency
8ULP has two supported BT HFP scenarios: NBS and WBS. For
NBS the frequency of FSYNC is 8k, while for WBS the frequency
of FSYNC is 16k. Since the BCLK is computed as:
	Freq(BCLK) = TDM_SLOTS * TDM_SLOT_WIDTH * Freq(FSYNC)
then that means we're going to end up with two different BCLK
frequencies (one for each supported scenario).

Currently, what we do is pass the frequency of FSYNC
as a build argument, while keeping the frequency of BCLK
constant (set to 256000, which would be the same value as the
one used in WBS). This causes the following issues:

	1) The Zephyr native SAI driver returns an error
	when trying to commit the configuration because the
	frequency of BCLK doesn't abide by the aforementioned
	formula.

	2) We end up consuming twice as many samples in a given
	unit of time.

To fix these issues, use the aforementioned formula to compute
the frequency of BCLK.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-03-25 12:31:02 +02:00
Laurentiu Mihalcea 03dd62abbd tools: topology1: imx8ulp: rename `RATE` to `FSYNC_RATE`
Rename the `RATE` parameter to `FSYNC_RATE` in order to
remove ambiguity regarding what the parameter is.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-03-25 12:31:02 +02:00
Mac Chiang 980f193d09 topology2: sof-mtl-rt5650: add SSP FMT 24 bits support
Use 24 bits format on playback and capture pipelines if codec needs,
e.g. RT5650 HS/SPK codec.

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
2024-03-22 10:26:28 +02:00
Mac Chiang 7bd3f0c6e8 topology2: fix nhlt binary file naming
All topologies are built in parallel. The same name will lead
to file overrides. Therefore, correct to use the respective file
names properly.

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
2024-03-22 10:26:28 +02:00
Mac Chiang 1004762500 topology2: remove USE_CHAIN_DMA flag as it's applied to iDisp links.
The CHAIN_DMA has been replaced with HDMI_USE_CHAIN_DMA, which was already
enabled by default on iDisplay HDAudio codec in hdmi-default.conf.

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
2024-03-22 10:26:28 +02:00
Mac Chiang 859c23c567 topology2: cavs-mixin-mixout-eqiir-dts: fix the indentation
Replace whitespaces with tabs.

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
2024-03-22 10:26:28 +02:00
Mac Chiang d49cfe5e46 topology2: cavs-mixin-mixout-ssp: fix the indentation
Replace whitespaces with tabs.

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
2024-03-22 10:26:28 +02:00
Johny Lin 6c3bd4791b topology2: cavs-rt5682 separate variants for google aec
When Google RTC AEC is not ready to launch, it shouldn't be included
in production builds for Chromebook. This commit removes Google RTC
AEC from the current variants while making another copy with suffix
"-google-aec".

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2024-03-20 11:30:53 +02:00
Kai Vehmanen 6bdbf7186e topology2: sof-tgl/adl-nocodec: disable multicore
Multicore is not working correctly for Intel cAVS2.5 in Zephyr
upstream and the fixing will take a longer time, so disable
this feature in nocodec configuration.

Link: https://github.com/thesofproject/sof/issues/8942
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-03-15 18:30:45 +02:00
Seppo Ingalsuo 727ad82997 Tools: Topology2: Add IIR, FIR, DRC to HDA analog playback
This patch replaces pipeline mixout-gain-dai-copier-playback with
mixout-gain-efx-dai-copier-playback. The purpose is to allow
enhance of audio playback quality with equalizers (IIR and FIR)
and dynamic range control (DRC).

The components are programmed by default to passthrough for minimal
overhead. They can be activated via sof-ctl or UCM with ALSA controls.

- Post Mixer Analog Playback IIR Eq bytes
- Post Mixer Analog Playback FIR Eq bytes
- Post Mixer Analog Playback DRC bytes
- Post Mixer Analog Playback DRC switch

The recommendation is to keep headphone playback flat and enable
processing only when HDA output is in speaker mode.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-03-14 10:40:43 +02:00
Andy Ross ba9f8fc8ab topology1/mt8195: Add Graphviz output markers
Add the .dot file header/footer macros.  These are benign if unused,
and it seems like most other devices have them defined.

Signed-off-by: Andy Ross <andyross@google.com>
2024-03-11 11:43:08 +02:00
Seppo Ingalsuo 259c923a23 Tools: Topology2: No need for HDA platform variants for benchmark tplg
Since there is no NHLT blob included to these topologies, the same
topology works for all HDA platforms, e.g. TGL, MTL, LNL.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2024-03-05 16:03:44 +02:00
Iuliana Prodan 3ab82dceb2 topology2: add topology for imx8MP
Add playback topology for i.MX8MP with wm8960 codec

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-02-21 14:10:27 +02:00
Iuliana Prodan b3989330f9 topology2: add SAI as dai_type
Add SAI as dai_type for dai-copier component.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-02-21 14:10:27 +02:00
Iuliana Prodan cc29b337d0 topology2: add SAI DAI class
Add SAI DAI class definition, SAI DAI objects can be
instantiated as:

Object.Dai.SAI."N" {
    direction		"duplex"
    dai_name		"NoCodec-0"
    id 			0
    Object.hw_config."0" {
	    mclk_freq	12288000
	    bclk_freq	3072000
	    tdm_slot_width	32
    }
    Object.dai."playback" {
	    period_source_count	2
	    period_sink_count	0
    }
    Object.dai."capture" {
	    period_source_count	0
	    period_sink_count	2
    }
}

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-02-21 14:10:27 +02:00
Iuliana Prodan f3533bcd42 topology2: move gain-playback/capture pipelines out of cavs
Move gain-playback/capture pipelines out of cavs folder
since these can used by others.

Update cavs topologies to fix compilation by adding
include/pipelines as searchdir.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-02-21 14:10:27 +02:00
Iuliana Prodan c105d89031 topology2: move common_definitions to common folder
Move common_definitions.conf to common folder since this
will be used by other companies to define their topologies.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-02-21 14:10:27 +02:00
Ranjani Sridharan e9352299db topology2: sof-plugin: Add noise suppression module to the capture path
Add the conf file for the OpenVino noise suppression module and
introduce the module in the capture path in the plugin topology when
noise suppression is enabled. ATM, only 16K capture is supported by the
model, so change the input/output rates for the host/dai modules in the
plugin capture pipeline.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2024-02-16 21:45:27 +02:00
Iuliana Prodan a6700afea1 topology1: imx8ulp: overwrite CHANNELS_MIN
On 8ULP SAI is connected to BT which supports
only 1 channel for both playback and record.

Fixes: aaff352314 ('topology1: pipe-volume-capture.m4: Set minimum number of channels to 2')

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2024-02-12 20:07:47 +02:00