Building with GCC on Windows using MSYS caused errors related to
macros redefinition in compile_attributes.h due to GCC using its
standard headers. Added #ifndef guards.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
Windows users building with MSYS2 need to provide additional include
path to the POSIX standard headers to build sof-logger with GCC.
Added this include directory when environmental variable
MSYS_INSTALL_DIR is set.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
Newer gcc compilers 9.1+ issue a W-char-subscripts warning when argument
type passed to isspace is not explicitly int. Added cast to int.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
We only want the mixin/mixout based HDA and passthrough HDMI topologies.
Delete everything else.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
The codec adapter component only uses a single config now. So remove the
runtime config kcontrol as the same kcontrol can be used for runtime
config as well.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
During pipeline reset all components remains in previous state. This
cause issue at pipeline deletion. This patch allowed to propagate state
transition to all pipeline components.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
When both module instances are parts of the same pipeline Unbind IPC
would be ignored by FW since FW does not support changing internal
topology of pipeline during run-time. The only way to change pipeline
topology is to delete the whole pipeline and create it in modified form.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
We cannot have one single pipeline going from the host copier to the DAI
copier. So split the passthrough pipeline into host and DAI pipelines.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add gain widgets before and after the mixers in all the
mixin/mixout-based pipelines. Change the cavs-mixin-mixout-hda.conf
topology to add the mixer names for all gain widgets.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Remove the default audio formats from the gain class definition.
They should be added depending on the number of formats based on the
pipeline. Fix the gain-playback and gain-capture pipelines to add the
audio formats for the gain widgets.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
dma_copy_to_host_nowait() no longer exists and needs to be updated
Fixes commit 443b21de4b ("dma-trace: Fix potential race issue by using
blocking DMA copy")
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@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 a test with forced generic C for xtensa build processing load in
original was 324 MCPS, in optimized 309 MCPS, saving is 15 MCPS. The
load is nearly same for all formats s16/s24/s32. The base load was
very high in test due to a very long used FIR filter. The MCPS saving
should be the same for all stereo 48k streams.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This reverts commits e0ff1b16d8,
339e5ac217 and
09c69b7607. A different approach will
be used for making SOF a platform-agnostic Zephyr application.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The copier component depends on special pcm conversion
code, which is only implemented in the generic pcm
converter. If we build SOF with IPC4 support with XCC,
the HIFI3 pcm converter is selected automatically, and
causes the issue of
undefined reference to `pcm_func_vc_count'
undefined reference to `pcm_func_vc_map'.
This patch forces the use of generic pcm converter
if build SOF with IPC4 and Zephyr.
This patch should be reverted once the HIFI3 pcm converter
counterpart is implemented.
Signed-off-by: Chao Song <chao.song@linux.intel.com>
The two components copier and base_fw are
essential to IPC4 support on SOF on Zephyr.
This patch integrates the build of the two
components to SOF build with zephyr RTOS.
Signed-off-by: Chao Song <chao.song@linux.intel.com>
The topology is useful for testing long binary control IPC and to
test equalization of headset and speaker in sof-hda-generic devices.
It adds a flat IIR and a generic FIR that creates a mild loudness
effect.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The previous patch increased the FIR length but it also triggered
a numerical issue in FIR design with long minimum phase filters. The
filter became essentially a band-stop filter and causes difficulties
in test of EQ component. Also the equalizer sounds subjectively
bad. The fix is to change the design to linear phase that always
converges.
Fixes: 0d296ce7d1
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
fixpoint math log() and log10() function. logarithm of a
number is the power or exponent by which another value
must be raised to produce an equivalent value of the given number
fix point log10(x) is a derivative of log2(x)/log2(10)
and loge(x) is log2(x)/log2(e)
Signed-off-by: Shriram Shastry <malladi.sastry@intel.com>
It is possible that that in trace_work() sof_ipc_dma_trace_posn ipc
message reaches host side sof driver before the dma_copy_to_host_nowait()
is finished. Change the dma_copy_to_host_nowait() implementation to
dma_copy_to_host() by adding DMA_COPY_BLOCKING flag to dma_copy()
command.
The flag is already there on the !defined(CONFIG_DMA_GW) version of
the function and the old name of the function was a bit misleading.
This commit changes also probe.c probe_task() so that it also uses the
new blocking DMA copy. I could not see any justification to use nowait
version there either.
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
Add check for DMA buffer address alignment to hda_dma_set_config().
Wrongly aligned DMA buffer does not work correctly.
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
Force DMA buffer to be correctly aligned. If the buffer is only
64-byte aligned, when using hda-dma, then the last 64-bytes of the DMA
buffer is not transferred correctly to host side.
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
The topologies sof-hda-generic were earlier fixed to use short
20 ms ramp because of nearly inaudible UI blip tones with 250 us
ramp. Some changes to topologies build m4 macros have brought
back the long ramp.
This patch fixes the playback ramps to use 20 ms long transitions.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch avoids the issue that topology .conf file after m4
processing can contain multiple same name objects playback_pga_conf
for volume component tokens with possibly different settings. Alsatplg
does not error from such input and it's not defined which impacs
topology binary.
The new naming is pga_conf_X and and_pga_tokens_X where X is the
pipeline number.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
When generating the tplg, copier inherits its dai_index
from the parent DAI object, since there is no need to overwrite
dai_index with different value, let's remove them from top level conf.
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Add option to override how a core id, specified in SOF topology, is
mapped to host core. This allows to map a multithreaded pipeline
execution to specific range of host CPUs.
Implement the option via environment variable "SOF_HOST_CORE0", which is
understood by the CONFIG_LIBRARY implementation of ll-scheduler.
Document the usage to testbench help. mapping of DSP core ids specified
SOF_HOST_CORE
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Buffers are never handled from atomic context. Use the _thread
variant of the coherent API for them to use a mutex under Zephyr.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
KPB is using a lock to protect its buffers. That lock is taken in two
contexts: in the KPB draining task and in the pipeline task, that it
notifying KPB to drain buffers. Under Zephyr both these contexts
are running in thread context. This allows us to use a mutex under
Zephyr for this lock.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
When used from thread context the coherent API can use mutexes for
locking to avoid unnecessarily disabling interrupts.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This patch adds Matlab script tdfb_direction_test.m. The test
simulates acoustical microphone array capture with 360 degrees
rotated noise source. The test topologies build adds an array
identifier to component name in topology file name. That
allows the scripts to simulate with several arrays. Now a
basic 2 mic array (no array suffix, just tdfb), 4 mic line,
and 8 mic circular are tested. Test pass/fail is so far only
visual check from plot.
The existing tdfb_test.c is extended to perform test with the
three test array configurations.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
After moving component to a new memory location, not only source and
sink lists need to re-link but also the buffers which already been
connected to this component.
Signed-off-by: Brent Lu <brent.lu@intel.com>
The testbench currently has a global structure that contains
per topology and per pipeline data. Refactor to move data to the
most appropriate structure for use.
This is not the final fix, further refactoring is needed.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Add hardware semaphore lock before accessing trigger
bits to achieve proper synchronization between host and
DSP during IPC communication.
Note: Same hardware lock is implemented in amd host driver.
Signed-off-by: balapati <balakishore.pati@amd.com>