1605 Commits

Author SHA1 Message Date
Andreas Huber
f5e208018b am 89e28cbe: am 9e609b0d: Merge "Apparently select() does not immediately return if one of the masked socket descriptors is closed... Stop relying on select for read-with-timeout functionality and use SO_RCVTIMEO socket option instead." into froyo
Merge commit '89e28cbefaff6ae9499032bb446ae7e72e019466' into kraken

* commit '89e28cbefaff6ae9499032bb446ae7e72e019466':
  Apparently select() does not immediately return if one of the masked socket descriptors is closed... Stop relying on select for read-with-timeout functionality and use SO_RCVTIMEO socket option instead.
2010-04-20 16:37:35 -07:00
Andreas Huber
9e609b0dfa Merge "Apparently select() does not immediately return if one of the masked socket descriptors is closed... Stop relying on select for read-with-timeout functionality and use SO_RCVTIMEO socket option instead." into froyo 2010-04-20 16:29:23 -07:00
Jean-Michel Trivi
219dbb67a6 am 8dc4c790: am fe8620ac: Merge "Update AudioService to reflect phone state changes with AudioFocus. Phone calls and rings are treated as a new client, with a dedicated client ID that identifies it in the audio focus stack. When it is present in the stack, others clie
Merge commit '8dc4c790e2c278f8f671c728401ee9458d2d74ab' into kraken

* commit '8dc4c790e2c278f8f671c728401ee9458d2d74ab':
  Update AudioService to reflect phone state changes with AudioFocus.
2010-04-20 16:04:08 -07:00
Andreas Huber
63fbd5ab8f Apparently select() does not immediately return if one of the masked socket descriptors is closed... Stop relying on select for read-with-timeout functionality and use SO_RCVTIMEO socket option instead.
Change-Id: Ic2d4a8f5b6bbf16772fba39377809ec68d249c1f
related-to-bug: 2611257
2010-04-20 15:56:36 -07:00
Jean-Michel Trivi
b4bccb6d8d Update AudioService to reflect phone state changes with AudioFocus.
Phone calls and rings are treated as a new client, with a dedicated
client ID that identifies it in the audio focus stack. When it is
present in the stack, others clients cannot request audio focus
(request is denied).
Because the phone state is now mostly handled like a new client,
there is no need monitor mode changes and to keep track of
undispatched focus changes, as those will delayed focus gains
will now automatically happen at the end of the call when the
phone client is removed from the focus stack.

Change-Id: I11ff73b015ab93f07040755fd8ee75c8d675e025
2010-04-20 15:23:39 -07:00
Andreas Huber
c9553f2ed0 am 1e1edb2c: am 25dc5f30: Merge "Don\'t coalesce more than 250ms worth of encoded data into a single codec input buffer. This currently only applies to the component OMX.TI.AAC.decode, it is the only one to support coalescing in the first place." into froyo
Merge commit '1e1edb2c7376dbd9ca24bbeefbddbe4221f397a0' into kraken

* commit '1e1edb2c7376dbd9ca24bbeefbddbe4221f397a0':
  Don't coalesce more than 250ms worth of encoded data into a single codec input buffer.
2010-04-20 14:57:25 -07:00
Andreas Huber
25dc5f30b2 Merge "Don't coalesce more than 250ms worth of encoded data into a single codec input buffer. This currently only applies to the component OMX.TI.AAC.decode, it is the only one to support coalescing in the first place." into froyo 2010-04-20 14:48:45 -07:00
Andreas Huber
2dd8ff8c4f Don't coalesce more than 250ms worth of encoded data into a single codec input buffer.
This currently only applies to the component OMX.TI.AAC.decode, it is the only one to support coalescing in the first place.

In certain edge cases (encoded audio track contains silence), each buffer would turn out to be an amazing 6(!!!) bytes, we'd spend lots and lots of time streaming network data to fill the codec's buffers of size 6144 bytes with .. silence.

Change-Id: I9f449f310fc64ca384bd02e4a783e33cf5b46fcc
related-to-bug: 2609049
QA-Impact: streamed (http) playback of aac audio content on Droid.
2010-04-20 14:26:00 -07:00
Marco Nelissen
fe13eebee9 am 9d14e3ea: am 9b8b417c: Merge "When updating existing entries in the media database, don\'t update the is_music, is_ringtone, etc columns. This ensures that custom ringtones will still be shown in the ringtone picker after a rescan. Bug 2594125 Change-Id: I56761240d
Merge commit '9d14e3ea22f48173070789951ee6dc64b507e13f' into kraken

* commit '9d14e3ea22f48173070789951ee6dc64b507e13f':
  When updating existing entries in the media database, don't update
2010-04-20 11:33:21 -07:00
Marco Nelissen
9b8b417cd1 Merge "When updating existing entries in the media database, don't update the is_music, is_ringtone, etc columns. This ensures that custom ringtones will still be shown in the ringtone picker after a rescan. Bug 2594125 Change-Id: I56761240d6f6e699514169d80a445317ba0de9e2" into froyo 2010-04-20 11:24:10 -07:00
Eric Laurent
5b550c9efc am 11bae140: am 3891c4cc: Fix issue 2602879: camera shutter sound not playing.
Merge commit '11bae14009d91c063780b2cafee2fc4fb660c08c' into kraken

* commit '11bae14009d91c063780b2cafee2fc4fb660c08c':
  Fix issue 2602879: camera shutter sound not playing.
2010-04-20 10:22:27 -07:00
Marco Nelissen
c066557378 When updating existing entries in the media database, don't update
the is_music, is_ringtone, etc columns. This ensures that custom
ringtones will still be shown in the ringtone picker after a rescan.
Bug 2594125
Change-Id: I56761240d6f6e699514169d80a445317ba0de9e2
2010-04-20 09:47:31 -07:00
Eric Laurent
3891c4cc91 Fix issue 2602879: camera shutter sound not playing.
The problem occurs if the device is powered down in silent mode. When the device restarts,
AudioService reads current ringer mode from saved settings but does not call setRingerModeInt()
to perform actions required when ringer mode changes.
The volumes of streams affected by ringer mode are actually at 0 because they are also read from settings
but their mute state is not applied correclty. When we later exit from silent mode, the streams
other than STREAM_RING that are affected by ringer mode are not restored as they are not considered
muted. This applies to STREAM_SYSTEM but also to STREAM_NOTIFICATION if its volume is controlled independently
from STREAM_RING.

The fix consists in calling setRingerModeInt() when AudioService starts.

Change-Id: Ica75b9874938dda1bc1b634c3e97db4a650d295c
2010-04-20 09:40:57 -07:00
Eric Laurent
e33e9db6b0 am 3cd1f9f9: am 3b591260: Fix issue 2604270 Device auto connects to Car Dock (Media profile) after undocking.
Merge commit '3cd1f9f98b59d31876b17b0ddf0bd0a518dc92fd' into kraken

* commit '3cd1f9f98b59d31876b17b0ddf0bd0a518dc92fd':
  Fix issue 2604270  Device auto connects to Car Dock (Media profile) after undocking.
2010-04-20 09:27:40 -07:00
Eric Laurent
3b5912602b Fix issue 2604270 Device auto connects to Car Dock (Media profile) after undocking.
There was a regression introduced by change 4c637b9e34f4c8db69a64ad21a4e2bcfa7485b5f
fixing issue 2578813. As the A2DP device disconnection is notified to the audio policy manager
after a delay, there is a period during which the A2DP device is actually not connected but the
A2DP output is considered present by audio framework. If a playback is started during this period,
The A2DP output requests the activation of the A2DP sink which in turn triggers a reconnection
of the A2DP sink.

The fix consists in suspending the A2DP output immediately when receiving the A2DP disconnection
intent so that any activity on A2DP output is ignored until the output is actually closed by the
audio policy manager.

Change-Id: I16eaace45e12bfc970f50836b46a73b756b493f0
2010-04-20 07:01:00 -07:00
Eric Laurent
5c14f2d08f am def7db5b: am 758dd527: Fix issue 2592680: Saved ringer volume forced to 0 when receiving a call in silent mode.
Merge commit 'def7db5b79e5c178834375020ef6b590e80af42f' into kraken

* commit 'def7db5b79e5c178834375020ef6b590e80af42f':
  Fix issue 2592680: Saved ringer volume forced to 0 when receiving a call in silent mode.
2010-04-14 12:15:18 -07:00
Eric Laurent
5db9adfd40 am 834f0483: am 745b43c2: Merge "Fix issue 2589563: Able to set ringer volume to 0 outside of silent mode." into froyo
Merge commit '834f0483ee7259f19e3f5d8e5c09ddcf875535b1' into kraken

* commit '834f0483ee7259f19e3f5d8e5c09ddcf875535b1':
  Fix issue 2589563: Able to set ringer volume to 0 outside of silent mode.
2010-04-14 12:11:24 -07:00
James Dong
fff02afa01 am 6852b198: am d3d445b1: Merge "Use PV_PLAYER to handle RTSP streaming" into froyo
Merge commit '6852b198fbedd9378ed79ca6528a4d6f33b0b677' into kraken

* commit '6852b198fbedd9378ed79ca6528a4d6f33b0b677':
  Use PV_PLAYER to handle RTSP streaming
2010-04-14 12:11:12 -07:00
Eric Laurent
758dd527f6 Fix issue 2592680: Saved ringer volume forced to 0 when receiving a call in silent mode.
This is a regression introduced by change 5b4e654d0c7de8e4d58d73e73b0d5220f19b68f7 for issue 2472495.
When AudioService changes audio mode, setMode() reapplies current volume for the default active stream
which in this case is STREAM_RING.
Because the new implementation of silent mode actually mutes the ringer stream,
setStreamVolumeInt() now applies the volume change received while in silent mode
to the last audible value and we end up clearing the last audible volume for ringer.

The fix consists in not modifying last audible value when the new value is 0.

Also removed obsolete code in setStreamVolumeInt() since new implementation of setRingerModeInt()
in change 5b4e654d0c7de8e4d58d73e73b0d5220f19b68f7.

Change-Id: I746f3bc1af39a602ce12d130ce592007b2d0ebb6
2010-04-14 10:52:01 -07:00
Jean-Baptiste Queru
31a17033dc fix unintentional drift
Change-Id: I0bbf3d3f95296a41d71558d8de1ed2ed021f21cf
2010-04-14 10:40:28 -07:00
Eric Laurent
745b43c28f Merge "Fix issue 2589563: Able to set ringer volume to 0 outside of silent mode." into froyo 2010-04-14 10:39:32 -07:00
Eric Laurent
527c3ab51e Fix issue 2589563: Able to set ringer volume to 0 outside of silent mode.
The problem happens only if volume down key is pressed while
already in silent or vibrate mode. In this case, AudioService accepts
changing the last audible index for ringer volume from 1 to 0.
When volume up is pressed, current ringer volume value is restored from 0
instead of 1.

The fix consists in keeping last audible index at 1 once in silent of vibrate
mode even is volume down key is pressed.

Change-Id: Id08edd12ce985c22233124545eba2c3e4b8cdc8e
2010-04-14 09:32:17 -07:00
James Dong
42d66573ff Use PV_PLAYER to handle RTSP streaming
bug - 2594865

Change-Id: Ice5b89b1d53bbc4da033892fe545bdf51ac7267f
2010-04-14 08:57:14 -07:00
James Dong
748a8df0cd am c33f583b: am 4f3257cf: am dd684af8: Merge "Snif more 3GPP file types according to http://www.ftyps.com/3gpp.html" into froyo 2010-04-13 16:23:05 -07:00
Andreas Huber
5ab60ba0c1 am d760afc3: am 30e9c2d4: am db281311: Merge "Better diagnostics in the stagefright commandline tool, support for playing sine-tones using a filename of "sine:[samplingrate]", i.e. sine:44100. Support for playing audio through to the speakers by using "-o" in addition 2010-04-13 16:05:49 -07:00
James Dong
eee53a7dfa am ebaa935e: am 9bb8e65a: am c15f48d7: Merge "Don\'t set encoder component role while we query decoders" into froyo 2010-04-13 16:05:42 -07:00
Jean-Michel Trivi
824ca797f0 am b8430335: am 34b2ecc8: am c30890e1: Merge "Fix bug 2578813 Delay pausing music and routing audio for car docks" into froyo 2010-04-13 16:05:21 -07:00
Gloria Wang
ce3875055e am 465934d1: am d4c072d3: am b19da8e1: Fix for 2581725. Keep the last frame after resume(), and delete it in the next suspend() or reuse it if no new frame is available. 2010-04-13 16:05:13 -07:00
Daniel Sandler
cd3f349f32 am a32efedd: am de3601e0: am bcac4960: Honor the "Never vibrate" setting for incoming calls. 2010-04-13 16:05:07 -07:00
James Dong
c33f583b7c am 4f3257cf: am dd684af8: Merge "Snif more 3GPP file types according to http://www.ftyps.com/3gpp.html" into froyo
Merge commit '4f3257cf4667aa28908c401634db849fd2e516af' into kraken

* commit '4f3257cf4667aa28908c401634db849fd2e516af':
  Snif more 3GPP file types according to http://www.ftyps.com/3gpp.html
2010-04-13 15:42:01 -07:00
James Dong
e1130662d0 Snif more 3GPP file types according to http://www.ftyps.com/3gpp.html
bug - 2575956

Change-Id: Iaa79e74d3b0585397a7e833ec45472710fc52fa6
2010-04-13 15:09:26 -07:00
Andreas Huber
d760afc3b5 am 30e9c2d4: am db281311: Merge "Better diagnostics in the stagefright commandline tool, support for playing sine-tones using a filename of "sine:[samplingrate]", i.e. sine:44100. Support for playing audio through to the speakers by using "-o" in addition to "-a"." in
Merge commit '30e9c2d4db145e02b5312ce29606b03dd78349d3' into kraken

* commit '30e9c2d4db145e02b5312ce29606b03dd78349d3':
  Better diagnostics in the stagefright commandline tool, support for playing sine-tones using a filename of "sine:[samplingrate]", i.e. sine:44100. Support for playing audio through to the speakers by using "-o" in addition to "-a".
2010-04-13 12:23:28 -07:00
James Dong
ebaa935e2d am 9bb8e65a: am c15f48d7: Merge "Don\'t set encoder component role while we query decoders" into froyo
Merge commit '9bb8e65a7d7dc57fdd7383d64d53414b1aa5cbbc' into kraken

* commit '9bb8e65a7d7dc57fdd7383d64d53414b1aa5cbbc':
  Don't set encoder component role while we query decoders
2010-04-13 12:20:38 -07:00
Andreas Huber
db281311a0 Merge "Better diagnostics in the stagefright commandline tool, support for playing sine-tones using a filename of "sine:[samplingrate]", i.e. sine:44100. Support for playing audio through to the speakers by using "-o" in addition to "-a"." into froyo 2010-04-13 12:16:08 -07:00
James Dong
c15f48d7d6 Merge "Don't set encoder component role while we query decoders" into froyo 2010-04-13 12:11:57 -07:00
Andreas Huber
662292ae2d Better diagnostics in the stagefright commandline tool, support for playing sine-tones using a filename of "sine:[samplingrate]", i.e. sine:44100. Support for playing audio through to the speakers by using "-o" in addition to "-a".
related-to-bug: 2553359
Change-Id: Ic49eb89feb62474d9513bc21571e0e8fe3a15e0b
2010-04-13 12:04:05 -07:00
Jean-Michel Trivi
b843033566 am 34b2ecc8: am c30890e1: Merge "Fix bug 2578813 Delay pausing music and routing audio for car docks" into froyo
Merge commit '34b2ecc82aae3d317c2f4985049f68df3f8adbd7' into kraken

* commit '34b2ecc82aae3d317c2f4985049f68df3f8adbd7':
  Fix bug 2578813 Delay pausing music and routing audio for car docks
2010-04-13 11:53:57 -07:00
Gloria Wang
465934d1e5 am d4c072d3: am b19da8e1: Fix for 2581725. Keep the last frame after resume(), and delete it in the next suspend() or reuse it if no new frame is available.
Merge commit 'd4c072d3f584db2cf9214c9d813c15d9e646c527' into kraken

* commit 'd4c072d3f584db2cf9214c9d813c15d9e646c527':
  Fix for 2581725. Keep the last frame after resume(), and delete it
2010-04-13 11:53:52 -07:00
Daniel Sandler
a32efedd26 am de3601e0: am bcac4960: Honor the "Never vibrate" setting for incoming calls.
Merge commit 'de3601e05cf551e24eee50d4c1e70b5037792679' into kraken

* commit 'de3601e05cf551e24eee50d4c1e70b5037792679':
  Honor the "Never vibrate" setting for incoming calls.
2010-04-13 11:53:30 -07:00
James Dong
722d591842 Don't set encoder component role while we query decoders
bug - 2558515

Change-Id: I29683507d234d963994c782c07508034ea807739
2010-04-13 10:58:41 -07:00
Mathias Agopian
e73a100feb am 445a9785: Merge "don\'t hardcode "mSurface" throughout our source code" into kraken 2010-04-13 10:33:07 -07:00
Jean-Michel Trivi
c30890e102 Merge "Fix bug 2578813 Delay pausing music and routing audio for car docks" into froyo 2010-04-13 09:53:35 -07:00
Gloria Wang
b19da8e187 Fix for 2581725. Keep the last frame after resume(), and delete it
in the next suspend() or reuse it if no new frame is available.

Change-Id: I84286030eaae9061077d6ccb485b7dd53ef05341
2010-04-13 09:46:40 -07:00
Jean-Michel Trivi
4c637b9e34 Fix bug 2578813 Delay pausing music and routing audio for car docks
Moved broadcast of ACTION_AUDIO_BECOMING_NOISY from BluetoothA2dpService
to AudioService.
Broadcast ACTION_AUDIO_BECOMING_NOISY when disconnecting an A2DP
device.
Disconnect from A2DP docks with a delay to handle transient
disconnections.
Cancel delayed A2DP disconnections when connecting to a dock as this
can be a reconnection after a transient disconnection.

Change-Id: I1ee9e99f3ffa20727af38a4c4c8711942894a696
2010-04-13 09:44:08 -07:00
Daniel Sandler
bcac496076 Honor the "Never vibrate" setting for incoming calls.
Bug: 2579295
Change-Id: Ia4207492c5dfa2c39d27372c4892b60121b6d9e8
2010-04-13 12:18:44 -04:00
Mathias Agopian
445a978554 Merge "don't hardcode "mSurface" throughout our source code" into kraken 2010-04-12 18:59:49 -07:00
Andreas Huber
63642b1202 am 7853c898: am 248ea4a9: am 5baa5e19: Merge "Distinguish QCELP audio from mpeg4 audio, ignore QCELP audio tracks since we don\'t have a decoder for it, ignore potentially malformed metadata for AMR NB and WB tracks." into froyo 2010-04-12 17:25:48 -07:00
Andreas Huber
7853c8988f am 248ea4a9: am 5baa5e19: Merge "Distinguish QCELP audio from mpeg4 audio, ignore QCELP audio tracks since we don\'t have a decoder for it, ignore potentially malformed metadata for AMR NB and WB tracks." into froyo
Merge commit '248ea4a9f773210a7b7dbd7892e6b865a0f7add3' into kraken

* commit '248ea4a9f773210a7b7dbd7892e6b865a0f7add3':
  Distinguish QCELP audio from mpeg4 audio, ignore QCELP audio tracks since we don't have a decoder for it, ignore potentially malformed metadata for AMR NB and WB tracks.
2010-04-12 17:21:33 -07:00
Mathias Agopian
8b138323d5 don't hardcode "mSurface" throughout our source code
this is used in a few places to get access to the android.view.Surface
native surface. use a macro instead. Also rename the field to mNativeSurface.

Change-Id: I1c6dea14abd6b8b1392c7f97b304115999355094
2010-04-12 16:29:36 -07:00
Andreas Huber
d0332ad8d2 Distinguish QCELP audio from mpeg4 audio, ignore QCELP audio tracks since we don't have a decoder for it, ignore potentially malformed metadata for AMR NB and WB tracks.
Change-Id: Ic9a9198413431db4ea40bb63b9de91aa8a7183af
related-to-bug: 2587341
2010-04-12 16:05:57 -07:00