Commit Graph

2928 Commits

Author SHA1 Message Date
Tomasz Lauda 0619cacfdc clk: add clk_get_freq method
Adds implementation of clk_get_freq method.
It allows to retrieve clock frequency in Hz
based on provided clock id.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-05-10 11:02:47 +02:00
Tomasz Lauda 29f817ec74 clk: rename clock_get_freq function
Renames clock_get_freq function to clock_get_nearest_freq_idx.
Previous name was confusing.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-05-10 11:02:47 +02:00
Keyon Jie 030c81c75b topology: keyword-detect: add bytes control for detector
Add bytes control and initial value for detector component.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-05-09 22:25:53 +01:00
Keyon Jie 4a34ab058a topology: keyword-detect: get kpb configure data from ipc
We design to use bytes kcontrol to send kpb configuration data via IPC
from topology, here implement it.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-05-09 22:25:53 +01:00
Seppo Ingalsuo 7dd76db0a8 Topology: Add volume ramp tokens into topologies
This patch adds volume configuration tokens as fifth parameter
for pga.m. All the topologies those use W_PGA() are updated to
use a linear (type=0) ramp with length of 250 ms.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-05-09 22:13:48 +01:00
Seppo Ingalsuo a81ce180ca Volume: Get volume ramp parameters from IPC
This patch adds code to handle volume ramp type and ramp length
parameters from topology. The previous hard coded 250 ms ramp
related macros are removed.

Since the kernel does not (yet) provide the volume min/max into
as IPC for new() the code assumes the ramp length is the length
of the mute to 0 dB gain transition.

If a volume transition is larger than that, what can happen in a
high gain configuration, the ramp is shortened to exceed the
passed time parameter. So in other words the large transitions will
use a variable rate slope.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-05-09 22:13:48 +01:00
Keyon Jie e4cb046a2c Topology: kwd: change to use correct buffer caps
We don't need to use host/dai caps for detector buffer and selector
buffer, here correct it.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-05-09 14:57:19 +02:00
Rander Wang 39a373500d topology: add virtual widgets for hda_idisp
Add some more virtual widgets to suppress the machine driver errors.

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2019-05-08 20:24:38 +02:00
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