Commit Graph

3482 Commits

Author SHA1 Message Date
Jaska Uimonen 39ed9d6e1f topology: set glk kwd pipeline rate to 16kHz
Currently glk kwd pipeline is set to run at 48kHz. This rate is wrong
and will create too big buffers and we will run out of memory. So set
the kwd pipeline rate to 16kHz.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-08-30 11:29:00 +02:00
Paul Olaru ff601fdb5d drivers: imx: interrupt: Convert IRQ_STEER interrupt to SOF logical interrupt
The interrupt numbers needed by the IRQ_STEER driver and those needed by
SOF's interrupt_* functions differ. While for this particular platform
it is known that there is a simple offset of 32, I implement this more
complex function to ensure that the interrupt numbers remain valid even
if somehow another cascaded interrupt controller is added.

This function is needed because the pure interrupt_get_irq() function
cannot properly treat the whole controller as only one, since it
receives interrupts over 8 hardware lines. This function determines
which hardware line is used then calls interrupt_get_irq() with the
correct controller name.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-08-30 08:41:47 +02:00
Tomasz Lauda 7791303c31 icl: memory: set correct LP heap address and size
Changes Low Power heap address and size to the correct
values for the Icelake platform.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-08-28 18:06:29 +02:00
Tomasz Lauda e643457b79 dw-dma: fix clearing done bit when using HW LL
Fixes clearing done bit when using HW LL. There can be
a situation, when more than one linked list item has been
already transferred, so we need to clear all of them.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-08-28 16:10:09 +02:00
Tomasz Lauda df2a59dad4 notifier: align _notify_data to cache line
Aligns _notify_data object to cache line size.
Alignment is required, because it's a shared object.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-08-28 15:04:20 +02:00
Tomasz Lauda ef9432eeba notifier: send idc notifications in non blocking mode
Changes the way of sending notifications to slave cores
from blocking to non blocking mode. Blocking mode isn't
the best solution, because potentially we can be on higher
interrupt level, then the one for receiving idc result.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-08-28 15:04:20 +02:00
Paul Olaru 6d1221b5a6 drivers: imx: interrupt: Fix status mask handling
The old version unintentionally zeroed out the 32 superior bits, which
meant that in every group of 64 interrupts the upper 32 would require
more reads of the status registers than normal. The interrupts will be
lost each cycle, however the status will be reloaded correctly in the
next one.

The issue also made IRQ storm conditions to be reported much more easily
than normal, again with only certain interrupts.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-08-28 15:05:11 +03:00
Paul Olaru d6d50e6d68 platform: imx: Enable IRQ_STEER driver
Initial implementation of platform code did not initialize the platform
interrupt controller. Fix this now by calling platform_interrupt_init().

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-08-28 15:05:11 +03:00
Paul Olaru 8512a5afd2 drivers: interrupts: Fix invalid trace_error call
This error showed up while I was testing the IRQ_STEER call as printing
a weird value instead of a normal IRQ number (and I had an inconsistent
tree that lead to this error condition).

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-08-28 14:01:16 +03:00
Pan Xiuli 8d0e863afc topology: add tgl_rt1308 with no hdmi
Enable tgl_rt1308 topology with RT1308 speaker and DMIC01.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-08-28 12:20:20 +02:00
Pan Xiuli d3b2fa0249 topology: add tgl_rt1308 topology
Add tgl_rt1308 topology with RT1308 speaker, DMIC and 4 HDMI.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-08-28 12:20:20 +02:00
Pan Xiuli 3f4c3c8286 topology: add tigerlake nocodec support
Enable SSP0/1/2 and DMIC01 nocodec topology for tigerlake.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-08-28 12:20:20 +02:00
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