Commit Graph

768 Commits

Author SHA1 Message Date
Liam Girdwood f1456e00db scripts: xtensa-build-all.sh. Fix bash error.
make[1]: Leaving directory '/home/lrg/source/reef/sof.git'
./scripts/xtensa-build-all.sh: line 123: [: ==: unary operator expected

Fix, set variable to "none" if xcc not found.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-06-14 16:16:39 +01:00
Ranjani Sridharan 9c9c4a4b17 scripts: use xt-xcc for compiling if available
Check ENV XTENSA_TOOLS_ROOT to determain which compiler to use, and set
the PATH and other ENV needed for xt-xcc.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-06-14 14:05:32 +01:00
Ranjani Sridharan 1d9567bb72 pipeline: remove dmac id and dmac chan from static pipeline host and dai defs
dmac id and dmac chan no longer come from topology. So remove them.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-13 08:30:10 +01:00
Ranjani Sridharan 303a3ccac2 ipc: remove dmac id and dmac chan members from host and dai ipc comp def
The new dma_get() API does not use the dmac id and dmac chan info
from topology anymore. So remove these members from the host/dai
ipc comp def.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-13 08:30:03 +01:00
Ranjani Sridharan 7b137b4056 dma: fix comment for num_channels_busy
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-13 08:27:40 +01:00
Pan Xiuli b0affc18c3 scripts: docker: remove sudo command
miss some sudo command, remove all sudo command.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-06-12 10:20:40 +01:00
Ranjani Sridharan 0a0a106df0 dma:trace: dma_copy_new() does not need DMAC ID anymore
Update dma_copy_new() to be compatible with dma_get(). Remove the DMAC
ID argument and the corresponding PLATFORM_TRACE_DMAC definitions.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-12 08:30:37 +01:00
Ranjani Sridharan 700197d49f dma: Introduce new API for dma_get()
This patch introduces a new API for allocating DMAC's by taking into
account the dma dev type, copy direction, capabilities and access
control requested by the user. It also updates also users to use
the new API.

It also consolidates the new API in a common file for all platforms.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-12 08:30:37 +01:00
Ranjani Sridharan af3acc8b7f dma: introduce parameter to store the number of channels draining
This patch adds the num_channels_busy member to the dma structure
which will be helpful in determining DMAC to be allocated
to users based on the number of channels draining. This is help
provide a primitive level of QoS and prevent DMAC overuse.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-12 08:30:37 +01:00
Ranjani Sridharan 9a786e7193 dma: update platform DMAC definitions with the supported dev types, dir and capabilities
This patch updates the platform DMAC definitions to include information
about the supported dev types, copy directions and capabilities.

It also replaces the copy_dir enum with a bitmask and adds
the copy capabilities and dev type bitmasks.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-12 08:30:37 +01:00
Ranjani Sridharan 1c085d1f8e platform: dma: move dmac initialization
This patch proposes to move the platform DMAC initialization
code to the dmac_init() routine.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-12 08:30:36 +01:00
Tomasz Lauda cd0044e686 test: unit tests for list.h
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2018-06-11 20:12:43 +01:00
Janusz Jankowski d6d9efb90c test: enable cmocka unit tests for SOF
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2018-06-11 20:11:32 +01:00
Pan Xiuli 18082e3869 scripts: docker: merge commands and remove src after build
Merge the build and remove src to reduce the layer size.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-06-11 17:07:36 +01:00
Pan Xiuli 03a514dcb1 scripts: docker: simplify docker build
Merege commands to reduce layers and remove some useless layers.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-06-11 17:07:36 +01:00
Pan Xiuli cc4850df19 scripts: docker: change to Ubuntu 18.04
Ubuntu 18.04 use gcc-7 as default, use it to reduce alternative gcc
installation layer.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-06-11 17:04:36 +01:00
Pan Xiuli 792bd414ee scripts: refine build all script
Add a flag "-l" to make rimage install only in pdw/local.
Also add parse for args, then simplify platform build for loop since in
parse the args will be all legal

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-06-10 20:25:21 +01:00
Pan Xiuli 408d9358f6 configure: Change install prefix for bin and keys
Install prefix will not influce PEM install path. Add the check to let
PEM can install with the prefix.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-06-10 20:25:21 +01:00
Kamil Kulesza d932982dfc arch: xtensa: set SRAM window error codes during bootloader
Set status (0x05) and error (0x00) code in Memory Window 0 when the bootloader starts.
boot_entry.S - set status (0x05) and error (0x00) code before wnd0 reprogram
platform/memory.h - increase bootloader size

Signed-off-by: Kamil Kulesza <kamil.kulesza@linux.intel.com>
2018-06-08 19:51:04 +01:00
Marcin Maka e5e8709dae platform: extract common API from platform headers.
Common platform API separated to avoid duplicated declarations
and group public functions to be implemented by every platform.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2018-06-08 19:51:04 +01:00
Tomasz Lauda 80f3d47215 apl: core: enable boot loader path for Apollolake
This patch:
- Enables APL boot via SRAM,
- Disables L2 cache for APL,
- Reshapes linker scripts for APL and CNL.
- Adds support for using external xtensa headers for xt-xcc.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-06-07 21:22:28 +01:00
Seppo Ingalsuo 0ac40ab33f README: Fix a typo in the example SOF configure command
The $PWD environment variable (the current directory) need to be in
upper case.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-06-07 21:21:27 +01:00
Pan Xiuli f6f3ab0d55 scripts: docker: Add proxy settings
Modify Dockerfile to copy apt.conf from host and set host proxy to
environment. Also modify some git url to http url in order to use the
proxy.

Also add a docker-build.sh to help docker build

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-06-05 13:21:00 +01:00
Rander Wang 54d265e7ec SSP: refine ssp stop function
merge commit 72e63a467f ("apl-ssp: change and wrap status
transition into ssp_stop")

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-06-05 10:28:39 +01:00
Rander Wang 1ea2941cda SSP: refine ssp config function
(1)Remove unused code
(2)Refine comments
(3)Refine master & slave mode setting
(4)Refine Frame polarity setting

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-06-05 10:28:39 +01:00
Kamil Kulesza 0228d8d7ba version.sh: fix FW version parsing
Fixed version.sh script - now it handles longer build names.

Signed-off-by: Kamil Kulesza <kamil.kulesza@linux.intel.com>
2018-06-04 13:54:25 +01:00
Tomasz Lauda ac7b0c227a rimage: add support for automatic MEU signing
This patch allows rimage to sign FW binaries using MEU tool.
Paths to MEU and private key have to be provided during config step.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-06-04 13:54:25 +01:00
Tomasz Lauda e499997302 rimage: add correct FW version to binary
Now correct FW version is included into binary.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-06-04 13:54:25 +01:00
Tomasz Lauda a88530a11c ipc: remove duplicated sof_ipc_hdr from sof_ipc_dai_ssp_params
We don't need duplicated sof_ipc_hdr.
This change also requires change in kernel.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-06-04 13:54:25 +01:00
Tomasz Lauda b8e097b015 ipc: remove duplicated sof_ipc_chmap from sof_ipc_pcm_params
We don't need duplicated sof_ipc_chmap.
This change also requires change in kernel.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-06-04 13:54:25 +01:00
Tomasz Lauda 4529812967 atomic: add atomic_read and atomic_set
This patch adds atomic_read and atomic_set methods.
Also includes xtensa implementation of those methods.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-06-04 13:54:25 +01:00
Marcin Maka d3200d1074 arch: sw task irq handlers de-duplicated.
There is no need to implement dedicated irq handler per each sw irq level.
A single implementation may use the context passed by XTOS.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2018-06-04 13:54:25 +01:00
Rander Wang 933f275d43 BDW: refine ssp start function
Set Tx|Rx Enable for starting playback|capture

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-06-04 10:16:23 +01:00
Rander Wang 5af786cfc8 BDW: init HW registers at setup time
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-06-04 10:15:13 +01:00
Wu Zhigang a7ce8ee93f component: fix typo in trigger macro ids
the trigger macro ids are typed incorrect
in the component.h.

Signed-off-by: Wu Zhigang <zhigang.wu@linux.intel.com>
2018-06-04 09:46:53 +01:00
Wu Zhigang 7aa3651b65 host: xrun: During XRUN recover process, host dma should be stopped first.
During XRUN recover process (in pipeline_xrun_recover() function),
"COMP_TRIGGER_XRUN" cmd will be processed first, then "COMP_TRIGGER_START"
cmd will be processed. If the host dma is not stopped in the first
cmd process, we will hit "eS0" error in the hda_dma_start() function during
"COMP_TRIGGER_START" cmd process. the XRUN recover process will fail.

Signed-off-by: Wu Zhigang <zhigang.wu@linux.intel.com>
2018-06-04 09:46:25 +01:00
Ranjani Sridharan 65ddcddfcc host: add missing include directories and library dependencies
This patch adds the missing paths for header files and
libraries required for building the host testbench.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-01 17:46:29 +01:00
Rander Wang fdd6bcc1b9 SSP: refine padding bit setting on Broadwell
merge commit 36f23c6cc3 ("apl-ssp: fix padding bit issues in
I2S/LEFT_J mode") and refine it on Broadwell.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-06-01 09:52:42 +01:00
Ranjani Sridharan c02e34fdfc DMIC: configure DMIC with parameters from ipc instead of hardcoded params
This patch makes the following changes to configure DMIC from ipc params:

1. remove redundant hdr member item from struct sof_ipc_dai_dmic_params
2. Rename number_of_pdm_controllers member in the above structure
to num_pdm_active to be more representative of the active pdm count.
3. Add an "id" member to struct sof_ipc_dai_dmic_pdm_ctrl
4. Remove hardcoded config params from DMIC set_config function
and use ipc params instead.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-01 09:50:22 +01:00
Ranjani Sridharan c8bc724ad9 doc: add README for host testbench
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-01 08:28:16 +01:00
Ranjani Sridharan 48c52ee5eb scripts: add script for building host library and invoking the testbench
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-01 08:28:16 +01:00
Ranjani Sridharan a169fa356d host: include host testbench directory for compilation
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-01 08:28:16 +01:00
Ranjani Sridharan 75bb4a6700 host: add testbench program
This patch adds the testbench that parses a test topology file,
and sets up the pipeline for processing. It schedules pipeline_copy()
for reading samples from an input file, processing them through a
pipeline and writing the processed samples to the output file.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-01 08:28:16 +01:00
Ranjani Sridharan 1d5b67f42a host: add new component for file IO
This patch adds a new file component that testbench
can use to read in samples and write out processed samples. Both
text and raw pcm input formats are supported.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-01 08:28:16 +01:00
Ranjani Sridharan 4670402432 host: add host testbench common source and header files
This patch adds the common header and source files required for all
component testbench. These files include routines for parsing
topology files, initializing sof ipc, scheduler, memory allocation
and pipeline structures. It also provides simpler implementations for
some of the SOF features such as tracing.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-06-01 08:28:16 +01:00
Keyon Jie 131a188763 platform: apl: expand max stream number to be 16
On GP-MRB, we may use streams more than 5, here expand it to be
16.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-05-31 09:38:52 +01:00
Seppo Ingalsuo 48a61423f6 SSP: Add trace print for config->format value into ssp_set_config()
This patch adds the trace information to BYT and APL platforms type
SSP drivers. The traced value helps to determine the configured serial
bus format.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-29 17:37:01 +02:00
Marcin Maka 9ce979fc2d makefile: link reset vector to main image if there is no boot ldr
Reset vector linked to main image is not executed if there
is boot ldr in the path.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2018-05-29 17:37:01 +02:00
Pan Xiuli 35f3b9e5bf makefile: add reset vector back
Without reset vector, APL and BYT will fail to boot up.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-05-25 16:47:39 +02:00
Marcin Maka fba1f1b106 Replacing #define for WAITI behavior.
A non-platform define may be easily shared by other platforms
without adding || define(CONFIG_...) in the arch code.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2018-05-24 12:38:56 +02:00