Move reset of A2DP suspend state from handleSinkStateChange() in BluetoothA2dpService to
BluetoothA2dp.ACTION_SINK_STATE_CHANGED intent receiver in AudioService.
Previous implementation could cause a false reset of suspend state if a new sink attempted to
connect while A2DP was suspended.
New implementation only resets A2DP suspend state when a new sink is actually connected.
Add new config values to AudioSystem::FOR_DOCK force usage to differenciate car and desk docks.
Use a receiver for the sticky Intent.ACTION_DOCK_EVENT in AudioService to detect the type
of dock and select force usage accordingly.
AudioTrack was modified earlier to calculate minimum buffer size
based on the hardware reported latency. Previously, it was a
hard-coded value. As a result of this change, the minimum buffer
size is now variable based on hardware latency. On Passion, this
brought out a subtle rounding error in the buffer size calculation
in SoundPool. This can cause AudioTrack creation to fail based on
the requested sample rate. This fix calculates the total buffer
size first, and then does rounding before dividing by the number
of buffers.
Merge commit '14f8940472217e8b0164d8f213679710d623d528' into eclair-plus-aosp
* commit '14f8940472217e8b0164d8f213679710d623d528':
Fix media player decode function. Bug 2317821.
There was a recent change to OpenCORE that broke the MediaPlayer::decode()
function for all OpenCORE supported formats (MP3, AAC, and AMR-NB/WB). The
affect is that SoundPool is unreliable for all of these formats. This patch
changes the logic in the AudioCache object that processes messages from the
media player. The old logic was fragile. This change should make it more
robust against changes.
to the AudioPolicyManager a new forced usage AudioSystem::FOR_DOCK
which can take the FORCE_NONE, FORCE_BT_DOCK or FORCE_WIRED_ACCESSORY
values. This CL is complemented by an update of the APM to take into
account the FOR_DOCK usage.
Merge commit '6d42d80653f2c41f3e72a878a1d9a6f9693b89f7' into eclair-plus-aosp
* commit '6d42d80653f2c41f3e72a878a1d9a6f9693b89f7':
Fix issue 2304669: VoiceIME: starting and canceling voice IME yields persistent "error 8" state on future attempts and breaks voice search.
Merge commit '8445f367070514dce3154be73827107b8a93f234' into eclair-plus-aosp
* commit '8445f367070514dce3154be73827107b8a93f234':
1) Capture the start memory before the test started
Fixed AudioFlinger::openInput() broken in change ddb78e7753be03937ad57ce7c3c842c52bdad65e
so that an invalid IO handle (0) is returned in case of failure.
Applied the same correction to openOutput().
Modified RecordThread start procedure so that a failure occuring during the first read from audio input stream is detected and causes
the record start to fail.
Modified RecordThread stop procedure to make sure that audio input stream fd is closed before we exit the stop function.
Fixed AudioRecord JAVA and JNI implementation to take status of native AudioRecord::start() into account
and not change mRecordingState to RECORDSTATE_RECORDING if start fails.
Merge commit '052d9c8b414dc9eb1c70d849660592d9bc3b2644' into eclair-plus-aosp
* commit '052d9c8b414dc9eb1c70d849660592d9bc3b2644':
Images.Media.DATE_TAKEN should be in milliseconds.
Merge commit 'f27eb3264d4b5d3fd154834a709a9a53cc878b58' into eclair-plus-aosp
* commit 'f27eb3264d4b5d3fd154834a709a9a53cc878b58':
DATE_TAKEN should be in millisecond instead of second.
Merge commit 'bb3bb57a6330f71323fcd7e93e88dbdab55daec3' into eclair-plus-aosp
* commit 'bb3bb57a6330f71323fcd7e93e88dbdab55daec3':
Fix issue 2192673: Music Pausing Even when notifications are set to silent.
Merge commit '8424ec323b2bc38887370c75e2c1fcd84bcdb013' into eclair-plus-aosp
* commit '8424ec323b2bc38887370c75e2c1fcd84bcdb013':
Set metadata retriever thread group to the caller's group.
This patch modifies the native binder interface to the metadata
retriever to pass the caller's thread group across the binder
interface. On the server side, the thread scheduler group is
set to the caller's scheduler group temporarily and restored
after the request has completed. This patch also reverts a
previous patch where the priority of the thread was forced to
a low priority foreground thread.
This should give apps more control over the priority of their
metadata retrieval, particularly allow background process to
run without hogging the CPU.
Merge commit 'e7800946a42c0ebe8e0b3f6eba04a96a9641aaff' into eclair-plus-aosp
* commit 'e7800946a42c0ebe8e0b3f6eba04a96a9641aaff':
Issue 2265163: Audio still reported routed through earpiece on sholes
Merge commit '9ed314cefb5ec711dfcb5527a2a0a6b87a643c24' into eclair-plus-aosp
* commit '9ed314cefb5ec711dfcb5527a2a0a6b87a643c24':
Add the checking for mediaplayer stress test.
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.
Merge commit 'f854e0770207e93ef9d1bf6d50ed18537a107ca4' into eclair-plus-aosp
* commit 'f854e0770207e93ef9d1bf6d50ed18537a107ca4':
DO NOT MERGE: Instead of inserting semi-random delays after submission to surface flinger, delay releasing buffers to the next display time to avoid flickering.
Merge commit 'b3f35041aa50839e5d8ed3a4ad72e6eef2cb4ea6' into eclair-plus-aosp
* commit 'b3f35041aa50839e5d8ed3a4ad72e6eef2cb4ea6':
Fix issue 2265955 Use dateCreated when dateTaken isn't valid when writing images/videos to database.
Merge commit 'fddfb9ae03a2730ac5ce27fa4c47b7d3a0285d0f' into eclair-plus-aosp
* commit 'fddfb9ae03a2730ac5ce27fa4c47b7d3a0285d0f':
Improvements for issue 2197683: English IME key-press latency is noticeably higher on passion than sholes
The headset state indicated by HeadsetObserver in the broadcast intent ACTION_HEADSET_PLUG was not 0 or 1 as specified in the java doc but contained a bit field indicating the type of headset connected.
Modified HeadsetObserver to broacast a state conforming to java doc.
Added an extra to intent ACTION_HEADSET_PLUG to indicate if headset has a microphone or not.
Removed handling of non standard headset indications from HeadsetObserver.
Removed platform specific devices from output devices defined in AudioSystem.
Modified AudioService to use new ACTION_HEADSET_PLUG intent extra instead of bitfield in state.
Merge commit 'c66d53f97b1fe635f576642d5720dcd441e34cce' into eclair-plus-aosp
* commit 'c66d53f97b1fe635f576642d5720dcd441e34cce':
Delegate the platform dependent hardware renderer implementation to a shared library provided by the vendor.
This change goes with a kernel driver change that reduces the audio buffer size from 4800 bytes (~27ms) to 3072 bytes (~17ms).
- The AudioFlinger modifcations in change 0bca68cfff161abbc992fec82dc7c88079dd1a36 have been removed: the short sleep period was counter productive when the AudioTrack is using the call back thread as it causes to many preemptions.
- AudioFlinger mixer thread now detects long standby exit time and in this case anticipates start by writing 0s as soon as a track is enabled even if not ready for mixing.
- AudioTrack::start() is modified to start call back thread before starting the IAudioTrack so that thread startup time is masked by IAudioTrack start and mixer thread wakeup time.
Merge commit 'cfe45c775ddb5e48bf556aee7422298260eb4fd8' into eclair-plus-aosp
* commit 'cfe45c775ddb5e48bf556aee7422298260eb4fd8':
Fix for random audio output failures, properly dup() the file descriptor in IMediaPlayer::setDataSource to assume ownership as the caller will otherwise close it.