From deep down trace.c:va_tracelog() up to the _log_message() level.
Also rename va_tracelog() to the more specific dma_tracelog()
Preparation to support the DMA trace in Zephyr.
The only functional change in this commit is that DMA messages copied to
the shared memory are not de-duplicated any more (a.k.a "adaptive rate
limiting" or CONFIG_TRACE_FILTERING_ADAPTIVE). These are generally
supposed to be high level hence rare enough; otherwise there is probably
a "bigger problem".
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Preparation to use mtrace_dict_entry() also the _log_message() level too
and not just for very early mtrace_printf() tracing.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Because it's mostly working now and avoids macro nesting complexity;
there is already #ifdef CONFIG_DW_SPI #elif CONFIG_TRACE
Just for the record this is reverting a very tiny part of
commit cf8e35f860 ("zephyr: init: create a zephyr entry point in SOF.")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commit a439ea93f6 ("zephyr: ll-schedule: switch over to a simplified
implementation") replaced ll_schedule.c with zephyr_ll.c when compiling
with Zephyr. So the struct tr_ctx named "ll_tr" is now missing. Declare
it in ll_schedule.c too.
No one noticed that ll_tr was missing because the DMA trace does not
work in Zephyr and the main branch yet.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Currently when an IPC message arrives, the primary core receives the
interrupt, schedules a task and begins processing the message. If it
identifies, that the message is for another core, it sends an IDC
message to it and waits in a busy loop until the other core completes
processing the message and writes a response into the mailbox. After
that the primary core notifies the host about completing the
processing. This patch lets the processing secondary core notify the
host directly, which also frees the primary core to handle other
tasks instead of waiting in a busy loop.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
It is failing and skipped only when compiled on the host, runs fine with
xt-run.
This is temporarily needed to add host-based unit tests to CI now and
catch any regression in any other test now.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Adds --error-exitcode=1 to valgrind options (otherwise what's the point
of using valgrind?)
Skip alloc test that does not pass on HOST (passes with xt-run)
Add help message.
Runnable from anywhere.
Use shell functions
https://github.com/thesofproject/sof-test/issues/740
Fix all quoting issues and other shellcheck warnings.
Add comments.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Link to the CMake section in sof-docs which documents a lot of what this
script does and is probably out of date now. It would be less out of
date if this link had been there and more people had been aware that
this documentation even existed.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This has been finding several pre-processing bugs already. Short of
randconfig some variety is the best we have.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Fixes 'no previous prototype for trace_log_filtered' -Werr and
redefinition of ‘trace_flush_dma_to_mbox’ error.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Thanks Ranjani for finding most of these magic values.
Also move READY_MSG closer to the only place where it's used so it does
not look like a "global" anymore.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Show heap status update with every pipeline going to be run, when
CONFIG_DEBUG_HEAP is enabled. This will help to monitor the heap memory
usage status.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Add tracing of ll-scheduler execution time. Use k_cycle_get_32()
timestamps for minimal overhead. A trace is printed with a period size
of 2^10 scheduler executions (roughly once per second in typical
configuration with 1ms timer tick). Average and maximum observed
execution time is printed out for each task.
Additionally k_timer_status_get() is used to observe instances of
overruns. If the timer irq is fired before previous timer thread
invocation completes, overrun of the ll scheduling slice has occurred
and this is recorded. Number of overruns is printed for each measurement
window.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This patch adds clear of all component data in reset() component
operation except state variables those are set by control
commands.
Note: If a new stream starts after reset() without free() and
new(), the clear of all component data would result to wrong
gain and wrong mute state. The driver commands are not re-sent
in such case.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Add a lightweight layer to track execution time of ll tasks to the
zephyr-ll scheduler. Use k_cycle_get_32() timestamps for minimal
overhead. A trace is printed with a period size of 2^10 task executions
(roughly once per second in typical configuration with 1ms timer tick).
Average and maximum observed execution time is printed out for each
task.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Convert all playback pipelines to have a mixer so adding a deep-buffer
pipeline will be simpler.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Ipc4 pcm converter will check container size and valid sample
size to do format conversion. This patch add general support for
valid sample / container size s16c16 <-> s16c32, s32c32 <-> s16c32
s16c32 <-> s24c32 s24c32 <->s16c32, which are not supported
by sof now.
Signed-off-by: Rander Wang <rander.wang@intel.com>
This enables EQ component with IIR filter for i.MX8QM/i.MX8QXP/i.MX8MP
with wm8960 codec.
Users can try various configurations for EQ parameters using sof-ctl tool:
$ amixer -Dhw:1 controls | grep EQ
numid=44,iface=MIXER,name='EQIIR1.0 eqiir_coef_1'
$ ./sof-ctl -Dhw:1 -n 44 -s sof/tools/ctl/eq_iir_bassboost.txt
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
getopt() returns an int, which in our implementation is assigned to a
char type var.
On some platforms char is unsigned thus making getopt() return value
always > 0.
Use int instead of char here to fix the stop condition for parameter
parsing.
This makes sof-ctl work on ARM platforms.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
The source_format and sink_format variables are not needed in
component data. They can be local in prepare().
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The source_format and sink_format variables do not need to be in
component data. Local variables in prepare() are sufficient.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
-p is required when the real (not symbolic) directories are not nested
in one another.
The documentation gap was clearly demonstrated by me getting confused
even though _I_ implemented this logic some time back.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Ipc4 error code will be used in ipc4 interface layer and
current sof error code in framework or components will be
translated to ipc4 error code in this layer.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Base config defines input & output information of each ipc4
modules. The information includes audio stream format, input
& output buffer size.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Added cordic based approximation of arcsine,arc cosine and
complex exponential function to math trigonometry.
Signed-off-by: ShriramShastry <malladi.sastry@intel.com>
The change for topology1 was missing from various tuning
and testing scripts those access binary blob data from
topology m4 directories.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Dai configuration is generated based on gateway config in copier module
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Rander Wang <rander.wang@intel.com>
Stream id is included in ipc4 config and fw constructs
hw_params for alh based on this information.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Ssp setting can be generated offline by tools and sent
to fw by driver in memory blob. Fw decodes this blob and
set hw registers accordring to blob configuration. This
patch add support to this type of ssp configuration.
Signed-off-by: Rander Wang <rander.wang@intel.com>
In ipc4 each module will be bound to its sink module by pipeline.
This patch add new ops bind & unbind to dispatch these events to
related modules.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Fix xruns caused because of using the same flags for locking
both the sink and source buffer.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Stop ignoring most comments in the trace.h file.
Confusingly, only comments in trace.c were considered because unlike
trace.h, trace.c is not turned off by the preprocessor but by CMake
instead.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
At first I assumed some refactorings forgot to update the comments to
match. Then I saw some of these could never had made sense ever.
This does not fix _all_ doxygen warnings, it only makes the remaining
warnings easy to grep -v. This is just good enough for me to test other
doxygen changes without being drown into warning noise.
C files are not parsed by the default doxygen configuration - "if it's
not tested then it does not work".
Signed-off-by: Marc Herbert <marc.herbert@intel.com>