Commits split out of the UAOL feedback PR#10894
Conversation
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>
There was a problem hiding this comment.
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_ptrto 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. |
0a40e5d to
7f086af
Compare
|
Pushed fixes as Copilot suggested. |
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
left a comment
There was a problem hiding this comment.
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.
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>
7f086af to
dd5bc2f
Compare
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.