Commit Graph

10088 Commits

Author SHA1 Message Date
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
Ranjani Sridharan 36a490414c copier: Save the endpoint channel map
Modify copier_set_alh_multi_gtw_channel_map() to save the channel map and
channel count for each gateway. Since the endpoint buffer is not used for
DAI copiers, there is no need to set the channel map in this case.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-17 15:22:52 -07:00
Ranjani Sridharan ef4c467df6 copier: Remove usage of endpoint device for multiple endpoint DAIs
Remove the usage of the endpoint device for params, prepare, trigger
and reset.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-17 15:22:52 -07:00
Ranjani Sridharan 6ffb052691 copier: Remove DAI device drv trigger
Use dai_zephyr_trigger() instead. Remove the state modification in
dai_zephyr_trigger() and handle it in the copier_comp_trigger().

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-17 15:22:52 -07:00
Ranjani Sridharan 5f4be32822 copier: Optimize the DAI copy for multiple endpoint DAIs
Currently copying from the multiple endpoint buffer to the DMA involves
2 copies, first from the multi_endpoint_buffer to the endpoint_buffer
and then from the endpoint_buffer to the DMA buffer. Remove the
intermediate buffer copy so that demux and copy can be performed directly
from the multi_endpoint_buffer to the DMA buffer. Similarly, for the
capture case, remove the intermediate copy to the endpoint buffer from
the DMA buffer.

Add a couple of fields in struct copier_data to save the channel map and
channel count for multiple endpoint DAIs. Also remove the
copy_single_channel field as this is set directly in the process
callback in the dai_data now.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-17 15:22:52 -07:00
Ranjani Sridharan fa96044d75 dai-zephyr: Add support for multi endpoint DAIs
Introduce helper functions for multiple endpoint DAI copiers to demux
and copy the channels into the respective DMA buffers.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-17 15:22:52 -07:00
Ranjani Sridharan 0b0ef4a445 dai-zephyr: Use params channels
Use the params channels directly instead of using the local_buffer to
get the channel count. This is in preparation for optimizing the
multiple endpoint DAIs where the local_buffer will not be used.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-17 15:22:52 -07:00
Ranjani Sridharan 48910da79d copier: Modify channel_copy_func
Modify the channel_copy_func to align it with other processing function
signatures.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-17 15:22:52 -07:00
Ranjani Sridharan f0d338278b copier: Add a helper function to set buffer channel map
Add a helper function to set the channel map for the endpoint buffer.
This is in preparation to remove the endpoint buffer and save the
channel map to be set directly in the DMA buffer.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-05-17 15:22:52 -07:00
Kai Vehmanen d87b5f9d0b topology2: cavs-nocodec-bt: fix bclk for loopback A2DP case
The BCLK was incorrect for the loopback (LBM) configuration
for BT A2DP (48kHz 2ch 16bit), leading to incorrect playback/capture
speed.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-05-17 19:55:29 +03:00
Bard Liao 3436ea54ab topology2: add tgl rt712 topology
Add sof-tgl-rt712 support. rt712 is a multi function codec which
shpports headset, amp, and dmic functions.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
2023-05-17 07:49:52 -07:00
Laurentiu Mihalcea 1eed2128d4 schedule: zephyr_dma_domain: Move the check for registrable ppl tasks from unregister_dma_irq()
There's nothing to be done in zephyr_dma_domain_unregister() for tasks
which are not marked as registrable. Because of this there's no point in
checking if the task is registrable during unregister_dma_irq().
Instead, this check should be done at the beginning of
zephyr_dma_domain_unregister().

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-05-17 14:20:24 +03:00
Laurentiu Mihalcea b04f7849f9 schedule: zephyr_dma_domain: Remove duplicate check for registrable pipeline task
In the case of non-registrable pipeline tasks,
zephyr_dma_domain_register() will return before register_dma_irq() is
called so there's no point in checking if the pipeline task is
registrable in register_dma_irq(). This commit removes this unnecessary
additional check.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-05-17 14:20:24 +03:00