Commit Graph

2920 Commits

Author SHA1 Message Date
Rander Wang d50fa6f920 topology: correct widget type for HDA
It should be type of input for capture widgets

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2019-05-08 20:24:38 +02:00
Seppo Ingalsuo b262aa2cd2 Volume: Use comp_get_copy_limits() to calculate frames to process
This patch removes from copy() function the code that was converted
into a generic utility function into component library. The simple
processing components with single source and sink buffers can use
the function to find out the number of frames to process, get
pointers for their source and sink buffers, and amount of bytes
consumed and produced for buffer update after the processing is
done.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-05-08 20:19:39 +02:00
Tomasz Lauda 05d4e190d4 apollolake: temporary change gcc hal state defs
Temporary changes xtensa hal state definitions for
gcc builds. Change will be reverted after update
of apollolake overlay.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-05-07 13:10:35 +02:00
Tomasz Lauda c9a194bdef xtensa: align hal state definitions for every platform
Changes xtensa hal state definitions to be the same for
every platform.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-05-07 13:10:35 +02:00
Tomasz Lauda 4700170ef8 suecreek: update xtensa headers
Updates xtensa headers to match real suecreek core
capabilities.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-05-07 13:10:35 +02:00
Tomasz Lauda ebf5f113a5 icelake: update xtensa headers
Updates xtensa headers to match real icelake core
capabilities.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-05-07 13:10:35 +02:00
Tomasz Lauda d5375e11b1 cannonlake: update xtensa headers
Updates xtensa headers to match real cannonlake core
capabilities.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-05-07 13:10:35 +02:00
Tomasz Lauda c776d089d3 apollolake: update xtensa headers
Updates xtensa headers to match real apollolake core
capabilities.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-05-07 13:10:35 +02:00
Keyon Jie 72360bd42f kpb: fix kpb reset issue to make the consequent iteration work
We need reset kpb->state to KPB_STATE_BUFFERING, and unregister notifier
in .reset() as we will register it again at next .prepare(), otherwise,
the consequent record won't work.

Add definition of notifier_unregister() into cmoka fix the link error to
avoid breaking UT at the same time.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-05-07 12:26:56 +02:00
Janusz Jankowski 982307ebdc scripts: build testbench for host
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-07 08:49:48 +02:00
Janusz Jankowski 2693daf503 cmake: rename BUILD_HOST to BUILD_LIBRARY
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-07 08:49:48 +02:00
Janusz Jankowski 62e894eb9d testbench: rename include folder
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-07 08:49:48 +02:00
Janusz Jankowski 91578f1a22 host: move testbench to tools
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-07 08:49:48 +02:00
Janusz Jankowski 56228b0221 cmake: host: separate testbench build
Testbench is user-space application that should just consume
SOF library, so it should be moved out from fw buildsystem.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-07 08:49:48 +02:00
Janusz Jankowski ecb73cad2d cmake: install public headers for host
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-07 08:49:48 +02:00
Janusz Jankowski 378d572193 host: remove pthread dependency
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-07 08:49:48 +02:00
Janusz Jankowski cdceac7a79 testbench: simplify build to use 1 target
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-07 08:49:48 +02:00
Janusz Jankowski 3b3c133822 library: add sof_audio_core into sof shared lib
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-07 08:49:48 +02:00
Janusz Jankowski 11e2da2f19 host: build ipc and lib as shared lib
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-07 08:49:48 +02:00
Janusz Jankowski dde9d87148 host: make testbench headers private
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-07 08:49:48 +02:00
Janusz Jankowski fdda8f6820 host: enable kconfig
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-07 08:49:48 +02:00
Janusz Jankowski 1e57b05a8d host: add library defconfig
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-07 08:49:48 +02:00
Janusz Jankowski 3a65b78f5f host: replace CONFIG_HOST and CONFIG_LIB with CONFIG_LIBRARY
We don't need 3 symbols - they all are used in the same case.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-07 08:49:48 +02:00
Janusz Jankowski c80d288ea2 platform: add CONFIG_LIBRARY
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-07 08:49:48 +02:00
Janusz Jankowski 38a49fe36d library: move to platform
Library folder is just set of some mock platform definitions, so it
should be handled as another (abstract) platform.
It's better to have all platform definitions in platform folder
instead of adding some artifical platform to the src root.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-07 08:49:48 +02:00
Guennadi Liakhovetski a11aef245f dw-dma: fix regression
Commit e2b994ee03 ("dw-dma: cleanup the whole driver") introduced
bugs in bit-field calculations. This patch fixes them.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-05-07 08:08:32 +02:00
Tomasz Lauda c5e724400c ssp: icl: enable registers for all 6 SSPs
On Icelake we have 6 SSP ports, but we only enable
registers for 3 of them. Let's enable all.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-05-07 08:06:03 +02:00
Fred Oh 35e438501f topology: hda: fix virtual widget warnings
Add some more virtual widgets to suppress the machine driver errors.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2019-05-07 08:05:04 +02:00
Keyon Jie 47fcac2d47 topology: add topology file for glk kwd.
Add topology file sof-glk-da7219-kwd.m4 which is used for Keyword
Detection feature integrated on GLK platform.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-05-06 18:16:23 +01:00
Keyon Jie b424c98cd8 topology: pipe-kfbm-capture: use DMIC16k for Keyword Detect PCM
Use DMIC16k for Keyword Detect PCM to align with driver.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-05-06 18:16:23 +01:00
Guennadi Liakhovetski 0dd03866f1 kpb: only build if enabled in .config
Kconfig has an entry for COMP_KPB but it isn't used for building. Add
a suitable clause to CMakeLists.txt.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-05-06 15:33:36 +01:00
Keyon Jie 7c8a2a98d1 detect-test: reset detect status at .reset()
This will fix the detecting will be triggered at very beginning of the
2nd arecord runs issue.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-05-06 14:58:18 +01:00
Keyon Jie 7da4b8ab0a detect_test: fix get_drvdata() before set_drvdata() issue
We are calling comp_get_drvdata() in test_keyword_set_default_config(),
so we should move comp_set_drvdata() before that in test_keyword_new(),
to avoid getting wrong private pointer for the component.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-05-06 14:57:49 +01:00
Xun Zhang 6dfddfc550 topology: add rt5682 m4 topology file for icl and byt platforms
Add topology support for rt5682 codec in both Bay Trail and Icelake
platforms.

Signed-off-by: Xun Zhang <xun2.zhang@intel.com>
2019-05-06 14:57:17 +01:00
Tomasz Lauda 7275e422d8 dw-dma: handle interrupts per core
Fixes DW-DMA interrupt handling for pipelines working
on different DSP cores. We are now keeping the track
of registered DMA channels per core and handling them
per core basis.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-05-06 12:13:36 +02:00
Tomasz Lauda 4da92a9e90 memory: set separate sys runtime heaps for every slave core
Sets separate system runtime heap structures for every slave core.
Previously it only allocated one structure per all the slave cores,
which caused wrong allocations.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-05-06 12:13:36 +02:00
Tomasz Lauda e787f67209 alloc: writeback the whole memmap after init
Writebacks the whole memory map structure after
its initialization.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-05-06 12:13:36 +02:00
Tomasz Lauda b84291d549 pipeline: invalidate pipeline before usage
Invalidates pipeline before any sort of usage
in pipeline_cache function.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-05-06 12:13:36 +02:00
Tomasz Lauda 230727c4c5 icelake: suecreek: prevent power gating on all cores
Prevents powering off any cores during waiti call
on icelake and suecreek platforms.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-05-06 12:13:36 +02:00
Bard liao de5bba49aa trace: get time stamp from kernel
Timer will be reset when DSP is powered down. So the time stamp of trace
log will be reset after resume. Get time stamp from kernel and adding it
as a shift of time stamp can avoid the reset.

Signed-off-by: Bard liao <yung-chuan.liao@linux.intel.com>
2019-05-03 14:11:35 +01:00
Slawomir Blauciak 980171e607 dai: supply caps and other info from within drivers
This change gathers some of the information inside of the DAI drivers,
which was previously inferred using external logic.

Signed-off-by: Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
2019-05-03 03:14:43 -07:00
Keyon Jie 6e4faef8e7 topology: keyword-detect: change to use DMIC FIFO B
We need use FIFO B for keyword detect DMIC, here change it.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-04-30 15:12:53 +01:00
Liam Girdwood 0d0bb9ff6e agent: agent should run at high priority
The system agent should always run at high priority to ensure other lower
priority tasks run as expected. SA work must be as short as possible
since we dont want to impact other high priority work.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-04-30 10:45:42 +02:00
Liam Girdwood 3262ac178d spelling: wait: fix spelling in xtensa wait.h
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-04-30 08:55:36 +02:00
Seppo Ingalsuo fdc5304740 Volume: Fix overflow with S24_4LE format output in xt-xcc build
The HiFi3 version of volume code got a mistake that the
rounding shift instruction can bring the value above 24 bit
range. Therefore the data needs to be shifted once again to
32 bit MSB side to saturate and then back to LSB to
have properly saturated S24_4LE (and S32_LE samples).

The patch renames the shift_right variable because it is used
now for both right and left shifts.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-04-29 09:59:45 -07:00
Ranjani Sridharan 1329ad748f buffer: remove redundant assignment after creating new buffer
ipc_buffer member in the new buffer is already populated
when the contents of the "desc" argument are copied
into it. So remove the redundant assignment to ipc_buffer
after the memcpy.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-04-29 09:59:13 -07:00
Seppo Ingalsuo adf8d66caf Volume: Improve coverage of cmocka tests
To help catching overflows this patch exercises the volume
component test with larger absolute value test data, both
positive and negative numbers. A test generator is added for
S24_4LE format.

Since the reference float arithmetic sometimes calculates the
sample with less accuracy than fixed point firmware code the
error is asserted when delta of reference and firmware is larger
than one LSB. The float code is off by one sometimes with negative
samples. To not complicate the test code this simple relaxation is
proposed.

The table of test inputs is commented with numbers to help to quickly
find a failing test case function if such happens from printed output
from cmocka test run.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-04-29 09:57:16 -07:00
Keyon Jie 2786552478 abi: ipc: topology: align header definition with driver
No abi bump is needed, as driver already run with this header for weeks,
here it is only to fix the gap b/w FW and driver.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-04-29 15:44:38 +01:00
Keyon Jie 789aa98c28 abi: ipc: topology: remove unused structures
For selector and kpb, we have switched to use byte kcontrols, so no ipc
structures needed to align b/w FW and driver, here remove them to align
with driver side.

The sof_ipc_process_type enum is not needed, remove it also.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-04-29 15:44:38 +01:00
Liam Girdwood c540305c20 kconfig: cht, byt: Dont include KPB by default on CHT, BYT.
CHT & BYT have limited amount of IRAM so are sensitive to selection of
built in audio components. Disable KBP by default, but this could be
enabled if other components were disabled.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-04-29 11:52:47 +01:00