Commit Graph

4023 Commits

Author SHA1 Message Date
Seppo Ingalsuo 612ff60923 ASRC: Add 4 kB pool into heap runtime
This patch adds a single 4 kB space for allocation. The 2 kB space
is added as well but configured to zero available. The ASRC typically
needs 2 - 4 kBytes of dynamically allocated storage.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-11-27 09:49:48 +00:00
Seppo Ingalsuo adfb6d1dff ASRC: Addition to sof-logger
This patch adds print of text ASRC into sof-logger for ASRC
originated traces instead of unknown.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-11-27 09:49:48 +00:00
Seppo Ingalsuo 4c995d0375 ASRC: Add asynchronous sample rate converter component to SOF
This patch adds the new ASRC feature to SOF. It supports both
optimized HiFi3 build with xt-xcc and generic C version for
gcc build. The generic C version is currently feasible only
for testbench run due lack of sufficient speed for realtime but
will be optimized later.

The feature is disabled by default for BYT, CHT, BDW, and HSW
platforms to save RAM.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-11-27 09:49:48 +00:00
Seppo Ingalsuo 6b0529e79e ASRC: Add filter coefficients for ASRC
This patch adds the FIR filter coefficients and filter parameters
header files for the ASRC.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-11-27 09:49:48 +00:00
Pierre-Louis Bossart 0bbe40dad5 topology: add support for BYT-CR and additional CHT configurations
The BYT-CR package only exposes SSP0 and SSP1, with SSP0 typically
used instead of SSP2 for the audio codec connection. Since it's proven
nearly impossible to patch the topology on the fly in the kernel,
let's brute-force generate topologies for all known BYT-CR platforms
using macros for the SSP number. The BE stream name remains constant
at SSP2-Codec since it's not modified by the kernel.

While we are at it, do the same for CHT platforms.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2019-11-27 09:43:38 +00:00
Paul Olaru 6985b39686 sof: clk: Remove specificity on clock notifier change ID
The previous version changes behavior on the BYT platform.

Fixes: ee9283c159 ("sof: lib: notifier: Do not break build on platforms
without CLK_SSP").
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-11-27 09:41:54 +00:00
Tomasz Lauda d740a3e068 eq_iir: use buffer_copy function
Uses buffer_copy function for bypass mode to avoid code duplication.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-11-26 13:42:17 +00:00
Tomasz Lauda 3b911d10a4 eq_fir: use buffer_copy function
Uses buffer_copy function for bypass mode to avoid code duplication.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-11-26 13:42:17 +00:00
Tomasz Lauda a73c01f0f8 src: use buffer_copy function
Uses buffer_copy function for bypass mode to avoid code duplication.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-11-26 13:42:17 +00:00
Tomasz Lauda c3594e3a05 buffer: reimplement copy functions to faster versions
Reimplements buffer_copy functions to use memcpy_s instead of
fragment API. Based on my tests it gives 20% better performance
than previous implementation. Note that memcpy_s function
uses vec_memcpy when built using XCC.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-11-26 13:42:17 +00:00
Tomasz Lauda e3545fab4e buffer: selective build by CONFIG_FORMAT
Builds buffer_copy functions based on the selected formats
in kconfig.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-11-26 13:42:17 +00:00
Tomasz Lauda 078c3c1a71 topology: kwd: remove volume from pipeline
Removes volume component from KWD pipeline. It was only required to perform
pcm conversion, but since DAI is now capable of doing that, usage of
volume is deprecated.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-11-26 13:42:17 +00:00
Tomasz Lauda 8566b3101c host: use copy functions from pcm_converter
Uses pcm_converter to choose the right processing function.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-11-26 13:42:17 +00:00
Tomasz Lauda 67097327fe dai: remove unused code
Removes unused code from dai_config. Frame bytes are always
calculated from scratch in dai_params, so no point in keeping
this dead code.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-11-26 13:42:17 +00:00
Tomasz Lauda e0491ff778 dai: volume: make pcm conversion in dai component
Changes processing flow and moves pcm frame format conversion
from volume to dai component. This way we'll no longer need to
artificially add volume into the pipelines, where it's not really
needed but frame format change is e.g. KPD topology. Dai is the perfect
place for conversion, since it's format is pretty much predefined and
comes from topology. Rest of the pipeline is configured from the host.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-11-26 13:42:17 +00:00
Tomasz Lauda 5f19803611 component: use frame_bytes and sample_bytes functions
Uses newly added frame_bytes and sample_bytes methods in its
own component based functions.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-11-26 13:42:17 +00:00
Tomasz Lauda 21dec616c8 format: add sample_bytes and frame_bytes functions
Implements functions for sample bytes and frame bytes calculations
based on provided frame format and channels.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-11-26 13:42:17 +00:00
Tomasz Lauda 390a6e5306 pcm_converter: add HiFi3 implementation
HiFi3 implementation of PCM converter is optimized to
process either two samples at once for 32 bit data or
four samples for 16 bit data.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-11-26 13:42:17 +00:00
Tomasz Lauda 8270ad3bc3 pcm_converter: add generic implementation
Implements generic version of PCM converter library component.
This module provides static functions, which allows to copy
buffer data with frame format conversion.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-11-26 13:42:17 +00:00
Tomasz Lauda 678ae1197b common: add IS_ALIGNED macro
Implements macro to check whether value is aligned.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-11-26 13:42:17 +00:00
Tomasz Lauda 6ad952d52a dma: change signatures of copy buffer functions
Changes signatures of copy DMA buffer functions to differentiate
between source and sink bytes. Process function from now on will
work on provided samples to handle different formats on input and output.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-11-26 13:42:17 +00:00
Pan Xiuli 7d52bb6ef0 scripts: update xcc build for all platform
Update xcc build config for all existing platforms.
xcc build with byt, cht and sue need special defconfig.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-11-26 12:53:03 +01:00
Pan Xiuli d6b05caf5b build: add xcc defconfig for byt cht and sue
bay cht and sue xcc build has bigger size, need to use -Os to reduce size.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-11-26 12:53:03 +01:00
Pan Xiuli deccf8f08f memory: modify bootloader for xcc build
xcc build will have bigger TEXT.
Need to keep the total block size unchange as the block need to be
4k align.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-11-26 12:53:03 +01:00
Pan Xiuli 71a68ed2ae haswell: fix _memmap_vecbase_reset address
Use SOF_MEM_VECBASE_TEXT_BASE to repalce unset variable.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-11-26 12:53:03 +01:00
Pan Xiuli d3956d0a9c arch: string: enable vec_memcpy only with HIFI3
xcc HIFI2 do not vec_memcpy, we can only use vec_memcpy on HIFI3 supported
platforms.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-11-26 12:53:03 +01:00
Guido Roncarolo 4e28b0acf7 drivers: imx: sai: fix minor log issue
Correct log verbosity in SAI driver

Signed-off-by: Guido Roncarolo <guido.roncarolo@nxp.com>
Signed-off-by: Jerome Laclavere <jerome.laclavere@nxp.com>
2019-11-26 11:17:39 +00:00
Guido Roncarolo 97f4bb67bf drivers: imx: sai: Set configurations for capture
SAI hardware needs on capture side to have SYNC mode set as
'Synchronous with receiver' in order to work properly
Set this field on Capture register RCR2, transmitter side
must be configured in asynchrounous mode

Signed-off-by: Guido Roncarolo <guido.roncarolo@nxp.com>
Signed-off-by: Jerome Laclavere <jerome.laclavere@nxp.com>
2019-11-26 11:17:39 +00:00
Jaska Uimonen db7671acba topology: sof-hsw-rt5640.m4: remove topology
Remove as unsupported platform.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-11-25 16:12:14 +00:00
Jaska Uimonen 0153022712 topology: sof-bdw-codec.m4: add scheduling dai to media pipe
Media pipe is missing the scheduling component, so move it after the dai
definition and add the scheduling component.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-11-25 16:12:14 +00:00
Jaska Uimonen 8d62caef00 topology: sof-cml-rt5682.m4: remove extra parameters
sof-cml-rt5682 dmic definition has some extra parameters that should be
removed.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-11-25 16:12:14 +00:00
Jaska Uimonen aa007bbd84 topology: sof-imx8qxp-wm8960.m4: add time domain DMA
Add time domain DMA explicitly to DAI_ADD.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-11-25 16:12:14 +00:00
Jaska Uimonen 254b3a8db0 topology: sof-imx8qxp-nocodec.m4: add time domain DMA
Add time domain DMA explicitly to DAI_ADD.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-11-25 16:12:14 +00:00
Jaska Uimonen f14ddac377 topology: sof-imx8qxp-nocodec-sai.m4: add time domain DMA
Add time domain DMA explicitly to DAI_ADD.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-11-25 16:12:14 +00:00
Jaska Uimonen b992b7c69f topology: sof-imx8qxp-cs42888.m4: add time domain DMA
Add time domain DMA explicitly to DAI_ADD.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-11-25 16:12:14 +00:00
Jaska Uimonen c1fb77a653 topology: sof-cht-src-50khz-pcm512x.m4: add time domain DMA
Add time domain DMA explicitly to DAI_ADD.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-11-25 16:12:14 +00:00
Jaska Uimonen cc6ab45e85 topology: sof-cht-max98090.m4: add time domain DMA
Add time domain DMA explicitly to DAI_ADD.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-11-25 16:12:14 +00:00
Jaska Uimonen 5a0f44a65a topology: sof-byt-codec.m4: add time domain DMA
Add time domain DMA explicitly to DAI_ADD and pipeline.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-11-25 16:12:14 +00:00
Jaska Uimonen 6e1ddddd8d topology: sof-cht-rt5682.m4: add time domain DMA
Add time domain DMA explicitly to DAI_ADD.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-11-25 16:12:14 +00:00
Jaska Uimonen f38a07615b topology: sof-cht-nocodec.m4: add time domain DMA
Add time domain DMA explicitly to DAI_ADD and pipeline.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-11-25 16:12:14 +00:00
Jaska Uimonen 92f326e1df topology: sof-bdw-codec.m4: add time domain DMA
Add time domain DMA explicitly to DAI_ADD.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-11-25 16:12:14 +00:00
Jaska Uimonen fc9acc9d94 topology: intel-generic-dmic.m4: fix dai parameters
Fix errorneous parameters in DAI_ADD.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2019-11-25 16:12:14 +00:00
Marcin Maka d6fe2b138b pm: cavs: fix literal dcache lock in power down
Compiler options has to be changed in order to compute
the literal block address correctly.

Some literals must be declared explicitly and loaded
indirectly to make sure that compiler does not optimize
the out to another shared region.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2019-11-22 20:42:10 +00:00
Paul Olaru 100621d422 platform: imx8: Remove all references to SSP clock
The i.MX8 platform doesn't have an SSP clock. We had a fake define for
this platform due to prior inflexibility in SOF itself. Now that said
lack of flexibility is gone, this patch removes all such references.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-11-22 18:32:33 +00:00
Paul Olaru ee9283c159 sof: lib: notifier: Do not break build on platforms without CLK_SSP
Some platforms do not have a SSP clock, so a dummy define for CLK_SSP
and related macros shouldn't be required to exist in order for the
firmware to build.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-11-22 18:32:33 +00:00
Karol Trzcinski fcf6c8c416 trace: Use uncached memory in trace_point and panic
It didn't work correctly if multiple cores write to "sw regs"
 allocated on the same cache line.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2019-11-22 14:16:33 +00:00
Tomasz Lauda b2f088789d dw-dma: enable channel linear link position
Enables DW-DMA channel linear link position counter based
on the selected peripheral connection. It can be used
to retrieve timestamping information on platforms supporting it.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-11-22 14:09:16 +00:00
Tomasz Lauda d343039093 shim: cleanup and extend GPDMA shim registers
Cleanups definitions of GPDMA shim registers for all cAVS platforms
and extends them by adding support for channel linear link position
control register.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-11-22 14:09:16 +00:00
Karol Trzcinski 714859d925 trace: use trace_point instead of platform_* in boot_loader.c
After disabling tracing code have compilation error because of
implicit declaration of platform_trace_point function.
After calling through trace_point it is replaced with empty
define after disabling trace.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2019-11-22 09:45:58 +00:00
Paul Olaru 9b5dc8c6ef sof: Align interrupt stacks
Xtensa ABI requires the stack to always be aligned to a multiple of 16
bytes. This commit aligns the stacks used for interrupt handling.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-11-21 16:45:33 +02:00