[***DNM***][***CI***] uaol: add UAOL feedback support#10829
Draft
serhiy-katsyuba-intel wants to merge 7 commits into
Draft
[***DNM***][***CI***] uaol: add UAOL feedback support#10829serhiy-katsyuba-intel wants to merge 7 commits into
serhiy-katsyuba-intel wants to merge 7 commits into
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>
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>
31085ab to
3a179e1
Compare
This adds unit tests for DSRC using Zephyr's ztest framework. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
This moves UAOL-related code to a dedicated 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_dma_config_tlv() 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_dma_config_tlv() 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_dma_config_tlv() -- is added to the family :-/. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
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>
*** DO NOT MERGE *** Switches Zephyr to private repo with UAOL feedback implementation: https://github.com/serhiy-katsyuba-intel/zephyr/tree/uaol_fb2 Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
3a179e1 to
f01de31
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.