If mono is defined, dai index 3 is not used and DMIC uses index
4. Now sdw machine driver generates dai dynamically with consecutive
dai index. To align with machine driver, refine topology to also use
consecutive index.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Unused code shouldn't be present in source code, it only makes system
more difficult to understand.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This patch increases heap buffer size for ICL and JSP platforms.
Therefore more pipelines can work simultaneously.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Makes volume ramping task dynamic meaning it will be
allocated only when needed. There is no need to have it
allocated statically unless the pipeline will be in fact used.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Add the PIPELINE_ID to the graph section name to
make them unique for the playback and capture pipelines
that are associated with the same SSP. Also fix the
comment while we're at it.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Having both LP_SRAM (bool) and LP_MEMORY_BANKS (int) is error prone.
It's better to make LP_SRAM just a helper config that is set
to true if there is any LP memory bank in use.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
This patch avoids the testbench to crash when file read or write
file open was not successful. E.g. invoking testbench with
incorrect input file name caused a segfault.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds force of scheduler type to EDF since it is the
only simplified scheduler version that is included to testbench.
The schedule_task_init_ll() stub is updated to call schedule_task_init()
to prevent a check for NULL run operation to fail. The patch also
changes the memory allocation to calloc() to clear the reserved data
to value NULL for similarity with rzalloc() in SOF.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds the missing call to end of test run. It prevents
the pipeline reset to print error traces about illegal state
change.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch sets in topology parsing core to zero for file reader,
file writer, and buffer since it was left uninitialized and caused
the core check in pipeline run to fail.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch retrieves the channels count either from sink or
source. The previous code failed for file read since source
is NULL. A similar kind of mistake also caused the period_bytes
to be calculated as zero.
Finally as code simplification the calculation of bytes is moved
to variable declaration to avoid duplicated statement.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds the initialization to testbench start code. Without
it the notification from buffer consume/produce causes segfault.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The change adds power gating of unused memory banks for cavs 2.0/2.5
hardware on top of previously enabled flow for cavs 1.8.
Signed-off-by: Lech Betlej <lech.betlej@linux.intel.com>
Boot loader code was modified to more readable by renaming functions that
are used to actually power up memory banks during memory initialization
routine.
Signed-off-by: Lech Betlej <lech.betlej@linux.intel.com>
wm8960 codec drivers the master clock and for s24le we cannot easily
derive the bitclk.
So, switch to s32le. SAI supports s32le format. The initial s23le was
added because topology was based on sof-imx8qxp-cs42888.m4 which uses
ESAI and that's limited to s24le.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
For now we are using generic simple-card as a machine driver, and
the DAI name must follow certain pattern <dai-name>-<codec-name>.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Platforms with cAVS version 1.8 & 2.0 have hardware requirement that
DSP should use LPRO as clock source in waiti.
This patch adds config for that and enables it for platforms that
need it.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
On some platforms there is a need to perform tasks after
coming back from waiti.
There is no central interrupts processing function in SOF.
Every interrupt is registered separaterly, so we need to execute
'wake up' functions in xtos interrupts handlers.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Add freq indexes for LPRO and HPRO, to be able to request
clock source by providing specific frequency index
instead of frequency in Hz.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Add support for a simple IPC polling API that will allow clients to
poll IPC messages and status. This is runtime mutually exclusive to
the default IPC IRQ mode.
IPC polling mode is only intended for certain use case where simplicity
or reduced footprint are required like GDB stub and bootloader stub users.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Trace entry fields for IDs may be used by dai traces
for type and index to track down each trace entry to
a specific dai instance.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Since this is the code of 'dai component', the trace macros
are renamed to avoid collisions with names of 'dai'
(ssp, dmic, ...) trace macros.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
This patch corrects the shown parameters orders for help text
and updates the copyright text style.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch fixes a mistake that forces generation of rate into
fs_inout matrix diagonal. The purpose of this test is to enable
SRC to pass equal input and output rate, so in case not equal
input and output rates the generator would not disable such
conversion if requested.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Dispel possible doubts about content of struct fields by adding
descriptive comment to each one.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Field frame_fmt is treated as sof_ipc_frame in code so data type
in declaration should be same. Update field comment to be more
appropriate with new data type.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
During working with algorithms on special data types there may be need
to convert and store input samples before algorithm run in temporary
buffer. Same situation may happen on the algorithm output.
Size of this buffer may be big enougth to always convert source
data stream in one pass and converter interface doesn't need to be
changed but then capacity of this buffer must be same as source stream
(in samples). In this scenario memory management is very inefficient,
espially with grow of number of components with such a need.
There are also a few solution to use smaller buffers instead.
It can by achieved by:
1) manually moving r_ptr in source stream in component copy() routine,
what shouldn't happen in such a place
2) calling buffer_consume() after each portion of samples, what leads
to data fragmentation and performance issues
3) introducing offset argument in converter interface
As we can see, solution number 3 is best one.
Moreover introducing data offset for processing function is common
technique and doesn't introduce visible performance issues.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Implements new platform specific method, which allows for
retrieving linked list item from memory. The best example
are cAVS platforms, which need read it through uncached
memory region. Rest of the platforms currently don't need
the implementation, since they don't support hardware linked list.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Extracts mailbox_sw_reg_write() function to platform specific code.
For cAVS platforms we want to have it go through uncached memory
region, which can be unavailable on other platforms.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
GCC 9.x introduces checks for packed data alignment when being passed or
cast as different types.
Add an alignment macro so that we can tell GCC that packed data alignment
is assumed to be valid for certain casts.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
GCC 9.x introduces checks for packed data alignment when being passed or
cast as different types.
Pass LLI by pointer instead of SAR* and DAR* which results in packed
alignment error.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Probes are a feature that will allow user to extract and inject data
from/into buffers at runtime.
Basic flow is as follows:
1. Initialization of probes subsystem, allowing for simultaneous
configuration of DMA for extraction. If extraction DMA is not setup
during init, extraction probes will be disabled.
2. Configuration of probe points, preceded by DMA configuration in case
of injection probes.
3. Probes are now in operation and will send single multiplexed stream from
extraction probe points and inject data into specified buffers.
4. State of probes and associated DMAs may be retrieved via INFO functions.
5. Removal of probe points.
6. Removal of injection DMAs.
7. Deinitialization of probes subsystem.
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
Signed-off-by: ArturX Kloniecki <arturx.kloniecki@linux.intel.com>
This commit introduces proper calculation of buffered_data,
which should not exceed buffer_size value. Firstly, we calculate
free space in history buffer and we add minimum value from
copy_bytes and hb_free_space.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
This patch adds the missing use and initialization of ASRC for
pull mode. Pull mode is used typically in audio capture where
the DAI is not synchronous with rest of SOF. The previous version
used push mode for both plaback and capture that can work only with
a synchronous DAI.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
While the functions were unused I missed to name them properly. With
the prefix the names are consistent with push mode functions.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds two new test topologies. One is for testing ASRC
timestamp retrieving from HDA and one for WM8804 slave SSP interface
for APL. It is useful with UP^2 board with HiFiBerry Digi+ SPDIF
interface.
The asynchronous mode token is switched on in ASRC capture and
playback pipelines. It switches on DAI skew tracking feature
in ASRC.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds the DAI skew tracking and filtering to fine
adjust the conversion factor of the ASRC. The ASRC finds the
pipeline DAI from downstream in push mode (playback) and from
upstream in pull mode (capture).
To avoid code hang to infinite loop the modification to asrc_farrow.c
adds a safe bail out if skew factor related number of samples to
compute exceeds buffer space. The streaming continues but there
can be a glitch in audio if the skew is bad enough to exceed the
buffer margin. The error trace helps to see if such can happen in
real use cases.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds to the DAI component new operations dai_ts_config(),
dai_ts_start/stop(), and dai_ts_get() to support timestamp retrieving
from audio interface hardware for use of other components, especially
in the asynchronous sample rate converter.
The support for HW timestamps is enabled in Intel cAVS HW drivers for
SSP (I2S), HDA, and DMIC.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Up^2 boards have a DMIC connector. Add support for such DMIC add-on
boards. Also adjust iDisp interface DAI IDs to match the new
sof_pcm512x.c Linux machine driver.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>