Use the same m4 file to generate the topology for all bdw
boards based on the CODEC name defined during compilation.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
BYT with RT5645, RT5640, RT5651 and DA7213 all have similar
topologies with the only difference in codec name. Merge
them all into a single m4 file and set the codec name
using the macro defined during compilation.
This will also take care of adding the virtual widgets
for all the BYT topologies for compatibility with the
machine drivers.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Merge the 2 m4 files and use the PLATFORM defined during
compilation to generate the appropriate topology.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Use the same m4 files to generate both 2ch and 4ch topologies
by defining channels during compilation.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
The only difference between them is the SSP index and name.
Use a macro during compilation to indicate which platform
we're building for and set these appropriately.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Open brace '{' following function declaration get_mem_zone_type
goes on the next line.
Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
"Formate" and "format" are two different words, in this case it's
"format" that is meant.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Use a "for" loop instead of simulating it, using a "while" loop. Also
avoid needlessly setting a variable inside that loop, where it can
just be set once after the loop termination.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
As long as the low bits of two numbers are 0, there's no need to
right shift those numbers to compare them.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Rearrange a conditional to reduce the number of branches and
eliminate a goto.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Some editors (e.g. emacs) do not take into account preprocessor
conditionals when performing syntax highlighting. I.e. patterns like
if (a) {
if (b) {
do_things();
}
cause those editors to miscalculate the number of opening and closing
braces and thus break code highlighting. Move the opening brace to
after the preprocessor conditional to avoid that.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Function-type macros are usually called as "M(...);" with a semicolon
in the end. Therefore defining such macros with a semicolon isn't a
good practice. This breaks constructs like
if (...)
M(...);
else
...;
Fix the dma_set_drvdata() macro to avoid such problems.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Using macro arguments multiple times within the macro definition body
can lead to repeated expressioon evaluation. To avoid that replace
MIN() and MAX() macros with safer versions.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
All trace_event() style macros resolve to _log_message() or
__log_message() eventually. This message makes those macros usable
as a function, e.g. within "if () else" clauses with or without
curly braces.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
When returning an error, it's usually better to propagate the error
code, that caused the termination, than overriding it.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The SMP version of init.c calls panic(), therefore it needs panic.h,
OTOH the UP version doesn't call panic(), so the header isn't needed
there.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Interrupt registration can fail, check its return code in idc.c
and propagate error to the caller.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Removes the check for host buffer period size alignment
for Host DMA Gateways. It isn't required for this type
of DMA.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Adds new functionality to DW-DMA driver to enable/disable
interrupts based on the pipeline scheduling mode. If
we are scheduling on timer there is no need to touch
any irq related registers.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This commit fixes a problem with memory allocation of big
areas of memory dedicated i.e for buffers. The calculation of
remainnig blocks of memory was incorect and disallowed usage
of available blocks.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
The SOF_TONE_ABI_VERSION macro is no more used. This change is
also needed to match with kernel side header.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This change allows host to keep real time
sink at any position - not forced to be the
very first sink. Pointer to the sink itself
has been added to component private data
therefore .copy takes slightly less resources.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
No more need to update global component.h and audio.c component init list
New macro DECLARE_COMPONENT
The component can "register itself" in the appropriate linker section
Example of usage:
DECLARE_COMPONENT(sys_comp_*_init);
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
Add pipeline with keyword detect and channel selector comps.
This should be connected to a capture pipeline such as
pipe-kfbm-capture.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Add support for constructing and adding keyword detect
component in topology
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Add support for generic capture pipeline with a KPBM between PCM and
other pipelines. This can be used for Keyword detection use case.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>