Commit Graph

2893 Commits

Author SHA1 Message Date
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
Bartosz Kokoszko e4a9f86a4b arch: memcpy: using memcpy instead of __vec_memcpy
Using simple memcpy function in arch_memcpy_s() since
preemption of __vec_memcpy() causes wrong memory reading.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2019-04-29 09:41:23 +02:00
Seppo Ingalsuo be1331aad7 EQ FIR: Update to support timer based scheduling in HiFi3 version
This patch adds for HiFi3 optimized FIR version capability to
process variable number of frames per every copy. The code is
also enhanced to process as much as possible of data with even
number frames FIR version that is more efficient.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-04-26 22:23:59 +01:00
Libin Yang 68a237c963 topology: DMIC: DMIC16k use pipe-volume-capture-16khz.m4
DMIC16k only supports 16KHz sample rate. It should use
pipe-volume-capture-16khz.m4 to create the pipe which supports
the 16KHz recording.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2019-04-26 09:41:24 -07:00
Libin Yang 55d1f5ac81 topology: sof: add pipe-volume-capture-16khz.m4
DMIC16k only supports 16000Hz sample rate. pipe-volume-capture.m4
only supports 48000Hz. Add pipe-volume-capture-16khz.m4 to support 16KHz
record.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2019-04-26 09:41:24 -07:00
John Gunn d30538396d kconfig: dma: Make DW DMA a Kconfig build option.
Not all hardware will have a DW DMAC so make it optional.

Signed-off-by: John Gunn <jgunn0262@gmail.com>
2019-04-26 09:34:40 -07:00
John Gunn 52e25dc814 xtensa: exception: Some xtensa configs dont have level 7 IRQ
This results in a compiler error when xtensa configuration has no IRQ
level 7. Make it use core-isa.h.

Signed-off-by: John Gunn <jgunn0262@gmail.com>
2019-04-26 09:34:07 -07:00
John Gunn 94fc66d5d3 headers: remove unused header from IPC handler and audio core.
The Intel shim header is specific to Intel hardware and not used by IPC
handler or audio core.

Signed-off-by: John Gunn <jgunn0262@gmail.com>
2019-04-26 09:33:26 -07:00
Bartosz Kokoszko 2e3f140945 volume: trace: volume_ctrl_get_cmd() traces fix
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2019-04-26 16:19:58 +01:00
Tomasz Lauda f846f7ef2c mailbox: fix dst size of mailbox write functions
Fixes destination size used by mailbox write functions.
Subtraction of the base address shouldn't be part
of this size calculation.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-04-26 15:45:05 +01:00
Tomasz Lauda aa9066c9f7 ipc: fix dst size of read in mailbox_validate()
Fixes destination size of mailbox_hostbox_read() call
in mailbox_validate(). We're starting from some non-zero
offset, so the size is smaller than SOF_IPC_MSG_MAX_SIZE.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-04-26 14:03:38 +01:00
John Gunn 36d834855e xtensa: timer: Add support for less than three xtensa timers.
Some xtensa configurations will ahve less than 3 timers so use core-isa.h
to select correct amount of timers.

Signed-off-by: John Gunn <jgunn0262@gmail.com>
2019-04-26 13:43:39 +01:00
Marcin Rajwa f59a9166f0 kpb: start comments with capital letter
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-26 10:53:18 +01:00
Marcin Rajwa 3bb42ed679 kpb: fix issue with memory deallocation
KPB entered infinite loop during memory dealocation.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-26 10:53:18 +01:00
Marcin Rajwa 0b783209b4 kpb: search and assign host sink
This patch adds missing client/host sink to KPB's private
component data.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-26 10:53:18 +01:00
Marcin Rajwa bc6d2f1dd9 kpb: add more logs
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-26 10:53:18 +01:00
Marcin Rajwa 4d9e3e9134 kpb: initialize buffer data to zero
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-26 10:53:18 +01:00
Marcin Rajwa 1b11cd0aa2 kpb: schedule draining task
Add draining task into scheduler.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-26 10:53:18 +01:00
Marcin Rajwa 0b8d02216e kpb: fix wrong size calculation in clearing function
This patch fixes wrong buffer size calculation in
kpb_clear_history_buffer() function.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-26 10:53:18 +01:00
Marcin Rajwa eaca16b848 kpb: align sample container with 16 bits samples
Sixteen bit samples are kept in sixteen bit containers therefore
we don't need to allocate 32 bits containers.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-04-26 10:53:18 +01:00
Yong Zhi 092eb61781 topology: glk-rt5682: add more virtual widgets
Add some more virtual widgets to suppress the machine
driver errors.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2019-04-26 10:43:49 +01:00
Daniel Bogdzia 5100d378aa Updated Readme for cht configuration 2019-04-26 10:42:41 +01:00
John Gunn 76309dafe3 audio: Kconfig: Fix indentation.
Signed-off-by: John Gunn <jgunn0262@gmail.com>
2019-04-25 14:55:28 -07:00
Kai Vehmanen 6a84b4e945 sof: logger: reopen trace file upon EOF
If logger reads an end-of-file from trace node, reopen the file
to ensure trace read position is in sync between host and DSP.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2019-04-25 20:12:17 +02:00
Tomasz Lauda f9b4411059 dai: reload lli after buffer process if irq disabled
If pipeline is configured to be scheduled on some other source
than DMA interrupt, we should reload linked list item after
DAI buffer processing.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-04-25 20:10:54 +02:00
Tomasz Lauda 433de9fb50 dw-dma: clear block/transfer irq after stop
Clears block/transfer interrupts after stopping the
DMA channel. It prevents sudden interrupt trigger
after enabling different DMA channel than the one
previously stopped.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-04-25 13:29:41 +02:00
Tomasz Lauda 5d49c72e34 smp: fix slave cores initialization
Fixes slave cores initialization by moving interrupt
init before any interrupt registration.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-04-25 13:20:47 +02:00
Keyon Jie 395a34efc2 pipeline: improve trigger to including xrun handling
Once FW initiated xrun happens, the pipeline will be stopped(via
pipeline_xrun()) first internally, here add logic to ignore any extra
trigger_stop from host, and do prepare for xrun recovery before we
can really trigger it start.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-04-24 22:38:26 +01:00