Commit Graph

741 Commits

Author SHA1 Message Date
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
Marcin Maka 45e9bc422a Removing unneeded XTOS sections from boot_ldr and main fw.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2018-05-24 12:38:56 +02:00
Seppo Ingalsuo 2979baa3e5 DMIC: Add robustness against erroneous configuration parameters
This patch ensures that modes matching request returns immediately if
the results length would exceed the allocated length. The caller function
will issue an error in such case.

Also the possibility of using array pdm[] in the IPM helper function
as uninitialized is avoided by initializing it with zeros.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-24 12:08:47 +02:00
Pierre-Louis Bossart e5dab2ada6 ipc: trap dma_start() return value, bail on error
Detected with Coverity, we check dma_start everywhere else.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-05-21 11:19:12 +01:00
Pan Xiuli 610f4c7180 APL: dw-dma: fix interrupt clear
Interrupt clear will clear all interrupt bit. If two channel is enabled
and when pause/resume one of stream, the two interrupts may happen at
same time and one of them will be wrongly cleared.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-05-21 11:19:12 +01:00
Wu Zhigang e3b10cd9c7 SOF: FIX: adjust the SSC3's TFT/RFT field in SSP
Actually I did not have full confidence about this patch.
if someone can help do more test, that would be better.
before this, do not accept this patch.

Incorrect TFT/RFT will cause DMA IRQ happened too frequently.
the interval will be less than 1ms, which will cause XRUN easily.

The old code will has this issue in TDM4-s32le test.

Signed-off-by: Wu Zhigang <zhigang.wu@linux.intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-05-18 08:56:56 +01:00
Keyon Jie da9baf3f3d host: remove first_copy workaround for HDA DMA
Here remove the first_copy workaround(it was needed as HDA DMA is not
available at the trigger start stage).

This require the fix from host driver side:
ASoC: SOF: hw-apl: start HDA DMA at stream_prepare() stage and remove
stream_trigger()

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-05-17 17:44:30 +01:00
Liam Girdwood 123dc86bd2 docker: Add details on running docker as non sudo user.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-05-17 16:36:48 +01:00
Ranjani Sridharan 23dcd1834b pipeline: fix typo in pipeline disconnect
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-05-17 15:27:56 +01:00
Seppo Ingalsuo d98e6ec4da DMIC: Move ceil_divide from numbers.c to numbers.h as static inline
The DMIC driver needs this function. This inline version is a
bit faster and the change does not increase code size.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-17 14:44:38 +01:00
Seppo Ingalsuo 1b0fc77f83 DMIC: Add for format.h conversion from fractional to float
Note: Use with care since this generic macro is currently used only in
host test bench for debug print commands so there are no speed or
precision optimized versions yet.The cast to int64_t is not necessary
for all integer types. Also float restricts precision of a 64 bit
int.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-17 14:44:38 +01:00
Seppo Ingalsuo 787b7d1a7b DMIC: Changes to CNL platform
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-17 14:44:38 +01:00
Seppo Ingalsuo c44bdd2f4d DMIC: Changes to APL platform
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-17 14:44:38 +01:00
Seppo Ingalsuo 2ebe1ab13e DMIC: DMIC: Add dmic.c to drivers Makefile.am
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-17 14:44:38 +01:00
Seppo Ingalsuo 447ac9b675 DMIC: Add configure command switch to disable DMIC
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-17 14:20:20 +01:00
Seppo Ingalsuo fdc0cf9451 DMIC: Add PDM microphones (DMIC) support to DAI
This patch adds the DMIC audio capture driver for SOF DAI component use.
The DMIC feature allows to directly attach one to (typically) four PDM
digital microphones into Intel SoC without a separate codec IC. This is
supported by APL and most successor platforms.

Corresponding patches are needed for kernel driver and topology to enable
this feature.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-17 14:20:20 +01:00
Liam Girdwood 7c5dd8cfdf Merge remote-tracking branch 'sof/master' 2018-05-14 15:12:38 +02:00
Pan Xiuli 8fbc230fbb rimage: openssl: add compatibility for openssl 1.1.0
Add compatibility support for openssl 1.0.2 support alongsid with
openssl 1.1.0

References:
https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes
Compatibility Layer

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-05-14 15:12:13 +02:00
Liam Girdwood cafe43e3d8 ssp: hsw: Initial HSW SSP driver (WiP)
Needs completion.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-05-13 20:50:38 +02:00
Pan Xiuli 1e231b9dd2 rimage: add error handler for localtime call
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-05-11 10:18:43 +01:00
Pan Xiuli ffa3e84584 rimage: fix wrong error message
If keyname can not be open, error message should output keyname insert
of tmp path.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-05-11 10:18:43 +01:00
Liam Girdwood 6c96fd34fa rimage: openssl: fix build for openssl 1.1.0
Openssl 1.1.0 is latest stable version with minor API differences.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-05-11 10:11:51 +01:00
Ranjani Sridharan 28bddadbd3 scripts: remove prefix for host build
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-05-11 10:11:34 +01:00
Ranjani Sridharan 17943a6c26 host build: include arch/string.h
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-05-11 10:11:34 +01:00
Rander Wang a083b39783 cnl-dma: remove special dma code for cnl
These code is for CNL for it is not supported that two HW IPs share
one irq pin. Now it is resolved in new algorithm, so delete it.

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-05-10 21:35:32 +01:00
Rander Wang b9fc3f50df interrupt: core: refine irq structure and algorithm
The issue for original data structure and algorithm is that:
(1)it only support 2 level interrupt architecture.
(2)it doesn't support two HW interrupt triggered by one irq pin.

Unify irq parent and child to irq_desc. Now each irq_desc maybe
directly attach to xtensa core or another irq_desc.Each irq_desc
may have 32 child list instead of 32 child.

For CNL or later chips, a group of HW IP(like GP-DMA) share
the same IRQ value. Now add id in IRQ to identify each HW interrupt.
If no IRQ shared, call SOF_IRQ to get the IRQ value, and the default
id value would be zero. otherwise call SOF_ID_IRQ to record its id in
IRQ value.

(1)Add core id check in interrupt register setting.
(2)Check child list in interrupt function
(3)Extend root irq_desc to support 4 core on cnl.
(4)Refine macro for interrupt setting

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-05-10 21:35:36 +01:00
Wu Zhigang c1f2682c21 FIX: Add dma_stop when receive trigger stop cmd in host
when ALSA lib detect xrun issue, it will send stop and start
command to DSP without reset. it will hit error in hds_dma_start,
if we did not add the dma_stop in the host_trigger function.

Signed-off-by: Wu Zhigang <zhigang.wu@linux.intel.com>
2018-05-09 19:50:59 +01:00
Seppo Ingalsuo 2927377c45 SHIM: Correction for the APL header file macro
The macro doesn't use the parameter x so better to remove it.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-05-09 19:48:49 +01:00