with 10ms period size we have seen power improvements.
We are working to move all topologies of Chrome to 10 ms.
Starting with current RPL and ADL-N topologies.
With many topologies already using GOOGLE_RTC_PROCESSING
flag to set 10ms, making a simpler flag to be used across
to set required SPEAKER PERIOD. This helps to scale later
to all designs.
Signed-off-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
Signed-off-by: Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.com>
This fprintf() with missing %d causes in Matlab and octave
messed up console output. This fix prints filter order
if this issue happens. This could be caused by too high
filter specification request that was not possible to reach.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds to chirp test (executed first usually) plot of
audio waveform to help understand why the audio markers were not
found. The reasons like very low level or corruption or large
time shift can be seen from the plot easily.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch helps to avoid editing the script to change the test
behavior. The full_test set to 0 performs a quick test with chirp
(default 1). The option show_plots set to 1 (default 0) shows
the plot graps from each test step those help to understand the
test verdict.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The gaussian (or other normal distribution shape) dither impacts
too much 16 bit signals. The triangular probability density
function (TDPF) is a sufficient compromise between added noise energy
and de-correlation of PCM samples.
This change improves for 48 kHz 16 bit audio measurement the THD+N
from -62.6 dB to -73.6 dB.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch applies for conversions where Nyquist rate allows
a 20 kHz low-pass filter as specified in AES17 standard (test.fu).
The sweep test is set no higher than 20 kHz (test.f_end).
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This change aligns the gains in all other conversions sets
with IPC4 that already has the same setting. The max gain of a
converter is 0 dB. It also avoids the issue of 1 dB lower gain
in 2-stage vs. 1-stage conversions.
This changes only the generate scripts. The coefficients need a
separate patch.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch updates the SRC coefficients generator scripts with
add of parameter cfg.thdn that is the min. THD+N performance. The
target gain is set to 0 dB for all conversions to be generated.
in src_param.m the default stop-band is relaxed from 70 dB to 63 dB.
It can be done because the THD+N performance check will step up the
attenuation. The default lower attenuation saves RAM in easy
simple fractions conversions.
The main change is in src_generate.m. The conversions matrix is
two pass. In the first pass the converters are designed and the
converter for same fraction and other bandwidth parameters with
highest performance is preserved. In the second pass the table
of converters is constructed and the size of filters and buffers
and other information like MCPS estimate are collected.
Other changes include reduction of plots made during batch design
and remove of some commented out code.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
pipe-rtnr-google-rtc-audio-processing-capture.m4 and
pipe-google-rtc-audio-processing-rtnr-capture.m4 are actually the same
graph. The filename differs because they are originated from different
branch.
This commit unifies them to avoid confusion.
Signed-off-by: Pin-chih Lin <johnylin@google.com>
For nau8825 codec devices e.g. Kano/Volmar/Zavala, it had been observed
that when Hotword module is enabled, noticeable pop noises appear in the
playback audio. While disabled, the playback audio becomes clear.
Because Hotword module is optional, remove it for now as WA fix for noise
issue.
Signed-off-by: Pin-chih Lin <johnylin@google.com>
Add topologies for RTNR and GOOGLE AEC integration
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Signed-off-by: Pin-chih <johnylin@google.com>
New target device, also move the path over to core 1 when running in
no_hotword mode
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Signed-off-by: Pin-chih Lin <johnylin@google.com>
Gain module cannot be bound to a module from another pipeline. So,
add a module copier in the gain-capture pipeline.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Audio hardware configuration of SKU 0C11 product is rt711 on link0,
two rt1318s on link1 and link2, rt714 on link3
Signed-off-by: Gongjun Song <gongjun.song@intel.com>
This reverts commit 0857ed68b9.
The "topology2: add ssp multi stream capture" impacted PR test.
Will resubmit once we fixed the issue.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
No functional change. Set common function indentation and add comment
sections for better readability.
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
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>
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>
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>
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>
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>