Volume is supported by gain module in ipc4. We need
to set curve_type, curve_duration and init_val for
this module.
Signed-off-by: Rander Wang <rander.wang@intel.com>
.next_tick is updated on each timer run to the time of the next run.
Instead the current version sometimes only updates it to the current
time. Fix the update condition.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
i.MX8ULP platform integrates HIFI4 DSP running at 528MHz.
This patch adds support for platform drivers and general
platforminitialization.
Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
Add the file for the platform without irqsteer. Now if the platform
have irqsteer we choose interrupt-irqsteer.c, if not then we choose
interrupt-generic.c
Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
Make mu implementation generic. imx8ulp platform has a new version
of mu, then update mu for preparing to support imx8ulp.
Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
When the firmware receives a START or RELEASE IPC message, it
immediately triggers all involved components, which starts DMA.
Then it schedules the pipeline task, but since the scheduler can be
already running at that time, the task might be scheduled when DMA
data isn't available yet or has already overflowed. To fix this
change the control flow to also trigger all components from the task
during its first run. Actual data processing then begins with the
next period. Note, that this is currently only possible with
pipelines, using timer-based scheduling. Pipelines, using DMA
interrupts for scheduling are unaffected.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Use bool type for boolean flags, split some too long lines, merge
some needlessly split lines.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
pipeline_task_init() is always called with pipeline_task as its last
parameter. Remove the parameter and use the function explicitly.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Add imx8 platform for local testing.
TODO: Update xtensa-build-zephyr.sh when Zephyr repo
is updated with imx8 support.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
In XTOS SOF, ipc_send_queued_msg() is run by task_main_primary_core().
In Zephyr we need to schedule ipc_send_queued_msg() using a notifier
triggered by the periodic ll_scheduler.
This is similar to commit c194125b83 ("zephyr:
add notifier_register(ipc_send_queued_msg) in task_main_start()")
For i.MX we need to use this temporary fix for SOF_SCHEDULE_LL_DMA, also.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
On i.MX the DMA interrupts are routed via IRQ_STEER.
In order for this to work we need to:
- make any second level interrupts handling go
through interrupt-irqsteer.c;
- use first level interrupt handling from
wrapper.c.
TODO: Implement a driver for the IRQ_STEER in Zephyr,
to replace the legacy code (interrupt-irqsteer.c).
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
For now, zephyr_ll is limited to timer_domain.
For i.MX we use dma_domain, so keep the ll_schedule
from SOF, until we extend the zephyr_ll for DMA_IRQ.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Remove zephyr_ll.c from mandatory files for building
SOF with Zephyr and include it where necessary: in CAVS 1.5,
CAVS 1.8, CAVS 2.0 and CAVS 2.5.
While here, add ll_schedule for BROADWELL and BAYTRAIL
when building SOF with Zephyr.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
As of July 2021 we support (too) many tracing options and this
duplication is unfortunately the only way I found to support them all
while giving the compiler the opportunity to optimize away as many
strings as possible.
Supported configurations:
- Systems with limited memory and zero space for full strings, must use
SOF dictionary only.
- Systems with enough space for all strings to be in memory.
- Anything in between
- Support to duplicate only important message to both the DMA and the
mailbox (the default)
- CONFIG_TRACEM: supports duplicating ALL messages to both the DMA and
the mailbox
- CONFIG_TRACEV: supports deleting verbose statements at compile time to
save space
- CONFIG_TRACE: support turning off all traces at compile-time
- SOF dict trace de-duplication a.k.a. "adaptive filtering"
- Dynamic log levels per component
- Redirection to Zephyr's shared memory tracing that requires full strings.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
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>