1585 Commits

Author SHA1 Message Date
Jean-Michel Trivi
d5176cfe6e First implementation of the audio focus management as an extension
of AudioManager and AudioService.
2010-03-02 08:39:26 -08:00
Eric Laurent
47d0a9264f Issue 2071329: audio track is shorter than video track for video capture on sholes
Add API to retrieve number of frames dropped by audio input kernel driver.

Submitted on behalf of Masaki Sato <masaki.sato@motorola.com>
2010-03-02 08:20:13 -08:00
Daniel Sandler
7491d8757f Merge "New vibrate/silent mode behavior." 2010-03-01 17:16:55 -08:00
Andreas Huber
5f0d5ce38a Ensure that the audio codec instance is actually going away before we attempt to instantiate another one, otherwise we might end up with the software codec even though the hardware codec would have been available shortly. 2010-03-01 14:58:39 -08:00
James Dong
039db81d53 Merge "Don't allow MediaRecorder.setParameter() to be invoked in the following states: error, prepared or recording" 2010-02-26 18:56:22 -08:00
Marco Nelissen
465faa925d When we're in the 'playback complete' state, don't consider pausing
an error. This makes 'playback complete' essentially equivalent to
being paused at the end, and treats it the same as being paused at
any other position.
2010-02-26 13:16:23 -08:00
Daniel Sandler
6329bf7b1e New vibrate/silent mode behavior.
In earlier versions of Android, "vibrate mode" (in which
only alarms and media produce sound, but notifications may
operate the vibe motor) was only accessible by adjusting the
ringer volume (via the device's volume rocker) down until
the "vibrate" icon appeared (between the lowest ring volume
and silent mode).

Many users prefer that "silent mode" always allow vibration.
Others prefer Android's historical behavior, in which silent
mode stops the vibes as well.

To accommodate these two distinct usage patterns, we now
allow the user to decide whether vibration is allowed in
"silent mode", a user interface abstraction that now spans
both AudioManager.RINGER_MODE_VIBRATE and
AudioManager.RINGER_MODE_SILENT.

To minimize API impact (and therefore maximize backward
compatibility), RINGER_MODE_VIBRATE and RINGER_MODE_SILENT
remain unchanged. What has changed is what happens when the
user activates silent mode, either via Settings,
GlobalActions (longpress on power), volume rocker, or the
keyguard tab. In essence, there is now only one "silent"
position in these controls, and whether RINGER_MODE_VIBRATE
or RINGER_MODE_SILENT is actually set on the AudioService is
determined by a new one-off setting
(System.VIBRATE_IN_SILENT).  This new setting isn't meant to
be a long-term API, however: in the future we hope to
replace and extend this design with a much more
sophisticated set of systemwide feedback profiles. ETA TBD.

Related changes:
  * I09ad7d69 (GlobalActions and keyguard)
  * I22ba7bcf (Settings app)

Bug: 2457183
Change-Id: I14cf91b0910261ffdfd1bf302423f41ec747d057
2010-02-26 15:37:37 -05:00
Andreas Huber
16f6354be4 Merge "The PV aac software decoder screws up if playing a mono-AACplus stream unless we output stereo data. Now we always output stereo data as the legacy OMX nodes did." 2010-02-26 10:47:11 -08:00
Marco Nelissen
3d6c986d02 Merge "Make AsyncPlayer.startSound catch all exceptions instead of only a few. Two reasons for this: - it's used in the system process - it's run in a separate thread, so the user of AsyncPlayer cannot catch these exceptions" 2010-02-26 10:46:46 -08:00
Andreas Huber
749c570be1 The PV aac software decoder screws up if playing a mono-AACplus stream unless we output stereo data. Now we always output stereo data as the legacy OMX nodes did.
related-to-bug: 2472545
2010-02-26 09:47:28 -08:00
Marco Nelissen
4ba297f3ed Make AsyncPlayer.startSound catch all exceptions instead of only a few.
Two reasons for this:
- it's used in the system process
- it's run in a separate thread, so the user of AsyncPlayer cannot catch these exceptions
2010-02-26 09:30:20 -08:00
James Dong
61701ced74 Don't allow MediaRecorder.setParameter() to be invoked in the following states:
error, prepared or recording

bug - 2362412
2010-02-25 18:41:46 -08:00
Andreas Huber
7bc58b07e2 Merge "Support vendor MPEG4 test content with apparently malformed chunks in them." 2010-02-25 16:25:43 -08:00
Andreas Huber
dfb8eee5bd Support vendor MPEG4 test content with apparently malformed chunks in them.
related-to-bug: 2472211
2010-02-25 16:24:32 -08:00
James Dong
5be65ab5b9 Merge "Add some space and total memory amount to the memory dump from the media server process." 2010-02-25 15:14:40 -08:00
James Dong
b93003649d Merge "Image encoding settings java API through xml configuration file" 2010-02-25 15:11:29 -08:00
James Dong
3d23a61588 Add some space and total memory amount to the memory dump from the media server process. 2010-02-25 10:06:32 -08:00
James Dong
9b433f0b65 Image encoding settings java API through xml configuration file
- I decided to completely remove jpeg decoding related stuff from this change
  I think that setting is better off if it is specified by the system properties.
  We don't have to include MediaProfiles.h header in skia files
2010-02-24 18:10:12 -08:00
Andreas Huber
ff0c5c1929 Recover from a certain mp3 decoder error instead of signalling an error and thereby stopping decoding. 2010-02-24 13:19:04 -08:00
James Dong
c23844c604 Merge "Use Java API from xml configuration in the test application" 2010-02-23 15:42:28 -08:00
Andreas Huber
d7d22eba3c Propagate errors all the way through the MediaSources and send either MEDIA_PLAYBACK_COMPLETE or MEDIA_ERROR depending on the final reason for running out of buffers to play back.
related-to-bug: 2463749
2010-02-23 14:06:38 -08:00
Andreas Huber
42ddfc9495 Merge "Return runtime errors instead of asserting in MPEG4 file format validation, also add more validation to ensure presence of codec specific data for avc, aac and mpeg4." 2010-02-23 10:30:48 -08:00
Andreas Huber
5ee0bce5e0 Return runtime errors instead of asserting in MPEG4 file format validation, also add more validation to ensure presence of codec specific data for avc, aac and mpeg4.
related-to-bug: 2431967
2010-02-23 10:21:39 -08:00
James Dong
f82c76656b Merge "Replace system property retrieval calls with DecoderCapabilities Java API calls." 2010-02-23 10:16:57 -08:00
Andreas Huber
d6b6bf9321 Merge "Properly unload the renderer shared library after the renderer goes away." 2010-02-22 16:34:32 -08:00
Gloria Wang
582ae172a4 Merge "Fix for the safty check. It checks that nFir21 + jNpoints <= BUF_SIZE, but when it calls GetByteArrayRegion, it multiplies it by 2 which defeats the "// safety first" check at the beginning." 2010-02-22 16:08:28 -08:00
Gloria Wang
196863d274 Fix for the safty check. It checks that nFir21 + jNpoints <= BUF_SIZE,
but when it calls GetByteArrayRegion, it multiplies it by 2 which
 defeats the "// safety first" check at the beginning.
2010-02-22 15:59:03 -08:00
Andreas Huber
078f7f05d5 Properly unload the renderer shared library after the renderer goes away. 2010-02-22 15:41:07 -08:00
Andreas Huber
b8de9578dc This hardware video decoder lies about its required input buffer sizes allocating 2.7 MB of memory instead of the required 176 KB... Added another quirk.
related-to-bug: 2281327
2010-02-22 14:58:45 -08:00
James Dong
1b7babd2cc Use Java API from xml configuration in the test application 2010-02-22 11:32:02 -08:00
Eric Laurent
9a56aaf12b am 8978547f: am f5fe3949: Fix issue 2459650.
Merge commit '8978547f254b6b6ba2e322794aa044803f3edc2a'

* commit '8978547f254b6b6ba2e322794aa044803f3edc2a':
  Fix issue 2459650.
2010-02-22 11:19:51 -08:00
Eric Laurent
8978547f25 am f5fe3949: Fix issue 2459650.
Merge commit 'f5fe3949f5db69b19ce3fac7abce2088106f2e2b' into eclair-plus-aosp

* commit 'f5fe3949f5db69b19ce3fac7abce2088106f2e2b':
  Fix issue 2459650.
2010-02-22 11:13:08 -08:00
Eric Laurent
f5fe3949f5 Fix issue 2459650.
This change fixes a problem where an unwanted tone is generated by audio policy manager when a MT call is answered.
This is because of a policy that replaces high visibility system sounds (ringtones, alarms...) by a beep when in call.
There is a transitory phase while the call is being answered where the phone state is changed to IN_CALL but the
ringtone is still playing. The audio policy manager then mutes the end of the ringtone and starts playing a beep
in replacement because the ringtone is categorized as high visibility.

The fix consists in changing the ringtone stream type from high visibility to low visibility. This is not a problem as
the only actual use case where a ringtone would be generated while in call is if another call is received.
But in this case, the phone system does not generate a ringtone but a call waiting tone instead.
It is therefore not required to handle a ringtone as a high visibiltiy tone that must be somehow signaled to the user
while in call.
2010-02-22 01:37:19 -08:00
Wu-cheng Li
b427a7b0e4 Merge "Increase the sleep time to fix testTakePicture." 2010-02-21 23:18:45 -08:00
Wu-cheng Li
6201440298 Increase the sleep time to fix testTakePicture.
One of the build needs 5 seconds for snapshot in low light. I don't want to
increase the sleep time, but this is what we have now.

bug:2141755
2010-02-22 15:08:16 +08:00
San Mehat
fda25347b8 sdutils: Get rid of sdutils - use vdc for similar low level functions
Signed-off-by: San Mehat <san@google.com>
2010-02-20 08:07:03 -08:00
Marco Nelissen
e49268af9e Merge "Make sure that the event callback thread is Java capable in the simulator." 2010-02-19 16:00:26 -08:00
Marco Nelissen
7691af9062 Make sure that the event callback thread is Java capable in the simulator. 2010-02-19 15:47:51 -08:00
Andreas Huber
b2d69e3d77 The MediaScanner is way too obsessed with restricting the files to be scanned.
related-to-bug: 2326148
2010-02-19 09:55:02 -08:00
Andreas Huber
b52188ee57 Merge "Implement legacy behaviour for MediaPlayer's behaviour of starting from the start of the media on a start() call instead of resuming at the current position, if previously reached the end of the stream. Also properly report number of frames played to audio flinger. Finally, delay spawing the queue thread until actually used." 2010-02-19 08:02:57 -08:00
Andreas Huber
406a18b5b3 Implement legacy behaviour for MediaPlayer's behaviour of starting from the start of the media on a start() call instead of resuming at the current position, if previously reached the end of the stream. Also properly report number of frames played to audio flinger. Finally, delay spawing the queue thread until actually used.
related-to-bug: 2453220
2010-02-18 16:45:13 -08:00
Andreas Huber
397afb5464 Fix a race condition in the prefetcher, the source may be shutdown while we're reading data from it.
related-to-bug: 2453414
2010-02-18 15:55:30 -08:00
Kenny Root
a6fe26c58f Merge "Range check in MediaScanner::processDirectory" 2010-02-18 09:36:08 -08:00
Kenny Root
7fe4fe68fa Range check in MediaScanner::processDirectory
Make sure we don't have an empty string before checking if it's a
directory since this string is tainted.

Change-Id: I5eb310ced58c3c64a7af2d11b80326efe5adbcab
2010-02-18 09:26:47 -08:00
Kenny Root
75bbe2b7c7 Merge "Store AudioTrack return value for error condition" 2010-02-18 09:24:42 -08:00
Kenny Root
3cbd62c3ce Store AudioTrack return value for error condition
Store AudioTrack->initCheck()'s return value so we can return it after
the AudioTrack is deleted.

Change-Id: Ie042a7d6a54d7f9afd8a5767cfd167dbeb2e5c04
2010-02-18 09:03:34 -08:00
Andreas Huber
c0178f1097 We are cancelling this event during reset, but the event may have already been dispatched at the time, blocking on the mutex. While it's blocking, reset() cancels the event, we're then unblocked and bad things(tm) happen.
related-to-bug: 2451174
2010-02-17 16:01:01 -08:00
Andreas Huber
0a026cff9e Merge "Disable the TI AMR hardware decoder for audio decoding until its issues are resolved." 2010-02-17 15:06:51 -08:00
Andreas Huber
4727040c5c Disable the TI AMR hardware decoder for audio decoding until its issues are resolved.
related-to-bug: 2450938
2010-02-17 15:04:18 -08:00
Dave Sparks
0551311980 Unhide new SoundPool API's. Bug 2415373. 2010-02-17 13:29:08 -08:00