Return direct/offload corrected timestamps
Previously, for direct/offload outputs with timestamp correction enabled, getTimestamp would not return corrected timestamps, but only raw HAL timestamps with downstream latency compensation. To resolve this, run timestamp correction routine in getTimestamp and return latest kernel timestamps, as threadLoop() timestamps may be stale for (large buffer) direct/offload outputs. Also, use timestamp verifier discontinuity new API to fix corrected timestamps after pause/standby. Direct non-pcm and offload threads should register timestamp verifier zero discontinuties on standby, but other threads should register continuous discontinuities. On pause, all threads should register continuous discontinuity. Update to use new timestamp verifier API to set the discontinuity type on each discontinuity event. Test: Offloaded (eac3) into MSD HAL AudioTrack (corrected) timestamps Jitter standard deviation reduced. Change-Id: I28a95c3922165689dfcbd13ab83b35dab8ec6adb
Loading
Please register or sign in to comment