Commit Graph

2289 Commits

Author SHA1 Message Date
Seppo Ingalsuo c76a458e4f SRC: Add support for S16_LE PCM data format
With this patch the S16_LE format becomes supported in addition
to S24_4LE and S32_LE. The generic C, HiFiEP, and HiFi3 versions
are updated. The patch changes the s24 polyphase algorithm for
s16 data and changes the s32 algorithm for both s24/s32 support
with a shift by 0 or 8 parameter.

As done for other components too the PCM format handling is moved
from params() to prepare() function since the actual pipeline
format didn't appear correctly in params().

The patch removes the own ceil_divide() function since it's
provided by math library. Also some code indents are fixed.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-01-09 16:30:58 +00:00
Tomasz Lauda d383adf032 dw-dma: change work trace to verbose (again)
Changes trace call in dw_dma_work to verbose.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-01-09 15:56:50 +00:00
Janusz Jankowski 39c4b3bab7 broadwell: remove broadwell.x.in, use haswell.x.in
broadwell and haswell linker scripts are identical, by removing
broadwell-specific file for linker script we have cleaner buildsystem
where all linker scripts have names just like platform folder names

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-09 15:51:43 +00:00
Janusz Jankowski 76c84875d8 baytrail: remove ipc.c
it's not included in binary anyway, and it's only function is already
in platform.c

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-09 15:51:02 +00:00
Keyon Jie 9f403d683e host: reset dma channel to invalid by default
This will be helpful for error reporting at host dma channel management.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-01-08 15:38:37 +00:00
Keyon Jie 4cc0556ce3 dai: only get dma channel at first config
For dais, we don't support change dma channel dynamically, so only get
dma channel at first config, ignore that for  latter dai_config
invokings to avoid dma channel leaking.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-01-08 15:38:37 +00:00
Zhang Keqiao 0a57440a35 test: add a script for multiplex pipeline stress test
This script is used for simultaneous playback/capture test on
arbitrary multiple pipelines.

Signed-off-by: Zhang Keqiao <keqiao.zhang@linux.intel.com>
2019-01-08 15:32:31 +00:00
ArturX Kloniecki 0c4120e73b debugability: Add pipeline and component IDs to dai logs.
Signed-off-by: ArturX Kloniecki <arturx.kloniecki@linux.intel.com>
2019-01-08 15:32:00 +00:00
Janusz Jankowski 8d6c712fcf hda: dma preload timeout
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-08 13:29:15 +00:00
Michal Jerzy Wierzbicki dd07c8e3b0 tools/coredumper: added support for sof_ipc_dsp_oops_header; added handling of invalid windowbase; added exceptions for invalid flag usage 2019-01-08 13:25:32 +00:00
Seppo Ingalsuo e1e727febd EQ: Remove redundant binary configuration data check code
This patch removes from FIR and IIR EQs the check if array data pointer
is null. Since it is an array the test evaluates as true and the check is
unnecessary.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-01-08 10:43:13 +00:00
Seppo Ingalsuo c6ff3fd5d1 Host: Reduce trace verbosity for a non-warn type of event
This patch prevents the host component from flooding the trace when
audio playback or capture rate is other than 48 kHz. It only means
that the host sink buffer still has samples unconsumed by the
downstream component. This is not a warning so it's better to change
it to tracev_host().

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-01-07 20:27:35 +00:00
Libin Yang a2e6f82ef8 host: emit error trace log when dma stop fails
Emit the trace log when dma fails to stop.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2018-12-27 20:10:57 +00:00
Libin Yang 43a75f4b40 host: emit error trace log when host stop fails
Emit the trace log instead of returning error when host fails to stop.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2018-12-26 11:50:44 +00:00
Keyon Jie 7fca812717 hda-dma: remove embedded spin_lock usage to avoid dead lock
It has embedded lock to dma->lock in hda_dma_post_copy() and
hda_dma_start() where may lead to dead lock, here remove them.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-12-26 11:39:07 +00:00
Bard liao fa2fc61fe6 rimage: make block divisible by 4
Add pandding to each block if the block size is not divisible by 4.
Which can avoid unaligned memory accesses.

Signed-off-by: Bard liao <yung-chuan.liao@linux.intel.com>
2018-12-26 11:37:02 +00:00
Liam Girdwood 27c09a9493 rom: sue: remove log PHDR and fix entry point
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-22 14:30:49 +00:00
Liam Girdwood cadfc6aca2 rimage: Add support for Sue creek
WiP.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-22 14:30:49 +00:00
Liam Girdwood 801272e242 rimage: make sure cavs1.5 manifest uses correct file offsets.
cavs1.5 manifest file structure and offsets are different than cavs
version 1.8

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-22 14:30:49 +00:00
Liam Girdwood c4960e7451 xtos: prefctl: Set correctly for skl and kbl.
Todo look at SMP version settings.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-21 23:45:36 +00:00
Liam Girdwood 2802204754 pm: handler mask all IRQ sources.
Interrupt mask is 32bits so make sure we mask it all.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-21 21:41:06 +00:00
Liam Girdwood af6fcdd5ee pm: send IPC on PM power off completion.
Send command completion IPC after powedown completes instead of before
power off completes. This allows host to know that DSP is in OFF state
prior to driver PM actions.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-21 21:41:06 +00:00
Seppo Ingalsuo db88ab49e4 Testbench: Bug fix for s16 file read
This patch removes some obsolete code that caused file
pointer to get out of sync and corrupt all data read.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-12-21 21:17:11 +00:00
Liam Girdwood 38a6cf30da xtensa: xtos: Fix typo in reset-vector.S
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-21 11:54:08 +00:00
Liam Girdwood a9069d680d rom: linker: cleanup rom linker scripts to use only macros.
use macros and remove wrong entry point.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-21 11:53:54 +00:00
Tomasz Lauda 3c8ac2ac86 init: compile out slave_core_init on UP arch
Compiles out slave_core_init on UP architecure.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-12-20 14:45:03 +00:00
Seppo Ingalsuo 676e72a895 Topology: EQ IIR: Allow capture with all formats with pipe-eq-capture
This patch adds to IIR EQ capability to convert from s32 source to
s16/s24/s32 sink formats in normal PCM samples equalization. The
feature is useful in microphone equalization where input dynamic
range is high but where pipeline needs to be lower word length. A
typical IIR high-pass response when combined with gain will reduce
the dynamic range by suppressing lowest frequencies from signal to
better fit the smaller sample word length.

The PCM capability in topology macro pipe-eq-capture.m4 is changed to
allow the s16/s24/s32 formats.

The patch also includes 4096 bytes increase to SOF_TEXT_SIZE for CNL
platform.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-12-20 14:08:32 +00:00
Janusz Jankowski d40cff319f test: disable xtensa-only tests for host
Disables following tests:
Debugability - not designed to be run on host at all
Volume - needs some tuning to not fail
Buffer - needs some fixes to not have segfault

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2018-12-20 08:38:26 +00:00
Janusz Jankowski de740b3075 host: platform: increase stream capabilities
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2018-12-20 08:38:26 +00:00
Janusz Jankowski da9ab07085 test: fix _zalloc ut
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2018-12-19 13:04:36 +00:00
Pan Xiuli bea92dfcc8 dai: recovery dai buffer and dma pointer for none-init start
For none-init first trigger start, need to recovery buffer state and set
the dma pointer as pause/release did.
This will allow ALSA STOP/START recovery pattern work now.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-12-19 12:30:05 +00:00
Seppo Ingalsuo dd8cfda311 EQ: Update ABI version number in configuration to match current version
This patch updates the provided example responses as data for
sof-eqctl and in the include files for topologies. The updates into
Matlab scripts are included also. The FIR and IIR example script is
updated to contain all examples.

The patch includes also a bug fix into IPC handler where the check
against SOF_IPC_MSG_MAX_SIZE is off by one and caused it to reject
all set data commands (to the EQs).

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-12-19 10:28:25 +00:00
Pan Xiuli 4a7eccb7ba pipeline: remove duplicated pipeline copy
As task scheduler is refined to accept adding new task while previous
task is running. This duplicated copy should be removed.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-12-19 10:27:02 +00:00
Liam Girdwood 699321e679 cmocka: host: Make sure cmocka builds and runs for host test bench
Fix some build issues with cmocka for host test bench target so that
cmocka UTs can run native on host architecture. This makes it easy for
users to update UTs when APIs change as they dont need architecture
specific version of cmocka.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-19 10:20:35 +00:00
Liam Girdwood 6b3f266653 cmocka: update component cmd API to new convention.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-19 10:20:35 +00:00
Liam Girdwood a1e292b082 scheduler: check task state prior to completion
High priority IRQ handlers can potentially reschedule tasks prior to task
completion. i.e.

1. Task runs and unmasks high priority IRQ prior to completion.
2. High priority IRQ prempts task context and reschedules task (changing
   task->state).
3. Initial task resumes and then completes (clobbering task->state in 2).

Make sure this flow is supported for high priority IRQ scheduling.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-19 10:03:19 +00:00
Ranjani Sridharan 482abfd232 dmic: fix trace message
Fix trace message in dmic_set_config(). These aren't errors
just info messages.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-12-19 10:02:58 +00:00
Jakub Dabek 89341e4dad memory: added debug memory free
Added debug memory freeing with saving pattern into memory to
find dual freeing of allocated memory.
Added ifdef and changed config for Apollolake memory map since
LP memory is not yet enabled.

Signed-off-by: Jakub Dabek <jakub.dabek@linux.intel.com>
2018-12-19 10:02:20 +00:00
Naveen Manohar 8e1249c293 topology: Add GLK topology support for chromebook rt5682+max98357a variant
Add new PCMs and backends for GLK chromebook with codecs rt5682+max98357a.

Signed-off-by: Naveen Manohar <naveen.m@intel.com>
2018-12-18 11:30:08 +00:00
Seppo Ingalsuo 0526077c87 Tools: Update SRC tool for 50 kHz modes, SRC testbench, add topology
This patch adds 50 kHz into SRC generator script for std and tiny
profiles. The src generator script is cleaned up and the default
conversion matrix is moved into caller script for easier maintenance.
The plots appearance is improved and the generated coefficients code
look is improved to pass the git pre- and post-commit script
requirements.

The SRC test bench scripts are updated for changed locations. A SRC
playback topology is used for test bench and real device usage.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-12-18 11:29:32 +00:00
Seppo Ingalsuo aa29d06231 SRC: Update all coefficients, add 50 kHz support
This patch adds 48 <-> 50 kHz rate conversions, removes from tiny set
24 kHz due to no ALSA support, and removes from std set the no more
needed 18.9 kHz.

The tiny coefficients are trimmed down in quality and computational
complexity to just run on APL platform as gcc compiled to allow debugging
and validation of the most complex 44.1 <-> 48 kHz conversion.

The std coefficients are trimmed to slightly lower bandwidth
20 kHz @ 44.1 kHz instead of earlier 22 kHz @ 48 kHz. This allows the
new larger set to not consume more RAM than old.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-12-18 11:29:32 +00:00
Liam Girdwood ba4054bc3c lib: dma: simplify DMAC search and fix users to max channels
Currently the dai user only increments the DMA channel usage count on
channel start and decrements on stop. This doesn't align with the current
DMAC allocator so ensure that the DMAC allocator cannot over subscribe
a DMAC with more users than channels. i.e. DAI config will try and allocate
a channel and fail if over subscribed.

This needs to be revisisted with changes to DAI to allow over subscription.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-17 20:37:48 +00:00
Liam Girdwood 24f84d5844 trace: cavs: double trace buffer size on cavs platforms
Increase the trace buffer size on CAVS platforms to help prevent any
trace data loss. Also relax the scheduling timeout given the extra
headroom.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-17 20:37:11 +00:00
Liam Girdwood b012678974 trace: hsw, byt: reduce verbosity of DW and some IPC trace
Trace is being flooded with data about trace. make it verbose to improve
SNR.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-17 20:37:11 +00:00
Liam Girdwood ab19407e09 alloc: Add debug option to debug heap allocations
Add debug to show heap allocation failures and display remaining heap
total free/used alongside free/used blocks of each size.

The heap status is also dumped at the end of of pipeline load and platform
boot if option is enabled.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-17 20:36:51 +00:00
Liam Girdwood e2b82fdd67 alloc: check ptr before potential dereference.
Make sure we check ptr is not NULL prior to converting address.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-17 20:36:51 +00:00
Tomasz Lauda 8749a563c4 pipeline: remove redundant argument from cache functions
Removes redundant argument from pipeline cache functions.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-12-17 20:11:02 +00:00
Liam Girdwood f00d46b3ae ipc: abi: Make sure we pass all IPC data to client APIs.
Make sure we pass the entirety of IPC data between FW and host by
using the raw buffer for client APIs and the local copy for local
ABI safe instrospection & validation.

Make sure this works both ways and add a max_data_size argument to
comp_cmd() API in order for client API's to to overflow the return buffer.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-17 14:04:36 +00:00
Ranjani Sridharan 6d59eacbce scheduler: allow RUNNING tasks to be re-scheduled in the future.
Because of a race condition between when the DONE interrupt
is sent to the host and when the previous ipc task's
state is updated to COMPLETED, new ipc's from the host
could end up not being scheduled. This leads to ipc
time outs on the host.

In order to prevent this, this patch introduces a new task state
called PENDING which is assigned to the task when it is picked
as the next task to be run. The state is then updated to running
when the task function is executed. This way when a ipc task
comes in, a RUNNING task could get scheduled again and assigned
the PENDING state to ensure that it doesnt get missed.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-12-17 13:23:10 +00:00
Jaska Uimonen 0dad013067 buffer: fix buffer produce dcache circular wrap
dcache_writeback is called for dma connected
buffers, however it doesn't take into account
the possible circular wrap if bytes size is
not exact multiple of frames period.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2018-12-14 17:06:21 +00:00