Reset the last corrected timestamp upon discontinuity

Whenever timestamp discontinuity occurs, timestamp correction is not
performed until input timestamps starts advancing at normal rate.
During this period, any request for corrected timestamp should simply
use raw values instead of previously corrected timestamps.

This ensures that server/kernel timestamp stats computation in
AudioFlinger DirectOutputThread will not use stale timestamps on
stream flush, thus avoiding A/V sync errors.

Test: atest timestampverifier_tests
Change-Id: Iebafb17c25410510e79157273ff885cfd1064b48
2 files changed