5483 Commits

Author SHA1 Message Date
Glenn Kasten
e6810ffaa1 Clean up AudioTrack::mActive and stopped()
mActive is protected by mLock; volatile is meaningless on SMP.

Fixed a couple of places where mActive was accessed without a lock:
 - stopped()
 - processAudioBuffer()

Added stopped_l() for cases where we already hold the lock.

Made mActive a bool not int.

Moved down a lock in setPosition that was being acquired too early.

Change-Id: I73ff368e991c0db9f9472df0b3f96fd33fcc7311
2012-01-05 11:55:24 -08:00
Glenn Kasten
a8719ad9d5 Merge "Use the standard CC_LIKELY and CC_UNLIKELY macros" 2012-01-05 07:38:29 -08:00
Glenn Kasten
e80a4ccd2b Use the standard CC_LIKELY and CC_UNLIKELY macros
Several source files privately defined macros LIKELY and UNLIKELY in terms
of __builtin_expect. But <cutils/compiler.h> already has CC_LIKELY and
CC_UNLIKELY which are intended for this purpose.  So rename the private
uses to use the standard names.

In addition, AudioFlinger was relying on the macro expanding to extra ( ).

Change-Id: I2494e087a0c0cac0ac998335f5e9c8ad02955873
2012-01-05 07:33:45 -08:00
Steve Block
5baa3a62a9 Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
2012-01-03 22:38:27 +00:00
Eric Laurent
afbb047c39 AudioService: simplified handler messages.
For historical reasons, messages to the AudioSystem
handler in AudioService have a complex identifier combining several information.
Messages for a particular stream contain the stream type as part of the message type.
This complexity is not needed as the stream messages also carry a reference to the
VolumeStreamState object which contains all necessary information, including the stream type.

Also grouped parameters of MSG_PERSIST_VOLUME message into a single bit field to make room for
further needs.

Change-Id: Ia27af626b3447541e8f9eaceba21389a824d88e2
2011-12-20 18:07:41 -08:00
Eric Laurent
0ca16d6ba6 Merge "audio effects: rename configure command" 2011-12-19 17:26:24 -08:00
Eric Laurent
4abf88244b audio effects: rename configure command
Renamed audio effect library interface command for audio format
configuration from EFFECT_CMD_CONFIGURE to EFFECT_CMD_SET_CONFIG.
This makes the naming more consistent with other exixsting commands
and allow adding a new command to get the configuration (EFFECT_CMD_GET_CONFIG).
Same change for reverse channel configuration renamed from
EFFECT_CMD_CONFIGURE_REVERSE to EFFECT_CMD_SET_CONFIG_REVERSE.

Implemented EFFECT_CMD_GET_CONFIG in exisitng effect libraries.

Change-Id: Ia7b1c620f13797fe5aceb3b0b4acbacce09fb067
2011-12-19 17:08:31 -08:00
Hong Teng
f15784a5ef Merge "Fix for 5754998 testPerformanceTransitionWithEffectOverlapping test failed." 2011-12-16 15:17:46 -08:00
Glenn Kasten
d9de2d21ef Merge "Extract out audio DSP code to utility library" 2011-12-16 15:02:30 -08:00
Hong Teng
a76f6262c9 Fix for 5754998 testPerformanceTransitionWithEffectOverlapping test failed.
-Fix the index is out of sync frame array boundary when seeking to end of a 3gp file.
Validation only were done for video editor cts test and Movie Studio application.
Futher validation may include media player, youtube application,.etc.

Change-Id: Ib01314f1768cfab702dbe25c307553ace0b85e77
2011-12-16 14:32:59 -08:00
Glenn Kasten
490909d2c0 Extract out audio DSP code to utility library
Change-Id: Ib8ce72028a7ea30e82baa518e381370e820ebbd0
2011-12-16 11:42:03 -08:00
Dave Burke
2b6449bbbc am 0cc1e42d: am ac279de9: Merge "SurfaceMediaSource: use the HW_TEXTURE usage bit" into ics-mr1
* commit '0cc1e42d74e09c259a6da0abc9009d1abf7537b1':
  SurfaceMediaSource: use the HW_TEXTURE usage bit
2011-12-15 19:27:17 -08:00
Jamie Gennis
09fc76664a SurfaceMediaSource: use the HW_TEXTURE usage bit
This change makes SurfaceMediaSource request Gralloc buffers with the
HW_TEXTURE usage bit rather than the VIDEO_ENCODER bit.  It is a
temporary workaround for what is likely a Gralloc bug.

Bug: 5771063
Change-Id: I9cce615e80fc14a1644fae27ba06970c262dd179
2011-12-15 18:36:08 -08:00
Glenn Kasten
d9a723bc92 Merge "Fix build error when verbose logging is enabled" 2011-12-15 10:46:14 -08:00
Glenn Kasten
16dabac224 Fix build error when verbose logging is enabled
Change-Id: I30f4e5d35d1b24dce2e6152a13fd0fb61414a3e2
2011-12-15 08:34:59 -08:00
Glenn Kasten
25adf47477 Merge "Fix indentation and whitespace" 2011-12-14 17:35:36 -08:00
Glenn Kasten
da7923ac29 Merge "Audio C++ comments" 2011-12-14 16:56:31 -08:00
Glenn Kasten
fb2ab9efc3 Fix indentation and whitespace
Use git diff -w to verify.

Change-Id: Ib65be0a1ecf65d6cad516110604e3855bf68a638
2011-12-14 16:54:05 -08:00
Glenn Kasten
ad2ac95d06 Merge "Remove unnecessary this->" 2011-12-14 15:40:43 -08:00
Glenn Kasten
ef2b0caf53 Merge "Fix typo in error message, missing space" 2011-12-14 15:40:18 -08:00
Glenn Kasten
5bdc60c968 Merge "Delete obsolete includes" 2011-12-14 15:40:11 -08:00
Glenn Kasten
46f54359b6 Merge "Remove redundant clear()" 2011-12-14 15:40:01 -08:00
Glenn Kasten
30cca7ecbe Merge "AudioTrack::setVolume check range" 2011-12-14 15:05:56 -08:00
Glenn Kasten
e5fb263a36 Audio C++ comments
Change-Id: I84906ebb9dfcfa5b96b287d18364b407f02a30c1
2011-12-14 14:38:26 -08:00
James Dong
29e97f169d am 3f6a7d1e: am d70c64db: Revert the following patches because they may lead to power regression because SHA/MD5 module is stuck 1. Revert "Fix drm flag setting missed in false drm recognition fix." This reverts commit 9f704f6c46a171357e49c411c83458b9d4565f3b.
* commit '3f6a7d1ee961a4544563932b7499535dc1cac1ec':
  Revert the following patches because they may lead to power regression because SHA/MD5 module is stuck 1. Revert "Fix drm flag setting missed in false drm recognition fix."    This reverts commit 9f704f6c46a171357e49c411c83458b9d4565f3b.
2011-12-14 13:53:31 -08:00
Glenn Kasten
51e445f701 Remove redundant clear()
Change-Id: Ie5e4e63cbc8fa85ef50451dddf8f149fa864b132
2011-12-14 13:31:40 -08:00
Glenn Kasten
5bb8f80fc4 Fix typo in error message, missing space
Change-Id: Icdddbf2fddb81a1db538dd94fb25cf859e44bfbd
2011-12-14 13:13:13 -08:00
Glenn Kasten
db298a4c66 Remove unnecessary this->
Change-Id: I72038f5d4568f0633d3e4ab90f4b67e2dd22c332
2011-12-14 13:09:08 -08:00
Glenn Kasten
1c50a789ca AudioTrack::setVolume check range
Change-Id: Ie182bf0f741f1f49f68c02a1e7437a2a34d34fc5
2011-12-14 13:06:57 -08:00
James Dong
d70c64db9f Revert the following patches because they may lead to power regression because SHA/MD5 module is stuck
1. Revert "Fix drm flag setting missed in false drm recognition fix."
   This reverts commit 9f704f6c46a171357e49c411c83458b9d4565f3b.

2. Revert "Fixed the false drm recognition."
   This reverts commit aadbd80b307c817698ce5110ff8e002804d1b230.

3. Revert "Fix drm enumeration order, resolves failure to play forward lock ringtones"
   This reverts commit a5cbf023e349f2394ba6fc58d73b4375cfec4369.

4. Revert "Fix ANRs due to Widevine DRM plugin sniff taking too long."
   This reverts commit d0d19db1ca1c289b069db33f4665bcb9386064e9.

As a result of the reverting, many ANRs from WV sniffing are back.

related-to-bug: 5739618
2011-12-14 11:01:59 -08:00
Andreas Huber
9a023f1f8e DO NOT MERGE: Support for parsing of "folded" RTSP header values
and some tweaks to the AMR assembler contributed by Samsung (untested).

Change-Id: I6c3df31fa3a35433bfddfdda82747bb4c6ee86a1
related-to-bug: 5669027
2011-12-13 10:09:48 -08:00
Jeff Tinker
a6e549455a am dc44e06e: am ef664f62: Merge "Fix drm flag setting missed in false drm recognition fix." into ics-mr1
* commit 'dc44e06ef305be8de060af69a468e003e231ba05':
  Fix drm flag setting missed in false drm recognition fix.
2011-12-12 15:30:16 -08:00
James Dong
b7e0281900 am 406dd5d1: am aadbd80b: Fixed the false drm recognition.
* commit '406dd5d1e48752177753666867403542e1f400ca':
  Fixed the false drm recognition.
2011-12-12 15:29:46 -08:00
Glenn Kasten
e1b908f52d Delete obsolete includes
Change-Id: I960a179a026ff8d710b43b64cb358f18ee04de16
2011-12-12 13:40:06 -08:00
Andreas Huber
2fc93533d2 Merge "Support for parsing of "folded" RTSP header values and some tweaks to the AMR assembler" 2011-12-12 08:32:28 -08:00
Owen Lin
130f62ab01 Fix the build. (Change LOGV to ALOGV)
Change-Id: I14104540cfbd2bcdd7af1534db20554b88c4c0ce
2011-12-12 16:17:34 +08:00
Andreas Huber
1f7817e146 am ebfce84f: am 68f592a8: Merge "Don\'t perform RTSP seeks right away but queue them for 200ms" into ics-mr1
* commit 'ebfce84f7fd3e25fa08c36b155db91df90a59b3d':
  Don't perform RTSP seeks right away but queue them for 200ms
2011-12-09 18:09:21 -08:00
Andreas Huber
61a8b5301b am aa82c39b: am 0ba9380a: Merge "Fix Bitreader "putBits" implementation, make sure we emulate timestamps" into ics-mr1
* commit 'aa82c39bdb4ad9c1fdcb09f3bea11be5197d3ce6':
  Fix Bitreader "putBits" implementation, make sure we emulate timestamps
2011-12-09 18:09:19 -08:00
Andreas Huber
9f62e15f40 Support for parsing of "folded" RTSP header values and some tweaks to the AMR assembler
contributed by Samsung (untested).

Change-Id: I182561fe0a1a564126bdbb317e96aa52bf525726
2011-12-09 15:09:56 -08:00
Jeff Tinker
aac2f9c66c am a5038d16: am a693a4b5: Merge "Fix ANRs due to Widevine DRM plugin sniff taking too long." into ics-mr1
* commit 'a5038d169f47b2e2278c0056495dfd4808803f8a':
  Fix ANRs due to Widevine DRM plugin sniff taking too long.
2011-12-09 14:25:49 -08:00
Jeff Tinker
9f704f6c46 Fix drm flag setting missed in false drm recognition fix.
Change-Id: Ie38668c8a32969ef7c7df4ca3350e2364291953c
related-to-bug: 5732033
2011-12-09 09:09:08 -08:00
James Dong
aadbd80b30 Fixed the false drm recognition.
Change-Id: If0198e52ff7bbd7422f219f55a37aae97f7d74f1

related-to-bug: 5732033
2011-12-08 21:01:31 -08:00
Andreas Huber
68f592a821 Merge "Don't perform RTSP seeks right away but queue them for 200ms" into ics-mr1 2011-12-08 13:33:16 -08:00
Andreas Huber
21902a8a48 Don't perform RTSP seeks right away but queue them for 200ms
and only execute the last one.

Change-Id: I9ab342396ec9c9c03624a4b0306d1e180ceca000
related-to-bug: 5732960
2011-12-08 13:04:50 -08:00
Andreas Huber
f6ae711450 Fix Bitreader "putBits" implementation, make sure we emulate timestamps
if we don't receive npt time mapping from the rtsp server (i.e. live stream)

Change-Id: I5147d665bd90c9a303ad6ffdafbf770f930f917c
related-to-bug: 5660357
2011-12-08 12:27:47 -08:00
Jeff Tinker
a693a4b555 Merge "Fix ANRs due to Widevine DRM plugin sniff taking too long." into ics-mr1 2011-12-08 00:13:43 -08:00
James Dong
1321bc1fa3 Merge "Update onVideoSizeChanged() callback method Java doc to explicitly specify the conditions under which the width/height passed to the callback could be 0." 2011-12-07 23:05:03 -08:00
Jeff Tinker
d0d19db1ca Fix ANRs due to Widevine DRM plugin sniff taking too long.
Add a Widevine-specific format sniffer to avoid having to
refetch data from the remote server.

Change-Id: I5fdb21fe7a0d6e74f2a6f06e6fbf8070b068ac60
related-to-bug: 5725548
2011-12-07 20:23:20 -08:00
Eric Laurent
71087709aa Merge "Fix audio effect tests" 2011-12-07 16:45:07 -08:00
Dave Burke
7554c57c17 am 6727a43f: am 54a53841: Merge "Fetch at least 192KB to avoid our mp3 sniffer from blocking on data." into ics-mr1
* commit '6727a43f6d8ff193b86ca90b2daa761c47157638':
  Fetch at least 192KB to avoid our mp3 sniffer from blocking on data.
2011-12-07 14:11:14 -08:00