Some platforms do not have a SSP clock, so a dummy define for CLK_SSP
and related macros shouldn't be required to exist in order for the
firmware to build.
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
It didn't work correctly if multiple cores write to "sw regs"
allocated on the same cache line.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Enables DW-DMA channel linear link position counter based
on the selected peripheral connection. It can be used
to retrieve timestamping information on platforms supporting it.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Cleanups definitions of GPDMA shim registers for all cAVS platforms
and extends them by adding support for channel linear link position
control register.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
After disabling tracing code have compilation error because of
implicit declaration of platform_trace_point function.
After calling through trace_point it is replaced with empty
define after disabling trace.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Xtensa ABI requires the stack to always be aligned to a multiple of 16
bytes. This commit aligns the stacks used for interrupt handling.
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
Create abstract interface for clocks and move platform specific
clocks code to platform folders.
It was also necessary to move SSP clocks declarations to
SSP driver code to decouple clocks logic from mandatory
SSP clocks.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
The changes fix command unbalanced groupings and remove discrepancy
between parameters in function declaration & definition of
set_power_gate_for_memory_address_range() function.
Signed-off-by: Lech Betlej <lech.betlej@linux.intel.com>
The description says that any LX6 Xtensa architecture revision DSP
should have this enabled, and the particular DSP in the i.MX8 does fit
this description.
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
This change adds stream map and channel map structures
used for channel re-routing and stream aggregation.
Signed-off-by: Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
Reverts all changed media pipelines to again have 4000 ms
scheduling period. Change was introduced in order to workaround
firmware scheduling limitation, but with pipelines scheduled
separately we can revert it back.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This patch enables separate scheduling of connected
pipelines. It allows for different scheduling periods
between connected pipelines and flexible controlling
of such topologies.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Uses pipeline_task in DMA domains to check, if tasks should be even
registered on interrupts. Non registrable tasks are the one,
whose pipelines are not the owners of scheduling component e.g.
host pipelines connected to mixer pipeline. Such tasks are still
added to the scheduler's list and executed, but they are driven
by the pipelines with scheduling component.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Adds definition of pipeline_task. It's a task type registered
by pipelines and used in DMA scheduling domains.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Removes SOF_SCHEDULE_FLAG_SYNC and SOF_SCHEDULE_FLAG_ASYNC.
They are no longer used nor needed.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Changes ll scheduler implementation to use synchronous property
of domain to check if given task should be scheduled synchronously
or asynchronously. It makes sense, since it's heavily dependent
on particular domain functionality.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Adds new synchronous field to indicate if tasks registered
to this domain should be scheduled synchronously or asynchronously.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Instead of taking the name from an array of strings (which is allowed by
GCC) I compose the name directly inside the IRQSTR_CASCADE_TMPL_DECL
macro. GCC is able to detect that the name is a compile time constant
and allows the old code, XCC does not and requires this change.
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
This allows the SGN macro to no longer generate a warning on the "-1"
case and thus allows building with XCC. GCC doesn't seem to care about
this one. No actual change in the logic itself.
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
PADC means to have ESAI pad samples with zeros instead of sign-extending
them when they are smaller than the (32-bit) container. This doesn't
make senseon capture and indeed that specific bit is hardware reserved.
So don't use it.
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
Generally comment cleanups but also moving the "|" operator to be at
the end so that the various options in dai_update_bits are aligned.
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
The configurations will be mostly similar to those used for playback,
but while the ESAI is master on playback it must be slave on capture
as a workaround due to hardware limitations. These differences must be
hardcoded due to the topology not specifying these configurations for
each direction of the link.
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
Currently this just returned a zero and wasn't able to correctly
interpret the direction of the channel.
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
The direction was already configured correctly in the component during
dai_new, and the IPC data is shared for both instances of the DAI
component (playback and capture).
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
Use block expression instead of do {} while(0) macro
in spin_try_lock in order to return its value in a
safer way.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
The base irq of the first created cascaded struct is currently equal to
PLATFORM_IRQ_HW_NUM, which is 32 on HIFI4.
On IMX platform the number of children per such a struct is equal to 64
(as per IMX steer IRQ mapping).
Since steer irq in range [0-63] are not routed to the DSP on IMX8 it is
possible to create the cascaded structs only from 64.
Starting them from 32 creates a bias in the management of interrupts,
making the storing of the irq-handlers un-natural and complicated.
This commit wants to replace the initialization of cascade_root.last_irq
by a new constant PLATFORM_IRQ_FIRST_CHILD which would be defined at
platform level.
In the case of IMX it takes value 0, while in all other platform it takes
the value PLATFORM_IRQ_HW_NUM in order to keep things as they are.
Signed-off-by: Jerome Laclavere <jerome.laclavere@nxp.com>
The previously used cast of pointer to size_t (unsigned int)
has worked but it's horrible way to do it. Cast to uint8_t *
should be clean portable code.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Add two parameters to comp_dev struct in order to allow
configuration of the component processing variable frames.
Added parameters are:
- min_sink_bytes - min free sink buffer size measure in bytes
required to run component's processing;
- min_source_bytes - amount of data measured in bytes
available at source buffer required to component's
processing.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
This patch contains maintenance for module traces. Some redundant
traces are removed and some new traces with useful information are
added, especially if they are related to an error with configuration
request. The long trace strings are shortened to and split to
several lines at numbers print when possible.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds capability to equalizer to switch response during
audio playback or capture. The glitches are minimized by check
and apply of the filter configuration before each copy()
operation.
The existing only halfway implemented SOF_CTRL_CMD_ENUM for quick
stored presets switching during streaming is removed for now
since there is no driver support.
The internal code cleanup includes extract of two functions from
eq_iir_setup() for check and initialize of coefficients and
initialize of filter delay lines. It helps to better understand
the setup flow.
The extrapolation of channels to response assign map is changed
to use previous channel response instead of first if the stream
contains more channels than the response definition. The
procedure was changed to avoid a code static analysis issue. The
behavior is not specified so this simpler way was chosen.
To minimize number of duplicated functions in generic and HiFi3
version a new module iir_generic.c is created for the filter
core. After the change iir.c contains only the common code for
both implementations.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Use RELATIVE_FILE because __FILE__ makes binary output
dependent on project location.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Add helper function sof_append_relative_path_definitions that
defines RELATIVE_PATH per source file for given target.
__FILE is not always suitable as C standard states that __FILE__ expands to
input file name, that usually is absolute path what will cause f.e. .rodata
size to be dependent on where project is physically located on the disk.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Include in footprint only support for selected
data formats. It may make footprint lighter.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Include in footprint only support for selected
data formats. It may make footprint lighter.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Include in footprint only support for selected
data formats. It may make footprint lighter.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Include in footprint only support for selected
data formats. It may make footprint lighter.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>