Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copier: Use correct multiplier for latency to bytes calculation #8972

Merged

Conversation

ujfalusi
Copy link
Contributor

The latency value is in number of periods (1ms) while the buffer allocated for the DAI copier is at least 2 periods.
This can shoot up the calculated stream_start_offset resulting invalid delay reporting.
Use the period size of the DAI copier to correct this error.

The kernel reported delay currently (on normal non DeepBuffer PCM): at start: ~302 frames
after 20x pause/resume: ~6530 frames

With this patch:
at start: ~254 frames
after 20x pause/resume: ~3600 frames

The drift rate is about the same with DeepBuffer.

The latency value is in number of periods (1ms) while the buffer allocated
for the DAI copier is at least 2 periods.
This can shoot up the calculated  stream_start_offset resulting invalid
delay reporting.
Use the period size of the DAI copier to correct this error.

The kernel reported delay currently (on normal non DeepBuffer PCM):
at start: ~302 frames
after 20x pause/resume: ~6530 frames

With this patch:
at start: ~254 frames
after 20x pause/resume: ~3600 frames

The drift rate is about the same with DeepBuffer.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
@kv2019i kv2019i merged commit 41bdc0c into thesofproject:main Mar 26, 2024
43 of 45 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