Commit Graph

3108 Commits

Author SHA1 Message Date
Daniel Bogdzia 17eba5b190 test: add rballoc tests
Rballoc tests check if the current heap is full
the succeeding one would be taken

Signed-off-by: Daniel Bogdzia <danielx.bogdzia@linux.intel.com>
2019-05-30 12:02:05 +02:00
Daniel Baluta 009cd7c8d5 reset: xtos: Introduce HAVE_RESET_VECTOR_ROM config option
Apollolake+/i.MX have reset vector in ROM. So far we have
used platform config symbols to tell which platforms have
the reset vector in ROM.

Anyhow, things are starting to get ugly here with more
platforms to come so we add an internal config symbol
which will be set by each each platform when needed.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-05-30 09:12:24 +01:00
Ranjani Sridharan 92fc7067cf dai: assign/free link DMA channel during dai_config()
The recommended HDA HW programming sequence for setting
the DMA format requires that the link DMA and host DMA
channels be coupled before setting the format. This
change means that host DMA or link DMA channels be
reserved even if only one is used.

Statically assigned link DMA channels would mean that
all the corresponding host DMA channels will need to be
reserved, leaving only a few channels available at run-time.
So, the suggestion here is to switch to dynamically assigning
both host DMA channels and link DMA channels are run-time.

This change means that the DAI_CONFIG IPC will be sent
multiple times during link hw_params and link hw_free
ioctl. The DAI config parameters will remain the same
except for the link DMA channel that will be assigned at
run-time. A value of DMA_CHAN_INVALID from the driver
during hw_free indicates a request to free the current
link DMA channel in use. The current channel in use
is freed before assiging the new channel requested in
the DAI_CONFIG IPC.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-05-29 15:46:12 +02:00
Janusz Jankowski f0c085a404 alloc: move DEBUG_BLOCK_FREE to kconfig
We already have CONFIG_DEBUG* symbols in Kconfig,
this one is still defined in code, so it should be
moved also to Kconfig.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-29 14:29:29 +01:00
Janusz Jankowski af9e22013a alloc: add types for DEBUG_BLOCK_FREE values
Change symbols to be more explicit.
There are different sizes of the same pattern, so they
should indicate which one has what size.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-29 14:29:29 +01:00
Janusz Jankowski ce104012fd kconfig: move DEBUG to the top of debug menu
It's better to have general options earlier in menuconfig
and specific options later.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-29 14:29:29 +01:00
ArturX Kloniecki 529bf68a46 MUX: Generic Mux component implementation.
Mux component implementation. Support for mux and demux operation
modes, channel routing and summation with saturation.

Mux component can operate in 2 modes:

demux - with single input stream and multiple output streams
(up to MUX_MAX_STREAMS)
mux - with multiple input streams and single output stream
It can also work with 1:1 I/O in both modes to act as
channel router / summator.

It is configured via binary blob specifying channel routing
using bitmasks.
In case of demux mode every output stream has an array of bitmasks,
one mask per channel, specifying which of the input channels should
be used to compose it.
Similarly for mux, each input stream has bitmask for each of it's
channels to specify to which output channel it contributes.

Signed-off-by: ArturX Kloniecki <arturx.kloniecki@linux.intel.com>
2019-05-29 12:06:54 +01:00
Seppo Ingalsuo d58e733c7b Topology: Change 16kHz DMIC DAI into 32bit mode and make scheduling 1ms
This patch changes the secondary DMIC FIFO configuration into 32 bits
mode for better quality. Since there is volume component in DMIC
capture pipelines the conversion to other PCM formats can happen
there. Using volume controller with 32 bit input gives a lot better
audio quality when the microphone signal needs amplification.

The scheduling of 16 kHz DAI is changed to 1000us. The comment
of 1000 us is correct but the parameter 48 is not. With 16 frames
the scheduling becomes the desired. This change should also save
some RAM due to smaller buffers.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-05-29 12:06:05 +01:00
Seppo Ingalsuo 5afafa880c Topology: Add support for 4ch 32bit 48kHz DMIC DAI
This patch restores the missing configuration into macro
intel-generic-dmic.m4. Without this patch the 48 kHz DMIC DAI
is not created. Both DMIC FIFOs are available at any channels
number and PCM format so there is no need to delete a DAI when
4ch configuration is used.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-05-29 12:06:05 +01:00
Daniel Baluta a3de21dbab drivers: Add skeleton drivers for i.MX8
Adds skeleton drivers for:
	* ESAI, Enhanced Serial Audio Interface
	* EDMA, Enhanced DMA Controler
	* dummy DMA, simple dummy DMA to emulate API for copying data
	between Host and DSP.
	* timer, ipc - imx8 specific implementation

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-05-29 12:05:09 +01:00
Daniel Baluta 6588d5b9d0 platform: imx8: Add platform drivers support
This adds minimal support for platform drivers (dai, dma, clk)
and general platform initialization.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-05-29 12:05:09 +01:00
Daniel Baluta 30d6a967c0 platform: imx8: Initialize memap
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-05-29 12:05:09 +01:00
Daniel Baluta b456a35d2f rimage: Add support for imx8
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-05-29 12:05:09 +01:00
Daniel Baluta 096392e1eb imx8: Add support for NXP i.MX8 platform
i.MX 8 family of applications processor has 3-subfamilies:
	* i.MX 8, for advanced graphics, performance and virtualization
	* i.MX 8X, for safety and efficent performance
	* i.MX 8M, for advanced audio, voice and video

(yes, you are right i.MX 8 is the generic SoC family but also a subfamily).

All of the subfamilies have SoC designs which include a DSP for efficient
audio processing. DSP has direct access to SDRAM and to Audio
peripherals.

https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/i.mx-applications-processors/i.mx-8-processors:IMX8-SERIES

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-05-29 12:05:09 +01:00
Daniel Baluta 1c9cf590af reset: xtos: Add support for i.mx8 reset flow
Make sure correct CONFIG options is selected.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-05-29 12:05:09 +01:00
Daniel Baluta 987d34aa98 xtensa: exception: Some xtensa configs don't have level 6 IRQ
Similar with: commit 52e25dc814 ("xtensa: exception: Some xtensa..")
we need this patch because imx8 config does not have level 6 IRQ and
we hit a compilation error.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-05-29 12:05:09 +01:00
Jaska Uimonen a8ca07f6e7 topology: add more buffering to media pipe after src
Currently we have 1.5 times buffering after SRC in media pipeline. This
will not work for S24 or S32 playback as SRC will use the bigger buffers
with non-integer sample rate conversions as 44.1kHz to 48kHz. So add as
big buffer after SRC as before it.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-05-29 12:01:18 +01:00
Seppo Ingalsuo ec6ed1ac15 DMIC: Increase start gain ramp length to 400 ms
This patch updates the gain update coefficient to achieve
a longer ramp time. The previous 300 ms long ramp was not
enough to conceal all of the slow DC component settling seen
in the beginning of DMIC capture.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-05-29 10:36:21 +02:00
Liam Girdwood b4d292d75f gh: update issue templates
Add section for reproduction rate in bug report template
2019-05-28 13:20:34 +01:00
Bartosz Kokoszko 3e24390a62 buffer: enhance trace message in comp_update_buffer_consume
Using hex %x format in comp_update_buffer_consume for tracing
addresses and bitfields is more readible than decimal
format.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2019-05-28 10:07:03 +01:00
Bartosz Kokoszko ad03e04fdf cavs: ipc: added ipc received and processed counters
I've added counters for processed and received ipc tasks.
They are dropped after trace points in memory window.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2019-05-27 22:50:33 +01:00
Janusz Jankowski 63cb86f1b3 drivers: move cavs kconfigs to separate file
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-27 11:24:14 +01:00
Janusz Jankowski 0beb08681b kconfig: move CAVS_VERSION configs to platform
These definitions are more related to the platform/ip than drivers.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-27 11:24:14 +01:00
Jaska Uimonen a26c51a43e topology: add volume component to demux topology
Demux topology doesn't have format conversions so playback files need to
be converted to S24 or S32 format. As this is a bit cumbersome add
volume component to demux topology to enable standard 16 bit playback
from alsa. Also change the demux capture pipe PCM format range.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-05-24 10:18:18 +02:00
Ranjani Sridharan 6e82ddf9b1 host: remove duplicate dma_stop()
Remove the duplicate dma_stop() during host_reset().
DMA should already be stopped when the host comp gets
the STOP trigger. This fixes the following error seen
during host reset:
intel/cavs/hda-dma.c:639 hda-dmac: 5 invalid channel -1

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-05-24 11:13:08 +03:00
ArturX Kloniecki 9ccb8181d8 pipeline: Limit propagation of params, prepare and reset.
In order to handle complex topologies, we need more precise control
over connected pipelines behaviour and propagation of events.
Better control is accomplished by limiting propagation of events in
case of mismatch between starting and desination pipelines that are
connected, for example when propagating from playback pipeline to branch
which endpoint is Host component, or reversely, when propagating from
capture pipeline to one with Dai endpoint.

Signed-off-by: ArturX Kloniecki <arturx.kloniecki@linux.intel.com>
2019-05-24 09:34:35 +02:00
Tomasz Lauda 56b8776c2a memcpy: replace all occurrences with memcpy_s
Replaces all occurrences of memcpy with memcpy_s.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-05-22 21:27:07 +01:00
Pierre-Louis Bossart ca84a89b40 kmod_scripts: first support for SoundWire
remove additional modules in the right order to stress test SoundWire
support

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2019-05-22 19:36:35 +01:00
Guennadi Liakhovetski 1da390743d dw-dma: revert recent changes for Baytrail
Two recent commits:

7275e422d8 ('dw-dma: handle interrupts per core')
433de9fb50 ('dw-dma: clear block/transfer irq after stop')

broke DW-DMA on Baytrail. Though they seem logical, they don't
produce the desired result on that platform. This patch restores the
original behaviour on BYT, CHT, BDW and HSW. It also eliminates the
redundant branch in the loop by replacing it with a simple mask to
restore the original IRQ processing order:

1. clear the source IRQ
2. clear the platform IRQ
3. call the callbacks

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-05-22 16:43:08 +01:00
Janusz Jankowski df48bfce77 cmake: git hooks for non-unix os
Add support for non-unix systems that have bash shell.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-22 08:26:05 +02:00
Jaska Uimonen 3e423f418e topology: fix pipeline indexes in cml demux topology
Dmic and hdmi1 have wrong pipeline id's in demux topology
so fix them.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-05-21 11:48:32 +02:00
Tomasz Lauda 430f7549ca checkpatch: fix as much issues as possible
Fixes almost all checkpatch issues.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-05-21 10:24:26 +02:00
Tomasz Lauda 5fa2426fb9 hda-dma: add additional logs to waiting functions
Adds additional logs in case of failure to waiting
functions.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-05-20 11:14:58 +02:00
Keyon Jie 8ca92a4b3f topology: sof-glk-da7219-kwd: add virtual widgets for driver
Add virtual widgets to remove error warnings in kernel dmesg logs, this
is also aligned to sof-glk-da7219 topology file.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-05-20 11:09:47 +02:00
Marcin Rajwa 2150974ade detector: fix bug of incorrect amount of samples in detecting function
This patch solves the issue with wrong number of bytes
being passed to detecting function therefore causing a loss
of recorded data.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-05-18 07:54:52 +02:00
Tomasz Lauda 9417d21712 audio: remove checking for MODULE_TEST
Removes preprocessor checks for MODULE_TEST.
It was used by testbench, when the FW traces
were very limited. It's no longer needed.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-05-17 17:39:45 +02:00
Tomasz Lauda e22c4d3f7f audio: replace memcpy with memcpy_s
Replaces memcpy calls with memcpy_s calls
in audio processing components.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-05-17 17:39:45 +02:00
Tomasz Lauda 927e5b44b0 audio: fix checkpatch errors
Fixes checkpatch errors in audio components.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-05-17 17:39:45 +02:00
Tomasz Lauda ca45bc8303 audio: put multifile components to directories
This patch moves multifile components to separate
directories. All component headers are also moved to
include/sof/audio.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-05-17 17:39:45 +02:00
Janusz Jankowski 291525d271 uapi: replace sof_man_get_module with SOF_MAN_MODULE_OFFSET
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-17 17:04:59 +02:00
Jaska Uimonen d6a5d836e6 ipc: check for existing pipeline reference in component
We can't send messages or parameters to component if they don't have
pipeline pointer set. So check for valid pointer in command message
send.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-05-17 08:01:22 -07:00
Janusz Jankowski 292347ae17 uapi: header: change stackptr's type to uint32
Types in uapi haders have to use fixed size.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-17 16:34:26 +02:00
Janusz Jankowski 3f2d424297 uapi: add comments for oops header structs
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-17 16:34:26 +02:00
Janusz Jankowski 0dc5e7e849 uapi: xtensa: fix windowbase typo
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-17 16:34:26 +02:00
Janusz Jankowski b780605eaf uapi: xtensa: change ar to variable array
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-17 16:34:26 +02:00
Janusz Jankowski 0c30369f98 uapi: xtensa: remove stack field
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-17 16:34:26 +02:00
Janusz Jankowski 66495136cc xtensa: coredump: fix stackoffset
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-17 16:34:26 +02:00
Seppo Ingalsuo 846e693f1f Tools: sof-eqctl: Print return code for fails.
This patch adds printing of return code in decimal for failed
user control attempt. It helps the user to understand why a fail
happened.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-05-17 10:11:13 +02:00
Tomasz Lauda 346a522cbf topology: fix sof-glk-da7219-kwd topology
This patch fixes two things:
- Configures HDA pipelines to be timer driven.
- Moves definition of pipe-kfbm-capture to avoid overwrite
of deadline and frames for other pipelines.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-05-16 19:37:27 -07:00
Liam Girdwood b01ed57e31 test: ipc: Add FW testing IPC foundations.
Add a new IPC global class for FW testing alongside the first "test" IPC
command for flooding the DSP with IPCs.

Needs to have CONFIG_DEBUG enabled.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-05-16 19:34:28 -07:00