Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1c2689ef authored by Phil Burk's avatar Phil Burk
Browse files

aaudio: handle DSP stalls in clock model

The DSP can sometimes stall while playing.
This might happen when switching internal routes.
That can cause a large jump forward in the timestamps
passed to the IsochronousCLockModel.

When that happens we need to immediately move
the window of the clock model forward and let it
recalibrate using early timestamps.

Otherwise we can end up with the DSP in the middle of the buffer
and a clock model that is drifting too slowly towards
a correct timing window.
That can result in buzzing and clicks depending on the BufferSize.

Also fix test_clock_model.cpp
Added better simulation of timestamp jitter.
Look for position in a range.
Drift more slowly.
Simulate a pause in the DSP.

Bug: 264949085
Bug: 214121016
Bug: 200134791
Test: See bug for repro steps
Test: atest AAudioTests
Test: atest test_clock_model
Change-Id: I9edf4d71ca99ef5827c3c368603a96c52491aad6
parent d24e38bb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment