Improves traces for comp_update_buffer_produce
and comp_update_buffer_consume functions. Now
we will be able to easy identify failing components.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Changes behavior for DMA_COPY_PRELOAD flag.
DW-DMA should just start transfer the same way
as for DMA_COPY_ONE_SHOT. It fixes playback
for platforms using DW-DMA for host transfers.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Changes DW-DMA release handling for configurations
not using hardware linked list support. We should
not make any additional copies in such case.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Add struct model_data to manage model related stuff.
For set_model, re-allocate buffer at the 1st IPC, calculate crc after the
last IPC is handled.
For get_model, output the crc value at the 1st IPC.
Todo: add crc32 value to the struct sof_ipc_ctrl_data may be the next
step, it will require ABI change.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
We are aligned to use separate IPC for set_config and set_model, so
don't allocate model buffer at set_config stage, but do that in the
first IPC for model blob config IPC sequences.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Changes pipeline's preload conditions to take into
consideration the situation, where we don't always
want to do playback preload, because the sink part
of pipeline is already running e.g. mixer topology.
However the host component still needs to perform
preload on its own, so for now we make the decision
based on stream's direction.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Sets host copy mode to one shot for platforms
with CONFIG_HOST_PTABLE set. Note: this setting
shouldn't be dependent on CONFIG_HOST_PTABLE,
but rather should be set in platform specific code.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Ignores host_trigger(), when host component is
configured in one shot copy mode. In such mode
the DMA is started every time in copy and stopped
automatically.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Changes component's copy attribute from bool to
enum, which makes it extendable. Now we can add
additional copy types and implement each component's
functionality based on selected type.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
I've removed PLAFORM_HDA_BURST_SIZE define since it is the
same as HDA_DMA_COPY_ALIGNMENT. In trace functions we
can retrieve alignment by using dma_get_attribute()
dma function.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
HDA_DMA_ALIGNMENT and HDA_COPY_ALIGNMENT are not platform
specific. I've moved them from specific platform.h files to
hda-dma.c.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Amount of bytes we copied by host component should be
align to minimal possible chunk of data that can be
copied by hda-dma. In other case there is possibility of
occurrence mismatch between amount data we really copied
and buffer read and write pointers.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Add DMA_ATTR_COPY_ALIGNMENT attribute in order to
retrieve the smallest possible chunk of data that can
be copied by dma.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
We do not have to use bytes to count copy_bytes since
copy_bytes variable is calculated based on hda-dma and
host buffer pointers. Bytes variable is not useful here
- we should copy as much data as available in the host
buffer. Bytes variable gives additional unnecessary
limitation.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Adds support for one shot copy to DW-DMA.
One shot means that transfer isn't circular,
so every copy is basically just restart of
DMA engine.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Removes period_bytes field from host_data struct.
This field is only used in host_params, so we
don't need it globally.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Changes host_buffer component ops to be a subtype of
component set_attribute ops. This change allows to
unify host implementation across different types
of DMA.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Checks if dma_sg_elem_array buffer is allocated
before performing cache writeback or invalidation.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Extracts schedule related implementations to the separate
directory to make it easier to locate and implement new
schedulers in the future.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Firstly, it is better to rely on the compiler to decide which
functions to inline, except in some special cases. Secondly,
functions called by reference, cannot be inlined. This patch removes
"inline" from functions used as .set_config() methods.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Commit f5e78430ff ("cavs: ssp: generic ssp mclk configuration for
cavs" made Sue Creek unstable, IPC communication with it would often
fail. The reason for this is, that the Sue Creek uses the SSP clock
as its platform clock. This patch restores the original values.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Thats because this function is used also to find optional sections so it will be decided later (outside of this func) if this is actually error
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
Thats because this section is optional in FW, it will be created only with TRACE enabled
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
It is derived from sof-cml-rt5682.m4, keyword detect pipelines added to
it for Keyphrase Detection feature support.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Due to small number of memory banks in APL it will be not possible to power down some of them
so there is no point in align to memory banks, this would significantly limit free memory for buffers
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
For detector component, the size of configure blob can be up to 300KB,
here enlarge the max to meet this requirement.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
memcpy_s has wrong check condition for
overlapping sections. The copy from adjacent memory
bloks will result in dsp panic while it should be
allowed. This patch fixes the issue for cmocka
tests.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
arch_memcpy_s has wrong check condition for
overlapping sections. The copy from adjacent memory
bloks will result in dsp panic while it should be
allowed. This patch fixes the issue for xtensa
architecture.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
arch_memcpy_s has wrong check condition for
overlapping sections. The copy from adjacent memory
bloks will result in dsp panic while it should be
allowed. This patch fixes the issue for host
architecture.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>