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

Skip to content
Commit 8f02e2d6 authored by Phil Burk's avatar Phil Burk Committed by Glenn Kasten
Browse files

aaudio: fix race condition in timestamp path

There was a potential race between setting the first timestamp
and reading the first timestamp that could cause the timestamp service
thread to exit. This would cause the client to not get any timestamps.
Then the timing model would not advance and the stream would stall.
This could result in read() or write() returning zero,
or a TIMEOUT error.

This was rare except for some devices that had different
timing in the HAL.

Bug: 68271891
Bug: 117557847
Test: adb shell write_sine_callback -pl -m2 -n2 -s2 -c2 -l100
Test: atest CtsNativeMediaAAudioTestCases
Change-Id: Ib0974a576aaa17ff8de40899e60ed56015027bd7
parent efd99ec8
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