Commit Graph

2632 Commits

Author SHA1 Message Date
Janusz Jankowski 0cc895d609 cmake: cmocka: add toolchain file for xt
It's needed to make cmocka build correctly
for generic instead of unix system

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-03-20 11:37:04 +00:00
Janusz Jankowski 6f88295017 cmake: fix memory mock lds for windows
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-03-20 11:37:04 +00:00
Janusz Jankowski c47f3dbc03 cmake: fix unit tests for ninja
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-03-20 11:37:04 +00:00
Sathya Prakash M R b70e9151cb topology: Add CML topology support for rt5682+max98357a variant
Add max98357a speaker on top of sof-rt5682 CML Audio topology

Signed-off-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
2019-03-20 11:19:31 +00:00
Tomasz Lauda 6e88bdf174 mixer: add support for mixing 16 bit streams
Adds support for mixing 16 bit streams.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-03-19 15:10:22 +00:00
Ranjani Sridharan d0bc31425a scripts: add option to modify defconfig
Add an option to modify the defconfig during fw build using the
script. Without this, modifying the default config and building
the FW is a 2 step process.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-03-19 15:07:31 +00:00
Bartosz Kokoszko 648345065a scheduler: add new generic scheduler api
This commit:
1. Renames specific schedulers:
	- schedule (.c/.h) -> edf_schedule (.c/.h)
	- work (.c/.h) -> ll_schedule (.c/.h)
2. Implements new generic scheduler api based on generic
   struct with scheduler ops. Every specific
   scheduler exports struct with pointers to its
   specific functions.
3. Makes edf and ll using generic api (exports structure
   with pointers to its own specific functions)
4. Updates host and pipeline tests due to scheduler
   changes.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2019-03-19 14:37:15 +00:00
Keyon Jie 54870fbb99 selector: fix priv data passed wrong issue
We should get config data of selector component from priv data of
process component, here correct it.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-03-19 10:57:08 +00:00
Tomasz Lauda 181658671f dai: dw-dma: adjust flow to more scheduler flexible
Adjusts dai and dw-dma configuration flows to be more
scheduler flexible and not only working for DMA IRQ
based schedulers. Note: due to the nature of timer
scheduling we need to have restriction for dw-dma
to support minimum 3 linked list items. Without
such restriction we may not be able to clear done
bits on time.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-03-18 16:46:46 +00:00
Tomasz Lauda 8ed568eadc pipeline: adjust flow to more scheduler flexible
Adjusts pipeline flow to be more scheduler flexible
and not only valid for DMA IRQ based schedulers.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-03-18 16:46:46 +00:00
Tomasz Lauda 4b821013a1 hda-dma: utilize generic scheduling support for Link DMA
Changes implementation of HDA Link DMA to fully utilize
generic scheduling support. HDA Link DMA cannot work
with IRQ scheduling, so timer scheduling was hidden
inside of the hda-dma driver. Now it fully utilizes
timer scheduling support by default.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-03-18 16:45:44 +00:00
Adrian Bonislawski 59f5fb7e5f Trace: change trace_event to the correct one for tracev_event_atomic_with_ids
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-03-18 16:43:50 +00:00
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