Commit Graph

1606 Commits

Author SHA1 Message Date
Libin Yang 691b80261a topology2: add payload_with_output_fmt token
payload_with_output_fmt token is used to tell sof driver whether
there is output audio format in the init instance ipc4 message
payload. payload_with_output_fmt = 1 mean there is audio output
format in the ipc4 message payload.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2022-11-08 13:34:08 +00:00
Pierre-Louis Bossart a5635e0011 topology1: add missing ES8336 topologies for ICL
This needs to be added in sof-bin.

Link: https://github.com/thesofproject/linux/issues/3873
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2022-11-08 13:31:26 +00:00
Ranjani Sridharan dd58f5ba1d topology2: cavs-passthrough-hdmi: Add support for chained DMA
Add support for chained DMA pipelines in the HDMI passthrough topology.
Since the HDA hardware does not support S24_LE, remove the format from
the PCM capabilities for all the HDMI PCM's as well.

This version should work even if the kernel does not support chained DMA
as yet.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-11-08 13:30:43 +00:00
Gongjun Song fc825a9ecb topology1: Add sof-rpl-rt711-l2-rt1316-l01-rt714-l3
Audio hardware configuration of SKU 0C40 product is rt711 on link2,
two rt1316s on link0 and link1 and rt714 on link3

Signed-off-by: Gongjun Song <gongjun.song@intel.com>
2022-11-04 20:57:15 +02:00
Gongjun Song 11baeefd94 topology1: Add sof-rpl-rt1316-l12-rt714-l0
Audio hardware configuration of SKU 0C10 product is rt714 on link0,
two rt1316s on link1 and link2

Signed-off-by: Gongjun Song <gongjun.song@intel.com>
2022-11-04 20:57:15 +02:00
Gongjun Song 7c47f6aa55 add some missing topologies in v5.19/CMakeLists.txt
Add missing adl SoundWire NOJACK topologies in
v5.19/CMakeLists.txt

Signed-off-by: Gongjun Song <gongjun.song@intel.com>
2022-11-04 20:57:15 +02:00
Liam Girdwood 367580f335 Revert "topology2: cavs: Add chained DMA support for HDMI pipelines"
This reverts commit aed76b5a60.
2022-11-02 19:08:26 +02:00
Ranjani Sridharan aed76b5a60 topology2: cavs: Add chained DMA support for HDMI pipelines
Add a new pipeline chain-dma-playback.conf for chained DMA playback
and use it for HDMI depending on the HDMI_CONFIG.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-11-01 14:20:11 +00:00
Andrula Song ef62a50893 Cmocka: EQ: Fix the errors lead to eq-iir test failure
Fix the mistakes in scripts which would lead to eq-iir
test failure.

Signed-off-by: Andrula Song <xiaoyuan.song@intel.com>
2022-10-31 13:33:40 +00:00
Rander Wang efc71f6c71 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-28 12:26:38 +01:00
Pin-chih Lin aa589343fd topology: waves: remove deprecated kcontrol widget and data
Fix aligned to pipe-waves-codec-playback.m4 due to module_adapter
design change.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2022-10-27 22:05:38 +01:00
Rander Wang b97fd67ef0 cmocka: add eq_fir unit test
This test uses module interface for eq_fir.

The use of decoded 16 bit FIR blob coefficients decreases a lot
the mismatch between float reference FIR vs. SOF fixed point
implementation.

This patch adds the script tools/tune/eq/cmocka_data_eq_fir.m that
generates the files cmocka_fir_coef_2ch.h and cmocka_fir_ref.h.

The script debug_files_plot.m can be used to visualize the unit
test result and error for data that is generated if macro
DEBUG_FILES is defined.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Andrula Song <xiaoyuan.song@intel.com>
Signed-off-by: Rander Wang <rander.wang@intel.com>
2022-10-27 21:12:37 +01:00
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