Commit Graph

5528 Commits

Author SHA1 Message Date
Guennadi Liakhovetski 5777ef7903 uuid: use proper UUID trace format
Use "%pU" for all UUID traces, it will print lower case 'a'-'f'
hexadecimal digits and use little endianness by default.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-09-02 14:13:15 +01:00
Guennadi Liakhovetski 03f4a1704e logger: support kernel-style UUID formats
Implement "%pUb", "%pUB", "%pUl", and "%pUL" UUID formats.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-09-02 14:13:15 +01:00
Ryan Lee e85cbf5ea6 smart amp: modified UUID for the Maxim DSM component
Updated new UUID for the Maxim DSM component.
New component UUID : 0cd84e80-ebd3-11ea-adc1-0242ac120002

Signed-off-by: Ryan Lee <ryans.lee@maximintegrated.com>
2020-09-02 11:13:47 +01:00
Guennadi Liakhovetski 1820da7514 trace: remove a superfluous variable initialisation
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-09-01 16:44:33 +01:00
Guennadi Liakhovetski bf4106935a dmic: (cosmetic) merge two prints
Reduce trace amount by merging two short prints together.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-09-01 16:44:33 +01:00
Guennadi Liakhovetski aa0aee9b54 dw-dma: use a generic allocation
When allocating an LLI array no need to use rzalloc() since the array
is 0-initialised directly after allocation anyway.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-09-01 16:44:33 +01:00
Guennadi Liakhovetski 75ed28b682 pipeline: (cosmetic) make a function static
pipeline_schedule_cancel() is never called outside of pipeline.c,
make it static.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-09-01 16:44:33 +01:00
Bartosz Kokoszko b6e31d1185 comp: add comp_get_status() helper function
This commit adds comp_get_status() helper function, which
takes two arguments: requesting component and component from
which user wants to read status. In case when both components
are on the different cores function additionally invokes
comp_invalidate().

This commit also fixes issue in smart_amp_copy() function, where
we always invoke comp_invalidate(sad->feedback_buf->source) whether
or not both components (smart amp and sad->feedback_buf->source)
are on different cores. In case when both components are on
the same core, we can invalidate data not previously writebacked.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2020-09-01 16:33:44 +01:00
Marc Herbert 6be9315596 rebuild-testbench.sh: remove CMAKE_VERBOSE_MAKEFILE
Default is verbose enough. VERBOSE=1 can still be used later at make
time.

Also change nproc to nproc --all because we don't care about offline
processors.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-09-01 16:26:15 +01:00
Marc Herbert 37b5893ee6 host-testbench.sh: clean up output files when tests are successful
Make git status great again.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-09-01 16:26:15 +01:00
Marc Herbert 32d32b59cb .travis.yml: switch to newer rebuild-testbench.sh
Also stop hiding errors in topologies build.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-09-01 10:42:56 +01:00
Marc Herbert 55eecdd1d4 host-build-all.sh: print deprecation warning
Use newer rebuild-testbench.sh instead, added by
commit 46578cb103 ("scripts: Add a new script to rebuild testbench")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-09-01 10:42:56 +01:00
Ryan Lee 26875c7e8c Added Maxim DSM audio component
Maxim DSM(Dynamic Speaker Management) audio component is added.
This component takes stereo input + 4 channel IV feedback.

Signed-off-by: Ryan Lee <ryans.lee@maximintegrated.com>
2020-09-01 10:20:01 +01:00
Pan Xiuli 41e7d65e3a topology: add jsl nocodec topology
Add sof-jsl-nocodec topology from sof-icl-nocodec.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2020-09-01 10:14:20 +01:00
Slawomir Blauciak 496bdd7cf0 dai: atomic trigger operations
This change adds support for atomic trigger operations,
by grouping DAIs together with a common 'group_id' in
the configuration of each DAI.

When DAIs are in the same group and in the same DSP core,
they will process triggers atomically, i.e. wait for all
the other DAIs to receive the trigger command and pospone
the final, actual trigger operation.

This functionality might be required in case of stream aggregation,
where one stream is fed into multiple physical links.

Signed-off-by: Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
2020-09-01 10:13:21 +01:00
Artur Kloniecki 5b29dae9c8 logger: Create global convert_config variable to avoid spaghetti code.
Most functions in logger depend on values stored in conver_config struct
which are passed to almost all function calls. This patch moves pointer
to the config to global context and allows each function to derive
necessary values from there. This reduces needless parameters passed
to function calls and allows for more flexible access to data in nested
functions.

Signed-off-by: Artur Kloniecki <arturx.kloniecki@linux.intel.com>
2020-09-01 10:11:55 +01:00
Karol Trzcinski b2a325a3b7 cmake: Handle empty SOF_SRC_HASH_LONG
SOF_SRC_HASH always must have integer value, because of usage
them to initialize global variable in source code.
Variables, which may be empty should be used inside quotation
to prevent cmake incorect number of arguments error.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-09-01 10:01:08 +01:00
Karol Trzcinski 67e41d21c3 cmake: Keep temporary files used to compute source hash
Temporary files are useful to understand and debug the build.
Moving output to another directory, keeps binary directory clean.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-09-01 10:01:08 +01:00
Karol Trzcinski 97e2a3c583 cmake: Look for .git folder in SOF_ROOT_SOURCE_DIRECTORY directory
This is possible location of .git folder, instead of CMAKE_SOURCE_DIR.
Without this patch, checked condition always return false and
GIT_LOG_HASH is used instead source code hash.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-09-01 10:01:08 +01:00
Karol Trzcinski 3a21088444 cmake: Rephrase message about git absence during source hash computing
This message shoulddn't be in imperative mode, to follow rules.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-09-01 10:01:08 +01:00
Pan Xiuli a0fc1de515 topology: add development folder for test and validation
Add development folder for topologies that not for production.
First add sof-tgl-nocodec-ci as a validation topology.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2020-09-01 15:02:17 +08:00
Pan Xiuli 41ca1d8827 topology: add keyword detect pipeline into sof-tgl-nocodec-ci
Add KPB pipeline into the sof-tgl-nocodec-ci topology.
This topology will be a reference test topology for all features used
on TGL.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2020-09-01 15:02:17 +08:00
Pan Xiuli fe6e88c871 topology: intel: make dmic dai name configurable
Add default dai name for dmic dai, we can override them in
if dai name in machine driver is different.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2020-09-01 15:02:17 +08:00
Pan Xiuli 54a0cc8e5a topology: add test topology sof-tgl-nocodec-ci
Add FW echo reference to nocodec TPLG on SSP0.
Add internal loopback on SSP0. We can compare echo reference and
loopback capture stream.
Add smart amplifier for nocodec on SSP2

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2020-09-01 15:02:17 +08:00
Pan Xiuli 73cf4c0bc7 topology: sof: use pipeline ID in demux control name
To make multiple DEMUX comp can work in same topology. Add pipeline
ID into the DEMUX control name.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2020-09-01 15:02:17 +08:00
Marc Herbert 35d9034090 build-tools.sh: fix misnamed locals DO_BUILD_topology and _test
Easier to spot once all other shellcheck warnings have been fixed.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-08-31 14:43:11 +01:00
Marc Herbert f30d11072a build-tools.sh: fix minor shellcheck warnings
Missing quotes mostly, also some disable=SC2034 because "eval".

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-08-31 14:43:11 +01:00
Karol Trzcinski 173206494d dai: host: dma: Check returned value in dma_buffer_copy_* clients
After error in lower layers, this issue should be traced in
proper context.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-08-31 14:34:27 +01:00
Karol Trzcinski 8720cf203a dma: Return error code from dma_buffer_copy_* function
This function should error code from 'process' to their client.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-08-31 14:34:27 +01:00
Karol Trzcinski ca73d43076 pcm_converter: Return error code from converting function
It allows to trace error with proper (client) trace context
after hitting some error.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-08-31 14:34:27 +01:00
Seppo Ingalsuo f430addec7 Tools: Fuzzer: Do not use illegal BUILD_COMMAND in CMakeLists.txt
This patch removes the incorrect usage of BUILD_COMMAND. Having it set
to "cmake" caused the cmake usage help text output to be shown only and
caused the ExternalProject_Add command to believe the
libsof_tplg_parser.so was built. The build for the library happened only
because the next install step performed the compilation. With this fix
the default build command is used instead. There's no need to define
it here.

Fixes #2656

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-08-31 11:30:26 +01:00
Marcin Rajwa 4d48f868fe KWD: performance improvements
This patch improves overall key word detector
pipelines performance by skipping unnecessary
checks & calls.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2020-08-28 13:48:07 +01:00
Marcin Rajwa 31949d0669 detector, kpb: change buffering and draining constants
This fix compensates host wakeup time.
Here we limit max draining request to 2 seconds.
History buffer size if one second bigger than max draining
request allowed.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2020-08-28 13:48:07 +01:00
Marcin Rajwa dcd8d4c79e memory: increase HPSRAM size for buffer on TGL
This patch increases HPSRAM buffer size for TGL platform.
Thanks to this change we can provide KPB more space for
history data.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2020-08-28 13:48:07 +01:00
Marcin Rajwa e697e912aa kpb: refactor
This patch changes the variable name history_depth to drain_req
as it is more understandable.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2020-08-28 13:48:07 +01:00
Marcin Rajwa e027b08d39 KPB: protect update of history buffer
This patch adds critical section during update
of real time stream in draining task. There is a small possibility
that history data may get corrupted when real time stream preempt
draining at wrong moment.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2020-08-28 13:48:07 +01:00
Marcin Rajwa fec09e0b87 topology: schedule two KWD pipelines on 5 ms period
This patch changes the KWD pipelines perriod from 20 ms
to 5 ms to improve performance.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2020-08-28 13:48:07 +01:00
Adrian Bonislawski 665bda9c8a kconfig: select CAVS_USE_LPRO_IN_WAITI for TGL
TGL have hardware requirement that DSP should
use LPRO as clock source in waiti.

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2020-08-28 13:42:55 +01:00
Dharageswari R 0a597d57a7 topology: Allow set parameters at runtime in smart_amplifier component
Kcontrol interface is needed to set the smart_amplifier algorithm
parameters at runtime for tuning purpose. This patch allows the
user to set parameters using byte kcontrol.

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
2020-08-28 13:42:11 +01:00
Mohana Datta Yelugoti 46578cb103 scripts: Add a new script to rebuild testbench
Currently, the testbench is built using the script named
'host-build-all.sh' under scripts directory. But the name of
the script, it's git history doesn't refer to what the script
is currently doing now.

The newly written script adds option to build the testbench.
This script was written in mind to remove the old script
used to build the testbench (i.e host-build-all.sh).

The script also adds an option to build the testbench with
AFL instrumentation. AFL fuzzer works well when the code
it's trying to fuzz is instrumented properly. The instrumentation
helps the fuzzer in generating unique inputs which cover
different paths in the code graph. When the option is set,
testbench is built using a compiler AFL provides, which does
the instrumentation work.

Signed-off-by: Mohana Datta Yelugoti <ymdatta.work@gmail.com>
2020-08-28 13:38:04 +01:00
Karol Trzcinski 78202631e7 pcm_converter: Reduce modulo operations
Module is expensive operation, so usage them in processing code
should be reduced.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-08-27 16:22:49 +01:00
Liam Girdwood 6d7a17e6f3 schedule: atomic: atomic values must be read during arithmetic
atomic operations must use the value returned by the atomic_add() or
atomic_sub() operation rather than a subsequent (and non atomic) read.

Fix this by using values returned by atomic add() or sub()

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-08-27 16:21:48 +01:00
Karol Trzcinski 31a3aacc1a logger: Terminate parsed log levels with new line
Text saved to FILTER_KERNEL_PATH should be terminated with
new line, to indicate end of input and mark it redy to send
to FW in IPC message.

Fixes: 126060ae (logger: Send parsed runtime log levels to FW via debugFS)

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-08-27 14:25:14 +01:00
Karol Trzcinski 60141f2074 logger: Fix log level parsing
Usage of strstr for short version of logs level definitions
(for example 'e') leads to invalid level parsing, because first
log level with defined string (or letter) will be returned
(in this example 'verbose').
After change, log level will be returned only when name is
exactly as given one.

Fixes: b1fc9220 (logger: Parse runtime filter levels)

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-08-27 14:25:14 +01:00
Guennadi Liakhovetski 692cfa9305 scheduler: fix deregistering domain owner
When a DMA scheduling domain owner is deregistered, if there's still
another DMA channel active in the same domain, the ownership has to
be transferred. In this case even briefly disabling and re-enabling
DMA can cause over- or underruns. Avoid this by transferring domain
ownership transparently.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-08-27 14:24:06 +01:00
Karol Trzcinski 67a0a6937c trace: Trace initial message as error logs
Use tr_err to have this initial message also in error logs and assert
traces works well.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-08-27 13:49:20 +01:00
Karol Trzcinski 837ad4b9e0 trace: Print source hash as zero padded 8 char width value
Then src hash and ldc hash should have the same format.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-08-27 13:49:20 +01:00
Karol Trzcinski 61f9d3de34 trace: Move FW description log location
This log should be added just after buffer initialization,
to make it the first one in the output file - for easy identyfication.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-08-27 13:49:20 +01:00
Seppo Ingalsuo 40fd801c29 Tools: Testbench: Add system agent initialization
This patch fixes a segfault with null sof->sa pointer in
pipeline_schedule_copy() function. The bug has not been observed
with test topologies for processing pipelines but with other
topologies with fuzzer varied parameters.

The sa_init() is added to tb_pipeline_setup(). The scheduler_init_edf()
is a dependency. The two dummy functions platform_timer_get() and
clock_ms_to_ticks() are also added as dependency. The CMakelist for
library is edited to include agent.c build for testbench.

Fixes #3247

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-08-27 11:59:04 +01:00
Guennadi Liakhovetski d697516c32 topology: apl: use the generic DMIC topology template
Use a generic DMIC topology template instead of defining a private
one.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-08-27 11:48:00 +01:00