To provide echo cancelling effect while a stereo signal is played out,
the RTC Audio processing component required to have both left and right
channel as reference.
This CL ensure this is the case.
Signed-off-by: Lionel Koenig <lionelk@google.com>
This restores the performance of the original shell script and makes a
big difference in CI. CI clones over and over again whereas developers
clone rarely and can run a simple git fetch --unshallow.
Don't use --depth 0 to provide more context in the logs and also make it
more obvious that this is a shallow clone and not just git log -n 1.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Running on a mac crashed with "undefined xtensa_tools_version_postfix",
that should not be fatal (there are other toolchains).
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This reverts commit 819c023d23.
Fix a regression issue on windows.
Component is set to reset status in pipeline_reset, so no
need to propagate reset status to each component.
Pipe_reset may return PATH_STOP of value 1 and this is not
a error status, so we don't return error for this case.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Define fs as signed integer in afe_irq_config to fix cppcheck
warning.
Fixes: 1b7f8ed2a6(drivers: mtk: add afe driver for mtk mt8195)
Signed-off-by: YC Hung <yc.hung@mediatek.com>
rballoc() is used for buffer allocations, no need to use it for
volume internal control structures.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Duplicating all parameters of subprocess.run() is not just tedious and
error-prone, it makes the script compatible only with a range of
specific Python versions.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
In scripts/xtensa-build-zephyr.sh line 199:
if test $platform = tgl-h ; then
^-------^ SC2086: Double quote to prevent globbing
and word splitting.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This patch fixes issue in testbench when multiband-drc is executed.
Since the library libsof_multiband_drc.so includes also crossover
and drc component sources the topology component register is done
for drc instead of multiband-drc. Therefore testench executes drc
when multiband-drc run is attempted.
Placement of multiband-drc as last in sources list is a workaround
to fix but recommended now since this impacts only testbench. The
proper fix of moving DRC and Crossover parts to library would be
a much larger change.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds build of topologies sof-hda-generic-multiband-drc.tplg
and sof-hda-generic-2ch-multiband-drc.tplg. The processing happens in
pipeline part after mixer. Volume is controlled in PGA before mixer.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch replaces the audio stream read/write frag functions
based source read and sink write operations. The processing is
performed in blocks those are based on number of samples from
audio_stream_samples_without_wrap_s16/s24/32() function.
On TGL-H and stereo 48 kHz playback stream the MCPS is decreased
from 216.8/216.8/216.0 to 201.6/200.4/200.8 for s16/s24/s32
formats. The saving is in average 15.6 MCPS.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds functions to retrieve number of PCM samples until
source or sink buffer circular wrap need.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Use intel_adsp_cavs20_jsl Zephyr board when building for
Intel Jasper Lake.
BugLink: https://github.com/thesofproject/sof/issues/4539
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Same -u option as the new Python script.
We need this for the new sof/stable-v2.1 branch on
https://github.com/thesofproject/zephyr while our CI has not entirely
switched to the python script yet.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This script is run from an existing SOF repo that is assumed to be fully
initialized. Updating existing submodules is a potentially destructive
operation.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The older shell script had a deprecated convenience hack to clone
submodules before building rimage but _only if submodules were missing_!
While trying to preserve that, the new script changed that to an
unconditional git submodule update that can be destructive when
submodules are already present.
Generally speaking, using git and building must always be two very
distinct activities. No one wants the source code to change quietly from
one build to the next.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
A second git_submodules_update() immediately after the first one does
not make sense. This looks like something leftover from a past
experiment.
Fixes initial commit 1de3ef3675 ("Rewritten xtensa-build-zephyr.sh to
python")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
We add support for linking with Cadence AAC/MP3 libs.
Cadence lib MP3 support is enabled via CONFIG_CADENCE_CODEC_MP3_DEC config
symbol. Path to library file needs to be set via CONFIG_CADENCE_CODEC_MP3_DEC_LIB
Similar for AAC.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Recent combination of tgl and tgl-h building resulted in use of an invalid
defconfig file for tgl-h platform. This commit reverts that change.
Fixes: f1e6e1fdd3
Signed-off-by: Adrian Warecki <adrianx.warecki@intel.com>
Remove the extra argument for fprintf(). For some reason there was
no harm seen but this should trigger an error when run in Octave or
Matlab.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch replaces the audio stream read/write frag based
access to source and sink by block processing based on
audio_stream_bytes_without_wrap() bytes count. In this way,
the copy and scale volume function can reduce about 25%
cycles for S16, 34% for S24 and 30% for S32.
Signed-off-by: Andrula Song <xiaoyuan.song@intel.com>
Due to m4 peculiarities it is require to escape the content of an
ifdef. I forgot to add those escaping for around the `SPK_MIC_PERIOD_US`
definition leading to erroneous value if GOOGLE_RTC_AUDIO_PROCESSING was
defined.
Signed-off-by: Lionel Koenig <lionelk@google.com>
This is especially important considering some sof-bin releases are now
"hybrid": with a mix of XTOS and Zephyr.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Fixes copy/paste of commit de41202f8f ("zephyr: build: Add initial
build support for SOF application.")
This fixes the dictionary hash when using Zephyr; no more fallback on
the git SHA1.
When using Zephyr, SOF_ROOT_SOURCE_DIR (and SOF_ROOT_BINARY_DIR) are used
only by version.cmake
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
When building Zephyr, CMAKE_CURRENT_SOURCE_DIR does not point at
SOF. Use SOF_ROOT_SOURCE_DIRECTORY instead.
No impact besides the logs.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Some git servers like Github allow fetching by full length SHA so this
useful information to share.
(Others forbid this entirely, see last page of `git help fetch-pack`)
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
version.cmake has a not very intuitive logic to make sure sof_versions.h
is always up to date without triggering a full rebuild. Add comments and
rephrase some logs to make it less hard to follow.
Absolutely zero functional change.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Each platform defines a list of DMA controllers and related objects
in their lib/dma.c files. All of them are needlessly defined as
global. Make them all static.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This is a temporary work-around to enable CI tests while performance
is being optimized.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This should make sure to surface pipeline period and microphone
processing in the top topology file so incoherence are easier to spot
and correct.
I compared topology1/production/*.conf outputs prior and after the
change: except some new line and comment change introduced by the
simplification, there are no changes.
Signed-off-by: Lionel Koenig <lionelk@google.com>
Combined case label tgl and tgl-h similarly as in xtensa-build-zephyr.sh
Corrected code formatting.
Signed-off-by: Adrian Warecki <adrianx.warecki@intel.com>
If the user doesn't set the path to own private key, the default path is
placed in the variable containing the user's key. This causes a leak of the
default key of one platform to the others platforms, which will treat it as
a key supplied from the user.
Signed-off-by: Adrian Warecki <adrianx.warecki@intel.com>
Add 3 fields for input_buffers, output_buffers and output_buffer_size
to struct processing_module. Move the memory allocation for input/output
buffers for the module to the prepare op from the copy op.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
When host is more heavy loading(e.g. camera recoding case),
the size of dai buffer is 4ms and not enough. Increase 2ms
period capture pipeline to buffer more data to avoid overrun.
Signed-off-by: YC Hung <yc.hung@mediatek.com>
PosixPath doesn't convert to string automatically, and
it is not acceptable in sign_cmd, convert it to string
explicitly.
Signed-off-by: Chao Song <chao.song@linux.intel.com>
It's not clear why the initial contribution used mclk ID1, mclk ID0 is
used by 99% of devices - and a manual inspection of NHLT supports that
claim. We will have to deal with the MCLK ID1 case with quirks.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reset host position in ipc_stream_pcm_params before reply. It could avoid
that linux side get invalid value before host position updating. This
invalid value happens when running alsa conformance test and use pcm
pointer function to get host position value but see invalid value at
the beginning. After providing this patch, the invalid value will be
replaced with zero.
Signed-off-by: YC Hung <yc.hung@mediatek.com>
The position is currently updated by the host component when a
period was consumed. The granularity of this position is too large,
applications relying on timer-based scheduling may query the
position at any time and conformance test suites fail.
This patch introduce another field "cont_update_posn" in
sof_ipc_stream_params which suggests a more precise position
reporting, by storing the latest position in a memory window
when the host component completes a transfer. This will increase
the traffic to memory windows, but allow for a much smaller
granularity in position updates.
In hindsight, this solution should have been the default behavior
but to avoid backwards compatibility issues is added as a new
capability controlled by an ABI check. Only with a recent-enough
Linux kernel will this behavior be enabled.
Signed-off-by: YC Hung <yc.hung@mediatek.com>
Modify the signature of the process API in the module interface to pass
the input/output buffers along with the counts of the number of input
and output buffers.
Please note that the pass input/output buffers are not used at this
point. The codec implementations will be modified in the follow-up
patches to use them.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>