Skip to content

Conversation

@ujfalusi
Copy link
Contributor

The copying part of the functions need to update the src/dst buffer pointers after each iteration to correctly account for the possible wrap of the buffer.

This was discovered while doing pause - 1sec_wait - resume - 3sec_wait cycles and around the 10th iteration audio became 'metallic' sounding.

Fixes: #7478

Thanks @ranj063 to test with XCC which is not affected and pointing me to the correct path.

The copying part of the functions need to update the src/dst buffer
pointers after each iteration to correctly account for the possible wrap
of the buffer.

This was discovered while doing pause - 1sec_wait - resume - 3sec_wait
cycles and around the 10th iteration audio became 'metallic' sounding.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Copy link
Collaborator

@lyakh lyakh left a comment

Choose a reason for hiding this comment

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

Interesting! If I understand the affected algorithm here correctly, those normal_mix_*() functions do mixing and possibly additionally copying. Only if after mixing there are samples for copying (this always happens at least with the first source being mixed in) and when those samples wrap - then we get this bug. So apparently this only happens when pausing

@ujfalusi
Copy link
Contributor Author

Interesting! If I understand the affected algorithm here correctly, those normal_mix_*() functions do mixing and possibly additionally copying. Only if after mixing there are samples for copying (this always happens at least with the first source being mixed in) and when those samples wrap - then we get this bug. So apparently this only happens when pausing

In a simple case when you have a single path and a single stream then there is only copying, the mixing is skipped as there is nothing to mix.

@kv2019i
Copy link
Collaborator

kv2019i commented Apr 26, 2023

The testbench test fails to apt fetch issue, Zephyr mtl builds fail due to #7516 (now fixed), so that leaves us with https://sof-ci.01.org/sofpr/PR7517/build6472/devicetest/index.html (usual fail) and https://sof-ci.01.org/sofpr/PR7517/build6473/devicetest/index.html (one suspend-resume fail). No fails pointing to this PR, so proceeding with merge.

@kv2019i kv2019i merged commit f599f61 into thesofproject:main Apr 26, 2023
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.

[BUG] Audio playback gets heavily distorted after rapid pause/release on HDA analog output

6 participants