replicant-frameworks_native/libs
Eric Laurent 4f1fcc2890 Fix issue 2428563: Camera rendered inoperable by voice call interruption.
The problem is that AudioRecord never exits read() when a timeout occurs while trying
to get new PCM data from audio hardware input buffer: it just keeps waiting and retrying until stop() is called.
In the same time, opencore AndroidAudioInput::audin_thread_func() loop cannot be exited when stuck
in AudioRecord::read() because the iExitAudioThread flag can only be sampled when AudioRecord::read()
returns. We remain stuck with the audio input thread running.

The fix consists in modifying AudioRecord behavior in case of timeout when getting new PCM samples.
We now wait only one timeout period and try to restart audio record, in case the problem is due to a media_server
process crash. If this fails, we exit read() with a number of bytes read equals to 0 so that
AndroidAudioInput::audin_thread_func() loop can exit.

Also modified Audioflinger::RecordThread() loop so that we attempt to recover from HAL read errors.
In case of read error, the input stream is forced to standby so that next read attempt does a
reconfiguration and restart of the audio input device.
2010-03-05 11:54:23 -08:00
..
audioflinger Fix issue 2428563: Camera rendered inoperable by voice call interruption. 2010-03-05 11:54:23 -08:00
binder remove a dependency of GraphicBuffer (libui) on Parcel (libbinder). 2010-02-21 23:27:25 -08:00
surfaceflinger surfaceflinger: remove un-cached buffers hack for Adreno 2010-03-02 16:44:46 -08:00
surfaceflinger_client Added a name to Surface created by SurfaceFlinger 2010-03-01 18:34:50 -08:00
ui Fix #2489986 : The key bitmask needs to cover all possible keys 2010-03-04 16:00:29 -08:00
utils Fix some bugs. 2010-03-04 11:52:14 -08:00