This patch updates the tplg-build.sh script by omitting DMIC capture
test topologies generation, tone topolgies generation due to no
use and no maintenance. They can be fixed later.
The all DAI permutations are generated only for volume pipeline. The
src is removed. Instead a new algorithms topologies generation loop
is added for UP2 (APL) compatible topologies. The algorithms are
ASRC, FIR, IIR, and SRC.
The test-all, capture, playback macros are updated to use
PIPELINE_PCM_ADD and set up DAI for SCHEDULE_TIME_DOMAIN_TIMER. The
duplication of TEST_DAI_PORT in macro call is replaced by 0 to
prevent topology load fail on device.
The test-equalizer-playback-ssp.m4 is removed as obsolete.
Pipelines are added for FIR and IIR playback and capture. SRC playback
pipeline is improved by making tokens instance specific. The SRC
capture pipeline macro is only cosmetically improved.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The previous copy() function frames computation code contained
a mistake that unnecessarily prevented the filter core to access
more than nominal amount of samples from source buffer in pull mode.
It have corrupted occasionally input PCM samples and possibly
could have stalled the algorithm with an impossible processing amount
constraint.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Implement buffer lifecycle callbacks to properly handle extraction
from probe. Implement probe data packet header generation and sending
it along with data from buffer via extraction DMA.
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
State of probes subsystem is being updated and properly reported back
via INFO functions. DMA is being set up to perpare for transfer of
probe data.
Signed-off-by: ArturX Kloniecki <arturx.kloniecki@linux.intel.com>
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
Sets buffers to inter-core if they are connecting components
from different cores. From now on FW supports pipelines,
where some of the components are offloaded to slave cores.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Implements remote operations for params, prepare, trigger
and reset calls. If the target component is running on
different core, we should send IDC in order to execute
appropriate operation.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Adds buffer locking and unlocking in audio components
where it's needed. We need to retrieve the latest values
of available and free sizes in copy functions and also
use lock in case of making changes in params and prepare
methods.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Calls buffer_invalidate and buffer_writeback in audio components
processing functions. It is required to achieve data synchronization
in case buffers are inter-core.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Extracts buffer content invalidation and writeback functions.
They are always used for DMA buffers and also need to be used
for inter-core buffers.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Changes implementation of comp_get_copy_limits function.
It now takes source and sink buffers, so they can be
available outside of the function. It will matter with
inter-core buffers, when synchronization will need to be kept.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Implements locking and cache synchronization for buffers,
which are connecting components running on different cores.
We need to explicitly use cache here (if platform supports it),
so the shared API cannot be used in this particular case.
Shared is going through uncached area on cAVS platforms,
but it's too slow in the case of frequent buffer accesses.
Also loop in pipeline_set_params has been changed to avoid
unnecessary cache accesses after unlocking the buffer.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Adds inter_core field to the buffer struct. This property
indicates whether buffer is connecting components from
different cores e.g. high demanding in terms of cycles
processing component running on core 1, but connected to
the rest of the pipeline, which is running on core 0.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Adds locking mechanism to buffer. It will help with
synchronizing buffer accesses by multiple cores.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Adds separate task to components, which are supposed to be scheduled
on different core than the rest of the pipeline. These are so called
shared components. This way components requiring huge processing power
can be offloaded to slave cores.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Implements component reallocation in shared memory. This way
cores can share components, which are part of one core's pipeline,
but runs on other core.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Adds component's allocated size to comp_dev structure.
Since most of the components have different sizes, this field
helps with potential reallocation of the component.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Implements IDC messages for controlling single components
running on slave cores. It will allow to create topologies,
where the whole pipeline is running on one core and some
processing component is running on other core due to
cycles limitation.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Implements new IDC functionality to report execution status
of last processed message through payload buffer. Core which
waits for IDC to be finished can retrieve the status from
the beginning of the payload. Message status can only be
obtained in IDC blocking mode.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Implements IDC message payload functionality. It is now possible
to send additional large data, when sending IDC to other core.
Maximum size of payload has been set to 96 bytes, but can be easily
extended if needed.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This is no real requirement from SOF to match the index of DAI
with the "real" index in hardware.
Anyhow, it looks like topology concatenates the index to form names
so would be weird to see e.g DAICONFIG.SAI0_data for SAI3.
In order to avoid this confusion we use index 3 for SAI3.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
FOR ssp channels parameter can be different for
PLAYBACK and CAPTURE and it depends on tx_slots and
rx_slots config variables. This commit utilizes those
variables in get_hw_params() function in order to
return hardware stream parameters correctly.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Hardware stream parameters can be different for
PLAYBACK and CAPTURE direction. dai_get_hw_params()
should return parameters corretly depending on
the stream direction.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Hardware stream parameters can be different for
PLAYBACK and CAPTURE direction. get_hw_params()
should return parameters correctly depending on
the stream direction.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Function dw_dma_increment_pointer is called in each
dw_dma_copy and moves write pointer by number of passed
bytes a priori. Its why this function shouldn't be called
after dma stops before whole transmission ends.
It leads to misalignment in data stored in any queue between
source buffer and output, with data written to this interface
and glitch when first data after release command come.
Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This patch guarantees detection notification message sending
by preallocating message structure and sending this particular
IPC instead of sending first message from the queue.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Extracts method for IPC message preparation.
More granular approach is needed for upcoming changes
regarding detector notification sending.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Extracts ipc method for sending chosen notification message.
Standard function takes first message from the queue,
but we would also like to send notification of our choice.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This patch adds load of ASRC component to successfully build
the Fuzzer. The common topology parser with testbench depends
on load_asrc() function.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
We should check whether we can support frame_fmt conversion
due to source and sink buffer frame_fmt's. If not, we should
overwrite sink (playback) and source (capture) with pcm
frame_fmt and not make any conversion (sink and source
frame_fmt will be equal).
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
eq_fir component is not able to change stream format, so we
should invoke comp_verify_function() with flag equal to 0.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
We do not have to rewrite source/sink frame_fmt. It has been
set in eq_fir_verify_params() function.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
We do not have to rewrite source/sink frame_fmt. It has been set
in eq_iir_verify_params() function.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Since the new sof pcm512x machine driver supports the DMIC backend
it's practical to move the ASRC capture pipelines into this topology
to avoid need to change into nocodec mode for ASRC capture tests.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch fixes the apply of DAI_PERIODS for playback sink
and capture source buffers. Also the comments for components
instantiating are fixed to order sink, source as they are
in the parameters to avoid confusion.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
dumm_dma_copy_crt_elem and dummy_dma_do_copies functions
may return negative values but their definition says the
return value is unsigned.
Fix function definition to account for negative values.
Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
src/audio/host.c: In function 'host_dma_cb':
src/audio/host.c:210:46: error: initialization of
'unsigned int' from 'const struct comp_driver *' makes integer from
pointer without a cast [-Werror=int-conversion]
comp_cl_dbg(&comp_host, "host_dma_cb() %p", &comp_host);
This happens because our tracing system is limited to integer types
for parameters.
Fixes: a87b908505 ("trace: component: use err,info,dbg macros")
Suggested-by: Paul Olaru <paul.olaru@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Back pointer must be initialized before any instance
level logging is performed by the new() operation since
the instance identification requires access to the uuid
that will be implemented on the component driver level.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>