Commit Graph

4727 Commits

Author SHA1 Message Date
Payal Kshirsagar 8ce242b40b src: drivers: intel: baytrail: remove unnecessary parentheses
Remove unnecessary parentheses around the right hand side of an
assignment.

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
2020-03-26 09:55:48 +00:00
Payal Kshirsagar 6dd5e22f32 src: platform: intel: cavs: lib: remove unnecessary parentheses
Remove unnecessary parentheses around the right hand side of an
assignment.

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
2020-03-26 09:55:48 +00:00
Karol Trzcinski 7bf879b226 tools: logger: Add clock parameter in help message
help message should explicity show that -c flags needs parameter.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-03-26 10:18:30 +01:00
Karol Trzcinski fc84534247 tools: logger: Add LDC dump option
Create dump options for logger to print important information from
LDC file, like DBG_ABI version and UUID with corresponding names.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-03-26 10:18:30 +01:00
Karol Trzcinski ee692abd97 tools: logger: Refactor format_uid()
Split this function to part responsible for pointer calculation
and string formatting. It make possibility to use same
string format with different pointer arithmetic.
Moreover introduce aprintf to make memory allocation for output
string more automated process.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-03-26 10:18:30 +01:00
Karol Trzcinski e087ed7aa4 tools: logger: Align logs header to content
Double space in formatting string led to little mismatch between header
and content in output logger file.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-03-26 10:18:30 +01:00
Bard Liao ae53aebcff topology: sof-icl-rt711-rt1308-rt715-hdmi: define NO_AGGREGATION mode
We will create individual PCM for each speaker when NO_AGGREGATION
is defined

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2020-03-25 13:10:48 -05:00
Bard Liao 2c00080987 Topology: sof-icl-rt711-rt1308-rt715-hdmi: Use demux for platforms with multiple speakers
We only need demux for two speaker dais case.

Fixes: 5e8de9fd52 "topology: sof-icl-rt711-rt1308-rt715-hdmi: Merge
two pipeline with demux"

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2020-03-25 13:10:48 -05:00
Karol Trzcinski 4e87899f25 cmake: Do not duplicate subdirectory adding for library build
Cmake files should have consistent directory linkage scheme
where lines duplication should be avoided.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-03-25 16:38:35 +01:00
Karol Trzcinski 6713d90c21 dw_dma: Split DMA pause and stop command
Data after pause command should be kept compatible to omit
pop noise on output. The solution may be waiting for FIFO
empty but it takes to long - up to 1 processing period time.
Another - introduced - solution is to stop draining new data
from buffer after pause, but keeping dma connection with dai
up to release command. In this place waiting for FIFO empty
shouldn't take so much time, so system agent won't panic and
data will be consistent.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-03-25 16:13:37 +01:00
Karol Trzcinski ed3919a1b1 dw_dma: Align argument list
Keep code style consistent.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-03-25 16:13:37 +01:00
Payal Kshirsagar 7a646c9dbd testbench: remove unneeded variable
Remove unneeded temporary local variable, its declaration and newlines.

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
2020-03-25 15:22:09 +01:00
Tomasz Lauda 9e1affa19b byt: bdw: imx8: disable agent by default
Disables system agent for BYT/CHT, HSW/BDW and IMX8 platforms.
System agent is supposed to track drift between timer ticks,
but it's only valid for the platforms with timer based scheduling.
Platforms with DMA based scheduling have asynchronous interrupts,
which can potentially starve the agent and cause system panic.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-03-25 15:09:35 +01:00
Seppo Ingalsuo 586c6c58dc DMIC: Fix minor mistake in FIR scale value computation
The equation for fir_in_max value was missing term -1 and returned
too high value that resulted in FIR scale coefficient calculation an
overall gain of 0.000004 dB while it should be exactly 0 dB. The HW
decimator contains saturation in output so it have not caused
overflows of PCM capture stream.

The new macro INT_MAX() returns the correct max PCM code value for
the used FIR input word length and looks better readable than
original code.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-03-25 15:05:33 +01:00
Seppo Ingalsuo 8d9d3ce664 Math: Get max and min signed integer values for given word length
This patch adds to header file sof/math/numbers.h two macros
INT_MAX(N) and INT_MIN(N). E.g. for 16 bits the returned values
are 32767 and -32768. The macro works up to N = 64.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-03-25 15:05:33 +01:00
Marcin Maka 0cf6d769a1 apollolake: turn on perf counters
Performance traces turned on for Apollolake.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-25 15:02:37 +01:00
Marcin Maka 24586ee69c perf: add cpu ticks counting for comp_copy
Cpu ticks are counted for each invocation
of comp_copy and peak values are traced.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-25 15:02:37 +01:00
Marcin Maka 1758279623 perf: make trace part of perf counting configurable
Clients may provide they own trace macro to be run
when new cpu peak value is detected.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-25 15:02:37 +01:00
Marcin Maka 8d350a3eff test: move timer mocks to the common part
Previously used by kpb tests only and defined locally.
New pieces of the code, like perf macros need them
globally.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-25 15:02:37 +01:00
Pan Xiuli 2978741118 topology: fix apl-demux-pcm512x HDMI dai id
The HDMI DAI id changed, update the demux topology.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2020-03-25 14:55:49 +01:00
Marc Herbert c84706e3f8 check patch: "top_of_sof_tree()" so it works out of the box
Adjust top_of_kernel_tree() function to SOF so invoking
./scripts/checkpatch.pl works out of the box and doesn't require
figuring what's going on and the existence of the --no-tree option which
sof-ci invokes "behind the scenes".

This instead of failing with:

  Must be run from the top-level dir. of a kernel tree

Compared to --no-tree, this is also enables a couple extra checks like:
WARNING: use relative pathname instead of absolute in changelog text

PS: the space between check and patch is here to... defeat checkpatch
itself. It apparently doesn't expect any change to itself.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-03-25 14:46:03 +01:00
Shreeya Patel 0a1c8b65af alloc: Match alignment with open parenthesis
Match alignment with open parenthesis to
maintain the coding style.

Reported by checkpatch.pl

Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
2020-03-25 14:16:56 +01:00
Guennadi Liakhovetski 0f93ec1aef hda-dma: fix a failure to restore interrupt flags
In hda_dma_data_size() if an XRUN leads to an early return,
interrupt flags have to be restored.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-03-25 13:12:14 +00:00
Guennadi Liakhovetski 4da849e99b IPC: (cosmetic) remove a superfluous variable
The ret variable in ipc_comp_new() is never changed from its
initialisation value of 0, remove it.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-03-25 13:12:14 +00:00
Guennadi Liakhovetski 0e309fdc16 IPC: don't send uninitialised memory to the host
Currently multiple functions send struct sof_ipc_comp_reply to the
host over IPC without initialising its .id field. To avoid this and
similar problems in the future initialise reply objects in their
definition statements.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-03-25 13:12:14 +00:00
Guennadi Liakhovetski 3de2368f4b DAI: remove a bogus `inline` qualifier
dai_comp_get_hw_params() cannot be an inline function because a
pointer to it is used for a .dai_get_hw_params assignment.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-03-25 13:12:14 +00:00
Guennadi Liakhovetski 4722cf9314 topology: remove an unused parameter from dai.m4
The N_DAI_OUT and N_DAI_IN pacros, defined in dai.m4, don't take
parameters, fix their usage.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-03-25 13:12:14 +00:00
Guennadi Liakhovetski 3bccc18036 topology: fix a copy-paste error in comments
Replace multiple occurrences of a copy-paste error in comments in
bytecontrol.m4: CONTROLMIXER should actually be CONTROLBYTES.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-03-25 13:12:14 +00:00
Bard Liao 40454099b0 topology: pipe-volume-demux-playback: Move demux after volume
So the volume control will apply to both pipelines.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2020-03-25 13:00:12 +00:00
Karol Trzcinski b5bb895e57 tools: logger: Add 'error: ' prefix to messages in log_err function
After change error messages will be more consistent and easy to grep.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-03-25 13:59:45 +01:00
Karol Trzcinski 354ff5ccf9 tools: logger: Skip double error logs to stdout
When out_fd points standard output then error message shouldn't be
duplicated - duplicated messages only make logger output more messy.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-03-25 13:59:45 +01:00
Payal Kshirsagar 11b9ca19cb DMIC: remove parentheses around the right hand side of assignments
Avoid useless parentheses to the right hand side of an assignment.
Change suggested by coccinelle.

Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com>
2020-03-25 13:39:23 +01:00
Libin Yang f755277000 topology: sof-icl-rt711-rt1308-rt715 add MIC MUTE LED support
Add support of MIC Mute LED for capture on
sof-icl-rt711-rt1308-rt715 platform.

Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
2020-03-25 12:24:25 +00:00
Libin Yang 74e626a7be topology: add pipe-highpass-switch-capture pipeline
This patch adds the highpass capture pipeline which enables the volume
and switch controls. In the switch control, it enables capture LED
controlling.

Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
2020-03-25 12:24:25 +00:00
Libin Yang 870448d374 topology: add pipe-volume-switch-capture pipeline
This patch adds the capture pipeline which enables the volume and switch
controls. In the switch control, it enables capture LED controlling.

Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
2020-03-25 12:24:25 +00:00
Marcin Maka 6c583337aa dummy-dma: use setter macro to assign priv data to channel
Dummy DMA should follow other drivers and use getters
and setters where available to avoid code changes when
dma channel internals are changed.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-25 11:04:15 +01:00
Marcin Maka 593b20c552 ll-schedule: rename private field to priv_data
Another cpp keyword that confuses documentation generation
process.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-25 11:04:15 +01:00
Marcin Maka 75b60efb93 task: rename private field to priv_data
Another cpp keyword that confuses documentation generation
process.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-25 11:04:15 +01:00
Marcin Maka ee1ed71f58 dma: rename private field to priv_data
Another cpp keyword that confuses documentation generation
process.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-25 11:04:15 +01:00
Marcin Maka 8ebf27c673 dai: rename private field to priv_data
Another cpp keyword that confuses documentation generation
process.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-25 11:04:15 +01:00
Marcin Maka 415906e822 comp: rename private field to priv_data
Another cpp keyword that confuses documentation generation
process.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-25 11:04:15 +01:00
Marcin Maka 23d0eae9e2 comp: ops: rename new as create
New is c++ keyword which causes errors while generating
the documentation for component api with sphinx and breathe.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-25 11:04:15 +01:00
Diana Cretu b8b96a20bb CI: travis: Add boot test for i.MX8M
i.MX8M is now supported in qemu up to boot. So, add
it to boottest list.

Signed-off-by: Diana Cretu <dianacretu2806@gmail.com>
2020-03-24 14:28:45 +00:00
Adrian Bonislawski e3216be87d probe: add uuid to probe task
One of schedule_ll PRs added uuid without changes in probes
and probe build failed, this commit will fix it
Fixes: 0529c141f4 ("tasks: add uuid based identification for tasks")

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2020-03-24 14:23:38 +01:00
Tomasz Lauda 5550a5f676 timer: increase next timer set in case of delay
Increases value of next timer set in case there is
a delay in tasks execution. Value of 1 is too small
to guarantee that the next interrupt will be triggered.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-03-24 13:07:57 +01:00
Adrian Bonislawski 3746f459e7 probe: fix dma buffer init wrong rballoc flags
Heap zone was used by mistake instead of flags
This results in buffer mode change from bypass to cached
Tested & no regression found

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2020-03-24 11:56:21 +00:00
Shreeya Patel 10a72a42a0 src: ssi-spi: Use !x instead of NULL comparison
If "x" is compared to NULL, use "!x" instead of it, so as
to maintain the coding style.

Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
2020-03-24 11:50:59 +00:00
Fred Oh 3b66418a0e topology: move byt/cht platform specific settings
Move byt/cht platform specific ifelse to platform files.
And byt/cht have codec and nocodec differences, which need to have
PLATFORM-codec and PLATFORM-nocodec files.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2020-03-24 11:42:26 +00:00
Fred Oh 1040c35d23 topology: move ifelse conditions to platform files
Move platform specific conditions to each platform file.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2020-03-24 11:42:26 +00:00
Paul Olaru d12ad78dec platform: imx8m: Fix DMA domain initialization
SDMA is in dma_array[1], and uses a single interrupt for all channels.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2020-03-23 14:17:27 +00:00