intel: Fix for Zephyr pre-wakeup latency calc bug#10112
Merged
lgirdwood merged 1 commit intothesofproject:mainfrom Jul 11, 2025
Merged
intel: Fix for Zephyr pre-wakeup latency calc bug#10112lgirdwood merged 1 commit intothesofproject:mainfrom
lgirdwood merged 1 commit intothesofproject:mainfrom
Conversation
Fix for Zephyr bug (?) introduced by this commit: zephyrproject-rtos/zephyr#88145 Before that commit, the conversion of wakeup exit latency from us to ticks was done using the k_us_to_ticks_ceil32() function. After that commit, it was done with k_us_to_ticks_near32(). ACE has a 100 us exit latency declared in the device tree. A tick is about 83.3 us. Before that commit, the exit latency was calculated as 2 ticks; after the commit, it was calculated as 1 tick. This created a sporadic problem in HDA loopback tests: proper audio was sent to the HDA output link, but silent samples were read from the HDA input link. It seems that running the LL too early, before all hardware parts have completely woken up, results in samples being zeroed by the hardware. This commit restores the correct us to ticks conversion behavior by forcing the use of k_us_to_ticks_ceil32() for conversion. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
tmleman
approved these changes
Jul 11, 2025
lgirdwood
approved these changes
Jul 11, 2025
Member
lgirdwood
left a comment
There was a problem hiding this comment.
Good find @serhiy-katsyuba-intel !
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.
Fix for Zephyr bug (?) introduced by this commit:
zephyrproject-rtos/zephyr#88145
Before that commit, the conversion of wakeup exit latency from us to ticks was done using the k_us_to_ticks_ceil32() function. After that commit, it was done with k_us_to_ticks_near32().
ACE has a 100 us exit latency declared in the device tree. A tick is about 83.3 us. Before that commit, the exit latency was calculated as 2 ticks; after the commit, it was calculated as 1 tick.
This created a sporadic problem in HDA loopback tests: proper audio was sent to the HDA output link, but silent samples were read from the HDA input link. It seems that running the LL too early, before all hardware parts have completely woken up, results in samples being zeroed by the hardware.
This commit restores the correct us to ticks conversion behavior by forcing the use of k_us_to_ticks_ceil32() for conversion.