Commit Graph

1594 Commits

Author SHA1 Message Date
Guennadi Liakhovetski 10f6dd0d7b module-adapter: add a constant data pointer
module_config contains a .data pointer that is used both for initial
and run-time configuration. The initial configuration should be
const. We add a new .init_data pointer for it.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2022-10-26 15:56:49 +01:00
Marc Herbert 367df306b6 sof_ri_info: minor BinReader logging fix to support pathlib
Switch to an f-string which automatically converts the argument to a
string.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-10-24 16:15:12 +01:00
MARUTHI MACHANI 252e7e7559 topology1: support for dmic with 4 channels
Topology support to configure dmic with
four channels for amd platforms.

Signed-off-by: MARUTHI MACHANI <maruthi.machani@amd.com>
2022-10-24 12:16:29 +01:00
Ranjani Sridharan 9200231e0e topology2: cavs-passthrough-hdmi: remove the option for HDA passthrough only
cavs-passthrough-hda.conf doesn't exist anymore.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-10-21 15:54:58 +01:00
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