Commit Graph

1404 Commits

Author SHA1 Message Date
Paul Olaru e3ac593f86 tools: ctl: Fix various errors
Most of the errors are unused variables, plus an unused label. Those are
benign.

One of the errors was the following:

/work/repos/sof/tools/ctl/ctl.c: In function ‘ctl_set_get’:
/work/repos/sof/tools/ctl/ctl.c:497:1: error: control reaches end of
non-void function [-Werror=return-type]
  497 | }
      | ^

This error had caused an undefined-behaviour-driven bug internally (an
error being displayed with a return code of 0, when it shouldn't have
been possible to display that message if the return code was 0). At line
614 of the old code, the message "Error: could not Set control, ret:0"
was displayed.

The errors only show up when you add -Wall -Werror to the compile
options of ctl, which I will do in the next commit.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2021-11-10 08:34:53 +02:00
Kai Vehmanen 601cbc061d topology1: sof-cavs-nocodec: fix documentation
Fix the documentation to match actual topology definition. The comments
did not include addition of mixers nor the capture PCMs. Also many
comments reflect a fixed core id that is no longer accurate.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2021-11-08 13:29:13 +00:00
Bartosz Kokoszko 15c9335962 scheduler: allow scheduler_free functions to disable only irqs
This commit:
- adds flags argument into scheduler_free function pointer in
  scheduler_ops struct;
- adds SOF_SCHEDULER_FREE_IRQ_ONLY flag, which indicates to disable
  only interrupts in scheduler_free() functions.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2021-11-08 13:25:44 +00:00
Jaska Uimonen ff63219de2 topology2: add mic extension and vendor mic config classes
Add two classes to be used with dmic for nhlt conformance. Mic extension
includes snr and sensitivity values. Mic vendor config has multiple
values for defining the mic array geometry and mic positions.

Do not add tokens as these values are used currently only with nhlt
generation. Defining these classes in dmic is optional.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2021-11-08 12:18:06 +00:00
Seppo Ingalsuo 3eeda96c0c Test: Add cmocka test case for IIR equalizer
This patch adds for the IIR equalized component a test with
comparison 100 ms of Octave generated output to output of the
component. The test signal is a full scale chirp signal. The
IIR response is both amplifying and attenuating to trigger as
much as possible issues with internal overflows.

All test data was generated by Octave script
cmocka_data_eq_iir.m. Re-run of script updates the used header
files the in cmocka tests directory.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-11-08 12:14:43 +00:00
Yong Zhi bb847b7639 topology2: nocodec: remove index initialization from DMIC instance
The DMIC DAI does not have index attribute, so remove it.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2021-11-08 12:06:25 +00:00
Ranjani Sridharan ef5358474a topology2: cavs: gain-playback/capture: Add all includes
Include all dependencies to be able to build the conf file individually.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan 328e1650d8 topology2: cavs: mixin-playback: Add all includes
Include all dependencies to be able to build the conf file individually.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan ee2cb09ba6 topology2: cavs: mixout-gain-playback: Add all includes
Include all dependencies to be able to build the conf file individually.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan 7fc1b7159b topology2: cavs: passthrough-capture: Add all includes
Include all dependencies to be able to build the conf file individually.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan f30cb4b1a3 topology2: cavs: passthrough-playback: Add all includes
Include all dependencies to be able to build the conf file individually.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan dbc3ba5e3e topology2: eq-iir-volume-capture: Add all includes
Include all dependencies to be able to build the conf file individually.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan f21a25abe5 topology2: Add class definition for EQIIR
Add the class definition for EQIIR widget.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan 06684c9308 topology2: passthrough-capture: Add all includes
Include all dependencies to be able to build the conf file individually.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan 47c6dba606 topology2: volume-capture: Add all includes
Include all dependencies to be able to build the conf file individually.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan f29234fba8 topology2: volume-demux-playback: Add all includes
Include all dependencies to be able to build the conf file individually.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan da6ea477da topology2: Add class definition for muxdemux
Add the class definition for the MUX/DEMUX process type widget.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan e98847bf6e topology2: volume-playback: Add all includes
Include add dependencies so that this conf file can be built
individually.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan 8243b51e8d topology2: volume: include mixer.conf
Include mixer.conf so the conf can be built without errors.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan b30d6b7c47 topology2: remove virtual_widget
It is a duplicate of virtual.conf

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Ranjani Sridharan 5c7e82e944 topology2: always override array elems
Always use "!" with array definitions so that items do not get
duplicated when arrays are merged when the conf file is included
multiple times.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-11-03 21:44:19 +00:00
Mark Barton ff3dec2f41 audio: codec_adapter: Add DTS Codec to mt8195 topology
The DTS Codec can be conditionally added to the sof-mt8195-mt6359-rt1019-rt5682 topology on those pipelines intended for headphone and speaker output.

To enable processing and configure settings, additional bytes must be sent to the control via ALSA TLV. The intention is that endusers will use ALSA UCM to achieve this.

Signed-off-by: Mark Barton <mark.barton@xperi.com>
2021-11-02 14:06:49 -07:00
Daniel Baluta b0bb21dc0e topology1: Fix codec adapter pipeline
Commit 771db86de2 ("topology1: codec_adapter: Add 'codec_adapter' pipeline configuration")
in an attempt to support PCM + compr mixer scenarios broke simple codec adapter
pipelines.

So, similar with PCM case (see sof/pipe-host-volume-playback.m4 vs
sof/pipe-volume-playback.m4) we introduce two separate configuration
files.

One for Passthrough codec-adapter pipeline and one standalone Host +
codec-adapter pipeline that can be independently scheduled in a scenario
with a mixer for example.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-10-29 22:38:30 +01:00
Daniel Baluta 5ef33e6310 topology: Add simple host codec adapter playback pipeline
As opposed to pipe-codec-adapter-playback this has its own scheduling
task and can be used in more complex scenarios.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-10-29 22:38:30 +01:00
Gongjun Song d54c0385cf topology1: Add sof-adl-rt711-l2-rt1316-l01-rt714-l3
Support SKU 0B29 product, the audio hardware configuration is rt711
on link2, two rt1316s on link0 and link1, rt714 on link3.

Signed-off-by: Gongjun Song <gongjun.song@intel.com>
2021-10-29 15:01:05 +08:00
Gongjun Song d40ab8c853 topology1: Add sof-adl-rt1316-l2-mono-rt714-l3
Support SKU 0B13 product, the audio hardware configuration is rt1316
on link2 and rt714 on link3.

Signed-off-by: Gongjun Song <gongjun.song@intel.com>
2021-10-29 15:01:05 +08:00
Gongjun Song 102793970a topology1: Add sof-adl-rt1316-l12-rt714-l0
Support SKU 0AF3 product. The audio hardware configuration is two
rt1316s on link1 and link2, and rt714 on link0.

Signed-off-by: Gongjun Song <gongjun.song@intel.com>
2021-10-29 15:01:05 +08:00
Mac Chiang e839650271 topology: add max98390 2/4 codecs and bt_offload support
This patch adds support for three configurations:

SSP1 connects max98390 2/4 speakers
SSP2 connects max98390 2 speakers

The SSP TDM configuration uses 4 slots for playback and
4 slots for the echo reference capture - regardless of the number of speakers.

UCM files in userspace specify which channels needs to be used on the specific platform.
There is no information reported by the topology/firmware related to valid channels.

Max98390 uses following channels mapping for playback and EchoRef capture
Chan 0 = Left
Chan 1 = Right
Chan 2 = Tweeter Left
Chan 3 = Tweeter Right
(Chan 0 and 1 with regular speakers;Chan 2 and 3 with tweeter speakers)

Addition:
  Add SSP2 BT_OFFLOAD support

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
2021-10-26 21:01:25 +01:00
Brent Lu b365447dc6 topology: sof-jsl-rt5682: add SSP_CC_BCLK_ES flag to codec DAI
Add support for cs42l42 with max98360a running on JSL boards. The
cs42l42 needs to enable bclk earlier in prepare stage and disable bclk
at hw_free statge so we add the SSP_CC_BCLK_ES flag for it.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2021-10-26 20:24:47 +01:00
Daniel Baluta 955c7c9009 topology1: imx8: Add mixing PCM and Compr stream topology
This topologies are for i.MX8QXP/i.MX8QM, i.MX8MP demonstrating
mixing for 1 PCM stream and 1 Compr stream.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-10-21 15:53:11 +01:00
Marc Herbert f8ca8536fd sof_ri_info: add new --erase_vars feature for reproducible builds
sof_ri_info.py  --erase_vars reproducible.ri sof.ri

replaces variable fields (signature and date right now) by constants.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-10-21 13:59:46 +01:00
Marc Herbert d9b7d9f6eb sof_ri_info: new attributes signature and date start and length
Signature and date are (for now) the only variable fields when
re-signing with the same tool so their locations matter.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-10-21 13:59:46 +01:00
Marc Herbert a43cf1aff0 sof_ri_info: pylint: disable=invalid-name, missing-function-docstring
Add:

... to reduce pylint warnings to a usable amount.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-10-21 13:59:46 +01:00
Marc Herbert 85aa873198 sof_ri_info: minor reader.info() additions and tweaks
These changes are visible only in -v mode.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-10-21 13:59:46 +01:00
Marc Herbert 31b3a39202 sof_ri_info: print error messages on stderr
stderr is often highlighted with a different color.
This also makes the usual >/dev/null redirection possible.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-10-21 13:59:46 +01:00
Marc Herbert 2dbec9f2b2 sof_ri_info: show file offsets for most components + some lengths
File offsets were critical in finding the serious begin_off bug fixed in
the same series. The information is already there so just show it.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-10-21 13:59:46 +01:00
Marc Herbert 06187791d7 sof_ri_info: fix adsp_mft_cse_entry.entry_file_offset
Fixes the adsp_mft_cse_entry Component added by
commit 8885b465df ("tools: sof-ri-info: move parsing adsp mft outside
cse mft").

`adsp_mft_cse_entry.entry_file_offset` did not account for the extended
manifest.

Also fix the large `reader.ext_mft_length + entry_offset`
copy/paste/diverge

That variable did not seem to be used anywhere yet but it's wrong value
was confusing and time-consuming when debugging.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-10-21 13:59:46 +01:00
Marc Herbert c66e26a9cf sof_ri_info: fix wrong begin_off in parse_mft_extension()
This broke parsing any extension past the first one.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-10-21 13:59:46 +01:00
Ming Jen Tai bf1e3b7f5b Support both 48kHz and 16kHz recording
Add 48kHz recording support to RTNR
Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
2021-10-19 13:40:12 +01:00
Brent Lu b50afe03cd topology: sof-tgl-max98357a-rt5682: add support for max98360a
Add support for max98360a running on ADL boards. We choose SSP1 for
speaker amplifier for BT offload compatibility. Also increase the
sample depth to 32 bits for more dynamic range and avoid using m/n
counter.

We add the flag SSP_CC_BCLK_ES to SSP0 for the compatibility with
CS42L42 in the future.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2021-10-13 14:54:22 +01:00
Ajit Kumar Pandey d4254be1ad topology: topology1: Add initial topology for AMD Renoir
Add m4 and headers to support basic topology with passthrough
pipeline for ACPSP and DMIC use cases support on renoir platform.

Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Signed-off-by: balapati <balakishore.pati@amd.com>
2021-10-07 15:06:55 +01:00
Kai Vehmanen 40484a87f2 topology1: correct misleading comments for priority/core
Comments for calls to PIPELINE_PCM_ADD and DAI_ADD describe parameters
in the same order they are passed to the macros. The only exception is
order of "priority" and "core", and this can be very misleading. In
most cases the actual current values for the two parameters are 0,
making it even easier to make a mistake when modifying them.

Fix the order in the comments to match the actual order in which the
parameters should be passed to PIPELINE_PCM_ADD and DAI_ADD.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2021-10-05 15:11:22 +01:00
Kai Vehmanen 9dfd2bd493 topology: intel: use 38.4Mhz MCLK for all Bluetooth use-cases
Updated guidance for BT hardware is to use 38.4Mhz MCLK for both
SCO and A2DP mode. This applies for all Intel platforms supporting
Bluetooth offload.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2021-10-05 15:05:25 +01:00
Daniel Baluta 771db86de2 topology1: codec_adapter: Add 'codec_adapter' pipeline configuration
This adds 'codec_adapter' pipeline configuration  allowing this
pipeline to be part of a more complex topology.

Important configuration here is the 'scheduler' widget. Without this,
'codec_adapter' would work in a more complex topology. This is because
each individual pipeline needs to have a 'scheduling' component.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-09-30 15:45:50 +01:00
Pierre-Louis Bossart 425743e772 topology1: add missing Dell SKU 0A45 topology
Same as before but with newer SDCA codecs.

Matching kernel PR: https://github.com/thesofproject/linux/pull/3162

BugLink: https://github.com/thesofproject/linux/issues/3161
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-09-29 10:58:21 +01:00
Seppo Ingalsuo b3c9ec46d9 Tools: Test: Audio: Run testbench tests with valgrind
The run with valgrind will error if memory leaks are detected.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-09-27 12:28:37 +01:00
Ming Jen Tai e4e23d47ec Integrate RTNR into sof-adl-max98357a-rt5682
Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
2021-09-23 13:50:35 +01:00
Seppo Ingalsuo f47b823cfe Tools: Testbench: File write DAI needs data structures of DAI
Previously the file component stored component data to device
private data similarly as processing components. However the
pipeline treats file as DAI. Without this patch the missing driver
and DAI operation get_init_delay_ms() causes a segfault in pipeline
parameters walk. It is sufficient for the walk to pass to have just
rzalloc() cleared pointers in driver structure.

The file component data is now placed into DAI private data.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-09-15 14:41:47 +01:00
Libin Yang 714518f5e9 topology1: fix a typo of a tplg name in CMakefile
sof-adl-rt1316-l2-mono-rt714-link0 should be
sof-adl-rt1316-l2-mono-rt714-l0

Signed-off-by: Libin Yang <libin.yang@intel.com>
2021-09-15 14:28:34 +01:00
Zhang Keqiao f6bc279da6 topology1: add a test topology sof-adl-nocodec-ci build support
We plan to test the CI test topology on ADL-P nocodec device, so
add the topology build support in cmake list.

Signed-off-by: Zhang Keqiao <keqiao.zhang@intel.com>
2021-09-13 15:44:52 +01:00
Curtis Malainey a0acad3414 CMake: require version 3.13
Without CMP0079 we cannot conditionally include libraries against SOF in
sub directories without seriously restructuring the project. This is
because the old policy requires the link target must be created in the
same folder. This does not work well from a configuration standpoint for
3P audio libraries trying to keep their config in src/audio/*. Rather
than enable the policy, lets simply upgrade since 3.13 is widely
available.

With this upgrade we can also remove the two version dependent checks at
the top of our scripts.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-09-10 17:19:29 +01:00
Pierre-Louis Bossart 8fc5247289 topology: move IMX and MTK topologies out of Intel list
Not sure why they were intertwined, let's separate them out to avoid
git conflicts with integration.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-09-08 20:19:41 +01:00
Pierre-Louis Bossart 24ad7ea0fa topology: sof-glk-es8336: initial support
This topology is used on GLK and TGL. variations include:
- DMIC supported on TGL and not on GLK
- TGL uses SSP0 instead of SSP2

APL support was added only based on user reports. This assumes the
same topology as GLK but was not tested.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-09-08 20:19:41 +01:00
Allen-KH Cheng 7eda2d509e topology1: add sof-mt8195-mt6359-rt1019-rt5682 topology
Add sof-mt8195-mt6359-rt1019-rt5682 topology

Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
2021-09-07 13:33:01 +01:00
Allen-KH Cheng 3342311c8e topology1: add afe config
Add afe config for mt8195

Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
2021-09-07 13:33:01 +01:00
Allen-KH Cheng 5ae624cf4e topology1: add afe tokens
Add afe tokens for mt8195

Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
2021-09-07 13:33:01 +01:00
Allen-KH Cheng e9ae9e07ca topology1: add afe.m4
Add afe.m4 for afe related define

Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
2021-09-07 13:33:01 +01:00
Allen-KH Cheng 16975ced60 topology1: add sof-mt8195-mt6359-rt1019-rt5682.m4
Add sof-mt8195-mt6359-rt1019-rt5682.m4 for mt8195

Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
2021-09-07 13:33:01 +01:00
Allen-KH Cheng afc39d10a5 topology1: add mt8195.m4
Add mt8195 pipelines and components

Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
2021-09-07 13:33:01 +01:00
Guennadi Liakhovetski f5760a648d pipeline: trigger START from the task context
When the firmware receives a START or RELEASE IPC message, it
immediately triggers all involved components, which starts DMA.
Then it schedules the pipeline task, but since the scheduler can be
already running at that time, the task might be scheduled when DMA
data isn't available yet or has already overflowed. To fix this
change the control flow to also trigger all components from the task
during its first run. Actual data processing then begins with the
next period. Note, that this is currently only possible with
pipelines, using timer-based scheduling. Pipelines, using DMA
interrupts for scheduling are unaffected.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-08-31 21:14:37 +01:00
Guennadi Liakhovetski 1103860a8d pipeline: add two new trigger commands and a new state
We need to split the START trigger command into two commands because
some components have a long delay inside their START handling. This
patch introduces two new trigger commands: PRE_START and
PRE_RELEASE and a new state PRE_ACTIVE to prepare for that split.
For simmetry POST_STOP and POST_PAUSE are also added, however they
aren't used yet.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-08-31 21:14:37 +01:00
ShriramShastry 3d674bca57 TDFB Improve directivity index and WNG
Added singular value decomposition algorithm
	for diagonal matrix calculation. Added filters for side
	lobe artifacts.

Signed-off-by: ShriramShastry <malladi.sastry@intel.com>
2021-08-30 11:00:52 +01:00
Seppo Ingalsuo 23c7e4739c Topology: Add development example of demux and EQ band-split pipeline
This patch adds topologies sof-apl-nocodec-demux-eq-2ch4ch.tplg and
sof-apl-nocodec-demux-eq-4ch4ch.tplg. Playback of 2ch creates 4ch
output in format L_lo, L_hi, R_lo, and R_hi. An example band-split
at 2 kHz is configured for EQ processing. The low band contains
an additional 80 Hz high-pass.

The pipeline was tested in UP2 device. The nocodec topology enables
an useful SPP loopback mode. The capture PCM is connected to DAI
loopback so this pipeline can be tested with simultaneous 2ch aplay
and 4ch arecord.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-08-26 09:57:35 +01:00
Rander Wang 0fefcc8bdf topology2: ipc4: add mixin & mixout support
Also add a simple pipeline used by windows. A normal
playback pipeline is : copier -> mixin -> mixout -> gain -> copier

Signed-off-by: Rander Wang <rander.wang@intel.com>
2021-08-26 09:49:43 +01:00
Jaska Uimonen 73803adec9 topology2: add dmic to nocodec topology
Add dmic definition to nocodec topology.

Suggested-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2021-08-25 15:39:43 +01:00
Jaska Uimonen c4880ff50a topology2: add dmic and pdm classes
Add classes for dmic and pdm config.

Suggested-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2021-08-25 15:39:43 +01:00
Pin-chih Lin 541e070eec multiband_drc: Add switch control for enabling DRC
Add mixer type control switch for enabling/disabling DRC.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2021-08-24 17:46:09 +01:00
Ming Jen Tai d3381eaa13 Integrate RTNR into sof-tgl-max98357a-rt5682.m4
Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
2021-08-24 17:41:38 +01:00
Marc Herbert 1d8f68140e tools: remove spurious dependency on rimage
This reverts May 2020 commit a2de860f42 ("cmake: fix tools build
with submodules") that added a dependency on rimage for the entire
`tools/` subdirectory, probably because `smex/ldc.h` included
`rimage/fw.h` (removed in previous commit).

Looking at the code review I can see no apparent attempt to understand
anything, not even a quote of a build error message.

This will hopefully unblock
https://github.com/zephyrproject-rtos/zephyr/pull/37250

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-08-24 13:22:47 +03:00
Yong Zhi 0570315cd9 topology: pipe-volume-demux-playback: fix pipeline comments
Update the comments to match the P_GRAPH definition.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2021-08-23 13:25:37 +01:00
Fred Oh ce97fc7128 topology1: sof-tgl-sdw-max98373-rt5682: use a mockup of the smart amp
Remove 3rd party library dependency.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2021-08-18 13:10:45 +01:00
Ming Jen Tai bbc5209c4f Support RTNR on Tigerlake platform
This PR adds RTNR Noise Reduction/Suppression(NR/NS) component by
Realtek Semiconductor Corp. This feature links to proprietary libraries.
Please contact antz0525@realtek.com for any question about the library.

Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
2021-08-17 16:18:21 +01:00
Yong Zhi 93e572050c topology1: tgl-max98357a-rt5682 fix ENDPOINT_NAME macro side effect
Without enclosing ENDPOINT_NAME with `', the generated tplg has
pcm id 0 named to "Headphones" instead of "Speakers".

$ ./tplgtool.py ~/work/sof/tools/build_tools/topology/sof-tgl-max98357a-rt5682.tplg
pcm=Headphones;id=0;type=playback;fmt=S16_LE;rate_min=48000;rate_max=48000;ch_min=2;ch_max=2;
pcm=Headset;id=1;type=both;fmt=S16_LE;rate_min=48000;rate_max=48000;ch_min=2;ch_max=2;
pcm=HDMI1;id=2;type=playback;fmt=S16_LE;rate_min=48000;rate_max=48000;ch_min=2;ch_max=2;
pcm=HDMI2;id=3;type=playback;fmt=S16_LE;rate_min=48000;rate_max=48000;ch_min=2;ch_max=2;
pcm=HDMI3;id=4;type=playback;fmt=S16_LE;rate_min=48000;rate_max=48000;ch_min=2;ch_max=2;
pcm=HDMI4;id=5;type=playback;fmt=S16_LE;rate_min=48000;rate_max=48000;ch_min=2;ch_max=2;
pcm=EchoRef;id=6;type=capture;fmt=S16_LE;rate_min=48000;rate_max=48000;ch_min=2;ch_max=2;
pcm=DMIC;id=99;type=capture;fmt=S32_LE;rate_min=48000;rate_max=48000;ch_min=4;ch_max=4;
pcm=DMIC16kHz;id=100;type=capture;fmt=S16_LE;rate_min=16000;rate_max=16000;ch_min=2;ch_max=2;

$ grep Headphones topology/sof-tgl-max98357a-rt5682.conf -n -B5

7071-# PCM Low Latency, id 0
7072:SectionPCM."Headphones" {
7073-
7074-	# used for binding to the PCM
7075-	id "0"
7076-
7077:	dai."Headphones 0" {
7078-		id "0"
7079-	}

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2021-08-16 09:05:01 +01:00
Vamshi Krishna Gopal 6713cace35 topology: sof-tgl-max9357a-rt5682: add support for ADL
For speakers SSP2 link is used.
For Headset SSP0 link is used.
Adding required macros to select SSP and Platform.

Signed-off-by: Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.com>
2021-08-13 17:45:41 +01:00
Oleh Titov 691c4e0587 topology: Add Waves codec to JSL topology
Modify sof-jsl-rt5682 topology so Waves codec can be added
to playback in case 'WAVES' is defined.
Small refactoring

Signed-off-by: Oleh Titov <Otitov@waves.com>
2021-08-12 14:51:38 +01:00
Kai Vehmanen c8b759a806 topology1: fix error in LOCAL_CHANNELS_MIN definition
The patch to fix CHANNELS_MIN side effects had a bug in which caused
LOCAL_CHANNELS_MIN to slip into conf output. Example from
sof-adl-sdw-max98373-rt5682:

---cut--
SectionPCMCapabilities."Passthrough Capture 14" {
»       formats "S16_LE"
»       rate_min "8000"
»       rate_max "16000"
»       channels_min "LOCAL_CHANNELS_MIN"
--cut--

Fixes: 659266685b ("topology: remove side effects from macro definitions")
BugLink: https://github.com/thesofproject/sof/issues/4621
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2021-08-12 10:40:57 +03:00
Iuliana Prodan bee27fe258 topology1: i.MX: Add topology with DRC component
Dynamic range compression (DRC) or simply compression is an
audio signal processing operation that reduces the volume of
loud sounds or amplifies quiet sounds, thus reducing or
compressing an audio signal's dynamic range.

This enables the DRC component for i.MX8QM/i.MX8QXP/i.MX8MP
with wm8960 codec.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-08-11 13:47:54 +03:00
Bud Liviu-Alexandru 659266685b topology: remove side effects from macro definitions
This commit fixes the issue mentioned in #4583.

A temporary definition is introduced that takes it's value from
"CHANNELS_MIN" if it is already defined, otherwise it is set to
a default value. This temporary is used instead of "CHANNELS_MIN"
for the rest of the file. This avoids having the macro defined in
files where it shouldn't be.

In order to be completely sure it avoids side effects this temporary
is undefined after it is no longer needed.

Signed-off-by: Bud Liviu-Alexandru <budliviu@gmail.com>
2021-08-09 21:28:40 +01:00
Ranjani Sridharan 5a42c023d2 topology1: make all cavs nocodec topologies dynamic
All cAVS platforms can use dynamic pipelines with nocodec topology.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-08-05 22:45:35 +01:00
Daniel Baluta 0d14a64ea6 topology1: i.MX: Add topology to demonstrate EQ FIR component
This enables EQ component using FIR filter for i.MX8QM/i.MX8QXP/i.MX8MP.

Usage:

   $  amixer -Dhw:1 controls | grep EQ
    numid=44,iface=MIXER,name='EQFIR1.0 eqfir_coef_1'

  $ ./sof-ctl -Dhw:1 -n 44 -s sof/tools/ctl/eq_fir_loudness.txt

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-08-03 13:34:11 +01:00
Daniel Baluta ffe4d594ae topology1: pipe-eq-fir-volume: Fix ControlBytes section name
ControlBytes section name is given by DEF_EQFIR_COEF macro.
Otherwise, using pipe-eq-fir-volume-playback.m4 in a topology results in
a compilation error.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-08-03 13:34:11 +01:00
Daniel Baluta c26dfff3bf topology1: imx8ulp: Set min_channels to 1
On i.MX8ULP SAI5 is connected to BT interface that only supports 1
channel.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-08-03 11:44:19 +03:00
Daniel Baluta e2fc7082e1 topology1: Add CHANNELS_MIN macro for playback pipeline
Add macro to allow configuration of min channels in PCM_CAPABILITIES.
The default behavior is not changed.

So far min channels was hardcoded to 2 for pipe-volume-playback but we
need mono for i.MX8ULP configuration.

Notice that we need to use the local macro TCHANNELS_MIN because we
don't want to modify the value of CHANNELS_MIN macro outside
of sof/pipe-volume-playback.m4 file.

Doing so will cause unpredictable behavior for next pipeline
definitions.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-08-02 22:08:07 +01:00
Zhang Peng ac3c5eb76f topology: Add sof-imx8ulp-btsco.m4 for imx8ulp
IMX8ULP pipeline is HOST-->VOLUME-->DAI(sai)-->CODEC(bluetooth).

Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
2021-08-02 21:42:31 +01:00
Rander Wang d38c3c3912 topology2: add hda volume pipeline support for ipc4
This is for generic hda machine driver. Dmic is
not included since it is been developing. The gain
module in ipc4 has the function of volume component
in ipc3 and we use it to control volume.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2021-07-30 22:44:31 +01:00
Rander Wang 2ebe36aedd topology2: add volume support for ipc4
Volume is supported by gain module in ipc4. We need
to set curve_type, curve_duration and init_val for
this module.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2021-07-30 22:44:31 +01:00
Rander Wang 884bfdf125 topology2.0: add some basic class definitions
Signed-off-by: Ranjani Sridharan <ranjani.sidharan@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
2021-07-30 22:44:31 +01:00
Daniel Baluta 53718867df topology: imx8mp: Add compress decoding pipeline for i.MX8MP with aac/mp3 codecs
Add topology to support compress playback for MP3/AAC
on i.MX8MP with wm8960 codec.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-07-29 16:07:28 +03:00
Daniel Baluta 64be6a6578 topology: imx8: Add compress decoding pipeline for i.MX8/i.MX8X with aac/mp3 codecs
Add topology to support compress playback for MP3/AAC on i.MX8/i.MX8X
with wm8960 codec.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-07-29 16:07:28 +03:00
Ranjani Sridharan 764a065193 topology1: sof-cavs-nocodec: Add deep buffer playback pipeline
on SSP5 for BXT and SSP0 for all others.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-07-23 08:34:36 +01:00
Ranjani Sridharan 56d1fe652c topology1: sof-cavs-nocodec: convert all playback pipelines to mixer-based pipelines
Convert all playback pipelines to have a mixer so adding a deep-buffer
pipeline will be simpler.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-07-23 08:34:36 +01:00
Ranjani Sridharan 808c4512c5 Revert "topology: cavs-nocodec: Add deepbuffer pipeline to SSP0 and SSP2"
This reverts commit a10b5dcf85.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-07-23 08:34:36 +01:00
Ranjani Sridharan 463c4afd10 Revert "topology1: sof-cavs-nocodec: Add the deep buffer PCMs"
This reverts commit 6516a8c89b.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-07-23 08:34:36 +01:00
Daniel Baluta 52bc39fe73 topology: i.MX: Add topology to demonstrate EQ component
This enables EQ component with IIR filter for i.MX8QM/i.MX8QXP/i.MX8MP
with wm8960 codec.

Users can try various configurations for EQ parameters using sof-ctl tool:

$  amixer -Dhw:1 controls | grep EQ
numid=44,iface=MIXER,name='EQIIR1.0 eqiir_coef_1'

$ ./sof-ctl -Dhw:1 -n 44 -s sof/tools/ctl/eq_iir_bassboost.txt

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-07-22 17:07:23 +01:00
Daniel Baluta 1203a46633 tools: ctl: Fix getopt() stop condition
getopt() returns an int, which in our implementation is assigned to a
char type var.

On some platforms char is unsigned thus making getopt() return value
always > 0.

Use int instead of char here to fix the stop condition for parameter
parsing.

This makes sof-ctl work on ARM platforms.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-07-22 17:06:52 +01:00
Bard Liao bb18f62b54 topology2: copier: add ALH type
ALH is a valid type of copier.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2021-07-22 17:03:08 +01:00
Seppo Ingalsuo 4c376680f5 Tools: Fix topology1 path in Matlab language scripts
The change for topology1 was missing from various tuning
and testing scripts those access binary blob data from
topology m4 directories.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-21 12:13:36 +01:00
Ranjani Sridharan 6516a8c89b topology1: sof-cavs-nocodec: Add the deep buffer PCMs
We weren't really testing these yet without the PCM devices.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-07-21 10:23:10 +01:00
Bard Liao f96e25ffcc topology2: add cavs sdw topology
Add sdw topology for headset which includes one playback and one capture
pcms.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2021-07-19 13:19:12 +01:00
Bard Liao 4e76df5221 topology2: add ALH DAI class
Add ALH DAI class definition, ALH DAI objects can be
instantiated as:

Object.Dai.ALH."N" {
 	direction		"capture" # playback or capture
 	dai_name		"SDW0-Capture"
 	id 			2
 	Object.hw_config."2" {
 	}
}

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2021-07-19 13:19:12 +01:00
Pierre-Louis Bossart d1abc88153 topology: add development version for Volteer tests
Add support for reuse of sof-tgl-rt711-rt1308 on Google Volteer. This
is not intended for production but removes both hotwording and
smart-amp support - this simpler topology is intended for
SoundWire/DMIC tests only.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-07-19 09:40:52 +01:00
Pierre-Louis Bossart f3840a70c3 topology1: tweak sof-tgl-rt711-rt1308 to test on Google Volteer
The topologies used for sof-tgl-rt711-rt1308 and
sof-tgl-max98357a-rt5682 are almost equivalent.

Conditionally add support for the amplifier reference dailink and BT
offload, so that this topology can be used as is on Google
Volteer. This will help root-cause suspend/resume issues we see only
on TGL_RVP_SDW

Related kernel PR: https://github.com/thesofproject/linux/pull/3006

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-07-19 09:40:52 +01:00
Seppo Ingalsuo 0fa9f7d892 Topology: Updated TDFB related topology files with beam controls
This patch contains updates to add beam on/off and direction controls.
The common m4 tasks to add controls are placed to include files
tdfb_controls.m4, tdfb_defines.m4, tdfb_undefines.m4.

The single beam examples are replaced by blobs with 0, +/-30, and +/-90
degree angled beams. The Arrays are 50m, 68mm spaced for typical
notebook microphones. The 28mm example is for four microphones. A four
microphones for notebook with microphones at 0, 36, 146, and 182mm
line locations.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-14 15:59:24 +01:00
Seppo Ingalsuo bd6db82eeb Tools: Tune: TDFB: Do not include plot figures to saved .mat files
This saves disk space from unnecessary data.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-14 15:59:24 +01:00
Seppo Ingalsuo a5fc4a643f Tools: Tune: Update TDFB topology include files location
Topologies 1.0 location has been changed. This update allows the
tool to create the files into correct path.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-14 15:59:24 +01:00
Seppo Ingalsuo b9a14709bf Tools: Tune: Add option for delay-and-sum to beamformer design
The delay-and-sum beamformer has highest white noise gain (WNG)
performance. It's good id suppressing microphone self noise. The
beam is steered with pure delay adjust in the all-pass filter
bank. Default type is still super directive. Use DSB or SDB
as beamformer type to select.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-14 15:59:24 +01:00
Seppo Ingalsuo deb7849f76 Tools: Fixes to TDFB tune and test scripts
Matlab does not support isfile(), so another command is used to
check if a file exists. The new way works both in Octave and Matlab.

The bf_defaults.m is fixed to properly initialize empty strings
to cell arrays. It's needed with minimal command like usage
as shown in SOF Docs examples.

In bf_design.m the num_filters determination is moved after array
helpers because other than line and circle do not use mic_n parameter.
The bug resulted to zero num_filters.

In bf_merge.m the unused bf3 and bf4 are removed.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-14 15:59:24 +01:00
Seppo Ingalsuo 46d52efdd8 Tools: Tune: Add multiple angles and beam off settings add to TDFB blob
This patch essentially adds support for steer_az/steer_el to be
vector instead of scalar. The beam off preset is added by default
automatically for N-channel in N-channel out configurations. Microphone
(x,y,z) coordinates are passed in to blob for direction of arrival
reporting.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-14 15:59:24 +01:00
Seppo Ingalsuo 92ddb0d137 Tools: Tune: Fix beamformer rotate and diffuse simulation data generate
This patch fixes the incorrect delaying of simulation input signal to
microphones. Instead of delaying the old code advanced the input the
more the larger the input is. E.g. It caused the tests for line arrays
to show a mirrored beam pattern.

The num_filters is replaced by mic_n (microphones count). It is the
correct count to use here though usually filters count is the same.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-14 15:59:24 +01:00
Seppo Ingalsuo 53c7ea6dd1 Tools: Tune: Add frequency response and group delay plots
The plots help to understand beamformer channel filters characteristic.
Frequency response is usually all-pass type and group delays match
the delays need to time-align the waveforms from steer angle.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-14 15:59:24 +01:00
Seppo Ingalsuo 064285e19c Tools: Tune: Center the beamformer impulse responses
This patch improves the beamformer performance (vs. tap count) by
shifting the extract window location for IFFT output by mean of
all impulse responses center. Previously the first filter was centered
and other filters were more towards start or end of impulse response.
The change helps to cope with smaller filter length with larger size
arrays with steer angles those spread the impulse response further
away time-wise from each other.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-14 15:59:24 +01:00
Seppo Ingalsuo 9faf7e4e44 Testbench: Fix for multiple controls parsing for process components
This patch prevents topology parse failure when there are multiple
controls, e.g. enum controls.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-14 15:59:24 +01:00
Rander Wang ab387b9bfc topology2: use correct key word for contraint attribute
Signed-off-by: Rander Wang <rander.wang@intel.com>
2021-07-14 15:32:17 +01:00
Rander Wang b42798bc6a topolog2: add dai setting for cavs-nocodec
The change is based on dai setting in copier

Signed-off-by: Rander Wang <rander.wang@intel.com>
2021-07-14 15:32:17 +01:00
Rander Wang 3a894af0ce topolog2: add dai token support in copier
Copier widget may be used as a dai component in ipc4 path,
so we need to add dai token in copier, including dai_index,
dai_type and direction. They are optional attributes and can
be set only for dai type. We don't reuse copier_type for dai
since copier type may be host or just copy module.

Signed-off-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Tested-by: Bard Liao <bard.liao@intel.com>
2021-07-14 15:32:17 +01:00
Ranjani Sridharan a10b5dcf85 topology: cavs-nocodec: Add deepbuffer pipeline to SSP0 and SSP2
Add a deepbuffer pipelines connected to the the mixer-dai
pipeline for SSP0 and SSP2. The pipeline deadlines are left at
1ms for now and will be changed later after the mixer pipelines
are validated.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-07-13 16:00:11 +01:00
Chao Song 5374da8c89 topology2: Add cavs nocodec topology
Only a playback pipeline and a capture pipeline
on SSP0 are added.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2021-07-09 12:02:01 +01:00
Chao Song 95cc4613ce topology2: Add cavs passthrough-capture pipeline
Add class definition for cavs passthrough-capture
pipeline, and it can be instantiated as:

    Object.Pipeline.passthrough-capture."N" {
	format		"s16le"
	period		1000
	time_domain	"timer"
	channels	2
	rate		48000
    }

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2021-07-09 12:02:01 +01:00
Chao Song e8c71e458d topology2: Add cavs passthrough-playback pipeline
Add class definition for cavs passthrough-playback
pipeline, and it can be instantiated as:

    Object.Pipeline.passthrough-playback."N" {
	format		"s16le"
	period		1000
	time_domain	"timer"
	channels	2
	rate		48000
    }

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2021-07-09 12:02:01 +01:00
Chao Song 2e1d2ecabb topology2: Add HW Config class
Add class definition for HW Config, HW Config object
can be instantiated as:

  Object.Base.hw_config."NAME" {
	id		0
	mclk_freq	24000000
	bclk_freq	4800000
	tdm_slot_width	25
    }

where NAME is the unique instance name for the hw_config
object within the same alsaconf node, for example, SSP0.

Signed-off-by: Ranjani Sridharan <ranjani.sidharan@linux.intel.com>
Signed-off-by: Chao Song <chao.song@linux.intel.com>
2021-07-09 12:02:01 +01:00
Chao Song 17902fcbf0 topology2: Add SSP DAI class
Add SSP DAI class definition, SSP DAI objects can be
instantiated as:

Object.Dai.SSP."N" {
    direction		"duplex"
    dai_name		"NoCodec-0"
    id 			0
    quirks		"lbm_mode"
    sample_bits		24
    Object.hw_config."0" {
	    mclk_freq	24000000
	    bclk_freq	4800000
	    tdm_slot_width	25
    }
    Object.dai."playback" {
	    period_source_count	2
	    period_sink_count	0
    }
    Object.dai."capture" {
	    period_source_count	0
	    period_sink_count	2
    }
}

Signed-off-by: Ranjani Sridharan <ranjani.sidharan@linux.intel.com>
Signed-off-by: Chao Song <chao.song@linux.intel.com>
2021-07-09 12:02:01 +01:00
Chao Song 3d184df6bf topology2: Add manifest class
Add class definition for manifest.

Signed-off-by: Ranjani Sridharan <ranjani.sidharan@linux.intel.com>
Signed-off-by: Chao Song <chao.song@linux.intel.com>
2021-07-09 12:02:01 +01:00
Chao Song 4be5a29275 topology2: Add FE DAI class
Add FE DAI class definition, the FE DAI object can be
instantiated as:

    Object.Base.fe_dai."NAME" {
	id  0
    }

Signed-off-by: Ranjani Sridharan <ranjani.sidharan@linux.intel.com>
Signed-off-by: Chao Song <chao.song@linux.intel.com>
2021-07-09 12:02:01 +01:00
Chao Song 256bc69f31 topology2: Add pcm capabilities class
Add pcm capabilities class definition, pcm
capabilities object can be instantiated as:

    Object.PCM.pcm_caps."DIRECTION" {
	name	    "Headset"
	direction   "playback"
	formats	    "S32_LE,S24_LE,S16_LE"
	rate_min	48000
	rate_max	48000
	channels_min	2
	channels_max	2
	periods_min	2
    }

Signed-off-by: Ranjani Sridharan <ranjani.sidharan@linux.intel.com>
Signed-off-by: Chao Song <chao.song@linux.intel.com>
2021-07-09 12:02:01 +01:00
Chao Song ae80d3b8af topology2: add PCM class
Add class definition for pcm, pcm object
can be instantiated as:
    Object.PCM.pcm."N" {
	id		2
	pcm_name	"Headset"
	direction	"playback"
    }

Signed-off-by: Ranjani Sridharan <ranjani.sidharan@linux.intel.com>
Signed-off-by: Chao Song <chao.song@linux.intel.com>
2021-07-09 12:02:01 +01:00
Chao Song 6053a4ffef topology2: add copier class
Add class definition for copier widget, it can be
instantiated as:
    Object.Widget.copier."N" {
	copier_type	"host"
	cpc	100000
    }

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2021-07-09 12:02:01 +01:00
Iris Wu be3dff2780 topology1: sof-tgl-nocodec-ci: use volume capture for PCM0
capture

S32_LE without PGA is not supported in alsabat, switch to use
pipe-volume-capture and unblock the CI alsabat test case.

Signed-off-by: Iris Wu <xiaoyun.wu@intel.com>
2021-07-08 22:28:44 +01:00
Pierre-Louis Bossart 019c1505b1 topology: cavs-nocodec: use s24le for DAIs for all platforms
The use of s32le did not expose any problems on APL, but alsa-bat was
previously reported as failing on JSL. Now that this test was extended
to CML_NOCODEC, we see the same issue. Manual tests with s24le show no
issues.

Let's just use s24le across the board and move on.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-07-06 18:28:21 +01:00
Brent Lu ad7f0e52b8 topology: sof-glk-da7219/cs42l42: enable bclk control
Enable the bclk clock control for SSP2.

Note that this impacts existing GLK-based chromebooks as well as newer
hardware.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2021-07-06 17:12:30 +01:00
Bard Liao fffa38db2a topology: sof-cavs-nocodec: enable MCLK/BCLK early start
Set clks_control to (SOF_DAI_INTEL_SSP_CLKCTRL_MCLK_ES |
SOF_DAI_INTEL_SSP_CLKCTRL_BCLK_ES) to enable MCLK/BCLK early start
feature.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2021-07-06 17:12:30 +01:00
Brent Lu 16878e387e topology: ssp: mclk/bclk clock control
Define the SSP_CC_MCLK/BCLK_ES bit to be used in SSP_CONFIG_DATA macro
to enable mclk/bclk on hw_params and disable malk/bclk on hw_free.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2021-07-06 17:12:30 +01:00
Pierre-Louis Bossart a0f789dfc6 topology: cavs-nocodec: temporarily fix jsl-nocodec issues with s24le
For some reason s32le does not work for DAI definitions on JSL-NOCODEC
platforms. alsa-bat tests fail, but they work fine on APL, CNL,
TGL. This is likely to be an ICL platform issue. The root cause is
still TBD

Use s24le for now to unlock Intel daily tests.
All other platforms remain with s32le.

BugLink: https://github.com/thesofproject/sof/issues/4427
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-07-01 13:31:57 -05:00
Zhang Keqiao 130bffa6a9 topology: add tgl-h nocodec topology build
add the TGL-H nocodec topology for zephyr test.

Signed-off-by: Zhang Keqiao <keqiao.zhang@intel.com>
2021-06-29 22:51:10 +01:00
Brent Lu 8c863f43af topology: sof-glk-cs42l42: using 24-bit sample depth on SSP2
Changing sample depth of SSP2 to 24 bits for better dynamic range.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2021-06-29 22:41:08 +01:00
Liam Girdwood eb7add5135 testbench: add a option for specifying the number of copy() iterations
All the user to specify the number of copies.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-06-29 11:05:58 +01:00
Liam Girdwood b8d6760600 testbench: fix crash when file has no . extension
Testbench crashed when a in/out file has not . extension. Fix this.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-06-29 11:05:58 +01:00
Liam Girdwood 305223a1f6 testbench: free components and pipeline after test results.
Move the comp free to after the results and free the pipeline.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-06-29 11:05:58 +01:00
Liam Girdwood 777c0008c1 testbench: add more helpful output for options parsing.
Lets be more helpful to the user.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-06-29 11:05:58 +01:00
Liam Girdwood bc10ba8b76 testbench: squash some valgrind warnings.
Buffer and params not initialised to zero like the other IPC structures
used by testbench. Fix this.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-06-29 11:05:58 +01:00
Pierre-Louis Bossart 2d70f100c7 topology: use cAVS nocodec support for APL/GLK
Move the existing sof-apl-nocodec to the development folder, in case
SOF CI still wants to use it.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-06-25 11:18:28 -05:00
Pierre-Louis Bossart b5b0b2c4f2 topology: use same file for all cavs 1.8+ nocodec topologies
The beginning of the end of insanity?

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-06-25 11:18:28 -05:00
Pierre-Louis Bossart fdd8ec03b5 topology: sof-cnl-nocodec: prepare for different multicore configurations
Not all devices have 4 cores, some only have 2 and even APL/GLK is
currently limited to a single core.

For now we still use a single core for all topologies, we will enable
multi-core in a follow-up patch.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-06-25 11:18:28 -05:00
Pierre-Louis Bossart 4050ff6c31 topology: intel-generic-dmic: add macro for DMIC_CORE_ID
Add macros to quickly enable multi-core with DMICs

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-06-25 11:18:28 -05:00
Pierre-Louis Bossart c952c048b2 topology: sof-cnl-nocodec: change SSP index for APL
Prepare for use on APL to use SSP0,1, 5, all other platforms use SSP0,1,2

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-06-25 11:18:28 -05:00
Pierre-Louis Bossart ac8df75466 topology: sof-cnl-nocodec: make SSP clocks parameters
use platform name to infer root clocks

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-06-25 11:18:28 -05:00
Pierre-Louis Bossart ab3663f468 topology: sof-cnl-nocodec: use s32le
No idea what we add artificial limitations on formats

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-06-25 11:18:28 -05:00
Pierre-Louis Bossart 556c114f47 topology: sof-cnl-nocodec: add macros for SSP cores
Prepare for reuse across all platforms. For now this still uses
single-core.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-06-25 11:18:28 -05:00
Pierre-Louis Bossart d1bce3d8fc topology: sof-cnl-nocodec: use DMIC macros
Remove all the hard-coding and use macros.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-06-25 11:18:28 -05:00
Pierre-Louis Bossart a379cc3751 topology: CMakelist: disable DYNAMIC pipelines for nocodec topologies
We first want to enable the simplified topologies, then multi-core
then dynamic pipelines. The latter two cases will be handled in
follow-up patches.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-06-25 11:18:28 -05:00
Pierre-Louis Bossart f07cf8ea1f topology: CMakelists: group nocodec together
Prepare for use of common file

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-06-25 11:18:28 -05:00
Gongjun Song bc1497a742 Topology: Add sof-tgl-rt711-4ch topology
There is no rt1308 on the TGL-H-RVP platform, need to add a topology
file with only rt711 to enable soundwire on the TGL-H-RVP platform.

The patch of enable soundwire on the TGL-H-RVP platform has been
merged into the thesofproject/linux.

Signed-off-by: Gongjun Song <gongjun.song@intel.com>
2021-06-23 15:06:35 +01:00
Ranjani Sridharan 86c9a037e2 topology: utils: remove DAPM routes for virtual widgets
Remove the addition of DAPM routes for virtual widgets.
These are not needed for suppressing errors with legacy
machine drivers. Just adding the virtual widget is enough.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-06-21 16:46:39 +01:00
Pierre-Louis Bossart 97bfb24d70 topology: sof-cnl-nocodec: use different core for each DAI
The UpExtreme HAT connector with the SoundWire,
I2S, DMIC mixed mode exposes the following pins

DMIC_DATA0: input: HAT PIN 8
DMIC_CLK: output: HAT PIN 26

IS2_MCLK: output: HAT PIN 16

I2S1_SCLK: output: HAT PIN 32
I2S1_SFRM: output: HAT PIN 10
I2S1_TXD: output: HAT PIN 24
I2S1_RXD: input: HAT PIN 18

Let's use core3 for DMIC, core2 for SSP0, core1 for SSP1 and core0 for
SSP2.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-06-18 11:17:21 +01:00
Ranjani Sridharan 7668b39b07 topology2: Add pipeline classes
Add some pipeline classes for volume playback/capture, passthrough
capture and eq capture.
Each of these classes include the pipeline widget objects, connections
between pipeline widgets and pipeline attribute definitions

For ex: A volume playback pipeline can be instanted as follows:
Object.Pipeline.pipeline-volume-playback."2" {
	channels	2
	rate		48000
	index		5
	format		"s32le"
}

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-06-18 11:10:05 +01:00
Ranjani Sridharan c0bee428ae topology: prepare for Topology2.0
In preparation for Topology2.0, move the current topology files
to the topology1 folder and once the 1.0 topologies are
built copy them to the /sof/tools/build-tools/topology folder.

When Topology2.0 topologies come along, they will be built into
the topology2 folder and the 2.0 binaries will be copied over
the 1.0 binaries.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-06-17 22:17:30 +01:00
Pin-chih Lin e91001af67 topology: Add DRC_EQ def for adopting DRC/EQ pipeline
For speaker pipeline, we want to deploy DRC/EQ for partial TGL device
like Eldrid. The definition flag DRC_EQ is added to make the choice of
adopting the playback pipeline with DRC/EQ.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2021-06-17 11:43:45 -07:00
Viorel Suman 195774bce6 topology: imx8: kwd: use s32le format instead of s16le
Use s32le format instead of s16le.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2021-06-17 09:49:22 +01:00
Ranjani Sridharan 3018193d3a topology: eq pipelines: remove duplicate SectionData
Remove the duplicate SectionData when multiple EQ's use the
same filter coefficients. There is no change in the topology
binary generated with just one SectionData instead of multiple
ones.

But this will help clean up the conf file so that converting to
topology2.0 will become easier as the name tells me which
coefficients to include.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-06-16 22:16:47 +01:00
Ranjani Sridharan 55f6116bbf topology2: Add pipeline widget class definition
The pipeline widget can be instantiated within a pipeline class as:
	Object.Widget.pipeline."N" {
		index		1
		time_domain	"timer"
		period		1000
	}

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-06-16 21:51:03 +01:00
Ranjani Sridharan 855cdd9301 topology2: Add class for DAPM route
Add a route class that will be used for creating DAPM routes
between widgets. A route can be between 2 widgets or between a
widget and pipeline endpoint as follows:
	Object.Base.route."N" {
		source	"dai.SSP.1.dai.capture"
		sink	"buffer.0.1"
	}

	Object.Base.route."N" {
		source	"buffer.2.1"
		sink	"pga.2.0"
	}

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-06-16 21:51:03 +01:00
Ranjani Sridharan a996be5031 topology2: pga: Add mixer controls
Add the volume and switch mixer control objects for the
PGA class. The mixers will be added to the PGA widget
if the pga widget is instantiated with names for each
of the mixers as follows:

Object.Widget.pga.0 {
	Object.Control.mixer.1 {
		name	"1 Master Capture Volume"
	}
	Object.Control.mixer.2 {
                name   "Capture Switch"
        }
}

If the name is only provided for one of the controls, only
that control will be added to the widget when building topology.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-06-16 21:51:03 +01:00
Ranjani Sridharan 0027521536 topology2: Add mixer control class
Add the class definition for a mixer control.
A mixer control can be instantiated as follows:
	Object.Control.mixer."0" {
		Object.Base.channel."fr" {
			shift	0
		}
		Object.Base.channel."fl" {}

		Object.Base.tlv."vtlv_m64s2" {
			Object.scale."0" {
				mute	1
			}
		}

		Object.ops."ctl" {
			info	"volsw"
			get	256
			put	256
		}
	}

Also add the other commonly used class definitions that
will be used to instantiate the mixer object such as,
channel, TLV, ops, scale etc.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-06-16 21:51:03 +01:00
Curtis Malainey a29806d9c7 topology: remove default google hotword
hotword is not public and therefore should not be on by default

Signed-off-by: Curtis Malainey <curtis@malainey.com>
2021-06-16 21:09:50 +01:00
Chao Song 9c50fff928 topology2: add asrc class
Add the class definition for ASRC widget, it can be
instantiated as follows:
	Object.Widget.asrc."N" {
		period_sink_count	2
		period_source_count	2
		format			"s24le"
		rate_out		48000
		asynchronous_mode	1
		operation_mode		0
	}

Where N is the unique instance number for asrc widget
within the same alsaconf node.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2021-06-15 12:43:12 +01:00
Chao Song d3f3c50205 topology2: add src class
Add the class definition for SRC widget, it can be
instantiated as follows:
	Object.Widget.src."N" {
		period_sink_count	2
		period_source_count	2
		format			"s24le"
		rate_out		48000
	}

Where N is the unique instance number for src widget
within the same alsaconf node.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2021-06-15 12:43:12 +01:00
Ranjani Sridharan a68b1af80d topology2: Add pga class
Add the class definition for PGA widget. It can be
instantiated as follows:
        Object.Widget.pga."N" {
                format	     s24le
                index        0
		period_sink_count 2
		period_source_count 2
        }

Where N is the unique instance number for pga widget in the same
alsaconf node.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-06-14 18:51:12 +01:00
Ranjani Sridharan d720725840 topology2: Add buffer class
Add the definition for the buffer class. A buffer object
can be instantiated as follows:
Object.Widget.buffer."N" {
	index	0
	periods	2
	caps	"host"
}

where 'N' is a unique instance number for the buffer object within
the same alsaconf node.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-06-14 18:51:12 +01:00
Ranjani Sridharan 4d830c908c topology2: Add DAI widget class
Add the class definition for DAI widgets. A DAI widget
can be instantiated as follows:
Object.Widget.dai."playback" {
	type			SSP
	index			"1"
	period_sink_count	"2"
	period_source_count	"0"
	widget_type		"dai_in"
}

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-06-14 18:51:12 +01:00
Ranjani Sridharan 9ef233de48 topology2: Introduction to Topology2.0
About
    -----

    This is a high level keyword extension on top of the existing ALSA
    conf topology format designed to:

    1) Simplify the ALSA conf topology definitions by providing high level
       "classes" so topology designers need to write less config for common
       object definitions.

    2) Allow simple reuse of objects. Define once and reuse (like M4) with
       the ability to alter objects configuration attributes from defaults.

    3) Allow data type and value verification. This is not done today and
       frequently crops up in FW bug reports.

    Common Topology Classes
    -----------------------

    Topology today has some common classes that are often reused throughout
    with slightly altered configurations. i.e. widgets (components),
    pipelines, dais and controls.

    This PR introduces the high level concept of reusable "class" like
    definition for a AIF_IN/AIF_OUT type object that can be used to create
    topology objects.

    Common Topology Attributes
    --------------------------
    Topology defines a lot of attributes per object with different types
    and constraints. Today there is no easy way to validate type or
    constraints and this can lead to many hard to find problems in FW at
    runtime.

    A new keyword "DefineAttribute" has been added to define attribute
    type, size, min value, max value, enum_values. This then allows
    alsatplg to validate each topology object attribute.

    Topology Classes define the list of attributes that they use and
    whether the attribute is mandatory, can be overridden by parent users
    or is immutable. This also helps alsatplg emit the appropriate errors
    for attribute misuse.

    Common Topology Arguments
    -------------------------

    Arguments are used to pass essential data needed for instantiating an
    object particularly needed for the object name. A new keyword
    "DefineArgument" has been added to define the arguments. The order in
    which the arguments are defined determines the name for the widget.
    For example, in the case of the host widget, the name would be
    constructed as "host.1.playback" where "1" is the pipeline_id argument
    value and "playback" is the direction argument value.

    Attribute Inheritance:
    ----------------------
    One of the key features of Topology2.0 is howthe attribute values are
    propagated from a parent object to a child object. This is accomplished
    by adding attributes/arguments with the same name for a parent and an
    object. By doing so, when creating a child object, the value for the
    common attribute is populated from the parent. If the value is provided
    in the child object instance, then it overrides the value coming from
    the parent.

    ALSA Conf Parser
    ----------------

    All the changes being proposed and discussed here must be 100%
    compliant with the ALSA conf parser. i.e. no syntax changes or
    changes to semantics for any existing keyword.

    It's intended that there will be NO changes to the ALSA conf parser
    (unless new keywords require this ?) and all topology building
    changes will be in the alsatplg compiler.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-06-14 18:51:12 +01:00
Pin-chih Lin 6515df852e topology: fix name mismatch of EQIIR control bytes
The name of CONTROLBYTES_PRIV should be aligned as mentioned in
sof/pipe-drc-eq-volume-demux-playback.m4#48.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2021-06-14 17:11:13 +01:00
Ben Zhang 6dd44d5b4c comp: Add initial Google hotword detector
Add a new component that uses the Google hotword library
to do keyword detection. The language model needs to be
set using the byte control from userspace before running
the detector.

1. Put the hotword library at $SOF_REPO/third_party_libraries/
hotword_dsp_api.h
libhifi3_google_hotword_dsp_api.a (TGL)
libcometlake_google_hotword_dsp_api.a (CML)

2. Build SOF fw and tools with xcc

3. Set language model on DUT:
amixer -c 0 contents | grep Model
      numid=73,iface=MIXER,name='GHD9.0 Hotword Model'
./sof-ctl -n 73 -t 0 -b -r -s x_google/en_all.mmap

4. Open the WoV pcm device
arecord -Dhw:0,8 -M -N -r 16000 -c2 -f s16_le --buffer-size=67200 -vvv
/tmp/wov.wav

5. Say "OK Google" and verify wov.wav

Signed-off-by: Ben Zhang <benzh@chromium.org>
Signed-off-by: Curtis Malainey <cujomalainey@google.com>
2021-06-11 13:53:12 +01:00
fy.tsuo a85e06a380 audio: igo_nr: added active channel selection
Use binary to configure active channel index.

Signed-off-by: fy.tsuo <fy.tsuo@intelli-go.com>
2021-06-11 11:39:45 +01:00
Marc Herbert 73df64444b logger: prefix and pad "task add 0xbe05ba30 <bad uid ptr 0x00000000>"
Before:
 WARN task add 0xbe05ba30 <bad uid ptr 0>

After:
 WARN task add 0xbe05ba30 <bad uid ptr 0x00000000>

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-06-10 15:50:21 +01:00
Marc Herbert 448bbc61a7 logger: print INFO and DEBUG prefixes, not just ERROR and WARN
It's not long and more consistent.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-06-10 15:50:21 +01:00
Marc Herbert ab643b7655 logger: catch out of bounds e->params[i] access
... when there are too many % characters in format string. Spotted by
routine valgrind run.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-06-10 15:50:21 +01:00
Ranjani Sridharan 5b072d97d5 topology: sof-apl-nocodec: revert to static pipelines
Dynamic pipelines will fail with the sof-apl-nocodec topology
due to issues with the memory allocator. Revert back to
use static pipelines until we have a more flexible memory
allocatory available with Zephyr.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-06-10 12:11:57 +01:00
Keyon Jie 64c5f3a46b topology: sof-tgl-nocodec-ci: fix DMIC16KHz PCM
Correct the wrong PCM name and pipeline number.

Fixes: 7c62a65ac6 ("topology: sof-tgl-nocodec-ci: add dmic16k coverage")
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-06-09 23:00:13 +08:00
Brent Lu 5abd8a9ea5 topology: sof-glk-cs42l42: using 2.4MHz bclk
By changing bclk to 2.4MHz, we can use XTAL as clock source and reduce
power consumption.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2021-06-08 21:37:15 +01:00
Keyon Jie 7c62a65ac6 topology: sof-tgl-nocodec-ci: add dmic16k coverage
Add dmic16k to run on Core 0, this will help to cover DMIC dais on
multi-core scenario (dmic 48k on core 2, dmic 16k on core 0).

Also correct the comment w.r.t. DSP cores.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-06-08 16:37:24 +01:00
Viorel Suman 58b4aa472a topology: imx8: add kwd component with wm8960 codec
Add KWD topology for imx8: SAI1 and wm8960 codec
used for recording.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2021-06-03 13:49:58 +01:00
Curtis Malainey 89e7983498 probe: fix realloc mishandling
you need to use a temp var always with realloc, otherwise you through
away your pointer to your memory (which is still valid) in the event of
realloc failing.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-06-03 13:32:59 +01:00
Curtis Malainey ead5afa6c2 probe: refactor function to decrease indent
following commit fixes a bug but to do the fix we need to allow
ourselves more room to add ifs, so lets pull out this function

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-06-03 13:32:59 +01:00
Seppo Ingalsuo 8cec7d3ef1 Topology: Allow 8 - 192 kHz rates for Media Playback PCM
The pipeline was limited to 48 kHz min and max that is not
useful for running and testing SRC component.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-06-03 13:21:35 +01:00
Liam Girdwood 60a6b1330e testbench: improve error messaging on file failures.
Tell the user the error.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-06-03 09:31:27 +01:00
Liam Girdwood da67183a6b testbench: fix the component type for file writer.
Incorrectly set as filereader. Fix it.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-06-03 09:31:27 +01:00
Liam Girdwood 74e0872f08 testebench: no need for parenthesis around case values.
Remove and use correct style.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-06-03 09:31:27 +01:00
Liam Girdwood 6c290043f7 ipc: abstraction: Add initial IPC4 support.
This patch adds the initial IPC4 messaging structures as used by existing
host middle ware. These are mapped onto existing pipeline APIs to support
creation of certain pipeline elements using IPC4.

This patch only upstream the interfaces, the IPC handler is to follow.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-06-03 09:31:03 +01:00
Ranjani Sridharan 9742cf3ae6 topology: clean up graph list name for all pipelines
No functional change. Graph names are not used anywhere.
But matching the name with the pipeline name will help
make it easy to convert 1.0 topologies to the 2.0 syntax.
Also remove the -PIPELINE_ID suffix from all the name as the
P_GRAPH macro adds it already.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-06-01 11:05:23 +01:00
Libin Yang 5d9d2ddad8 topology: fix hdmi pcm id for cnl-rt5682-sdw2
HDMI PCM id should be 5, 6, 7 as described in the
sof-cnl-rt5682-sdw2.m4.

Let's use 5, 6, 7 as the HDMI PCM ID to match the UCM setting.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2021-05-27 10:54:02 +01:00
Marc Herbert d641558ef0 logger: print the value of a negative DELTA when there is one
Because why not.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-27 09:07:46 +01:00
Marc Herbert be7bed9ddf logger: don't "return" when failing in the main loop, break instead
Set the error code in "ret" and only exit the loop so we don't lose the
optional warnings at the end of the loop.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-27 09:07:46 +01:00
fy.tsuo 9ae018b9fa topology: max98373-rt5682: define dmic 48k core id
Define DMIC_PIPELINE_48k_CORE to assign dmic 48k pipeline core id.

For sof-tgl-max98373-rt5682 platform, it is necessary to offload

dmic 48k pipeline to core 1 of TGL because igo_nr takes high MCPS.

Signed-off-by: fy.tsuo <fy.tsuo@intelli-go.com>
2021-05-26 20:24:06 +01:00
Ben Zhang 9d21f9ecf2 topology: Add a tgl-max98357a-rt5682 tplg with DMIC16k on PDM1
There are TGL devices using either PDM0 or PDM1 port for the DMIC16k
DAI for hotword detection. This patch adds the DMIC_DAI_LINK_16k_PDM
parameter and builds both versions.

Signed-off-by: Ben Zhang <benzh@chromium.org>
2021-05-26 08:08:49 -07:00
Marc Herbert fa5cc118b5 fuzzer: add deprecation README.md
As discussed in https://github.com/thesofproject/sof/pull/4132

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-24 15:27:18 -07:00
Marc Herbert e69e1c7eeb scripts/build-tools: some usage and other clarifications
Fixes #4141. I got tired of repeatedly having to read CMakeLists.txt
files.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-24 15:27:18 -07:00
Marc Herbert a5b3c8e36b logger: increase time_fmt[] size to avoid a gcc warning.
gcc does not know that we already filtered unreasonable precision
values.

Increase the size of the temporary string from 32 bytes to 64
bytes. We're running on the host, memory is cheap.

Fixes commit d6f6a456c1 ("logger: fix column and header alignments")
For some reason CMake uses -Werror=format-truncation only in Release
mode.

Avoids the following warning:

```
sof/tools/logger/convert.c: In function ‘fetch_entry’:
sof/tools/logger/convert.c:514:27: error: ‘%d’ directive output may be
  truncated writing between 1 and 10 bytes into a region of size
  between 0 and 18 [-Werror=format-truncation=]

  514 |      "%%s[%%%d.%df] (%%%d.%df)%%s ",
      |                           ^~

sof/tools/logger/convert.c:514:6: note: directive argument in the
       range [0, 2147483647]
  514 |      "%%s[%%%d.%df] (%%%d.%df)%%s ",
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from /usr/include/stdio.h:867,
                 from sof/tools/logger/convert.h:13,
                 from sof/tools/logger/convert.c:21:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10:

   note: ‘__builtin___snprintf_chk’ output between 21 and 59 bytes into
   a destination of size 32

   67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   68 |      __bos (__s), __fmt, __va_arg_pack ());
      |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

cc1: all warnings being treated as errors
```

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-24 15:27:18 -07:00
Jaska Uimonen 636cbefc62 topology: add missing tokens in SSP_CONFIG_DATA
Add all same tokens to SSP_CONFIG_DATA that we have in
SSP_MULTI_CONFIG_DATA.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2021-05-24 22:02:49 +01:00
Jaska Uimonen 5cffff335d topology: remove obsolete s24_4le from COMP_SAMPLE_SIZE
Remove definition of s24_4le from COMP_SAMPLE_SIZE macro as it is not
used anywhere. Instead all pipelines are using s24le definition and the
COMP_SAMPLE_SIZE macro works only because it defaults to 4 bytes.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2021-05-24 17:07:14 +01:00
fy.tsuo c32a0e032f topology: igo_nr: move igo_nr to core 1.
igo_nr runs on core 1 to balance loading.

Signed-off-by: fy.tsuo <fy.tsuo@intelli-go.com>
2021-05-21 11:06:47 +01:00
fy.tsuo 9266614004 audio: igo_nr: igo_nr support 48k
To roll back SSP clock setting to original one.

igo_nr now support 48k-in-48-out and the entire pipeline

DMIC_PIPELINE_48k is reverted back to 48k too.

Signed-off-by: fy.tsuo <fy.tsuo@intelli-go.com>
2021-05-21 11:06:47 +01:00
Liam Girdwood 45918aa19b dai: abstract the DAI hardware configuration
Currently the DAI HW configuration is tightly bound to the IPC major
version and IPC structures. Provide a mechanism whereby different
IPC data structures can be passed for DAI configuration.

This change does the following changes.

1) Pass a common ipc_config_dai structure to all dai config call. This
allows retention of common logic that uses this common data.

2) Provide a IPC specific private data pointer to the dai config that
can be interpreted by the DAI as custom data. Today this is the
existing IPC, but it could also support an NHLT binary register blob in
the future.

3) Splits ipc specific code out of src/audio/dai.c and into
src/ipc/ipc3-dai.c.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-05-20 14:01:34 +01:00
Yong Zhi 68499a08ba topology: sof-tgl-rt711-rt1308: add BT offload for ADL
Add pipelines for Bluetooth offload support:

PCM14 <---> passthrough (pipe 13, 14) <---> SSP2 BT offload

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2021-05-19 15:22:35 +01:00
Chao Song f510435a25 topology: sof-tgl-nocodec-ci: run pipelines on different cores
This patch moves DMIC pipeline to run on DSP core 2,
and SSP1 pipelines to run on DSP core 3 for multi-core
verification.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Zhang Keqiao <keqiao.zhang@linux.intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-05-17 22:24:06 +08:00
Yong Zhi e9d2900b3b topology: adl-sdw-max98373-rt5682: Add BT offload support
Add BT offload support for ADL platform:

PCM14 <---> passthrought (pipe 14, 15) <---> SSP2 (BT offload)

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2021-05-17 09:15:38 +01:00
Vamshi Krishna e112e0bc0f topology: sof-tgl-sdw-max98373-rt5682: add support for ADL
For speakers SDW2 link is used.
For Headset SDW0 link is used.
add sof-adl-sdw-max98373-rt5682 topology

Signed-off-by: Vamshi Krishna <vamshi.krishna.gopal@intel.com>
2021-05-13 12:27:22 +01:00
Vamshi Krishna 7d44f31e7d topology: sof-tgl-sdw-max98373-rt5682: remove redundant topologies
removing 2-ch topology and renaming 4-ch topology.

Signed-off-by: Vamshi Krishna <vamshi.krishna.gopal@intel.com>
2021-05-13 12:27:22 +01:00
Ranjani Sridharan 426d7816e2 topology: nocodec: switch to dynamic pipelines
Switch the APL/CNL/ICL/JSL/TGL nocodec topologies to use dynamic
pipelines.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-05-13 11:58:06 +01:00
Ranjani Sridharan b371f93c51 topology: hda: re-enable dynamic pipelines
Re-enable dynamic pipelines for HDA topologies.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-05-13 11:58:06 +01:00
Pin-chih Lin 1f68cabafa topology: add drc-eq-volume-demux playback pipeline and default coefs
Adds pipe-drc-eq-volume-demux-playback.m4 for locating Multiband DRC and EQ
IIR on the path of the internal speaker.

This pipeline will be used by Eldrid first for Audio DRC/EQ offloading
purpose.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2021-05-12 13:44:28 +01:00
fy.tsuo 7fa9befd57 topology: sof-tgl-max98373-rt5682: added igonr.
Added sof-tgl-max98373-rt5682-igonr.tplg.

Signed-off-by: fy.tsuo <fy.tsuo@intelli-go.com>
2021-05-12 13:01:15 +01:00
Pierre-Louis Bossart d430091259 topology: add missing configuration for byt-max99080
Somehow we only support this configuration for BYT, but there are
Baytrail devices using the same codec.

BugLink: https://github.com/thesofproject/sof/issues/4160
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-05-12 09:23:22 +01:00
Marc Herbert 96f6a7b385 logger: add error messages when failing in the middle of fetch_entry()
Failing _in the middle of one log entry_ should really not be treated as
a normal event. The purpose of a logging tool is to find issues, not
hide them.

Don't abort on EOF because of valid use cases like device suspend but
don't do it quietly.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-12 09:22:10 +01:00
Marc Herbert e6f0f8b60f logger: add or fix error handling in read_entry_from_ldc_file()
Add a few missing log_err().

Remove calls to ferror() because:
- its return value is a meaningless "non-zero" boolean,
- we don't really care whether the dictionary file is in an error state
  or not; an unexpected end of dictionary file is just as bad.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-12 09:22:10 +01:00
Marc Herbert fb02c56649 logger: don't sound like the DMA trace can wrap
In general the DMA trace runs until interrupted but there are cases
where it can exit "normally": when reading from a file or stdin, when
some error happens,....

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-12 09:22:10 +01:00
Marc Herbert 1e64b7e83c logger: fix relative timestamp when re-opening the trace after EOF
Need to reset the (now global) entry number.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-12 09:22:10 +01:00
Liam Girdwood 80666b7cc7 ipc: component: abstract the component creation API
Make sure component creation is not tightly coupled to a particular IPC
version. This is mostly a mechanical change of structures being passed
to the comp creation APIs away from IPC specific to general structures.

Highlevel changes

1) Pass a common component data object and a component
specific data object during create().

2) Mark the component IPC derived data as "ipc_config" within the
component device to help developers track the data source origin.

3) Pass component specific data during creation so that componets
can allocate and copy to thier private data.

4) Comp_dev no longer has component specific data appended to it.
Instead we can store all in the comp private data (and hence use the
compiler to access it rather than by developer access methods).

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-05-10 15:36:07 +01:00
Keyon Jie 47d223c09f topology: sof-tgl-nocodec-ci: change to run smart_amp on core 1
Change to run smart_amp pipelines on DSP core 1, this will help reduce
the core 0 usage and add multi-core to the CI coverage.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-05-08 22:43:58 +08:00
Ross Chisholm f706843697 topology: adding IIR component on max98373-rt5682 topology
Builds a configuration of the max98373-rt5682 topology with AMP_SSP=2
defined and includes the IIR component

Signed-off-by: Ross Chisholm <ross.chisholm@xperi.com>
2021-05-06 17:21:57 +01:00
Libin Yang 7851493534 topology: add sof-adl-rt711 topologies
Add sof-adl-rt711.tplg and sof-adl-rt711-4ch.tplg.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2021-05-06 16:59:52 +01:00
Libin Yang 37c485df36 topology: sof-tgl-rt711-rt1308: add EXT_AMP option
Some devices are using rt711 only, without amplifiers.
Add the "EXT_AMP" option in sof-tgl-rt711-rt1308.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2021-05-06 16:59:52 +01:00
Daniel Baluta 8397e064da topology: Allow overriding DAI_PERIODS
This will allow topologies to use different size dai periods.

Fixes: 1280987999 ("topology: use DAI_PERIODS in calculation of DAI buffer size")
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-05-06 14:44:20 +01:00
Jaska Uimonen b1775f27ea topology: define a channel map macro for all topologies
Previously we had a channel map macro only in general dmic topology. As
the pipelines used with dmic are also used with other topologies the
dmic specific macro does not work anymore. Thus define generic macro in
pipeline.m4 that defaults to stereo channel map. This can be overridden
in topologies as shown in general dmic.

fixes: #4136

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2021-05-06 14:34:23 +01:00
Ranjani Sridharan f2bd51a138 Revert "topology: Switch HDA topologies to use dynamic pipelines"
This reverts commit 2c69afc5fd.
The dynamic pipeline feature is broken with PA enabled. Revert
this change until the issue is sorted.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-05-06 14:31:50 +01:00
fy.tsuo 37d97d4357 audio: igo_nr: Added intelliGo noise reduction wrapper code and topology
This commit consists of files for adding IGO_NR component in arbitrary
topology. The proprietary static library shall be released by intelliGo
via private channel upon request.

Signed-off-by: fy.tsuo <fy.tsuo@intelli-go.com>
2021-05-05 12:48:47 +01:00
fy.tsuo 776977852a topology: Added IGO_NR in sof-tgl-max98373-rt5682 topology.
This commit added IGO_NR component into sof-tgl-max98373-rt5682.m4
as DMIC capture PCM99 pipeline.

Signed-off-by: fy.tsuo <fy.tsuo@intelli-go.com>
2021-05-05 12:48:47 +01:00
Seppo Ingalsuo b12ce50712 Topology: Add build of topology to run ASRC in cml-rt1011-rt5682
This patch adds development topology to run ASRC playback and
capture via SSP port to headset plug. We don't have many topologies
to test ASRC in current development devices so this is useful

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-05-04 20:04:13 +01:00
Brent Lu 1ccc16c27d topology: sof-glk-da7219: add support for cs42l42
Add support for cs42l42 running on GLK boards. We add a 10 ms BCLK
delay to the SSP_CONFIG_DATA of SSP2 since the codec PLL is locking on
BCLK. Without the delay, there could be noise on TX path.

Signed-off-by: Brent Lu <brent.lu@intel.com>
2021-05-03 22:17:13 +01:00
Curtis Malainey 758e7be0c9 oss-fuzz: fix build
looks like with the new ipc mechanisms we changed the function signature
and moved casting the message from platform code to ipc code.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-04-30 11:50:16 +01:00
Marc Herbert 7dbcd7ee33 logger: add ktime and date in header
Every log file should have a date.

ktime can be related to the TIMESTAMP column. It is especially useful to
spot logs delayed or stuck.

Some logs use ktime while others use a date and it can be sometimes
difficult to connect them with one another. This header can help.

Before:

TIMESTAMP (us) DELTA C# COMPONENT CONTENT

[  5120116529] (  0) c0 dma-trace ERROR FW ABI 0x3012001 ...

After:

TIMESTAMP (us) DELTA C# COMPONENT \
                   CONTENT ktime=5132.663s @ 2021-04-27 14:36:09 -0700 PDT

[  5120116529] (  0) c0 dma-trace ERROR FW ABI 0x3012001 ...

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-04-29 12:09:10 +01:00
Daniel Baluta 5ca0e9bba3 topology: Use generic name for 8qxp/8qm
i.MX8QXP / i.MX8QM have the same configuration w.r.t topology.
But since we firstly added support for 8qxp all the names use
8qxp and then for 8qm we just borrow the files but using the 8qxp
naming.

This sometimes might cause confusion. So, we group under the
umbrella of imx8 naming both i.mx8qxp and i.mx8qm.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2021-04-28 20:11:19 +01:00
Marc Herbert 158089ceb6 Add and fix many logger and dma-related comments. No code change.
Learned the hard way.  Will help refactoring or duplicated
"reverse-engineering" effort.

Zero code change, pure comments: no functional change.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-04-28 15:52:44 +01:00
Marc Herbert d6f6a456c1 logger: fix column and header alignments
Increase default width from 10 to 12 to stop common misalignment,
especially in relative mode.

New timestamp_width() function to avoid duplication and
divergence.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-04-27 12:17:53 +01:00
Marc Herbert 37e87e54b1 logger: partial rewording of one log_err() and usage message
Cosmetic change that does not fit in any other commit.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-04-27 12:17:53 +01:00
Marc Herbert 1a79de1c16 logger: warn user about wrapped logs and skipped garbage
Don't sweep logging issues under the rug.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-04-23 13:32:17 +01:00
Marc Herbert d54a9281f8 logger: print a separator when the timestamp goes back in time
This makes the display of the mailbox ring buffer log much less
confusing. It should not happen with the DMA trace but will behave the
same in case something goes wrong.

Before this commit the only clue that wrapping had happened was a NaN in
the delta column (instead of the negative value).

The "other?" is because the start of the mailbox is sometimes corrupted,
or the timestamp goes sometimes back at boot for no obvious reason. In
other words this new separator is useful to highlight bugs too.

Absolute mode -e 0 with this commit:

    TIMESTAMP         DELTA C# COMPONENT          LOCATION

[22598174808] (        11) c0 ipc                  src/ipc/....
[22598174824] (        15) c0 ipc                  src/ipc/....
[22598443257] (    268433) c0 dma-trace             src/trace/....
[22598443271] (        14) c0 dma-trace             src/trace/....
[22598443286] (        14) c0 dma-trace             src/trace/....
[22598943257] (    499971) c0 dma-trace             src/trace/....

		 --- negative DELTA: wrap, IPC_TRACE, other? ---

[22430943257] (         0) c0 dma-trace             src/trace/....
[22530943257] ( 100000000) c0 dma-trace             src/trace/....
[22542943257] (  12000000) c0 dma-trace             src/trace/....
[22542943271] (        14) c0 dma-trace             src/trace/....
[22542943285] (        14) c0 dma-trace             src/trace/....

Relative mode -e 1 with this commit:

    TIMESTAMP         DELTA C# COMPONENT          LOCATION

[  3080783.6] (       11.4) c0 ipc                  src/ipc/....
[  3080799.1] (       15.5) c0 ipc                  src/ipc/....
[  3349232.5] (   268433.4) c0 dma-trace             src/trace/....
[  3349246.8] (       14.3) c0 dma-trace             src/trace/....
[  3349261.2] (       14.4) c0 dma-trace             src/trace/....
[  3849232.4] (   499971.2) c0 dma-trace             src/trace/....

		 --- negative DELTA: wrap, IPC_TRACE, other? ---

[22430943257.0] (      0.0) c0 dma-trace             src/trace/....
[100000000.0] (100000000.0) c0 dma-trace             src/trace/....
[111999999.5] ( 12000000.0) c0 dma-trace             src/trace/....
[112000013.9] (       14.4) c0 dma-trace             src/trace/....
[112000028.2] (       14.3) c0 dma-trace             src/trace/....

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-04-23 13:28:26 +01:00
Keyon Jie d5c779918c Revert "topology: sof-tgl-nocodec-ci: change to run smart_amp on core 1"
This reverts commit cd2444adbf.

Reverting this to unblock the CI runningon tgl-nocodec-ci platform.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-04-22 19:43:03 +01:00
Curtis Malainey 30719babb4 testbench: print error on failure to prepare
We are capturing the error, we should log it, thank cppcheck for the
find.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-04-22 11:30:38 +01:00
Curtis Malainey 0f0dd1d7ab testbench: remove unused sets
looks like a bug to checkpatch.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-04-22 11:30:38 +01:00
Curtis Malainey f227ae7af2 tplg_parser: fix exit path
goto after return is incorrect since it generates unreachable code.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-04-22 11:30:38 +01:00
Curtis Malainey 30f7931c4e tplg_parser: don't use void * in pointer math
Void * math is technically undefined, so for portability sake lets not
use it.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-04-22 11:30:38 +01:00
Curtis Malainey 5436fec004 tplg_parser: don't use unsigned types with signed math
cppcheck is (legitmately) upset that we are doing signed math size_t

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-04-22 11:30:38 +01:00
Curtis Malainey f2bd45bac8 tplg_parser: don't assign unused values
minor style violation

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-04-22 11:30:38 +01:00
Yong Zhi 05eb73e4cb topology: sof-tgl-max98373-rt5682: add Bluetooth audio offload support
Add passthrough pipelines to support Bluetooth sample rates
on SSP port2.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2021-04-21 22:32:09 +01:00
Yong Zhi 5fc21b6fb7 topology: intel: add generic Bluetooth audio offload pipeline
Make BT offload m4 generic for platforms that supports it.
User needs to provide id number for pipe/link/pcm and hw config.

I2S config for BT SCO:
16 bit samples, 1 slot TDM, no padding
19.2Mhz MCLK, 256/128kHz BCLK, 16/8kHz fsync
Frame-sync length 1 cycle ("DSP_A" mode)
Codec clk in primary mode

For BT A2DP:
16 bit samples, DSP_A protocol
2 slot TDM, no padding
38.4Mhz MCLK, 1.536Mhz BCLK, 48kHz fsync
Codec clk in secondary mode

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2021-04-21 22:32:09 +01:00
Yong Zhi e81c25eab7 topology: Add CHANNELS_MIN macro for passthrough pipeline
Add macro to restrict channel number of PCM capabilities, this will
allow channels_min to be configurable. The default behavior is
not changed with this patch.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2021-04-21 22:32:09 +01:00
Ross Chisholm c08f030d53 topology: fixing comments in jsl-rt1015 topology
Corrected comments relating to s32le (was s24le)

Signed-off-by: Ross Chisholm <ross.chisholm@xperi.com>
2021-04-20 19:28:03 +01:00
Ross Chisholm 71814655e6 topology: adding optional support for IIR component on jsl-rt015 topology
Allows the IIR component to be added to the jsl-rt015 topology allowing
tuning

Signed-off-by: Ross Chisholm <ross.chisholm@xperi.com>
2021-04-20 19:28:03 +01:00
Marc Herbert dc0ab8a449 logger: fix precision bug introduced by new -e option
Add missing "break" so the -e option stops spilling on the -f precision
option. Fixes commit 53ce8b9d9f ("logger: new relative timestamps
option, relative to first entry seen"). Since that commit the -e option
was wrongly assigned to the precision too.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-04-19 15:43:06 +01:00
Liam Girdwood 1931168185 pipeline: decouple IPC major from pipeline_new().
Decouple the IPC ABI major version from pipeline creation. This moves
struct sof_ipc_pipe_new from the pipeline and replaces it with it's
members (saving 8 bytes as no header is needed).

Add new feature specific pipeline APIs to configure pipeline at creation.

Additionally align testbench and UTs to API change.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-04-19 14:29:37 +01:00
Kai Vehmanen be065e55a8 topology: ssp: fix a bug in passing SSP_MULTI_CONFIG_DATA args
The m4 ifelse parameters using defn() are not working as expected.
If more than 3 parameters are passed to SSP_MULTI_CONFIG_DATA(),
the values are not correctly passed.

Fix this by removing defn() and correctly quoting the whole
ifelse section.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2021-04-16 16:12:43 +01:00