OSDN Git Service

A2DP audio HAL: fix write error behavior
authorEric Laurent <elaurent@google.com>
Thu, 14 Jan 2016 02:09:37 +0000 (18:09 -0800)
committerEric Laurent <elaurent@google.com>
Sat, 23 Jan 2016 01:22:03 +0000 (01:22 +0000)
commitec647fa1db61806a334fc883fb98679768ac4d0b
tree4ddbf1235f235d12f09553b3e577d62ad9b7c1b4
parent98ae9b25a36d7461cc1163f1da7e272b4edf1fcb
A2DP audio HAL: fix write error behavior

Do not return -1 status in case of write error but
emulate normal timing and return the number of bytes written
as if no error had occured.

This is because audio flinger does not take any recovery
action in case of write error anyway but does not increment the
number of frames written to the HAL.
In case of persisting error, active audio tracks will not finish playback
and a wakelock will be held indefinitely.

Bug: 25488825
Change-Id: I4f00ba8d7a5c55f70520d448d894240c54685027
audio_a2dp_hw/audio_a2dp_hw.c