Use a correct path to the cAVS memory.h header, build cAVS LPS
only when the respective Kconfig option is selected.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Introduce TRACE_BURST_COUNT Kconfig setting, which allows to define amount
of messages that are allowed to pass through the filter before suppression
kicks in.
Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
To allow proper display of suppressed message info traces, %pQ specifier
was chosen to decode pointers to log entries.
Helper function asprintf_entry_text() is used to handle the log entry
text for display.
Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
When user manually overrides trace filtering settings, adaptive trace
rate-limiting is disabled. This assures, that when user deliberately
changes filters, all trace messages are being delivered.
Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
Few recent messages are remembered by the filter, and repetitive messages
reported in short period of time are suppressed. Solution is compile-time
configurable via many Kconfig options, as documented in Kconfig.
Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
Also create trace_log_unfiltered() function, to be used internally
by tracing subsystem to emit information about suppressed trace messages.
The *unfiltered function could be also used as replacement
in _log_message() macro, to disable log filtering for debugging purposes.
Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
This separates trace filtering from actual sending of the message
and allows usage of sending function without filtering, when necessary.
Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
If you enable the adapter but disable the cadence codec this will break
Reported-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
So far we only used topologies with rate set
to 48KHz. This is no longer true now when
we enabled KWD pipelines.
So, use rate from parameters passed from kernel.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
We add fsync_rate, bclk_rate because now we
actually need them.
Also, notice that mclk_rate was moved near the other rates
fields.
I think this was broken from the beginning but didn't
show up as a bug because SAI is used in consumer mode
and the clock is provided by the codec.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Prevent unused Xtensa XTOS files from building but keep them in the tree
until migration to Zephyr completes.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
When building SOF with Zephyr for unsupported architectures
the following additional adjustments to the wrapper are required:
1. define HEAP_RUNTIME_SIZE
2. implement stubs for interrupt handlich code
3. remove arch_timer_get_system() as it's provided by a header
4. hardcode "return 0;" for platform_timer_get()
5. disable sys_module_init() which anyway isn't yet functional
under Zephyr
6. add dummy platform_init() and platform_boot_complete()
7. add log_const_sof
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
When building with Zephyr for unsupported architectures several DMA
symbols are missing. Add them to the respective platform header.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
trace_point() is only used in platform code and in init/init.c. None of
those are build for ordinary CONFIG_LIBRARY builds. However, when built
under Zephyr, init.c is included in the build. therefore a dummy
implementation of trace_point() is needed.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The timer-domain driver requires the use of the cAVS timer driver,
but it only makes sense on Xtensa architectures.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
If MULTICORE is disabled secondary_core_init() should be a dummy on
all architectures, not only on Xtensa. This change also makes
arch/init.h redundant, remove it.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
ipc/trace.h contains definitions for all the SOF_IPC_PANIC_* macros,
it should be included explicitly everywhere, where those macros are
used.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
register_exceptions() and exception() are only used in init.c, move
them there.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
arch_get_stack_*() functions are only used in panic.c. Move them to
a separate header to reduce dependencies.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
When building for unsupported architectures under Zephyr set ARCH
to "host" to use generic headers.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Add a required .id field to struct timer and update
arch_timer_get_system() prototype to return uint64_t.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
SOF can be built with Zephyr for arbitrary unsupported architectures.
In such cases ARCH can be equal to x86_64 or arm or something else, so
respective $(ARCH)/Kconfig files don't exist. Make inclusion of those
files optional.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This adds memory capabilities macros for different buffer
types on i.MX8.
Once we started to enable more complex pipelines
on i.MX8 we found out that we need these caps defined.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
This patch adds the the Matlab script dmic_init() that simulates
initialization of the Intel PDM digital microphones decimation
block. The tool computes the needed FIR filters and exports
them as C header files. The script dmic_batch computes all the
currently used decimation settings.
The generated header files from subdirectory include need to be
manually copied to src/include/sof/audio/coefficients/pdm_decim/
and the header file pdm_decim_table.h edited manually if the
header file names were changed due to different filter characteristic
(band frequencies, stop-band attenuation).
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch moves memory list initialization from .prepare() to .init()
as we need that memory list be already initialized on codec
initialization otherwise we will lose track of memory allocated
prior to .prepare()
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Storing the address of a know existing address space will always result
to be true. Therefore this variable is actually doing nothing. Remove
reference to fix this.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Currently xtensa-build-all.sh has restriction to use rimage for tgl
signing, because rimage didn't support tgl. As rimage now has support
for tgl signing let's remove this limitation.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
The compiler issues warnings when converting 64-bit pointers to 32-bit
integers. Use uintptr_t instead.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Broadwell support with Zephyr had only been dry-coded, it has never
been tested, and it contains an infinite recursion bug: functions
platform_timer_get() and arch_timer_get_system() call each other
infinitely. Break the recursion formally, until a proper fix is
available.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Files under src/trace should only be built if CONFIG_TRACE is selected
in configuration.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
dai.h defines types with fields of type struct list_item so it must
include list.h.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
using irq_local_enable() and irq_local_disable() requires including
interrupt.h
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Number of processing cores is a global parameter, it doesn't have to
reside in an xtensa-specific configuration menu.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Previously sof-icl-nocodec topology only enabled SSP0. To effectively test
more test cases, this enables more playback and capture pipelines with
SSP1, SSP2 and DMIC3.
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
When a DAI_CONFIG IPC is sent from the driver for a particular
DAI type and index, all DAI components that match the type and index
are configured. When all components are set up during topology
loading, this isn't really much of a problem as all DAI_CONFIG
IPCs will be sent at that time as well ie there is no active
playback/capture. But with dynamic pipeline loading, the playback
and capture DAIs will be individually configured whenever the
respective pipeline is started. This will end up with errors both
when configuring the SSP and when configuring the DAI comp itself.
So, ignore the request to configure the SSP and the DAI comp
that is already active so that the other DAI comp can be
configured successfully when its pipeline is set up.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Read whole DSM parameters including non-volatile parameters
from DSM component instead of reading cache.
The function is added for the diagnostic purpose.
Signed-off-by: Ryan Lee <ryans.lee@maximintegrated.com>
DSM is re-initialized when the format is changed.
DSM parameters loaded from the blob before re-init
is not safe for the re-init process
Parameter re-configuration is necessary after re-init.
'maxim_dsm_restore_param' was added for this purpose.
Signed-off-by: Ryan Lee <ryans.lee@maximintegrated.com>
Support dynamic bit deptch conversion on runtime.
Re-initialize DSM if the frame_fmt is changed.
Signed-off-by: Ryan Lee <ryans.lee@maximintegrated.com>
Changed variable x to idx and variable y to ch because x and y are
not good name for an iterator.
Signed-off-by: Ryan Lee <ryans.lee@maximintegrated.com>
At this point PLATFORM_DCACHE_ALIGN is equal with DCACHE_LINE_SIZE
which on i.MX boards is 128.
Functions like rmalloc and rzalloc are allocating memory aligned at
PLATFORM_DCACHE_ALIGN bytes. This means that blocks under 128 bytes
are not really used and blocks sized > 128 are preffered for small
allocations.
This seems to be an unnecessary overhead which results in SOF not
being abel to allocate memory for simple pipelines (e.g simple
pipeline with a mixer).
For this reason, we set PLATFORM_DCACHE_ALIGN to a smaller value
(sizeof(void*)) but keep HEAP_BUF_ALIGNMENT unchanged.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
The comment implies that it's looking for what Zephyr knows as the
"cavs_timer" driver, but the test was specifying an old (and AFAICT
SOF-specific?) kconfig. Use the one that corresponds to the actual
driver selection.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This kconfig variable no longer exists in upstream Zephyr (the feature
it used to control is now zero-overhead and always enabled).
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>