Commit Graph

5495 Commits

Author SHA1 Message Date
Liam Girdwood 1cdff03f93 dma: dw: make sure all DONE bits are cleared in LLI
Some bits being missed due to cache coherency. This showed on
on Zephyr due to different cache/uncahe mappings and management.

On Zephyr we invalidate all descripts, clear all DONE bits and write
back. This guarantees all DONE bits are clear for nex LLI.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-07-24 12:07:18 +01:00
Liam Girdwood 099a187438 dma: dw: improve debug for buffer IO.
Trace buffer positions in verbose mode.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-07-24 12:07:18 +01:00
Liam Girdwood 2a70f114bc dai: trace: fix description for overrun error.
Overruns are when there is no free space available.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-07-24 12:07:18 +01:00
Liam Girdwood 61a2c75bf8 dma: dw: fix locking and calculations in dw_dma_get_data_size
No unlock on xrun and missing either avail/free depedning on direction
and xrun.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-07-24 12:07:18 +01:00
Liam Girdwood b1ea2051f0 zephyr: numbers: MIN/MAX INT already defined in Zephyr
Some macros are duplicated between SOF and Zephyr meaning we need
to undefine them in the short term until Zephyr and SOF can align
fully.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-07-24 12:03:24 +01:00
Liam Girdwood 6b0efa7004 trace: ipc: fix gcc unused variable warning when trace disabled.
Already declared on line 57

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-07-24 11:46:13 +01:00
Liam Girdwood 0f77541b26 build: elif statement has no conditional.
Looks like was never compiled ?

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-07-24 11:46:13 +01:00
Liam Girdwood eb9851c4b1 zephyr: lps_wait: Fix build on Zephyr by declaring memcpy_s
Fixes build for zephyr. TODO: memcpy_s() header inluces other
generic calls duplicated and colliding in Zephyr hence will need
to separate out in order to include correct header.

Define it locally atm.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-07-24 11:46:13 +01:00
Liam Girdwood 1cb190850b platform: cavs: Add sideband-ipc.h as include.
Fixes build for zephyr.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-07-24 11:46:13 +01:00
Liam Girdwood 44a65d850b components: ut: all components should be declared UT_STATIC
Zephyr build fails without this atm, but also needed for testbench.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-07-23 15:38:55 +01:00
Andrei Emeltchenko 8b2359b210 zephyr: Update README to add instruction for debug loggin on qmeu
Mention using LOG_BACKEND_XTENSA_SIM backend for console.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-07-23 14:58:25 +01:00
Mohana Datta Yelugoti 9f1106d8a5 testbench: add null pointer check for function argument
tb_pipeline_params() function takes an argument called ipc_pipe,
which is a pointer and is derefernced in the function to access
a member of structure that pointer is pointing to.

If this pointer is NULL, this leads to Segmentation fault. A
null pointer check is added before the argument is dereferenced.

Signed-off-by: Mohana Datta Yelugoti <ymdatta.work@gmail.com>
2020-07-23 14:28:26 +01:00
Liam Girdwood 41e62eb4ba dmic: irq: removed unneeded code.
irq_enable/disable should be doing the unmasking and masking.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-07-23 14:17:28 +01:00
Karol Trzcinski 60211b3d70 dai: Remove frame_fmt from private data
This value is one of audio_stream property, so should be
saved in this place to keep data synchronised, and allow
to usage generic function working on audio_stream, like
stream converters.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-07-23 12:14:06 +02:00
Karol Trzcinski 915d67ee87 dai: Assign dma_stream params
Each stream should have set valid metadata information.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-07-23 12:14:06 +02:00
Karol Trzcinski b7881f260f dai: Always overwrite hw frame_fmt in dai_comp_get_hw_params
This value is always set in dai_new() function, value 0 represents
SOF_IPC_FRAME_S16_LE so such an check doesn't give any value.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-07-23 12:14:06 +02:00
Liam Girdwood cbce6fef38 ipc: handler: Message trace data is hex not decimal.
Make sure we see hex message in the log.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-07-23 12:49:03 +03:00
Keyon Jie 7e689527e8 kpb: move the switch check out of the loop to optimize the draining
Move the switch check out of the loop, to optimize the
kpb_drain_samples() and speed up the draining itself.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2020-07-22 10:08:30 +01:00
Karol Trzcinski 278bfc7cf3 platform: intel: cpu: Fix slave cores objects allocation
This was missed changes after commit
"fedec980: cpu: Export mask with enabled cores".
Without it, edited condition is always false.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-07-22 09:49:47 +02:00
Bartosz Kokoszko 97377c3757 smart_amp: fix smart amplifier tplg
This commit changes SSP bclk rate from 9600000 to
12288000 ind ssp container to 32 bits order to fix
glitch issue.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2020-07-21 15:44:28 +01:00
Janusz Jankowski 443319a718 idc: set budget for IDC task
IDC task may be time consuming and has high priority,
what may make other tasks stall. To prevent this it should
have limited cycles budget per systick.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2020-07-21 11:00:38 +02:00
Janusz Jankowski e8dc076f7a drivers: cavs: set budget for IPC task
IPC task may be time consuming and has high priority,
what may make other tasks stall. To prevent this it should
have limited cycles budget per systick.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2020-07-21 11:00:38 +02:00
Janusz Jankowski e003afe582 schedule: edf: cycles budget
Add possibility to set budget for EDF tasks.
It's needed to ensure that some long running task will
not stall other tasks.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2020-07-21 11:00:38 +02:00
Janusz Jankowski 8a275ea44b xtensa: clock: change cpu timer to per-core timer
Every core has it's own timer so cpu timer should be
handled for each core independently.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2020-07-21 11:00:38 +02:00
Marc Herbert 47907d21d5 Revert accidental rimage downgrade in "topology: mirror CML topologies for TGL"
This partially reverts commit 1a8ed6dfd0 PR #3184,
merged on Wed Jul 15 15:22:50 2020 +0100. This reverts just the
rimage part of it.

Commit 1a8ed6dfd0 downgraded rimage from:
from most recent   7317f2af39 ("manifest: set feature mask to 0xffff")
to 3 commits older 9f3f2d7d71  ("headers: Use full path to header")

This upgrades rimage again to newer 7317f2af39

Hopefully fixes (again): #3173

Useful command for these situations:

  cd sof; git log -p -- rimage

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-07-20 10:39:54 +01:00
Kai-Chuan Hsieh 8675d4cb9f tools: add TGL key signature to sof_ri_info
Provide output info if evaluated FW image was signed with
TGL production key.

Signed-off-by: Kai-Chuan Hsieh <kaichuan.hsieh@canonical.com>
2020-07-16 13:39:45 +01:00
Marcin Rajwa 7c8491e4e5 memory: add TGL HPSRAM LDOCTL missing settings
TGL introduces new LDO control register bits - HS2 which
is responsible of LDO2 control. This patch adds this missing
LDO2 settings for TGL HPSRAM memory banks.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2020-07-15 15:39:15 +01:00
Pierre-Louis Bossart 1a8ed6dfd0 topology: mirror CML topologies for TGL
Some TGL devices use the same devices and hardware layout and on CML,
reuse.  Also remove cml-mono.m4 definition and directly add the define
in the CMakeLists.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2020-07-15 15:22:50 +01:00
Marcin Rajwa 824b68b785 kpb: update kpb HB free size during RT copies
This patch decreases history buffer free size during
real time copies therefore we avoid history data overwrite
when draining is delayed.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2020-07-14 21:59:46 +02:00
Pierre-Louis Bossart 4a32011bfd topology: remove sof-icl-rt711-rt1308-rt715.m4
This file is no longer maintained and does not work with the SoundWire
drivers, remove.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2020-07-14 11:44:35 -05:00
Marcin Rajwa f99face2bc edf_scheduler: cleanup
This patch removes not used code from edf_scheduler header
file and code which is setting edf scheduler tasks start
time while this is not supported by this scheduler.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2020-07-14 16:53:58 +01:00
Janusz Jankowski b022ea6b05 rimage: set feature mask to 0xffff
Update rimage to version that has feature mask set to 0xffff.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2020-07-14 16:51:18 +01:00
Bartosz Kokoszko 5d763d6349 mux: simplifies mux processing functions
This commit simplifies mux processing functions and
does not allow mux to mix channels.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2020-07-14 16:35:21 +01:00
Adrian Bonislawski 175ef89b81 diag: DSP residency counters
This will add DSP residency counters to Debug menu
It introduces generic DSP states R0, R1 and R2 with simple
reporting changes and tracing it in SRAM_REG mailbox.
Number of DSP residency states can be easily extended depending on platform needs.

In initial version CAVS support is added with the following approach:
R0 - in HPRO
R1 - in LPRO
R2 - LPS
with extra priority to R2 (LPS).

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2020-07-14 13:15:31 +01:00
Adrian Bonislawski 3fa7d56960 cavs: add mailbox_sw_reg read/write64
It will allow to simplify usage of 64bit values

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2020-07-14 13:15:31 +01:00
Shreeya Patel d434dbc8e1 xtensa-build-all: fix gcc _defconfig for byt|cht|cnl|sue
In renaming of $j -> $platform one instance of variable was missed which
has led to wrong configs being used.

Fixes: 941dfcccb0 ("use switch case")

Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
2020-07-14 12:12:15 +01:00
Dharageswari R 9555b97665 tgl: Fix the MEU offset for MEU version less than 15.0.0.0
This patch fixes the MEU offset value to 1088 for the
MEU version less than 15.0.0.0.

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
2020-07-14 09:39:52 +01:00
Marc Herbert 5564a9029a xtensa-build-all.sh: add missing double quotes
Fixes most shellcheck warnings, now down to just 4.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-07-13 17:35:50 +03:00
Marc Herbert 318dc9f7e1 check patch: ABI warning only once per file, not once per line
Stop drowning and missing other warnings.

Example:

 ./scripts/checkpatch.pl -g eaf49e26b4bb~0

- 40 "Please update ABI..." warnings
- 2 other warnings including a spelling mistake that were missed.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-07-10 15:48:57 +01:00
Kai Vehmanen e51df282a4 ipc: extend IPC documentation
Add a brief overview of the IPC protocol, message syntax,
byte encoding and command replies. Clarify text in ABI
compatibility section.

Avoid using subsections in group documentation as these are
not included in generated Sphinx output (with Breathe
4.14.1).

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2020-07-10 15:42:06 +01:00
Kai Vehmanen bccc9cb2ca ipc: add IPC documentation to header.h
Collect key IPC documentation to header.h and ensure it is
included in public API documentation in the doxygen output.

Specifically move the IPC compatibility rules documented in ipc/handler.c.
This is important information to all IPC implementers for host
and DSP, so should be part of API documentation.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2020-07-10 15:42:06 +01:00
Marc Herbert b70b13cc1a dist.cmake: add 'rebuild_cache' warning.
dist.cmake is (for now) the only .cmake file that uses GIT_TAG at _cmake
configure time_. This means even "make clean" is not enough for
dist.cmake to take into account some git tag or version change. It's
very confusing because on the other hand "make check_version_h" and
everything else always shows up-to-date git information.

"make rebuild_cache" addresses this situation so mention it in a
warning.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-07-10 15:41:18 +01:00
Marc Herbert 08c332c888 .gitignore: remove .tarball-version
There are two .tarball-version files. The one generated by the build is
in the build directory so it doesn't need to be in .gitignore. The
other, input one in the source directory lets some (rare) users override
the default values and these users likely don't want to forget about
that override.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-07-10 15:41:18 +01:00
Marc Herbert 4e44ae48ec rimage submodule: Debug build, assert(write_firmware)
Update submodule with two new commits:

* 2156dcb00d rimage.c: add assert(image.adsp->write_firmware[_meu])
* 4348e2a2bd cmake: use CMAKE_BUILD_TYPE and default to Debug

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-07-10 15:40:14 +01:00
Pierre-Louis Bossart 08022aae49 Revert "pcm_converter: Convert linear memory regions"
This reverts commit 1f092df401.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2020-07-10 15:24:35 +01:00
Karol Trzcinski b7bb801f0e atomic: ll_scheduler: Fix atomic implementation, return old value
Return value should be aligned with compiler builtins implementations,
see https://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Atomic-Builtins.html

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-07-09 12:15:08 +01:00
Karol Trzcinski 1c605d3275 pm_runtime: Log context and index value in verbose traces
It's important to know which pm_runtime_context is related with
given call to pm_runtime* function.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-07-09 12:03:42 +01:00
Marc Herbert e9c83cf009 version.cmake: add "--match v*" to fix git describe
Before this fix, any random, later git tag like for instance
"releases/jsl/v3.0-rc1" would be picked up and then immediately
discarded and replaced with v0000 because it didn't start with 'v*'

Also log all the versions always and not just when there is already a
.tarball-version file.

Increase --abbrev=12 because --abbrev=4 doesn't seem to make sense.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-07-09 10:45:13 +01:00
Karol Trzcinski 447359f16f platform: pm: Add HP_CLK management to pm_runtime
Clock manegement is important part for power consumption optimization,
what is a task of this module.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-07-09 10:15:32 +01:00
Karol Trzcinski a2c276e446 clock: Add function to set low power mode
This function will be called from power manager to change current
clock value for sleep time.
Detailed implemnentation may be clock instance dependednt.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-07-09 10:15:32 +01:00