[roll] Roll fuchsia [audio_core] Include modulo in position error

For timelines based on different ref clocks, we synchronize
them based on source position error, between the "ideal"
position based on clocks, and the "actual" position based
on the resampler step size.

Although source_pos_error is calculated in nanoseconds, the
input to that calculation is in fractional source frames.
These units are more coarse than nanoseconds, unless the
source frame rate is 122kHz or greater. This leads to
imprecise position error measurements, causing sampling
jitter and distortion.

With this fix, we include in our source_pos_error
calculation the partial frac-frame source_pos_modulo
factor, and we round to the nsec, rather than flooring.

This change improves audio quality: the resampler isn't
constantly chasing noisy position error values and instead
can stabilize on a steady correction factor. For streams
that require micro-SRC (e.g. when synchronizing to an
external clock provided by the client), this increased
accuracy measurably reduces midrange distortion. The coming
test suite audio-core-fidelity-test identifies the benefit
to be most notable in the 500 hz to 6.3 khz range, where
SiNAD is improved by an average of 3.0 dB (peaking at a
9.6 dB improvement at 2.5 khz).

fx test -o audio-core-fidelity-test

Original-Bug: fxb/86743
Original-Bug: fxb/85351

Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/591857
Original-Revision: 902fe0554a95b70d164e94f211e8497086ef32e6
GitOrigin-RevId: 31138ac6cc23fb10ab6f1092def7c58c785678ea
Change-Id: I7300978f4c00259cff84b2554939a1cfc5cf7dd2
1 file changed
tree: bcbfd67c7cf76341ff5379c6c9d845de039d8df1
  1. infra/
  2. third_party/
  3. firmware
  4. flower
  5. jiri.lock
  6. minimal
  7. prebuilts
  8. README.md
  9. stem
  10. test_durations
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

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.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.