Commit Graph

3154 Commits

Author SHA1 Message Date
Adrian Bonislawski 6c908797c6 rimage: make .static_log_entries optional section
Thats because this section is optional in FW, it will be created only with TRACE enabled

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-06-23 22:55:32 +01:00
Keyon Jie 767a81bd9f topology: add sof-cml-rt5682-kwd m4 file for cml keyword detect
It is derived from sof-cml-rt5682.m4, keyword detect pipelines added to
it for Keyphrase Detection feature support.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-06-21 15:44:16 +02:00
Keyon Jie f5832aa273 Topology: sof-cml-rt5682: add dmic16k PCM and dai
Adding dmic16k PCM and dai, this is aligned with driver side.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-06-21 15:44:16 +02:00
Paul Olaru 9015098c99 include: ipc: Fix inconsistency in the comments
Use 'N' for the ID number

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-06-21 10:38:03 +02:00
Paul Olaru d7646b9d5a memory: Make buffers aligned to HEAP_BUF_ALIGNMENT in i.MX8
It provides better memory/cache performance since it aligns with cache
line size

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-06-21 10:37:36 +02:00
Paul Olaru bc529284d4 memory: Add static assert for heap_buf_alignment value
This will check if heap buffers alignment is valid

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-06-21 10:37:36 +02:00
Paul Olaru 5521ebb9fc memory: Add HEAP_BUF_ALIGNMENT define for i.MX8 platform
This value will determine the alignment for heap buffers

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-06-21 10:37:36 +02:00
Adrian Bonislawski 3e6bf7f8a9 memory: remove align to memory bank in APL
Due to small number of memory banks in APL it will be not possible to power down some of them
so there is no point in align to memory banks, this would significantly limit free memory for buffers

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-06-21 09:25:37 +01:00
Keyon Jie 333f15f363 topology: pipe-detect: enlarge the bytes kcontrol size for blob settings
For detector component, the size of configure blob can be up to 300KB,
here enlarge the max to meet this requirement.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-06-19 10:13:15 +02:00
Marcin Rajwa afbb2a6f53 memcpy: fix bug in memcpy_s for cmocka
memcpy_s has wrong check condition for
overlapping sections. The copy from adjacent memory
bloks will result in dsp panic while it should be
allowed. This patch fixes the issue for cmocka
tests.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-06-18 23:16:21 +02:00
Marcin Rajwa c357561ec9 memcpy: fix bug in arch_memcpy_s for xtensa arch
arch_memcpy_s has wrong check condition for
overlapping sections. The copy from adjacent memory
bloks will result in dsp panic while it should be
allowed. This patch fixes the issue for xtensa
architecture.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-06-18 23:16:21 +02:00
Marcin Rajwa 25c50fd443 memcpy: fix bug in arch_memcpy_s for host arch
arch_memcpy_s has wrong check condition for
overlapping sections. The copy from adjacent memory
bloks will result in dsp panic while it should be
allowed. This patch fixes the issue for host
architecture.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-06-18 23:16:21 +02:00
Marcin Rajwa e9b8c94879 kpb: fix wrong trace message
Correct trace message in kpb_clear_history_buffer().

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-06-18 23:16:21 +02:00
Adrian Bonislawski f8aa67ef81 memory: reorder heap defines to match order from SUE memory layout
This will make easier to analyse heaps in memory.h

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-06-18 16:11:07 +01:00
Adrian Bonislawski c8e957c0dd memory: reorder heap defines to match order from CNL memory layout
This will make easier to analyse heaps in memory.h

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-06-18 16:11:07 +01:00
Adrian Bonislawski a71aed4210 memory: reorder heap defines to match order from ICL memory layout
This will make easier to analyse heaps in memory.h

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-06-18 16:11:07 +01:00
Adrian Bonislawski 93c592cc89 memory: reorder heap defines to match order from APL memory layout
This will make easier to analyse heaps in memory.h

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-06-18 16:11:07 +01:00
Adrian Bonislawski 936ad1a06e memory: remove unnecessary HEAP BASE define for ICL
This define is not used anymore

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-06-18 16:11:07 +01:00
Adrian Bonislawski 781f003466 memory: remove unnecessary HEAP BASE defines for APL
This defines are not used anymore

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-06-18 16:11:07 +01:00
Adrian Bonislawski b8e27e6c3e memory: make buffers aligned to HEAP_BUF_ALIGNMENT in SUE
It provides better memory/cache performance since it aligns with memory IO burst size and cache line size

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-06-18 15:45:56 +01:00
Adrian Bonislawski 1fb7c87103 memory: make buffers aligned to HEAP_BUF_ALIGNMENT in ICL
It provides better memory/cache performance since it aligns with memory IO burst size and cache line size

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-06-18 15:45:56 +01:00
Adrian Bonislawski 2741645f11 memory: make buffers aligned to HEAP_BUF_ALIGNMENT in CNL
It provides better memory/cache performance since it aligns with memory IO burst size and cache line size

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-06-18 15:45:56 +01:00
Adrian Bonislawski b0f7059800 memory: add static assert for heap_buf_alignment value
This will check if heap buffers alignment is valid

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-06-18 15:45:56 +01:00
Adrian Bonislawski 7ca0f3f6b3 memory: add heap_buf_alignment define for cavs platforms
This value will determine alignment for heap buffers

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-06-18 15:45:56 +01:00
Adrian Bonislawski cc22442d38 dma: add missing error handling in dma_trace_start
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-06-18 10:33:59 +02:00
Seppo Ingalsuo c328dd85f6 DMIC: Add support for passing unmute ramp time from topology
The raw capture from digital microphones contain some DC signal
in the beginning. The DC compensation filter is set to be quite slow
to enable capturing lowest audio frequencies. The unmute gain ramp
is used in DMIC driver to conceal the DC signal. The required time
for clean looking start is is microphone model and platform dependent.
Also since not all applications are sensitive to DC waveform it is useful
to specify the ramp length in topology.

This patch adds to DMIC driver feature to define the unmute ramp
length in milliseconds. If the value from IPC is zero the existing
hard coded 400 ms long ramp is used. If the value is non-zero and
within min/max 10ms/1000ms limits the topology defined ramp length is
used.

The code uses the db2lin_fixed() function to convert the dB step
to a linear gain update coefficient. Also the hardcoded ramp definition
is simplified to use dB initial gain value and length in milliseconds
instead of magic looking numbers.

This patch also contains ABI minor version increase to 8.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-06-17 21:47:31 +01:00
Seppo Ingalsuo 909b790235 Topology: Add SOF_TKN_INTEL_DMIC_UNMUTE_RAMP_TIME_MS token
This patch adds to all DMIC related topologies the new token
SOF_TKN_INTEL_DMIC_UNMUTE_RAMP_TIME_MS. The value is set to 400
to correspond to 400 milliseconds long unmute ramp time. The
topology defined unmute will override the firmware internal
hard coded value if it is set in topology.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-06-17 21:47:31 +01:00
Seppo Ingalsuo 75b10a1cc8 Math: Add functions to convert decibels to linear
This patch adds two functions: db2lin_fixed() and exp_fixed().
The first can convert fractional format dB values to linear within
range -100..+66 dB. The latter is a more generic fractional e^x
function. See the code comments for used Qx.y fractional formats
and limitations.

The implementation for exp(x) core function is based on first 11 terms
of Taylor series approximation for |x| < 2. The larger values of x
are computed with help of rule exp(x) = exp(x/2) * exp(x/2). It
achieves sufficient accuracy for volume control type of applications.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-06-17 21:47:31 +01:00
Seppo Ingalsuo fe4ea779b1 Fix conversion to Q1.31 in macro Q_CONVERT_FLOAT()
This patch fixes the overflow that happened with term (1 << qy)
in the macro with qy set to 31. Casting to int64_t avoids the
macro internal overflow with all fractional 32 bit formats.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-06-17 21:47:31 +01:00
Janusz Jankowski 0dd6c23814 hsw: ssp: add quirks support
Enables quirks supported by HSW.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-06-15 12:03:55 +02:00
Janusz Jankowski b4f2e2a964 byt: ssp: add quirks support
Enables SSP quirks supported by BYT and checks
for unsupported quirks requests.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-06-15 12:03:55 +02:00
Janusz Jankowski e7af08b241 kconfig: hide cavs menu if not supported
If all symbols in menu are not selectable if some
other symbol is not present, then there is no point
in showing that menu.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-06-13 15:32:39 +02:00
Tomasz Lauda 917e64b8c5 component: remove min_bytes argument from comp_xrun methods
Removes min_bytes argument from comp_underrun and comp_overrun
methods. With the current way of copying as much data as possible
min_bytes doesn't say anything

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-06-13 13:34:34 +01:00
Tomasz Lauda cc7bff9e61 component: remove checks for xruns
Removes checks for xruns in all components besides
dai. There is no need to check for underrun and
overrun in every component, because no free or avail
space in buffer doesn't mean that data is not continuous.
We can have processing modules inside the pipeline, which
work on different frame sizes than rest of the pipe. In
such cases we will detect false xrun. In the future we
can think about adding xruns checks to the components,
which will be connection points for multiple pipelines
e.g. separate pipe with the mixer in the beginning.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-06-13 13:34:34 +01:00
Janusz Jankowski c6e12d53d8 scripts: add documentation generator
Process of documentation building and publishing requires
3 repositories. It is troublesome for people that are responsible
f.e. only for documentation publishing. It makes the process
easier by turning some easy to break steps from publisher instructions
into a script.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-06-13 13:29:02 +01:00
Tomasz Lauda d84395b755 buffer: remove circular dependency
Removes circular dependency between buffer and component
header files.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-06-13 13:39:59 +02:00
Adrian Bonislawski 39a2b4760e kconfig: CORE_COUNT config depends on SMP
This will prevent from configuring UP with CORE_COUNT > 1

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-06-13 11:54:45 +02:00
Adrian Bonislawski 248956be5b kconfig: remove CORE_COUNT from apl defconfig
Default build option for APL is UP so it should use default CORE_COUNT value (1) to not waste memory

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-06-13 11:54:45 +02:00
Tomasz Lauda 96a544e640 boot_loader: remove deprecated comment
Removes deprecated comment from boot_loader.
Memory window is enabled by ROM even before
FW is loaded, so there is no need for usage
of additional registers.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-06-12 15:16:39 +02:00
Janusz Jankowski 8eb6a7861d testbench: move README from doc to tools
All tools-related programs should be in tools README.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-06-12 12:19:45 +02:00
Janusz Jankowski 730f051d67 doc: remove duplicated README for host
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-06-12 12:19:45 +02:00
Tomasz Lauda 0f1158dd20 component: remove frame_bytes from comp_dev
Removes frame_bytes field from comp_dev structure.
We don't need it globally, only for dai.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-06-12 12:00:35 +02:00
Tomasz Lauda 54ed3528f6 dai: remove period_bytes from dai_data
Removes period_bytes from dai_data structure as
it's only needed in dai_params function. No need
to store it globally.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-06-12 12:00:35 +02:00
Tomasz Lauda e7fe7fc669 component: split comp_set_period_bytes method
Splits comp_set_period_bytes method to two separate
functions: comp_frame_fmt and comp_period_bytes.
Setting these two parameters in one function wasn't
intuitive nor atomic enough. Also setting value typed
variables through reference isn't pretty.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-06-12 09:02:00 +02:00
Adrian Bonislawski d8690a482f platform: fix compile error if PLATFORM_CORE_COUNT is 1
Structs sys_rt_x_blockXXX should not be created if not used

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-06-12 08:57:56 +02:00
Tomasz Lauda 72d7b7d721 host: remove not needed check
Removes not needed check from host component.
It was supposed to detect if there is not enough
avail/free data, but since we've switched to
host copy on buffer callback this check is deprecated.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-06-12 00:04:16 +02:00
Tomasz Lauda 347ee08cb0 hda-dma: change preload from blocking to repeating
Changes preload flow for host component using HDA-DMA.
Instead of waiting for DMA status for a limited amount
of time, it's better to just reschedule the pipeline
and check again. At least this time if the status
won't be set, we will know it's rather HW issue than
too small delay.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-06-11 22:14:06 +01:00
Seppo Ingalsuo 6f65414176 Volume: Use min and max volume scale values from IPC
This patch adds feature to retrieve volume scale min and max from
IPC if the parameters are set. Volume min and max are now used
with ramp time parameter to compute gain ramp step to achieve
constant rate ramps with any volume scale. If the min and max are
zeros the previous FW operation is preserved.

Previously the firmware did not know the volume range so the
volume code uses in volume request a check to prevent exceeding
ramp length specified in topology by step size re-adjust. It was
done to prevent very long ramps to happen with volume scales with
large gain. However the smaller transitions remained longer than
necessary. This patch fixes that last remaining issue.

The ramp length check code is preserved to be compatible with
kernel versions those do not provide the min and max volume scale
values. When provided the check code has no impact.

The patch includes some cosmetic re-arranging of volume comp data
struct fields in addition to adding new the fields vol_ramp_range,
vol_min, and vol_max.

Also error traces were added to notify if the volume min/max or
request has been limited to fit to supported volume range.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-06-11 22:35:34 +02:00
Janusz Jankowski a2fa79f211 cmake: dw: use feature configs in ifs
It is better to include features based on feature Kconfig symbols,
instead of hardcoding them per platform.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-06-11 15:31:18 +02:00
Janusz Jankowski def3e2de5d drivers: group DW configs in one Kconfig file
It is better to have company/family related features grouped.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-06-11 15:31:18 +02:00