Commit Graph

2303 Commits

Author SHA1 Message Date
Guennadi Liakhovetski c17be235ba dw-dma: fix a comment
Fix an error in a comment.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-11 15:19:36 +00:00
Guennadi Liakhovetski 64bbee865b logger: support reading from a serial port
On some systems the DSP has no DMA interface to the host and is
using a serial port for sending its trace. This patch adds a "-u"
argument to specify a baudrate, that should be used with the serial
interface. The implementation takes care of spurious bytes,
sometimes seen in the beginning of the trace, produced by the port
initialisation by the DSP. The format is fixed to 8N1.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-11 11:44:21 +00:00
Guennadi Liakhovetski 28039d3024 logger: (cosmetic) fix the return value, use pointers
1. Programs shouldn't exit with negative return values, strictly
   speaking only EXIT_SUCCESS and EXIT_FAILURE should be used,
   however it is also valid to return 0 for success and any number
   from 1 to 125 for a failure.
2. Avoid passing complete structs as function parameters where an
   additional copy of one isn't needed, use const pointers instead.
3. Remove a left-over unused argument.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-11 11:44:21 +00:00
Liam Girdwood 9ef3826a05 sue-creek: remove irrelevant for SUE Creek definitions
memory.h for the SUE Creek platform currently contains several
definitions, copied over from other platforms, having a direct
memory-based connection between the host CPU and the DSP, that
aren't relevant for the SUE Creek. Remove those definitions.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-10 16:38:25 +00:00
Pan Xiuli 26528f6313 scripts: default to have local rimage install
rimage will default to be build and install to local folder to avoid
ABI changes issues.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-01-10 15:10:10 +00:00
Pan Xiuli 3b2cfd80f9 scripts: remove all soft related stuff
soft is now sof/tools remove all outdated things.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-01-10 15:10:10 +00:00
Liam Girdwood 3baddf338e prefctl: sml: make sure prefctl settings match UP settings.
SMP prefctl setting should be the same as UP prefctl settings. Fix this.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-01-10 14:23:32 +00:00
Bartosz Kokoszko c0130e40a5 list: removing unnecessary list_item_del_init func
list_item_del_init function  had exactly the same
effect as list_item_del function

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2019-01-10 14:21:24 +00:00
Bartosz Kokoszko f6f23ec4cb dw-dma: dw-dma.c displacement to top driver dir
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2019-01-10 14:12:47 +00:00
Liam Girdwood a94bcfb447 trace: dai: Improve some DAI trace messages.
Use 0x%08x format for SSP registers and trace every dai_config()

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>

fix
2019-01-10 14:10:01 +00:00
Bartosz Kokoszko 77dccad986 ipc: moving src/ipc/*-ipc.c files to drivers dir
I've moved src/ipc/*-ipc.c to src/drivers/intel directory
each for specific platform. I've merged apl-ipc.c and
cnl-ipc.c using CONFIG_* defines and placed the result
file ipc.c in src/drivers/intel/cavs.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2019-01-10 13:26:01 +00:00
Guennadi Liakhovetski 1796980979 bootloader: change the start address to match the linker script
The linker script on platforms, using the boot-loader places the .text
section at SOF_TEXT_BASE, not at SOF_TEXT_START, the same name should be
used for the start address in assembly even though so far on all
platforms both names refer to the same location.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-10 12:45:30 +00:00
Seppo Ingalsuo 843553646a Topology: Add volume control into SRC playback pipeline
This patch adds a volume component after SRC to be able to convert
the variable pipeline s16/s24/s32 PCM format into PCM format used
by DAI. The PCM capabilities are changed to allow all formats.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-01-09 16:30:58 +00:00
Seppo Ingalsuo 81e0333e19 Testbench: Add S16_LE format test for SRC
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-01-09 16:30:58 +00:00
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