Repository navigation
uaol: add UAOL feedback support - #11265
serhiy-katsyuba-intel wants to merge 5 commits into
Conversation
*** DO NOT MERGE *** This commit will be swapped with proper one once Zephyr PR is merged. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Error propagation, buffer sizing and format handling, DMA rollback, undefined arithmetic, and dependency pinning must be corrected.
Review effort: Balanced
Findings: 4
Open (8)
DSRC lacks validation for unsupported sample formats · New DSRC buffer is too small for fast-mode copies · New Allocation failure incorrectly reports success · New DMA byte count is misused for source-format processing · New Feedback start failure leaves audio DMA running · New Negative reconstructed sample is left-shifted undefinedly · New Public DSRC APIs lack required documentation · New Unpinned feedback branch makes the manifest nonreproducible · New
What changed in this PR
Adds UAOL USB feedback handling and DSRC-based drift compensation to the SOF DAI path.
Changes:
- Adds feedback DMA setup, processing, and UAOL rate adjustment.
- Introduces and tests a lightweight DSRC implementation.
- Updates the Zephyr dependency for required UAOL support.
| File | Description |
|---|---|
west.yml |
Selects a UAOL-enabled Zephyr revision. |
test/ztest/unit/dsrc/testcase.yaml |
Registers DSRC tests. |
test/ztest/unit/dsrc/test_input.txt |
Adds DSRC input data. |
test/ztest/unit/dsrc/test_expected_2.txt |
Adds expected resampling output. |
test/ztest/unit/dsrc/test_dsrc_ztest.c |
Tests DSRC rates and output. |
test/ztest/unit/dsrc/prj.conf |
Configures the test application. |
test/ztest/unit/dsrc/CMakeLists.txt |
Builds the DSRC tests. |
src/ipc/ipc4/dai.c |
Configures and releases feedback DMA. |
src/include/sof/lib/dai-zephyr.h |
Adds UAOL DAI runtime state. |
src/include/sof/audio/intel_uaol.h |
Declares UAOL feedback helpers. |
src/include/sof/audio/dsrc.h |
Defines the DSRC API and state. |
src/audio/intel_uaol.c |
Implements feedback and rate adjustment. |
src/audio/dsrc.c |
Implements drift resampling. |
src/audio/dai-zephyr.c |
Integrates feedback DMA and DSRC processing. |
src/audio/CMakeLists.txt |
Adds DSRC to UAOL builds. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This implements a DSRC (Drift-compensating adaptive Sample Rate Converter) for use with the UAOL feedback feature to perform audio resampling and compensate for small dynamic drift. The implementation employs linear interpolation. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
This adds unit tests for DSRC using Zephyr's ztest framework. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
Make dai_get_properties_safe() non-static and declare it in sof/lib/dai-zephyr.h so that DAI-specific code outside dai-zephyr.c (e.g., intel_uaol.c) can use it. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
b186022 to
e74ee91
Compare
PR 11265: test resultsRun date: 2026-10-13 09:31 UTC Tested commit: 998f024dfe4144faaf36f76f707be630aa3d060e |
lgirdwood
left a comment
There was a problem hiding this comment.
Just minor opens, will mark as DNM until Zephyr part is ready.
This extends UAOL functionality to support audio rate adjustment based on the "desired" clock reported by the USB playback device via the USB feedback endpoint. The firmware calculates drift from this feedback and instructs UAOL hardware to increase or decrease the transfer rate accordingly. A DSRC (Drift-compensating adaptive Sample Rate Converter) is used when necessary to perform audio resampling and compensate for small dynamic drift. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
e74ee91 to
998f024
Compare
lgirdwood
left a comment
There was a problem hiding this comment.
LGTM, I guess we dont get ASRC option today ?
Answered in a review reply above. |



This extends UAOL functionality to support audio rate adjustment based on the "desired" clock reported by the USB playback device via the USB feedback endpoint. The firmware calculates drift from this feedback and instructs UAOL hardware to increase or decrease the transfer rate accordingly.
A DSRC (Drift-compensating adaptive Sample Rate Converter) is used when necessary to perform audio resampling and compensate for small dynamic drift.
Depends on Zephyr PR: zephyrproject-rtos/zephyr#121128