Commit Graph

2620 Commits

Author SHA1 Message Date
Adrian Bonislawski 078ead9c65 Trace: send trace errors as normal logs to dma trace buffer if TRACEE disabled
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-03-18 16:43:50 +00:00
Janusz Jankowski eb8be5be38 cmake: copy ldc to build root
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-03-15 15:51:55 +00:00
Ranjani Sridharan 0ead3bda19 topology: merge bdw codec topologies into single m4
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>
2019-03-15 11:51:18 +00:00
Ranjani Sridharan 08c0db49f1 topology: merge all byt codec topologies into one m4 file
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>
2019-03-15 11:51:18 +00:00
Ranjani Sridharan cd2168cf2b topology: pipe-pcm-media fix various typos/errors in comments
fix some typos and copy errors in pipe-pcm-media m4 file.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-03-15 11:51:18 +00:00
Ranjani Sridharan 958ed657c1 topology: merge sof-byt-nocodec and sof-cht-nocodec m4 files
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>
2019-03-15 11:51:18 +00:00
Ranjani Sridharan e5e5dcc806 topology: merge sof-apl-dmic-2ch and sof-apl-dmic-4ch m4 files
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>
2019-03-15 11:51:18 +00:00
Ranjani Sridharan 17f85baa70 topology: merge sof-cml-rt5682 and sof-whl-rt5682 m4 files
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>
2019-03-15 11:51:18 +00:00
Diana Ungureanu f5af31f8ef rimage: manifest: Remove braces for single statement blocks
Braces are unnecessary for single statement blocks.

Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-03-14 10:29:17 +00:00
Diana Ungureanu bdf5346cc6 rimage: Align block comments on each line
Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-03-14 10:29:17 +00:00
Diana Ungureanu d32f1f7794 rimage: file_simple: Remove unnecessary spaces after cast
Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-03-14 10:29:17 +00:00
Diana Ungureanu 1db2173489 rimage: file_simple: Move open brace to next line
Open brace '{' following function declaration get_mem_zone_type
goes on the next line.

Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-03-14 10:29:17 +00:00
Diana Ungureanu 1951548a78 rimage: Remove multiple blank lines
Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-03-14 10:29:17 +00:00
Diana Ungureanu 806af330d0 rimage: elf: Break down multiple assignment
Multiple assignment should be avoided.

Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-03-14 10:29:17 +00:00
Diana Ungureanu 894c332997 rimage: Split lines over 80 characters
Change long lines so they don't exceed 80 characters.

Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-03-14 10:29:17 +00:00
Diana Ungureanu a90cee2378 rimage: Remove blank lines before/after braces
Blank lines aren't necessary after/before open or closed
braces.

Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-03-14 10:29:17 +00:00
Diana Ungureanu 5032a493e9 rimage: Remove explicit comparisons to NULL in the rimage/*.c files
Comparisons to NULL are now implicit as the checkpatch.pl requires.

Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-03-14 10:29:17 +00:00
Diana Ungureanu a953d95878 rimage: Fix code alignment and indentation issues
This was reported by checkpatch.pl and makes code
easier to read.

Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-03-14 10:29:17 +00:00
Guennadi Liakhovetski 01f1a4aeae tools: fix a typo
"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>
2019-03-14 10:13:22 +00:00
Guennadi Liakhovetski 30a65051d5 dmic: improve readability
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>
2019-03-14 10:13:22 +00:00
Guennadi Liakhovetski c894d68f67 ipc: simplify multiple comparisons
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>
2019-03-14 10:13:22 +00:00
Guennadi Liakhovetski 96b3b06640 ipc: (cosmetic) simplify a conditional statement
Rearrange a conditional to reduce the number of branches and
eliminate a goto.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-03-14 10:13:22 +00:00
Guennadi Liakhovetski e450244835 ipc: (cosmetic) stop confusing editors
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>
2019-03-14 10:13:22 +00:00
Guennadi Liakhovetski 1a8a35be05 dma: fix a macro
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>
2019-03-14 10:13:22 +00:00
Guennadi Liakhovetski 1f79acd74c math: replace MIN() and MAX() macros with safer versions
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>
2019-03-14 10:13:22 +00:00
Guennadi Liakhovetski a06d4b1c2c trace: make _log_message() derived macros usable as functions
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>
2019-03-14 10:13:22 +00:00
Guennadi Liakhovetski 6bccd675bf cavs: propagate error codes instead of overriding them
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>
2019-03-14 10:13:22 +00:00
Guennadi Liakhovetski dd06b5c731 init: (cosmetic) add panic.h where needed and remove where not
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>
2019-03-14 10:13:22 +00:00
Guennadi Liakhovetski 7714e64728 idc: check an interrupt registration return code
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>
2019-03-14 10:13:22 +00:00
Guennadi Liakhovetski 0d4bfb386f idc: add a missing preamble
Add a missing preamble in a recently created idc.c

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-03-14 10:13:22 +00:00
Jakub Dabek 935d13b891 memory: prework for memcpy calls change
Prepared host build and whole solution to use new memcpy_s
Fixed string.h dependencies

Signed-off-by: Jakub Dabek <jakub.dabek@linux.intel.com>
2019-03-14 10:05:47 +00:00
Tomasz Lauda 57b6c22e57 host: remove need of host buffer alignment
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>
2019-03-13 16:57:52 +00:00
Tomasz Lauda 2242616755 dw-dma: enable interrupts based on the scheduling mode
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>
2019-03-13 16:49:35 +00:00
Tomasz Lauda 558dceeb90 pipeline: add check for pipeline scheduling mode
Adds simple method to check if pipeline is scheduled
with timer or not.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-03-13 16:49:35 +00:00
Tomasz Lauda 2289da9e28 buffer: prevent buffer operation for 0 bytes
Prevents buffer consume and produce operations
if there are no bytes available.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-03-12 11:36:50 +00:00
Marcin Rajwa f61fcc1243 memory: fix extensive, continuous memory blocks allocation
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>
2019-03-12 10:44:50 +00:00
Pan Xiuli 2dbe69e294 scripts: clean up the build dir for tools
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-03-11 20:49:40 +00:00
Seppo Ingalsuo 28bb1bdd20 Tone: Remove not used version macro from ABI header
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>
2019-03-11 17:50:16 +00:00
Tomasz Lauda f3925ff1c0 dai: add support for variable data copy
Adds support to dai component for variable
data size copy.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-03-11 17:34:17 +00:00
Tomasz Lauda dad48e1f10 host: add support for variable data copy
Adds support to host component for variable
data size copy.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-03-11 17:34:17 +00:00
Lech Betlej 12236ee4ea comp: selector: add support for binary configuration data
Channel selector component supports configuration get/set using
COMP_CMD_GET_DATA & COMP_CMD_SET_DATA commands
of SOF_CTRL_CMD_BINARY type

Signed-off-by: Lech Betlej <lech.betlej@linux.intel.com>
2019-03-11 18:25:11 +01:00
Lech Betlej 18673780c3 test: selector: add support for binary configuration data
Channel selector component supports configuration get/set using
COMP_CMD_GET_DATA & COMP_CMD_SET_DATA commands
of SOF_CTRL_CMD_BINARY type

Signed-off-by: Lech Betlej <lech.betlej@linux.intel.com>
2019-03-11 18:25:11 +01:00
Marcin Rajwa c833f572d0 KPB: search for real time sink
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>
2019-03-11 18:23:39 +01:00
Adrian Bonislawski c06a65a8d0 Memory: self registering ability for audio components
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>
2019-03-11 15:43:01 +00:00
Liam Girdwood e31ef3b96a topology: keyword: Add keyword detection topology for APL
Add initial pipeline for keyword detection on APL platform.

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>
2019-03-11 15:41:06 +00:00
Jaska Uimonen 500d64fe5d topology: keyword: selector: add bytes control
Add bytes control for selector to send binary
data to it.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-03-11 15:41:06 +00:00
Ranjani Sridharan b0c900b9a7 topology: Add keyword detect pipeline
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>
2019-03-11 15:41:06 +00:00
Keyon Jie 5711211e0d topology: add support for channel selector component in topology
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-03-11 15:41:06 +00:00
Ranjani Sridharan 082122556a topology: add support for keyword detect component in topology
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>
2019-03-11 15:41:06 +00:00
Ranjani Sridharan 1da08478c0 topology: Add kpbm capture pipeline
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>
2019-03-11 15:41:06 +00:00