Skip to content

Conversation

@serhiy-katsyuba-intel
Copy link
Contributor

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.

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>
Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

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

@lgirdwood lgirdwood merged commit eed7cd2 into thesofproject:main Jul 11, 2025
36 of 44 checks passed
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.

3 participants