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>
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>
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>
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>
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>
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>
-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>
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>
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>
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>
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>
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>
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>
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>
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>
Replace the generic copier with host-copier in the class definition and
the instances.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Replace the generic copier with host-copier in the class definition and
the instances.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Replace the generic copier with host-copier in the class definition and
the instances.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Replace the generic copier with host-copier in the class definition and
the instances.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Replace the generic copier with host-copier in the class definition and
the instances.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Replace the generic copier with host-copier in the class definition and
the instances.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Replace the generic copier with host-copier in the class definition and
the instances.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Modify the channel_copy_func to align it with other processing function
signatures.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
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>
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>
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>
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>
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>