Commit Graph

2893 Commits

Author SHA1 Message Date
Bartosz Kokoszko e6f2b1fb35 trace: add traces defines to kconfig.
Add TRACE, TRACEV, TRACEE, TRACEM to Kconfig.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2019-03-21 16:32:31 +00:00
Tomasz Lauda 7b7e15d678 dai: fix getting DW-DMA copy size for DMA_CB_TYPE_LLIST
Fixes DW-DMA copy size calculations for transfers,
which are not using auto reloadable linked lists.
They require manual linked list reload to update
current position, so it should happen before
call to DMA copy.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-03-21 15:52:35 +00:00
Tomasz Lauda 4aee58f6cb trace: fix DMA setting for traces
Fixes DMA setting for traces transferred using
DW-DMA. They are currently using IRQ mode.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-03-21 15:51:37 +00:00
Bartosz Kokoszko eed3822b18 sof: include: displacement of cavs-version header
I've renamed cavs-version.h header to version.h and
moved it to platform/intel/cavs/include/cavs dir.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2019-03-21 15:49:00 +00:00
Janusz Jankowski dbf43b290a cmake: add git hooks
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-03-21 15:43:25 +00:00
Pierre-Louis Bossart e54087caa4 topology: add support for HDMI only w/ 3 iDISP streams
This is useful for headless devices such as Up2 with no external
HDAudio codec but an HDMI/DP output.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2019-03-21 15:39:00 +00:00
Pierre-Louis Bossart 65fb817100 topology: rename HDA topology to name used by kernel
s/sof-hda-intel-common/sof-hda-generic

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2019-03-21 15:39:00 +00:00
Pierre-Louis Bossart d520821b1b uapi: tokens: align with kernel definitions
The switch ID and tone sample rate are defined in kernel files, reflect the
definitions for the firmware

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2019-03-21 15:35:38 +00:00
Seppo Ingalsuo c838ad082d Volume: Improve PCM format handling in params and prepare
This patch removes from params function the setting of component's
own stored frame_fmt since the variable cd->sink_format was not set.

In prepare function the frame_fmt is stored based on stream
direction. In playback it's set from source and in capture from sink.
This way the format matches the host component side of stream.

These changes help other components in the pipeline to operate with
correct PCM format.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-03-21 15:31:13 +00:00
Rander Wang cd4633c53e hda: refine trace log
Add missed dma id and channel number

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2019-03-20 15:49:35 +00:00
Janusz Jankowski f9494d9ce5 cmocka: add stdint.h includes
As written in cmocka documentation,
these headers have to be included before cmocka.h:

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-03-20 11:37:04 +00:00
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