aaudio: fix loss of sync with HW FIFO index

This fixes a problem with intermittent severe distortion
and variable latency after restarting a stream.

Bug: 68003241
Test: write_sine_callback -pl -m2 -n2 -s5 -c2 -l100
Merged-In: Id7418adb86f2869ac74936cfbd365815a0a0e923
Change-Id: Id7418adb86f2869ac74936cfbd365815a0a0e923
(cherry picked from commit 999e110dac3783df71e5606be1d86f1b122145c0)
3 files changed