Commit Graph

1593 Commits

Author SHA1 Message Date
Liam Girdwood 7d661d3979
Merge pull request #601 from mrajwa/icl_work
DMIC: Added power gating.
2018-11-21 14:57:28 +00:00
Marcin Rajwa 04c97d024c DMIC: Added power gating.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2018-11-20 22:54:37 +01:00
Liam Girdwood 43081afa6d
Merge pull request #598 from tlauda/topic/issue-531
clk: trace error on wrong clock type
2018-11-20 19:55:43 +00:00
Liam Girdwood 0db8f3d1db
Merge pull request #597 from zhuyingjiang/topic/sof-dev-fix-version-number
scripts: add local version number file
2018-11-20 19:52:05 +00:00
Tomasz Lauda c66c02838b clk: trace error on wrong clock type
Avoids null dereference in clock_set_freq in case
of wrong clock type.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-11-20 10:44:36 +01:00
Zhu Yingjiang 0a433c831e scripts: add local version number file
we now using git tag for version number control, but if
we release the code without .git/ folder, the git tag version
number is not present, so will cause compile error.
add the .tarball-version file as the local version number file,
it still can be generated by the autogen.sh from git tag. So
everytime anyone make a git tag should still modify the
.tarball-version file.

Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2018-11-20 14:32:59 +08:00
Liam Girdwood 041a56c541
Merge pull request #593 from lbetlej/LDOCTL_access_cleanup
LDO Control - unification of control macros for LDOCTL bits
2018-11-19 14:38:00 +00:00
Liam Girdwood 5434ce0f35
Merge pull request #578 from bkokoszx/trace-comp/pipe-ids
pipeline: remove tracing invalid pipe/comp ids
2018-11-19 14:27:26 +00:00
Bartosz Kokoszko db6d9fc3bb pipeline: remove tracing invalid pipe/comp ids
In functions pipeline_buffer_connect and pipeline_comp_connect
I have removed possibility to make log with pipe/comp ids, because
pipeline ptr in struct comp_dev is not initialize until
connect_upstream or connect_downstream invocation.

fixes #562

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2018-11-19 15:02:56 +01:00
Lech Betlej c522b6692e LDO Control - unification of control macros for LDOCTL bits
Unified access macros across ApolloLake, CannonLake, SueCreek, Icelake.
Including clean up in HP SRAM init procedure at boot loader.

Signed-off-by: Lech Betlej <lech.betlej@linux.intel.com>
2018-11-19 13:56:18 +01:00
Liam Girdwood 977fdd5701
Merge pull request #585 from thesofproject/topic/ipc-updates
IPC updates to improve logging and support ABI changes
2018-11-16 21:05:47 +00:00
Liam Girdwood 98f0b36666
Merge pull request #589 from lbetlej/ldo_ctrl_on_D3_entry
LDO control on D0->D3 transtion for CannonLake
2018-11-16 20:55:35 +00:00
Lech Betlej 03fb10ffae LDO control on D0->D3 transtion for CannonLake
HP SRAM LDO needs to be switched off on D0->D3 transition to reduce
power consumption.

Signed-off-by: Lech Betlej <lech.betlej@linux.intel.com>
2018-11-16 16:22:51 +01:00
Liam Girdwood 557a82d617
Merge pull request #587 from jajanusz/fix-dmic-16b
dai: dmic: fix 16 bit capture
2018-11-16 15:14:08 +00:00
Janusz Jankowski 2615914122 dai: dmic: fix 16 bit capture
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2018-11-16 14:49:00 +01:00
Liam Girdwood 296c86c009
Merge pull request #570 from jajanusz/fix-smp
platform: fix smp builds
2018-11-16 10:15:48 +00:00
Liam Girdwood 2183aede83 ipc: Fix false positive IPC dropped messages.
On receiving an IPC IRQ the handler currently does not check the
IRQ mask. This means notification received ACKs (i.e. for trace updates)
from the host may be reported as duplicate host command IPCs.

Fix this by checking IPC IRQ mask.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-11-15 23:18:59 +00:00
Liam Girdwood 894886ab1e ipc: trace: standardise trace output and improve trace debug
Improve trace for IPC.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-11-15 23:18:59 +00:00
Janusz Jankowski b5af84deaa scripts: add smp builds to xtensa-build-all.sh
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2018-11-15 13:46:33 +01:00
Janusz Jankowski 28d790be88 platform: increase sof_text size for smp builds
Need 300b for APL and 700b for ICL, but need
to add 2k because of rimage

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2018-11-15 13:46:25 +01:00
Liam Girdwood 43120c923f
Merge pull request #575 from slawblauciak/dma_release_fix
dma: make sure the HDA DMA pointers are aligned after release
2018-11-14 10:10:15 +00:00
Slawomir Blauciak a69605db49 dma: make sure the HDA DMA pointers are aligned after release
Signed-off-by: Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
2018-11-14 10:56:37 +01:00
Liam Girdwood c05850c0f4
Merge pull request #572 from thesofproject/topic/trace-updates
hda-dma: trace: further improvements to HDA DMA trace output.
2018-11-13 22:11:40 +00:00
Liam Girdwood df028c0850 ipc: trace: Improve trace output on APL.
Improve the trace output on APL IPC.
TODO roll out to other platforms.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-11-13 21:22:28 +00:00
Liam Girdwood 4ba8399e12 hda-dma: trace: further improvements to HDA DMA trace output.
Further improvements and correction to HDA DMA trace output.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-11-13 21:17:42 +00:00
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
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
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
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 805bcb1072
Merge pull request #557 from akloniex/less-text-usage
Lower size of .text section
2018-11-09 09:57:11 +00:00