Commit Graph

1393 Commits

Author SHA1 Message Date
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