Commit Graph

6082 Commits

Author SHA1 Message Date
Seppo Ingalsuo cb924991a5 Topology: HDA Generic: Headset filters configuration from CMakeLists.txt
This patch eases the definition of headset post processing filters
blobs. First, the macro name PPROC is changed to HSPROC to indicate
the processing targets headset endpoint.

The CMakeLists.txt for topologies is edited to add build of topology
sof-hda-generic-eq.tplg that does not include DMIC endpoints for
devices without such. Previously there was no variant without
DMIC enable.

The main macro sof-hda-generic.m4 is enhanced to define HSPROC as
volume to use pipeline pipe-volume-playback.m4 when it has not been
defined in CMakeLists.txt.

The definitions for PIPELINE_FILTERx are copied from endpoint specific
HSPROC_FILTERx if they were defined. If they were left undefined
the pipeline will apply default processing configuration (e.g.
for EQs pass-through).

In the example the EQs are left to pass-through. The topology
sof-hda-generic-eq.tplg shows an example of explicitly setting
the filter coefficients at the top level. The FILTER1 is impacts the
first algorithm in pipeline (IIR) and FILTER2 the second algorithm
algorithm (FIR) in the used HSPROC definition eq-iir-eq-fir-volume.
In this case volume does not support such but for future there could
be FILTER3, FILTER4, ... added if need. The current m4 macros support
now only HSPROC_FILTER1 and HSPROC_FILTER2.

The patch adds undefine to PIPELINE_FILTERx in intel-generic-dmic.m4 to
make sure the macro is not set by other than DMICPROC_FILTERx. The
same is done for 16 kHz DMIC capture. Currently there were no issues
caused by it.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-01-29 11:48:58 +00:00
Pierre-Louis Bossart 3658341a3f topology: sof-cml/icl-rt700: align DMIC support with HDaudio
Somehow we use different configurations for the DMIC, remove
everything in this file and rely on the same macros.

The only difference with HDaudio is the pipeline and PCM device
numbers.

the old topology names sof-icl-rt700 and sof-cml-rt700 alias to the
same 4ch topology, when the kernel looks for the 2ch or 4ch versions
we can remove it. Make then break.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-01-29 11:33:19 +00:00
Pierre-Louis Bossart cb23581048 topology: sof-tgl-rt711-rt1308: align DMIC support with HDaudio
Somehow we use different configurations for the DMIC, remove
everything in this file and rely on the same macros.

The only difference with HDaudio is the pipeline and PCM device numbers

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2021-01-29 11:33:19 +00:00
Marc Herbert 4dd431715d CODEOWNERS += /.github/
Add CODEOWNERS for /.github/

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-01-29 10:29:58 +00:00
Iuliana Prodan dcba48583e topology: imx8m: add mixer component with wm8960 codec
This topology works on i.MX8MP with wm8960 codec.
When loaded, one will have a sound card with two playback subdevices.
This way, samples pushed to the two subdevices will be mixed and
sent to SAI3 and then to wm8960 codec.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-01-28 22:56:45 +00:00
Iuliana Prodan f5b28cc151 topology: imx8: add mixer component with cs42888 codec
This topology works on i.MX8QM and i.MX8QXP with cs42888 codec.
When loaded, one will have a sound card with two playback subdevices.
This way, samples pushed to the two subdevices will be mixed and
sent to ESAI0 and then to cs42888 codec.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-01-28 22:56:45 +00:00
Iuliana Prodan 21e38421d7 topology: imx8: add mixer component with wm8960 codec
This topology works on i.MX8QM and i.MX8QXP with wm8960 codec.
When loaded, one will have a sound card with two playback subdevices.
This way, samples pushed to the two subdevices will be mixed and
sent to SAI1 and then to wm8960 codec.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2021-01-28 22:56:45 +00:00
Liam Girdwood b9faef1cb6 drivers: idc: let users know core boot failure reason.
Trace the result of any secondary core boot failures.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-01-28 22:50:30 +00:00
Liam Girdwood 9db16c146d align: linker: need alignment macro for the linker.
Fixes build for platforms where linker offsets are aligned.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-01-28 22:50:30 +00:00
Liam Girdwood 3e26ca0993 pm: memory: fix build for unused function
memory_banks_get() unused on APL when LPSRAM disabled.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-01-28 22:50:30 +00:00
Liam Girdwood 96fa4749ee idc: core boot: relax the idc wait to allow other cores access to IO
Currently idc_wait_in_blocking_mode() spins and reads timer and mailbox
IO which can slow down secondary core boot (which share the physical
resources).

Relax the IO to speed up booting of secondary cores.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-01-28 22:50:30 +00:00
Liam Girdwood 8a5bcd9df6 timer: scheduler: make all timer IO atomic in scheduler
Make all timer IO is atomic in the scheduler by adding a new
platform_timer_get_norq() API that validates 64 bit reads.
ALso make sure there is enough time for setting the new timeout
in the CAVS platforms.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-01-28 22:50:30 +00:00
Pan Xiuli 76ae4d3e16 cavs: pm: change the timeout value for HOST IPC handler
After checking the kernel log the HOST will always handle
and replay DSP sent IPC GLB_TRACE_MSG in about 40us.

set the FW side wait timeout to 100us to improve the performance
of DSP power switch.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2021-01-28 22:46:55 +00:00
Pan Xiuli 882ef66c68 cavs: pm: fix wrong usage of poll_for_register_delay
In current kernel logs the CTX_SAVE IPC will always take more than 10ms,
but before 0b2876b279 it only need less than 1ms. This patch fix the
wrong usage of always timeout for poll_for_register_delay.

IPC_DIPCIDR_MSG_MASK is the mask for msg from BIT 0 to 30 while
we want to check if BIT 31 is 0. now change the MASK and VAL to correct
values to make the poll and delay will return when there is no DSP sent
IPC.

fixes commit 0b2876b279 ("cavs: pm: poll for IPC_DIPCIDR_BUSY to be
clear before powerdown hpsram")

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2021-01-28 22:46:55 +00:00
Ranjani Sridharan 37292a70be dmic: add spinlock during set_config op
Long run multiple pipeline tests fail during DMIC
config with dynamic pipeline set/up. Holding the dai
lock during DMIC config fixes the issue.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-01-28 13:28:15 +00:00
Ranjani Sridharan 6db728dfcf dma/dai: use spin_lock_irq/spin_unlock_irq during get/put
Long run multi pipeline tests fail with dynamic pipeline
setup when trying to enable/disable the DMA and DAI.
Disabling interrupts during get/put addresses this issue.

Suggested-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2021-01-28 13:28:15 +00:00
Marc Herbert 356cc852e1 Replace run-time ALIGN_UP() check by ALIGN_UP_COMPILE() where possible
Should save some cycles

See related PR #3739

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-01-28 13:21:48 +00:00
Marc Herbert 921e52c680 common.h: rename two alignment verification macros, add comments
Zero functional change.

Rename "is_non0_power_of_2(x)" to "is_power_of_2(x)" because it's
simpler and because zero is not a power of 2.

Rename "compile_fail_zero_or_true(x)" to "compile_assert()" because it's
much simpler and because I really couldn't find what "zero_or_true"
meant?

Add a few comments, especially explain why COMPILE_TIME_ALIGNED(align)
uses __builtin_constant_p(align) because it took me ages to figure it
out.

Also recommend ALIGN_UP_COMPILE() over ALIGN_COMPILE() when compiling
with -O0

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-01-28 13:21:48 +00:00
Marc Herbert cdee91d01e .github: rename workflow from "Github Action CI" to "Github Actions"
The singular "Action" makes it look like our workflow is an action. The
plural "Github Actions" is at least the name of the product; so it's
vague enough.

A technically acccurate name would be "Main workflow" but we have only
one so it would be useless plus we're next to "Jenkins" and others and
want to stay consistent with them.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-01-28 13:20:22 +00:00
Pin-chih Lin fdbb90e786 tools: topology: Add common Codec Adapter capture pipeline tplg
pipe-codec-adapter-capture.m4 is implemented as a common pipeline
module of a capture codec w/ Codec Adapter API.

For codec developers, a upper-layer tplg file should be provided for
the specified codec with the information of control bytes, schedule
core, and byte-control names.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2021-01-27 18:20:17 -08:00
Pin-chih Lin 1a2afeb552 tools: topology: Add common Codec Adapter playback pipeline tplg
pipe-codec-adapter-playback.m4 is implemented as a common pipeline
module of a playback codec w/ Codec Adapter API.

For codec developers, a upper-layer tplg file should be provided for
the specified codec with the information of control bytes, schedule
core, and byte-control names.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
2021-01-27 18:20:17 -08:00
Pan Xiuli 76b3f1eaaf README.md: add GitHub action status badge
Add the status badge for GitHub action CI.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2021-01-27 21:40:31 +00:00
Pan Xiuli 76d2e10fa8 CI: GitHub action: change name shows on PR status
change name for the GitHub actions to make the status context name
show in PR check looks nicer

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2021-01-27 21:40:31 +00:00
Pan Xiuli 893c6b94a8 CI: GitHub action: allow action check runs on more branch
allow to run the check on PR and push to release stable branch

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2021-01-27 21:40:31 +00:00
Curtis Malainey 64540b85aa pipeline: fix log message
quoting wrong function name

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2021-01-27 21:38:58 +00:00
Liam Girdwood 8112cad6ce component: doxygen: add more content around prepare() and reset().
Add some more usage context around prepare() and reset() for developers.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2021-01-27 21:27:58 +00:00
Guennadi Liakhovetski e580ca538c schedule: build only one of single- and multi-channel DMA schedulers
Only cAVS platforms use the single-channel DMA scheduler, all
other platforms use the multi-channel one. Add Kconfig options
to only build one of them.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-01-27 21:26:50 +00:00
Pan Xiuli 0b2876b279 cavs: pm: poll for IPC_DIPCIDR_BUSY to be clear before powerdown hpsram
If IPC_DIPCIDR_BUSY is set, DSP is sending IPC to HOST and HOST will
try to read from mailbox on hpsram.
polling for IPC_DIPCIDR_BUSY is cleared before power offer hpsram to
avoid HOST read fail.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2021-01-27 11:11:32 +00:00
Pan Xiuli 4c16fd491d platform: cavs: ipc: change hard code value to defined macro
Change 0x80000000 to IPC_DIPCI_BUSY and IPC_DIPCIDR_BUSY to
increase the code readablity

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2021-01-27 11:11:32 +00:00
Pan Xiuli 1602cba5f3 drivers: cavs: ipc: change hard code value to defined macro
change 0x80000000 value to IPC_DIPCIDR_BUSY to increase the code
readablity

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2021-01-27 11:11:32 +00:00
Marc Herbert e163bf1513 sof.doxygen.in: change ../test to @top_srcdir@/test
Makes it possible to place the build directory anywhere.

This directory does not seem in use any more; fixing it does not change
the doxygen output. However this does silence a doxygen error message
when the build directory is not in the usual place.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-01-27 11:00:04 +00:00
Oleksandr e3a1301cd6 audio: codec_adapter: increase codec adapter max blob size to 8192 bytes
4096 bytes is not enough to fit startup config of Waves custom codec

Signed-off-by: Oleksandr Strelchenko <strelchenko.oleksandr@gmail.com>
2021-01-27 10:58:17 +00:00
Guennadi Liakhovetski f3b87b400f byt: fix sporadic channel swap
Commit 05e1c26166 ("byt-ssp: fixes for DSP modes") removed a
work-around for known hardware bugs, causing channel swapping
in I2S mode. Restore the work-around but make sure it's only
enabled in I2S and LEFT_J modes.

Fixes: #3699, #3520

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-01-25 13:01:25 +08:00
Keyon Jie 385cf89c76 smart_amp_maxim_dsm: change logging level for xrun
When overrun happens for maxim_dsm_ff_proc() or maxim_dsm_fb_proc(), it
is not fatal, change the logging level to warning to avoid flooding the
memory windows.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-01-22 15:41:56 +00:00
Keyon Jie 7fb6d5f0f3 topology: smart_amp: make the DSP core configurable
Define SMART_AMP_CORE configurable, configure to run DSM pipelines on
DSP core0 if it is not set.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-01-22 15:38:45 +00:00
sriram a47a8a6a21 audio: tools: fix matlab/octave directory compatibility
To support exist function - fullfile() path addition is to prevent Matlab (differently than Octave)
to give false positive with some other directory location with it's search path

Added correction to isempty.

Signed-off-by: ShriramShastry <malladi.sastry@intel.com>
2021-01-22 15:28:32 +00:00
Marc Herbert 05dded7b7b [skip ci] translate .travis.yml to new .github/workflows/pull-request.yml
Full translation except the IRC notifications, appreciate if someone
else can add later. Seems much faster.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-01-22 13:42:03 +00:00
Marc Herbert 9938a66db4 docker-run.sh: use --tty only when we have one
--tty is not compatible with github actions, fails with "the input
device is not a TTY"

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-01-22 13:42:03 +00:00
Keyon Jie 07d45e4b9a pipeline: use id for component/pipeline comparison
Switch to use component id and pipeline id for comparison, to avoid
getting wrong results when using different pointers point to the same
component/pipeline.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-01-22 13:38:33 +00:00
Keyon Jie 6b590cc42d pipeline: add helper to retrieve the pipeline id
Add inline helper pipeline_id() to retrieve the pipeline_id from a
pipeline pointer.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-01-22 13:38:33 +00:00
Guennadi Liakhovetski f4c9c28bc5 zephyr: fixed cached rimage path
Fix the cached rimage path to the temporary cloned rimage location.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-01-22 13:35:29 +00:00
Keyon Jie 74d7b54f63 dmic: stop dmic at xrun to avoid interrupt flooding
Once an Xrun happens, only clearing the interrupt can't recover it, stop
the dmic to avoid interrupt flooding.

This will lead to subsequent pipeline Xrun and eventually the pipeline
will be stopped.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2021-01-22 13:30:15 +00:00
Marc Herbert e17b90d9b2 scripts: replace "make" with "cmake --build"
This makes it possible to switch to Ninja with a single line change
which can be useful to test build changes and issues.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-01-18 16:11:46 +00:00
Marc Herbert 9dc763f782 testbench/cmake: don't hardcode the BUILD_COMMAND
ExternalProject() preserves the existing BUILD_COMMAND

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-01-18 16:11:46 +00:00
Marc Herbert 027bda1fcd .travis.yml: build Sue Creek
Sue Creek is the only platform using the ALIGN() macro in assembly. If
it had been built in CI then we would have avoided the ALIGN()
regression in commit 39266cac81 ("core: assure alignment is only done
on power of 2 values"). Building Sue Creek is practically free and finds
bugs so let's build it.

I'm aware Travis isn't the future but it's still running for now and
this is a tiny and totally trivial change that took 1/100 of the time
spent writing this commit message. It's also a reminder not to forget
Sue Creek in whatever will replace Travis.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-01-18 14:34:04 +00:00
Adrian Bonislawski fadd8e7077 tgl: enable WOVCRO clock
This will allow to save significant amount of SOC power
in low power S0ix WoV

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2021-01-15 16:59:12 +00:00
Adrian Bonislawski 908838ac15 clk: release clock in low power mode
This patch will release previous clock in low power mode
because there are some rare problems with not releasing it

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2021-01-15 16:59:12 +00:00
Adrian Bonislawski 66e8496a80 clk: add LOWEST_FREQ_IDX to make clock switching more flexible
It will allow to define cpu lowest clock per platform
instead of fixed one (LPRO)

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2021-01-15 16:59:12 +00:00
Marc Herbert 32fe8a4b81 common.h: restore basic ALIGN() macro compatible with assembly
commit 39266cac81 ("core: assure alignment is only done on power of 2
values") changed the alignment macros, they now use C code to perform a
sanity check. This broke ALIGN() usage in
platform/suecreek/include/platform/lib/memory.h in two different ways:

1. it broke static initializers in platform/suecreek/base_module.c
because these can't use statement-expressions. This could have been
fixed by simply switching to ALIGN_UP_COMPILE(), BUT:

2. memory.h files are also included in assembly.

Also note memory.h values are copied unprocessed to linker scripts that
require the ALIGN() spelling.

For these reasons ALIGN() needs to be switched back to a "dumb" macro.

Preserve the sanity checks just added in alloc.c and pm_memory.c by
switching them to the new and smarter ALIGN_UP() macro.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-01-15 13:30:07 +00:00
Adrian Bonislawski 7daaa518c6 config: byt: remove tone comp
Remove tone from the byt defconfig to reduxe code size.

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2021-01-15 13:28:11 +00:00