replicant-frameworks_native/libs/audioflinger
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
..
A2dpAudioInterface.cpp Fix issue 2285561: New AudioFlinger and audio driver API needed for A/V sync 2010-01-26 18:40:39 -08:00
A2dpAudioInterface.h Fix issue 2285561: New AudioFlinger and audio driver API needed for A/V sync 2010-01-26 18:40:39 -08:00
Android.mk Create base class for audio policy manager. 2010-01-13 09:25:13 -08:00
AudioBufferProvider.h
AudioDumpInterface.cpp Issue 2071329: audio track is shorter than video track for video capture on sholes 2010-03-02 08:20:13 -08:00
AudioDumpInterface.h Issue 2071329: audio track is shorter than video track for video capture on sholes 2010-03-02 08:20:13 -08:00
AudioFlinger.cpp Fix issue 2428563: Camera rendered inoperable by voice call interruption. 2010-03-05 11:54:23 -08:00
AudioFlinger.h Issue 2071329: audio track is shorter than video track for video capture on sholes 2010-03-02 08:20:13 -08:00
AudioHardwareGeneric.cpp Fix issue 2285561: New AudioFlinger and audio driver API needed for A/V sync 2010-01-26 18:40:39 -08:00
AudioHardwareGeneric.h Issue 2071329: audio track is shorter than video track for video capture on sholes 2010-03-02 08:20:13 -08:00
AudioHardwareInterface.cpp Fix getParameters() default implementation. 2009-08-04 06:17:43 -07:00
AudioHardwareStub.cpp Fix issue 2285561: New AudioFlinger and audio driver API needed for A/V sync 2010-01-26 18:40:39 -08:00
AudioHardwareStub.h Issue 2071329: audio track is shorter than video track for video capture on sholes 2010-03-02 08:20:13 -08:00
AudioMixer.cpp
AudioMixer.h
AudioPolicyManagerBase.cpp Fix issue 2327064: Music played via line out is interrupted due to the phone call audio on BT hs. 2010-02-24 11:54:32 -08:00
AudioPolicyService.cpp Create base class for audio policy manager. 2010-01-13 09:25:13 -08:00
AudioPolicyService.h Create base class for audio policy manager. 2010-01-13 09:25:13 -08:00
AudioResampler.cpp
AudioResampler.h
AudioResamplerCubic.cpp
AudioResamplerCubic.h
AudioResamplerSinc.cpp
AudioResamplerSinc.h