Commit Graph

1640 Commits

Author SHA1 Message Date
Ranjani Sridharan c3a6e4d681 topology2: cavs-mixin-mixout-hda: Don't use mixin/mixout for capture
Just use passthrough instead.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-10-21 15:54:58 +01:00
Seppo Ingalsuo 2841dc93c2 [SKIP CI] Tools: Test: Audio: Fix standard low-pass help text
Fix a confusing mistake high-pass -> low_pass and typo. It's
only a user help text change for "help stdlpf".

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-10-21 12:24:25 +01:00
Ming Jen Tai d77331fce1 rtnr: Set 5ms period for RTNR on MT8195
With the  release of RTNR version 20220728,
period for capturing pipeline requires at least 5ms.

This commit set 5ms period for RTNR in
MT8195 topology.

Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
2022-10-21 12:10:07 +01:00
Ranjani Sridharan 1ea364620f topology2: gain: Fix curve_type
log and linear are not supported with IPC4. Use no_fade and fade
instead and set the default to fade.

This should fix the following error seen with volume prepare():
volume: comp:9 0x60003 volume_prepare(): invalid cd->ramp_func

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-10-20 17:57:55 +03:00
Seppo Ingalsuo ab8c150b93 [SKIP CI] Tools: Test: Fix upper band limit in THD+N SRC test
This patch fixes the upper frequency for distortion plus noise
measurement. The min(fs1, fs2) leaves part of upper band unmeasured
and gives a too good looking THD+N performance figure when output
rate is higher than input rate. The proper way is to measure the
(near) full output rate bandwidth.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-10-19 16:20:43 +01:00
Seppo Ingalsuo f3fee13471 Tools: Test: Fix false success if no processing happened
The test is treated passed if there were no failed cases. The fix in
this patch is to force one failed case if both failed and passed counts
are zeros. Then the upper level test scripts/host-testbench.sh reports
correctly the test fail.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-10-19 14:37:00 +01:00
Marc Herbert 5a30534aab sof_ri_info: add platform aliases to DSP_MEM_SPACE_EXT
Fixes this error:
```
No platform found in name "sof-rpl.ri"; unknown memory layout.
```

... and shows the Memory Layout.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-10-17 16:38:38 +03:00
Kai Vehmanen c807d6844b Revert "topology2: nocodec: add volume and mixer support"
This reverts commit 5594ad3512.
2022-10-14 18:23:01 +03:00
Kai Vehmanen f07f5ed823 Revert "topology2: fix multi-stream test issue in ci"
This reverts commit 321bfde913.
2022-10-14 18:23:01 +03:00
Rander Wang 321bfde913 topology2: fix multi-stream test issue in ci
Duplicated dai index results to module initialization
faiure in multi-stream test. Dai 2 should be used by
stream nocodec-2.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-10-14 08:10:25 +03:00
Rander Wang 5594ad3512 topology2: nocodec: add volume and mixer support
Mixer and volume (gain) are used in nocodec topology.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-10-11 10:54:07 -07:00
Marc Herbert 1e4236be68 tools: make sof_ri_info.py a usable library that can be imported
2 small changes required:

- Stop calling sys.exit(1) in case of error not to exit the importer
- Change EraseVars() to return the checksum value instead of printing
  it. Move the print() to the main() function

This is required by the new sof-bin tests that compare signed with
unsigned binaries; submitted in
https://github.com/thesofproject/sof-bin/pull/105

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-10-11 13:34:01 +03:00
Marc Herbert 016b555a06 topology2: generate abi.conf at build time, fix incremental on abi.h
Move abi.conf generation to build time.

Changing abi.h now rebuilds all v2 topologies.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-10-10 11:34:11 +01:00
Marc Herbert eee058abcd topology2: concat abi.conf at build time to fix incremental build
It's now possible to rebuild just only one modified topology without
rebuilding all of them from scratch.

Building topologies v2 has two steps:

 1. concatenation of abi.conf with topo.conf
 2. run alsatplg on the concatenation

Concatenation step 1. was wrongly implemented at configuration time, not
at build time. So when the topology source of step 1 (topo.conf) was
modified, the dependency of step 2 (= the concatenation) was not
affected and the topology was not rebuilt.

Fix this by moving the concatenation to build time.

Fixes commit 308a24a92b ("topology2: Add build support")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-10-10 11:34:11 +01:00
Marc Herbert a29d522059 topology1: fix incremental build dependency on abi.h
Modifying abi.h now rebuilds topologies v1

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-10-10 11:34:11 +01:00
Marc Herbert 567ad2122e topology1: prefix custom targets with their subdirectory name
This makes it possible to find stuff in the output of `ninja help`.

Zero effect on the build artefacts.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-10-10 11:34:11 +01:00
Ming Jen Tai 21d8948e73 rtnr: Support setting data blob
This commit lets user to set  data blob from host.

For example:
$ amixer -Dhw:0 controls | grep RTNR
numid=47,iface=MIXER,name='RTNR10.0 rtnr_bytes_10'
numid=48,iface=MIXER,name='RTNR10.0 rtnr_data_10'
numid=49,iface=MIXER,name='RTNR10.0 rtnr_enable_10'

$ sof-ctl -Dhw:0 -n 48 -b -s ./preset.bin

A new empty data control added to the topology will be used to send the
blob.
Model handler is now used for transferring the blob data.

Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>

Code Refine
2022-10-05 13:25:44 +01:00
Seppo Ingalsuo d526f7372c Tools: Tune: Prevent topology1 blob export to increase blob size
The increase of non-32bit aligned blob sizes needs to be removed
because it can cause mismatch of blob binary header vs. actual
size. Instead error if blob size is not multiple of four bytes.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-10-05 13:07:10 +01:00
Seppo Ingalsuo e235fbf9be Tools: Tune: Matlab tool for creating configuration blob for MFCC
This patch adds initial version of MFCC setup tool setup_mfcc.m. It
outputs a configuration topology macro file that matches the current
Matlab concept code. The configuration can be tested in testbench
with the supplied scripts run_mfcc.sh and decode_ceps.m.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-10-05 13:07:10 +01:00
Seppo Ingalsuo f24670b986 Tools: Testbench: Add MFCC component
This patch adds load of MFCC component to testbench.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-10-05 13:07:10 +01:00
Seppo Ingalsuo e2d73e236a Tools: Topology1: Add MFCC component
This patch adds basic macros needed for MFCC in testbench and in
developmemnt topologies for hda-generic-2ch and up2. The
configuration blob in this matches the reference Matlab code
as configured to match Pytorch default MFCC.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2022-10-05 13:07:10 +01:00
Daniel Baluta 5b63f446d2 topology1: Add topology with wm8960/cs42888 for imx8qxp/imx8qm
This topology is used for i.MX8QXP/i.MX8QM with baseboard
to enable both cs42888 and wm8960 codecs.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2022-10-05 13:05:48 +01:00
Marc Herbert a0dc1c5aa7 Revert "topology2: nocodec: add volume and mixer support"
This reverts commit e31c7abeeb.

This caused most tests to fail on sh-tglu-rvp-nocodec-ci-02
in daily run 15919, see some more errors in logs shared in
initial PR #6318 and new issue #6367

  FW reported error: 113 - Invalid destination queue (pin) ID provided
  ipc error for msg 0x45000004|0x6
  sof_ipc4_route_setup: failed to bind modules copier.SSP.8.1 -> gain.7.1

I don't know why this failed and I did NOT test this revert, however:
- This topology change is apparently the only thing that changed
  compared to the day before.
- The error message seems very much related.
- Other people seem to agree.
- According to Ranjani, this feature is not urgent.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-10-04 14:08:42 -07:00
Rander Wang e31c7abeeb topology2: nocodec: add volume and mixer support
Mixer and volume (gain) are used in nocodec topology.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-10-03 15:10:49 +01:00
Jyri Sarha ab8849581c tools/probe: Add routing FW logs to stdout and dma data from stdin
To get dma data from std in, just leav out the -p flag, and to get
logs from stdout, use -l flag.

Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
2022-10-03 15:00:39 +01:00
Jyri Sarha 7438070eec tools/probe: Split the demuxer and offline command to separate files
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
2022-10-03 15:00:39 +01:00
Jyri Sarha ceced0e641 tools/probe: Drop undeeded include files
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
2022-10-03 15:00:39 +01:00
Jyri Sarha 43bc85f570 tools/probe: Another restructure of dma stream demux code
This time the target is to make the demuxer more modular so that it is
not coupled with file reading operations and it is easy to use
alsa-lib directly.

Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
2022-10-03 15:00:39 +01:00
Daniel Baluta 19661fe74a topology1: Merge i.MX AAC/MP3 compr topology
Because now we can support multiple codecs with same topology
lets merge i.MX aac/mp3 topologies.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2022-09-30 11:00:57 +03:00
Daniel Baluta e60caa0c0c topology1: Update documentation to reflect multicodec support
This updates documentation to reflect that now param id is only 2 bytes
followed by 2 bytes codec id.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2022-09-30 11:00:57 +03:00
Jyri Sarha 29af2df766 tools/probe: Fix realloc condition
The allocated packet should accommodate the header, the data, and the
checksum. The header size was missing from the condition from the
beginning, even if its there in realloc parameter. The bug should be
harmless waste of cycles thou.

Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
2022-09-28 14:04:39 +01:00
Jyri Sarha 548de64551 tools/probe: Move data_to_copy variable down in scope
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
2022-09-28 14:04:39 +01:00
Jyri Sarha e21be99ce6 tools/probe: Drop sync_word_at(), a simple == condition will do
The sync_word_at() only checks for two things, if the len parameter is
greater than sizeof(uint32_t) and if the memory pointed p parameter
holds PROBE_EXTRACT_SYNC_WORD value. Now that the available bytes is
checked just before sync_word_at() call, the whole function starts to
look a bit pointless.

Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
2022-09-28 14:04:39 +01:00
Jyri Sarha 1a1a558ac0 tools/probe: Remove unused write_data() function
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
2022-09-28 14:04:39 +01:00
Jyri Sarha a940766d27 tools/probe: Fix realloc() usage
Realloc may change the location of memory and the code should
anticipate it.

Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
2022-09-28 14:04:39 +01:00
Jyri Sarha 50caa7dc1a tools/probe: Several fixes and restructuring for demuxcode
Several fixes and restructuring for demuxcode to make it work with sub
32-bit word granularity.

Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
2022-09-28 14:04:39 +01:00
Jyri Sarha 34d750d40b probe: Drop old IPC3 style probe DMA framing
Drop IPC3 probe DMA framing and use IPC4 framing for IPC3 mode
too. This change simplifies the code quite a bit. After this change
both the SOF firmware and sof-probe demux tool should be updated at
the same time.

Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
2022-09-28 14:04:39 +01:00
Muralidhar Reddy 586716e1b9 topology1: CMakeLists: add ADL support for ES83x6 & HDMI_In Capture
Add ADL support for ES83x6 on SSP1, LT_HDMI_In capture on SSP0 & SSP2.
Signed-off-by: Muralidhar Reddy <muralidhar.reddy@intel.com>
2022-09-26 11:24:23 +01:00
Muralidhar Reddy 187c845ddc topology1: CMakeLists: add ADL support for ES83x6
Added ADL support for ES83x6 on SSP1.
Signed-off-by: Muralidhar Reddy <muralidhar.reddy@intel.com>
2022-09-26 11:24:23 +01:00
Joe.Cheng a78fdcebc1 topology1:enable SOF EQ + DTS on AMD renoir
Period has to be 1ms to avoid playback noise issue on Renoir
when SOF EQ + DTS are both enabled.

Signed-off-by: Joe.Cheng <joe.cheng@xperi.com>
2022-09-26 11:03:29 +01:00
Peter Ujfalusi 2474fb48c6 topology2: Revert the conditional topology2 building for CAVS/ACE
The MTL support added conditional build for topology2 based on CONFIG_CAVS
or CONFIG_ACE.
This is wrong for several reasons:
There is not ace directory present
The Kconfig system is not used when building topologies, so we are ending
up not building topology2 files at all.

There is no reason why CAVS and ACE topologies should be exclusive.

Fixes: 784bce763c ("mtl: Added meteorlake platform to the build system")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2022-09-23 15:50:56 +01:00
Adrian Warecki 784bce763c mtl: Added meteorlake platform to the build system
Added new mtl platform to xtensa-build-zephyr.py.
Added ace directories to cmake files.
Added ACE to kconfig.
Add Meteorlake platform to be built with Zephyr under
CONFIG_ACE_VERSION_1_5 flag.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Signed-off-by: Konrad Leszczynski <konrad.leszczynski@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Signed-off-by: Rafal Redzimski <rafal.f.redzimski@intel.com>
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2022-09-21 15:15:26 +02:00
Rander Wang 93d159d7fb topology2: add lp_mode as a attribute in pipeline
Currently lp_mode setting is not included by topology binary
since lp_mode is not defined as a attribute. This patch adds
it in pipeline.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-09-15 14:15:08 +01:00
Joe.Cheng 87de994f49 topology1:remove runtime config from DTS topologies
Follow PR#5190, remove runtime config from DTS topologies

Signed-off-by: Joe.Cheng <joe.cheng@xperi.com>
2022-09-14 12:08:36 +01:00
Liam Girdwood e8733b4f4c header: rtos: use rtos specific version of clk.h
Code can now include <rtos/clk.h>. API is not yet wrapped to Zephyr.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2022-09-12 11:44:27 +01:00
Liam Girdwood 4843516ab8 header: rtos: use rtos specific version of alloc.h
Code can now include <rtos/alloc.h> and uses thinly wrapped Zephyr
native for most uses. Wrapping can be removed over time.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2022-09-12 11:44:27 +01:00
Fred Oh 51abaff072 Tools: Testbench: add suffix to keep all the logs
When series of tests are run, only last result with same component is
saved. Make unique output filename. For now adding bits per sample
at the end of file, all the logs can be saved.

Ideally datetime string would be good. I keep it as FIXME.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2022-09-07 22:09:33 +01:00
Fred Oh d9d5842654 Tools: Testbench: add fulltest parameter in process_test
fulltest param to control quick chirp test only or full test
including all quality tests.

As minor clean up, unused parameter in thdnf_mask() and test_run_process()
is removed.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2022-09-07 22:09:33 +01:00
Fred Oh 7eb9863cdc Tools: Testbench: apply common indentation for functions
No functional change. Set common function indentation and add comment
sections for better readability.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2022-09-07 22:09:33 +01:00
Fred Oh 86e6e4e5b0 Tools: Testbench: fix typo in copyright year
Obvious typo in copyright year, it is 2022.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2022-09-07 22:09:33 +01:00
Rander Wang 1394832fd7 topology2: add more audio formats support for deep buffer pipeline
Add 32bits/32bits support for deep buffer.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-09-07 13:33:51 +01:00
Rander Wang 26b8406c28 topology2: add more audio formats support for host-mixin pipeline
Add 24bits/32bits support for gain

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-09-07 13:33:51 +01:00
Rander Wang 2ad89eb0d3 topology2: add deep buffer support on sdw platforms
Sdw platforms will support deep buffer

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-09-06 22:06:23 +01:00
Rander Wang ba03937264 topolog2: add deep buffer support on HDA platforms
Deep buffer uses large 100ms dma buffer size and
it also enables lp mode.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-09-06 22:06:23 +01:00
Liam Girdwood c3c94fc515 header: rtos: use rtos specific version of wait.h
Code can now include <rtos/wait.h> and uses native Zephyr 64
cycle API instead of SOF version.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2022-09-06 15:37:21 +01:00
Marc Herbert d0bc72290a test/tplg-build.sh: remove spurious xargs -n1 option
The xargs option `-I/--replace` hardcodes max lines `-L 1`. In other
words, it always splits the input line by line and ignores whitespace
delimiters inside each line. Initial xargs commit
d0f4aba934 ("topology: speed up topology build") used `--replace`
after `-n/--max-args=1` which was silently ignored by xargs version
4.7.0. Now xargs 4.8.0 prints the following warning:

  xargs: warning: options --max-args and --replace/-I/-i are mutually
        exclusive, ignoring previous --max-args value

Remove the ignored `-n 1` to remove the warning.

I compared the outputs before and after this commit and they're exactly
the same.

There's an extra twist. The same xargs command also uses the
`-d/--delimiter=,` option which makes xargs ignore newlines and
"translates" any max-line `-L` option to `--max-args`; including the `-L
1` max implied by `--replace`. This twist does not make a difference:
any max-line or max-args is always overridden by `--replace` whether
`--delimiter` is used or not.

Of course this entire xargs script is re-inventing (C)Make/ninja that
provide build parallelism for free and much more... I digress.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-09-02 11:25:19 +01:00
Liam Girdwood c90055f2f5 header: rtos: use rtos specific version of string.h
No runtime semantic change. Use C library when RTOS uses
C library otherwise use own C library calls.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2022-08-31 12:01:07 +01:00
Liam Girdwood 09c52810a7 header: rtos: use rtos specific version of bit.h
No runtime functional change. Code can now include <rtos/bit.h>

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2022-08-31 12:01:07 +01:00
Liam Girdwood 1629a1f72c header: rtos: decouple headers into rtos specific directories.
No functional runtime change, but changes to rtos partitioning and the
layout of headers .

This patch creates RTOS specifc header paths and updates spinlock.h
and kernel.h to show the new usage. Other headers will incrementally follow.
It reuses the current zephyr topleve directory and creates a new
toplevel xtos directory for xtos specific files.

Due to the mixing of RTOS, driver and library headers at the top level include
directory it was necessary to create rtos specific header directories i.e.

src/include/rtos-xtos
src/include/rtos-zephyr

These RTOS include directories will eventually contain RTOS specific headers
whilst common logic and structures will be placed in non RTOS directories.

This will also mean

"#include <sof/spinlock.h>"

will become

"#include <rtos/spinlock.h>"

and will allow easier visualisation of where and why RTOS headers are being used.
This will help to eliminate cross usage of headers between RTOSes.

Subsequqnt patches will move more headers and rtos specific wrppaer
source files into rtos specific locations.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2022-08-31 12:01:07 +01:00
Ming Jen Tai 8496d585d1 Modify periods setting for RTNR capturing pipeline
With the  release of RTNR version 20220728, period for capturing pipeline requires at least 5ms.

Periods setting for 16KHz capturing pipeline is also removed since RTNR is currently running in 48KHz capturing pipeline only.

Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
2022-08-31 11:26:18 +01:00
Kai Vehmanen 13ba5fe90c tools: add mtrace-reader.py
Tool to stream data from Linux SOF driver "mtrace" debugfs
interface to standard output. Plain "cat" is not sufficient
as each read() syscall returns log data with a 32bit binary
header, containing the payload length.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This should be back-ported to 2.2 stable.

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

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

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

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

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

Signed-off-by: Brent Lu <brent.lu@intel.com>
2022-07-18 14:20:09 +01:00