Merge commit '4a0823e5486f16b10762076d629f2f7e4d5da476' into froyo-plus-aosp
* commit '4a0823e5486f16b10762076d629f2f7e4d5da476':
Uncomment a test that was marked as STOPSHIP
The problem is a bug in AudioFlinger::MixerThread::prepareTracks_l() that makes that even if the TrackHandle
is destroyed, the corresponding Track will remain active as long as frames are ready for mixing.
If the track uses shared memory (static mode) and the sound is looped, this track will play for ever.
The fix consists in removing the track from active list immediately if the track is terminated.
Change-Id: Iaa78a91e78d27f5c982218cc55e81702f1610ab2
Merge commit '3aecdb9d7e92b1a91860600feefb5c0062b652cf' into kraken
* commit '3aecdb9d7e92b1a91860600feefb5c0062b652cf':
fix build
Fix some typos and other cosmetic cleanups in telephony framework.
Merge commit '5ccb8b8c4d6eabcc984559ef9e71efdbb3de00d3' into kraken
* commit '5ccb8b8c4d6eabcc984559ef9e71efdbb3de00d3':
Fix updating and deleting FDN entries with an empty alpha identifier.
Abort FDN delete when number is empty (instead of name)
Merge commit 'fbb285e67f6b150440647d0c484d88edb7bf9be9' into kraken
* commit 'fbb285e67f6b150440647d0c484d88edb7bf9be9':
docs: revise webview description and add info for targeting screen densities
Merge commit 'e64256d610ec5ea3df5db8a24333a6ce98b83d49' into froyo-plus-aosp
* commit 'e64256d610ec5ea3df5db8a24333a6ce98b83d49':
docs: revise webview description and add info for targeting screen densities
Merge commit 'b2fa79e3723b448114181fef983deaae97b44161' into kraken
* commit 'b2fa79e3723b448114181fef983deaae97b44161':
Doc change: add link to source.android.com
Merge commit '6750bb7f838b15ef25544d7aa66b17119fcd7227' into froyo-plus-aosp
* commit '6750bb7f838b15ef25544d7aa66b17119fcd7227':
Doc change: add link to source.android.com
the EGL specification states that this should be treated as though it was
an empty list terminated with EGL_NONE.
Change-Id: I294104370a86b5e5c34c7bcf15c5459eab464631
The problem is due to a too big difference between the buffer size used at the hardware interface and at the A2DP interface.
When no resampling occurs we don't notice problems but the timing is very tight. As soon as resampling is activated, the AudioTrack underruns.
This is because the AudioTrack buffers are not resized when moving the AudioTrack from hardware to A2DP output.
The AudioTrack buffers are calculated based on a hardware output buffer size of 3072 bytes. Which is much less than the A2DP output buffer size (10240).
The solution consists in creating new tracks with new buffers in AudioFlinger when the A2DP output is opened
instead of just transfering active tracks from hardware output mixer thread to the new A2DP output mixer thread.
To avoid synchronization issues between mixer threads and client processes, this is done by invalidating tracks
by setting a flag in their control block and having AudioTrack release the handle on this track (IAudioTrack)
and create a new IAudioTrack when this flag is detected next time obtainBuffer() or start() is executed.
AudioFlinger modifications:
- invalidate the tracks when setStreamOutput() is called
- make sure that notifications of output opening/closing and change of stream type to output mapping are sent synchronously to client process.
This is necessary so that AudioSystem has the new stream to output mapping when the AudioTrack detects the invalidate flag in the client process.
Previously their were sent when the corresponding thread loop was executed.
AudioTrack modifications:
- move frame count calculation and verification from set() to createTrack() so that is is updated every time a new IAudioTrack is created.
- detect track invalidate flag in obtainBuffer() and start() and create a new IAudioTrack.
AudioTrackShared modifications
- group all flags (out, flowControlFlag, forceReady...) into a single bit filed to save space.
Change-Id: I9ac26b6192230627d35084e1449640caaf7d56ee