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>
This patch fixes "ERROR: trailing whitespace" generated
by checkpatch.pl by removing trailing whitespace in the
file.
Signed-off-by: Mohana Datta Yelugoti <ymdatta.work@gmail.com>
This makes code easier to read and fixes checkpatch.pl
warning: "WARNING: Missing a blank line after
declarations".
Signed-off-by: Mohana Datta Yelugoti <ymdatta.work@gmail.com>
This makes code easier to read and fixes checkpatch.pl
warning: "WARNING: Missing a blank line after
declarations"
Signed-off-by: Mohana Datta Yelugoti <ymdatta.work@gmail.com>
This makes code easier to read and fixes checkpatch.pl
warning: "WARNING: Missing a blank line after declarations".
Signed-off-by: Mohana Datta Yelugoti <ymdatta.work@gmail.com>
Static inline getters provides better control of use
component properties as L- and R-values.
They also make changes to the common component data defs
easier and transparent for clients (no code changes, just
recompilation required).
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
To avoid side effects by operator precedence. It is even
recommended by checkpatch for dereferenced parameters but
not checked for referenced ones.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
It enables common ipc config size verification to be performed at
the higher common level.
This getter (and its other existing form) should be reimplemented
when a new component base data structure, that includes both comp
and config is introduced and used in all components since this
would enforce the data layout in component data structure definitions.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Initialization data coming from ipc message is always copied by specific
component implementations since the component implementation is the only
one who knows the total size to be copied (comp + common config + specific
config).
This second copy operation not only overrides same data but is also
incomplete because ignores component specific configuration part and
what is more important (as the former may be optional) also ignores
another common part of data sof_ipc_comp_config.
This is a good example that implicit assumption of data layout, not
enforced by data structure definitions may cause issues.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Probes will extract data for several probe points in one stream
with extra headers. This app will read the resulting file,
strip the headers and create wave files for each extracted buffer.
Usage to parse data and create wave files: ./sof-probes -p data.bin
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
Add additional recursive graph walk (in pipeline_comp_hw_params())
from DAI endpoint to other endpoints in order to set hardware DAI
parameters which were set during dai_set_config(). There is new
get_hw_params function in dai_driver ops in order to fetch hardware
dai parameters. Components could overwrite stream parameters due to
their processing capabilities.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Implements comp_verify_params() function, which can be used in order
to set and update some of sink (playback) or source (capture) buffer
parameters with pcm parameters. There is a possibility to specify
which of parameters won't be overwritten (e.g. SRC component should
not overwrite rate parameter, because it is able to change it).
Commit also adds macros to buffer.h, which can be used in order
to specify which parameter of source/sink buffer should not be
updated.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Add hw_params_configured flag to comp_buffer structure. It indicates
whether hardware stream parameters were set.
This commit also implements buffer_set_params(),
buffer_reset_params() and audio_stream_set_params(). They can
be utilized in order to simply setting buffer parameters.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
This patch implements generic component_set_period_frames() function.
It can be utilized in order to set "frames" parameter in
comp_dev structure.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Implement dai_get_hw_params() function for DAI
component in order to fetch hardware stream
parameters.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Add calling buffer pointer in func argument in pipeline_for_each_comp()
function. It can be used for easy identification of buffer preceding
current component and allows to perform specific operations on that
buffer.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Add dai_get_hw_params() function to component ops (mandatory
only for dai components) in order to fetch hardware dai stream
parameters.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Implements get_hw_params() function for specific DAI's (SSP, HDA,
ALH etc.) in order to fetch hardware stream parameters (set in
ipc_dai_config()). In case the specific DAI is able to support
different formats (e.g. HDA - it is configured via dma_set_config()
in dai_params()) params are set to 0 to indicate that they can vary.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
Add generic get_hw_params() function in order to fetch
hardware dai parameters set during ipc_dai_config()
incovation.
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
This patch updates the stream sample rate propagation to happen
via source or sink buffer. The params struct can no more be used
for that. Without this change the DAI component reports xrun and
the stream fails.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
New class and instance macro set for dai tracing defined.
Uses compact and well known suffixes: err,info,dbg.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
New macros use well known (also by checkpatch) trace
level names and map them to underlying trace_ implementation.
They can be used to define comp_err(), pipe_err(), etc.
derivatives with properly defined get_id_m(), get_subid_m().
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Depending on the header files include order some files
may not compile.
Note: trace header deps need a closer look and cleanup.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Increases default stack size of EDF tasks.
It looks like some of the IPCs can exceed 2048 bytes of stack
and cause random data corruption. For sure it has been observed
when executing DAI config for DMIC.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This reverts commit b90f4dd044.
The device id of rt715 and HDMI will be dynamic with this PR. This is
not friendly to UCM design. Let's deal with the id hole in machine
driver.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Pipeline PCM0P and PCM0C in sof-cml-rt5682-kwd.m4 is wrongly
configured. This patch fix this error by removing redundent
'SSP' argument.
Signed-off-by: Amery Song <chao.song@intel.com>
This patch adds spaces around arithmetic operator to make code
easier to read and silence checkpatch script.
Signed-off-by: Iulian Olaru <iulianolaru249@yahoo.com>
This adds new state KPB_STATE_INIT_DRAINING into
KPB internal states. This way we can see failed
init draining in logs. This new state is also
needed to change KPBs regular behavior in a
situation where we have initied draining task,
therefore calculated read position but the task
doesn't start before next pipeline_copy happens.
In this case, having this new state we can
recognize it and update read position
accordingly to new data.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>