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>
Introduce 2 new structures to represent the input and output stream
buffers. These will be passed as inputs to the process API.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Fix issue of ipc4 pipeline initialization with zephyr enabled.
Need to initialize these two components. Gain module is another
type of volume without peak volume support and mixin has subset
function of mixer.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Zephyr recently added support for separate configs for 2-core and 4-core
variants of cAVS2.5. Use the new "tgph" configuration for when building
SOF for TigerLake-H variant.
BugLink: https://github.com/thesofproject/sof/issues/5018
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Use the new interface to initialize non-primary cores before
enabling them with arch_start_cpu(). This interface is not
available in Zephyr 3.0.0, but is mandatory in later release.
Depends on Zephyr commit 2b210cb3db05 ("kernel: Refactor SMP cpu
initialization a bit").
BugLink: https://github.com/thesofproject/sof/issues/5456
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
z_wrapper_cpu_enable_secondary_core() may be called
repeatedly on a core that is already running. Add a check
to ensure we do not try to restart a core that is already
running.
Also add a check for ready_flag as done in upstream Zephyr
kernel/smp.c to ensure z_wrapper_cpu_enable_secondary_core()
does not return until the target core has finished its
startup and arch_cpu_active() returns true.
BugLink: https://github.com/thesofproject/sof/issues/5446
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This reverts commit 58ce6e6860.
This commit has caused the DMA trace to be frequently empty on a number
of ADL and TGL in daily runs for two days in a row (test runs 10429 and
10459).
The DMA trace could be completely empty in the past but that was on
different platforms and a very long time ago, this had been fixed in
bug #4333 and had not happened for many months.
The _only_ commit difference between the last successful test
run (10402) and the first failing one (10459) is this commit.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
When DSP enter suspend:
1.Define CLK_SUSPEND_CPU_HZ 26M for DSP suspend frequency and turn
off adsp pll clock to avoid unexpected behavior after resume.
2.Increase wait for interrupt level to 15 to avoid unexpected interrupts.
3.Remove XT_WAITI_DELAY for LX7.
Signed-off-by: YC Hung <yc.hung@mediatek.com>
Fix a regression issue on windows. Need to invalidate dcache
for host message or FW will get garbage data.
Signed-off-by: Rander Wang <rander.wang@intel.com>
This patch adds FIR function that computes two samples per call
it reduces the coefficients and PCM data accesses. Saving from
original FIR is 34 MCPS from 134 MCPS to 100 MCPS.
The samples include constrain of FIR coefficients length to
be multiple of four and add two into delay line length to have
room for two input samples while keeping the length even.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This change saves 18 MCPS as gcc build build for xtensa on TGL-H
from 134 MCPS to 115 MCPS in a stereo 48 kHz 64 tap filter case.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The new samples processing loop uses audio_stream_without_wrap()
function to loop maximum amount of frames without source and
sink buffer pointers wrap check.
In a test with TGL-H and gcc build the performance was improved by
this patch 9.2 MCPS from 140 MCPS to 130 MCPS.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch prevent driver from requesting FW to enter D0 state when
there are still active pipelines.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
This patch refactors the SetDX handler to avoid entering infinity loop.
Secondary cores are enabled/disabled in loop iterating from 1 to
CONFIG_CORE_COUNT. Primary core is disabled at the end, because it's
required that all secondary cores to be already disabled. If all
conditions are met, FW can enter the D3 state.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
With Zephyr, spinlock.h needs to know `struct k_spinlock`
definition.
Include, Zephyr's <kernel.h> header.
This fixes compile time warnings like this:
z/modules/audio/sof/zephyr/../src/include/sof/schedule/ll_schedule_domain.h:
In function 'domain_init'"
z/modules/audio/sof/zephyr/../src/include/sof/schedule/ll_schedule_domain.h:93:18:
warning: passing argument 1 of 'k_spinlock_init' from incompatible
pointer type [-Wincompatible-pointer-types]
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Some builds require more memory, hotword can be handled by CRAS so lets
add the ability to drop it. The 16kHz dmic is not needed either so lets
drop that too.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
This will allow users to pass NULL to buffer_free.
This fixes codec_adapter_free crash, where mod->local_buff is only
allocated when the module is prepared.
With dynamic pipelines we could have the situation where the pipeline
is created then SOF device enters suspend and pipeline is destroyed.
Thus we try to free unallocated mod->local_buf. Fix this by allowing
buffer_free to live free when receiving a NULL pointer.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Include dmic-generic conditionally based on NUM_DMIC's and add nhlt
build support in CMake variables.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>