Commit Graph

5354 Commits

Author SHA1 Message Date
Karol Trzcinski ff89639f36 smart_amp: Fix memory handling in prepare function
Without source buffer invalidation before read, outdated
data may be fetched in situation when source_buff is inter core
buffer. Also feedback buffer needs to be writeback after edit,
to synchronise data in inter core processing.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-07-28 16:02:02 +02:00
Karol Trzcinski e963c54f0d smart_amp: Set rate in feedback channel
Each audio stream should have assigned valid data description,
like channel number, data format and data rate. It's especially
important for audio streams used to connect two arbitrary
components together, because of them may need this information,
what leads to unpredicted errors.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-07-28 16:02:02 +02:00
Karol Trzcinski 5702b77200 smart_amp: Release feedback buffer when unused
Each code path should unlock locked components, otherwise
lock system won't work correctly.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-07-28 16:02:02 +02:00
Liam Girdwood 1c53b8e9dd arch: xtensa: idc: dont use xtos structs for zephyr.
Zephyr will provide it's own per core data in place of the xtos data.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-07-24 22:00:22 +01:00
Liam Girdwood 74cacc3138 zephyr: ipc: dont enable DMA trace transport.
Zephyr trace does not yet support DMA transport. This will be reverted once
DMA trace is enabled on zephyr. In the mean time enable all the trace
infrastructure in preparedness.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-07-24 21:57:49 +01:00
Andrei Emeltchenko 5642e6ab26 zephyr: haswell: Split initialization
Split initialization for haswell zephyr support similar to CAVS.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-07-24 21:57:49 +01:00
Andrei Emeltchenko e126f81953 zephyr: baytrail: Split initialization
Split initialization for baytrail zephyr support similar to CAVS.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-07-24 21:57:49 +01:00
Liam Girdwood cf8e35f860 zephyr: init: create a zephyr entry point in SOF.
Zephyr already uses main() and has already performed a lot of init prior
to entering SOF. Make sure no HW init is repeated.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-07-24 21:57:49 +01:00
Andy Ross fd506970cc zephyr: kconfig: rename CONFIG_SMP -> CONFIG_MULTICORE
This kconfig collides with one of the same name in Zephyr.  Rename it
for clarity ("MULTICORE" was picked for symmetry with the existing
"CORE_COUNT", though it's admittedly a little long...).

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-07-24 19:55:05 +01:00
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