[roll] Roll fuchsia [audio_core] More stable micro-SRC
Treat source position errors of less than 1 fractional frame as no
error, when tuning a clock or the micro-SRC between clocks.
Also, detect when two clocks perfectly track CLOCK_MONOTONIC,
and do not actively synchronize them in that case.
Detail:
(1) Position measurements are taken in source fractional-frame
units, then translated to nanosecond units. Position error, in
particular, is fed into the PID feedback as a nsec-based value,
but its precision is limited by the initial measurements and
media-to-reference-time transformations, both of which are
rooted in fractional-frame units. At 48kHz, a fractional frame
is more than 2-ns, so two effectively-equivalent streams will
still sometimes show source position error of [-2,2] ns,
depending on the exact zx::time input. By treating deltas of
<1 fractional-frame as 0, we won't overreact to unavoidable
position fluctuation from source fractional-frame precision
limitations, By keeping ns as our unit of measurement for the
PID feedback controls, we retain additional precision for
converging clocks and micro-SRC as rapidly as possible, once
we DO begin rate-adjustment.
(2) This optimization applies when a device clock is in the
monotonic domain and a custom client clock is a CLOCK_MONOTONIC
clone that has not yet been rate-adjusted. Once we detect that
a client monotonic-clone HAS been updated in any way (as
revealed by generation_counter), we forever treat it as
different (and thus rate-adjusted as any other clock).
fx test -o audio-libclock-unittests audio_core_unittests
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/589491
Original-Revision: 3f6d0e8d18fcaab85aaa195bef7d7f57e19b1ec6
GitOrigin-RevId: 34d02a524d4b5569a7cef08701e44a2fbe5e7b8b
Change-Id: I31ed3830d5c5993c3992c4f413eed12f198418db
This repository contains Fuchsia's Global Integration manifest files.
All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.
Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.
First install Jiri.
Next run:
$ jiri init $ jiri import minimal https://fuchsia.googlesource.com/integration $ jiri update
Third party projects should have their own subdirectory in ./third_party.