Commit Graph

4813 Commits

Author SHA1 Message Date
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
Marcin Maka 4d52bf6c51 trace: use separated log levels for trace and tracev
Both had logged on VERBOSE level so far.
Non-verbose trace switched to INFO level.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-06 10:15:04 +01:00
Marcin Maka e1b4ef781a trace: define more log levels
Two new levels: warning and info defined since
existing critical+verbose seems not enough.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-06 10:15:04 +01:00
Marcin Maka 11744cc588 logger: improve the format of the output
Log entry parameters format is compacted to reserve more
space for the text.

Max entry location length is increased to 24 characters.

Timestamp and component name/id use colors to improve
readability.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-06 10:15:04 +01:00
Marcin Maka fcd0895b74 trace: remove legacy trace classes
TRACE_CLASS ids used by parts switch to uuid-based logging
marked as unused.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-06 10:15:04 +01:00
Marcin Maka feb420938d trace: define uuids for components and dais
All new definitions are included in ldc file and are
used by the logger automatically.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-06 10:15:04 +01:00
Marcin Maka 19e11c6e23 tools: add support for static uuids section
Content of static uuid section is appended to the ldc file
along with a new special header by rimage.

New ldc file part is read by the logger to decode
uuid pointers provided in traces into nice names.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-06 10:15:04 +01:00
Marcin Maka 322e150080 trace: add uuid to trace entry and remove trace ids
New trace entry parameter is defined: uuid of the source.
Technically, this is an address of uuid entry linked
inside a special section in elf.

Has_ids is removed from the static log entry since eventually
all entries will use uuids and -1 detection is good enough
detection for those who still do not provide ids.

Note: both changes are done in a single patch to avoid two
major dbg-abi version bumps.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-06 10:15:04 +01:00
Marcin Maka 3100546463 uuid: add simple static uuids linked to ldc section
Unique identification in form of Guid is much more
scalable for fw parts (components, dais, ...) then
existing ids and trace class ids.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-06 10:15:04 +01:00
Marcin Maka ef5eda7da4 logger: fw ver verification moved to function
Optional fw version verification moved to separate function
in order to modularize code of convert().

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-06 10:15:04 +01:00
Yong Zhi 0c7514e379 topology: add JSL tplg for max98360a speaker amp.
Add MAX98360a support for Waddledoo product.
Tested mono playback with amp EVB on SSP1 in i2s mode.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2020-03-05 22:10:09 +00:00
Karol Trzcinski 9ebb2881e5 dma: Add time unit in comment in dma_chan_data.period description
Time unit is crucial to properly use this field so it is convenient
to have it written in comment near field declaration.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-03-05 17:10:48 +02:00
Tomasz Lauda c60bcd0aa6 pcm_converter: enable HiFi3 version by default
Enables HiFi3 version of PCM converter.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-03-05 11:03:53 +00:00
Pan Xiuli b23ca03111 ipc: add error trace with size for page descriptors alloc
Add error trace with buffer size for heap to help debug
the page descriptor issue.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2020-03-05 11:01:42 +00:00
Karol Trzcinski d84629814b ipc: In channel ipc/channel_map.h remove dependency from sof/common.h
After introducing compiler_attributes.h it is possible to make
this dependence shorter.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-03-05 11:33:14 +01:00
Karol Trzcinski a30c1d0f45 sof: Replace __attribute__((section(x))) to __section(x)
Use new standard in source code.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-03-05 11:33:14 +01:00
Karol Trzcinski 32e0b1d0b0 sof: Add __section macro
New introduced macro is much shorten, have less parethesiss and
create possibility to easy change __section behavior in future
what is relevant in cross-platform source code.
Using such a macro is preferred way to define target section
in used checkpatch version.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-03-05 11:33:14 +01:00
Karol Trzcinski ff1a981449 sof: Separate __packed and __aligned from sof/common.h
This part of source code is frequently used in IPC packets
definitions, so it shouldn't have any platform dependence.
After change this file may be include from mentioned place
without any doubt about ipc message dependances from used
sof build configuration.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-03-05 11:33:14 +01:00
Lech Betlej 034c54a16a cavs: clk: add Kconfig option to select default ro clock
The change allows to select at a configuration time default clock for
cavs 2.x platforms (Icelake, Jasperlake, Tigerlake) on top of already
enabled support for cavs 1.8. By default the LP clock is set (120 MHz
- platform dependent). In case of workloads that require HP clock
(400 MHz) system integrator shall select the right clock as a part of
FW configuration process.

Signed-off-by: Lech Betlej <lech.betlej@linux.intel.com>
2020-03-05 10:45:58 +01:00
Constantin Raducanu ab5be85cb9 alloc: Add spaces around operator '/'
This commit adds spaces around the operator '/', fixing the checkpatch
error: "spaces preferred around that '/'".

Signed-off-by: Constantin Raducanu <raducanu.costi@gmail.com>
2020-03-04 22:20:06 +00:00
Constantin Raducanu 89ae27e3f4 alloc: Remove empty line after open brace
This commit removes the empty line after the open brace,
fixing the checkpatch error: "Blank lines aren't necessary
after an open brace '{'".

Signed-off-by: Constantin Raducanu <raducanu.costi@gmail.com>
2020-03-04 22:20:06 +00:00