Commit Graph

1980 Commits

Author SHA1 Message Date
Seppo Ingalsuo 5af59eb5cc Tools: Tplg_parser: Add include of <linux/types.h>
These headers include alsa/sound/asoc.h and some versions of the
headers have this conditional include of types.h:

	#if defined(__linux__)
	#include <linux/types.h>
	#endif

To ensure types __le64, __le32, __le16, __u8 are defined explicitly
include types.h becore including asoc.h.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-05-15 11:49:43 +03:00
Ranjani Sridharan 8c005ef6a9 topology2: sof-lnl-nocodec-fpga: Add 2ch DMIC topologies
Build the 2ch topologies with either PDM0 or PDM1 enabled.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-15 11:26:12 +03: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
Ranjani Sridharan 2185d4a04b audio: buffer: Realloc buffer with alignment
When the DMA buffer is reallocated pass the alignment argument to honor
the buffer address alignment that was used originally. Update the
buffer_set_size() to pass the requested alignment and all its users.
This is particularly needed in the case of host and DAI DMA buffers that
query the buffer address alignment from the DMA driver while allocating
the DMA buffers.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-12 10:48:48 +03:00
Rander Wang 406e660a34 topology2: add google rtc aec support
Add google rtc aec in topolog for chrome project

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-05-11 12:46:44 -07:00
Rander Wang 912408822c topology2: add google-rtc-aec-reference
Top topology can include this conf file to enable google rtc aec

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-05-11 12:46:44 -07: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
Rander Wang ff5c10337f topology2: add google rtc aec module support
Goolge rtc aec only supports 16bits input & output and 2 channels

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-05-11 12:46:44 -07:00
Ranjani Sridharan 4123f95353 topology2: cavs-nocodec: Build LNL nocodec topology
Build LNL nocodec topology with simple copier-copier pipelines.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-11 19:03:21 +03:00
Ranjani Sridharan 142b8de409 topology2: intel: dmic-generic: Implement passthrough option
Add the host and IO gateway pipelines when the passthrough option is
chosen and connect them.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-11 19:03:21 +03:00
Ranjani Sridharan 88ead25037 topology2: intel: dmic-generic: Make processing pipelines optional
In preparation for adding copier-copier pipeline, make the processing
pipelines conditional. There is no change in functionality or
definitions. This is purely to make it easier to exclude the
pipelines/pcms/routes from the final topology.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-11 19:03:21 +03: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 19d9cce4cf topology2: cavs-nocodec: Implement passthrough option
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>
2023-05-11 19:03:21 +03:00
Ranjani Sridharan 5ea630dbef topology2: cavs-nocodec: Make the processing pipelines optional
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>
2023-05-11 19:03:21 +03:00
Ranjani Sridharan d37da44c39 topology2: cavs-nocodec: Make io-gateway for SSP1 capture conditional
It should be added only if SSP1 is enabled

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-11 19:03:21 +03:00
Seppo Ingalsuo 1cc853d1e9 Audio: SRC: Use only module API and fix IPC4 capture direction
This patch cleans up SRC component. There is no need to keep
IPC3 version build with legacy component interface. The patch
mainly removes code under CONFIG_IPC_MAJOR_3 and makes some
functions available for all builds from CONFIG_IPC_MAJOR_4.

The IPC4 capture issue is fixed by using the src_init()
IPC rates for source and sink rate initialize. It needs a
similar kernel update to always set those values. In practical
topologies in prepare the buffers may not contain the correct
stream information because the order of host copier and
dai copier pipeline prepare can be host first where capture
SRC is usually placed.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-05-10 19:01:31 +03:00
Rander Wang c605296636 topology2: add multicore support for CI test
create another topology to test multicore since Currently we have done
too much work in cavs-nocodec and CI test will be failed for main branch
is not ready for multicore feature.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-05-10 17:12:30 +03:00
Seppo Ingalsuo 81060d9b88 Tools: Tune: Add to DMIC modes generate alsa-utils export
This patch adds export format for header file that alsa-utils
uses. Automatic generation is much more convenient than hand
editing when there is update need.

The patch also contains some cleanup of unused code and small
code improvement. There are no changes to exported coefficients
values.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-05-10 11:28:33 +03:00
Yong Zhi 04749b9c41 topology2: dmic-generic: add macro for DMIC_CORE_ID
Add macros to quickly enable multi-core with DMICs.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-05-08 19:55:02 -07:00
Bard Liao a3cb46d8c0 topology2: cavs-sdw: make jack optional
We assume sdw jack is always there in a sdw topology. This commit
makes it be optional to deal with the sdw amp only case.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-05-08 09:17:44 -07: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 3c39c2c996 topology2: cavs-sdw: Enable PDM 1 mics for 4ch
It would be better to make these dependedent on NUM_DMICS. Something to
improve in a follow up PR.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-05 19:42:29 +03:00
Seppo Ingalsuo 43b08c62b5 Tools: Test: Audio: Convert tabs to spaces in comp_run.sh
No script changes, just unify shell script style to be
with indents with spaces instead of both tabs and spaces.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-05-04 18:07:52 +03:00
Seppo Ingalsuo b4af9d93a1 Tools: Test: Changes for process_test.m run with xt-xcc
This patch adds to process_test() sixth argument to run the tests
with xt-run environment with argument set to 'xt-run' or
'xt-run --turbo'.

The set and print of LD_LIBRARY_PATH is no more needed with static
testbench version.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-05-04 18:07:52 +03:00
Seppo Ingalsuo 10d0b3b5e1 Scripts: Add xt-run build target for rebuild-testbench.sh
This patch adds to rebuild-testbench option -x <platform> that
can be used to build testbench for xt-run execution. The enhanced
script reuses native testbench build but with CC, LD, LDFLAGS,
etc. defines to use the xt-xcc compiler for build.

Currently TGL (HiFi3) is the only supported platform. More will
be added later.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-05-04 18:07:52 +03:00
Seppo Ingalsuo a380d21d85 Tools: Testbench: Fixes for xt-xcc build and cycles counting
This patch avoids the build errors. Most of the issues are
from different types for formatted printing in gcc vs. xt-xcc.

The "__attribute__ ((fallthrough));" is not supported in xt-xcc.

The xtensa C library does not have clock_gettime() so it is
only left out from build. The cycles count and MCPS is printed
instead.

The include of dlfcn.h is not needed since the testbench no
more has dynamic libraries.

Structs within structs need to be initialized to zero in xt-xcc
with multiple brackets.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-05-04 18:07:52 +03:00
Iuliana Prodan 6580e68302 topology: imx: Add mixer topology file for i.MX8 and i.MX8MP with wm8962 codec
Generate MIXER topology file for i.MX8 and i.MX8MP with wm8962 codec
based on sof-imx8-wm8960-mixer.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-05-04 16:43:50 +03:00
Iuliana Prodan 5846763006 topology: imx: Combine mixer topology files for i.MX8MP and i.MX8
Combine mixer topology files for i.MX8MP and i.MX8 using different
variables like RATE, SAI_INDEX, CODEC.

Based on CODEC and SAI_INDEX use the proper DAI_CONFIG or STREAM_NAME.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-05-04 16:43:50 +03:00
Iuliana Prodan aeaa96e0b4 topology: imx: Add EQ topology file for i.MX8MP and i.MX8 with wm8962 codec
Generate EQ (fir and iir) topology file for i.MX8MP and i.MX8
with wm8962 codec.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-05-04 16:43:50 +03:00
Iuliana Prodan 67fa702308 topology: imx: Combine base topology files for i.MX8MP and i.MX8
Combine base topology files for i.MX8MP and i.MX8 using different
variables like RATE, SAI_INDEX, CODEC.

Based on CODEC and SAI_INDEX use the proper DAI_CONFIG or STREAM_NAME.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-05-04 16:43:50 +03:00
Iuliana Prodan 181777dea1 topology: imx: Add SRC topology file for i.MX8 and i.MX8MP with wm8962 codec
Generate SRC topology file for i.MX8 and i.MX8MP with wm8962 codec
based on sof-imx8-src-wm8960.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-05-04 16:43:50 +03:00
Iuliana Prodan e08be9c2d7 topology: imx: Combine SRC topology files for i.MX8MP and i.MX8
Combine SRC topology files for i.MX8MP and i.MX8 using different
variables like RATE, SAI_INDEX, CODEC.

Based on CODEC use the proper DAI_CONFIG or STREAM_NAME.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-05-04 16:43:50 +03:00
Iuliana Prodan ac99aaf5b9 topology: imx: Add compress topology file for i.MX8 with wm8962 codec
First, combine compress topology file for i.MX8 (i.MX8QM and i.MX8QXP)
with different codecs, stream name, rate by using CODEC and RATE variables.
Based on CODEC use the proper DAI_CONFIG.

Using the above variables, add new compress topology file for
i.MX8 with wm8962 codec.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-05-04 16:43:50 +03:00
Iuliana Prodan cc77454f86 topology: imx: Add compress topology file for i.MX8MP with wm8962 codec
First, combine compress topology file for i.MX8MP with different codecs,
stream name, rate by using CODEC and RATE variables.
Based on CODEC use the proper DAI_CONFIG.

Using the above variables, add new compress topology file for
i.MX8MP with wm8962 codec.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-05-04 16:43:50 +03:00
Iuliana Prodan 3ad5ace14d topology: imx: Rearrange topologies based on platform
Rearrange topologies, from development folder, based on
platform type: imx8 and imx8mp.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-05-04 16:43:50 +03:00
Iuliana Prodan 9c48a89f2e topology: imx8: correct comments for compress tplg
Update comments for compress typologies to reflect the correct
flow and the use for each file.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-05-04 16:43:50 +03:00
Iuliana Prodan 1b5dae791d topology: imx8mp: correct comments for compress tplg
Update comments for compress typologies to reflect the correct
flow and the use for each file.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-05-04 16:43:50 +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
Chao Song fabeb63842 Topology2: Add mtl-rt711-l0-rt1316-l23-rt714-l1 support
This topology could be used by MTL SDW RVP with 3-in-1
SDCA codec board, or other hardware configuration with
the same codec layout:
    SDW0: RT711 Headphone
    SDW1: RT714 DMIC
    SDW2: RT1316 Speaker
    SDW3: RT1316 Speaker

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2023-04-27 10:29:34 +03:00
Chao Song d3e3943bad Topology2: add comment to separate chromebook topology clearly
Add a single comment to separate chromebook topologies
from non-chromebook topologies.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2023-04-27 10:29:34 +03:00
Ranjani Sridharan 0140c43099 topology2: Set the deepbuffer PCM D0i3 compatibility conditionally
Set the deep buffer PCM as D0I3 compatible only for MTL.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-04-27 10:25:45 +03:00
Seppo Ingalsuo b3d1583f3c Audio: Component: Update to component.h module adapter conversions
In component.h the eq_iir and mixer have still the old component
API function prototypes. They can be removed as not needed. These
components do not support legacy mode.

Similar update is done to testbench common_test.h. The function
prototypes there are duplicate since they are now available in
component.h.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-04-25 10:39:50 +01:00
Laurentiu Mihalcea 88c8c1eb27 tools: topology1: Add topology for i.MX93
As the name suggests, this commit introduces a new topolgy
used for i.MX93.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-04-24 22:06:58 +01:00
Yong Zhi a706f40433 topology2: Enable chain DMA for MTL cavs-rt5682 topologies
Enable ChainDMA to support 16/32bit, channels_max 8 HDMI playback.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-04-24 12:24:36 +03:00
Kai Vehmanen be43b4e4eb topology1: fix buffer size calculation if period-size >44ms
Calculation of SOF_TKN_BUF_SIZE in COMP_PERIOD_FRAMES() macro
led to incorrect results with large period size values.
For example at 48000Hz sampling rate, period size larger than
44739us would be incorrectly calculated.

This happens as m4 eval does arithmetic in 32bit signed values
and multiplication of period size and sampling rate can easily
exceed 2^31.

Fix the issue by splitting the arithmetic in steps that
fit available value range.

Link: https://github.com/thesofproject/sof/issues/7476
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-04-24 11:49:04 +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
Bard Liao 6f96d0f37e topology2: rename NUM_SDW_AMPS to NUM_SDW_AMP_LINKS
NUM_SDW_AMPS refers to how many sdw links are used by the amp pcm.
Rename to NUM_SDW_AMP_LINKS for less confusing.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-04-21 20:48:09 +03:00
Ranjani Sridharan 228ecf5768 topology2: hdmi-generic: Fix audio format for DAI copier
It should only support 32-bit format for input and output.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-04-20 23:04:38 -07: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
Yong Zhi ffe0ce68a1 topology2: cavs-rt5682: remove 24-bit override in mixout-gain-dai-copier-playback
With 208c2049f ("topology2: deep buffer: use 32 bits to align with
other pipeline"), we can remove this override now.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-04-19 21:59:41 -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
Iuliana Prodan ae0869fe2d topology: imx: Add topology file for i.MX8MP with wm8962 codec
Add new topology file for i.MX8MP with wm8962 codec.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-04-07 18:41:19 -05:00
Iuliana Prodan 7550fb7e35 topology: imx: Combine topology files for i.MX8MP with different options
Combine topology files for i.MX8MP with different codecs and rate, by
using CODEC and RATE variables.
Based on CODEC use the proper DAI_CONFIG.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-04-07 18:41:19 -05:00
Iuliana Prodan 6687c298f2 topology: imx: Add topology file for i.MX8QM with wm8962 codec
Add new topology file for i.MX8QM with wm8962 codec.

While here, use CODEC variable to differentiate between wm8960
and wm8962.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-04-07 18:41:19 -05:00
Iuliana Prodan 0b1d10b099 topology: imx: Rearrange topologies based on platform
Rearrange topologies based on platform type: imx8,
imx8mp and imx8ulp.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-04-07 18:41:19 -05:00
Seppo Ingalsuo 22c0e235bc Audio: TDFB: Convert to module adapter
This patch converts the time domain fixed beamformer (TDFB) into
module adapter API.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-04-06 22:05:08 +01:00
Pin-chih Lin 975dc84e1e topology1: set lower priority for DMIC task in GOOGLE_RTC_AUDIO case
When GOOGLE_RTC_AUDIO is applied, Speaker and DMIC pipeline tasks are
scheduled in the same domain. The AEC function in GOOGLE_RTC_AUDIO
has the hard requirement for input sample synchronization between DMIC
input and Echo reference (sourced from Speaker).

At present, both pipelines are pri-0 so the task order in schedule
list depends on which pipeline starts first. This commit sets DMIC as
pri-1 when GOOGLE_RTC_AUDIO is applied to make sure that DMIC task
will be always put after Speaker task, which guarantees the
requirement for input sample synchronization.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2023-04-06 21:50:18 +01:00
Ranjani Sridharan 650423feb1 topology2: Move the hw_config class definition
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>
2023-04-05 13:32:30 -07:00
Ranjani Sridharan ada8950551 topology2: ssp: Add blob version
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>
2023-04-05 13:32:30 -07:00
Jyri Sarha 525e7e39d1 topology2: Enable chain DMA for MTL sof-hda-generic* topologies
This change sets USE_CHAIN_DMA=true for sof-hda-generic-2ch
and sof-hda-generic-4ch mtl targets in sof-ace-tplg directory.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-04-05 19:58:48 +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 c94dca8be1 topology2: sof-hda-generic: No need to include dai-copier-gain-mixin-capture
It is not used in the topology.

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
Kai Vehmanen afb2d913ca sof_ri_info: add ADL-N product key information
Add ability to recognize the ADL-N product key.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-04-04 14:56:04 +03: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
Fred Oh 2de0b86ac3 topology2: cavs-nocodec: set dmic 4 channels for MTL
MTL nocodec devices have been configured with DMIC 4 channels.
The topology should be aligned with it.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2023-03-30 10:41:26 -07:00
Liam Girdwood b5aaf6d068 testbench: strip out threading for pure xt-run usage.
Strip out all the threading and cache debug to become a pure xt-run
application. This removes a lot of code, including in the host LL
scheduler.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2023-03-30 11:42:42 +01:00
Liam Girdwood 968e0404ed tools: tplg_parser: abstract topology APIs in preparation for IPC4
Abstract the topology APIs to provide support for other IPC ABIs and
further simplify the codebase. Makse sure all public APIs have the tplg
prefix and make sure private APIs are in the correct places.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2023-03-30 11:42:42 +01:00
Chao Song 843fd70e91 topology2: cavs-nocodec: include SSP1 pipelines conditionally
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>
2023-03-29 15:17:48 +03:00
Ajye Huang 5aa1545686 topology: sof-adl-rt1019-rt5682: add bluetooth offload uses SSP2 link
Adding support for Bluetooth offload.

sof-adl-rt1019-rt5682, and sof-adl-rt1019-rt5682-waves:
    rt5682 headphone connects SSP0 link.
    rt1019 Amp speakers connects SSP1 link.
    bluetooth offload uses SSP2 link.
Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
2023-03-29 15:05:48 +03:00
MARUTHI MACHANI 00b2bf65ed topology1: topology changes to enable tdm without virtual dai.
topology changes to enable tdm without virtual dai.

Signed-off-by: MARUTHI MACHANI <maruthi.machani@amd.com>
2023-03-24 16:40:10 +00:00
Seppo Ingalsuo e0d8078fa7 Tools: Testbench: Avoid need linux kernel headers in build
This patch adds simplified linux/types.h into testbench headers
to enable include of ALSA asoc.h to build without other difficult
kernel headers content.

The CMakeLists.txt files are updated to make a build time copy of
asoc.h to subdirectory include of the build directories. The new
directory is added to headers path.

This change avoids build fail with xcc toolchain that can't use the
gcc toolchain headers from the system where the ALSA headers are
located.

Suggested-by: Marc Herbert <marc.herbert@intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-03-20 19:33:55 +02:00
Seppo Ingalsuo 5ac5b6b84c Tools: Tplg_parser: Fix void pointer arithmetic
Pointer arithmetic with void pointer is not allowed. Functions
get_token_uint32_t() and get_token_comp_format() are updated
to handle correctly the bytes offset.

Functions get_token_dai_type() and get_token_process_type() are
updated to similar pointer arithmetic style as previous.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-03-17 12:02:34 +00:00
Bard Liao 7b66c30263 topology2: cavs-sdw: set capture host in_valid_bit_depth = 32
For some reason the input valid bit depth was 16. But the output
valid bit depth of the previous widget is 32. Fix it to 32 now.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-03-17 12:00:51 +00:00
Seppo Ingalsuo da9344a6ad Tools: Testbench/tplg_parser: Check -Wimplicit-fallthrough support
The xt-xcc compiler RG-2017.8 does not support -Wimplicit-fallthrough
option. Add to CMakeLists.txt files check for the option and use it if
it is supported.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-03-17 11:08:58 +00:00
Liam Girdwood 6b03dde9fd tplg_parser: tokens: print a helpful error for invalid data
Print out error data when invalid private data is found.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2023-03-15 13:23:42 +00:00
Liam Girdwood ce37e802f4 tools: tplg_parser: parse topology in memory and not in file.
Reduce complexity by parsing all topology objects in memory rather than
by seeking file, reading into allocated memory and then freeing memory.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2023-03-15 13:23:42 +00:00
Liam Girdwood 97414e12a8 fuzzer: remove old fuzzer
The original fuzzer has been deprecated for some time now. Remove it.

All fuzzing now done by OSS-fuzz

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2023-03-15 13:23:42 +00:00
Marc Herbert 2a402ff6d5 topology2: extract new "tplg-targets.cmake" files from CMakeList.txt
The CMakeList.txt files in tools/topology/ have always confused two
different things:

- the list of .tplg files to generate, and
- the CMake logic used to invoke alsatplg and generate them.

Separate the two at last thanks a dead-simple `include()` command.  If I
had knew it was so easy I would have done this much sooner.

The `tools/build_tools/` directory is identical before versus after this
commit.

This will make it much faster to identify what actually changes in
future commits and pull requests.  This will also make CODEOWNERS
smarter and reduce Github notification noise.

Don't do it for topology1 to minimize churn and git disruption in
backports. Topology1 is not very active any more whereas topology2 has
never been released yet.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-03-14 12:59:20 +00:00
Marc Herbert 66b7489032 topology2: copy CMakeLists.txt files as is to new tplg-targets.cmake
Decompose the split in the next commit into two steps to maximize git's
similarity index and facilitate git blame, cherry-pick/rebase, merge,
etc.

The new files are unused in this first commit so git bisect is not
affected.

Changing one-character in the source files also helps: compare git show
-C with git show -C -C. It's also a good clue for the reader when not
using -C.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-03-14 12:59:20 +00:00
Seppo Ingalsuo f73055aa71 Tools: Testbench: Change struct of struct zeros initialize
The simple {0} is not accepted by xt-xcc compiler. It gives
"warning: missing braces around initializer".

Adding sufficient number of braces to match the struct definition
fixes the build.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-03-13 10:00:48 +02: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
Chao Song 4fa38d9b53 topology2: add cpc value for gain
The missing cpc in gain component results in wrong
calculation for clock selection, and causes capture
issues.

Link: https://github.com/thesofproject/sof/issues/7228
Link: https://github.com/thesofproject/sof/issues/7230

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2023-03-10 16:09:11 +02:00
Guennadi Liakhovetski b637889efb platform: remove support for cAVS 2.0 platforms
Remove all support for cAVS 2.0 platformsm including Ice Lake and
Jasper Lake, they aren't supported any more.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-03-07 14:02:18 +02:00
Seppo Ingalsuo e83d67d426 Tools: Topology2: Add high-pass IIR to SDW headset capture
This patch changes the DAI passthrough pipeline in cavs-sdw.conf
based topologies to similar pipeline but with IIR high-pass. The
cut-off frequency is 40 Hz and gain is 0 dB. The same high-pass
is used for HDA codec.

The change suppresses most of DC signal pop noise from the
beginning of capture or after press of headset button.

The impacted topologies from current build are:

cavs-sdw, mtl-sdw, sof-tgl-rt711-rt1316-rt714,
sof-adl-rt711-l0-rt1316-l12-rt714-l3,
sof-tgl-rt715-rt711-rt1308-mono, sof-tgl-rt711-rt1308-4ch,
sof-adl-rt711-4ch, sof-mtl-rt711-4ch

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-03-06 12:20:01 +00:00
Jyri Sarha 3ad30d576c topology2: pipeline: Add "kcps" attribute
Adds kcps attribute to pipeline class with 0 default value.

The default can be overrided with KCPS_PIPELINE_DEFAULT define.

Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
2023-03-03 15:46:03 +00:00
Guennadi Liakhovetski dc9ba281d7 platform: remove support for cAVS 1.8 platforms
Remove all support for cAVS 1.8 platformsm including Cannon Lake,
Comet Lake, Whiskey Lake and Coffee Lake, they aren't supported
any more.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-03-02 23:02:37 +00: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
Chao Song fd31092567 topology2: fix wov issue introduced by using array
Some minor issues introduced by using topology2 array,
fix them in this patch.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2023-03-02 22:26:34 +00:00
Yong Zhi 1a64c10306 topology2: enable EchoRef for sof-mtl-max98357a-rt5682-ssp2-ssp0
Include echo ref pipeline to Rex config.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-03-02 12:45:24 +00:00
Guennadi Liakhovetski 0f0acaae94 platform: remove support for cAVS 1.5 platforms
Remove all support for cAVS 1.5 platformsm including Apollo Lake,
Sky Lake, Kaby Lake, Broxton and Gemini Lake, they aren't supported
any more.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-03-02 11:28:23 +00:00
Seppo Ingalsuo a639604dbb Tools: Topology2: Change PGA widget curve_duration to 20 ms
The previous value 10 is only 0.1 us that disables the gain
ramp totally and causes harsh sounding volume transitions.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-02-24 17:00:08 +00:00
Laurentiu Mihalcea 0a5c049ac0 Switch to using rtos/task.h instead of sof/schedule/task.h
The purpose of this commit is to separate XTOS-specific code
from the Zephyr-specific code found in sof/schedule/task.h.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-02-24 14:28:49 +02:00
Laurentiu Mihalcea 2115a7bfea Switch to using rtos/sof.h instead of sof/sof.h
The purpose of this commit is to separate the XTOS-specifc
code from the Zephyr-specifc code found in sof/sof.h.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-02-22 13:15:06 +00:00
Bard Liao 0235673845 topology2: add sof-adl-rt711-l0-rt1316-l12-rt714-l3 support
sof-adl-rt711-l0-rt1316-l12-rt714-l3.tplg is the same as
sof-tgl-rt711-rt1316-rt714.tplg

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-02-21 23:30:06 +00:00
Bard Liao 0f6cf837c7 topology2: use a macro to config if a sdw amplifier support feedback
Not all amplifiers support feedback. We should not add feedback support
on topology to shch amplifiers.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-02-21 23:30:06 +00:00
Bard Liao b407a1aab9 topology2: follow the same rule as pipeline and route id to assign ALH
index

We use the "pcm id * 10 + N" formula where N is from 0 to 9 to assign
pipeline and route id in f0a010052b ("topology2: cavs-sdw: group route
and pipeline index"). Now apply to ALH dai index.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-02-21 23:30:06 +00:00
Jyri Sarha d08b894945 Revert "topology2: avs-tplg: disable USE_CHAIN_DMA"
The known issues with the pipeline-free chain DMA implementation has
now been solved, so we can re-enable chain DMA usage.

This reverts commit c3807ae4a7.

Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
2023-02-21 23:23:59 +00:00
Yong Zhi 7fdc62375a topology2: cavs-rt5682: override BT playback pipeline id
Override the default PIPELINE_ID for BT_PB.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-02-20 16:16:43 +00:00
Guennadi Liakhovetski 17fbf7de22 platform: remove support for Sue Creek
Remove all support for Sue Creek platforms, it isn't supported any
more.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-02-20 15:46:16 +00:00
jairaj-arava d85d853c6c topology2: add second capture stream for DMIC0 for MTL topology
This patch adds second capture stream by means of copier module

Signed-off-by: jairaj-arava <jairaj.arava@intel.com>
2023-02-20 12:54:57 +02:00
Ranjani Sridharan b70ae5f6af topology2: Remove duplicate conf files
These are already in the common includes.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-02-17 09:16:34 +02:00
Ranjani Sridharan 45e4cc484d topology2: Move to using arrays for defining objects
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>
2023-02-17 09:16:34 +02: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
Guennadi Liakhovetski d80635054f platform: remove support for Broadwell and Haswell
Remove all support for Broadwell and Haswell platforms, they
aren't supported any more.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-02-16 16:19:36 +00:00
Kai Vehmanen cfeaceb394 topology2: use passthrough-capture-be instead of passthrough-be
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>
2023-02-15 19:18:16 +02: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
Chao Song 2f29bc31fc Topology2: add smart amp pipeline in nocodec topology
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>
2023-02-15 18:47:30 +02:00
Chao Song cc21dfa01a Topology2: add mixout-gain-smart-amp-dai-copier-playback pipeline
This patch adds mixout-gain-smart-amp-dai-copier-playback
pipeline.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-02-15 18:47:30 +02:00
Chao Song 82cedc1665 Topology2: add smart_amp widget class
This patch adds the widget class for smart_amp module

Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-02-15 18:47:30 +02:00
Ranjani Sridharan f829c30d6b topology2: tokens: Remove the payload_with_output_format token
The micsel will need to use the base config extension and the init
config type will need to be set in the manifest.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-02-15 18:47:30 +02:00
Seppo Ingalsuo 63598ee054 Tools: Tune: EQ: Use updated sof-ctl for tplg2 blob export
No more need for hard-coded blob header, sof-ctl provides
an up-to-date header so better to use it.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-02-15 11:36:51 +00:00
Uday M Bhat 9f318fd3d5 topology2: cavs-rt5682: Update BT offload SSP for MTL chromebook
For MTL chromebook, SSP 1 is used for BT offload with
cavs-rt5682 configuration

Co-developed-by: Jaska Uimonen <jaska.uimonen@intel.com>
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Co-developed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Uday M Bhat <uday.m.bhat@intel.com>
2023-02-15 11:28:20 +00:00
Jaska Uimonen b052563015 topology2: development: add hda efx pipelines
Add pipelines for iir and fir eq as EFX (endpoint effect) component in
hda.  Add HDA_CONFIG "efx" to compile efx versions of hda_generic
pipelines.

Add define EFX_IIR_PARAMS and EFX_FIR_PARAMS to define different iir and
fir parameters from separate conf files during compile time (default
"passthrough").

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2023-02-15 10:02:20 +00:00
Jaska Uimonen 568dd2457c topology2: add fir eq class
Add fir eq class with proper fir eq uuid.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2023-02-15 10:02:20 +00:00
Jaska Uimonen 984c61381c topology2: modify iir class to use needed params
Kernel is expecting audio formats and pin count for a process/effect
component, thus add it.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2023-02-15 10:02:20 +00:00
Pin-chih Lin feeb51f216 topology1: add PDM1 version for sof-adl-max98360a-rt5682-2way
Adds new topology build based on sof-adl-max98360a-rt5682-2way
with appending arg `-DDMIC_DAI_LINK_16k_PDM=STEREO_PDM1` for existing
ADL-P projects.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2023-02-14 16:10:28 +00:00
Libin Yang 813c7bd505 topology2: dmic-wov: refine wov pipeline id
As WoV may be used on HDA platforms, SDW platforms, as well as
nocodec platforms. Let's use a more safe pipeline ID for WoV.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2023-02-14 10:07:08 +02:00
Libin Yang f494b4c583 topology2: dmic-wov: fixup output_pin_binding
src_pin_binding has been renamed to output_pin_binding.
Fixup the name.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2023-02-14 10:07:08 +02:00
Libin Yang ace472f726 topology2: wov-detect: set num_xxx_audio_format
Set num_input_audio_formats and num_output_audio_formats for wov widget.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2023-02-14 10:07:08 +02:00
Libin Yang 857fb4c4fe topology2: wov: add D0i3 support
Add D0i3 support by setting attribute capture_compatible_d0i3.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2023-02-14 10:07:08 +02:00
Libin Yang eb36d58725 topology2: update the WoV config data
Now the abi header is changed and the config data is send through
large_config ipc message instead of init_instance ipc message.
Update the config data accordingly.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2023-02-14 10:07:08 +02:00
Libin Yang cbb4c277e5 topology2: wov-detect: set the virtual widget name
Set the virtual widget name.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2023-02-14 10:07:08 +02:00
Jyri Sarha 62b676727b topology2: Use new attribute references notation in route definitions
Changes all routes of form:
Object.Base {
	route.1 {
		source copier.host..1
		sink	gain..1
	}
	route.2 {
		source	gain..1
		sink mixin..1
	}
}

to

Object.Base {
	route.1 {
		source copier.host.$index.1
		sink	gain.$index.1
	}
	route.2 {
		source	gain.$index.1
		sink mixin.$index.1
	}
}

E.g. change ".." notation where the route index is expanded in between
the dots to explicit reference to the route index.

Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
2023-02-10 14:17:13 +02:00
Peter Ujfalusi 3bc70b6251 sof-ctl: Add initial support for handling blobs for IPC4
For IPC4 we are re-using the sof_abi_hdr to encapsulate the blob from/to
user space with minor deviation from IPC3:
- ABI magic is different
- the type is used as param_id in IPC4 (it carries the same functionality)

The IPC type can be specified with -i and defaults to 3 (IPC3).

-p is added as a new option for param_id, but -t and -p will do the same
thing.

After reading a blob, print a message for unexpected ABI magic number, but
do not block the execution.

To generate a header for 100 bytes payload:

For IPC3:
sof-ctl -g 100 -t 2
sof-ctl -i 3 -g 100 -t 2

For IPC4:
sof-ctl -i 4 -g 100 -p 2

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2023-02-10 10:53:55 +00:00
Guennadi Liakhovetski 89f7aa0abd platform: remove support for Baytrail and Cherrytrail
Remove all support for Baytrail and Cherrytrail platforms, they
aren't supported on the "main" branch any more. To build SOF for them
use the "table-v2.2" branch.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-02-08 13:36:04 +00:00
Rander Wang 208c2049f4 topology2: deep buffer: use 32 bits to align with other pipelines
Now deep buffer uses S24_LE but other pipelines use S32_LE internal format
. Chrome team found a bug that deep buffer can't work well with I2S codec
since fw only support S32_LE for I2S now.

This patch will use S32_LE to align with current requirement

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-02-08 13:35:32 +00:00
Yong Zhi 8dc72986e7 topology2: speaker-echo-ref: fix hardcoded dai_index
Do not hardcode dai_index to 1.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-02-08 13:34:18 +00:00
Seppo Ingalsuo 46bcb14ff6 Tools: Topology2: Add EQ configuration blobs
This patch adds a number of generic or effect type of blobs
to enable use of equalizers in topology2.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-02-08 12:01:32 +02:00
Seppo Ingalsuo 7c10e1e515 Tools: sof-ctl: Add IPC4 EQ blobs for testing
This patch adds a number of FIR and IIR blobs to apply in
run-time with sof-ctl.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-02-08 12:01:32 +02:00
Seppo Ingalsuo e26ef3a08c Tools: Tune: EQ: Code cleanup with no functional changes
Use of isempty() instead of length() to the check for non-empty
variable can avoid warnings in executing code in Matlab.

The unnecessary print of variable to console is removed. E.g.
struct bs, or biquad transfer function zeros vector a.

In system() command no need to store the console output, just
check the return status.

In switch-case statements no need for comma after case and
otherwise.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-02-08 12:01:32 +02:00
Seppo Ingalsuo 5ddbd34ba9 Tools: Tune: EQ: Add tplg2 blobs create
This patch contains the changes to export EQ blobs in both tplg1
IPC3 and tplg2 IPC4 formats.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-02-08 12:01:32 +02:00
Seppo Ingalsuo 5aa9a9e484 Tools: Tune: EQ: Matlab compatibility fix for parametric EQ
Every endif is changed to end. The endif works only in Octave.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-02-08 12:01:32 +02:00
Seppo Ingalsuo a0df1a6120 Tools: sof-ctl: Move IPC3 examples to subdirectory
This patch moves the existing .txt blobs for sof-ctl to directory
ipc3. There will be a similar new ipc4 directory.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-02-08 12:01:32 +02:00
Ranjani Sridharan f7dd181e99 topology2: Use input/output pin consistently
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>
2023-02-08 11:52:22 +02:00
Jaska Uimonen f63e5357fd topology2: enable BT offload in cavs-rt5682
Add bluetooth pipeline to rt5682 topologies.

Co-developed-by: Uday M Bhat <uday.m.bhat@intel.com>
Signed-off-by: Uday M Bhat <uday.m.bhat@intel.com>
Co-developed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2023-02-07 16:37:11 +00:00
Jaska Uimonen af970d6705 topology2: bluetooth pipeline fixes
Fixes for adding bluetooth pipeline to real codec topologies:

- change bt pipe copier indexes from 5-6 to 7-8 for not to collide with
  main level topologies. This indexing is now aligned with nocodec and
  rt5682 topologies.
- add big route indexes (50x) for not to collide with main level
  topologies.
- introduce BT_ID to separate from BT_INDEX to match machine driver.
- align bt-ssp-config-lbm.conf and bt-ssp-config.conf hw_config names.
- switch BT_PB_HOST_PIPELINE_SINK and BT_PB_DAI_PIPELINE_SRC as the route
  was defined wrong way around. This was compensated by route definition
  in cavs-nocodec-bt.

Co-developed-by: Uday M Bhat <uday.m.bhat@intel.com>
Signed-off-by: Uday M Bhat <uday.m.bhat@intel.com>
Co-developed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2023-02-07 16:37:11 +00:00