Bug 64643 - [alsa] Need to ensure same clock is used for smoother put and get
Summary: [alsa] Need to ensure same clock is used for smoother put and get
Status: RESOLVED MOVED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: modules (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-15 17:24 UTC by Javier Jardón
Modified: 2018-07-30 10:03 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Javier Jardón 2013-05-15 17:24:22 UTC

    
Comment 1 Javier Jardón 2013-05-15 17:28:46 UTC
When setting the smoother in the alsa modules we use the htimestamp, but when interpolating (using get) we use pa_rtclock. pa_rtclock is not guaranteed to be the same as htimestamp.

Specifically in the case where CLOCK_MONOTONIC is not defined, alsa will use getnstimeofday.
Also in the case where HAVE_CLOCK_GETTIME is not defined in alsa-lib (can happen in Android) then alsa-lib will not use CLOCK_MONOTONIC.

The fix is to use snd_pcm_status to get the time from alsa when calculating latency.

A less accurate alternative would be to simply use pa_rtclock_get during the smoother_put.
Comment 2 GitLab Migration User 2018-07-30 10:03:17 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/186.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.