Commit Graph

4753 Commits

Author SHA1 Message Date
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
Constantin Raducanu 9662439b8e alloc: Remove the unnecessaries spaces after casts
This commit removes the unnecessaries spaces after casts, fixing
the checkpatch error: "No space is necessary after a cast".

Signed-off-by: Constantin Raducanu <raducanu.costi@gmail.com>
2020-03-04 22:20:06 +00:00
Fred Oh 752f086bdc topology: add platform sku files to config platform settings
icl, cml whl are sharing some toplogy files. Create platform specific files
including DSP configuration, SSP setting and DMIC to simplify platform
settings.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2020-03-04 22:17:15 +00:00
Janusz Jankowski 9e1a2b251a panic: noreturn attribute for scan build
Add noreturn attribute to decrease number of
false positives when using assert / panic.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2020-03-04 11:02:56 +01:00
Janusz Jankowski 1ff2760500 panic: ignore asm in scan build
Clang cannot compile some xtensa-specific ASM, so it
has to be ignored when running static analysis.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2020-03-04 11:02:56 +01:00
Janusz Jankowski 4d02a1faf7 script: clang scan-build for xtensa
Add utility scripts for launching clang static analyzer.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2020-03-04 11:02:56 +01:00
Janusz Jankowski 4da2c9659c xtensa: cmake: clang scan build support
Add support for compiling FW with settings acceptable for clang,
in order to let it perform static analysis on the code.

Clang works mostly on ASTs made out of C code, so there is
no need to build complete signed binary for it.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2020-03-04 11:02:56 +01:00
Janusz Jankowski 6f7bf63417 cmake: build option for clang static analyzer
Add option for building FW for clang's scan-build.
This static analyzer works out-of-the-box only for compilers
compatible with Clang. For most of embedded compilers
there will be some adjustment needed when BUILD_CLANG_SCAN
is enabled. This flag is not suitable for every build scenario,
it has to be supported for given toolchain / architecture.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2020-03-04 11:02:56 +01:00
Janusz Jankowski 9cfe3eb8b0 xtensa: cmake: refactor fw postprocessing
Separate post-processing steps to not have fw image parts building
mixed with tools processing.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2020-03-04 11:02:56 +01:00
Tomasz Lauda 70ab103e88 mixer: fix state transition
Mixer shouldn't go into COMP_STATE_PREPARE if there is at least
one source in COMP_STATE_PAUSED.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-03-04 09:25:49 +01:00
Daniel Baluta 182e62a198 drivers: sai: Add support for SAI new version
New IP version introduces Version ID and Parameter registers
and optionally added Timestamp feature.

VERID and PARAM registers are placed at the top of registers
address space and some registers are shifted according to
the following:
    Tx/Rx data registers and Tx/Rx FIFO registers keep their
    addresses, all other registers are shifted by 8.

SAI Memory map is described in chapter 13.10.4.1.1 I2S Memory map
of the Reference Manual [1].

In order to make as less changes as possible we attach an offset
to each register offset to each changed register definition. The
offset is specified via CONFIG option. We now that this new SAI
version is supported only for i.MX8M.

[1]https://cache.nxp.com/secured/assets/documents/en/reference-manual/IMX8DQXPRM.pdf?__gda__=1583251106_f508ef5d5353cd8fc33150778708874b&fileExt=.pdf

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-03-03 20:45:40 +02:00