Commit Graph

1680 Commits

Author SHA1 Message Date
Kai Vehmanen 13ba5fe90c tools: add mtrace-reader.py
Tool to stream data from Linux SOF driver "mtrace" debugfs
interface to standard output. Plain "cat" is not sufficient
as each read() syscall returns log data with a 32bit binary
header, containing the payload length.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-08-31 10:33:46 +01:00
Liam Girdwood 7288d52ab6 testbench: cleanup the logging to use printf.
No point in doing a sprintf to a local buffer.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2022-08-29 14:11:29 +01:00
Liam Girdwood 2865cc2bb2 testbench: cmake: parser does not use CONFIG_LIBRARY cmake variable
Not used by parser cmakefile so delete.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2022-08-29 14:11:29 +01:00
Liam Girdwood 67ae353bfb tplg_parser: support building as static or shared library.
Allow the tplg_parser to built as either static or shared library.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2022-08-29 14:11:29 +01:00
Liam Girdwood d9f9340e1a tplg_parser: split out testbench logic and partition features per file.
This is another tplg_parser and testbench update on the road to provide
further flexibility around supporting new modules and IPC versions.
There will more to follow.

Changes are mostly mechanical code movements i.e. moving testbench related code
to the testbench, splitting the files into per module/component files and
making some functions static and public.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2022-08-29 14:11:29 +01:00
Liam Girdwood 03b4f30129 testbench: include stdlib.h
Newer GCC version complain about free() not being defined.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2022-08-29 14:11:29 +01:00
Chao Song 7882b1a93d topology2: add pin binding classes for multiple I/O queue
An IPC4 widget may support multiple I/O queue. Queue ID is
required during widget binding in route setup.

This patch adds sink_pin_binging and src_pin_binding classes
for multiple I/O queue support.

For widget requires special pin(queue) binding, sink_pin_binding
or src_pin_binding should be defined in the widget object. So
that the kernel knows which pin to use during widget binding
by parsing topology.

Note that pin binding should be defined for all sink/source pins
or for none. Even if there is only one sink pin requires special
pin binding, pin binding should be defined for all sink pins, and
for pins that are not used, give the value "NotConnected". This rule
applies to source pins, too.

Example: smart_amp widget has two sink pins and one source pin,
and its feedback sink pin requires special pin binding, so we have to
define sink_pin_binding objects within smart_amp object like this:

Object.Base.sink_pin_binding.1 {
    # the main sink pin is connected to host for playback data
    sink_pin_binding_wname	"copier.host.1.1"
}
Object.Base.src_pin_binding.2 {
    # the feedback sink pin is connected to capture dai for codec feedback.
    sink_pin_binding_wname	"copier.SSP.2.1"
}

In this example, smart_amp is connected to host and DAI directly,
it is also possible to be connected to host and DAI indirectly (with
gain or other widget in the middle).

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2022-08-29 13:26:49 +01:00
Chao Song 721e58f3d2 topology2: add num_sink/source_pins tokens for widget
These two tokens will be used by the kernel to decide the
supported number of sink/source pins, thus to allocate
correct widget queue id in route setup.

These two tokens are mandatory for IPC4 widgets, because
the default value in Linux kernel is zero, which is invalid
for queue id allocation.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2022-08-29 13:26:49 +01:00
Marc Herbert 92d828bc37 sof-logger: make inotify optional
Restores ability to compile on Windows with MSYS.

Fixes commit dcf0577a77 ("logger: allow starting before the driver is
loaded")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-08-29 13:24:40 +01:00
Marc Herbert 277985e687 tools: delete obsolete tools/.gitignore
We moved to CMake and out-of-source builds years ago.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-08-29 13:24:40 +01:00
Seppo Ingalsuo 04aa27103e Math: FFT: Switch to script generated twiddle.h
This patch adds script tools/tune/fft/export_twiddle.m. Since
the data in original twiddle.h differs by one LSB in few
items the file is replaced with one generated with the script.

The identifier 32 is added to header name and variables names
as preparation to add 16 bit FFT version.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-08-26 10:46:50 +01:00
Chunxu Li 8d9c5485c4 topology1: remove mt8186 unused topologies
Remove mt8186 unused topologies.

We use sof-mt8186 on our demo board, sof-mt8186-mt6366-rt1019-rt5682s
and sof-mt8186-mt6366-da7219-max98357 will no be used anymore.

Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
2022-08-25 16:20:26 +03:00
Rander Wang d40fb8fc99 topology2: add stream token in topology2
Add stream d0i3 token

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-08-25 13:24:25 +01:00
Marc Herbert e1d6b9a08a topology2: build only when alsatplg is v1.2.7 or greater
Fixes: #5323

The v1.2.6 requirement was a lie the whole time because alsatplg v1.2.6
does not have any `-I` option. The truth was: un-released alsa-utils
from git was required. The check for v1.2.6 was an approximation good
enough for many users but not for everyone, see for instance #5323.

Now that alsa-utils v1.2.7 has been released we can stop lying:
 https://github.com/alsa-project/alsa-utils/commit/7d934f3142549

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-08-18 13:36:49 +01:00
Laurentiu Mihalcea 3590936101 topology1: Add new i.MX topology for PCM capture using compress API
We add a new i.MX8MP topology which will use the compress API for PCM
capture. This topology is mainly used for testing.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2022-08-17 15:01:59 +03:00
Laurentiu Mihalcea b99bf48195 topology1: Add new i.MX topology for PCM playback using compress API
We add a new i.MX8MP topology which will use the compress API for PCM
playback. This topology is mainly used for testing.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2022-08-17 15:01:59 +03:00
Laurentiu Mihalcea cb38eec76e topology1: Add new i.MX topology for PCM capture using compress API
We add a new i.MX8Q(M/XP) topology which will use the compress API for
PCM capture. This topology is mainly used for testing.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2022-08-17 15:01:59 +03:00
Laurentiu Mihalcea 476b31ecdb topology1: Add new i.MX topology for PCM playback using compress API
We add a new i.MX8Q(M/XP) topology which will use the compress API for
PCM playback. This topology is mainly used for testing.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2022-08-17 15:01:59 +03:00
Laurentiu Mihalcea def03928d5 topology1: pcm: Add new macro for compress capture
We want to be able to create topologies for the case of
compress capture. This change will enable us to do so.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2022-08-17 15:01:59 +03:00
Laurentiu Mihalcea 9d54236675 topology1: pcm: Introduce compress parameter for pcm_capture_add_common
This change will allow us to prepare for adding a new macro
for the case of compress capture.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2022-08-17 15:01:59 +03:00
barry.jan 8efd627964 topology: add Waves for sof-mt8186-mt6366-rt1019-rt5682s tplg
Signed-off-by: barry.jan <barry.jan@waves.com>
2022-08-16 21:53:12 +01:00
Kai Vehmanen 87425baf22 probe-app: add support for non-audio probe buffers
Identify non-audio probe streams and write them out with ".bin"
extension and without the RIFF WAVE header.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-08-16 15:35:03 +01:00
Kai Vehmanen bd9168f676 probe-app: support non-word aligned probe data streams
Modify code to correctly handle probe streams where sync word
can occur at any byte boundary, and where probe packet size may
not be aligned to 32bit word size.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-08-16 15:35:03 +01:00
Kai Vehmanen e2a5d925ba probe-app: bail out if opening file fails
Do not blindly call fwrite without checking whether file open
succeeded or not.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-08-16 15:35:03 +01:00
Kai Vehmanen 89039c6bff probe-app: fix handling of buffer-id of zero
Don't assume buffer-id of zero is an invalid value.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-08-16 15:35:03 +01:00
Daniel Baluta 8a1b051940 topology1: codec_adapter: Remove ca_config bytes
After commit:
5763c74bf4 ("codec_adapter: Remove setup config from module data")
we no longer setup config bytes in codec adapter control bytes.

So, we need to remove ca_config bytes and fix payload size. This
didn't introduce any bug because this is the default
CA_SETUP_CONTROLBYTES. Each topology uses a custom control bytes
which overrides this default values.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2022-08-15 12:53:29 +01:00
Seppo Ingalsuo a328223ba5 Topology1: Allow S24_4LE and S32_LE playback with PCM4
This patch allows to test SRC with all 16/24/32 bit formats
in UP-squared device. Without this patch only 16 bit is
supported.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-08-10 07:54:39 +01:00
Daniel Baluta 6231528924 topology: Fix setup control bytes comments
setup config data was removed with commit
5763c74bf4 ("codec_adapter: Remove setup config from module data")
update documentation to reflect this.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2022-08-05 19:22:37 +01:00
Pierre-Louis Bossart 190cfd79f7 topology1: add SSP1 for all ES8336, SSP5 for APL/GLK
We apparently missed quite a few platforms with SSP1, and SSP5 is also
needed for APL/GLK.

One day we'll have a better way to add topologies, but so far it's
brute-force combinatorial addition. Oh well.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-08-05 12:28:12 +01:00
Kai Vehmanen 8881a406af topology: add sof-rpl-nocodec.tplg
Add nocodec topology for Intel Raptor Lake.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-08-04 16:22:56 +01:00
Kai Vehmanen f2bfa2824e topology: add sof-rpl-rt711 and sof-rpl-rt711-4ch topologies
Add new topologies for Intel Raptor Lake.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-08-04 16:22:56 +01:00
Kai Vehmanen 09944bc058 topology: Add platform definition file for Intel Raptor Lake
Start with Alder Lake definitions.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-08-04 16:22:56 +01:00
Marc Herbert dcf0577a77 logger: allow starting before the driver is loaded
Don't fail immediately when the driver is not loaded. Use inotify
instead to wait for /sys/kernel/debug/sof/[e]trace to appear.

This makes it possible to start before the driver is loaded which
reduces considerably the chances of missing early logs.

Fixes a small part of https://github.com/thesofproject/linux/issues/3275

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-08-02 16:48:27 +01:00
Marc Herbert af6bd41a99 logger: open /sys/debug/fw_version _after_ /sys/debug/[e]trace
Open /sys/kernel/debug/sof/fw_version _after_
/sys/kernel/debug/sof/[e]trace because reading the former is optional
and the latter is not.

So when the driver is not loaded, we get the same (missing trace) error
trace message whether we use the -n option or not.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-08-02 16:48:27 +01:00
Seppo Ingalsuo b0336346f7 [SKIP CI] Tools: Tune: SRC: Add missing gain to generate scripts
Patch a0ff2bb277 added field .gain to configuration data for
src_generate() but the previous generator scripts were not
updated to set it. This patch fixes in them the error about
undefined gain by setting it to previous -1 dB default.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-08-01 11:11:56 +01:00
Seppo Ingalsuo 978827f7fc [SKIP CI] Tools: Tune: SRC: Add to coefficients data Doxygen cond comments
This patch updates the SRC tool to export same guidance for
Doxygen as added by a previous patch for coefficients
header files. The added comments to begin and end are:

/** \cond GENERATED_BY_TOOLS_TUNE_SRC */
/** \endcond */

The impacted headers remain identical so they don't need update.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-08-01 11:11:56 +01:00
Pierre-Louis Bossart d87adcd2dc topology1: CMakeLists: add missing APL/GLK support for ES8336 with DMIC.
For some reason we added DMIC-based topologies for all platforms
except GLK and APL.

This should be back-ported to 2.2 stable.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-07-19 09:40:28 +01:00
Ranjani Sridharan b80fc03c4c tplg_parser: Add support for parsing process components by UUID
Add support for loading the process components by UUID. This needs a
modification in the IPC3 helper to modify the ipc data pointer to
address followed by the UUID in the component extended data.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-07-18 16:56:40 +01:00
Brent Lu 41e56b336d topology: sof-jsl-rt5682: enable mclk always-on feature
Enable the always-on feature for pop.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2022-07-18 14:20:09 +01:00
Brent Lu 8dfc008b8b intel: ssp: implement mclk always-on feature
In the earliest design, mclk is turned on in set_config() and never
turned off. The behavior is modified in this commit:

d5840a9200 ("ssp: move mclk request/release to pre_start and post_stop")

Now the mclk is enabled only during audio streaming so some codec may
pop. This commit adds the always-on behavior back as an new feature.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2022-07-18 14:20:09 +01:00
Fred Oh 23e81f7c20 topology2: cavs: add mixer-based hda pipelines to passthrough hdmi tplg for mtl
First two pipelines are mixer-based HDA playback and capture pipelines.
Tested with ALC256 HDA codec.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2022-07-15 09:08:12 +01:00
Fred Oh fcca1c3b7c topology2: cavs: re-order cavs hda toplogies
Re-ordering CNL TGL to MTL and DMIC 2ch to 4ch.
No functionality change.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2022-07-15 09:08:12 +01:00
Pierre-Louis Bossart 4be016befc topology1: sof-tgl-rt711-rt1308: use EXT_AMP_REF for rt1316
RT1316 is exposed by the machine driver as having an echo reference,
so the indices are different from the regular ones.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-07-12 09:34:39 +01:00
Pierre-Louis Bossart 04df9161cb topology1: sof-tgl-rt711-rt1308: make BT_OFFLOAD a CMakeFiles parameter
Somehow we assumed that all ADL platforms support BT_OFFLOAD. Wrong,
this is only valid for Chromebooks and needs to be set externally in
the CMakeFiles definitions.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-07-12 09:34:39 +01:00
Pierre-Louis Bossart 7666716e12 topology1: CMakeLists: add topology for HP Omen 16
RT711 on link0 and RT1316 on link3.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-07-12 09:34:39 +01:00
Pierre-Louis Bossart e70fd0fbf7 topology1: sof-tgl-rt711-rt1308: make amplifier link configuration
HP Omen 16 devices have an amplifier on link3, add the required
configuration macro.

BugLink: https://github.com/thesofproject/linux/issues/3727
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-07-12 09:34:39 +01:00
Pierre-Louis Bossart 9d9c28848d topology1: generate new sof-hda-generic version for 2ch PDM1
Generate 2 files for 1 and 2ch cases.

These topologies can be used by setting

options snd-sof-pci tplg_filename=<file>

in /etc/modprobe.d/alsa-base.conf

BugLink: https://github.com/thesofproject/sof/issues/5989
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-07-11 15:52:25 +01:00
Pierre-Louis Bossart 73fd9248e0 topology1: intel-generic-dmic: add macro to enable PDM1 for 2ch cases
There are multiple cases where we cannot detect that PDM1 is used
instead of the default PDM0.

BugLink: https://github.com/thesofproject/sof/issues/5989
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-07-11 15:52:25 +01:00
Bard Liao 606857bca5 topology2: cavs-passthrough-hdmi: use hdmi-generic.conf
hdmi-generic.conf can be used for all topologies with HDMI
support.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2022-07-07 11:58:00 +01:00
Bard Liao 96ac486b58 topology2: add HDMI support on SDW
Create a hdmi-generic.conf and use it in cavs-sdw.conf to add
HDMI support

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2022-07-07 11:58:00 +01:00
Bard Liao c97fb30f97 topology2: sdw-cavs: add dmic support
Add PCH DMIC support for MTL RVP with dmic01 id = 2 and dmic16k id = 3.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2022-07-07 11:58:00 +01:00
Bard Liao 73f4f86d73 topology2: remove pipeline format parameter
The "format" parameter is never used by IPC4. And it should not be
mandatory.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2022-07-07 11:58:00 +01:00
Marc Herbert 5dfaf0bf80 sof_ri_info: memory layout: find 'tgl' in ___/build_tgl_xcc/sof.ri
Extend the search for the platform code in directory names when there is
no sof-tgl.ri match.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-07-07 11:53:11 +01:00
Marc Herbert 0f365400eb sof_ri_info: explain why memory layout is empty
It was not obvious at all that the expected memory layout is inferred
from the filename.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-07-07 11:53:11 +01:00
Bard Liao 67daf2ecf5 topology2: add num_audio_formats for gain
We should set num_audio_formats in pipelines when we remove the
default value from gain.conf.
Otherwise, we will see below error with cavs-mixin-mixout-hda-2ch-tgl.tplg
tplg: ready widget id 2 pipe 1 type 6 name : gain.1.1 stream none

Fixes: 773a05a3 ('topology2: add S24LE support')
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2022-07-04 15:53:06 +01:00
Yong Zhi 45f6d6fa59 topology2: cavs: hda: add tplg build for mtl
Add the topology for skl_hda_dsp_generic machine.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2022-07-04 15:28:47 +01:00
Joe.Cheng 2cad1764e4 topology1:renoir:add DTS topology
Add topology pipe-dts-codec-playback to support Renoir platform

Signed-off-by: Joe.Cheng <joe.cheng@xperi.com>
2022-06-29 13:10:33 +01:00
balapati 5c4ca781ec tools:topology: Add HS topology
Add HS I2S instance topolgy for Rembrandt target.

Signed-off-by: balapati <balakishore.pati@amd.com>
2022-06-29 13:00:26 +01:00
Pierre-Louis Bossart c8551e3563 topology1: sof-tgl-rt711-rt1308: add missing switch
For some reason we never added the switch in this topology, with leads
to a missing control when parsing UCM files

BugLink: https://github.com/thesofproject/sof/issues/5950
BugLink: https://github.com/alsa-project/alsa-ucm-conf/issues/179
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-06-29 12:29:45 +01:00
Rander Wang 773a05a32e topology2: add S24LE support
S24LE is the major format used by SOF IPC4 FW and windows platform
and has better perfomance than S32.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-06-29 12:27:24 +01:00
Rander Wang bf65c0783d topology2: add src support on sdw platform
Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-06-29 12:27:24 +01:00
Rander Wang 715233aac9 topology2: add pipeline for src
This pipeline supports conversion from 8k ~ 192k to 48k.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-06-29 12:27:24 +01:00
Rander Wang 7b6d395aca topology2: add cavs src support
Cavs src is different with sof src. It has different uuid
and param which are composed of base module definition and
output rate.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-06-29 12:27:24 +01:00
Rander Wang 3f12097f36 topology2: add support for sampling rate
The original calculation will generate 44 sample size for
44.1khz, actually it at least needs 45 sample size.
This patch uses ceil value for such rate, also inlcude
11.025kh, 22.05kh, 88.2khz, 176.4khz.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-06-29 12:27:24 +01:00
Kehuang Li 60df52d454 component: add initial post processing component and topology
Introduce a new component to perform configurable audio post processing
on playback path before smart amplifier.

1. Put google_audio_post_processing libs at $SOF_REPO/third_party/lib
   - libgoogle_audio_post_processing.a
   - libc++.a
   - libc++abi.a
2. Enable google_audio_post_processing in config override
   $SOF_REPO/src/arch/xtensa/configs/override
   CONFIG_COMP_GOOGLE_AUDIO_POST_PROCESSING=y
3. Build the firmware and tool with xcc
4. To verify it works:
   - aplay some audio
   - amixer and grep GAPP
   - sof-ctl to get/set control

Signed-off-by: Kehuang Li <kehuangli@google.com>
2022-06-20 16:06:17 +01:00
Ranjani Sridharan c40743ec8d testbench: add support for parsing UUID
In preparation for comverting the volume component to use the module
interface, add support for parsing the UUID from topology when parsing
the PGA widget in testbench.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-06-10 09:50:08 +01:00
Pierre-Louis Bossart 51f2b1fe8e topology2: cavs: cavs-mixin-mixout-hda: use macro for DAI name
The copier 'stream_name' and dai 'name' need to match, use macro to
enforce consistency.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-06-09 14:41:40 +01:00
Pierre-Louis Bossart 1ef9979c73 topology2/cavs/cavs-mixin-mixout-hda: remove pipeline object from widget
The pipeline stream_name is not used at all, and as a consequence we
can remove the pipeline from the Widget objects

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-06-09 14:41:40 +01:00
Pierre-Louis Bossart e21649c109 topology2: cavs: use macro for PCM devices
The same 'Analog Playback' string is used for the copier stream_name
and PCM caps name. This is not a coincidence but a requirement to
match PCM and widgets. Same for 'Analog Capture'

Use a macro to make sure this 1:1 mapping is not broken.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-06-09 14:41:40 +01:00
Pierre-Louis Bossart 80c1cb0deb topology2: cavs: rename mixin-capture as dai-copier-gain-mixin-capture
Be exhaustive on pipeline contents.

Also remove Windows references and copy/pasted comments

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-06-09 14:41:40 +01:00
Pierre-Louis Bossart 660c9d2617 topology2: cavs: rename mixout-capture as mixout-gain-host-copier-capture
Be exhaustive on pipeline contents.

Also remove Windows references and copy/pasted comments

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-06-09 14:41:40 +01:00
Pierre-Louis Bossart 6a8eb721f2 topology2: cavs: rename mixin-playback as host-copier-gain-mixin-playback
Be exhaustive on pipeline contents.

Also remove Windows references and copy/pasted comments

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-06-09 14:41:40 +01:00
Pierre-Louis Bossart a5d568edb0 topology2: cavs: rename mixout-playback as mixout-gain-dai-copier-playback
Be exhaustive on pipeline contents.

Also remove Windows references and copy/pasted comments

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-06-09 14:41:40 +01:00
Pierre-Louis Bossart dbd0ab3493 topology2: cavs: remove mixout-gain-playback
there's already a gain in mixout-playback, and mixout-gain-playback is
not used anywhere.

let's reduce the options

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-06-09 14:41:40 +01:00
Pierre-Louis Bossart e78187c6d1 topology2: cavs: remove 'windows-simple-pipeline'
There's no reason why we must have multiple versions of topologies.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-06-09 14:41:40 +01:00
Ranjani Sridharan ebc222dab5 testbench: fix UUID declaration for file
Use DECLARE_SOF_RT_UUID and fix the uuid name in the comp_drv for the
file component.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-06-02 16:05:56 +01:00
Libin Yang fa8570d22d topology1: sof-icl-rt711-rt1308-rt715-hdmi: fix typo
Signed-off-by: Libin Yang <libin.yang@intel.com>
2022-06-01 10:27:01 +01:00
Jaska Uimonen dc758220c6 topology: add dmic1 dai for topology2 default dmic
Add the second 16kHz dmic1 dai to topology2 dmic config. This dai
doesn't yet have a pipeline, but it will be used in nhlt blob
calculation. Internal testing showed that some firmware variants need
the 16kHz dai to be defined in nhlt blob even though it is not used. The
pipeline for this dai will be added later.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2022-05-30 08:56:10 +01:00
Pin-chih Lin 5df56355d1 topology1: rtnr: set bytes control to read-only
Due to security requirement, the config bytes control is set to read-only
for RTNR with hard-coded the config blob in the topology.

It's WA until the security approval is obtained.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2022-05-25 13:59:22 +01:00
Paul Olaru d1dbc41312 topology1: remove setup config info from further codec_adapter topologies
Remove the setup config info from all initial config data in the
codec_adapter kcontrol's. This is no longer needed.

Fixes: bfd5e61768 ("topology1: remove setup config info from all codec_adapter topologies")
Fixes: 692299f2a6 ("codec_adapter: Remove setup config from module data")

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2022-05-24 16:45:18 +01:00
Pierre-Louis Bossart f3ec2e590a topology1: soundwire: use dynamic pipelines in kernel-dependent cases
We've never enabled dynamic pipelines for SoundWire CI, it's high time
we did so.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-05-18 17:40:27 +01:00
Pierre-Louis Bossart 43a4ddc6f8 topology1: soundwire: add macro to remove HDMI
This is useful for debug and tests.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-05-18 16:04:08 +01:00
Brent Lu 36f4578c50 topology: sof-adl-max98360a-rt5682-4ch: enable BT offload
Enable compile option "BT_OFFLOAD" to enable pipeline for Bluetooth
Offload.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2022-05-18 15:54:58 +01:00
Brent Lu ee5d375c98 topology: sof-adl-max98360a-rt5682-2way: enable BT offload
Enable compile option "BT_OFFLOAD" to enable pipeline for Bluetooth
Offload.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2022-05-18 15:54:58 +01:00
Seppo Ingalsuo a781886f6f Topology: Topology1: Fix mistake in buffer size calculation
Pipeline macro pipe-eq-iir-volume-capture-16khz.m4 misses an
update done to other pipelines. The macro COMP_PERIOD_FRAMES()
gives the correct buffer size in other pipelines.

Without this patch change of pipeline scheduling to 10 ms
from default 1 ms causes pipeline fail to buffer size check.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-05-10 17:11:20 +01:00
Ming Jen Tai c8b375638c topology1: mt8195: support Google rtc audio process with RTNR
This commit adds Google RTC Audio Processing with RTNR to MT8195
topology.

Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
2022-05-10 12:01:05 +02:00
Rafal Redzimski 12b056600d ipc4: update ipc_cmd_hdr to fit largest ABI header
The ipc_cmd_hdr should have size no lesser that largest
of the headers amongst all ipc protocol versions.
The use of smaller type for ipc_cmd_header is unsafe because
of casting pointers between differently sized headers followed by
accessing data through incremented pointer.

Signed-off-by: Rafal Redzimski <rafal.f.redzimski@intel.com>
2022-05-09 15:50:15 +01:00
Brent Lu b36db45a7d topology: sof-adl-max98360a-rt5682: enable BT offload
Enable compile option "BT_OFFLOAD" to enable pipeline for Bluetooth
Offload.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2022-05-08 10:03:38 +01:00
Vamshi Krishna c8fe1927c0 topology1: change audio format to 24 bit for rt1019
with changes we have - 3.072MHz bclk, 32-bit slot-width,
24-bit data-width.
rt1019 in auto mode is compatible with rt1015p driver.
By keeping the SSP configuration same as rt1015 will have fewer
configuration.

Signed-off-by: Vamshi Krishna <vamshi.krishna.gopal@intel.com>
2022-05-03 14:53:49 +01:00
Ming Jen Tai 4789d623a9 Add RTNR to MT8195 topology
This commit adds RTNR to MT8195 with MAX98390 topology.

Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
2022-05-03 14:53:07 +01:00
Ming Jen Tai 2e6bfbec1c RTNR: Decouple switch-enable control from params blob
This PR is based on https://github.com/thesofproject/sof/pull/5616

It decouples the switch-typed control for enabling/disabling from the
control bytes.

Previously, control blobs should be sent from userspace to to toggle
RTNR on/off.
With this PR, RTNR can be toggled by setting the UCM switch value.

cset "name='RTNR10.0 rtnr_enable_10' off"
cset "name='RTNR10.0 rtnr_enable_10' on"

or from command line

amixer -c0 cset name='RTNR10.0 rtnr_enable_10' 1
amixer -c0 cget name='RTNR10.0 rtnr_enable_10' 0

Signed-off-by: Pin-chih Lin <johnylin@google.com>
Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>

merge copy_func
2022-05-03 14:52:35 +01:00
Li-Yu Yu 5cfc37040b sof-ctl: Fix -Wformat,-Wsometimes-uninitialized
* Use %z specifier for size types to avoid format
  specifier warnings on arm32
* in ctl_dump(), size_t n may be used uninitialized
  if ctl_data->out_fd > 0 and !ctl_data->binary.

Signed-off-by: Li-Yu Yu <aaronyu@google.com>
2022-04-29 12:42:55 +01:00
Seppo Ingalsuo 0d5e731b19 Audio: SRC: Add IPC4 full conversions matrix to SRC comp and tools
This patch adds the Kconfig option COMP_SRC_IPC4_FULL_MATRIX and
adds handling to src.c. Testbench build was changed to use this
largest matrix.

The coefficients were generated with script src_ipc4_int32.m. The
new sample rates were added to test script src_test.m.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-04-29 12:42:38 +01:00
Seppo Ingalsuo a0ff2bb277 Tools: Tune: SRC: Allow pass of desired gain to src_generate()
There's need to have a 0 dB gain SRC conversion matrix while
earlier all defaulted to -1 dB. With this change the parameter
cfg.gain can be used with src_generate() function.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-04-29 12:42:38 +01:00
Seppo Ingalsuo 91afe67ae5 Tools: Tune: SRC: Add line break between structs in generated code
This patch helps to pass the code style check in generated header
file src_<profile>_<data type>_table.h. The error was:

CHECK: Please use a blank line after function/struct/union/enum
declarations

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-04-29 12:42:38 +01:00
Seppo Ingalsuo 5683382872 Tools: Tune: SRC: Avoid flood of plot windows with large SRC matrix
This patch forces open of every plot to the same picture window.
Earlier version could open hundreds of windows and freeze the
computer.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-04-29 12:42:38 +01:00
Seppo Ingalsuo 0feff0b3e4 Tools: Test: Topology: Set DAI buffer periods to 3 for SRC tests
Test pipelines with SRC due internal block processing constraints need
this to avoid fail due to insufficient buffer. Other pipelines continue
to use 2 buffer periods.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-04-28 15:43:38 +01:00
Seppo Ingalsuo 1df8cf856a Tools: Testbench: Fix file component buffer resize
The file component buffer resize was incorrect. It caused some
SRC testbench tests to fail due to insufficient sink buffer
size. The resize of file component source/sink was in prepare().
This patch moves it to one step earlier to params(). Then the
components' check for buffers in prepare() will see the impact
and let them error if the size is not sufficient.

After this change the number of periods in the buffer (from topology)
is preserved in resize. If a test does not run, need to fix the
test topology.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-04-28 15:43:38 +01:00
Brent Lu a7103e0255 topology: sof-tgl-max98357a-rt5682: include intel-boards for link ID
Include intel-boards.m4 for BE DAI Link ID definition.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2022-04-28 15:02:53 +01:00
Brent Lu deb6c5c55a topology: intel-boards: new file for machind driver differentiation
The order of BE DAI Link in topology must match the order in machine
driver. Create this include file to organize the definition of BE DAI
Link ID.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2022-04-28 15:02:53 +01:00
Brent Lu 68871b05ca topology: sof-adl-cs35l41: support cs35l41 speaker amplifier
Add a topology sof-adl-cs35l41 which supports four Cirrus Logic
CS35L41/CS35L53 speaker amplifiers running in TDM mode without
headphone codec on ADL platform.

Two compile options are added to support the board configuration:
'NO_HEADPHONE' removes headphone pipelines from the topology while
'SSP_AMP_LINK_ORDER' uses the DAI Link order in sof_ssp_amp.c machine
driver instead of sof_rt5682.c.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2022-04-28 15:02:53 +01:00
Chunxu Li 75dea11da9 topology1: add mt8186 related pipelines and components
add topology file for mt8186
detail:
mt8186.m4
sof-mt8186-mt6366-da7219-max98357.m4
sof-mt8186-mt6366-rt1019-rt5682s.m4

Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
2022-04-27 10:42:54 +01:00
Seppo Ingalsuo 3334bede2a Tools: Testbench: Add components to testbench load
This patch adds load possibility of mux, demux, and
google-rtc-audio-processing to testbench.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-04-26 22:18:49 +01:00
Seppo Ingalsuo 69c69d01a4 Tools: Testbench: Add capture direction and multi-pipeline run
This patch changes testbench to retrieve pipeline direction
from pipeline host direction. Earlier all pipelines were forced
to playback.

The topology parsing filters the parsed pipelines to command line
specified pipeline IDs. All the pipeline operations are done
looped to these pipelines to be able to simulate multiple simultaneous
pipelines.

The pipeline context struct remains single. So the simulation works
only for pipelines with identical PCM format and rate.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-04-26 22:18:49 +01:00
Pierre-Louis Bossart d380674ef2 topology1/kernel_dependent/v5.19: enable SoundWire deep-buffer headset topologies
This patch duplicates the configuration at the higher level and adds
the "HEADSET_DEEP_BUFFER" definition.

This is not very elegant and will require changes in two places, but I
don't see a better solution with M4.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-04-25 16:03:13 +01:00
Pierre-Louis Bossart d636482970 topology1: SoundWire: make deep-buffer optional
We don't want to release these topologies to world+dog due to
dependencies on kernel version, so let's make the deep-buffer
optional. The next patch will enable these topologies in the
development/ directory.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-04-25 16:03:13 +01:00
Pierre-Louis Bossart f1cf43126e topology1: SoundWire: add deep buffer support for headphone
Deep buffer is device 31 by convention

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-04-25 16:03:13 +01:00
Pierre-Louis Bossart 045e6f44e4 topology1: CMakeLists: split SoundWire NOJACK topologies
Before we enable the headset deep-buffer solution, we want to extract
the NOJACK topologies where the headset deep-buffer would be an
oxymoron.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-04-25 16:03:13 +01:00
Pierre-Louis Bossart 746bbff485 topology1: CMakeLists: regroup SoundWire topologies
For some reason the topologies are in separate blocks, regroup them.

No functionality change.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-04-25 16:03:13 +01:00
Pierre-Louis Bossart 15200e4091 topology1/kernel_dependent/v5.19: enable HDaudio codec deep-buffer topologies
This patch duplicates the configuration at the higher level and adds
the "DEEP_BUFFER" definition. The topologies are generated in the
kernel_dependent/v5.19 directory and shall only be used by
distro/users when their kernel is based on 5.19-rc1 or later. If these
topologies are used with an older kernel, the ASoC DPCM state machine
issues will result in broken audio. We have no ability to detect a
dependency on kernel to load a topology.

This is not very elegant and will require changes in two places, but I
don't see a better solution with M4.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-04-25 16:03:13 +01:00
Pierre-Louis Bossart 94203a22ff topology1: sof-hda-generic: make deep-buffer optional
We don't want to release these topologies to world+dog due to
dependencies on kernel version, so let's make the deep-buffer
optional. The next patch will enable these topologies in the
development/ directory.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-04-25 16:03:13 +01:00
Pierre-Louis Bossart 030f27d556 topology1: sof-hda-generic: add deep-buffer pipeline for analog playback
Use SoundWire convention with deep-buffer using device 31.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-04-25 16:03:13 +01:00
Pierre-Louis Bossart 96be83b0ab topology1: move sof-hda-generic-kwd to development
We don't support this topology in production and it's not clear if
it's even maintained, move to development.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-04-25 16:03:13 +01:00
Seppo Ingalsuo 09a4aa8a8e Topology: Topology1: Add topology with playback DRC to HDA generic
This patch enables testing of DRC in HDA generic devices by adding
it to headset/speaker pipeline after mixer.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-04-25 16:00:02 +01:00
Marc Herbert 78f4fd7de9 tools: stop copying v2 topologies to the v1 directory
STOP copying all files
 from dir: sof/tools/build_tools/topology/topology2/cavs/
 to dir:   sof/tools/build_tools/topology/

The original plan discussed in the reviews of commit c0bee428ae
("topology: prepare for Topology2.0") and commit 308a24a92b
("topology2: Add build support") and more recently
mentioned in #4611 was to overwrite in place some v1 topologies with
newer v2 topologies in order to "force" users to upgrade without them
realizing it. This original plan is now being abandoned. v2 topologies
will never overwrite v1 topologies and if ever then certainly not "en
masse". Moreover, v2 topologies will be placed in a new /lib/firmware/
subdirectory. So, partial revert the aforementioned commits. More
specifically. stop installing v2 topologies into the same directory as
v1 topologies.

Note there had never been any actual overwrite of any v1 topology yet
because there had never been any v2 topology of the same name.

At this point in time this gets rid of the following copies:

tools/build_tools/topology: abi.conf
tools/build_tools/topology: cavs-mixin-mixout-hda-2ch-cnl.conf
tools/build_tools/topology: cavs-mixin-mixout-hda-2ch-cnl.tplg
tools/build_tools/topology: cavs-mixin-mixout-hda-2ch-tgl.conf
tools/build_tools/topology: cavs-mixin-mixout-hda-2ch-tgl.tplg
tools/build_tools/topology: cavs-mixin-mixout-hda-4ch-cnl.conf
tools/build_tools/topology: cavs-mixin-mixout-hda-4ch-cnl.tplg
tools/build_tools/topology: cavs-mixin-mixout-hda-4ch-tgl.conf
tools/build_tools/topology: cavs-mixin-mixout-hda-4ch-tgl.tplg
tools/build_tools/topology: cavs-mixin-mixout-hda.conf
tools/build_tools/topology: cavs-mixin-mixout-hda.tplg
tools/build_tools/topology: cavs-passthrough-hdmi.conf
tools/build_tools/topology: cavs-passthrough-hdmi.tplg
tools/build_tools/topology: cavs-sdw.conf
tools/build_tools/topology: cavs-sdw.tplg
tools/build_tools/topology: cavs-tgl-nocodec.conf
tools/build_tools/topology: cavs-tgl-nocodec.tplg
tools/build_tools/topology: nhlt-ace-mtl-nocodec.bin
tools/build_tools/topology: nhlt.bin
tools/build_tools/topology: nhlt-cavs-tgl-nocodec.bin
tools/build_tools/topology: sof-mtl-nocodec.conf
tools/build_tools/topology: sof-mtl-nocodec.tplg

From an "installer/" and sof-bin release perspective, this removes the
following topology that was just added by commit
ba26eeff9d ("topology2: cavs-nocodec: Add support for MTL nocodec
topology"). Installing v2 topologies into a new /lib/firmware/
subdirectory has not been implemented yet.

No other change besides dropping these copies, everything else is the
same.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-04-25 15:07:12 +01:00
Pierre-Louis Bossart dbdaba93bb topology1: sof-hda-generic: remove digital paths
These paths are not well supported on all devices and lead to errors such as

17:06:06 kernel: HDA Digital: ASoC: dpcm_be_dai_startup() failed at Digital Playback and Capture (-22)
17:06:06 kernel: Digital Playback and Capture: __soc_pcm_open() failed (-22)
17:06:06 kernel: snd_hda_codec_conexant ehdaudio0D0: ASoC: error at snd_soc_dai_startup on Digital Codec DAI: -22
17:06:06 kernel: snd_hda_codec_conexant ehdaudio0D0: ASoC: error at snd_soc_dai_startup on Digital Codec DAI: -22
17:06:06 kernel: snd_hda_codec_conexant ehdaudio0D0: didn't find PCM for DAI Digital Codec DAI

We've already removed this digital path for IPC4/topology2, let's also remove this for topology1.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-04-22 14:37:57 -05:00
Ranjani Sridharan ba26eeff9d topology2: cavs-nocodec: Add support for MTL nocodec topology
The key difference is the DMIC HW IP version.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-04-20 13:52:33 +01:00
Ranjani Sridharan 2efc3ea41c topology2: dmic-generic: add support for 4ch capture
Add support for 4ch DMIC capture and modify the nocodec topology to use
it.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-04-19 11:50:55 +01:00
Ranjani Sridharan 5d75b0f309 topology2: cavs: passthrough: Add 4ch audio formats
Add the audio formats for 4ch in passthrough-be and passthrough-capture
pipelines.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-04-19 11:50:55 +01:00
Curtis Malainey 9cf8e0c777 m4: add RO bytecontrol
Sometimes we want to load a binary block of data without letting
userspace interact with the underlying control. An RO control will do
this exactly by loading the data and providing no write access.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2022-04-18 16:39:43 +01:00
Seppo Ingalsuo a10ccbdcb2 Tools: Topology: Add a development topology to RUN SRC on UP2
Add this topology to be able to test SRC playback and capture.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-04-11 21:45:29 +01:00
Vamshi Krishna 39f2626c47 topology1: sof-adl-rt1019-rt5682: add new topology
for amplifier rt1019 SSP1 link is used
for headset rt5682 SSP0 link is used

Signed-off-by: Vamshi Krishna <vamshi.krishna.gopal@intel.com>
2022-04-08 13:20:13 +01:00
Marc Herbert bde4858625 topologies: docker --env USE_XARGS, NO_PROCESSORS and VERBOSE
Building in parallel is much faster but it makes logs unreadable and
build failures impossible to understand. This is especially true when
building with recent ALSA that produces of deprecation warnings, see
examples below. For test topologies the problem is even worse: its
XARGS parallel build provides no log at all.

To find what actually fails, it is required to fall back on a single
threaded and verbose build and this is achieved with the variables
USE_XARGS, NO_PROCESSORS and VERBOSE. Pass these through docker-run.sh
and CMake.

Examples from #5608
https://github.com/thesofproject/sof/runs/5717553555?check_suite_focus=true
https://sof-ci.01.org/sofpr/PR5608/build12556/build/tools.txt

ALSA pcm.c:1523:(parse_hw_config) deprecated fsync value 'codec_slave',...
ALSA pcm.c:1471:(parse_hw_config) deprecated bclk value 'codec_slave',...
ALSA pcm.c:1523:(parse_hw_config) deprecated fsync value 'codec_slave',...
ALSA pcm.c:1471:(parse_hw_config) deprecated bclk value 'codec_slave',...
ALSA pcm.c:1523:(parse_hw_config) deprecated fsync value 'codec_slave',...

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-04-05 14:37:28 +01:00
Ranjani Sridharan 3b0fd1e203 topology2: abi: fix size of ABI bytes
The major/minor/patch values are represented with u16 in the FW. So,
change the numbers of bytes to match that of the FW when adding the
ABI to the topology manifest for IPC4. For IPC3, we still only use 3
bytes as there's no clean way to increase the number of bytes without
breaking backwards compatibility with the older kernel. There are no
topologies using topology2 for IPC3 today but it is possible in the
future.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-04-05 14:37:05 +01:00
Marc Herbert 0bbdbb111f test/topology: make tplg-build.sh callable from anywhere
This removes two layers of indirection when trying to find what fails.
The lack of this proved especially painful when working on #5632 and
similar backports.

Also move outputs to a subdirectory by default. No change when invoked
from CMake which does not use the default output directory.

Also show the exact m4 and alsatplg commands run when not using XARGS
parallelization. Again this is critical when something fails.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-04-02 17:51:04 +01:00
Ming Jen Tai a5fd52ec43 [RTNR] Fix buffer size calculation
The correct frame length should be calculated by
FRAME_LEN = SAMPLING_RATE * PERIODS / 1000000

The macro COMP_PERIOD_FRAMES does the thing.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
2022-03-30 14:00:16 +01:00
Joe.Cheng 64378c57f0 topology1:ADL:add DTS topology
The DTS Codec can be conditionally added to the sof-adl-nau8825 topology
on those pipelines intended for headphone and speaker output.

Signed-off-by: Joe.Cheng <joe.cheng@xperi.com>
2022-03-28 16:14:04 +01:00
Jairaj Arava 95c53eafc7 topology1: add DMIC 48K Core ID flag to CMake for RTNR
For builds with no Hotword on DSP, generic dmic m4 is used.
RTNR is running on DMIC CORE ID 1. Hence adding the flag.

Signed-off-by: Jairaj Arava <jairaj.arava@intel.com>
2022-03-24 13:39:06 -07:00
Liam Girdwood 0db4a82964 tplg parser: refactor and cleanup part 1
No functional change.

Move some common testbench code into the topology parser and group
feature parsing by file name.

Add a tplg_ prefix to external APIs without a prefix, others with an
existing prefix to follow this change.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2022-03-24 16:54:40 +00:00
Lionel Koenig b0b8bc7a34 sof-ctl: Allow setting arbitrary size for controls
sof-ctl assumed the binary control were of size of a
multiple of unsigned integer.
This caused the control byte array to be truncated when the
size of the control was 6 bytes.
This change allow setting any size of control in binary form.
Using CSV will always end up with a number of unsigned integer size.

I tested this change using the Google RTC Audio processing with control
of size:
  - 6 bytes,
  - 2 bytes
  - and 4 bytes.

Signed-off-by: Lionel Koenig <lionelk@google.com>
2022-03-22 13:46:49 +00:00
Libin Yang 5ef9e496d0 topology1: CMakefile: add sof-adl-rt711-l2-rt1316-l01
Add sof-adl-rt711-l2-rt1316-l01 support. This tplg doesn't include any
local MICs.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2022-03-21 16:21:29 +00:00
Libin Yang 0bb995a7a6 topology1: sof-icl-rt711-rt1308-rt715-hdmi: add NO_LOCAL_MIC & NOAMP support
add sof-icl-rt711-rt1308-rt715-hdmi NO_LOCAL_MIC & NOAMP support

Signed-off-by: Libin Yang <libin.yang@intel.com>
2022-03-21 16:21:29 +00:00
Libin Yang 4bb686380e topology1: sof-icl-rt711-rt1308-rt715-hdmi: correct the link description
The links are dynamically assigned. The descriptions should
be changed correspondingly.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2022-03-21 16:21:29 +00:00
Libin Yang 2898a1a6d9 topology1: sof-icl-rt711-rt1308-rt715-hdmi: remove NO_AGGREGATION
NO_AGGREGATION is never used now. Let's remove it.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Libin Yang <libin.yang@intel.com>
2022-03-21 16:21:29 +00:00
Pin-chih Lin 0c634ab6f7 topology: add waves and waves-2way for sof-adl-max98357a-rt5682 tplg
Add support for waves codec for both two and four max98357a speaker
amplifiers on ADL boards.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2022-03-17 13:07:25 -07:00
Ming Jen Tai bcccf1253d [RTNR] Add Realtek Noise reduction support option to ADL with MAX98360A topology
Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
2022-03-16 17:44:29 -07:00
Ben Zhang 51e7c61801 google_rtc_audio_processing: Add config controls
1. Added a byte control to accept Google RTC audio processing
   configuration blob
     `name='GOOGLE_RTC_PROCESSING10.0 Config'`

Tested using:
    sof-ctl -n 48 -t 0 -b -r -s /root/tuning.bin
And verified correct audio processing behaviour on a alderlake board.

Signed-off-by: Ben Zhang <benzh@chromium.org>
Signed-off-by: Lionel Koenig <lionelk@google.com>
2022-03-15 16:27:53 -07:00
Allen-kh Cheng edc80c793f topology1: add sof-mt8195-mt6359-max98390-rt5682 topology
Add sof-mt8195-mt6359-max98390-rt5682 topology

Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
2022-03-14 15:36:39 +00:00
Fred Oh f039b9eda1 topology2: common: fix to add '$' for SAMPLE_TYPE_LSB_INTEGER
$ and S are hard to tell in text editor. Without '$' final value are
much different.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2022-03-14 15:03:52 +00:00
Seppo Ingalsuo 6f0bb2b012 Topology: Add sof-hda-generic topologies to test multiband-drc
This patch adds build of topologies sof-hda-generic-multiband-drc.tplg
and sof-hda-generic-2ch-multiband-drc.tplg. The processing happens in
pipeline part after mixer. Volume is controlled in PGA before mixer.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-03-14 11:40:22 +00:00
Balakishorepati 8be523eb79 topology1: Set Dmic samplerate to 48000Hz
Set default samplerate for DMIC to 48000Hz for
amd platforms.

Signed-off-by: Balakishorepati <balaKishore.pati@amd.com>
2022-03-11 13:19:53 +00:00
Bard Liao ccde447b05 topology2: add be pipeline for sdw
Use two separated pipelines for BE and FE.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2022-03-11 13:03:07 +00:00
Seppo Ingalsuo c9d603bb11 Tools: Test: Fix mistake in script test_run.m
Remove the extra argument for fprintf(). For some reason there was
no harm seen but this should trigger an error when run in Octave or
Matlab.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-03-09 15:44:06 +00:00
Lionel Koenig 980a5b25b3 topology1: Fix m4 issue in conditional definition
Due to m4 peculiarities it is require to escape the content of an
ifdef. I forgot to add those escaping for around the `SPK_MIC_PERIOD_US`
definition leading to erroneous value if GOOGLE_RTC_AUDIO_PROCESSING was
defined.

Signed-off-by: Lionel Koenig <lionelk@google.com>
2022-03-08 22:05:15 +00:00
Pierre-Louis Bossart 83ada5ac08 topology: disable SSP0 and SSP1 on APL/GLK to enable Zephyr tests
This is a temporary work-around to enable CI tests while performance
is being optimized.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-03-08 15:17:29 +00:00
Lionel Koenig 21a1ee1d16 topology1: Simplify the DMICPROC selection
This should make sure to surface pipeline period and microphone
processing in the top topology file so incoherence are easier to spot
and correct.

I compared topology1/production/*.conf outputs prior and after the
change: except some new line and comment change introduced by the
simplification, there are no changes.

Signed-off-by: Lionel Koenig <lionelk@google.com>
2022-03-08 14:58:44 +00:00
YC Hung ecec8d11d1 topology1: mt8195: support 2ms pipeline capture period
When host is more heavy loading(e.g. camera recoding case),
the size of dai buffer is 4ms and not enough. Increase 2ms
period capture pipeline to buffer more data to avoid overrun.

Signed-off-by: YC Hung <yc.hung@mediatek.com>
2022-03-07 14:21:12 +02:00
Pierre-Louis Bossart 9709ef81dc topology1: sof-glk-es8336: use mclk ID0
It's not clear why the initial contribution used mclk ID1, mclk ID0 is
used by 99% of devices - and a manual inspection of NHLT supports that
claim. We will have to deal with the MCLK ID1 case with quirks.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-03-03 16:46:39 +00:00
Malik_Hsu c42ede6a97 topology: sof-adl-max98360a-rt5682-waves: add new topology
Add support for max98360a speaker amplifiers with waves function.

Signed-off-by: Malik_Hsu <malik_hsu@wistron.corp-partner.google.com>
2022-03-02 14:00:40 +00:00
Curtis Malainey 57e0e149aa topology1: add build with no hotword or 16k dmic
Some builds require more memory, hotword can be handled by CRAS so lets
add the ability to drop it. The 16kHz dmic is not needed either so lets
drop that too.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2022-02-28 13:19:19 +00:00
Ranjani Sridharan ce050aa25b topology2: cavs-nocodec: split pipelines into host and dai pipelines
Split pipelines into host and DAI pipelines and fix some SSP params

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-02-26 11:06:21 +00:00
Ranjani Sridharan 3629141cbb topology2: cavs-nocodec: include dmic-generic.conf if needed
Include dmic-generic conditionally based on NUM_DMIC's and add nhlt
build support in CMake variables.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-02-26 11:06:21 +00:00
Ranjani Sridharan ae5326ccd2 topology2: intel: dmic-generic: Move all definitions to dmic-default.conf
Move all defaults variable definitions to dmic-default.conf. These should
be included by all topologies before overriding the defaults with
platform-specific or machine-specific definitions.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-02-26 11:06:21 +00:00
Ranjani Sridharan 2abef019d3 topology2: intel: dmic-generic: Add a few more variables
Add a few more variables to make the dmic-generic topology more
configurable.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-02-26 11:06:21 +00:00
Ranjani Sridharan a2d8987921 topology2: clean up unnecessary nocodec topology builds
Only TGL is tested right now. So, build only that one.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-02-26 11:06:21 +00:00
Pierre-Louis Bossart 0fcad5052c topology: sof-apl-da7219: add missing virtual widgets
Align this topology with the GLK one to avoid probe errors

[    4.224516] bxt_da7219_max98357a bxt_da7219_mx98357a: ASoC: no source widget found for iDisp3 Tx
[    4.224518] bxt_da7219_max98357a bxt_da7219_mx98357a: ASoC: Failed to add route iDisp3 Tx -> direct -> hifi3
[    4.224522] bxt_da7219_max98357a bxt_da7219_mx98357a: ASoC: no sink widget found for iDisp3 Tx
[    4.224524] bxt_da7219_max98357a bxt_da7219_mx98357a: ASoC: Failed to add route iDisp3_out -> direct -> iDisp3 Tx
[    4.224529] bxt_da7219_max98357a bxt_da7219_mx98357a: ASoC: no source widget found for iDisp2 Tx
[    4.224531] bxt_da7219_max98357a bxt_da7219_mx98357a: ASoC: Failed to add route iDisp2 Tx -> direct -> hifi2
[    4.224535] bxt_da7219_max98357a bxt_da7219_mx98357a: ASoC: no sink widget found for iDisp2 Tx
[    4.224537] bxt_da7219_max98357a bxt_da7219_mx98357a: ASoC: Failed to add route iDisp2_out -> direct -> iDisp2 Tx
[    4.224542] bxt_da7219_max98357a bxt_da7219_mx98357a: ASoC: no source widget found for iDisp1 Tx
[    4.224544] bxt_da7219_max98357a bxt_da7219_mx98357a: ASoC: Failed to add route iDisp1 Tx -> direct -> hifi1
[    4.224549] bxt_da7219_max98357a bxt_da7219_mx98357a: ASoC: no sink widget found for iDisp1 Tx
[    4.224551] bxt_da7219_max98357a bxt_da7219_mx98357a: ASoC: Failed to add route iDisp1_out -> direct -> iDisp1 Tx
[    4.224559] bxt_da7219_max98357a bxt_da7219_mx98357a: snd_soc_bind_card: snd_soc_dapm_add_routes failed: -19

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-02-25 15:26:34 +00:00
Chao Song 2c0d875df1 topology1: move capture dai to another pipeline for echo ref
The explanation takes sof-adl-max98357a-rt5682 as an example:

During pipeline_complete(), we search for the source widget
for a pipeline from a list and the ipc_get_ppl_comp() returns
the first widget from the list of source widgets for a pipeline.

With SSP2.IN on pipeline 1, which is the same pipeline ID as the
ECHO_REF playback pipeline for PCM0P, pipeline_complete() for
pipeline 1 ends up not walking the rest of widgets in pipeline 1.

This Echo Ref feature works in chrome kernel today by accident,
because we set up the widgets in the reverse order after resuming
from runtime suspend and the source widget happens to be PCM0P.

To fix this, create a new pipeline for the capture dai widget SSP2.IN,
so that it doesn't pollute the widget list for pipeline 1.

Fixes: #5395

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2022-02-24 22:59:45 +00:00
Bard Liao c7246d2212 topology2: HDA: add 24 bit audio format
We declare that S24_LE is supported by a HDA PCM, but 24 bit audio
format is not included in the available audio format list.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2022-02-24 22:20:46 +00:00
Ranjani Sridharan 487d514b9d topology2: cavs: gain-pipelines: change the input/output bit depths
The DAI copiers only support 32-bit format. Change the gain-playback and
gain-capture to set the input/output bit-depth to match the DAI copier
requirement.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-02-24 21:42:08 +00:00
Ranjani Sridharan 33bae7afa1 topology2: cavs: dmic-generic: Add input/output bit depths
Add the input/output bit depth's for the BE DAI copier for the DMIC
capture pipeline.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-02-24 21:42:08 +00:00
Ranjani Sridharan acff9049f2 topology2: intel:dmic-generic: fix dma_buffer_size
It should be based on ibs but works today because ibs and obs are the
same.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-02-23 14:07:52 +00:00
Ranjani Sridharan 0d84f55361 topology2: pipelines: cavs: Fix the Dai copiers to only support 32-bit
format

Only the host copier should do the conversion based on the runtime
params. The DAI copiers should always support only 32-bit playback and
capture. So, fix the input/output formats for the copiers in the
respective pipelines.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-02-23 14:07:52 +00:00
Seppo Ingalsuo 74fcc02ff5 Tools: Test, Tune: Improve Matlab scripts for EQ testing
The test scripts missed test component keyword change from e.g.
eqiir to eq-iir. Due to this the process_test() failed for IIR and
FIR for gain and frequency response due to wrong result expect.

The expected result is retrieved with the blob decode function. It
can be also used manually to check the filters defined in the
blob. The help texts in the decode functions needed fix. Also some
usage examples were added.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-02-18 21:47:16 +00:00
Ranjani Sridharan 0e53d54684 topology2: cavs: Add support for including DMIC in HDA topology
Currently we build separate topologies for TGL and CNL since their
io_clk's are different. Eventually, we'd need to unify these and let the
driver handle the blob selection in the kernel.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-02-18 21:39:50 +00:00
Ranjani Sridharan 8d0ac8e2da topology2: cavs: Add DMIC generic topology
Add the topology for 48k DMIC pipeline. 16K support will be added later.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-02-18 21:39:50 +00:00
Marc Herbert 15a7774626 Revert "topologies: switch all .m4 files to codec_provider and codec_consumer"
This reverts commit f50b6fe0ad.

I discovered the hard way that this change causes alsatplg version
1.2.2 (the default version in the current LTS Ubuntu) to corrupt just
a few bytes in .tplg output in an incredibly discrete and
time-consuming way: no error message at build time and same file size.
See example at https://github.com/thesofproject/sof/pull/5162.

We could/should just require a minimum alsatplg version at the CMake
level but at this moment we don't even know which minimum version is
needed and we would also need to take some time to test a few alsatplg
versions. If version 1.2.2 would just fail with an decent error
message that can be searched and discussed then everything would be
fine but silent corruption is really not OK.

So users of recent versions will unfortunately have to live with the
huge number of warnings for now.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-02-18 11:22:36 +00:00
Andrey Borisovich 2c1f089d39 Added standard headers include path for MSYS
Windows users building with MSYS2 need to provide additional include
path to the POSIX standard headers to build sof-logger with GCC.
Added this include directory when environmental variable
MSYS_INSTALL_DIR is set.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2022-02-16 12:02:40 +00:00
Andrey Borisovich f11e275aab Fixed warning W-char-subscripts in sof logger
Newer gcc compilers 9.1+ issue a W-char-subscripts warning when argument
type passed to isspace is not explicitly int. Added cast to int.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2022-02-16 12:02:40 +00:00
Pierre-Louis Bossart 04a0d3c1b5 topology1: sof-cml-es8336: use correct 24MHz MCLK
Rookie mistake, the clock can't possibly be 19.2 MHz

Reported-by: Nikolai Kostrigin <nickel@altlinux.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-02-16 12:01:30 +00:00
Ranjani Sridharan 24d1b1a012 topology2: cavs: hda: remove unwanted topologies
We only want the mixin/mixout based HDA and passthrough HDMI topologies.
Delete everything else.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-02-16 11:59:00 +00:00
Ranjani Sridharan 3d9b6ffd29 topology2: cavs: remove deep buffer pipeline
Remove deep buffer pipeline until the driver code to ready to handle it.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-02-16 11:59:00 +00:00
Ranjani Sridharan 6001e44241 topology1: remove redundant kcontrol for codec adapter pipelines
The codec adapter component only uses a single config now. So remove the
runtime config kcontrol as the same kcontrol can be used for runtime
config as well.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-02-16 12:28:08 +02:00
Ranjani Sridharan 8c0b05d579 topology2: cavs: all pipelines should be dynamic by default
Set all pipelines to be dynamic by default.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-02-15 10:58:34 +00:00
Ranjani Sridharan c84d64b524 topology2: CMakeLists: clarify the pipelines for mixin-mixout tplg
Only the HDA pipelines use mixin/mixout based pipelines.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-02-14 11:12:44 +00:00
Ranjani Sridharan c94ae772a0 topology2: cavs: split the passthrough pipeline into host and DAI parts
We cannot have one single pipeline going from the host copier to the DAI
copier. So split the passthrough pipeline into host and DAI pipelines.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-02-14 11:12:44 +00:00
Ranjani Sridharan 788e0534d6 topology2: mixin/mixout pipelines: Add gain before and after mixers
Add gain widgets before and after the mixers in all the
mixin/mixout-based pipelines. Change the cavs-mixin-mixout-hda.conf
topology to add the mixer names for all gain widgets.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-02-14 11:12:44 +00:00
Ranjani Sridharan 3120b7c4c9 topology2: gain: remove default audio formats
Remove the default audio formats from the gain class definition.
They should be added depending on the number of formats based on the
pipeline. Fix the gain-playback and gain-capture pipelines to add the
audio formats for the gain widgets.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-02-14 11:12:44 +00:00
Seppo Ingalsuo cf43cb1604 Tools: Topology: Add long FIR EQ topology for sof-hda-generic
The topology is useful for testing long binary control IPC and to
test equalization of headset and speaker in sof-hda-generic devices.
It adds a flat IIR and a generic FIR that creates a mild loudness
effect.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-02-11 10:41:55 +00:00
Seppo Ingalsuo e9048e4b7d Tools: Topology: Fix erratic FIR example response
The previous patch increased the FIR length but it also triggered
a numerical issue in FIR design with long minimum phase filters. The
filter became essentially a band-stop filter and causes difficulties
in test of EQ component. Also the equalizer sounds subjectively
bad. The fix is to change the design to linear phase that always
converges.

Fixes: 0d296ce7d1

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-02-11 10:41:55 +00:00
Lionel Koenig 28de049330 topology1: Fix issue in google-rtc-audio-processing pipeline
This fixes a mistmatch in the PCM capabilities for the Google
RTC audio processing pipeline.

Signed-off-by: Lionel Koenig <lionelk@google.com>
2022-02-10 16:37:13 -08:00
Ranjani Sridharan 9983ab67a9 topology2: cavs-gain: Add PGA to control names
This is needed for sof-test to identify the controls.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-02-09 21:50:11 +00:00
Seppo Ingalsuo e5d95d1dd3 Tools: Topology: Change playback volume ramp to 20 us
The topologies sof-hda-generic were earlier fixed to use short
20 ms ramp because of nearly inaudible UI blip tones with 250 us
ramp. Some changes to topologies build m4 macros have brought
back the long ramp.

This patch fixes the playback ramps to use 20 ms long transitions.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-02-09 10:19:48 +00:00
Seppo Ingalsuo b3b937eb3d Tools: Topology: Make PGA token objects unique
This patch avoids the issue that topology .conf file after m4
processing can contain multiple same name objects playback_pga_conf
for volume component tokens with possibly different settings. Alsatplg
does not error from such input and it's not defined which impacs
topology binary.

The new naming is pga_conf_X and and_pga_tokens_X where X is the
pipeline number.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-02-09 10:19:48 +00:00
Yong Zhi 7fdd59844d topology2: cavs-nocodec: remove dai_index for copier widget
When generating the tplg, copier inherits its dai_index
from the parent DAI object, since there is no need to overwrite
dai_index with different value, let's remove them from top level conf.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2022-02-09 10:01:19 +00:00
Seppo Ingalsuo e6f677959b Tools: Test: Audio: Fix typos in tools/test/audio/*
This patch fixes the typos in audio test Matlab code.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-02-09 09:52:17 +00:00
Seppo Ingalsuo ae4c30207e Tools: Tune: Fix typos tools/tune/*
This patch fixes the typos in the setup tools Matlab code.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-02-09 09:52:17 +00:00
Kai Vehmanen e20384eb6a testbench: add option to override CPU core mapping
Add option to override how a core id, specified in SOF topology, is
mapped to host core. This allows to map a multithreaded pipeline
execution to specific range of host CPUs.

Implement the option via environment variable "SOF_HOST_CORE0", which is
understood by the CONFIG_LIBRARY implementation of ll-scheduler.

Document the usage to testbench help. mapping of DSP core ids specified
SOF_HOST_CORE

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-02-09 09:44:34 +00:00
Seppo Ingalsuo 84c9033fea Tools: Test: Audio: Add sound direction test for TDFB
This patch adds Matlab script tdfb_direction_test.m. The test
simulates acoustical microphone array capture with 360 degrees
rotated noise source. The test topologies build adds an array
identifier to component name in topology file name. That
allows the scripts to simulate with several arrays. Now a
basic 2 mic array (no array suffix, just tdfb), 4 mic line,
and 8 mic circular are tested. Test pass/fail is so far only
visual check from plot.

The existing tdfb_test.c is extended to perform test with the
three test array configurations.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-02-08 12:34:32 +00:00
Liam Girdwood 9ad987e7fd testbench: return error up the stack.
Dont exit() but return the error up the stack for proper handling.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2022-02-08 10:43:18 +00:00
Liam Girdwood 0cec50a976 testbench: further refactor of per pipeline data
The testbench currently has a global structure that contains
per topology and per pipeline data. Refactor to move data to the
most appropriate structure for use.

This is not the final fix, further refactoring is needed.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2022-02-08 10:43:18 +00:00
Liam Girdwood ac12b4a748 testbench: print a meaningful error if scheduling comp is not found
Let the user know if the scheduling component is missing and handle it.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2022-02-08 10:43:18 +00:00
Liam Girdwood 6f43299f3b testbench: take the global data off the stack.
Testbench prm is global data used by many thread. Take it off the stack.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2022-02-08 10:43:18 +00:00
Liam Girdwood 480d1ad168 testbench: improve error messages in topology load
Give users more information when failures occur.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2022-02-08 10:43:18 +00:00
Liam Girdwood c3adfcecc7 testbench: add support for mixer
Add mixer support to the testbench

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2022-02-08 10:43:18 +00:00
Ranjani Sridharan 1303c1a233 topology2: cavs-gain-hda: Add 32-bit support
Add 32-bit support in PCM capabilities.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-02-08 09:26:38 +00:00
Seppo Ingalsuo 4a2d69b50b Tools: Topology: Updated TDFB macro files
The tdfb_controls.m4 is changed for better 15 degree control enum
spacing for beam direction. The file is with this change dedicated
for line arrays with physical limitation to -90 to +90 degrees that
is just achievable with 16 max. enum values.

The new tdfb_controls360.m4 uses the previous 30 degree spacing for
360 degrees arrays such as circular. The pipeline macros for 360
degrees are added to pipelines macros. The difference is only include
of 360 degrees controls version.

The topology development CMakeList.txt is changed to build topologies
with TDFB with single dual mono -90 to +90 degree angle steerable
beam. The stereo dual beam setup files are preserved and updated but
currently used only for testbench test for more complex configuration.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-02-08 09:14:20 +00:00
Ranjani Sridharan 849da9d0af topology2: gain: Fix the default gain value
Should be 0x7fffffff.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-02-04 15:01:30 +00:00
Ranjani Sridharan cb5d769a84 topology2: copier: remove format for copier widget objects
It is never used.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-02-04 15:01:30 +00:00
Ranjani Sridharan 80bf84c00c topoogy2: tokens: fix the token ID for out_sample_type
Should be 1938.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-02-04 15:01:30 +00:00
Alibek Omarov bb0641c789 topology1: Add sample topology for i.MX8MP boards with wm8904 codec
Tested to work on Variscite Symphony-Board v1.3 with VAR-SOM-MX8M-PLUS

Signed-off-by: Alibek Omarov <a1ba.omarov@gmail.com>
2022-02-04 11:03:07 +00:00