Move all the static scheduling params out of the platform headers and into
the static pipeline source as they are no longer used by dynamic pipeline
code.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
The completion condition may complete very close to the timeout. This will
result in an error being returned alongside completion. make sure we dont
return an error in this case.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This is a large tightly coupled patch that adds support for pipeline
definition and scheduling configuration via host IPC.
The intention is that hosts can create and configure pipelines dynamically
at runtime based on use case. This involves defining a pipeline topologies
and scheduling configuration. It also includes configuration of
individual components within a pipeline.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Minor debugging issue, when verbose trace is turned on it will not compile
because these variables are incorrect.
Signed-off-by: Curtis Malainey <cujomalainey@google.com>
We should copy from [inbox_base + offset(0 here)] src to
msg->rx_data dst here, otherwise, copying to 0 dst will
crash the firmware here.
Reported-by: Luo Xionghu <xionghu.luo@intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
This change fixes the warnings and errors returned by checkpatch.pl in
source code files eq_fir.c, eq_iir.c, fir.h, and tone.c.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
SRC sets the sink and downstream pipeline PCM rate, period_count and
period_bytes in src_params() according to received out_rate via IPC.
Fail in delay lines allocation results to -ENOMEM error.
Function call comp_set_sink_params() is renamed to
comp_buffer_sink_params().
Added void to functions and corresponding headers without parameters.
Plus white space and long lines fixes for all SRC source files.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Types SOF_COMP_FILEREAD and SOF_COMP_FILEWRITE are used used in host
test bench for test vector file I/O. These components are not used in
DSP firmware.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The buffer->alloc_size was not set. It needs to be equal to
buffer->end_addr minus buffer->addr for circular buffers.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Initialize EQ for max number of channels in configuration or switch
commands to avoid not set number of channels. A return value of -ENOMEM is
propagated in init functions and returned if allocation for memory fails.
Some trace output is added into EQ setup and some comments cleaned and
added.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
A free of null pointer is fixed with this change. Also the possibility of
nondefined number of channels in EQ config or switch command is eliminated by
by initializing the FIR for max channels. An error of -ENOMEM is propagated
in functions and returned if allocation in config or switch response fails.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The default tone frequency of 997 Hz was updated to a proper Q16.16 value.
Macros for tone frequency and gain were added to tone.h and a generic
float to fractional value conversion macro to format.h. Also some common
Q1.31 decibel constants were added. Tone function pointer set was moved to
tone_new() since it is not modified later in this component.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
prepare() is not being performed on the selected component. Fix this so
that all components including the selected are prepared in a pipeine.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
The signal generator is an endpoint component so this needs to be set for
the pipeline to function.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This can save almost 4k of memory by allowing some tuning of the
compressed page table that is sent by the host.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
The s1.x_rptr, s1.y_wptr, and s2.y_wptr might be used as uninitialized.
Also remove some obsolete code lines.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The cd->config could be passed as null pointer to eq_iir_setup() if the
previous malloc() would fail.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The cd->config could be passed as null pointer to eq_fir_setup() if the
previous malloc() would fail.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The devices sizes can be variable depending on any IPC init data that is
stored. Make sure we allocate the correct size.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This change provides an IIR equalizer component. The
IIR equalizer can be used for any transducer or effects equalizer needs but
it is especially recommended for speaker response equalization and other
applications without dependence to matched phase response or best possible
THD+N performance where FIR may be a better choise. IIR equalization is
capable to strong response enhancement without need for large DSP resources
consumption. The tool to create the EQ setup blobs is included in the
rimage tools.
This change provides a finite impulse response (FIR)
equalizer component. The FIR equalizer can be used for any transducer or
effects equalizer needs but it is especially recommended for microphone
arrays equalization. The tool to create EQ setup blobs is included in the
rimage tools.
This change provides a tone generator component. The
purpose is to provide a high quality FW internal test signal generator for
objective audio quality measurements for component or system tests. It can
also be used as simple beep indication tones generator for users.
This change provides a sample rate converter (SRC).
The SRC is polyphase FIR type. All the conversions coefficients tables are
automatically generated by a separate Octave scripts set in the rimage
tools set. The supported in/out rates and the performance can be customized
for a different quality/resources trade-off.
Add an API to allow drivers to writeback or invalidate cache contents.
This is useful where the DSP firmware runs from cache and needs to
writeback/buffer prior to DMA or other peripheral usage.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Currently pipelines have to be statically defined in the firmware source
code. This patch provides a mechanism whereby they can be created and
destroyed via IPC messages from the host.
Part 2 to follow.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Add an Earliest Deadline First scheduler to perform scheduling of audio
pipeline tasks based on task deadlines. i.e. the task with the earliest
deadline will be scheduled so that it will complete and preempt other
lower priority tasks before the deadline.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Provide a method for tasks to be performed on a priority basis using the
interrupts levels to preempt lower priority tasks.
The scheduler will use the to schedule work at different priorities.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>