replicant-frameworks_native/libs
Eric Laurent 09b4ba82d7 Issue 2265163: Audio still reported routed through earpiece on sholes
This is a second attempt to fix the audio routed to earpiece syndrom.
The root cause identified this time is the crash of an application having an active AudioTrack playing on the VOICE_CALL stream type.
When this happens, the AudioTrack destructor is not called and the audio policy manager is not notified of the track stop.
Results a situation where the VOICE_CALL stream is considered as always in use by audio policy manager which makes that audio is routed to earpiece.

The fix consists in moving the track start/stop/close notification to audio policiy manager from AudioTrack to AudioFlinger Track objet.
The net result is that in the case of a client application crash, the AudioFlinger TrackHandle object (which implements the remote side of the IAudioTrack binder interface) destructor is called which in turn destroys the Track object and we can notify the audio policy manager of the track stop and removal.

The same modification is made for AudioRecord although no bug related to record has been reported yet.
Also fixed a potential problem if record stop is called while the record thread is exiting.
2009-11-19 23:57:45 -08:00
..
audioflinger Issue 2265163: Audio still reported routed through earpiece on sholes 2009-11-19 23:57:45 -08:00
binder Modify the binder to request 1M - 2 pages instead of 1M. The backing store 2009-11-12 16:31:12 -08:00
surfaceflinger fix [2262591] Junk on screen in ERD46 2009-11-16 14:55:36 -08:00
ui fix some aspects of [2258746] native crash in launcher2 2009-11-13 15:26:29 -08:00
utils Turn off most of the backup-related debug logging 2009-09-30 17:07:37 -07:00