Old name was overlooked in the component API documentation.
Corrected to SOF_MEM_ZONE_RUNTIME.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
This header is an important part of API used frequently
by the developers and must be documented and referred
by the sof-docs.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Once the debug version of allocation functions are removed,
macros may be replaced with functions declared without leading
_ which makes the documentation (and the header) more readable,
the defines section does not need to contain doubled documentation
of alloc api.
bzero macro is not esasily removable due to include deps which
bring earlier declaration of non-inline prototype.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
This patch fixes the crash by adding initialize of sof->pipeline_posn
into pipeline initialization code.
Also the in load_pipeline() function the pipeline is initialized
to zeros to prevent random values to be passed in not set
struct fields. It didn't fix anything but makes debugging of crash
easier.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Commit 9e1a2b251a ("panic: noreturn attribute for scan build")
added ((analyzer_noreturn)) but only for clang.
Fixes at least these two -Werr CONFIG_PROBE=y build failures and
probably similar others with a different .config or in the future:
sof/src/probe/probe.c: In function 'probe_cb_produce':
sof/src/probe/probe.c:635:11: error: 'valid_bytes' and
'container_bytes' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
Build failure reproduced with xtensa-apl-elf-gcc (crosstool-NG
1.23.0.440-3b8c) 7.3.0
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Fixes:
tplg_parser.c: In function ‘tplg_load_graph’:
tplg_parser.c:979:2: error: ‘sink’ may be used uninitialized
in this function [-Werror=maybe-uninitialized]
979 | printf("loading route %s -> %s\n", source, sink);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The memory size for cht and byt is too small to include the DC Block
module. If the user wants to use it, they will have to disable some
other components.
Signed-off-by: Sebastiano Carlucci <scarlucci@google.com>
This commit includes a new test case in tplg-build.sh. It also includes
the new simple pipelines pipe-dcblock-capture/playback. Those new
pipelines are used by tplg-build.sh to generate the test pipelines.
Signed-off-by: Sebastiano Carlucci <scarlucci@google.com>
This commits adds the scripts to generate the bytes control blob
for the DCB. It also provides some generic scripts to convert
valid binary blob to a csv or binary file (usable by sof-ctl)
or an m4 byte control topology file.
This commit adds two new folders under tools/tune
- dcblock: scripts to generate the blob in Octave
- common: scripts to convert any generic blob to a config file.
Signed-off-by: Sebastiano Carlucci <scarlucci@google.com>
This change provides a DC Blocking Filter (DCB) component. A DCB is a
high-pass filter used to remove any DC offset from a signal. The
coefficients for the component can be set individually for each channel.
Currently, only the following formats are supported:
s16_le
s24_le
s32_le
Signed-off-by: Sebastiano Carlucci <scarlucci@google.com>
This patch makes the binary gcd algorithm work for negative
numbers by turning them into positive ones. Works since
gcd(a, b) = gcd(-a, -b) = gcd(-a, b) = gcd(a, -b)
Signed-off-by: Iulian Olaru <iulianolaru249@yahoo.com>
This patch replaces the former gcd algorithm which was implemented with
repetitive divisions with Stein's algorithm, whitch is a faster gcd
algorithm. All operations are arithmetic shifts, comparisons and
subtractions.
Signed-off-by: Iulian Olaru <iulianolaru249@yahoo.com>
CMAKE_VERBOSE_MAKE was sometimes "hardcoding" the decision in CMake's
cache. Move that decision to the make invocation.
After running xtensa-build-all.sh [-v], it's now possible to choose
again whether "make -C build_apl_gcc/" should be VERBOSE or not without
starting from scratch and with the exact same configuration.
Before this commit it was possible for make to decide again after a
non-verbose xtensa-build-all.sh but not possible to decide again after a
verbose xtensa-build-all.sh... very confusing.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Instead of making new files for audio equalizer topology, reuse existing
topology and replace only volume pipeline by macro replacement.
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
There is no need for that many macros in the header.
The optional debug code can be inserted into the allocation
functions.
There is no need for dedicated debug trace functions for
runtime and buffer heaps. Merging the parameter setup
into switch inside a single alloc_trace_heap() function
reduces the debug ptr verification macros to a single
common one.
Once the debug code is moved from the header to .c file,
there is no need to expose memory unit trace macros that
should be internal.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
All clients that just wants to allocate and free memory
does not need to know all the heap management api
and internals.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
There was old RZONE_BUFFER symbol left in the debug code, not
changed to SOF_MEM_ZONE_BUFFER.
Went under the radar so far since the DEBUG config options are
not included in CI builds yet.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
This patch adds the double quotes to shell scripts to avoid fails
with arguments or shell variables when there are space characters.
The processing components run scripts are all edited for better
structure with functions usage() and main() and with local variables
within functions.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Create dump options for logger to print important information from
LDC file, like DBG_ABI version and UUID with corresponding names.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Split this function to part responsible for pointer calculation
and string formatting. It make possibility to use same
string format with different pointer arithmetic.
Moreover introduce aprintf to make memory allocation for output
string more automated process.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Double space in formatting string led to little mismatch between header
and content in output logger file.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
We only need demux for two speaker dais case.
Fixes: 5e8de9fd52 "topology: sof-icl-rt711-rt1308-rt715-hdmi: Merge
two pipeline with demux"
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Cmake files should have consistent directory linkage scheme
where lines duplication should be avoided.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Data after pause command should be kept compatible to omit
pop noise on output. The solution may be waiting for FIFO
empty but it takes to long - up to 1 processing period time.
Another - introduced - solution is to stop draining new data
from buffer after pause, but keeping dma connection with dai
up to release command. In this place waiting for FIFO empty
shouldn't take so much time, so system agent won't panic and
data will be consistent.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Disables system agent for BYT/CHT, HSW/BDW and IMX8 platforms.
System agent is supposed to track drift between timer ticks,
but it's only valid for the platforms with timer based scheduling.
Platforms with DMA based scheduling have asynchronous interrupts,
which can potentially starve the agent and cause system panic.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
The equation for fir_in_max value was missing term -1 and returned
too high value that resulted in FIR scale coefficient calculation an
overall gain of 0.000004 dB while it should be exactly 0 dB. The HW
decimator contains saturation in output so it have not caused
overflows of PCM capture stream.
The new macro INT_MAX() returns the correct max PCM code value for
the used FIR input word length and looks better readable than
original code.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds to header file sof/math/numbers.h two macros
INT_MAX(N) and INT_MIN(N). E.g. for 16 bits the returned values
are 32767 and -32768. The macro works up to N = 64.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Previously used by kpb tests only and defined locally.
New pieces of the code, like perf macros need them
globally.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Adjust top_of_kernel_tree() function to SOF so invoking
./scripts/checkpatch.pl works out of the box and doesn't require
figuring what's going on and the existence of the --no-tree option which
sof-ci invokes "behind the scenes".
This instead of failing with:
Must be run from the top-level dir. of a kernel tree
Compared to --no-tree, this is also enables a couple extra checks like:
WARNING: use relative pathname instead of absolute in changelog text
PS: the space between check and patch is here to... defeat checkpatch
itself. It apparently doesn't expect any change to itself.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Match alignment with open parenthesis to
maintain the coding style.
Reported by checkpatch.pl
Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
In hda_dma_data_size() if an XRUN leads to an early return,
interrupt flags have to be restored.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The ret variable in ipc_comp_new() is never changed from its
initialisation value of 0, remove it.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>