Skip to content

Commits split out of the UAOL feedback PR#10894

Open
serhiy-katsyuba-intel wants to merge 3 commits into
thesofproject:mainfrom
serhiy-katsyuba-intel:parts_of_uaol_feedback
Open

Commits split out of the UAOL feedback PR#10894
serhiy-katsyuba-intel wants to merge 3 commits into
thesofproject:mainfrom
serhiy-katsyuba-intel:parts_of_uaol_feedback

Conversation

@serhiy-katsyuba-intel

Copy link
Copy Markdown
Contributor

These are some commits split out of the UAOL feedback PR #10829. The UAOL feedback PR needs to wait until driver UAOL support is ready, as the actual clock feedback functionality has not yet been properly tested. These commits, however, can be safely upstreamed now to ease future rebases of the UAOL PR.

This moves struct cir_buf_ptr from mixin_mixout to a common header so it
can be reused by other modules.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extracts UAOL-related helper logic from a larger UAOL feedback effort so it can be upstreamed independently, reducing future rebase/conflict risk while enabling UAOL capability reporting and multi-DMA UAOL gateway parsing.

Changes:

  • Add a TLV-only DMA-config parser that can collect multiple DMA configs from a gateway blob.
  • Move UAOL capability and stream-id mapping helpers into a dedicated uaol.c/uaol.h.
  • Relocate struct cir_buf_ptr to a common audio header for reuse beyond mixin/mixout.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/ipc/ipc4/helper.c Adds ipc4_find_dma_config_tlv() to discover multiple DMA configs in TLV blobs.
src/include/sof/ipc/topology.h Exposes the new TLV DMA-config helper in the IPC4 topology API.
src/include/sof/audio/uaol.h Introduces UAOL helper API for capabilities TLV and stream-id mapping.
src/audio/uaol.c Implements UAOL capability TLV generation and UAOL→HDA link stream-id mapping.
src/audio/CMakeLists.txt Adds UAOL helper compilation under a UAOL-related Kconfig symbol.
src/audio/base_fw_intel.c Switches UAOL helper usage to the new UAOL header and removes embedded UAOL helper code.
src/include/sof/audio/audio_stream.h Adds shared struct cir_buf_ptr definition.
src/audio/mixin_mixout/mixin_mixout.h Removes local struct cir_buf_ptr (now in audio_stream.h).
src/audio/copier/copier_dai.c Uses the new TLV DMA-config finder for UAOL gateway setup.

Comment thread src/ipc/ipc4/helper.c Outdated
Comment thread src/audio/CMakeLists.txt Outdated
@serhiy-katsyuba-intel

Copy link
Copy Markdown
Contributor Author

Pushed fixes as Copilot suggested.

lyakh
lyakh previously requested changes Jun 15, 2026
Comment thread src/include/sof/audio/audio_stream.h
Comment thread src/ipc/ipc4/helper.c
@lyakh lyakh dismissed their stale review June 17, 2026 15:20

the first of my two comments isn't important of course - it's just about comment wording. As for the second one - indeed, if count becomes invalid simultaneously with the loop reaching its end over tlvs - then my proposed change would make that an error, whereas in the present version it's valid, and that looks correct. Still, I think it would be better to move that check at least to the top of the loop... Can be a follow-up

@lyakh lyakh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, after some interactive explaining I now understand why the count check is where it is - the loop should be allowed to loop as long as it wants to - as long as it doesn't find more TLVs to look at, i.e. as long as it takes the continue path in line 1320.

@kv2019i kv2019i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the validation fix from #10915 , maybe do the other change as well for uaol.c? I'm also ok to do these in a follow-up, if but please consider.

Comment thread src/ipc/ipc4/helper.c Outdated
Comment thread src/audio/CMakeLists.txt Outdated
This moves UAOL-related code to a dedicated intel_uaol.c file, which
will be extended with additional UAOL functionality in the future.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
This adds yet another function to parse DMA config supplied by the host.
Unfortunately, we now have three functions for this purpose.

Unlike the existing ipc4_find_dma_config(),
ipc4_find_all_dma_configs_tlvs_only() can find multiple DMA configs.
For example, a UAOL copier may use two DMA channels: one for the audio
USB endpoint and one for the feedback USB endpoint.
ipc4_find_all_dma_configs_tlvs_only() can only work when all data in
data_buffer is in TLV format; unfortunately, this is not always the case
with IPC4 for all gateway types. Therefore, the existing
ipc4_find_dma_config() is still needed as it can skip non-TLV blob data
at the beginning of data_buffer.

The other function, ipc4_find_dma_config_multiple(), works differently:
it searches for DMA config for a given ALH stream ID in ALH multi-gateway
case. Hence, this third function -- ipc4_find_all_dma_configs_tlvs_only()
-- is added to the family.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants