Commit Graph

2098 Commits

Author SHA1 Message Date
Liam Girdwood 6e187c7112
Merge pull request #569 from thesofproject/topic/dma-validate
DMA channel validation
2018-11-13 20:18:32 +00:00
Liam Girdwood 2cc38aa034 dw-dma: validate channels and improve trace output
Validate user supplied data and improve trace output on any errors.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-11-13 16:48:43 +00:00
Liam Girdwood 713ba7de81 hda-dma: validate channels and improve trace output
Validate user supplied data and improve trace output on any errors.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-11-13 16:45:36 +00:00
Liam Girdwood 7db073a354
Merge pull request #568 from akloniex/fix-ut
UT: Fix unit tests after faulty PRs were merged.
2018-11-13 15:20:00 +00:00
ArturX Kloniecki 6ba817bee6 UT: Fix unit tests after faulty PRs were merged.
Signed-off-by: ArturX Kloniecki <arturx.kloniecki@linux.intel.com>
2018-11-13 16:06:50 +01:00
Liam Girdwood 4c8deb72a3
Merge pull request #561 from lbetlej/cnl_pg_sram_on_d3
Added SRAM power gating on D3 entry for cAVS 1.8 (i.e. Cannonlake).
2018-11-13 14:59:18 +00:00
Liam Girdwood e3e4442c34
Merge pull request #566 from libinyang/coverity_error_handling
host: fix coverity check issue of error handling
2018-11-13 14:58:42 +00:00
Liam Girdwood 8b48aca7f3
Merge pull request #565 from libinyang/coverity_dw_dma
dw-dma: fix dw_dma_work reschedule issue
2018-11-13 14:55:51 +00:00
Liam Girdwood 5894ed4cc5
Merge pull request #126 from bkokoszx/logger-verbose-warnings
logger: added Werror and Wall and removed warnings
2018-11-13 14:36:45 +00:00
Lech Betlej 1e47b4af4a Added SRAM power gating on D3 entry for cAVS 1.8 (i.e. Cannonlake).
On D3 entry FW needs to power gate both LP & HP SRAM banks. The power
gating is done from code executed from L1 cache.

Signed-off-by: Lech Betlej <lech.betlej@linux.intel.com>
2018-11-13 12:52:52 +01:00
Bartosz Kokoszko d6bb7043b7 logger: added Werr and Wall and removed warnings
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2018-11-13 10:12:56 +01:00
Libin Yang 39780cb0ce host: fix coverity check issue of error handling
When host stop fails, it should return the errno.

This patch fixes the coverity the below coverity check issue:

static int host_trigger(struct comp_dev *dev, int cmd)
273{
274 struct host_data *hd = comp_get_drvdata(dev);
275 int ret = 0;
276
277 trace_host("trg");
278
279 ret = comp_set_state(dev, cmd);
280 if (ret < 0)
281 goto out;
282
283 switch (cmd) {
284 case COMP_TRIGGER_STOP:

CID 324978 (#1 of 1): Unused value (UNUSED_VALUE)
returned_value: Assigning value from host_stop(dev) to ret here,
but that stored value is overwritten before it can be used.
285 ret = host_stop(dev);
286 /* fall through /
287 case COMP_TRIGGER_XRUN:
288/ TODO: add attribute to dma interface and do run-time if() here */
289#if defined CONFIG_DMA_GW
value_overwrite: Overwriting previous write to ret with value from
dma_stop(hd->dma, hd->chan).
290 ret = dma_stop(hd->dma, hd->chan);
291#endif

Signed-off-by: Libin Yang <libin.yang@intel.com>
2018-11-13 13:53:05 +08:00
Liam Girdwood 73475e3fbb
Merge pull request #564 from akloniex/mtrace-event
debugability: Fix potential buffer overflow in mbox traces
2018-11-12 19:32:12 +00:00
ArturX Kloniecki 271c75aa71 debugability: Fix potential buffer overflow in mbox traces
Buffer overflow was possible when mbox traces of varying length were
logged consecutively, near end of the buffer, petentially leading to
next segment of memory being overwritten with garbage.
Also log entry was pasted twice, once to the on-stack buffer, and then
separately to the mailbox. Now data is being copied to both from the same
source.
Also separating this to a function call, reduces overall .text section of FW.

Signed-off-by: ArturX Kloniecki <arturx.kloniecki@linux.intel.com>
2018-11-12 15:34:49 +01:00
Libin Yang 8f5baceaff dw-dma: fix dw_dma_work reschedule issue
If the channel is not running, we should remove the task of dma work.

This patch fixes the coverity issue below:
static uint64_t dw_dma_work(void *data, uint64_t delay)
1063{
1064 struct dma_id *dma_id = (struct dma_id *)data;
1065 struct dma *dma = dma_id->dma;
1066 struct dma_pdata p = dma_get_drvdata(dma);
1. var_decl: Declaring variable next without initializer.
1067 struct dma_sg_elem next;
1068 int i = dma_id->channel;
1069
1070 tracev_dma("wrk");
1071
1072 / skip if channel is not running */
2. Condition p->chan[i].status != 5, taking true branch.
1073 if (p->chan[i].status != COMP_STATE_ACTIVE) {
1074 trace_dma_error("eDs");
3. Jumping to label out.
1075 goto out;
1076 }
1077
1078 dw_dma_process_block(&p->chan[i], &next);
1079
1080out:

CID 324979 (#1 of 1): Uninitialized scalar variable (UNINIT)
4. uninit_use: Using uninitialized value next.size.
1081 return next.size == DMA_RELOAD_END ? 0 : p->chan[i].timer_delay;

Signed-off-by: Libin Yang <libin.yang@intel.com>
2018-11-12 21:37:38 +08:00
Pierre Bossart 5838f7175f
Merge pull request #529 from thesofproject/topic/abi
ABI updates with Semantic versioning
2018-11-11 08:52:35 -06:00
Liam Girdwood 0f3e1ee0bd debug: make sure debug status is sent to host at boot.
Send debug status to host at boot.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-11-09 21:19:11 +00:00
Liam Girdwood c5a4f121be ipc: remove intel-ipc.h.
Move contents to ipc.h, nothing Intel specific about header

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-11-09 21:19:11 +00:00
Liam Girdwood 2ba01165b9 uapi: split ipc.h and abi.h into small files.
Split the larger ABI files into smaller more manageable chunks. Also
split by end user into IPC and user space ABIs.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-11-09 21:19:11 +00:00
Liam Girdwood fe1c63b528 ci: travis: Update travis to use new xtensa-buildall.sh args
Updated args on xtensa-buildall.sh.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-11-09 16:16:38 +00:00
Liam Girdwood c6cdadad14 scripts: checkpatch: check for ABI updates
Make sure ABI updates update atleast a single version number.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-11-09 16:16:38 +00:00
Liam Girdwood 24f30e1517 uapi: abi: Use semantic ABI versioning.
Use semantic ABI versioning with major, minor and patch versioning
according to https://semver.org/

Also make sure micro version is included in ABI version.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-11-09 16:16:38 +00:00
Liam Girdwood 08236fcb46 build: make builds reproducible.
Add a debug option to include build number, date and time into build.
This will be disabled b default so that all builds are reproducible.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-11-09 16:16:38 +00:00
Liam Girdwood b15b9f350f uapi: ipc: Add reserved padding and convert enums to uint32_t.
Add reserved fields to structures that contain variable length data
sections to allow for future ABI compatibility. Also make all enums
into uint32_t type to prevent compliers treating enum packing
differently.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-11-09 16:16:38 +00:00
Liam Girdwood 0762095b1b
Merge pull request #559 from mrajwa/icl_work
I2S: Not enough padding for 24/32b, 48kHz
2018-11-09 16:14:24 +00:00
Liam Girdwood 2cd668ccfa
Merge pull request #125 from bkokoszx/logger-string-overflow
logger: string overflow warning fix
2018-11-09 14:30:58 +00:00
Bartosz Kokoszko b141daee34 logger: string overflow warning fix
fixes #124

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2018-11-09 15:07:19 +01:00
Marcin Rajwa 1607737183 I2S: Not enough padding for 24/32b, 48kHz
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2018-11-09 12:58:11 +01:00
Liam Girdwood 73c8a136cb
Merge pull request #118 from bkokoszx/logger-fw-verification
logger: add firmware verification capability
2018-11-09 09:59:00 +00:00
Liam Girdwood 805bcb1072
Merge pull request #557 from akloniex/less-text-usage
Lower size of .text section
2018-11-09 09:57:11 +00:00
Liam Girdwood 7ef4ca9175
Merge pull request #558 from libinyang/increase_runtime_memory_on_more_platforms
memory: increase HEAP_RT_COUNT256 size
2018-11-09 09:46:30 +00:00
ArturX Kloniecki 8a7ed10cab Lower size of .text section
Removed 5 parameter trace_event macro implementation.
Removed inline
specifier from __panic function definition.
I've observed, that recent growth of .text section size was caused
by 2 major factors: 2 instances of inlined __panic function
yielding 1.7kB and recent addition of 5 param trace_event
yeilding 0.5kB of used .text. section space.

Signed-off-by: ArturX Kloniecki <arturx.kloniecki@linux.intel.com>
2018-11-09 09:44:24 +01:00
Liam Girdwood 2f7b57551a
Merge pull request #555 from singalsu/fix_vol_mult_s24_to_s16
Volume: Bug fix for vol_mult_s24_to_s16() function
2018-11-09 08:40:14 +00:00
Libin Yang 7eb36a4f2d memory: increase HEAP_RT_COUNT256 size
This patch increases HEAP_RT_COUNT256 size from 64 to 80 on
cannonlake, icelake and suecreek.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2018-11-09 10:12:39 +08:00
Seppo Ingalsuo f4049bb7d6 Volume: Bug fix for vol_mult_s24_to_s16() function
The previous commit introduced a bug in this volume function. The input
parameter for s24 PCM samples must be int32_t. The bug causes for s24 to
s16 converted audio very low signal level and noise due to overflows.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-11-08 18:36:06 +02:00
Liam Girdwood 9b376d7bd4
Merge pull request #548 from bkokoszx/revert-host-traces
host: trace: revert host traces to fprintf
2018-11-08 14:57:49 +00:00
Liam Girdwood cee5f5f430
Merge pull request #554 from mwierzbix/workaround-build_fail_for_smt_too_big_sof_text
debugability: workaround for SOF_TEXT_SIZE too big with smp enabled
2018-11-08 14:56:53 +00:00
Bartosz Kokoszko e69b42fccb host: trace: revert host traces to fprintf
Host doesn't use trace mechanism - I've reverted
all host traces to simple fprintf.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2018-11-08 15:23:26 +01:00
Michal Jerzy Wierzbicki 68bce2514e debugability: workaround for SOF_TEXT_SIZE too big with smp enabled (issue553)
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2018-11-08 13:34:22 +01:00
Liam Girdwood 431711c8cb
Merge pull request #543 from mwierzbix/debugability-macro-metaprog-bugfix-varargcount_0_for_parenthesis
preproc: varargscount: bugfix for tokens starting with '(' not being counted
2018-11-08 11:36:26 +00:00
Liam Girdwood 11f27aca1c
Merge pull request #540 from zhuyingjiang/topic/add-manifest-1.5
[RFC]Topic/add 1.5 manifest and rimage
2018-11-08 11:35:26 +00:00
Michał Jerzy Wierzbicki f092d906fc
Merge branch 'master' into debugability-macro-metaprog-bugfix-varargcount_0_for_parenthesis 2018-11-08 12:22:05 +01:00
Zhu Yingjiang 5912e40fe3 change the 1.8 and 1.5 header defines
add comments and change the 1.5 1.8 header defines

Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2018-11-08 18:53:29 +08:00
Bartosz Kokoszko 105b9b51ab logger: logging topology number for component
I've added printing component topology number
(i.e. pipeline_id.component_id). If id's are not
defined logger will not print any values.
e.g.:
CORE  LEVEL      COMP_ID                TIMESTAMP ...
   0      2         HOST            487048.229167 ...  (not defined id's)
   0      2         PIPE 1.3        591235.052083 ...  (defined id's)

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2018-11-08 10:05:25 +01:00
Liam Girdwood 868feb6f78
Merge pull request #549 from libinyang/increase_apl_runtime_memory
memory: apl: increase HEAP_RT_COUNT256 size
2018-11-08 08:49:24 +00:00
Liam Girdwood 3256781a74
Merge pull request #541 from libinyang/init_heap_in_right_way
alloc: fix memory heap initialization
2018-11-08 08:47:56 +00:00
Libin Yang db728a7c11 memory: apl: increase HEAP_RT_COUNT256 size
This patch fixes the memory allocation error for nocodec platform
by increasing HEAP_RT_COUNT256 size

Signed-off-by: Libin Yang <libin.yang@intel.com>
2018-11-08 10:58:09 +08:00
Libin Yang 159f118a99 alloc: fix memory heap initialization
This patch fixes the bug of runtime & buffer memory heap initialization,
and sets the correct base address for each map.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2018-11-08 09:37:06 +08:00
Liam Girdwood 019eadebcf
Merge pull request #530 from akloniex/ids-in-trace
debugability: pipeline and component ids in trace messages
2018-11-07 15:14:28 +00:00
ArturX Kloniecki 42179929d2 debugability: Refactor dai traces to fully utilize trace_event
Signed-off-by: ArturX Kloniecki <arturx.kloniecki@linux.intel.com>
2018-11-07 13:45:56 +01:00