Commit Graph

9358 Commits

Author SHA1 Message Date
Piotr Makaruk f90c69c5ae mtl: hda: enable chain dma
Enable building chain dma component on MTL platform

Signed-off-by: Piotr Makaruk <piotr.makaruk@intel.com>
2023-01-19 15:37:32 +01:00
Piotr Makaruk 114a372d1d tgl: hda: enable chain dma
Enable building chain dma component on TGL platform

Signed-off-by: Piotr Makaruk <piotr.makaruk@intel.com>
2023-01-19 15:37:32 +01:00
Piotr Makaruk 19df10fea6 hda: enable handler for hw chain dma
HW chain dma support require new logic in handler

Signed-off-by: Piotr Makaruk <piotr.makaruk@intel.com>
2023-01-19 15:37:32 +01:00
Piotr Makaruk d92f07ad30 hda: chain management and logic implementation
Hardware HDA chain require manager for controlling multiple streams tasks.
Enable support with LL task and DMA mandatory logic.

Signed-off-by: Piotr Makaruk <piotr.makaruk@intel.com>
2023-01-19 15:37:32 +01:00
Guennadi Liakhovetski 4cc9d5418b copier: remove redundant cache invalidation, add comments
No need to invalidate cache again - comp_new() already has done it.
Also document why we don't need to copy config_data[] and use
memcpy() directly instead of mailbox_hostbox_read() - we already have
a pointer and cached have been invalidated already.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-18 16:41:00 +02:00
Guennadi Liakhovetski 31c637a285 copier: fix a wrong DAI device pointer
With IPC4 the top level component that receives trigger events is a
copier and not the associated with it DAI. We need to retrieve the
DAI device pointer for its timing parameters.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-18 16:41:00 +02:00
Guennadi Liakhovetski aa69b492cf dai: (cosmetic) remove a duplicate header
rtos/interrupt.h is included twice in dai-zephyr.c, remove one copy.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-18 16:41:00 +02:00
Guennadi Liakhovetski a0a7952b58 dai: protect common properties objects
Some DAI types share properties objects between playback and capture
directions and write to them and read from them with no locking. Add
a DAI spinlock to protect them.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-18 16:41:00 +02:00
Marc Herbert 235dd98e83 CODEOWNERS: be more selective when matching CMakeLists.txt files
I don't want to be spammed any more every time someone adds or renames a
source file.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-01-18 14:11:07 +00:00
Marc Herbert cb4cb1d0a2 CODEOWNERS: search/replace @mrajwa -> @abonislawski
Dumb search/replace per @mwasko's request in #6933.

Urgently required because the @mrawja account does not exist anymore and
Github complains.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-01-18 14:11:07 +00:00
Baofeng Tian 46cb40aa07 dai: remove dai frame format configuration
frame_fmt was later overwritten by ipc_config.framefmt, so
the previous assignment no use anymore.
Removed whole dai_get_hw_params function to avoid misunderstand.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-01-18 14:02:08 +00:00
Marc Herbert 68b49c186e .github/zephyr: switch Windows build to west update --narrow
It is slightly faster and able to test any random SHA1.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-01-18 13:58:58 +00:00
Marc Herbert ab56445924 .github/zephyr: add new manifest-check
Other jobs typically use `west update --narrow` which is faster but also
able to fetch "wild" SHA1s from any random place!  It is useful for
testing unmerged Zephyr commits but risks accepting "invalid" zephyr
commits; this will not.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-01-18 13:58:58 +00:00
Marc Herbert 0929af4f8c .github/zephyr: replace "TODO: cache docker pull" comment with a link
Caching `docker pull` does not work for size and other reasons, add a
link to the failed experiment.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-01-18 13:58:58 +00:00
Libin Yang 3acf3fac07 mtl: enlarge HEAPMEM_SIZE to 0x60000
The heap mem size is not large enough. Enlarge the size to 0x600000.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2023-01-18 12:42:07 +00:00
Marc Herbert e841dfcc49 src/arch/xtensa: normalize two odd files from CRLF to LF
These two generated files are the only ones stored with CRLF in git end
of lines for no reason. Probably because they were generated on Windows,
then copied to Linux before being checked into git. If they had been
added to git running on Windows then the default `autocrlf=true` would
have likely converted them to LF.

These CRLF EOLs have caused a `git hash-object` mismatch before as seen
in #5917). Now that Windows is compiling SOF, #5920 must be
reverted (see previous commit) and they are causing mismatches again.

While this normalization unfortunately causes some large git noise, that
noise can be easily filtered out with [ git ] diff -b or -w or
--ignore-space-at-eol. Github and many others also have similar
filtering options. Temporarily converting them locally with `unix2dos`
or any editor is another option.

As they are generated, comparisons should most often be performed from
the source(s) they come from anyway.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-01-18 12:17:51 +00:00
Marc Herbert b4edab69de Revert "cmake: make sure sha1 is computed without filters"
Commit 3315681c69 ("cmake: make sure sha1 is computed without
filters") added the `--no-filters` option to the `git hash-object`
invocation used to produce a `src/` checksum embedded in all firmware
binaries and .ldc files.

This fixed a small mismatch for the (very few) people using the
_asymmetric_ `autocrlf = input`. However it created a huge mismatch for
the numerous people using the _symetric_ `autocrlf = true`.

So revert that commit, remove `--no-filters` and replace it with a build
time warning.

`--no-filters` produces a checksum of the files as they are on the
filesystem, as opposed to how they would be input into git after
optional CRLF -> LF conversion.

When `--no-filters` was added, no one was compiling in Windows. Most
developers were not performing any conversion because there is no
`autocrlf` conversion by default on Linux.  Files were identical inside
and outside of git and life was simple.

Simple life except for at least one indomitable Linux developer who had
the _asymmetric_ `autocrlf = input` setting. Also, the SOF git repo
always had two exceptional (and generated) files with CRLF end of lines;
see issue #5917 for details (all other files have LF end of lines). So
for that "asymmetric" developer only and these two files only, `autocrlf
= input` converted these 2 files to LF before hashing and this caused a
different checksum. `--no-filters` stopped that conversion and "solved"
that mismatch.

But now Windows has entered the stage. On Windows, the default is
usually (and unfortunately) the symmetric `autocrlf = true`. It is the
default for Github's Windows runner. This symmetric default converts ALL
other files to CRLF when extracting them out of git. This causes `git
hash-object --no-filters` to produce a _different hash for all but 2
files on Windows_!

The only solution is to:

1. Drop the `--no-filters` to align everything on what is _stored in
   git_. What is stored in git is the only thing we are sure all users have
   in common.

2. Request users to use only _symmetric_ `autocrlf` settings so any
   optional input+output conversion cancels itself out.

3. Convert odd files and make sure they all have LF end of lines.

4. In the future, drop this entire git hash-object technique which is
   flawed in multiple ways and has been causing multiple issues. Much,
   much more work than this very small revert though.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-01-18 12:17:51 +00:00
Bard Liao 1a34ce73dd topology2: remove HDMI from topologies for MTL
There is no HDMI support on MTL RVP for now.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-01-18 13:40:06 +02:00
Jakub Dabek 99093bac4e memory: Add virtual memory regions gathering and structs
Add virtual memory regions info gathering from zephyr and introduce
structs agregating this information.
Add proper defines for memory management.

Signed-off-by: Jakub Dabek <jakub.dabek@intel.com>
2023-01-17 16:10:44 +02:00
Bard Liao 4b810a8767 topology2: cavs-sdw: remove default value of DMIC_DRIVER_VERSION
DMIC_DRIVER_VERSION=3 is already set in mtl.conf. Other platforms
should use the default value in dmic-default.conf

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-01-17 11:23:55 +02:00
Bard Liao 035431ec7e topology2: add missing nhlt
Somehow some SoundWire topologies don't have PREPROCESS_PLUGINS=nhlt
definition. It leads to nhlt is not included in those topologies.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-01-17 11:23:55 +02:00
Curtis Malainey 8bfcf59980 audio: google: remove post processor
Dead code.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-01-13 14:27:33 -08:00
Adrian Warecki 1fbd4c6605 zephyr: ace: pm_runtime: Use new register name & update zephyr revision
DFDSPBRCP register have been renamed to DSPCS in Zephyrs commit
21f278c04bc258eb344ac5b2123b49d760b5b71d. This commit changes the
references from old to new name.

Changed zephyr revision to d9c4ec31fc49e7eef3c8c3b0d07827cc04e6efee

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2023-01-13 13:11:08 +02:00
Marc Herbert 82220c823c github: add new SPDX-README.md and show it when checkpatch fails
Pleasing checkpatch is hard when adding new files.

This is tricky and comes up every time someone adds new files, examples
in #6284, #6796, #6931 , etc.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-01-11 17:10:43 +00:00
Bard Liao fab13768c9 topology2: move development topologies to development folder
Some topologies are for development only. Move them to the development
folder.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-01-11 14:29:15 +00:00
Bard Liao f963fa0e49 topology2: set NUM_HDMIS=3 topologies
Set NUM_HDMIS=3 for all topologies.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-01-11 14:29:15 +00:00
Bard Liao a178ef7c02 topology: hdmi-generic: change HDMI PCM id
Define HDMI_PCM_ID macro so that we can have different pcm id for
different topology. And change the hdmi pcm id of sof-hda-generic.tplg
to align with UCM.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-01-11 14:29:15 +00:00
Bard Liao 3b7bdaf6c0 topology2: hdmi: update route and pipeline index
cavs-sdw.conf uses grouped route and pipeline id. And index 20 based is
for Speaker pcm. That will conflict with the existing hdmi1 pipeline id.
Update hdmi route and pipeline ids with the same formula to avoid the
conflict.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-01-11 14:29:15 +00:00
Andrula Song ee4629baf1 Audio: Math: Add HiFi3 version implementation of FFT
Add HiFi3 version implementation of FFT. Test with xtensa
simulator, we can save about 52.7% cycles for 16bit processing
and 58.1% for 32bit processing.

Signed-off-by: Andrula Song <andrula.song@intel.com>
2023-01-11 14:28:00 +00:00
Andrula Song 8542465512 Audio: Math: Move the C functions of FFT to corresponding files
Move those 16bit and 32bit complex functions to corresponding c
files.

Signed-off-by: Andrula Song <xiaoyuan.song@intel.com>
2023-01-11 14:28:00 +00:00
Brent Lu a6214d06b1 coredump-reader: set confirmation off
The undefined function may cause the debugger not able to run
properly. Print a "set confirm off" instruction to the beginning of
output file to solve this problem.

(xt-gdb) break _MemErrorVector
Breakpoint 1 at 0x9f180400
(xt-gdb) break _MemoryExceptionVector_text_start
Function "_MemoryExceptionVector_text_start" not defined.
Make breakpoint pending on future shared library load? (y or [n]) run
Please answer y or [n].
...

Signed-off-by: Brent Lu <brent.lu@intel.com>
2023-01-11 14:27:21 +00:00
Curtis Malainey 3b8ef3a791 owners: fix google audio component path
Forgot to update this after moving our components to a folder

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-01-11 13:26:14 +00:00
Kwasowiec, Fabiola 10e4e3f86b peakvol: select correct processing function
24/32 function is never selected due to the fact that only the size of
the container determines the selection of the function.
It should be selected based on valid_bit_depth.

Signed-off-by: Kwasowiec, Fabiola <fabiola.kwasowiec@intel.com>
2023-01-10 15:44:51 +00:00
Kai Vehmanen 90c14e56cb dai-zephyr: handle NULL case when calling dai_config_get()
As per interface documentation of dai_config_get(), the function
may return NULL if the device is not configured for the requested
direction. Handle this case explicitly.

Currently no upstream Zephyr driver returns NULL, but e.g. dmic
driver returns invalid configuration when dai_config_get() is
called with DAI_DIR_TX as direction.

Link: https://github.com/thesofproject/sof/issues/6896
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-01-09 19:24:01 +02:00
Krzysztof Frydryk e584701a01 ipc4: basefw: Handle kcps related IPCs
Handle register_kcps, resource_allocation_request for kcps,
power_state_info_get.

Signed-off-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com>
2023-01-09 15:12:13 +00:00
Krzysztof Frydryk 6b647412bf lib: Add mcps budget manager for cpu clock control
Initial implementation of MCPS budget manager.
FW can request/free MCPS usage on enabling certain FW elements. Caution
should be taken when processing on different cores, as kcps_budget_data
is uncache only. The manager will change clock source to match requested
MCPS consumption. Budget manager may interfere with manually setting
clock values!

Signed-off-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com>
2023-01-09 15:12:13 +00:00
Guennadi Liakhovetski c55d011d55 ipc: ipc4: protect memcpy_s() against human error
Add error checking to all calls to memcpy_s() in handler.c.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-09 14:35:39 +00:00
Guennadi Liakhovetski 12a553814b memcpy_s: fix the name of the last parameter
The last parameter of memcpy_s() isn't the size of the source buffer,
it's the actual number of bytes that should be copied.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-01-09 14:35:39 +00:00
Bard Liao 46a5d623f6 topology2: set sdw amp feedback pcm channel number
Assume an amplifier will provide 2 channels feedback.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-01-09 14:28:04 +00:00
Ranjani Sridharan f8bdef3baa module_adapter: produce/consume only from the active buffers
In the simple_copy case, source/sink modules that aren't active are
skipped when passing the buffers to the process callback. So,
produce/consume from only the active buffers that were passed to the
process callback as well.

Reported-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-01-06 16:58:47 +00:00
Ranjani Sridharan 33fa026524 module_adapter: Add flags to skip source/sink buffer invalidate/writeback
Some modules like the mixin/mixout do the invalidate/writebacks for the
source/sink buffers themselves. So, add flags in struct
processing_module to skip doing the same again in the module adapter
code.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-01-06 16:58:47 +00:00
Ranjani Sridharan fba35b13f4 mixin: Convert the component to use the module interface
Replace the comp_drv ops for the mixin component to use the
module_adapter interface. The trigger and get_attribute ops are replaced
with the module_adapter ops which do the exact same thing. The base_cfg
field from struct mixin_data is removed as it is replaced with the
base_cfg in struct module_config and all users have been updated.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-01-06 16:58:47 +00:00
Ranjani Sridharan 8c2dc1daaf module_adapter: Expand the simple_copy flag for multi sink case
Add a helper function to set up the input/output buffers for the 1:1 and
N:1 source:sink buffer configuration. Also, expand the
module_adapter_copy() function to support the simple_copy flag with the
single source and multiple sink buffer configuration.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-01-06 16:58:47 +00:00
Serhiy Katsyuba 05b903bc29 west.yml: Update Zephyr
Updates Zephyr to current top: e4fcb32451c587a3e4ba7f8bf3fc602b16f9652b.

This is to enable ALH multi-gateway feature. The required Zephyr commit
for Intel ADSP MTL is:
https://github.com/zephyrproject-rtos/zephyr/pull/53066

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-01-06 15:15:42 +00:00
Marc Herbert 75fa04de09 scripts/sudo-cwd.sh: don't try to copy missing sudoers.d/ permissions
Copying a file that does not exist obviously fails.

This bug was found when trying to switch from the current "Developer
Image" to the smaller "CI Image":
https://github.com/zephyrproject-rtos/docker-image/pkgs/container/zephyr-build

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-01-06 14:52:09 +00:00
Jaska Uimonen 39ff8cdbea west.yml: upgrade rimage to ba8534bb23
upgrade rimage to
ba8534bb23

ba8534bb23 Fix bitmap according to the IMR type
f3eef3cfb6 Fix IMR type parsing
bdba8259fe Add a command line option to set an Intel-specific PV bit
1c48208850 config: tgl-cavs: add smart amp test module config
082b6261c9 config: Add mt8188.toml

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2023-01-05 15:05:11 +02:00
Serhiy Katsyuba f32b6ac0fe ipc4: copier: Fix to avoid writing to buf above available free space
Fix only affects ALH multi-gateway feature (mux/demux routines). Adds
check for free space in buffer(s) before copying there.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-01-04 16:49:47 +00:00
Serhiy Katsyuba 3b65313560 Revert Audio: Copier: Add missing DMIC DAI index mapping to create_dai()
This reverts commit 8d166a432f.

This restores working DMIC functionality on Windows platform broken
by #6668.

ATTENTION: This will break DMIC1 (DMIC with DAI index 1) functionality
on Linux platform, DMIC0 should still work fine!
Non working DMIC1 should be fixed on Linux driver side, not this firmware.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-01-04 16:14:55 +00:00
Kai Vehmanen 1b02c92eff dai-zephyr: handle dai_config_get() errors properly
Add error check in dai_get_hw_params() for the case where
dai_config_get() returns an error.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-01-04 16:14:25 +00:00
Marc Herbert 2b85c2c358 scripts: fix check whether CMake configuration succeeded
To test whether CMake configuration can be skipped, look for either a
ninja.build or Makefile.

An existing build directory is NOT proof that CMake configuration
succeeded. When CMake configuration failed, trying to build again fails
with a super confusing "Makefile not found" error message.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-01-04 16:09:08 +00:00