Commit Graph

2264 Commits

Author SHA1 Message Date
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
Seppo Ingalsuo fd084b765c SRC: Add useful trace information to params()
The information is useful to see without further debugging if SRC
receives from topology a sane configuration.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-12-14 17:01:00 +00:00
Tomasz Lauda 8fc6caf823 mixer: remove redundant prepare set state
Removes redundant prepare set state in mixer.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-12-14 16:45:12 +00:00
Tomasz Lauda 5ad5f07078 pipeline: remove unnecessary pipeline_init and pipeline_data
Removes unnecessary pipeline_init function and pipeline_data
structure.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-12-14 16:44:52 +00:00
Seppo Ingalsuo 78f13ed4c6 Testbench: Fix component load fail
This patch fixes fail to load components into pipeline with new() in
host testbench. The config header size need to be valid since it is
checked by SOF now.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-12-13 20:21:16 +00:00
Liam Girdwood dd98c4721e topology: apl: nocodec config out of host GW DMAC channels
By default topology is using too many capture and playback PCMs, DAIs and
pipelines for available host GW DMAC channels. Comment out some so that
DMAC channels stay within bounds. This also gives users options to
re-enable for theer given test HW.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-13 17:18:16 +00:00
Liam Girdwood 649d75d410 irq: check return value of interrupt_register()
interrupt_register(0 allocates memory so we need to check return value
and complain if it fails.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-13 17:14:28 +00:00
Liam Girdwood 13469d5951 pipeline: check pipeline init memory allocation.
Make sure we check the return value and complain if it fails.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-13 17:14:28 +00:00
Tomasz Lauda 0e4ab04d28 pipeline: timer driven ppl copy called synchronously
Timer driven pipeline_copy should execute task
synchronously. No need to involve scheduler.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-12-13 17:00:51 +00:00
Slawomir Blauciak 95c0a2136c ipc: fix trace format
Signed-off-by: Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
2018-12-13 15:57:31 +00:00
Liam Girdwood f28d3fbe22 gdb: fix ABI delta with kernel and make sure GDB flag is fully exported
Align ABI with kernel and make sure GDB enabled flag is fully exported
to all platforms.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-13 13:13:13 +00:00
Keyon Jie f18bd760bd IPC: fix component new fail issue.
We need to new component with the whole ipc struction passed in
ipc_comp_new(), e.g. struct sof_ipc_comp_dai, but not only the struct
sof_ipc_comp, otherwise, we will fail to new components and see errors
in log such as:
dai.c:208 	dai_new() error: dai_get() failed to create DAI. type:0,
index:-1106776464

Here change to pass in the whole _ipc->comp_data to fix this kind of
issues.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-12-13 13:01:01 +00:00
Marcin Maka 4097ba0910
Merge pull request #706 from jajanusz/ut-fix-ipc-mixer
test: fix mixer ut ipc
2018-12-13 12:17:36 +01:00
Rander Wang 0122caf080 alloc: bdw: fix memory error on bdw
The maximum valid address should be base + size -1

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-12-13 10:03:19 +00:00
Marcin Maka a0268d61c8
Merge pull request #707 from tlauda/topic/dw-dma-work-trace
dw-dma: change work trace to verbose
2018-12-12 21:17:44 +01:00
Tomasz Lauda f8bea63f8e dw-dma: change work trace to verbose
Changes trace call in dw_dma_work to verbose.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-12-12 14:33:17 +01:00
Janusz Jankowski dc8aaf3894 test: fix mixer ut ipc
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2018-12-12 11:52:56 +01:00
Liam Girdwood 88dee77ed3 abi: ipc: Allow ABI to grow with MINOR/PATCH updates.
This patch allows ABI changes to incrementally grow certain IPC
structure and sub structures without changing MAJOR and keeping
backwards compatability.

Adds some helper IPC copier and validation macros that should be used
when handling external IPC structures. These ensure IPC changes are
handled correctly without causing errors or failures.

IPC size should be the first item in each structure to make it as easy
as possible to manage MINOR and PATCH ABI updates without unnecessary
replacement of FW or kernel.

This patch also makes size first in the IPC command header and introduces
a new header for internal IPC sub structures. The sub structure size
can be used to validate IPC and also be used to grow tail IPC command
sub structures as MINOR/PATCH ABI changes.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-11 21:02:35 +00:00
Liam Girdwood a0cfe1e231 abi: ipc: Move mem caps and panics codes to coreect header.
Topology mem capabilities and trace panics codes should be in the
correct header for their users.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-11 21:02:35 +00:00
Ranjani Sridharan 30007ca825 topology: glk: change DMIC capture to support 4ch 16-bit format
The requirement for DMIC capture is to support upto 4ch
and 16-bit format. So modify the topology accordingly.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-12-11 20:25:33 +00:00
Liam Girdwood f16e6eef7e gdb: fix configure flag for enable/disable.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-11 20:00:53 +00:00
Tomasz Lauda 60b0622e0a alloc: change heap order for broadwell
Changes heap order in linker script for broadwell.
2018-12-11 19:52:42 +00:00
Tomasz Lauda 34ade317a2 alloc: always access memory map through cache
Changes memory map access from uncached to cached.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-12-11 19:52:42 +00:00
Tomasz Lauda 5a31460e77 alloc: make system runtime heap core specific
Extracts system runtime heap from common runtime heaps
and makes it core specific.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-12-11 19:52:42 +00:00
Bartosz Kokoszko 8ef2894a38 hda-dma: traces: added host hd-dma traces
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2018-12-07 15:51:30 +00:00
Marcin Rajwa acce742819 GDB: Added IPC trigger for GDB debug.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2018-12-07 15:49:56 +00:00