a2dp HAL: add write thread to avoid audio skips

The a2dp stack is throttling the audio throughtput
to accommodate headsets that can accept audio too fast.
This makes that very limited audio buffering exists in the
A2DP output path. We are therefore vulnerable to irregular scheduling of
audioflinger mixer thread when CPU clock speed or system activity changes.

The fix consists in adding an intermediate audio buffer between audioflinger
mixer thread and the A2DP socket.

Issue 5682206.

Change-Id: I6f2387fb694a75e62c0805b7f134f7cb88eaedd6
1 file changed