diff options
| author | Mike Brady <[email protected]> | 2018-10-22 20:17:08 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2018-11-08 03:59:47 -0800 |
| commit | 01c5c5614a9e67eda3bbec74d4863bdc57b5c990 (patch) | |
| tree | ad9822e99f65fe8814cdc11035a4e75c56e406c6 /tools/perf/scripts/python | |
| parent | 92a4d9a8bcfed4e12f6e7fbcc558a45ecccc7f3c (diff) | |
staging: bcm2835-audio: interpolate audio delay
When the BCM2835 audio output is used, userspace sees a jitter up to 10ms
in the audio position, aka "delay" -- the number of frames that must
be output before a new frame would be played.
Make this a bit nicer for userspace by interpolating the position
using the CPU clock.
The overhead is small -- an extra ktime_get() every time a GPU message
is sent -- and another call and a few calculations whenever the delay
is sought from userland.
At 48,000 frames per second, i.e. approximately 20 microseconds per
frame, it would take a clock inaccuracy of
20 microseconds in 10 milliseconds -- 2,000 parts per million --
to result in an inaccurate estimate, whereas
crystal- or resonator-based clocks typically have an
inaccuracy of 10s to 100s of parts per million.
Signed-off-by: Mike Brady <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions