Commit Graph

10100 Commits

Author SHA1 Message Date
Ievgen Ganakov 7ae382ddbb ams: add helper functions
Every module which needs AMS for notifications uses the same flow when
configuring itself as a consumer or producer for such notifications.

Add AMS helper functions to avoid code repetition.

Signed-off-by: Ievgen Ganakov <ievgen.ganakov@intel.com>
2023-05-24 15:47:07 +03:00
Ievgen Ganakov 508881687f kconfig: limit AMS to IPC4
Add IPC4 dependency for AMS

Signed-off-by: Ievgen Ganakov <ievgen.ganakov@intel.com>
2023-05-24 15:47:07 +03:00
Ievgen Ganakov a5a0255a64 ams: add kpd message
Add "Key Phrase Detected" message uuid

Signed-off-by: Ievgen Ganakov <ievgen.ganakov@intel.com>
2023-05-24 15:47:07 +03:00
Laurentiu Mihalcea d735c91d9a west.yml: Update Zephyr revision
Update Zephyr revision to contain CONFIG_DCACHE_LINE_SIZE
additions.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-05-24 15:24:07 +03:00
Andy Ross e4aee1afe7 Revert "tools: Remove older fuzz framework"
This got merged too fast.  Turns out it broke the newer fuzz
integration that was in the same YAML file.  Also there are some
evolving review comments.  Will resubmit.

This reverts commit 11e57f5030.

Signed-off-by: Andy Ross <andyross@google.com>
2023-05-23 12:27:28 -07:00
Andy Ross 11e57f5030 tools: Remove older fuzz framework
Fuzzing via the new framework is now integrated at oss-fuzz upstream,
so there's no point to keep this in SOF anymore.  The github workflow
has bitrot vs. the newer build.sh, and that docker build is very
heavyweight vs. the newer fuzz.sh smoke test that runs in the regular
build container anyway.

Signed-off-by: Andy Ross <andyross@google.com>
2023-05-23 10:03:02 -07:00
Kai Vehmanen 9ea2f05ac7 ipc4 : send panic on Zephyr OS panic
Send panic notification message to host when panic happens. The panic
detail is built by Zephyr framework and included in debug memory window.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Rander Wang <rander.wang@intel.com>
Co-developed-by: Rander Wang <rander.wang@intel.com>
2023-05-23 13:29:33 +03:00
Kai Vehmanen a55fbfabd9 ipc: add ipc_msg_send_direct support
For emergency like FW panic event, we need to send notification IPC
message to host directly without inserting this message in msg_list
since at this time the system is not stable now and it is very possible
that the normal message processing logic can't work.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Rander Wang <rander.wang@intel.com>
Co-developed-by: Rander Wang <rander.wang@intel.com>
2023-05-23 13:29:33 +03:00
Yong Zhi 94f8b0c4d4 topology2: fix number range between 1 and 1000 used by Regex
Since IncludeByKey uses Regular expressions to validate text match,
the expression [1-1000] does not filter number between 1 to 1000 as
intended. For example, DEEPBUFFER_FW_DMA_MS=0 results in matched while
DEEPBUFFER_FW_DMA_MS=5 returns not found, fix with regex flavor pattern.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
2023-05-23 13:12:21 +03:00
Bard Liao fda59fb7d4 topology2: remove cavs-sdw.tplg from avs-tplg
There is no device that uses the topology.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-05-22 22:30:36 -07:00
Joe.Cheng b19c8e1862 dts: handle zero config size case in apply_config instead of set_configuration
To handle zero config size case in set_configuration would let
dts_codec_apply_config never be called due to early return when checking
if md->new_config_size is zero. This causes the problem that DTS
tuning parameter would never be set. Instead, check the config size in
dts_codec_apply_config() could resolve the zero config case and let the
tuning parameter could be set successfully.

Signed-off-by: Joe.Cheng <joe.cheng@xperi.com>
2023-05-22 21:29:08 -07:00
Baofeng Tian 857d547b52 ipcgtw: fix potential memory misalignment in structure definition
Two structures are both need 4 bytes aligned, since its content
started with int32, add 4 bytes align in current code.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-05-22 19:38:33 -07:00
Baofeng Tian bf6b875bd0 ipcgtw: merge ipcgtw.h to ipcgtw_copier.h header file
No need to keep separate ipcgtw.h header file, merge it to
ipcgtw_copier.h.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-05-22 19:38:33 -07:00
Baofeng Tian 5e200efdee ipcgtw: rename ipcgtw exposed functions
Rename and align ipcgtw exposed function name that exposed to copier.
Add static to the functions that only used inside copier_ipcgtw.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-05-22 19:38:33 -07:00
Baofeng Tian d3e639cb0d copier: move create_ipcgtw and create free_ipcgtw in copier_ipcgtw
Move those ipcgtw specific functions out of copier, this can make
copier module more simple and easy to read, also prepare for copier
module adapter, also expand ipcgtw_new/free, since it is small and
only called at local file.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-05-22 19:38:33 -07:00
Baofeng Tian 99283263aa copier: public functions that will be used in later modules
This is preparation work for split copier to separate host, dai,
ipcgtw, some functions need be public for different module usage,
so public it first for later usage.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-05-22 19:38:33 -07:00
Baofeng Tian 5957916faa copier: rename ipcgtw.c and move it to copier folder
ipcgtw only used in copier, so move it to copier folder and rename
it to copier_ipcgtw.c

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
2023-05-22 19:38:33 -07:00
Ranjani Sridharan 3835846836 topology2: sdw-amp-generic: Show all aggregated DAIs on the graph
When there are aggregated amps, the topology includes a DAI copier for
each aggregated DAI. But, since the second DAI is not connected to
anything in topology, it doesn't show up in the graph. So, add a virtual
widget and connect it to the aggregated DAI and the gain module to show
its existence in the graph. When parsing the topology, the kernel
ignores all routes that contain a virtual widget at any end of the
route.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-22 18:53:45 -07:00
Ranjani Sridharan 919b402abc topology2: dai-copier: Remove ALH support
Remove ALH support in the generic dai-copier class as it has its own
class now.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-22 18:53:45 -07:00
Ranjani Sridharan 05628c9c48 topology2: Use the new ALH dai copier class
Replace the use of the generic dai-copier class with the ALH specific
DAI copier and pipeline class.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-22 18:53:45 -07:00
Ranjani Sridharan e9353b0eed topology2: Introduce a new pipeline class
This is specifically meant to be used with ALH DAI copiers.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-22 18:53:45 -07:00
Ranjani Sridharan 457113a275 topology2: components: Introduce a new class definition for ALH DAI copiers
Create a new class for ALH because they are different from the other DAI
types with DAI index being irrelevant. So, it would need a new naming
scheme that's more meaningful. For ex: dai-copier-ALH.SDW1-Playback.0

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-22 18:53:45 -07:00
Marc Herbert ee58fef921 smex/cmake: move -Wl,EL option to target_linker_options() for clang
-Wl,EL is a linker option, not a compiler option and clang does not
like it at compilation time; it fails like this:
```
cd smex
cmake -B build -DCMAKE_C_COMPILER=clang
make -C build

clang-15: error: -Wl,-EL: 'linker' input unused
          [-Werror,-Wunused-command-line-argument]
```

Reported by @andyross in https://github.com/google/oss-fuzz/pull/10342

oss-fuzz does not need smex at all but this one-line fix is just
faster and simpler than a bigger CMake re-architecture just for
oss-fuzz.

Also simplify this for clang compatibility:
```
error: unknown warning option '-Wimplicit-fallthrough=3'; did you mean
     '-Wimplicit-fallthrough'? [-Werror,-Wunknown-warning-option]
```

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-05-22 15:06:41 +03:00
Andrey Borisovich 38f3f5d411 workflows: sparse-zephyr upgraded runner OS to Ubuntu 22.04
Runner OS for the Zephyr workflow had been updated to Ubuntu 22.04,
so upgrading this workflow too.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2023-05-20 01:45:42 +03:00
Andrey Borisovich a047538c82 workflows: Zephyr build-linux job upgraded runner OS to Ubuntu 22.04
New Zephyr Docker container v.26.4 is based on Ubuntu 22.04,
upgrading build-linux job OS to match the one in the container.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2023-05-20 01:45:42 +03:00
Andrey Borisovich ab3a11338a workflows: Zephyr build-linux upgraded Docker container with Zephyr SDK
New Docker container tagged v0.26.4 contains new Zephyr SDK v0.16.1
needed to build with Zephyr main branch.
New Zephyr SDK is backward compatible with the older Zephyr revisions
so the upgrade is done for SOF manifest revisions too.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2023-05-20 01:45:42 +03:00
Andrey Borisovich 23bc1c5d0e workflows: Zephyr build-windows removed unzpip package
Installation of new Zephyr SDK 0.16.1 does not require unzip anymore
in the setup.cmd script. This tool had been replaced by 7z that is
by default present on all Github Windows runners.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2023-05-20 01:45:42 +03:00
Andrey Borisovich 69db1ee0ca workflows: Zephyr build-windows upgrade Zephyr SDK to 0.16.1
Zephyr main branch requires new Zephyr SDK.
Upgraded version of Zephyr SDK to newest available v0.16.1 in the
build-windows job. New SDK is backward compatible with old Zephyr
revisions so the upgrade is applied to all CI.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2023-05-20 01:45:42 +03:00
Andrey Borisovich 01b550092d west.yml: upgraded Zephyr revision to support new Zephyr SDK 0.16.1
Commit https://github.com/zephyrproject-rtos/zephyr/commit/9fc99928caf0
requires new Zephyr SDK 0.16.1 to work and breaks compatibility to
older Zephyr revisions.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2023-05-20 01:45:42 +03:00
Jyri Sarha af9bedb63e topology2: cavs-mixin-mixout-hda: Rename mixin-mixout mixers
Rename mixin and mixout Analog Playback volumes. Rewrite the names of
the mixers to better reflect their position in the topology.

As a result of this commit mixers are renamed in sof-hda-generic.tplg.

'gain.1.1 1 2nd Playback Volume' becomes
'gain.1.1 Pre Mixer Analog Playback Volume'

and

'gain.2.1 2 Main Playback Volume' becomes
'gain.2.1 Post Mixer Analog Playback Volume'

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2023-05-19 12:54:41 -07:00
Paul Olaru 3fa7ff8098 drivers: imx: sdma: Invalidate cache when reading info from BDs
This invalidation is required in order for the driver to correctly
report the available/free bytes on a given DMA channel.

Fixes: 87d79c48dd ("drivers: imx: sdma: Add SDMA support to SOF")

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2023-05-19 18:24:25 +03:00
Ranjani Sridharan e5455775b0 topology2: copier: Remove host gateway type support
It is now handled by the host-copier class. Renaming the copier class to
dai-copier and modifying its naming convention will be done in the
follow up patches.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00
Ranjani Sridharan b534fc6192 topology2: host-gateway-playback: Use host-copier
Replace the generic copier with host-copier in the class definition and
the instances.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00
Ranjani Sridharan ac26e70d95 topology2: host-gateway-capture: use host-copier
Replace the generic copier with host-copier in the class definition and
the instances.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00
Ranjani Sridharan 81a354e750 topology2: gain-copier-capture: Use host-copier
Replace the generic copier with host-copier in the class definition and
the instances.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00
Ranjani Sridharan 3bee3c25fc topology2: gain-playback: Use host-copier
Replace the generic copier with host-copier in the class definition.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00
Ranjani Sridharan 9e95cd288b topology2: gain-capture: Use host-copier
Replace the generic copier with host-copier in the class definition and
the instances.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00
Ranjani Sridharan eb157a5c2f topology2: mixout-gain-host-copier-capture: Use host-copier
Replace the generic copier with host-copier in the class definition.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00
Ranjani Sridharan b86acaa353 topology2: deepbuffer-playback: Use host-copier
Replace the generic copier with host-copier in the class definition and
the instances.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00
Ranjani Sridharan f942a0338a topology2: src-gain-mixin-playback: Use host-copier
Replace the generic copier with host-copier in the class definition and
the instances.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00
Ranjani Sridharan be825a8581 topology2: host-copier-gain-src-mixin-playback: Use host-copier
Replace the generic copier with host-copier in the class definition and
the instances.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00
Ranjani Sridharan f211f4c9da topology2: host-copier-gain-mixin-playback: Use host-copier
Replace the generic copier with host-copier object in the pipeline class
definition and all its instances.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00
Ranjani Sridharan f64a424bfd topology2: components: Add a new class definition for the host copier gateway
This will replace the generic copier for the host gateway.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-19 08:17:34 -07:00
apoorv 5fa9cb6be4 topology1: CMakeLists: add RPLP CRB support for SoundWire
Added RPLP CRB support for SoundWire0 and SoundWire2

Signed-off-by: apoorv <apoorv@intel.com>
2023-05-19 10:07:45 +03:00
Daniel Baluta aa91bedf38 CODEOWNERS: Add NXP people as owners for scheduler
With the work done for zephyr DMA domain we got a lot of insights
about how scheduler works.

So add myself and Laurentiu as codeowners.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2023-05-19 10:06:07 +03:00
Marc Herbert 2d3c7eae4f xtensa-build-zephyr.py: don't extract SOF_BUILD from generated .h file
This replaces and simplifies commit a823958a8d ("xtensa-build-zephyr:
pass sof build version to rimage") with a constant 1.

That commit was submitted to avoid a test failure in a broken, internal
test looking for an SOF_BUILD value... hardcoded to 1! (internal FW issue
257, test TestLoadFwExtended::()::test_00_01_load_fw_and_check_version")

The final goal is for this script to stop extracting anything from
`generated/sof_versions.h` so rimage can be configured _before_ the build
has started. Other commits will deal with other parts of sof_versions.h

SOF_BUILD can be replaced by a constant because it has always been one
when building with Zephyr. The optional BLD_COUNTERS feature - disabled
by default in XTOS since commit 9f8cce1522 ("Disable __TIME__ and the
non-reproducible build counter by default") for build reproducibility
reasons - has never worked with Zephyr for the following reasons:

- The sof_add_build_counter_rule() invocation is located in the
top-level sof/CMakeLists.txt file which has never been used by the
Zephyr build.

- sof_add_build_counter_rule() registers a POST_BUILD command for the
top-level "sof" CMake target but there is no "sof" build target in the
Zephyr build.

- Variables like VERSION_BUILD_COUNTER_CMAKE_PATH are not defined in the
Zephyr build for some unknown reason.

- Probably others.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-05-19 10:02:03 +03:00
Ranjani Sridharan d132e25480 topology2: cavs-nocodec-bt: Remove duplicate route
This has already been added in bt-generic.conf.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-18 09:09:05 -07:00
Ranjani Sridharan 43cd6e26d6 copier: set DAI copier endpoint conversion only once
No need to do this more than once for multiple endpoint DAI copiers.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-17 15:22:52 -07:00
Ranjani Sridharan 313b959f6e copier: Remove init_dai_single()
No need to handle this differently as multi-endpoint DAIs no longer
create endpoint devices/buffers too.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-17 15:22:52 -07:00
Ranjani Sridharan 138e1c9b25 copier: Remove creation of DAI endpoint device/buffer
These are not used anymore for the multi-endpoint DAI copiers, so remove
the creation/freeing of endpoint devices/buffers.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-17 15:22:52 -07:00