Commit Graph

4633 Commits

Author SHA1 Message Date
Tomasz Lauda 0825d2fbdd task: reduce default stack size for some platforms
Reduces default EDF task's stack size for some platforms,
which have less memory and aren't used for more serious
processing.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-03-18 10:18:51 +01:00
Tomasz Lauda b6b8c3f2a8 spinlock: remove double header inclusion
Removes double inclusion of trace header.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-03-18 10:18:03 +01:00
Tomasz Lauda 1df122dad1 trace: move struct definition out of header
Moves trace struct definition out of header.
It isn't used anywhere besides trace unit.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-03-18 10:18:03 +01:00
Adrian Bonislawski a133d5d52a probe: free extraction task in deinit and clear probe ptr
This will fix probe deinit and free all used memory

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2020-03-17 18:55:20 +01:00
Bard Liao 5e8de9fd52 topology: sof-icl-rt711-rt1308-rt715-hdmi: Merge two pipeline with demux
Now kernel expots one PCM with two CPU dais. So use demux to play
with two DAIs.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2020-03-17 16:43:06 +00:00
Bard Liao 0a52c2e319 topology: add pipe-dai-endpoint
This will create a basic pipeline with a buffer only. Note that
we don't implement a SectionGraph to connect the buffer to its
starting component, we should define it manually.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2020-03-17 16:43:06 +00:00
Bard Liao da8ac71a29 topology: add pipe-dai-sched-playback
This is basically the same as pipe-dai-playback.m4, but use SCHED_COMP
instead of N_DAI_OUT.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2020-03-17 16:43:06 +00:00
Bard Liao 3ae3beffbc topology: dai: add DAI_ADD_SCHED to set scheduling component
So we can set scheduling component when adding a DAI.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2020-03-17 16:43:06 +00:00
Marcin Maka 6ed1d32f70 comp: dox: complete and clean up api documentation
Merged the documentation of the component api and
infrastructure helpers.

Removed unnesessary dox groups that did not improve readability.

Completed missing dox parts.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-17 16:13:29 +01:00
Marcin Maka ac01040efe comp: api: advanced and internal functions separated
The current content of component.h is a mix of basic api, common
basic helpers for every component developers as well as advanced
functions and macros used by infrastructure and very specialized
components like host, dai, kpb etc.

This patch moves the advanced part to component_ext.h and keeps
only basic part in component.h to avoid overloading effects
component developers with declarations and code they do not use.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-17 16:13:29 +01:00
Tomasz Lauda cd9a0d378d mux: add missing buffer locks
Adds missing buffer locks to mux_copy function.
demux_copy has already had them before.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-03-17 15:32:05 +01:00
Marcin Maka ae229b1df1 ll-scheduler: trace task activities using uuids
Replacing pointers that varies from build to build
with stable uuids makes analysis of traces much easier.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-17 15:11:42 +02:00
Marcin Maka 0529c141f4 tasks: add uuid based identification for tasks
Tasks activities may be traced and analysed easier if they
are identified by uuids and named.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-17 15:11:42 +02:00
Tomasz Lauda 30e6e9eb41 ipc: allocate correct msg size
Msg size should use its own structure's size.
Only payload should be allocated using passed one.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-03-17 10:43:20 +01:00
Seppo Ingalsuo df6c637e8f Topology: BYT: Adjust SRC pipeline for lower RAM consumption
This patch removes support for over 48 kHz sample rates and changes
scheduling to every 1 ms to save in buffers sizes. In pipe-pcm-media.m4
the buffers in the pipeline are reduced from 4 to 2 or 3 periods.
These changes should allow the media PCM to work in BYT platform.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-03-16 19:43:44 +00:00
Tomasz Lauda 08efd08b7d sai: remove duplicated values
Removes duplicated values from expression.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-03-16 11:00:32 +02:00
Tomasz Lauda 47420dc92c gdb: use mailbox_get_debug_base() macro
Changes ring buffer to use mailbox_get_debug_base() macro.
It points to the same memory region as previously, but it's
defined for all platforms.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-03-16 10:03:02 +02:00
Marcin Maka afd9770836 comp: fix api documentation formatting
Incorrect format of dox comments fixed.
Added missing parameter documentation.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-13 18:06:16 +01:00
Marcin Maka 32c5129bfc comp: update api doc for trace macros
Added missing documentation for the macros.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-13 18:06:16 +01:00
Marcin Maka 10191131e7 trace: doc: complete parameter documentation
Corrected doc format and provided doc for missing parameters
of the trace_dev_ macros.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-13 18:06:16 +01:00
Marcin Maka 0d79936c27 comp: update api doc for component endpoint type
Documentation completed.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-13 18:06:16 +01:00
Adrian Bonislawski 496845984f probes-app: build the app with sof tools
this will allow to build probe app from scripts/build-tools.sh

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2020-03-13 16:26:16 +00:00
Tomasz Lauda d735532cb5 mailbox: add missing header
Adds missing header needed for size_t.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-03-13 17:08:14 +02:00
Marcin Maka 15736c5766 uuid: doc: add more documentation for macros
More detailed uuid documentation should be useful for
component developers and others working on named fw
objects (like tasks).

Another patch to sof-docs that refers this API section
and provides detailed description on UUID use in component
overview section.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-13 09:24:03 +02:00
Marcin Maka 366aa67822 comp: update api documentation for component state
Removed the diagram duplicated in sof-docs, moved set_state
notes from sof-docs to the header to make it easier accesible
for component developers and added notes for infrastructure
developers to remember about the sof-docs updates.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-12 11:37:53 +00:00
Marcin Maka 33cc71216f uuid: use __section macro
Data that go to static uuids section should use __section
macro.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-12 12:37:00 +01:00
Tomasz Lauda 0d0e5b73d2 idc: fix payload getter
Fixes payload getter to use passed core instead of current core.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-03-11 18:09:35 +01:00
Tomasz Lauda 0628363c47 buffer: fix locking
Fixes buffer_lock function. We need to pass flags by pointer
to use it correctly later to restore correct interrupt level.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-03-11 18:09:35 +01:00
Paul Olaru ee0fac6e91 drivers: imx: sai: esai: Implement get_hw_params
Add proper implementation for [e]sai_get_hw_params. This function is
required for all DAI drivers and lacks even assert checks.

Without this implementation we would have a jump to address 0, which
manifested itself as a hang on i.MX8MP (did not test the other platforms
but they are all broken).

Fixes: 55866f28 "comp: dai: implement dai_get_hw_params() function"
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2020-03-11 15:12:13 +02:00
Tomasz Lauda aba0bb2051 pcm_converter: fix loops condition
Fixes loops condition in most of the PCM conversion functions.
Number of samples is unsigned, so current condition caused underflow.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-03-11 11:04:32 +01:00
Lech Betlej c42c64632a cavs: align look and feel of cavs 1.8/2.x shim headers
Small clean up of shim headers is made to list registers
in the same order across Cannonlake, Icelake, Tigerlake shim headers.
Duplicating (within a header) registers are removed.

Signed-off-by: Lech Betlej <lech.betlej@linux.intel.com>
2020-03-11 10:01:10 +00:00
Lech Betlej fdd4050fca cavs: clean up of bit setting macros in shim headers
The BIT() macro is used to replace explicit bit shifting in
Apollolake, Cannonlake, Icelake and Tigerlake shim headers.

Signed-off-by: Lech Betlej <lech.betlej@linux.intel.com>
2020-03-11 10:01:10 +00:00
Tomasz Lauda 293dfe2469 hda-dma: refactor xrun handling
Changes behaviour of HDA Link overruns and underruns handling.
Let's no longer stop the stream, but just report an error.
It might happen that just after the release buffer is still
full/not yet empty after the previous run, but it shouldn't
affect the data, since stream has been paused anyway.
Also adds additional bit to better reflect hardware registers.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-03-11 10:03:45 +01:00
Paul Olaru 8e5ab9c2ea drivers: imx: interrupt: Separate platform specific differences between platforms
On i.MX8M the register map is very different from the one on the other
currently supported i.MX8 platforms. This commit separates these
differences into platform-specific header files.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2020-03-10 13:59:47 +02:00
Paul Olaru 36ba9fbd75 drivers: imx: interrupts: Fix portability issue in internal function
The function irqstr_get_status_word had hardcoded bounds checks that
are correct for i.MX8/i.MX8X platforms but don't work for the new i.MX8M
platform. This commit adjusts the bounds checks so they work on all
platforms.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2020-03-10 13:59:47 +02:00
Tomasz Lauda 30492d73f9 dmic: clear overrun bits
Clears overrun bits in case they're asserted.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-03-10 08:07:13 +01:00
Tomasz Lauda c596217ca5 dmic: fix log typos
Fixes typos in dmic_irq_handler logs.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-03-10 08:07:13 +01:00
Tomasz Lauda 0996f794a1 pcm_converter: do nothing when there are no samples
HiFi3 version of PCM converter can corrupt data or go into
endless loop, when called with samples = 0. Make sure
the processing functions return immediately if that happens.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-03-09 11:00:13 +01:00
Marcin Maka 90f83af891 mixer: trace: move detailed tracepoints to dbg level
Usual tracepoints do not have to be logged on default
info level.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-09 11:52:48 +02:00
Marcin Maka c51528a9ed pipe: trace: add more details to events
Log stream parameters.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-09 11:52:48 +02:00
Marcin Maka b631f86105 host: trace: move detailed tracepoints to dbg level
Usual tracepoints do not have to be logged on default
info level.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-09 11:52:48 +02:00
Marcin Maka dcdfe3f1a3 dai: trace: move detailed tracepoints to dbg level
Usual tracepoints do not have to be logged on default
info level.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-09 11:52:48 +02:00
Marcin Maka b93b94dc14 buffer: trace: move detailed tracepoints to dbg level
Usual tracepoints do not have to be logged on default
info level.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-09 11:52:48 +02:00
Marcin Maka 8212900cf0 volume: trace: move detailed tracepoints to dbg level
Usual tracepoints do not have to be logged on default
info level.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-09 11:52:48 +02:00
Marcin Maka 34581f2daf comp: trace: log component new in base layer
No need for duplicated log entries by each component
implementation once uuids are there and identification
is possible at the infrastructure level.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-09 11:52:48 +02:00
Marcin Maka 64e3914133 volume: trace: replace errors with warnings
There are cases where the component applies constrained
settings which should be reported as warning rather than
error.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-09 11:52:48 +02:00
Karol Trzcinski 6cd8acc16a ssp: Keep SSP connected with DMA in pause state
When there is not enough time to wait for FIFO empty and we care about
data continuity - like in pause state - then SSP should be kept connected
with DMA in pause state.
Stop function has been updated to take action also on channels in
COMP_STATE_PAUSED state. After receiving COMP_TRIGGER_STOP,
component state should be set to COMP_STATE_PREPARE,
what is consistent with sof-docs.
Introduced changes have positive impact on glitches after
pause/resume sequence.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-03-06 21:05:36 +00:00
Marcin Maka 93cf630d9d logger: support for uuid address as entry parameter
Log entry format is scanned by the logger and if %s is found,
then corresponding parameter is interpreted as address
of static uuid entry. The original address is replaced by
formatted uuid namen and value, painted in blue, before
fprintf() is called.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-06 10:15:04 +01:00
Marcin Maka f3e80af1e7 logger: add WARN prefix for warning level traces
Warning traces prefixed and painted in yellow.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-06 10:15:04 +01:00
Marcin Maka 71a38058b8 trace: add macros for warn level logging
Implemented for generic and device tracing with warn postfix
translated to LOG_LEVEL_WARNING.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-06 10:15:04 +01:00