Commit Graph

4707 Commits

Author SHA1 Message Date
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
Paul Olaru c941b0a9f1 platform: imx8m: Add SDMA definition
This commit adds the definition of the SDMA controller we use for SOF,
namely SDMA2 (the other instances of SDMA are used for non-audio-related
DMA in the system). This DMAC can serve the SAI.

A way to account for channel 0 being used internally needs to be added.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2020-03-23 14:17:27 +00:00
Paul Olaru b3420a5b1b platform: imx8m: sdma: Add SDMA definitions for i.MX8M platform
This includes interrupt number and a tweak used when probing the driver
(which must match hardware configuration).

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2020-03-23 14:17:27 +00:00
Paul Olaru 87d79c48dd drivers: imx: sdma: Add SDMA support to SOF
Some i.MX platforms use SDMA (Smart DMA) controller for DMA related
operations. This commit adds the initial functionality for SDMA.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2020-03-23 14:17:27 +00:00
Diana Cretu 3dd843a46d scripts: qemu: Add qemu check for i.MX8M platform
Enable checks to i.MX8M platform of QEMU now.

Signed-off-by: Diana Cretu <dianacretu2806@gmail.com>
2020-03-23 10:52:58 +02:00
Janusz Jankowski 9da1fce247 test: audio: remove kpb
KPB tests don't work and it's better to remove it,
than keeping here disabled code.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2020-03-20 16:36:44 +01:00
Pan Xiuli bfa8bf7ba1 scripts: make verbose build into an option
Disable verbose build by default in build script.
It would be too annoying if we do not need to debug
with make systems.

Use -v option to enable verbose log if need.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2020-03-20 13:34:43 +00:00
Seppo Ingalsuo 26ea50ecd0 Topology: Fix in EQ only pipelines with macro PIPELINE_SINK
This patch fixes the buffer to define as PIPELINE_SINK. The
upper level topologies do not use these topologies so there has
not been related errors. However test pipelines were impacted.

Also the PIPELINE_PCM defined name is made more generic. It can
be whatever and not just high-pass type.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-03-20 13:29:00 +00:00
Seppo Ingalsuo ce1401f62a Tools: Test: Cleanup component run scripts
The src_run.sh is converted into a generic component run script
that is called by new simple component specific scripts asrc_run.sh,
eqfir_run.sh, eqiir_run.sh, src_run.sh, and volume_run.sh.

Note: The testbench does not yet have fully working capture support
so the direction is not exposed yet.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-03-20 13:29:00 +00:00
Seppo Ingalsuo 0c35f1efde Testbench: Build topology parser with debug symbols
This patch adds compilation with -g. Optimization -O was added to get
optimization that preserves sane debugging with gdb. This component
is not critical for speed in simulation.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-03-20 13:29:00 +00:00
Seppo Ingalsuo dc44384ea0 Testbench: Fix possible uninitialized use of variable ret
This patch fixes the read_samples_32() function in file component.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-03-20 13:29:00 +00:00
Seppo Ingalsuo 0eeda80bdf Testbench: Add processing component load
This patch adds to testbench capability to run pipelines with EQ_IIR
and EQ_FIR components. The component is configured with the topology
embedded configuration blob when instantiated with new().

The load of volume component has been enhanced to parse volume tokens and
compute the min and max volume parameters.

The topology parsing and component library load has been changed to
support processing component load and extracting of control private
data. The testbench build has been changed to create libraries
for EQ components.

The testbench command line parsing has been improved to return
error for invalid library request.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-03-20 13:29:00 +00:00
Artur Kloniecki ae211e1f31 probe: Properly send response code for custom responses.
Status (error) code in custom Probe responses is now reported properly.

Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
2020-03-20 12:20:41 +00:00
Artur Kloniecki c33b7a58d7 probe: Properly report size of arrays in INFO payloads.
Size of flexible arrays in Probe INFO responses is now reported properly.

Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
2020-03-20 12:20:41 +00:00
Marc Herbert ff88cd03b7 test/kpb: fix tests[1] array out of bounds
As reported by gcc.

Fixes: 0b279e06bc. This is a partial, one-line revert of that commit
that decreased the size of this array for no obvious reason.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-03-20 12:14:52 +00:00
Marc Herbert 726dd545d6 cmocka/cmake: don't re-fetch (and change) cmocka.git on every build
Add "UPDATE_DISCONNECTED True" property in ExternalProject_Add() so:

- Unit tests can be rebuilt without a network connection
- The code can't change from one build to the next without the developer
  being aware.

Found by chance thanks to some network issue.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-03-20 12:07:44 +00:00
randerwang a33b9a208a dai: dma_buffer: fix pop noise issue when start playback
The pop noise is generated by invalid data in dma buffer.
Since all buffers are cleared by pipeline_comp_prepare except
dma buffer, so clear it to zero to avoid pop noise.

Signed-off-by: randerwang <rander.wang@linux.intel.com>
2020-03-20 12:06:30 +00:00
Marcin Rajwa 1033083200 kpb: add state change to kpb_free()
This patch logs state change in kpb_free() method.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2020-03-20 12:03:40 +00:00
Marcin Rajwa d3cd604e25 kpb: add missing initialization of new memory block
This patch initializes early the "next" pointer of
new memory block. This is important because if
further allocation fails (i.e due to not enough
memory available) this block will end up with missing
next pointer so every operatation on linked list of buffers
will likely fail (assuming there is no check for NULL pointer)

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2020-03-20 12:03:40 +00:00
Marcin Rajwa 94290b1eaa kpb: fix missing size of history buffer
This patch fixes missing history buffer size during
validation of host params.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2020-03-20 12:03:40 +00:00
Marcin Rajwa 477c8b0871 memory: decrease HEAP buffer block size
This change decreases heap buffer block size from 0x180
to 0x100 bytes. This improves memory usage as often single
block of 0x180 bytes exceeds allocation needs.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2020-03-20 12:03:40 +00:00