Floss: address clock drift in asrc
Since ISO packets are sent out at fixed intervals, the |RepeatingTimer| utility determines an important time domain. By default, it uses NTP-adjusted clocks, the difference between the timestamps of which is compatible with |CLOCK_REALTIME/MONOTONIC/BOOTTIME| and such, aligning with Android's audio server. However, CrAS uses |CLOCK_MONOTONIC_RAW|, which is another time domain, unaffected by NTP, and this can cause xruns when the clock drift accumulates, which does relatively quickly. This CL adds a parameter to |RepeatingTimer| to allow scheduling based on |CLOCK_MONOTONIC_RAW|, where despite each |DelayedCallback| can still drift (since libchrome schedulers use NTP-adjusted clocks), in the long run they are aligned. Bug: 333334341 Test: m Bluetooth Flag: EXEMPT floss only changes Change-Id: Ie90952138d53a67171f526db55edd604306a96f6
Loading
Please register or sign in to comment