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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>