Commit Graph

3670 Commits

Author SHA1 Message Date
Pan Xiuli 381063d266 topology: add tigerlake platform info
Modify from icelake.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-08-28 12:20:20 +02:00
Paul Olaru 68fec5d9dd drivers: imx: Add initial IRQ_STEER support
The IRQ_STEER module is a cascaded interrupt controller on the
i.MX platforms. Most shared interrupts can only be delievered via this
IRQ_STEER, including those required by the (upcoming) EDMA and ESAI
drivers (for the DAI).

This commit adds the initial support.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-08-28 08:26:39 +03:00
Paul Olaru db54499770 sof: Add ffsl and ffsll macros
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-08-28 08:26:39 +03:00
Janusz Jankowski 57012168a1 tgl: add PLATFORM_IRQ_HW_NUM
Add missing define for HW IRQ.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-08-27 15:00:07 +02:00
Janusz Jankowski c6af31071a ssp: power gating
Add I2S power gating features that were introduced in Tigerlake.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-08-27 13:45:16 +02:00
Janusz Jankowski efd935d317 cmake: meu: support tigerlake
Add support for MEU 15 that is needed for Tigerlake.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-08-27 13:45:16 +02:00
Janusz Jankowski 37f9caab63 tigerlake: defconfig
Add default config for Tigerlake.
It's similiar to Icelake, but has 1 less HPSRAM bank.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-08-27 13:45:16 +02:00
Janusz Jankowski 9ee66793e7 cmake: tigerlake support
Add support in CMake for Tigerlake building and signing.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-08-27 13:45:16 +02:00
Janusz Jankowski e816cdbeb2 platform: cavs: init for tigerlake
Update platform_init for Tigerlake.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-08-27 13:45:16 +02:00
Janusz Jankowski 61ce95f274 pm: update for tigerlake
Update pm_runtime to support tigerlake in the same way as icelake.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-08-27 13:45:16 +02:00
Janusz Jankowski bf5883e46b dma: update for tigerlake
Update DMA defines to include Tigerlake platform.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-08-27 13:45:16 +02:00
Janusz Jankowski 9040d3db6d dmic: update for tigerlake
Add support for Tigerlake in DMIC driver.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-08-27 13:45:16 +02:00
Janusz Jankowski e13c7f24bf Kconfig: tigerlake config
Add config for Tigerlake platform.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-08-27 13:45:16 +02:00
Janusz Jankowski e05827ff1c ipc: check pm_prepare_D3 for CAVS 2.0+
Perform check on all CAVS 2.0+ platforms, not just for 2.0.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-08-27 13:45:16 +02:00
Janusz Jankowski c480c1470b Kconfig: add CAVS 2.5 config
Introduce config for CAVS 2.5 version.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-08-27 13:45:16 +02:00
Janusz Jankowski 51c32a4b69 tigerlake: core-isa
Update core-isa.h with definitions from Xtensa core.
It is needed for GCC compiler.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-08-27 13:45:16 +02:00
Janusz Jankowski 4aac94b405 platform: tigerlake
Initial version of TGL platform - based on ICL.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-08-27 13:45:16 +02:00
Janusz Jankowski 3dbeefac49 rimage: tgl machine definition
Add support for tgl platform in rimage tool.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-08-27 13:45:16 +02:00
Janusz Jankowski 2db4679820 rimage: xcc module offset option
This argument is needed in case of platforms that have different
modules padding in xcc binaries.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-08-27 13:45:16 +02:00
Andrei Emeltchenko df9897997a cavs: ssp: Fix trace error printing
Fixes compiler error building SSP.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-08-27 12:06:54 +02:00
Paul Olaru c21de62cfc platform: imx: Prepare for supporting i.MX IRQ_STEER
On the IRQ_STEER cascaded interrupt controller we have 512 interrupts
mapped to 8 HW interrupt lines. Each of these HW interrupt lines
supports 64 interrupts, however we only have the first 32 interrupts
available in hardware.

Actual support for IRQ_STEER will arrive in a future commit.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-08-27 11:43:22 +02:00
Paul Olaru e9b155690e irq: Add separate PLATFORM_IRQ_HW_NUM define
On some platforms, you can have a number of hardware interrupts but a
different number of child interrupts per cascaded interrupt controller.

This commit exposes this separation but does not take advantage of it
yet. On most platforms, the definitions PLATFORM_IRQ_HW_NUM and
PLATFORM_IRQ_CHILDREN are equal.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-08-27 11:43:22 +02:00
Pan Xiuli a704c7a5a6 topology: add virtual routes for hda-idisp
Add missing virtual routes that will fail the probe.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-08-27 09:27:05 +02:00
ArturX Kloniecki 2cbb1a02b8 dmic: ssp: correct misused dma_get_drvdata instead of dai_get_drvdata.
Signed-off-by: ArturX Kloniecki <arturx.kloniecki@linux.intel.com>
2019-08-26 23:09:11 +02:00
Paul Olaru c91512d00c ipc: Fix compile error
src/include/sof/trace/trace.h:309:32: error: 'type' may be used uninitialized in this function [-Werror=maybe-uninitialized]

This happens when hdr is NULL (even if it may never be at runtime the
compiler still complains) and verbose traces are enabled.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-08-26 17:29:03 +02:00
Tomasz Lauda 53529b103d byt: fix simultaneous playback and capture
Fixes simultaneous playback and capture on byt/cht platforms.
It's a temporary fix and will be replaced with the proper solution
soon.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-08-26 17:28:02 +02:00
ArturX Kloniecki d24a4b9fa0 dma: Fix dma_chan_irq macro for APL.
Signed-off-by: ArturX Kloniecki <arturx.kloniecki@linux.intel.com>
2019-08-26 14:31:28 +03:00
Tomasz Lauda 66da4e89a9 dw-dma: unify dw_dma_release for all working modes
Unifies dw_dma_release function implementation to work
for all DMA working modes. Since we are now supporting
copying as much data as possible in host in all modes,
we can make this unification.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-08-23 12:12:15 +02:00
Tomasz Lauda 6f1057911e host: implement copying as much as possible for one shot
Implements copying as much as possible for one shot copy mode.
Previously we were always copying only one period of data,
which was problematic in case of SRC components inside of
pipeline. Also split transfer hasn't been handled correctly
in case of double split. This patch reimplements the copy
and fixes all the mentioned problems.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-08-23 12:12:15 +02:00
Tomasz Lauda de23c27ad2 pipeline: return SOF_TASK_STATE_COMPLETED on xrun
Returns SOF_TASK_STATE_COMPLETED on xrun. Otherwise if
the xrun happens during playback preload phase, we'll end up
in the infinitely processed task.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-08-23 12:12:15 +02:00
Jaska Uimonen 9f4a893845 topology: change byt/cht max media pcm rate to 48kHz
Byt doesn't have enough memory to handle buffer size
increase from updating media pipeline's pcm_max_rate to
96kHz. So limit it to 48khz.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-08-22 23:55:16 +02:00
Paul Olaru c05f923934 platform: imx: Fix interrupt numbers
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-08-21 21:51:19 +02:00
Janusz Jankowski ada20134cd dmic: fix stop after pause
This PR fixes bug that makes active FIFOs count go below 0,
if you call stop after pause.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-08-21 14:16:07 +02:00
Jaska Uimonen db138eba8f topology: fix buffer size calculation
The buffer frame size calculation has obvious issues by
doing division instead of multiplication. On the other
hand we can't do decimal calculations in M4. So fix this
by introducing new macro for buffer frame size where we
multiply samplerate and schedule_period and divide by
1000000.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-08-20 09:21:14 +02:00
Marcin Maka 5476ed7ff2 ipc: cavs: fix 1.8+ register definitions
Aligned with the cAVS 1.8+ IPC HW definition.
Definitions common for sideband IPC version moved to a shared header.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2019-08-19 11:47:03 +02:00
Marcin Maka 2464d6d2be ipc: prepare mailbox copy to be platform specific method
IPC request flow changed, call to mailbox_validate() moved to the
platform specific IPC code. This function copies the request from
the mailbox buffer to the global ipc buffer while the source
(mailbox) may be implemented differently on a specific platform
depending on the available hw and power mode. Therefore moved to
the platform code for easier re-implementation specific per platform.

The response part remains common, mailbox based. Common code that
sends simple response back is deduplicated as part of the common
generic ipc_cmd() logic.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2019-08-19 11:47:03 +02:00
Seppo Ingalsuo b8fa3c7ad5 Topology: Add amplifying high-pass EQ to DMIC capture paths
This patch alters topologies those use pipelines definitions from
intel-generic-dmic.m4. The 48 kHz and 16 kHz capture pipelines are
changed to use pipe-eq-capture instead of pipe-volume-capture. The new
pipeline contains volume but also an IIR EQ set for second order
high-pass with 50 Hz cut-off frequency. The IIR includes +20 dB
gain. The volume max is decreased by 10 dB due to the amplifying
IIR add.

The gain in IIR helps with too low capture loudness with default 0 dB
setting for volume. Further gain can be achieved with volume control.

The high-pass filter fixes the issue of too slow DCCOMP settling in
DMIC platform hardware. With IIR add the DMIC unmute ramp is shortened
to 200 ms from 400 ms in the 48 kHz pipeline. In 16 kHz pipeline the
400ms unmute is preserved due to slower DCCOMP settling time.

The min. channels count of two is replaced by pipeline channels count
macro to prevent corrupt capture to happen by capturing as 2ch from
4ch source.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-08-19 09:47:04 +02:00
Seppo Ingalsuo 4a4923ee53 Topology: Change minimum channel count in volume capture pipeline
This patch replaces minimum channel count two by PIPELINE_CHANNELS to
avoid corrupted capture audio due to capturing other channel count
than what the DAI is configured for.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-08-19 09:47:04 +02:00
Seppo Ingalsuo c55aed4793 Tune: Update file path for demo EQ responses
This patch fixes the wrong file path to output example EQs and places
an identifier string to high-pass responses used in topology embedded
filter setup. The identifier is needed to correctly refer in topology
to right response when there are several similar type EQs in the
topology e.g. two separate IIR filters.

A new 16 kHz rate high-pass filter export is added into the script to
be used in voice pipelines.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-08-19 09:47:04 +02:00
Daniel Baluta 68a9e1cbae lib: dai: Introduce generic DAI I/O access functions
In order to avoid code duplication for new IMX DAIs
we introduce generic DAI I/O access functions:
	* dai_read
	* dai_write
	* dai_update_bits

dai_* I/O access functions should replace dmic_*/ssp_* I/O functions
but as for the first patch we only make dmic_*/ssp_* call into dai_*
functions.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-08-19 10:05:33 +03:00
Jaska Uimonen ebf406d084 unit tests: fix cmocka test for pipeline connect
cmocka pipeline connect unit test is checking the successful
connection from frames count set in components. However the frames
are not set in pipeline complete if we set the frames from stream
parameters. So check now that the pipeline pointer has been set
and matches the pipeline in high level test function.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-08-15 14:29:22 +02:00
Jaska Uimonen 8bd25eac3f topology: add 50kHz output topology for apl
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-08-15 14:29:22 +02:00
Jaska Uimonen 77b6db8894 topology: enable pcm range and pipeline rate and remove frame count
Enable setting pcm min and max rate from top level m4 pipeline macro.
This way it is possible to configure the whole pipeline to correct
samplerate range in 1 file. Previously you needed to modify the pipeline
macros where the rate was hardcoded. As the frame count is calculated
from pcm/dai rate and scheduling time the frame count is obsolete.

Introduce pipeline rate parameter to help configuring components with
fixed output rate. We can't deduce this from pcm range since for example
src might accept bigger max rate than the following dai. Even though the
parameter is named "pipeline rate" it essentially means the "final"
output rate to which this pipeline is connected to (dai or other
pipeline). In capture pipelines it means the originating fixed dai rate.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-08-15 14:29:22 +02:00
Jaska Uimonen f9ec396b8f pipeline: calculate frame count from stream params
Previously frame count was coming as topology pipeline parameter. As the
frame count might change because of some components have fixed
samplerate, we might as well calculate it from the stream parameters.
Component base struct will have new member output_rate, which the
component should set if it has fixed output rate (like SRC). Not setting
it or 0 means it can be whatever the pipeline decides. Components with 0
output_rate will have frames = (stream) sample_rate / (pipeline)
deadline. Components downstream to fixed output rate will obey the fixed
rate / period.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-08-15 14:29:22 +02:00
Pierre-Louis Bossart c6f1b08fd2 topology: intel-generic-dmic: rename devices
DMIC32 and DMIC16 are just confusing. It's not clear if the numbers
refer to kHz or bits. Rename to make the names self-explanatory.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2019-08-10 10:35:02 +02:00
Pierre-Louis Bossart 6237763d96 topology: generate HDaudio topologies without DMIC
Not all HDaudio platforms have DMIC support, generate solution without
any DMIC. This will be used in combination with NHLT information (or
kernel module parameter) by the driver to automatically select the
relevant topology.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2019-08-10 10:35:02 +02:00
Janusz Jankowski 15065eb01c cmake: add sof_add_static_library utility function
Adding static libraries properly may be troublesome for developers
that are not familiar with CMake, so function that makes it easier
should be useful.

Usually developer will just add sources directly to the target.
Using static libraries should be limited just to closed / precompiled
3rd party components.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-08-09 16:44:50 +02:00
Janusz Jankowski ea71535a7e cmake: interface library for sof static libraries
Target dependencies have to be added in the same CMakeLists in which
they are declared. CMake interface library is needed to enable adding
static libraries to sof target from subdirectories.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-08-09 16:44:50 +02:00
Daniel Baluta 788000fb7c imx8: dai: Initialize esai spinlock
ESAI implementation is still dummy, anyhow we need to initialize ESAI
spinlock in order to avoid FW crashes.

Similar with commit 2ee7a24f97 ("byt: hsw: ssp: move spinlock init
to earlier stage") we initialize the spinlock in an early stage at
dai_init.

We started to notice the crash after commit f7abaf7b33 ("spinlock:
allocate spinlocks in uncached memory") which requires that the lock
must be dynamically allocated at init. Before, the lock was statically
allocated and there were no crashes.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-08-09 16:13:01 +02:00
Paul Olaru 92d0cbb80f dai: Remove unused DAI_TRIGGER_ definitions
These definitions were in fact invalid. Drivers should use
COMP_TRIGGER_ symbols instead.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-08-09 15:36:29 +02:00