Remove the unused pointer to host parameters in params(). This was only
useful to the host component. Provide some component frame configuration
variables to give more flaxability than host params.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Use a generic structure containing common DAI settings for configuration.
This structure also contains a tail of DAI specific data that can also
be used by DAI drivers.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
The wrong name is used for naming and may collide with the capture stream
on the same DAI.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Give the ALSA HW refinement code more headroom for buffer calculations
to provide more buffering options.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Improve IPC error reporting and values to host by tracing all failures
and making sure errors are returned when detected.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Allow pipeline host and DAI components to be timestamped in a platform
specific manner so that host DMA & DAI DMA position alongside any local
DSP timestamp can be returned to the host drivers.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Components will now each have a 64bit position counter that will indicate
the processing position in bytes for each component. This can be used
by time stamping, trace and debug.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
If values using in SOF_GLB_TYPE are > 0x08 then the highest bit is set. If this
bit is set then when the data is shifted back (for example in iGS in intel-ipc)
it will shift arithmetically and leave the sign bit which will cause comparisons
to fail. Ex:
#define FOO 0x08
#define BAR 0x08U
#define LSHIFT(x) (x << 28)
#define RSHIFT(x) (x >> 28)
int main() {
printf("%x, %x\n", RSHIFT(LSHIFT(FOO)), RSHIFT(LSHIFT(BAR)));
// fffffff8, 8
}
Singed-off-by: Curtis Malainey <cujomalainey@google.com>
Host DMA needs it's own timeout as its not bound to any synchronous data
transfer timings.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
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>
Add support to build topology text files into binary files understood
by the drivers. This is a two stage build, the first stage is to
pre-process the files with M4 into regular alsa-conf format and the second
stage is to compile with the alsa topology compiler.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Add some initial machine specific topology configurations that define
some simple pipelines for certain machines.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Add initial configuration for DSP specific data. This data still requires
further tuning.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Add pipeline and token definitions to allow creation of SOF topology
files. The files define standard pipelines and tokens that can be reused
to build machine specific topology files.
Signed-off-by: Liam Girdwood <liam.r.girdwood@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>