• Home
  • History
  • Annotate
  • only in /frameworks/av/media/libmedia/
History log of /frameworks/av/media/libmedia/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
83d9698ce5825566a8621f93c58721d0745fd55f 07-Jul-2016 Wei Jia <wjia@google.com> MediaExtractor: add DrmInitialization in IDataSource.

Bug: 28901867
Change-Id: Ic33dc8dc2f5f36239e057d2f2aceeb7738eef968
(cherry picked from commit 2a5e49c984befa066e966cd9af2303a54976f163)
DataSource.cpp
6e70614750e8100f86fb4cb0f010b49aef39b3a1 23-Jun-2016 Glenn Kasten <gkasten@google.com> Merge "Revert "Restore old signature for acquire/release session"" into nyc-dev
fc5c22b0c574f97fbf5c87f9a01b4d60e27e6b37 23-Jun-2016 Glenn Kasten <gkasten@google.com> Revert "Restore old signature for acquire/release session"

This reverts commit 2d51b7c18ad0ffd142d7ba94203f52ba3f735530.

Change-Id: I8e17813b9639d8e928bcfa348d21c45fb8b5f846
udioSystem.cpp
ef9cab1d86054d8ab17056990e0264e1ccb826c1 23-Jun-2016 Glenn Kasten <gkasten@google.com> Merge "Restore old signature for acquire/release session" into nyc-dev
2d51b7c18ad0ffd142d7ba94203f52ba3f735530 23-Jun-2016 Glenn Kasten <gkasten@google.com> Restore old signature for acquire/release session

Bug: 29490416
Change-Id: Iaf6be0666937c6fa625f936839f5a04d58350640
udioSystem.cpp
07eee80b3422c0304491f24bbc415deb0badbefc 22-Jun-2016 Andy Hung <hunga@google.com> Limit cached timestamp use if HW fails to provide them

On some devices, if the HDMI cable is disconnected during use,
cached timestamp info can become very old.

Bug: 29423451
Change-Id: Ieecf5e98bad14d00b4f5f14b032c2cf66ae94ceb
udioTrack.cpp
d554814b49ae68a1e4a24f628bd0fed73a12ad08 11-Jun-2016 Wei Jia <wjia@google.com> Merge "MediaPlayer: fix state for setPlaybackParams." into nyc-dev
5be109faadfc08b561221bd801082873b614b93d 11-Jun-2016 Wei Jia <wjia@google.com> MediaPlayer: fix state for setPlaybackParams.

Bug: 29032949
Change-Id: I7580a04cc03f96109a770f95abd3fb884c810103
ediaplayer.cpp
fc908d010b32bbb850a6306893ce7db166a932f6 07-Jun-2016 Marco Nelissen <marcone@google.com> Don't use sp<>&

because they may end up pointing to NULL after a NULL check was performed.

Bug: 28166152
Change-Id: Iab2ea30395b620628cc6f3d067dd4f6fcda824fe
MediaDeathNotifier.cpp
ediaplayer.cpp
ediarecorder.cpp
c57fe21ebdd6813c5a8954f3fda51b82d26acd07 31-May-2016 Marco Nelissen <marcone@google.com> limit mediaextractor memory

Limit mediaextractor using rlimit, to prevent it from bringing down the system
via the low memory killer.

Bug: 28471206
Bug: 28615448
Change-Id: Ic84137435d1ef0a6883e9789a4b4f399e4283f05
ndroid.mk
ediaUtils.cpp
ediaUtils.h
69488c4ef115c9de52c85f4fcae27c7774720298 17-May-2016 Andy Hung <hunga@google.com> AudioTrack: Fix timestamp startup condition

Suppress timestamps without valid kernel information or
a server update.

Update timing of server timestamp location to better indicate
when the server pull occurs.

Update write timing logic to suppress unneeded time calls
and to ensure proper throttling.

Bug: 28771691
Change-Id: I2cd25dad638ca1d0b1355d87d175d908f3bddb26
udioTrack.cpp
f3d9908a888203e7e70b8c2d43ee741a95e154ed 24-May-2016 Andy Hung <hunga@google.com> Merge "Add memory heap checks for mediaserver and audioserver" into nyc-dev
b2379ba0a32638bae2ea0460644f68cf5a0967ce 24-May-2016 Eric Laurent <elaurent@google.com> Fix android.permission.CAPTURE_AUDIO_OUTPUT permission check

Make sure we use the correct PID and UID when checking
android.permission.CAPTURE_AUDIO_OUTPUT permission from audio
policy service.

Bug: 28772898
Change-Id: I8f0c45bf7a5728b4364a451eefb6c025892ae9a5
udioRecord.cpp
udioSystem.cpp
AudioPolicyService.cpp
9ea77cdba8c422940adb57a790b44ac04fe0353f 07-Apr-2016 Haynes Mathew George <hgeorge@codeaurora.org> audioflinger: Pass pid of process creating track or opening record

AudioFlinger allocates a Client heap for each unique pid.
If two applications use mediaplayer APIs, the same Client heap
is reused as the pid used is not the application pid but that
of mediaserver. With this change, the pid of the application
pid is used to decide the heap to be used.

Bug: 23525542
Bug: 28772898
Change-Id: I31a695b0b321eff6e2aca80c3bc4aeb3e1cd9ac7
udioRecord.cpp
udioTrack.cpp
AudioFlinger.cpp
07b745e166ee62030960ccea37e117caadf71c32 24-May-2016 Andy Hung <hunga@google.com> Add memory heap checks for mediaserver and audioserver

Memory heap check updated and restored to mediaserver,
added as new option to audioserver.

Requires properties to be set (example for audioserver):

$ adb shell setprop libc.debug.malloc.program audioserver
$ adb shell setprop libc.debug.malloc.options backtrace=8
$ adb shell pkill audioserver

...

and to dump:

$ adb shell dumpsys media.audio_flinger -m

Bug: 28909124
Bug: 27500825
Change-Id: Ifa8c2c02b022daf1a799ee4a1d75282a3c921763
ndroid.mk
emoryLeakTrackUtil.cpp
51f03edcb36dcca327e9d5aa2410654e8a1b2809 14-May-2016 Wei Jia <wjia@google.com> Merge "IMediaSource: add readMultiple API to speed up inter-process reading." into nyc-dev
1f1fc459ddb67d1162f2dbb10d14e57f42841da2 12-May-2016 Wei Jia <wjia@google.com> IMediaSource: add readMultiple API to speed up inter-process reading.

GenericSource: use readMultiple for audio track.
Bug: 28545177
Bug: 22775369
Change-Id: If26b80e75eba4212105d51140c4bfce85ec664f8
MediaSource.cpp
038ccfd6ff5a32d6f559e5b479d6f8e55d0b5133 10-May-2016 Lajos Molnar <lajos@google.com> Merge "stagefright: IOMX: pass native handle in sp<NativeHandle>" into nyc-dev
1b40f2804a27b695e9e53fb1699b64cb0dd387f9 10-May-2016 Lajos Molnar <lajos@google.com> stagefright: IOMX: pass native handle in sp<NativeHandle>

This clarifies ownership of the native handle

Bug: 28644266
Bug: 27856976
Change-Id: I7a617513d7ac93dd58d74af9469663418735aaf3
OMX.cpp
0d0a8b48d267a1980cfd9507b51d173756835f34 10-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes I58b03acd,I7d7eb086 into nyc-dev

* changes:
stagefright: untangle metadata-mode handling
stagefright: add a way to update native handle in OMX buffers
6393ea6915e7e6fede4cee31bab0d373ce90211b 10-May-2016 Pawin Vongmasa <pawin@google.com> Merge "AMessage::FromParcel(): Limit recursion depth; report NULL on failure." into nyc-dev
3e328782f1e1061d08ea0c45b855cc418a2d9ea6 09-May-2016 Lajos Molnar <lajos@google.com> stagefright: untangle metadata-mode handling

- specify requested metadata mode from producers to OMX
- (pass requested metadata in IOMX::storeMetadataInBuffers)
- use correct logic for native handle source
- use native handle source for encoded meta buffers

Bug: 22775369
Change-Id: I58b03acd3e9a5367d5010d7f87b7af5cae23362c
OMX.cpp
7e0bef8aa6bf9db06079b743794ec2712ad84431 09-May-2016 Lajos Molnar <lajos@google.com> stagefright: add a way to update native handle in OMX buffers

Bug: 22775369
Change-Id: I7d7eb0868fef896d1cb0a45bec759a00f0783673
OMX.cpp
6d7b119a416c9f10288051e562f294365e5d954c 08-May-2016 Andy Hung <hunga@google.com> Improve timestamp jitter fix

Use last valid kernel timestamp on server side, not client side.

Bug: 28465713
Change-Id: I33590d6922980f288355f947bc56279245058429
udioTrack.cpp
8dab17305ff72298e2b4874592ac72c004c392d8 03-May-2016 Pawin Vongmasa <pawin@google.com> AMessage::FromParcel(): Limit recursion depth; report NULL on failure.

- FromParcel() now takes as an optional parameter the maximum recursion depth.
(The default value is currently set to 255.) On the event that the input
parcel has AMessage nested deeper than the maximum recursion depth,
FromParcel() will return NULL.
- Also, when the input parcel has items that are not recognized by FromParcel(),
NULL will be returned. (The old behavior was to invoke TRESPASS, which would
cause the process to stop.)

Bug: 28332724
Change-Id: I722097f7d1711668f197651d7e8135d703f6c91f
ediaCodecInfo.cpp
a321469104536544d1cf0c0098d14bbf14186e88 06-May-2016 Marco Nelissen <marcone@google.com> Dump local source, not remote

dumpsys media.extractor was printing the remote source instead of starting at
the local source.

Bug: 22775369
Change-Id: I5026218515bf7ceb8485005ed7d89638a9c1963b
MediaExtractor.cpp
7aa45dd7fc5c2bd959f1571231556ac06b7ec8ae 03-May-2016 Andy Hung <hunga@google.com> Merge "AudioTrack: Fix timestamp jitter" into nyc-dev
aebe9dc29988c94a774208ba659c4f156d274d79 02-May-2016 Glenn Kasten <gkasten@google.com> Normal tracks use triple buffering if resampling

Bug: 26230944
Change-Id: I40f6cd7147db1be95f297af406c77c6404a76f37
udioTrack.cpp
b01faa31462e19957ae3c0c3ada07c9576a9494f 27-Apr-2016 Andy Hung <hunga@google.com> AudioTrack: Fix timestamp jitter

When HAL out_get_presentation_position returns error,
use server position adjusted for latency.

Bug: 28250436
Change-Id: I3dbcb9b7c4e56d34e7e161d1a02d8f64afd602b9
udioTrack.cpp
ea38ee7742e799b23bd8675f5801ef72f94de0f4 18-Apr-2016 Glenn Kasten <gkasten@google.com> Can now indicate the desired number of notifications (sub-buffers)

per fast track buffer when using the default buffer size.

There is no change for normal tracks, or fast tracks with a non-default buffer size.

Also fix related bugs:
Notification period was not set correctly when fast multiplier is not 1.
Incorrect warning when client adjusted notification frames.

Bug: 27819623
Bug: 28117362
Change-Id: Ifc2121e874f51718cd56ec04e4bd5f89f4963132
udioTrack.cpp
3003807fcfa96c9cbfea18d643f47108aa116cd5 25-Apr-2016 Jeff Tinker <jtinker@google.com> Remove MediaDrm stack from mediaserver

Part of media security hardening

MediaDrm was temporarily allowed to
run in either mediaserver or mediadrmserver
while all nexus devices were implementing
support for the native_handle representation
of secure buffers. Now that all nexus
devices support native_handle, the MediaDrm
stack can be removed from mediaserver.

b/22990512

Change-Id: Ie5d83bfeb4c4a824e1d0edb4c9452c782d6fd386
MediaPlayerService.cpp
cc95bcf0fe6de6632fc38306efb0035d4e36423b 20-Apr-2016 Hall Liu <hallliu@google.com> Merge "Add UK ringback tone" into nyc-dev
e7b4463fcd2597b8a17e776648396e85853c25d9 20-Apr-2016 Hall Liu <hallliu@google.com> Add UK ringback tone

Add the UK ringback tone for when the device is in
the UK and the network declines to play a ringback tone.

Change-Id: Iecbc420dd18b019e9201745a9ddc84b060dc9dba
Fix: 26583561
oneGenerator.cpp
4a8308b11b92e608cdaf29f73f7919e75706f9a2 18-Apr-2016 Glenn Kasten <gkasten@google.com> Add AudioSystem::getFrameCountHAL()

And add comments about declaring methods in binder opcode order.

Bug: 28117362
Change-Id: I3c4426fa4bb3ce9c4a207a44d3bb1103d7fef160
udioSystem.cpp
AudioFlinger.cpp
AudioFlingerClient.cpp
d298fb880ba440793ce206e5f519d4f7c8c8bb54 15-Apr-2016 Marco Nelissen <marcone@google.com> Merge "IMediaExtractor: protect access to extractor info list" into nyc-dev
8d27f5e1be1d301e0427f483493390419fe36acf 14-Apr-2016 Marco Nelissen <marcone@google.com> IMediaExtractor: protect access to extractor info list

Bug: 27970490
Bug: 27970718
Bug: 27970489

Change-Id: If896f6519986331702ffa41b1602e008b106f391
MediaExtractor.cpp
0c4a97e6e1470b2d8b8810792af8d66689020c51 13-Apr-2016 Andy Hung <hunga@google.com> Merge "NuPlayer: Reserve buffer for 8x max speed" into nyc-dev
f2c87b3f88d987d2af6322e9763eb8224a2bae48 08-Apr-2016 Andy Hung <hunga@google.com> NuPlayer: Notify if drain message time is unexpectedly long

Bug: 27940058
Change-Id: Id8897c30e21b6b9de545a710e7766ffceb491455
udioTrack.cpp
ff874dc957f9ea70d87f4d627bf903e1fc86d58b 12-Apr-2016 Andy Hung <hunga@google.com> NuPlayer: Reserve buffer for 8x max speed

Affects Photos with Bluetooth and 240x recording.

Bug: 26986060
Change-Id: I228223221f9811e05c274d64cd42ac104db04c36
udioTrack.cpp
e1e9846a786a0d77a13b44f8e798e03b4cba9d77 12-Apr-2016 Andy Hung <hunga@google.com> AudioTrack: Reset position on flush for extended timestamps.

Bug: 27940058
Change-Id: If91320669e2e84803e601137b1ce66b361b129f1
udioTrack.cpp
69d3d8a9540b0da787ea0beccad2517f057dd54d 07-Mar-2016 Marco Nelissen <marcone@google.com> Expand mediaextractor dumpsys

Bug: 22775369
Change-Id: I3366a52ba7a00d1685a2211465f2f18f143d0efc
DataSource.cpp
MediaExtractor.cpp
1d0afc454e795db1723f99d2f3329fe2a34a83c5 04-Apr-2016 Wei Jia <wjia@google.com> Merge "IMediaSource: release MediaBuffers when desired shared memory is not available." into nyc-dev
027b81154c4296f3d0caa861d43b19a5f57797cd 04-Apr-2016 Wei Jia <wjia@google.com> IMediaSource: release MediaBuffers when desired shared memory is not available.

Bug: 27970343
Change-Id: Ia86ecbffb3c3ebc2e8e0e10b951fa7b001bbdb5f
MediaSource.cpp
e13f8a603867280de9b02ce4839202a182556416 30-Mar-2016 Andy Hung <hunga@google.com> NuPlayer: Play out remaining audio data when recycling isn't possible

Don't flush it immediately.

Bug: 26530291
Change-Id: I0427633402fa251ec62e2b70e47a0a7b451d3ea2
udioTrack.cpp
ea2b9c07b34079f0dbd8610a511e006e69a15adc 13-Feb-2016 Andy Hung <hunga@google.com> Implement client playback timestamps with 64 bit accuracy

Provide server timestamps if the HAL doesn't provide it.
Provide monotonic - boottime translation.

Bug: 17472992
Bug: 26682703
Bug: 27749434
Change-Id: I6c9b213d9f9284092e34d57f52870e02c72df62a
udioTrack.cpp
udioTrackShared.cpp
9887c3e252ec0571ee8637310ea9ec2eec118044 30-Mar-2016 Ian Ni-Lewis <ilewis@google.com> Merge "Remove integer sanitization from ringbuffer pointer arithmetic" into nyc-dev
54b48c31fba71534ea56e32609f7ea770519fb2e 30-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Use audio_module_handle_t and audio_patch_handle_t consistently" into nyc-dev
926b82fa9e22739686602f7ae8cf24105f14d82e 29-Mar-2016 ilewis <inl@google.com> Remove integer sanitization from ringbuffer pointer arithmetic

The AudioTrackShared ringbuffer uses int32 positions and allows overflow.
This confuses the integer sanitization code and makes it panic.
The simplest solution for now seems to be to remove sanitization
from the methods that touch the ringbuffer pointers.

Bug 27680456

Change-Id: Ie4d7daf0fb1e4e223ee97c412af7b1bd9c6916eb
udioTrackShared.cpp
a13cde98a880341f0a56d91da6364b093fb5d24e 29-Mar-2016 Glenn Kasten <gkasten@google.com> Use audio_module_handle_t and audio_patch_handle_t consistently

Bug: 27814144
Change-Id: I54b7a73ec318779fd3addb060998f4d94141152d
AudioFlinger.cpp
AudioPolicyService.cpp
5fe2151459fd6c88958c5ebd71f28004d49d8b65 29-Mar-2016 Andy Hung <hunga@google.com> Merge "Read from proxy for PCM direct and offloaded track position" into nyc-dev
7a490e7ab39ef0b22baf24b03f2463c46dc068ed 23-Mar-2016 Andy Hung <hunga@google.com> Read from proxy for PCM direct and offloaded track position

Bug: 27776737
Change-Id: I721bf2b4d46271bf84ad9fc29ff5c4ecd4759206
udioTrack.cpp
1243869fb29ee580fa5c179443420c06a779dbfd 28-Mar-2016 Wei Jia <wjia@google.com> MediaPlayer: use mLock to prevent racing condition.

Bug: 27823938
Change-Id: Iad156f3b35fdcccb13ad5c49921bbe3cc4fc0c47
ediaplayer.cpp
9b3359feabbf138bb965da5173434da78bfe0929 24-Mar-2016 Haynes Mathew George <hgeorge@codeaurora.org> libmedia: Initialize state vars to avoid possible crash

If playback or record track creation fails on server side,
some state is left initialized incorrectly.
This can cause a crash when the object is destroyed
because of a reference to a NULL object.

Initialize state vars properly in the initialization list
to avoid this behavior.

authored-by: Zhou Song <zhous@codeaurora.org>

CRs-Fixed: 992608
Change-Id: If8c3611e3229c0c1b14b81285e07b9357fec7658
udioRecord.cpp
udioTrack.cpp
681d56a8a3aa1394918e3283af2f99718daf2e3e 25-Mar-2016 Andy Hung <hunga@google.com> Merge "AudioTrack: Do not resume callback thread on start failure" into nyc-dev
79629f0716f04e79064256362be56730077b8c50 24-Mar-2016 Andy Hung <hunga@google.com> AudioTrack: Do not resume callback thread on start failure

Bug: 27673375
Change-Id: I1df1db51e75cee57f19824ac6506bf02000714fd
udioTrack.cpp
287b36cf4a2a045dda11ea803f3fa7cb1a435d51 24-Mar-2016 Andy Hung <hunga@google.com> Merge "Fix divide by zero exception with default sampleRate of 0" into nyc-dev
0b6bbcf0c2b2e249a4cbe5a5f40fcaab84431c1a 24-Mar-2016 Andy Hung <hunga@google.com> Fix divide by zero exception with default sampleRate of 0

Bug: 27827281
Change-Id: I6cd03712c64bee3582ba0c5be7d5d3035c4861c1
udioRecord.cpp
da626b0e985e9de1df5ad168f25f1273811ee940 23-Mar-2016 Wei Jia <wjia@google.com> Merge "mediaplayer: fix logging message." into nyc-dev
848ebc644a1a7ef93a051186fb5f0aef826ad67e 23-Mar-2016 Wei Jia <wjia@google.com> mediaplayer: fix logging message.

Change-Id: I99fb411632184e9f9180e7fd42eeaa614e87cf3b
ediaplayer.cpp
5a898236109c3cb705241e66583d80df413198d2 21-Mar-2016 Phil Burk <philburk@google.com> Merge "AudioTrackShared: fix min buffer size" into nyc-dev
7b5795dc605529246b861ff8d8be7c7a58c5bfe2 21-Mar-2016 Marco Nelissen <marcone@google.com> Fix OMX_IndexParamConsumerUsageBits size check am: 788b0b6 am: 63002af am: 8777bfb
am: b7bd841

* commit 'b7bd84103062ba66e19ce6ac540d97b9a927445f':
Fix OMX_IndexParamConsumerUsageBits size check
63002afe44fbbc7fd0aba77887596a5c3845d22c 21-Mar-2016 Marco Nelissen <marcone@google.com> Fix OMX_IndexParamConsumerUsageBits size check
am: 788b0b6

* commit '788b0b651b5b14f27b0aee050ffd2a32629c7cd3':
Fix OMX_IndexParamConsumerUsageBits size check
788b0b651b5b14f27b0aee050ffd2a32629c7cd3 21-Mar-2016 Marco Nelissen <marcone@google.com> Fix OMX_IndexParamConsumerUsageBits size check

Bug: 27207275
Change-Id: I9a7c9fb22a0e84a490ff09c151bd2f88141fdbc0
OMX.cpp
26760d1a1105b6b318c837a491cdb96f6901804e 21-Mar-2016 Phil Burk <philburk@google.com> AudioTrackShared: fix min buffer size

Fast Tracks can have very low buffer sizes.

Bug: 27765661
Bug: 27765632
Change-Id: I70262b2a0136aea3c0936aec85f15b0fc78d168f
Signed-off-by: Phil Burk <philburk@google.com>
udioTrackShared.cpp
26ae699068f614a70cba78cb900d44c82938d6ee 18-Mar-2016 Glenn Kasten <gkasten@google.com> Fix typo

Change-Id: I47b1bdf70848fdd158538d0c3d5a6cef41f43b91
ndroid.mk
fc1337d079ba7e6ffd7ce07706cfeeeb355c0200 18-Mar-2016 Phil Burk <philburk@google.com> Merge "AudioTrack: fix stall if setBufferSizeInFrames() called before play()" into nyc-dev
e8972b0a27fac327c997fceb20d9abae1dc1d899 04-Mar-2016 Phil Burk <philburk@google.com> AudioTrack: fix stall if setBufferSizeInFrames() called before play()

The server was waiting for a full buffer.
But the buffer was only getting partly filled.
So the stream was not starting.

The fix involves having the server look at the adjustable threshold.

Bug: 27505889
Change-Id: I5dbf686413e670dacbbecc9e0f838744e465f44f
Signed-off-by: Phil Burk <philburk@google.com>
udioTrack.cpp
udioTrackShared.cpp
9a57e34f476d5d2400e6e8ffac303c6190e641f0 17-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Use audio_session_t consistently" into nyc-dev
53ce1e03efa1a12b3acc7d76dd0c273487ca3746 16-Mar-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Dynamic policies: support for device selection" into nyc-dev
7638ca29e8400a19524adb982e9d22c02786de82 05-Mar-2016 Jean-Michel Trivi <jmtrivi@google.com> Dynamic policies: support for device selection

Dynamic policy mix: rename "registration" field to device address
as this reflects the true use of the field.
AudioPolicyManager: dynamic policy registration differs depending
on policy routing flags.
When register a mix with the RENDER flag, iterate over all outputs'
patches to find a matching device and address.

Bug 25448664

Change-Id: I71584081e7f1b2b5252fb6c4659fdeb464f7d282
udioPolicy.cpp
d848eb48c121c119e8ba7583efc75415fe102570 08-Mar-2016 Glenn Kasten <gkasten@google.com> Use audio_session_t consistently

Bug: 27562099
Change-Id: I328d8226191386b163f2ace41233607294c50dcd
udioEffect.cpp
udioRecord.cpp
udioSystem.cpp
udioTrack.cpp
AudioFlinger.cpp
AudioPolicyService.cpp
AudioRecord.cpp
MediaPlayerService.cpp
isualizer.cpp
ediaplayer.cpp
38246e482ea3bd1e0f88f7133934ec4537b48bbd 16-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "When fast flag is denied, retry with new I/O handle" into nyc-dev
2854e5182172de018a727db5862093a08628811c 12-Mar-2016 Glenn Kasten <gkasten@google.com> When fast flag is denied, retry with new I/O handle

Bug: 27587927
Change-Id: Icc8f25cd438211cc60cb8243e0e998825ac1427a
udioRecord.cpp
b53ab34b95b8633070cbef5d03162d182aac3a9a 15-Mar-2016 Marco Nelissen <marcone@google.com> resolve merge conflicts of edb14117b6 to nyc-dev

Change-Id: If4c4a68dff17a238673f5f11d790229e0459fda0
31e2a27f876edbe49988bd4307365d481c1de7e8 15-Mar-2016 Marco Nelissen <marcone@google.com> Fix size check for OMX_IndexParamConsumerUsageBits
am: c1c50e7b47

* commit 'c1c50e7b47784c5e6978eda67db68ef4951144c6':
Fix size check for OMX_IndexParamConsumerUsageBits
4d231dc0ee34380956c71cbe18a750e487a69601 12-Mar-2016 Eric Laurent <elaurent@google.com> audio: Fix race condition in AudioTrack underrun.

When audio flinger mixer removes an AudioTrack from the
active list in case of underrun, it is possible that the
client has written a full buffer just after the underrun detection and
is blocked waiting for more space to write. In this case, the client
will never detect the DISABLED flag and the track never be restarted.

Also implement missing DISABLE flag detection in server side audio tracks
(OutputTrack and PatchTrack).

bug: 27567768
Change-Id: I8d0753429d4113498258b1f61bd8ac5939a612f0
udioTrack.cpp
udioTrackShared.cpp
f56a02a5e7d1bfaeabf8b918e56bf49ea509bd42 14-Mar-2016 Marco Nelissen <marcone@google.com> Merge "Fix StagefrightMetadataRetriever calling MediaSource::start twice" into nyc-dev
e7d8e71e45028cbe51839c23f922ba8c506cba82 14-Mar-2016 Marco Nelissen <marcone@google.com> Fix StagefrightMetadataRetriever calling MediaSource::start twice

and revert the previously added debug logging.

Bug: 27324401
Change-Id: I6bd938c6667153022a971389023afbc731486ca0
MediaSource.cpp
c1c50e7b47784c5e6978eda67db68ef4951144c6 11-Mar-2016 Marco Nelissen <marcone@google.com> Fix size check for OMX_IndexParamConsumerUsageBits

since it doesn't follow the OMX convention. And remove support
for the kClientNeedsFrameBuffer flag.

Bug: 27207275
Change-Id: Ia2c119e2456ebf9e2f4e1de5104ef9032a212255
OMX.cpp
b34bcea7945fb63af52c4b6e87757882b0df37eb 11-Mar-2016 Lajos Molnar <lajos@google.com> Merge "IOMX: add dataspace to createInputSurface" into nyc-dev
98783a370f3f35058b42534d7d1d05e0fb7e9f5a 10-Mar-2016 Ronghua Wu <ronghuawu@google.com> Merge "media: changed resource type from String8 to enum." into nyc-dev
ea15fd29af81490311af9e12949b43524c39400e 03-Mar-2016 Ronghua Wu <ronghuawu@google.com> media: changed resource type from String8 to enum.

Bug: 27338692
Change-Id: I0161de084682e2317cba81dc5f55c17d5d478570
ediaResource.cpp
ae34ed2bcc9fa49a22fe7497327adb689ef27e8d 28-Jan-2016 Haynes Mathew George <hgeorge@codeaurora.org> AudioTrack: Use original flags during track recreation

Also the OFFLOAD and DIRECT flags aren't denied by server.

authored-by: Pavan Chikkala<pavanc@codeaurora.org>
Bug: 27554925
Change-Id: I6fd6b129928af4513bb0cba271019288605310f8
udioTrack.cpp
57fad3c31f46ec98d15bc253c16f9d269aeb8ea7 08-Mar-2016 Lajos Molnar <lajos@google.com> IOMX: add dataspace to createInputSurface

Bug: 25684127
Change-Id: Ibe746d7d077f32b0f2ecfb8494f415a6bf0bd673
OMX.cpp
58883a0cbbde53579461ef7d9a639b4ac45cb55e 09-Mar-2016 Glenn Kasten <gkasten@google.com> AudioRecord: Use original flags during track recreation

Bug: 27554925
Change-Id: Idecbadcb114b9470e89dccf1c65b0f965cc2bf15
udioRecord.cpp
9222aaf44d79e501c513887f74979f16226b2fc7 05-Mar-2016 Marco Nelissen <marcone@google.com> DO NOT MERGE Verify OMX buffer sizes prior to access
am: f1a2668f4f

* commit 'f1a2668f4f09e38722424a6a74f0ea26f49e4110':
DO NOT MERGE Verify OMX buffer sizes prior to access
f1a2668f4f09e38722424a6a74f0ea26f49e4110 29-Feb-2016 Marco Nelissen <marcone@google.com> DO NOT MERGE Verify OMX buffer sizes prior to access

Bug: 27207275
Change-Id: I4412825d1ee233d993af0a67708bea54304ff62d
OMX.cpp
f4cf8817de14d2a14dbef3e6f319d65dbfba6e47 03-Mar-2016 Marco Nelissen <marcone@google.com> Merge "Verify OMX buffer sizes prior to access" into nyc-dev
db52e5e3dc15f7233ccd9c128fe43f2b2f58b29b 02-Mar-2016 Eric Laurent <elaurent@google.com> Merge "Sample rate 0 means a route-dependent rate" into nyc-dev
6e0c00ba53d8e5ad14d9e447c3c040ce6fd81a47 02-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge changes from topic 'camera-native-aidl' into nyc-dev

* changes:
Camera: Clean up warnings and set -Werror
Camera: Switch camera2 to auto-gen C++ binder interfaces
d56db1d2bee182d1851097a9c712712fc094d117 18-Dec-2015 Eino-Ville Talvala <etalvala@google.com> Camera: Switch camera2 to auto-gen C++ binder interfaces

- Move camera service AIDL files to frameworks/av
- Build C++ interface stubs with AIDL tools
- Add necessary native-side parcelables and update existing ones
- Remove manually-written stubs, rearrange remaining manual stubs
- Adjust implementations to work with auto-generated stubs
- Adjust method signatures for auto-gen differences
- Add rich error messages using binder::Status

Bug: 25091611
Change-Id: I6f69f34b9d1a3f8d1fb7db87357363f8fa8483ff
MediaRecorder.cpp
ediarecorder.cpp
2720c8b094cfa58de314daa8e5e4fb4fa81fe3b2 29-Feb-2016 Marco Nelissen <marcone@google.com> Verify OMX buffer sizes prior to access

Bug: 27207275
Change-Id: I4412825d1ee233d993af0a67708bea54304ff62d
OMX.cpp
7fd0422fbd17af3b24eb04421d37fce50f3826e2 02-Feb-2016 Glenn Kasten <gkasten@google.com> Sample rate 0 means a route-dependent rate

Remove check for primary _output_ [sic] sampling rate for fast capture.
Clean up AudioRecord handling of frame count and sample rate.
Clean up AudioTrack handling of notification period updates.
Make AudioRecord and AudioTrack more similar in order of operation, comments, and whitespace.

Bug: 25641253
Bug: 21019153
Change-Id: I24a6677945987fc39a9bf93f70357e4bc7410f98
udioRecord.cpp
udioTrack.cpp
2c073da0f02c3cf7cd4795af2d861222cbcab72a 26-Feb-2016 Glenn Kasten <gkasten@google.com> AudioSystem::getSamplingRate and getFrameCount now work for input

Also fix whitespace and comment in AudioIoDescriptor.

Bug: 25641253
Bug: 21019153
Change-Id: I6a1e2262f44f87ec3ebce6e5274f45ed0f47eb13
udioSystem.cpp
AudioFlinger.cpp
eeecb980ff4c202d0a3c4b0bfe040dce2f73336d 26-Feb-2016 Glenn Kasten <gkasten@google.com> Add use for audio_unique_id_t

Bug: 25641253
Bug: 21019153
Change-Id: I65dc128e760c245f3d90559635a8981b186c87d7
udioRecord.cpp
udioSystem.cpp
udioTrack.cpp
AudioFlinger.cpp
ediaplayer.cpp
91afc2297dd1c39302dba6ff68e9839aae27d39a 29-Feb-2016 Wei Jia <wjia@google.com> Merge "IMediaSource: release mediabuffer after content is copied into shared memory." into nyc-dev
1d5a306c0b1322168e8f9fcf81876118a355a400 29-Feb-2016 Wei Jia <wjia@google.com> IMediaSource: release mediabuffer after content is copied into shared memory.

Bug: 27362659
Bug: 26295488
Change-Id: I27a00440117f08acb0fb68347710c45927d4892a
MediaSource.cpp
27bfd4adafbc5f72e994acd70cc2c33e667c6a6c 26-Feb-2016 Marco Nelissen <marcone@google.com> Merge "Temporary debug to figure out who's calling start twice" into nyc-dev
0d035b6057cef680a3755c6a8fc914c483648903 26-Feb-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Send audio patch in recording callback" into nyc-dev
afe2f276e28540d323fa83e44abdde2fb9d55e89 26-Feb-2016 Marco Nelissen <marcone@google.com> Temporary debug to figure out who's calling start twice

Bug: 27324401
Change-Id: Ie723ebc0554e0a563aa9e92113d67252bc6aca2f
MediaSource.cpp
8c7cf3b7d0d7bccb9affbc34ae2ab2d6b332f972 26-Feb-2016 Jean-Michel Trivi <jmtrivi@google.com> Send audio patch in recording callback

Remove direct access to patch handle in AudioInputDescriptor, replace with
set / get functions.
Add interface for AudioSession to query configuration from enclosing
input descriptor.
When input descriptor's patch handle changes during a recording, propagate
the change through the recording notification callback.

Bug 26798796

Change-Id: Ia1395d44da7ccfe69ca46877638d1eb49b3935ad
udioSystem.cpp
AudioPolicyServiceClient.cpp
7228d57873ebed45a2873bc0e4bc026c53fc979d 24-Feb-2016 Marco Nelissen <marcone@google.com> Get service by value instead of reference am: 61a6d26aab am: 93f5bcab20 am: d11972f8d4 am: c0cefa9f37 am: 73079eec40 am: 5984d6cbf9 am: 6bac803b15 am: 5259834834 am: 6d65ec1f72 am: fd517c3941
am: 2f72479402

* commit '2f72479402edae6b0d66449c402453fd6e3364c2':
Get service by value instead of reference
6d65ec1f7256a3de55ed79e97f6c21726ac2bd00 24-Feb-2016 Marco Nelissen <marcone@google.com> Get service by value instead of reference am: 61a6d26aab am: 93f5bcab20 am: d11972f8d4 am: c0cefa9f37 am: 73079eec40 am: 5984d6cbf9 am: 6bac803b15
am: 5259834834

* commit '52598348340ba20048a1d6304b39b548a95be18f':
Get service by value instead of reference
52598348340ba20048a1d6304b39b548a95be18f 24-Feb-2016 Marco Nelissen <marcone@google.com> Get service by value instead of reference am: 61a6d26aab am: 93f5bcab20 am: d11972f8d4 am: c0cefa9f37 am: 73079eec40 am: 5984d6cbf9
am: 6bac803b15

* commit '6bac803b1595a653180da15d409fe6167534334c':
Get service by value instead of reference
6bac803b1595a653180da15d409fe6167534334c 24-Feb-2016 Marco Nelissen <marcone@google.com> Get service by value instead of reference am: 61a6d26aab am: 93f5bcab20 am: d11972f8d4 am: c0cefa9f37 am: 73079eec40
am: 5984d6cbf9

* commit '5984d6cbf9c7eae7a0f46c948a9b35b56f0268a5':
Get service by value instead of reference
73079eec4013621ac516f22b0ec6d55203d1e245 24-Feb-2016 Marco Nelissen <marcone@google.com> Get service by value instead of reference am: 61a6d26aab am: 93f5bcab20 am: d11972f8d4
am: c0cefa9f37

* commit 'c0cefa9f37e296a7a60978e442b374b5c7f24d65':
Get service by value instead of reference
d11972f8d48d14a1a52e98e64b8216abfc7f00e0 24-Feb-2016 Marco Nelissen <marcone@google.com> Get service by value instead of reference am: 61a6d26aab
am: 93f5bcab20

* commit '93f5bcab205f8d7cd4557eacda513867e8b8ea65':
Get service by value instead of reference
93f5bcab205f8d7cd4557eacda513867e8b8ea65 24-Feb-2016 Marco Nelissen <marcone@google.com> Get service by value instead of reference
am: 61a6d26aab

* commit '61a6d26aab95870279b274e565c1495748befde0':
Get service by value instead of reference
61a6d26aab95870279b274e565c1495748befde0 18-Feb-2016 Marco Nelissen <marcone@google.com> Get service by value instead of reference

to prevent a cleared service binder from being used.

Bug: 26040840
Change-Id: Ifb5483c55b172d3553deb80dbe27f2204b86ecdb
ediametadataretriever.cpp
7281aa9810b33eff47b00104db26c97c77931611 18-Feb-2016 Jean-Michel Trivi <jmtrivi@google.com> Send client / device format in recording callback

Bug 26798796

Change-Id: Ib4f64159c8371d87da49a8f0cad9317a87d843c4
udioSystem.cpp
AudioPolicyServiceClient.cpp
af9c466b91eb43ffa4590b559fa8bb1003191ab5 23-Feb-2016 Marco Nelissen <marcone@google.com> Clear allocation to avoid info leak am: f7a388203a am: 33514675f6 am: 776aacce9e am: 9a7fc24946 am: d132bc5b0b am: 46b4f09573 am: 7786bd9376 am: 313d9f14e4 am: 1e780d3e34 am: 543df24fad
am: bb1f77e5dd

* commit 'bb1f77e5dd10b68a8169aa6372bfbd29b44509b0':
Clear allocation to avoid info leak
1c9ba65e447104bfcdbe0cb16a9f3cc5bad2da39 23-Feb-2016 Max Spector <mspector@google.com> Merge "Fixing safteynet logging bug introduced in ag/862848" into mnc-dev am: 93edd483f6 am: 032fcf3034 am: c802d2091a
am: 81b6cc61f0

* commit '81b6cc61f0bef255f725ec9e56659d1caba227c2':
Fixing safteynet logging bug introduced in ag/862848
1e780d3e34df347243fe28c3d2abe10d44e4e8e4 23-Feb-2016 Marco Nelissen <marcone@google.com> Clear allocation to avoid info leak am: f7a388203a am: 33514675f6 am: 776aacce9e am: 9a7fc24946 am: d132bc5b0b am: 46b4f09573 am: 7786bd9376
am: 313d9f14e4

* commit '313d9f14e4140bacc52b27972abc0c65d4e91fdc':
Clear allocation to avoid info leak
313d9f14e4140bacc52b27972abc0c65d4e91fdc 23-Feb-2016 Marco Nelissen <marcone@google.com> Clear allocation to avoid info leak am: f7a388203a am: 33514675f6 am: 776aacce9e am: 9a7fc24946 am: d132bc5b0b am: 46b4f09573
am: 7786bd9376

* commit '7786bd9376f34b23db9a67aae16368fb1851fe34':
Clear allocation to avoid info leak
7786bd9376f34b23db9a67aae16368fb1851fe34 23-Feb-2016 Marco Nelissen <marcone@google.com> Clear allocation to avoid info leak am: f7a388203a am: 33514675f6 am: 776aacce9e am: 9a7fc24946 am: d132bc5b0b
am: 46b4f09573

* commit '46b4f09573deb213b647023771ec1552733c223a':
Clear allocation to avoid info leak
d132bc5b0bc15152f7acf769408c55da7a5b31f7 23-Feb-2016 Marco Nelissen <marcone@google.com> Clear allocation to avoid info leak am: f7a388203a am: 33514675f6 am: 776aacce9e
am: 9a7fc24946

* commit '9a7fc2494687c026e592e5c88cc4f363f2186241':
Clear allocation to avoid info leak
776aacce9e5e2dfbc4e7a955916ea0d397af74bf 23-Feb-2016 Marco Nelissen <marcone@google.com> Clear allocation to avoid info leak am: f7a388203a
am: 33514675f6

* commit '33514675f6588d70a203b2c9200792bca18d425c':
Clear allocation to avoid info leak
33514675f6588d70a203b2c9200792bca18d425c 23-Feb-2016 Marco Nelissen <marcone@google.com> Clear allocation to avoid info leak
am: f7a388203a

* commit 'f7a388203a1632084dbe3307d7e3265f689bc11e':
Clear allocation to avoid info leak
032fcf3034b79ea2a221d73c9f01202a4a709273 23-Feb-2016 Max Spector <mspector@google.com> Merge "Fixing safteynet logging bug introduced in ag/862848" into mnc-dev
am: 93edd483f6

* commit '93edd483f645fe30cc508ade82ea1ffe60e74cbb':
Fixing safteynet logging bug introduced in ag/862848
93edd483f645fe30cc508ade82ea1ffe60e74cbb 23-Feb-2016 Max Spector <mspector@google.com> Merge "Fixing safteynet logging bug introduced in ag/862848" into mnc-dev
c085a757a28f36bdefeee1775fdbdce869c4c1f5 23-Feb-2016 Andy Hung <hunga@google.com> Merge "Implement server side playback timestamps with 64 bit accuracy" into nyc-dev
798cfff899ebf53d769cc2de1e650c5ba49821ae 23-Feb-2016 Jeff Tinker <jtinker@google.com> Merge "Fix info leak vulnerability of IDrm" into mnc-dev am: 56ffb6e7b1 am: 0708170e10 am: 96ddf53162
am: 58a982d1c7

* commit '58a982d1c7a316d1bb8fade837664a412241ba8a':
Fix info leak vulnerability of IDrm
012883fdf691b1e9dcaf769b8dfe948af1b12a38 23-Feb-2016 Marco Nelissen <marcone@google.com> Merge "Move (some) codecs into the codec process" into nyc-dev
0708170e10aa05f8ce590bb9daa23d770e57b130 23-Feb-2016 Jeff Tinker <jtinker@google.com> Merge "Fix info leak vulnerability of IDrm" into mnc-dev
am: 56ffb6e7b1

* commit '56ffb6e7b1e30dccf098a17843456870d4d48c86':
Fix info leak vulnerability of IDrm
56ffb6e7b1e30dccf098a17843456870d4d48c86 23-Feb-2016 Jeff Tinker <jtinker@google.com> Merge "Fix info leak vulnerability of IDrm" into mnc-dev
f7a388203a1632084dbe3307d7e3265f689bc11e 22-Feb-2016 Marco Nelissen <marcone@google.com> Clear allocation to avoid info leak

Bug: 26914474
Change-Id: Ie1a86e86d78058d041149fe599a4996e7f8185cf
OMX.cpp
fcf5720ddba1bb9468fc9e3af6ef31a34ed4bfa5 22-Feb-2016 mspector@google.com <mspector@google.com> IOMX.cpp uninitialized pointer in BnOMX::onTransact am: 9d72eb0682 am: bbcb1f0e2f am: 6dcf6ba111 am: 35501e45b2 am: 88b6660083 am: 22d12769b3 am: 7d4d66e605 am: 3c6a1fe754
am: aef546b8f7

* commit 'aef546b8f79e9a9252005b60122899cf5f8af67c':
IOMX.cpp uninitialized pointer in BnOMX::onTransact
7d4d66e605ba240068928d6618b20846d2d9618d 22-Feb-2016 mspector@google.com <mspector@google.com> IOMX.cpp uninitialized pointer in BnOMX::onTransact am: 9d72eb0682 am: bbcb1f0e2f am: 6dcf6ba111 am: 35501e45b2 am: 88b6660083
am: 22d12769b3

* commit '22d12769b3b1295f62d02086fc828b0a614b8da6':
IOMX.cpp uninitialized pointer in BnOMX::onTransact
22d12769b3b1295f62d02086fc828b0a614b8da6 22-Feb-2016 mspector@google.com <mspector@google.com> IOMX.cpp uninitialized pointer in BnOMX::onTransact am: 9d72eb0682 am: bbcb1f0e2f am: 6dcf6ba111 am: 35501e45b2
am: 88b6660083

* commit '88b6660083fb2d7c6d4a79668fbf2def625e1df6':
IOMX.cpp uninitialized pointer in BnOMX::onTransact
88b6660083fb2d7c6d4a79668fbf2def625e1df6 22-Feb-2016 mspector@google.com <mspector@google.com> IOMX.cpp uninitialized pointer in BnOMX::onTransact am: 9d72eb0682 am: bbcb1f0e2f am: 6dcf6ba111
am: 35501e45b2

* commit '35501e45b25020f4f79187125acec881a581520c':
IOMX.cpp uninitialized pointer in BnOMX::onTransact
6dcf6ba1111f43161a634cfa767a196f96ba9b7d 22-Feb-2016 mspector@google.com <mspector@google.com> IOMX.cpp uninitialized pointer in BnOMX::onTransact am: 9d72eb0682
am: bbcb1f0e2f

* commit 'bbcb1f0e2fdd8967b9f3d185fcd135028d032167':
IOMX.cpp uninitialized pointer in BnOMX::onTransact
1a19076c36cbe76a537b5742e96747135b4f0d46 19-Feb-2016 mspector@google.com <mspector@google.com> Fixing safteynet logging bug introduced in ag/862848

We moved the safteynet logging into storeMetaDataInBuffers_l
Bug: 26324358
Change-Id: I2171742b53192ebb71d546bcb8970bb3c68f366f
OMX.cpp
818e7a32ce3633980138aff2c2bfcc5158b3cfcc 17-Feb-2016 Andy Hung <hunga@google.com> Implement server side playback timestamps with 64 bit accuracy

Provide server timestamps if the HAL doesn't provide it.
Provide monotonic - boottime translation.
Integrate record timestamps and playback timestamps together.

Bug: 17472992
Bug: 22871200
Bug: 26400089
Bug: 26682703
Change-Id: If1974f94232fcce7ba0bbcdf63d9e54ed51918ff
udioTrack.cpp
cf1bbf3a12be653b825e230fd2785c14cd9b0192 19-Feb-2016 Andy Hung <hunga@google.com> Merge "Enable FastTrack timestamps" into nyc-dev
56d65dc0b4574b1d29132b25c90c83a8fb203c9e 19-Feb-2016 Wei Jia <wjia@google.com> Merge "IMediaSource: use shared memory to transfer large buffer." into nyc-dev
c3ed9d0c761344b89d2b347bf384239ef5237d29 19-Feb-2016 mspector@google.com <mspector@google.com> resolve merge conflicts of a913e76d37 to nyc-dev

Change-Id: I5612bdd49f175276aa8a44db8ba74e8452656e50
e9a5b96e7927fd4e38623e17ac73e8e4e25877ee 12-Feb-2016 Wei Jia <wjia@google.com> IMediaSource: use shared memory to transfer large buffer.

Also move MediaBufferGroup to libstagefright/foundation/.

Bug: 26295488
Change-Id: I88f4e6bf83ffb2b196628a2d4d83ea7b1f6ad9c2
MediaSource.cpp
cc2c4c128fdddcc693714e9fc41feddacc0fdcdc 19-Feb-2016 mspector@google.com <mspector@google.com> 3 uninitialized variables in IOMX.cpp
am: da9ca91ffd

* commit 'da9ca91ffd3727aca2ee8ae60cbe9fa3b0873cc5':
3 uninitialized variables in IOMX.cpp
6ae5843c281301a9ffd1059d185620a9337e15a2 17-Feb-2016 Andy Hung <hunga@google.com> Enable FastTrack timestamps

Bug: 26413951
Change-Id: Id54c32cb0f0be83d443f6cf1007181ebc461c586
udioTrack.cpp
udioTrackShared.cpp
da9ca91ffd3727aca2ee8ae60cbe9fa3b0873cc5 09-Feb-2016 mspector@google.com <mspector@google.com> 3 uninitialized variables in IOMX.cpp

Uninitialized MetadataBufferType pointer in case:
SET_INPUT_SURFACE
STORE_META_DATA_IN_BUFFERS
CREATE_INPUT_SURFACE

Fix: initialize them to kMetadataBufferTypeInvalid

Bug: 26324358
Change-Id: Ib3bcac9bedc98bc65efa39f67cdbffbd90b374c9
OMX.cpp
23858874bbce68fb5ac83250087fa7788c97dd12 17-Feb-2016 Marco Nelissen <marcone@google.com> Move (some) codecs into the codec process

Encoders and secure decoders still run in the mediaserver, while
all other codecs run in a separate codec process.

Bug: 22775369

Change-Id: Ie2ac87d53edbcf7c8f46a68a15857c9940f6d00d
OMX.cpp
9ac86b3cae9a1e14b12bf97223ddde96142aae43 24-Jan-2016 Jeff Tinker <jtinker@google.com> stagefright: ICrypto: enable passing secure buffers in native_handle

Previously secure buffers were passed as opaque
void * values, which no longer works since
mediadrmserver is now a separate process from
mediaserver.

Bug: 22990512
Change-Id: I5c458ba19e78e20d1bd5a5899df0bce16f71bfd8
Crypto.cpp
a63141af8f036bda0b8f7800107ca8a0e0623135 12-Feb-2016 Lajos Molnar <lajos@google.com> stagefright: enable native handles for secure buffers

- rename IOMX::allocateBuffer to allocateSecureBuffer as ACodec
only uses allocateBuffer for secure compressed buffers.
- add argument to return native_handle if component supports it.
- rename IOMX::enableGraphicBuffers to enableNativeBuffers.
- add argument to select graphic vs. native handle mode
- request native handles for secure input buffers, but allow
fallback

Bug: 26782004
Change-Id: Ide9d07f54d2e7e3e6a82dbca011f4db9a5630950
OMX.cpp
8ce8e264d0bf09ec131e4a7701fe1ebc3a678f8b 16-Feb-2016 Eric Laurent <elaurent@google.com> Revert "Enable FastTrack timestamps"

This reverts commit b3a486fecddc9e9264fe63d356eca0812493db27.

Reverting while investigating the root cause.

Bug: 27186414
udioTrack.cpp
a69729dc76b97c44387088d351480d5d0701517e 12-Feb-2016 Jeff Tinker <jtinker@google.com> Add mediadrm service

Part of media security hardening

This is an intermediate step toward moving
mediadrm to a new service separate from mediaserver.
This first step allows mediadrmservice to run based
on the system property media.mediadrmservice.enable
so it can be selectively enabled on devices that
support using native_handles for secure buffers.

bug: 22990512
Change-Id: I70320f0c4b7861cdba26fbc24c20bce54e5749a4
ndroid.mk
MediaDrmService.cpp
b0a144d705a021994628d136a170a6d2bd4282e7 12-Feb-2016 Phil Burk <philburk@google.com> Merge "AudioTrack: support ENCODING_IEC61937" into nyc-dev
0a4427bb91e72a4dfece276521d7f21fbb6c7846 12-Feb-2016 Lajos Molnar <lajos@google.com> stagefright: use MediaCodec::QueryCapabilities

This reverts commit cfb71f189ca620b7b2caf213572849bf59b50231
and still fixes b/27142863.

Bug: 27142863
Change-Id: I914bcc882d5f9049bc9eb8b31913b07ae572b441
ediaCodecInfo.cpp
661c5953f54848a37a012d9106af00e61bb98e08 12-Feb-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Dynamic audio policies on UID" into nyc-dev
fdb3c07db5d44535eb8c3ec46dc78ad8446c01eb 09-Feb-2016 Phil Burk <philburk@google.com> AudioTrack: support ENCODING_IEC61937

Set DIRECT flag.
Use audio_has_proportional_frames() instead of audio_is_linear_pcm()
where appropriate.

Bug: 24541671
Bug: 20891646
Bug: 26373761
Change-Id: Ia32036b18683b084d6c9887593df87397ea0afd9
Signed-off-by: Phil Burk <philburk@google.com>
udioTrack.cpp
b3a486fecddc9e9264fe63d356eca0812493db27 05-Aug-2015 Andy Hung <hunga@google.com> Enable FastTrack timestamps

Bug: 26413951
Change-Id: I99a69241a0bcd69f6bfebf785cac6d9ee1e2cd5f
udioTrack.cpp
7f2262fc7d038a0d42def7d769bb9e816e292785 11-Feb-2016 Lajos Molnar <lajos@google.com> stagefright: use OMXCodec's QueryCodec for capabilities

Bug: 27142863
Change-Id: Ica00f5395477a416e1ca4db2697310eef3d635a0
ediaCodecInfo.cpp
e8decedb429ed76dfa84cdb3e80ab3b969e77298 11-Feb-2016 Jean-Michel Trivi <jmtrivi@google.com> Dynamic audio policies on UID

When looking for an output, take attributes and UID into account.
To find the matching mix: for each mix
- inspect which rules are used
- find a candidate mix for usage
- check UID compatibility
Rename AttributeMatchCriterion to AudioMixMatchCriterion to be consistent
with the fact that now mixing rules are not always about audio attributes.

Bug 26798796

Change-Id: I1520b0df190a98f197ea8e0144b770e1e6d97888
udioPolicy.cpp
69bebe8d87e95a026d14f0a7cd68d8f954dc51c8 11-Feb-2016 Lajos Molnar <lajos@google.com> MediaCodecInfo: keep capabilities from XML when updating them from codec

Bug: 27115490
Change-Id: Ie15bf538a3026829ff8029fb8b96b8d254517d1c
ediaCodecInfo.cpp
3f0c902beb53a245c9db35e871607dba05b8d391 16-Jan-2016 Andy Hung <hunga@google.com> Add AudioRecord timestamps

Bug: 13569372
Bug: 22886739
Change-Id: Ibc81afefb733d23676a632a0f2da31163fdbe05f
udioRecord.cpp
udioTrackShared.cpp
6665703177d33f69007a0877de46431b90e8726b 10-Feb-2016 Lajos Molnar <lajos@google.com> Merge "stagefright: Move CodecCapabilities querying into MediaCodec" into nyc-dev
1900e77bac4276f247f80fd06d19316cac598f57 03-Feb-2016 Marco Nelissen <marcone@google.com> Run codecs in a separate process

Encoders and secure decoders still run in the mediaserver, while
all other codecs run in a separate codec process.

Bug: 22775369

Change-Id: Ifbcab8a8f2fe77d2567830ac88f0d982e77f7b00
ndroid.mk
MediaCodecService.cpp
8aff7771bf6f4230a0bf9b548c874e139e133686 09-Feb-2016 Jeff Tinker <jtinker@google.com> Fix info leak vulnerability of IDrm

bug: 26323455
Change-Id: I25bb30d3666ab38d5150496375ed2f55ecb23ba8
Drm.cpp
5b05e49e6550cb2abf1a88272d6cd460b8957176 05-Feb-2016 Lajos Molnar <lajos@google.com> stagefright: Move CodecCapabilities querying into MediaCodec

1. We cannot assume that codecs are OMX based
2. We still have a strange dependency where MediaCodec's
create methods depend on MediaCodecList, which depends on
MediaCodec's static method. This is to be untangled later.

Bug: 17108024
Change-Id: Idd619ee959627539a65f5f7da586108883dcb5f2
ediaCodecInfo.cpp
9d72eb068206ecdd212679c9649e93309f1f76bc 08-Feb-2016 mspector@google.com <mspector@google.com> IOMX.cpp uninitialized pointer in BnOMX::onTransact

This can lead to local code execution in media server.
Fix initializes the pointer and checks the error conditions before
returning

Bug: 26403627
Change-Id: I7fa90682060148448dba01d6acbe3471d1ddb500
OMX.cpp
7ee3db58449dde22652be3c056f488b24b5fb14d 30-Jan-2016 Eric Laurent <elaurent@google.com> Merge "AudioTrack: fix ClientProxy::obtainBuffer() size clamping"
bdd8101cd487cdfe36726aa0d78c24008c35d605 30-Jan-2016 Eric Laurent <elaurent@google.com> AudioTrack: fix ClientProxy::obtainBuffer() size clamping

Fix data cast in comparison that can cause large unsigned values to
be considered small negative values, causing a wrong buffer size
calculation.

Change-Id: I3b7d4326659c38e744338b5d1ae456c859c89abf
udioTrackShared.cpp
b3e5bbedff47b33baab6389b173e854e36e82bdb 29-Jan-2016 Glenn Kasten <gkasten@google.com> Merge "Remove TimedAudioTrack and associated code"
254012a040733ec2476171d311005168810d1d01 28-Jan-2016 Marco Nelissen <marcone@google.com> Merge "Revert "Run codecs in a separate process""
260e56c9a17737bf280d776797d6dee411c9b4da 28-Jan-2016 Marco Nelissen <marcone@google.com> Revert "Run codecs in a separate process"

This reverts commit 4f12d94fc26df1d0c7a566792711b8863fd39fe9.

Change-Id: Ic850a950119a45efd3042f40147253b37c328853
ndroid.mk
MediaCodecService.cpp
MediaPlayerService.cpp
2b7893250228abb63dd7ca577d8c7769dcff2344 28-Jan-2016 Wei Jia <wjia@google.com> Merge "IDataSource: add getFlags() to expose DataSource::flags()."
10551fcd58b3807fc7351d88e6127ec227b993d1 27-Jan-2016 Wei Jia <wjia@google.com> IDataSource: add getFlags() to expose DataSource::flags().

This will let MPEG4Extractor cache stbl data. Therefore it can avoid data
flushing in data source (NuCachedSource2) due to reading stbl and access
unit data alternatively when the stream is larger than max cache size.

Bug: 26533748
Change-Id: Ia534755ab9130e4dcee94d53ca3c933d1b9eb566
DataSource.cpp
26736fd21faada79c4fb91cb6ef91582c113e9eb 27-Jan-2016 Marco Nelissen <marcone@google.com> Merge "Run codecs in a separate process"
d79072e9dff59f767cce2cda1caab80ce5a0815b 06-Jan-2016 Glenn Kasten <gkasten@google.com> Remove TimedAudioTrack and associated code

Bug: 8278435
Change-Id: I095c1a4888e645e14d93b0b15fbef4524a831ca1
udioTrack.cpp
AudioTrack.cpp
4f12d94fc26df1d0c7a566792711b8863fd39fe9 16-Dec-2015 Marco Nelissen <marcone@google.com> Run codecs in a separate process

For now this only runs decoders and Google encoders in the codec process.

Bug: 22775369
Change-Id: Iadd8b6bc2873ddcfaee3e68866642ba74c6949aa
ndroid.mk
MediaCodecService.cpp
MediaPlayerService.cpp
9aa87d4ef502c9700a31fe46dc6e1d6f99cf4e5e 07-Dec-2015 Wonsik Kim <wonsik@google.com> stagefright: add HEVC support to MediaRecorder

Bug: 22879917
Change-Id: I6c97b051467de44c506a8ff021321e5953a63fc3
ediaProfiles.cpp
bbe98f009fc2c3181a8d4ab71b3e145f76c01755 17-Jan-2016 Phil Burk <philburk@google.com> Merge "AudioTrack: Add getUnderrunCount()"
27e583ba1d0d4fdc11d6eeee0c416e727045cbbc 17-Jan-2016 Phil Burk <philburk@google.com> Merge "AudioTrack: add setBufferSizeInFrames()"
33ff89ba94a527e4293ee5349da01483252d5c83 30-Nov-2015 Phil Burk <philburk@google.com> AudioTrack: lower Java latency

Add AUDIO_FLAG_LOW_LATENCY to enable Fast track.

Change-Id: Ib1bff635afaa57af7754cb751b57c6afc4c2ab2b
Bug: 21019153
Signed-off-by: Phil Burk <philburk@google.com>
udioTrack.cpp
c0adecb800b197cb8c028513130ebabf2d0f37ba 08-Jan-2016 Phil Burk <philburk@google.com> AudioTrack: add setBufferSizeInFrames()

Also add getBufferCapacityInFrames().
These can be used to dynamically raise or lower latency.

Bug: 21019153
Signed-off-by: Phil Burk <philburk@google.com>
Change-Id: I02ca7f6f5cc4e089fcd81cc8a2b6ff234e0381a8
udioTrack.cpp
udioTrackShared.cpp
2812d9ea3a3a33142dd8e23c9d949c498d6f7a12 04-Jan-2016 Phil Burk <philburk@google.com> AudioTrack: Add getUnderrunCount()

This allows an app to detect application-level output glitches.
Underrun counts survive track recreation.

Change-Id: I8eb14e92f6fc1007718a29b0666ab51ace30cdb8
Bug: 25641253
Signed-off-by: Phil Burk <philburk@google.com>
udioTrack.cpp
udioTrackShared.cpp
0ca02a0c2c77bf88aa7d7b7c3ec04f9153ddce93 14-Jan-2016 Wei Jia <wjia@google.com> IMediaPlayer: NULL pointer is valid for httpService in some cases.

Bug: 26524606
Change-Id: Ib3323618f9bb8883e8a398c62975a0cc278c64a3
MediaPlayer.cpp
c16bf1d9e8ccdd27327e988d50f5b9640e5406f8 13-Jan-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "AudioPolicy: callback for recording configuration change"
31fc66042d4241f443ebbd2c7b37946edf35b8e9 12-Jan-2016 Jeff Tinker <jtinker@google.com> Merge "Support AES-CBC sample encryption in MediaDrm"
18cb1eca504817b5b144a023ae2792d90e74c9a5 18-Dec-2015 Jeff Tinker <jtinker@google.com> Support AES-CBC sample encryption in MediaDrm

bug:23719082
Change-Id: I3028452f315122b65296881aed1fbf66c3ceeebc
Crypto.cpp
2f4fe9f7df8f22c6bc8745407d19df73128810ec 05-Dec-2015 Jean-Michel Trivi <jmtrivi@google.com> AudioPolicy: callback for recording configuration change

Each AudioSession tracks start / end of recording, and sends
a callback to AudioSystem.
AudioSystem tracks a single recording callback tracking
input source and audio session number.

Change-Id: Ic065751d9ba013e03f2a6ad8dde02542e5465ec0
udioSystem.cpp
AudioPolicyServiceClient.cpp
59950b403076a94828668902d30215ac5a733902 20-Aug-2014 Glenn Kasten <gkasten@google.com> Remove unused ClientProxy::getFramesFilled()

Change-Id: Ib3cf5a6b61572a1bff89bdd62262fdcf9f09aedc
udioTrackShared.cpp
64f1901bdddf464c8f29bed34e3449762873b3e9 09-Jan-2016 Andy Hung <hunga@google.com> Merge "Add setMasterMono and getMasterMono"
2ddee19245641e86bca436dda23a0f5089bf2ab5 19-Dec-2015 Andy Hung <hunga@google.com> Add setMasterMono and getMasterMono

Bug: 15283594
Bug: 22700363
Change-Id: I32dc1fcecf285967a61bd508af3bb299595db57d
udioSystem.cpp
AudioPolicyService.cpp
53e142a0ee3cf18bcc4a88761bd771c5d4eff65f 08-Jan-2016 Wei Jia <wjia@google.com> Merge "libmedia: check NULL pointer at binder receiver side."
2afac0c7c42560ff5b8f133c6074b7e023279d6d 07-Jan-2016 Wei Jia <wjia@google.com> libmedia: check NULL pointer at binder receiver side.

Change-Id: I464da96f3d6081dd8c3cc2fd977e2b96f5d477bb
Crypto.cpp
MediaCodecList.cpp
MediaMetadataRetriever.cpp
MediaPlayer.cpp
MediaPlayerService.cpp
ResourceManagerService.cpp
StreamSource.cpp
56c95c9bee23aec674348e06c4385e63ac6123bc 06-Jan-2016 Wei Jia <wjia@google.com> IOMX: check parameters on binder receiver side.

Bug: 26392700
Change-Id: I92c93718bbc1bcb366a051af3bdfbbe06c8701e6
OMX.cpp
d958855ff2f7c05672b5278437ee0d177270d24d 19-Dec-2015 Glenn Kasten <gkasten@android.com> Merge "libmedia: Preserve futex return status in client obtainBuffer" am: 7253644736
am: 6dd49c56bf

* commit '6dd49c56bffc0de2c0e67f1e9b20304d8206afa0':
libmedia: Preserve futex return status in client obtainBuffer
6dd49c56bffc0de2c0e67f1e9b20304d8206afa0 19-Dec-2015 Glenn Kasten <gkasten@android.com> Merge "libmedia: Preserve futex return status in client obtainBuffer"
am: 7253644736

* commit '7253644736198864a1f2fe95788e7eb41ecc2428':
libmedia: Preserve futex return status in client obtainBuffer
b463da8e499149c7230b8dbd839bb7bc8ece602f 15-Dec-2015 Leena Winterrowd <lenhardw@codeaurora.org> libmedia: Preserve futex return status in client obtainBuffer

clock_gettime() can change errno if something goes wrong (most
commonly setting EBADF). This failure should not cause a failure
in ClientProxy::obtainBuffer() if the futex returned successfully
or with a known status. Preserve errno before calling clock_gettime
to prevent propagation of an invalid, unexpected error.

authored-by: Leena Winterrowd <lenhardw@codeaurora.org>

Change-Id: Ib69201031a81395ece47dd8ad7c4dcddd2b00153
udioTrackShared.cpp
44333e51c62643e7581022495a2a1f410dd62e27 15-Dec-2015 Marco Nelissen <marcone@google.com> Merge "MediaSource: use shared memory for transferring larger buffers"
e9d5ae1e105e46a4cad323f667a851e638294c32 10-Dec-2015 Jeff Tinker <jtinker@google.com> Merge "Fix security vulnerability in ICrypto DO NOT MERGE" into mnc-dev am: 89bec04cf8 am: f797a48b4c am: 3f05f30117
am: 007064a8ca

* commit '007064a8caae76cc17e883ece4c9f361cb6a7429':
Fix security vulnerability in ICrypto DO NOT MERGE
f797a48b4ceaef56402ecd942ccdebab394daad0 10-Dec-2015 Jeff Tinker <jtinker@google.com> Merge "Fix security vulnerability in ICrypto DO NOT MERGE" into mnc-dev
am: 89bec04cf8

* commit '89bec04cf83598b1868f3f969c220c3200028e03':
Fix security vulnerability in ICrypto DO NOT MERGE
6ca0256a1dcd85e1fa0a535347a9f0ecc57e284d 09-Dec-2015 Jeff Tinker <jtinker@google.com> Remove unused MediaDrm.unprovisionDevice

bug:25726218
Change-Id: I6eb0ceb488c66c191897b3c190f5da1d71880c77
Drm.cpp
4aeee811662bdb8f6f4b24884d62780deb7ca1c6 08-Dec-2015 Jeff Tinker <jtinker@google.com> Merge "Fix security vulnerability in ICrypto"
d00a17d24d888dd1f6d245fbe6425865e6f56894 07-Dec-2015 Andy Hung <hunga@google.com> Merge "Check for non-negative fd before close, dup, lseek, or read."
b20688e7e87e99ab1ee106af043ce0cbb40bde5d 05-Dec-2015 Andy Hung <hunga@google.com> Check for non-negative fd before close, dup, lseek, or read.

Bug: 24896328
Change-Id: Idd8da8cf202f51f42d0a81421a91768ec3d5f025
idiIoWrapper.cpp
22f824feac43d5758f9a70b77f2aca840ba62c3b 05-Dec-2015 Jeff Tinker <jtinker@google.com> Fix security vulnerability in ICrypto DO NOT MERGE

b/25800375

Change-Id: I03c9395f7c7de4ac5813a1207452aac57aa39484
Crypto.cpp
bb4877d143c6c7ec9b42e3c490fed58af4f39dea 05-Dec-2015 Jeff Tinker <jtinker@google.com> Fix security vulnerability in ICrypto

b/25800375

Change-Id: I03c9395f7c7de4ac5813a1207452aac57aa39484
Crypto.cpp
208bc477d92dbd2e5b4d1c0b2d000fa4c231e9d3 03-Dec-2015 Andy Hung <hunga@google.com> DO NOT MERGE SoundPool: add lock for findSample access from SoundPoolThread
am: 3d6a714980

* commit '3d6a7149802928ecf3f58b7218b0e82699b492df':
DO NOT MERGE SoundPool: add lock for findSample access from SoundPoolThread
469826c69810c24f2e90291182c8501e76be31f0 03-Dec-2015 Andy Hung <hunga@google.com> Merge "Use modulo position variables in AudioTrack and AudioRecord"
3d6a7149802928ecf3f58b7218b0e82699b492df 03-Dec-2015 Andy Hung <hunga@google.com> DO NOT MERGE SoundPool: add lock for findSample access from SoundPoolThread

Sample decoding still occurs in SoundPoolThread
without holding the SoundPool lock.

Bug: 25781119
Change-Id: I11fde005aa9cf5438e0390a0d2dfe0ec1dd282e8
oundPool.cpp
19c47afbc402542720ddd280e1bbde3b2277b586 03-Dec-2015 Andy Hung <hunga@google.com> DO NOT MERGE SoundPool: add lock for findSample access from SoundPoolThread

Sample decoding still occurs in SoundPoolThread
without holding the SoundPool lock.

Bug: 25781119
Change-Id: I11fde005aa9cf5438e0390a0d2dfe0ec1dd282e8
oundPool.cpp
90e8a97dd5c9d391d7a2ea6a2290ed976f928379 10-Nov-2015 Andy Hung <hunga@google.com> Use modulo position variables in AudioTrack and AudioRecord

More type safety, plus correct treatment for sanitization.

Bug: 25569906
Bug: 25232421
Change-Id: Id852277b81a1792c5e67392cd74bc39cba7ed1ad
udioRecord.cpp
udioTrack.cpp
b65990f4a0cf01db0b9f21c68fcf8824ae03a178 10-Nov-2015 Marco Nelissen <marcone@google.com> MediaSource: use shared memory for transferring larger buffers

For small buffers we still copy the data as part of the binder transaction,
since that saves one extra binder call, but for buffers > 64KB we now use
shared memory.

Change-Id: I19aad7ea7f6104991b9b6b4f24ea880b54f739be
MediaExtractor.cpp
MediaSource.cpp
c22c00c82fa37e2c567c1d4976c133bbd46831a0 12-Nov-2015 Marco Nelissen <marcone@google.com> Fix possible media extractor service crash

Change-Id: I7501eee0d375745243a9e9acceacd526b6f322b7
MediaExtractorService.cpp
8c6161382fc602322f5eefe8c88f50f79b612b85 09-Nov-2015 Chad Brubaker <cbrubaker@google.com> Merge "Whitelist getTimestamp from integer sanitization" am: 51cd9a441e am: 7095f87656
am: bf24de292a

* commit 'bf24de292afd24c288e5522f1d0082c9fb7ec268':
Whitelist getTimestamp from integer sanitization
7095f876565f8c52bafe02e7c6ba04aa0c274dfa 09-Nov-2015 Chad Brubaker <cbrubaker@google.com> Merge "Whitelist getTimestamp from integer sanitization"
am: 51cd9a441e

* commit '51cd9a441ed0acf6e3b9c221e9b7f9424073191f':
Whitelist getTimestamp from integer sanitization
ec3806a8be1a014631b39df59edd596f8eb5be01 09-Nov-2015 Chad Brubaker <cbrubaker@google.com> Whitelist getTimestamp from integer sanitization

The timestamp math relies on modulo 32 bit math, whitelist this function
for now until we can find a better way to tackle this.

Bug: 25490803
Change-Id: I3e2b19db023b4622f5884933feab96363756e8c6
udioTrack.cpp
fbf3beaf09c2f3ceff2c3fb34197cb05daededa6 28-Oct-2015 Dan Austin <danielaustin@google.com> Merge "Refactor setPlaybackRate to avoid benign unsigned integer overflow." am: a38594e92f am: 9b698dcfb4
am: 3845ba35a0

* commit '3845ba35a0bf364f30bd46029b89e7b5fff28793':
Refactor setPlaybackRate to avoid benign unsigned integer overflow.
3845ba35a0bf364f30bd46029b89e7b5fff28793 28-Oct-2015 Dan Austin <danielaustin@google.com> Merge "Refactor setPlaybackRate to avoid benign unsigned integer overflow." am: a38594e92f
am: 9b698dcfb4

* commit '9b698dcfb41cbadd4a21d09eede0de672912959d':
Refactor setPlaybackRate to avoid benign unsigned integer overflow.
9b698dcfb41cbadd4a21d09eede0de672912959d 28-Oct-2015 Dan Austin <danielaustin@google.com> Merge "Refactor setPlaybackRate to avoid benign unsigned integer overflow."
am: a38594e92f

* commit 'a38594e92fea7f88c5edad98a4992b5f1b688436':
Refactor setPlaybackRate to avoid benign unsigned integer overflow.
e34eae2de7bd6dcba5dea132dabb09f63ac46adc 28-Oct-2015 Dan Austin <danielaustin@google.com> Refactor setPlaybackRate to avoid benign unsigned integer overflow.

There is a check that results in a benign unsigned integer overflow.
This has been refactored to avoid the unsigned integer overflow.

Bug: 25327431
Change-Id: Ib112a7cd585c680f13e4bee3d7e9f45da7d66f1d
udioTrack.cpp
b2487f03f12dcafdb801fc0007c8df8412397f44 01-Sep-2015 Marco Nelissen <marcone@google.com> Extractor service

Run extractors in a separate process. Currently all data is copied through a
binder transaction, and WVMExtractor is still run in the mediaserver process.

Change-Id: Ic5dbce87126dd321ad792f4dd540c2ff6b068d13
ndroid.mk
MediaExtractor.cpp
MediaExtractorService.cpp
MediaSource.cpp
3da23b29af4b920d1bd99c097195409f0fabb83b 24-Oct-2015 Andy Hung <hunga@google.com> AudioRecord: Treat marker position similar to AudioTrack

A similar change to AudioTrack fixed a race condition.

Bug: 24744966
Change-Id: I1f05cb7c27b499a58663002a885628df149d7a80
udioRecord.cpp
3806ff2f2021074e7c1fe3784ee8a12e0d042a82 23-Oct-2015 Glenn Kasten <gkasten@google.com> Merge "Workaround for busy wait bug" into mnc-dr-dev am: d34cf6d95c am: 6a92190261
am: 2eb225313d

* commit '2eb225313de241d02979c66e2730983901ad05ea':
Workaround for busy wait bug
2eb225313de241d02979c66e2730983901ad05ea 23-Oct-2015 Glenn Kasten <gkasten@google.com> Merge "Workaround for busy wait bug" into mnc-dr-dev am: d34cf6d95c
am: 6a92190261

* commit '6a9219026124f9075c03a861101cea985f01cdce':
Workaround for busy wait bug
606fbc1030d686bf1f8dc03d14a79342aca2ca41 23-Oct-2015 Glenn Kasten <gkasten@google.com> Workaround for busy wait bug

Underlying bug 25195759 is not yet fixed.

Bug: 24263351
Change-Id: I04b644246640054d38c8de79e0eb80fcbfef0e48
udioTrack.cpp
f1d250c4f18c48773cecde827b79bfb1b2c597d5 14-Oct-2015 Chad Brubaker <cbrubaker@google.com> am 6de80056: am f73c329e: am 5e925e02: Merge "Enable integer overflow sanitization in libmedia"

* commit '6de80056ea916624a7b3e264749249ed1ab82725':
Enable integer overflow sanitization in libmedia
6de80056ea916624a7b3e264749249ed1ab82725 14-Oct-2015 Chad Brubaker <cbrubaker@google.com> am f73c329e: am 5e925e02: Merge "Enable integer overflow sanitization in libmedia"

* commit 'f73c329e5e0b8b8e260ed59c6a50860f543189e4':
Enable integer overflow sanitization in libmedia
f73c329e5e0b8b8e260ed59c6a50860f543189e4 14-Oct-2015 Chad Brubaker <cbrubaker@google.com> am 5e925e02: Merge "Enable integer overflow sanitization in libmedia"

* commit '5e925e02093bdf5ed07655acaa0456082dba3638':
Enable integer overflow sanitization in libmedia
77cce44fd360e4bd47ad3427ea14beb15b515d24 14-Oct-2015 Glenn Kasten <gkasten@google.com> am 0aa9146d: am 8fa0848c: Merge "For static obtainBuffer(), do not set mUnreleased if acknowledging flush." into mnc-dr-dev

* commit '0aa9146d7cf84e00958f8758564b161395d44bfe':
For static obtainBuffer(), do not set mUnreleased if acknowledging flush.
c67c65882f7cf1d3ae617bff41ff9c7ec8a0fd27 14-Oct-2015 Glenn Kasten <gkasten@google.com> am 5116febf: am cfda8c43: Merge "AudioTrack: Skip callback EVENT_STREAM_END on DEAD_OBJECT." into mnc-dr-dev

* commit '5116febf966875c19a0b137a3deef0ba0ebe42df':
AudioTrack: Skip callback EVENT_STREAM_END on DEAD_OBJECT.
8fa0848cd47882d6df0c584b276515f98b768eca 14-Oct-2015 Glenn Kasten <gkasten@google.com> Merge "For static obtainBuffer(), do not set mUnreleased if acknowledging flush." into mnc-dr-dev
954ca45ac30539a49f179580b667b0ab1056d113 09-Sep-2015 Andy Hung <hunga@google.com> For static obtainBuffer(), do not set mUnreleased if acknowledging flush.

static audio tracks use obtainBuffer() to update position in start().

Bug: 22938515
Change-Id: I8ae32f6cce4d122386d2cf8982e158049b04ba9a
udioTrackShared.cpp
39609a0a6d95d003b0f237e6c139b070b4df7071 04-Sep-2015 Andy Hung <hunga@google.com> AudioTrack: Skip callback EVENT_STREAM_END on DEAD_OBJECT.

Send only EVENT_NEW_IAUDIOTRACK to initiate teardown.

Bug: 23750452
Change-Id: Ib5dcd578b5b6a6a1d91a03e58ef8da0acd994243
udioTrack.cpp
42fcb7c53027ed6b0375b5e2a7b937b53d87034d 13-Oct-2015 Chad Brubaker <cbrubaker@google.com> am 6b1e35e7: am 1982dfdc: am 0afb8309: Merge "Fix benign unsigned overflow in AuidoTrackShared"

* commit '6b1e35e73fe4f9538ec0acaf4847f8b68a58bbc5':
Fix benign unsigned overflow in AuidoTrackShared
1982dfdc2a9e99331d02a6591b2cbe2f65ae1103 13-Oct-2015 Chad Brubaker <cbrubaker@google.com> am 0afb8309: Merge "Fix benign unsigned overflow in AuidoTrackShared"

* commit '0afb83093a16cd27912788ce154c43a485a5b1dc':
Fix benign unsigned overflow in AuidoTrackShared
59b94200f6e012667eb35e055ead714dfd060ff1 07-Oct-2015 Chad Brubaker <cbrubaker@google.com> Enable integer overflow sanitization in libmedia

Change-Id: I138a02abca792af35001058ce17412bdf69fec92
ndroid.mk
cb50c54b31a83ac598530780fa8c145a3cb4a2de 07-Oct-2015 Chad Brubaker <cbrubaker@google.com> Fix benign unsigned overflow in AuidoTrackShared

fsanitize=integer adds unsigned checks to int32_t - uint32_t, force both
operands to int32_t to avoid such checks being added.

Change-Id: I76fce38f9636f5322ad95fdb81abb690503f4d08
udioTrackShared.cpp
3b938b6c70dd5e38733171cb8c6706f10ae50901 09-Oct-2015 Chad Brubaker <cbrubaker@google.com> am 49bf1193: Merge "Fix benign overflow in AudioTrackShared"

* commit '49bf11936cadb96a65a81e71515b1246f55e689a':
Fix benign overflow in AudioTrackShared
91aa4a0aefa43ad53a20b3d4538a6a986c902818 08-Oct-2015 Wei Jia <wjia@google.com> am f106f9e4: am 15e991bd: resolved conflicts for 0b09da7a to lmp-mr1-dev

* commit 'f106f9e4eacc1cb10ccc851a37619ed4b37bbb1b':
DO NOT MERGE - OMX: allow only secure codec to remotely call allocateBuffer.
15e991bdf8870c2c9820c2d98e0d30dae2e05a25 08-Oct-2015 Wei Jia <wjia@google.com> resolved conflicts for 0b09da7a to lmp-mr1-dev

Change-Id: Ib6a1aa4cee00e0449da30ae158d71403d6236487
dd184a4824acc31160895e2c6f8d93a7facfc2c8 08-Oct-2015 Wei Jia <wjia@google.com> am 3b4a72ac: Merge "DO NOT MERGE - OMX: allow only secure codec to remotely call allocateBuffer." into klp-dev

* commit '3b4a72acf039c58c33807b6d6fcdd5e09eafb1df':
DO NOT MERGE - OMX: allow only secure codec to remotely call allocateBuffer.
d008275796ac4cccf85fefce53cef733a49bc1fa 31-Aug-2015 Wonsik Kim <wonsik@google.com> Implement pause/resume functionality to MediaRecorder

Bug: 20092236
Change-Id: Ia0e92ff246302fd5fdef53c4f961d6645cc26a86
MediaRecorder.cpp
ediarecorder.cpp
d9459157206859d44d68ce908bff359b0d01f51f 24-Sep-2015 Chad Brubaker <cbrubaker@google.com> Fix benign overflow in AudioTrackShared

Bug: 24340611
Change-Id: Idc1e6ae09839475379bf0ab27943ae2de6f80bfa
(cherry picked from commit 0c27d279a1a99d175b84cc530ce2bfb0665b308b)
udioTrackShared.cpp
2482595baadd16f20d3992c8c9d6a14061836872 28-Sep-2015 Wei Jia <wjia@google.com> DO NOT MERGE - OMX: allow only secure codec to remotely call allocateBuffer.

Bug: 24310423
Change-Id: Iebcfc58b447f925ec2134898060af2ef227266a3
(cherry picked from commit 8dde7269a5356503d2b283234b6cb46d0c3f214e)
OMX.cpp
4a03d784f7c0e3a9685d182eee92ba6580eaf5a1 28-Sep-2015 Wei Jia <wjia@google.com> DO NOT MERGE - OMX: allow only secure codec to remotely call allocateBuffer.

Bug: 24310423
Change-Id: Iebcfc58b447f925ec2134898060af2ef227266a3
(cherry picked from commit 8dde7269a5356503d2b283234b6cb46d0c3f214e)
OMX.cpp
7d7a11ca73c9684b63275e82b327f6f90fcc114e 07-Oct-2015 Glenn Kasten <gkasten@google.com> am 9ea0680e: am b177e8a7: Merge "AudioTrack: Prevent stop() from reissuing last marker event" into mnc-dr-dev

* commit '9ea0680e4d77d21fb0698fec3ccd7779213eca62':
AudioTrack: Prevent stop() from reissuing last marker event
b177e8a7559f61154a0560f7396ba9eeede80579 07-Oct-2015 Glenn Kasten <gkasten@google.com> Merge "AudioTrack: Prevent stop() from reissuing last marker event" into mnc-dr-dev
cc8bbc3ffed9fdd3f3d92973474c498e51035ccd 06-Oct-2015 Andy Hung <hunga@google.com> AudioTrack: Prevent stop() from reissuing last marker event

Avoid a duplicate marker event race condition (1 in 30 or less)
by clearing marker reached in start() not stop().

Bug: 24497521
Change-Id: I9520d063c7d173d2e642174bf60a2bfe75edf085
udioTrack.cpp
61be84167c1a11c8a030e00a2b79b2bc4fdf617f 06-Oct-2015 Andy Hung <hunga@google.com> AudioTrack: Prevent stop() from reissuing last marker event

Avoid a duplicate marker event race condition (1 in 30 or less)
by clearing marker reached in start() not stop().

Bug: 24497521
Change-Id: I9520d063c7d173d2e642174bf60a2bfe75edf085
udioTrack.cpp
f470bf3f3788062f77a0614ec693583fd85716c6 06-Oct-2015 Wei Jia <wjia@google.com> am 031e841e: am 8656914f: am b90b8291: am cb70fdbe: Merge "OMX: allow only secure codec to remotely call allocateBuffer." into mnc-dev

* commit '031e841e34f2358a71cc63ad8192e0f48a9f63a7':
OMX: allow only secure codec to remotely call allocateBuffer.
031e841e34f2358a71cc63ad8192e0f48a9f63a7 06-Oct-2015 Wei Jia <wjia@google.com> am 8656914f: am b90b8291: am cb70fdbe: Merge "OMX: allow only secure codec to remotely call allocateBuffer." into mnc-dev

* commit '8656914fa29bbd72512752e221837333c672a188':
OMX: allow only secure codec to remotely call allocateBuffer.
b90b8291e36ae079ac0ccd029bb6e6a987036f7c 06-Oct-2015 Wei Jia <wjia@google.com> am cb70fdbe: Merge "OMX: allow only secure codec to remotely call allocateBuffer." into mnc-dev

* commit 'cb70fdbe9be14002a4303a93f07a13c508c00d89':
OMX: allow only secure codec to remotely call allocateBuffer.
7c176696c3274d0c79d34290e9cee595b945ef3c 05-Oct-2015 Praveen Chavan <pchavan@codeaurora.org> am 39824526: am 4802c0c5: AudioSystem: Fix race condition in accessing ioDescriptors

* commit '398245263197fce2c475f65d41966307062e9f7d':
AudioSystem: Fix race condition in accessing ioDescriptors
4802c0c507681634aee38518581a080bfa443ae2 29-Sep-2015 Praveen Chavan <pchavan@codeaurora.org> AudioSystem: Fix race condition in accessing ioDescriptors

The vector mIoDescriptors can be simultaneouly modified
and accessed by 2 threads. Acquire a lock while wrapping
the ioDescriptor in a sp<>

Bug: 24576810

Author: Haynes Mathew George <hgeorge@codeaurora.org>

Change-Id: I73c79ef8eca092b500a7ead3a5ebd0bcf75f9920
udioSystem.cpp
8dde7269a5356503d2b283234b6cb46d0c3f214e 28-Sep-2015 Wei Jia <wjia@google.com> OMX: allow only secure codec to remotely call allocateBuffer.

Bug: 24310423
Change-Id: Iebcfc58b447f925ec2134898060af2ef227266a3
OMX.cpp
49fdeaff2f4c1405738320b7c3a540b528457e1b 29-Sep-2015 Praveen Chavan <pchavan@codeaurora.org> AudioSystem: Fix race condition in accessing ioDescriptors

The vector mIoDescriptors can be simultaneouly modified
and accessed by 2 threads. Acquire a lock while wrapping
the ioDescriptor in a sp<>

Bug: 24576810

Author: Haynes Mathew George <hgeorge@codeaurora.org>

Change-Id: I73c79ef8eca092b500a7ead3a5ebd0bcf75f9920
udioSystem.cpp
c9cac3d2859a19e241575abfb6386cd8bd9f2c97 29-Sep-2015 Dan Austin <danielaustin@google.com> am bb9a36c2: am 54b3c3c7: am 6c4cf7fb: Merge "Fix benign overflow in AudioTrack"

* commit 'bb9a36c24160e131db786d69dc4a794706708209':
Fix benign overflow in AudioTrack
bb9a36c24160e131db786d69dc4a794706708209 29-Sep-2015 Dan Austin <danielaustin@google.com> am 54b3c3c7: am 6c4cf7fb: Merge "Fix benign overflow in AudioTrack"

* commit '54b3c3c7acf18226f6abf788a220837bc5737677':
Fix benign overflow in AudioTrack
f2e4565c5f216d38bca20fcd3323deda3f6d3ac6 29-Sep-2015 Dan Austin <danielaustin@google.com> am 9977b476: am b7132738: am 7f4d4fc8: Merge "Fix benign overflow in ToneGenerator.cpp"

* commit '9977b476093bdfe4fdd2e11855ebf1079af12bea':
Fix benign overflow in ToneGenerator.cpp
54b3c3c7acf18226f6abf788a220837bc5737677 29-Sep-2015 Dan Austin <danielaustin@google.com> am 6c4cf7fb: Merge "Fix benign overflow in AudioTrack"

* commit '6c4cf7fb4c8a48450f8290380710ddeb6a8cc625':
Fix benign overflow in AudioTrack
9977b476093bdfe4fdd2e11855ebf1079af12bea 29-Sep-2015 Dan Austin <danielaustin@google.com> am b7132738: am 7f4d4fc8: Merge "Fix benign overflow in ToneGenerator.cpp"

* commit 'b7132738e2e980f29fe67e863ac6b5488c0922b3':
Fix benign overflow in ToneGenerator.cpp
b7132738e2e980f29fe67e863ac6b5488c0922b3 29-Sep-2015 Dan Austin <danielaustin@google.com> am 7f4d4fc8: Merge "Fix benign overflow in ToneGenerator.cpp"

* commit '7f4d4fc853f03a8d2265d2b851736eb917e82730':
Fix benign overflow in ToneGenerator.cpp
039c27aeaee809182fc1491311ca6dcbc1ec441b 24-Sep-2015 Chad Brubaker <cbrubaker@google.com> Fix benign overflow in AudioTrack

two uint32_t's were being used in a computation that could be negative,
cast to int32_t before the subtraction to prevent incorrect overflow
detection.

Change-Id: I33c5ef79a0ebbba055daa0ea041b42229d0c3152
udioTrack.cpp
6f5a43f495b7d633c21ca4eb74956b71658c0c5d 24-Sep-2015 Chad Brubaker <cbrubaker@google.com> Fix benign overflow in ToneGenerator.cpp

while (count--) causes an unsigned overflow when count = 0, refactor the
condition to avoid this.

Change-Id: I91a8c93e6be715d80070a4c94c1de712cb659265
oneGenerator.cpp
3c98fa4ff6e05cf69a150d4f5378ce7a9c922894 24-Sep-2015 Chad Brubaker <cbrubaker@google.com> am 45fc581c: am 9664e182: resolved conflicts for a17b1999 to stage-aosp-master

* commit '45fc581c209b93362805eb89a5f2b7935c21f167':
Revert "Enable integer overflow detection in libmedia"
45fc581c209b93362805eb89a5f2b7935c21f167 24-Sep-2015 Chad Brubaker <cbrubaker@google.com> am 9664e182: resolved conflicts for a17b1999 to stage-aosp-master

* commit '9664e182e53669406960f9101972b4a85acd7e8f':
Revert "Enable integer overflow detection in libmedia"
9664e182e53669406960f9101972b4a85acd7e8f 24-Sep-2015 Chad Brubaker <cbrubaker@google.com> resolved conflicts for a17b1999 to stage-aosp-master

Change-Id: I7b2077a36e76592dbd96c6a944b518ee64428b7d
0c27d279a1a99d175b84cc530ce2bfb0665b308b 24-Sep-2015 Chad Brubaker <cbrubaker@google.com> Fix benign overflow in AudioTrackShared

Bug: 24340611
Change-Id: Idc1e6ae09839475379bf0ab27943ae2de6f80bfa
udioTrackShared.cpp
82352e71ffd48c7c06e9f9753faa71773f766f54 24-Sep-2015 Chad Brubaker <cbrubaker@google.com> Revert "Enable integer overflow detection in libmedia"

This reverts commit 0d9f5a1243616da9d2de49753b37957920a50812.

Change-Id: Icb109278a3dee37f66f1e022082a037c7d0a3b08
ndroid.mk
90d3badac2c0ee560ec09b363b2ce7f67f543de5 23-Sep-2015 Chad Brubaker <cbrubaker@google.com> am f00666b9: am e9fa23fe: resolved conflicts for 1f8749f2 to stage-aosp-master

* commit 'f00666b9a52f0bd18b2a2cae006cb4fb91b2103d':
Enable integer overflow detection in libmedia
Fix benign overflow in ClientProxy::getMisalignment
Fix benign unsigned overflow in AudioTrack
f00666b9a52f0bd18b2a2cae006cb4fb91b2103d 23-Sep-2015 Chad Brubaker <cbrubaker@google.com> am e9fa23fe: resolved conflicts for 1f8749f2 to stage-aosp-master

* commit 'e9fa23fe940c287bf2f6e8b28f4cf9161818cb80':
Enable integer overflow detection in libmedia
Fix benign overflow in ClientProxy::getMisalignment
Fix benign unsigned overflow in AudioTrack
e9fa23fe940c287bf2f6e8b28f4cf9161818cb80 23-Sep-2015 Chad Brubaker <cbrubaker@google.com> resolved conflicts for 1f8749f2 to stage-aosp-master

Change-Id: Idda60a9d39f9be81e0c314f06fc080ad7fa35c7b
0d9f5a1243616da9d2de49753b37957920a50812 22-Sep-2015 Chad Brubaker <cbrubaker@google.com> Enable integer overflow detection in libmedia

Change-Id: I6b9963d0f1716282c91c95756d4f5c0b54d2cec5
ndroid.mk
65dda4f09425ad027e27a51a3108472448d3ab8b 23-Sep-2015 Chad Brubaker <cbrubaker@google.com> Fix benign overflow in ClientProxy::getMisalignment

Change-Id: Ia4537f5b7a8c21178368fa2303602399a3f8fc36
udioTrackShared.cpp
20b82e0cb5c615a4f88f245c12fec9ee0ec49894 22-Sep-2015 Chad Brubaker <cbrubaker@google.com> Fix benign unsigned overflow in AudioTrack

An unsigned overflow could occur in timestamp computation when
mTimestamp < mServer.

Change-Id: I9e01897478a6d481dd6fb7303d325617466497cf
udioTrack.cpp
4487514203235b7def755fdefde7c9c8d4b89006 21-Sep-2015 Wei Jia <wjia@google.com> am 9b9612fb: am 92504274: am 7e1d645f: am a8f90d57: Merge "IAudioFlinger: fix the missing initialization of variable to ensure no info leak when writing them to Parcel." into lmp-dev

* commit '9b9612fbea5b73779d128cef45b4c08446bf6341':
IAudioFlinger: fix the missing initialization of variable to ensure no info leak when writing them to Parcel.
c4f7e92b19375fc53cfe24efb5e4127aca45f895 21-Sep-2015 Jeff Tinker <jtinker@google.com> am 69c8327b: am 9dcb4c63: am 4ae700d2: am 160ed868: Merge "DO NOT MERGE Fix vulnerability in mediaserver" into lmp-dev

* commit '69c8327b741844072948831162e94a52a34152f1':
DO NOT MERGE Fix vulnerability in mediaserver
faced8cd5f11954bf564ee19503bfbdced415a77 21-Sep-2015 Jeff Tinker <jtinker@google.com> am 813c5022: am 1ac11129: am d83f2255: am 99e63e75: Merge "Fix for security vulnerability in media server DO NOT MERGE" into lmp-dev

* commit '813c50220fe45665cd5ec91e33e229b02d61674f':
Fix for security vulnerability in media server DO NOT MERGE
81851d191256b76441d94a23f765326906e691ad 21-Sep-2015 Wei Jia <wjia@google.com> am fe096002: am dae1d8dd: am 5d76aca5: am 21fda3ed: Merge "DO NOT MERGE - IAudioFlinger: always initialize variables to ensure no info leak when writing them to Parcel." into lmp-dev

* commit 'fe0960023b5e24cfe233420eb78be20969a782f1':
DO NOT MERGE - IAudioFlinger: always initialize variables to ensure no info leak when writing them to Parcel.
925042742d4ebc69fa2bd7829e80e2ec306b87f3 21-Sep-2015 Wei Jia <wjia@google.com> am 7e1d645f: am a8f90d57: Merge "IAudioFlinger: fix the missing initialization of variable to ensure no info leak when writing them to Parcel." into lmp-dev

* commit '7e1d645f6822dc015bd828c12db63359517cc362':
IAudioFlinger: fix the missing initialization of variable to ensure no info leak when writing them to Parcel.
9dcb4c63c6b8876a28eab3774ac92cc5e3af13c7 21-Sep-2015 Jeff Tinker <jtinker@google.com> am 4ae700d2: am 160ed868: Merge "DO NOT MERGE Fix vulnerability in mediaserver" into lmp-dev

* commit '4ae700d2bd467f18e5de8b5d1579d7e20da88e36':
DO NOT MERGE Fix vulnerability in mediaserver
1ac11129220c71a208da4b4339ac6131132a7bd8 21-Sep-2015 Jeff Tinker <jtinker@google.com> am d83f2255: am 99e63e75: Merge "Fix for security vulnerability in media server DO NOT MERGE" into lmp-dev

* commit 'd83f22552372edfe67473c29a370e0a025a91f21':
Fix for security vulnerability in media server DO NOT MERGE
dae1d8ddfca7ca8cb3134116280c3a0c0dc1b2bf 21-Sep-2015 Wei Jia <wjia@google.com> am 5d76aca5: am 21fda3ed: Merge "DO NOT MERGE - IAudioFlinger: always initialize variables to ensure no info leak when writing them to Parcel." into lmp-dev

* commit '5d76aca578a0af0aaebb8eb8ce7cbf2bae4600e6':
DO NOT MERGE - IAudioFlinger: always initialize variables to ensure no info leak when writing them to Parcel.
a8f90d57f5b3ad4ef7194501aa20f0a0bd903e8f 17-Sep-2015 Wei Jia <wjia@google.com> Merge "IAudioFlinger: fix the missing initialization of variable to ensure no info leak when writing them to Parcel." into lmp-dev
bc2777d5bed4f0034c9b1c7e08504f38621a976f 17-Sep-2015 Wei Jia <wjia@google.com> am 4fd09901: am 345a74e2: am e10a198a: am 190eca5a: Merge "IAudioFlinger: fix the missing initialization of variable to ensure no info leak when writing them to Parcel." into mnc-dev

* commit '4fd099019b45f34db3be9f2ee71bd1f7c337a1dc':
IAudioFlinger: fix the missing initialization of variable to ensure no info leak when writing them to Parcel.
0b073e9c7ad3f5aa160f41d329325a8c747cf0a2 17-Sep-2015 Jeff Tinker <jtinker@google.com> am 18bc51f7: am 75f0b792: am dffe5cdb: Merge "DO NOT MERGE Fix vulnerability in mediaserver" into mnc-dev

* commit '18bc51f7a9694f91fa8030a76ce4345357406b07':
DO NOT MERGE Fix vulnerability in mediaserver
4554ffd7a1c4bc6973c11c00f5a19aa260e18100 17-Sep-2015 Jeff Tinker <jtinker@google.com> am 6272fa1b: Merge "DO NOT MERGE Fix vulnerability in mediaserver" into klp-dev

* commit '6272fa1baf361a6a89607243638cc592047947b3':
DO NOT MERGE Fix vulnerability in mediaserver
52b829cbc2cb947733f312211a007ecd2f9fe96b 17-Sep-2015 Jeff Tinker <jtinker@google.com> am f43125ed: Merge "Fix for security vulnerability in media server DO NOT MERGE" into klp-dev

* commit 'f43125ed08a408b02613b99f058564d97ce690cc':
Fix for security vulnerability in media server DO NOT MERGE
dffe5cdb436987a65a9010460979507c06b5c904 17-Sep-2015 Jeff Tinker <jtinker@google.com> Merge "DO NOT MERGE Fix vulnerability in mediaserver" into mnc-dev
160ed868d6beb0d55dc2194564d2f08cc9d6fbc2 17-Sep-2015 Jeff Tinker <jtinker@google.com> Merge "DO NOT MERGE Fix vulnerability in mediaserver" into lmp-dev
6272fa1baf361a6a89607243638cc592047947b3 17-Sep-2015 Jeff Tinker <jtinker@google.com> Merge "DO NOT MERGE Fix vulnerability in mediaserver" into klp-dev
99e63e75b670aeca1b4af401cb9582ba9fddf64d 17-Sep-2015 Jeff Tinker <jtinker@google.com> Merge "Fix for security vulnerability in media server DO NOT MERGE" into lmp-dev
f43125ed08a408b02613b99f058564d97ce690cc 17-Sep-2015 Jeff Tinker <jtinker@google.com> Merge "Fix for security vulnerability in media server DO NOT MERGE" into klp-dev
40715a2ee896edd2df4023d9f6f586977887d34c 17-Sep-2015 Wei Jia <wjia@google.com> IAudioFlinger: fix the missing initialization of variable to ensure no info leak when writing them to Parcel.

Bug: 23953967
Change-Id: I3a1d0144ba3832649e322c197ff0f03305ee7829
(cherry picked from commit 4cac44b53cc9f965cc2c9706b1d7ee2cd79f4066)
AudioFlinger.cpp
4fd099019b45f34db3be9f2ee71bd1f7c337a1dc 17-Sep-2015 Wei Jia <wjia@google.com> am 345a74e2: am e10a198a: am 190eca5a: Merge "IAudioFlinger: fix the missing initialization of variable to ensure no info leak when writing them to Parcel." into mnc-dev

* commit '345a74e25aa618d2aec6f839e2a03b566d086c4a':
IAudioFlinger: fix the missing initialization of variable to ensure no info leak when writing them to Parcel.
190786d3590c6b064a7d32eaa92f4a7b11cf16d5 17-Sep-2015 Wei Jia <wjia@google.com> am ae922517: Merge "DO NOT MERGE - IAudioFlinger: always initialize variables to ensure no info leak when writing them to Parcel." into klp-dev

* commit 'ae92251730865e0c4bc59ef2a8fe9dacb6de41b9':
DO NOT MERGE - IAudioFlinger: always initialize variables to ensure no info leak when writing them to Parcel.
095641dfa56913a6c28b2ca414315b094a254b1c 17-Sep-2015 Wei Jia <wjia@google.com> am 0518125e: am e1289226: am dc81adaa: am c191482e: Merge "DO NOT MERGE - IAudioFlinger: clear config before reading it from parcel." into lmp-dev

* commit '0518125e9cb6aed25258fff1aafa156ed90d0826':
DO NOT MERGE - IAudioFlinger: clear config before reading it from parcel.
e1289226b73f4d4e209dbdb092261cc1f11167d0 17-Sep-2015 Wei Jia <wjia@google.com> am dc81adaa: am c191482e: Merge "DO NOT MERGE - IAudioFlinger: clear config before reading it from parcel." into lmp-dev

* commit 'dc81adaa803a0691e65d7fef2c629236e08b9959':
DO NOT MERGE - IAudioFlinger: clear config before reading it from parcel.
3fd87605288d6d8e5abebadbddfa6071387fecdd 16-Sep-2015 Jeff Tinker <jtinker@google.com> DO NOT MERGE Fix vulnerability in mediaserver

ICrypto.cpp: ASLR bypass using DECRYPT IPC

bug: 24074485
Change-Id: I61cd77f0894140547f666a80526ebfe1ec3d2db6
Crypto.cpp
4cac44b53cc9f965cc2c9706b1d7ee2cd79f4066 17-Sep-2015 Wei Jia <wjia@google.com> IAudioFlinger: fix the missing initialization of variable to ensure no info leak when writing them to Parcel.

Bug: 23953967
Change-Id: I3a1d0144ba3832649e322c197ff0f03305ee7829
AudioFlinger.cpp
e6fb82a207f5256933e2d83e77262331af50a27f 09-Sep-2015 Andy Hung <hunga@google.com> For static obtainBuffer(), do not set mUnreleased if acknowledging flush.

static audio tracks use obtainBuffer() to update position in start().

Bug: 22938515
Change-Id: I8ae32f6cce4d122386d2cf8982e158049b04ba9a
udioTrackShared.cpp
5e7e87a383fdb1fece977097a7e3cc51b296f3a0 16-Sep-2015 Jeff Tinker <jtinker@google.com> DO NOT MERGE Fix vulnerability in mediaserver

ICrypto.cpp: ASLR bypass using DECRYPT IPC

bug: 24074485
Change-Id: Ia12942d6b86adde28745908d36a728ab5d69a037
Crypto.cpp
636539eb1a0d407d7f82b7c9a6d9833f7715e287 16-Sep-2015 Jeff Tinker <jtinker@google.com> DO NOT MERGE Fix vulnerability in mediaserver

ICrypto.cpp: ASLR bypass using DECRYPT IPC

bug: 24074485
Change-Id: I40dd0e92083c7093030393b16dbab59323306a4e
Crypto.cpp
3b76870d146b1350db8a2f7797e06897c8c92dc2 10-Sep-2015 Wei Jia <wjia@google.com> DO NOT MERGE - IAudioFlinger: always initialize variables to ensure no info leak when writing them to Parcel.

Bug: 23953967
Change-Id: Ibbe841da149038675e9e8daea76c77558bc8564b
(cherry picked from commit 983dca391a76fb45df999fc40e8766b9ddb63511)
AudioFlinger.cpp
AudioPolicyService.cpp
8336fc433eee213e201c8a65bf2a65b65bc67c44 10-Sep-2015 Wei Jia <wjia@google.com> DO NOT MERGE - IAudioFlinger: always initialize variables to ensure no info leak when writing them to Parcel.

Bug: 23953967
Change-Id: Ibbe841da149038675e9e8daea76c77558bc8564b
(cherry picked from commit 983dca391a76fb45df999fc40e8766b9ddb63511)
AudioFlinger.cpp
d09f3e3fe886e0a5babc75f50212a4eb5d3b9594 16-Sep-2015 Wei Jia <wjia@google.com> am 40d6fb64: am 69c19abd: am da56cd3d: am bc0daa97: Merge "IAudioFlinger: always initialize variables to ensure no info leak when writing them to Parcel." into mnc-dev

* commit '40d6fb647647c29dfd12a5c78611eb22129490c3':
IAudioFlinger: always initialize variables to ensure no info leak when writing them to Parcel.
40d6fb647647c29dfd12a5c78611eb22129490c3 16-Sep-2015 Wei Jia <wjia@google.com> am 69c19abd: am da56cd3d: am bc0daa97: Merge "IAudioFlinger: always initialize variables to ensure no info leak when writing them to Parcel." into mnc-dev

* commit '69c19abd9a000f7b6ff87ad5c9d10651e071ed4d':
IAudioFlinger: always initialize variables to ensure no info leak when writing them to Parcel.
4b219e9e5ab237eec9931497cf10db4d78982d84 14-Sep-2015 Jeff Tinker <jtinker@google.com> Fix for security vulnerability in media server DO NOT MERGE

bug: 23540426
Change-Id: I7ca419e4008967a0387649e5293ac9d4be71d3c4
Crypto.cpp
9adc7283c84cea1be81d5bd55ce50aefa6328c6e 14-Sep-2015 Jeff Tinker <jtinker@google.com> Fix for security vulnerability in media server DO NOT MERGE

bug: 23540426
Change-Id: I5d602f99fd82e50d0136d47ce20cfa1ac9fd7ae2
Crypto.cpp
8cfd0ac4b05f3151f1083564f46f05b5f525af8a 11-Sep-2015 Wei Jia <wjia@google.com> am 741a3351: Merge "DO NOT MERGE - IAudioFlinger: clear config before reading it from parcel." into klp-dev

* commit '741a335126a562ae8f5883cc0b02ba72f40e56f3':
DO NOT MERGE - IAudioFlinger: clear config before reading it from parcel.
1c7719820359f4190cd4bfd1a24d521face7b4f8 09-Sep-2015 Wei Jia <wjia@google.com> DO NOT MERGE - IAudioFlinger: clear config before reading it from parcel.

Bug: 23905951
Bug: 23912202
Change-Id: Id13a9d3cae2c09e7381b841e67ddfb188274d74c
(cherry picked from commit e995e477ad59b79145200c8f1e9e13c16c682d59)
AudioFlinger.cpp
AudioPolicyService.cpp
5f2a76f02f6d88825f8c164b4d9f7f310583eee1 09-Sep-2015 Wei Jia <wjia@google.com> DO NOT MERGE - IAudioFlinger: clear config before reading it from parcel.

Bug: 23905951
Bug: 23912202
Change-Id: Id13a9d3cae2c09e7381b841e67ddfb188274d74c
(cherry picked from commit e995e477ad59b79145200c8f1e9e13c16c682d59)
AudioFlinger.cpp
983dca391a76fb45df999fc40e8766b9ddb63511 10-Sep-2015 Wei Jia <wjia@google.com> IAudioFlinger: always initialize variables to ensure no info leak when writing them to Parcel.

Bug: 23953967
Change-Id: Ibbe841da149038675e9e8daea76c77558bc8564b
AudioFlinger.cpp
AudioPolicyService.cpp
9d10e9de2ce3861a2517334ab9420a5e37f1c29e 10-Sep-2015 Wei Jia <wjia@google.com> am cadcb20d: am 776f0a22: am 0f050315: am 7a2ffb90: Merge "IAudioFlinger: clear config before reading it from parcel." into mnc-dev

* commit 'cadcb20d2d4040d46463d02131534502807b5b2a':
IAudioFlinger: clear config before reading it from parcel.
cadcb20d2d4040d46463d02131534502807b5b2a 10-Sep-2015 Wei Jia <wjia@google.com> am 776f0a22: am 0f050315: am 7a2ffb90: Merge "IAudioFlinger: clear config before reading it from parcel." into mnc-dev

* commit '776f0a224deecc8e5aa9f9a9955a965cec231778':
IAudioFlinger: clear config before reading it from parcel.
e995e477ad59b79145200c8f1e9e13c16c682d59 09-Sep-2015 Wei Jia <wjia@google.com> IAudioFlinger: clear config before reading it from parcel.

Bug: 23905951
Bug: 23912202
Change-Id: Id13a9d3cae2c09e7381b841e67ddfb188274d74c
AudioFlinger.cpp
AudioPolicyService.cpp
8585cd530259cadfaee5190cb02adca90ca4f568 07-Sep-2015 Robert Shih <robertshih@google.com> am 492b5831: am 8f1ee70c: am 35e03636: am becceb11: am b57ffbb5: am d021f7e5: am b18c0276: am 2b63b91b: am c1e989e7: am 13ff64c2: Merge "Zero out return values in media binder calls" into klp-dev

* commit '492b58312862e3663a1adbf4e91e40d0ae8d8d63':
Zero out return values in media binder calls
ecf9c9224cf4d9ea7fb285f7c9fd8eef7a96b34e 04-Sep-2015 Andy Hung <hunga@google.com> AudioTrack: Skip callback EVENT_STREAM_END on DEAD_OBJECT.

Send only EVENT_NEW_IAUDIOTRACK to initiate teardown.

Bug: 23750452
Change-Id: Ib5dcd578b5b6a6a1d91a03e58ef8da0acd994243
udioTrack.cpp
492b58312862e3663a1adbf4e91e40d0ae8d8d63 04-Sep-2015 Robert Shih <robertshih@google.com> am 8f1ee70c: am 35e03636: am becceb11: am b57ffbb5: am d021f7e5: am b18c0276: am 2b63b91b: am c1e989e7: am 13ff64c2: Merge "Zero out return values in media binder calls" into klp-dev

* commit '8f1ee70c56aad841e4b9b569243d830ece04fdfe':
Zero out return values in media binder calls
f0a1b7f0a5b293cbe1326bdfc29d0f778a5e4b9e 04-Sep-2015 Andy Hung <hunga@google.com> am 264663c4: am 7ecf6369: am 7734e37e: am a1179678: am be695f0a: am 5e193041: am 52a4fc09: am 3732a3ac: am ab203130: Merge "Make IEffect command more robust (second try)" into klp-dev

* commit '264663c4ea0467acc0192997bceb83efd5526756':
Make IEffect command more robust (second try)
35e03636d6fa0c7c33c67e10686657849a61aff8 04-Sep-2015 Robert Shih <robertshih@google.com> am becceb11: am b57ffbb5: am d021f7e5: am b18c0276: am 2b63b91b: am c1e989e7: am 13ff64c2: Merge "Zero out return values in media binder calls" into klp-dev

* commit 'becceb1136e7eb01db7dd865cb98a57117212879':
Zero out return values in media binder calls
7ecf636997b812ff5ae87ea9e146707d37d1b78a 04-Sep-2015 Andy Hung <hunga@google.com> am 7734e37e: am a1179678: am be695f0a: am 5e193041: am 52a4fc09: am 3732a3ac: am ab203130: Merge "Make IEffect command more robust (second try)" into klp-dev

* commit '7734e37efe4ad47d91cdc5cfa6703d77a7a2ac0c':
Make IEffect command more robust (second try)
becceb1136e7eb01db7dd865cb98a57117212879 04-Sep-2015 Robert Shih <robertshih@google.com> am b57ffbb5: am d021f7e5: am b18c0276: am 2b63b91b: am c1e989e7: am 13ff64c2: Merge "Zero out return values in media binder calls" into klp-dev

* commit 'b57ffbb5486a58e0dbb03466e9f3a5e51d6cf0f3':
Zero out return values in media binder calls
7734e37efe4ad47d91cdc5cfa6703d77a7a2ac0c 04-Sep-2015 Andy Hung <hunga@google.com> am a1179678: am be695f0a: am 5e193041: am 52a4fc09: am 3732a3ac: am ab203130: Merge "Make IEffect command more robust (second try)" into klp-dev

* commit 'a1179678752e5755297a2bb66c730f4fd22856e3':
Make IEffect command more robust (second try)
d021f7e5686074771981a6386b59e803160a1073 04-Sep-2015 Robert Shih <robertshih@google.com> am b18c0276: am 2b63b91b: am c1e989e7: am 13ff64c2: Merge "Zero out return values in media binder calls" into klp-dev

* commit 'b18c02761fe357599f9dad17355e38ec1d3226f2':
Zero out return values in media binder calls
be695f0aa9b8fb3a2dc7983db71a1a78b1268b4b 04-Sep-2015 Andy Hung <hunga@google.com> am 5e193041: am 52a4fc09: am 3732a3ac: am ab203130: Merge "Make IEffect command more robust (second try)" into klp-dev

* commit '5e193041ab8a541b478dd1b61c8c8cd24bca2ab5':
Make IEffect command more robust (second try)
737b13bb86e45ada47140ae56aa8c804ea6a0bcc 03-Sep-2015 Robert Shih <robertshih@google.com> am abd74de6: am 3ca51aa9: am e6eeff25: am 4abb48c3: am 898e8575: am 72b0abdf: Merge "Zero out return values in audio binder calls" into lmp-mr1-dev

* commit 'abd74de663a9d211e94a426a9f3e40cdac39fb74':
Zero out return values in audio binder calls
abd74de663a9d211e94a426a9f3e40cdac39fb74 03-Sep-2015 Robert Shih <robertshih@google.com> am 3ca51aa9: am e6eeff25: am 4abb48c3: am 898e8575: am 72b0abdf: Merge "Zero out return values in audio binder calls" into lmp-mr1-dev

* commit '3ca51aa9c8eb670b3b93ab37350fa4e0a0397bd6':
Zero out return values in audio binder calls
2b63b91b84c75afdef4213aa11b0dcc8e7d735a3 03-Sep-2015 Robert Shih <robertshih@google.com> am c1e989e7: am 13ff64c2: Merge "Zero out return values in media binder calls" into klp-dev

* commit 'c1e989e76a461ea69e293839b3c29b634a462bd5':
Zero out return values in media binder calls
52a4fc09b483a20ee7d5970be01598ee262f7088 03-Sep-2015 Andy Hung <hunga@google.com> am 3732a3ac: am ab203130: Merge "Make IEffect command more robust (second try)" into klp-dev

* commit '3732a3acafa7eb621bc26cca3eb00150ea12d2e2':
Make IEffect command more robust (second try)
e6eeff25562cecb668110b446d6114098e27370d 03-Sep-2015 Robert Shih <robertshih@google.com> am 4abb48c3: am 898e8575: am 72b0abdf: Merge "Zero out return values in audio binder calls" into lmp-mr1-dev

* commit '4abb48c30cd7821f3397ccd7de8deb3eb645b385':
Zero out return values in audio binder calls
c1e989e76a461ea69e293839b3c29b634a462bd5 03-Sep-2015 Robert Shih <robertshih@google.com> am 13ff64c2: Merge "Zero out return values in media binder calls" into klp-dev

* commit '13ff64c2db84f4e7cac3396700e333b48c42c7ee':
Zero out return values in media binder calls
3732a3acafa7eb621bc26cca3eb00150ea12d2e2 03-Sep-2015 Andy Hung <hunga@google.com> am ab203130: Merge "Make IEffect command more robust (second try)" into klp-dev

* commit 'ab20313074bb109f29f677c3f09d5da1a48c94e7':
Make IEffect command more robust (second try)
4abb48c30cd7821f3397ccd7de8deb3eb645b385 03-Sep-2015 Robert Shih <robertshih@google.com> am 898e8575: am 72b0abdf: Merge "Zero out return values in audio binder calls" into lmp-mr1-dev

* commit '898e857594b738f88be4de5addc8ca296dfabd74':
Zero out return values in audio binder calls
13ff64c2db84f4e7cac3396700e333b48c42c7ee 03-Sep-2015 Robert Shih <robertshih@google.com> Merge "Zero out return values in media binder calls" into klp-dev
a946d844a77906072f5eb7093d41db465d6514bb 03-Sep-2015 Robert Shih <robertshih@google.com> Zero out return values in audio binder calls

More specifically when handling GET_OUTPUT_FOR_ATTR in IAudioPolicyService.
This prevents leaking a uninitialized `output` across binder if
getOutputForAttr were to encounter errors.

Bug: 23756261
Change-Id: Ibff8a1249a4e8a3c89a33a540dda428b10d6ca82
AudioPolicyService.cpp
892354335d49f0b9fcd10e20e0c13e3cd0f1f1cb 03-Sep-2015 Robert Shih <robertshih@google.com> Zero out return values in media binder calls

More specifically when handling:
* GET_STREAM_VOLUME in IAudioPolicyService, and
* GET_CURRENT_POSITION and GET_DURATION in IMediaPlayer

This prevents leaking uninitialized values across binder in error cases.

Bug: 23756261
Change-Id: I0ffd900ab12b685b0611259ade4a3efb1ec5defe
AudioPolicyService.cpp
MediaPlayer.cpp
9f43984d7519be4efd80c6d72bab366aa7272547 03-Sep-2015 Marco Nelissen <marcone@google.com> Merge "Remove unused code"
e096621f94f708b8634ad76333e6ac1882b46328 02-Sep-2015 Marco Nelissen <marcone@google.com> Remove unused code

Change-Id: Ib4f194a1180b832ad39d9ded0962184e6daf5e29
ediaplayer.cpp
25a634427dec455b79d73562131985ae85b98c43 01-Sep-2015 Andy Hung <hunga@google.com> Make IEffect command more robust (second try)

Bug: 23540907
Change-Id: If30cfa535ad51521053706fc40fc98d893db5bc7
(cherry picked from commit 10e6660cc5da65b027c90489ba7ac55d1504e012)
Effect.cpp
10e6660cc5da65b027c90489ba7ac55d1504e012 01-Sep-2015 Andy Hung <hunga@google.com> Make IEffect command more robust (second try)

See reverted commit 320bd569a2fdccdd3b345b7b937277ff3a34b048.

Change-Id: If30cfa535ad51521053706fc40fc98d893db5bc7
Effect.cpp
3f335768b0c353c8c665e1250a4707974a666f97 01-Sep-2015 Andy Hung <hunga@google.com> Merge "Revert "Make IEffect command more robust""
320bd569a2fdccdd3b345b7b937277ff3a34b048 01-Sep-2015 Andy Hung <hunga@google.com> Revert "Make IEffect command more robust"

This reverts commit 38b211b610d9099c8b36464e794992cd3dd39230.

Change-Id: I5ba4d78ef761d708c8050b95974ddb77b201bb2e
Effect.cpp
66918da927b5905e35d3c717a4f60058e79bbea2 01-Sep-2015 Andy Hung <hunga@google.com> Merge "Make IEffect command more robust"
480990699cd571e475788bfba8ef86bd0bfb96ad 29-Aug-2015 Jeff Tinker <jtinker@google.com> am 3b863069: am 389e7653: Merge "Fix for security vulnerability in media server" into mnc-dev

* commit '3b86306943e199e000302eec1902fc51be2e0637':
Fix for security vulnerability in media server
389e765394a950b9697bba49c1998f2029bd58b4 29-Aug-2015 Jeff Tinker <jtinker@google.com> Merge "Fix for security vulnerability in media server" into mnc-dev
dbf995cecdbfcb74437cf2b6b123b10821371f82 28-Aug-2015 Andy Hung <hunga@google.com> am 6b203f06: am 66b24004: am 0ea9e276: am 184ad88d: am fba72ab0: am f394f121: Merge "libmedia: clear reply data for IEffect command" into klp-dev

* commit '6b203f06b969ba92181dbf781544b40cc2c41b7c':
libmedia: clear reply data for IEffect command
66b24004345ff8a688e8548409b0b7d5a8902232 28-Aug-2015 Andy Hung <hunga@google.com> am 0ea9e276: am 184ad88d: am fba72ab0: am f394f121: Merge "libmedia: clear reply data for IEffect command" into klp-dev

* commit '0ea9e2761a04c4f592d854dbde2749395735fe56':
libmedia: clear reply data for IEffect command
184ad88ddd6bbdf01e131e8e5b75bef5be67b29b 28-Aug-2015 Andy Hung <hunga@google.com> am fba72ab0: am f394f121: Merge "libmedia: clear reply data for IEffect command" into klp-dev

* commit 'fba72ab0fcf7298492dcd9e3045913435d30d3a9':
libmedia: clear reply data for IEffect command
fba72ab0fcf7298492dcd9e3045913435d30d3a9 28-Aug-2015 Andy Hung <hunga@google.com> am f394f121: Merge "libmedia: clear reply data for IEffect command" into klp-dev

* commit 'f394f12167fddbc755855d06b615509517c99f14':
libmedia: clear reply data for IEffect command
f394f12167fddbc755855d06b615509517c99f14 28-Aug-2015 Andy Hung <hunga@google.com> Merge "libmedia: clear reply data for IEffect command" into klp-dev
38b211b610d9099c8b36464e794992cd3dd39230 27-Aug-2015 Andy Hung <hunga@google.com> Make IEffect command more robust

Bug: 23540907
Change-Id: Icee277e56b54ce0eb7ecb0a0bdb203f59b363dd5
Effect.cpp
57061f04534c5653195a76068f00fa5bc32f1bd5 28-Aug-2015 Nick Kralevich <nnk@google.com> am ec58b2fd: am 03dee050: am 608c349d: am 4e861bf5: am e1dc15ec: am 762c7139: am b04cfdf5: am d437c777: am 0981df6e: IMediaPlayer.cpp: make sure structures are initialized to 0

* commit 'ec58b2fdbbcaaf2494bcde990cee81f9de8e24bb':
IMediaPlayer.cpp: make sure structures are initialized to 0
83581c86941bc4b71d25b3a7f81f263571284a0d 28-Aug-2015 Andy Hung <hunga@google.com> am 4a3426f9: am 8a596555: am d0b5910f: libmedia: clear reply data for IEffect command

* commit '4a3426f9a57cba7ef064e6657a5e9133fe9cf511':
libmedia: clear reply data for IEffect command
4a3426f9a57cba7ef064e6657a5e9133fe9cf511 28-Aug-2015 Andy Hung <hunga@google.com> am 8a596555: am d0b5910f: libmedia: clear reply data for IEffect command

* commit '8a596555249b1513852478bdc9bfabea1e696ade':
libmedia: clear reply data for IEffect command
03dee05039103fbc983ddc9f728f1fa974d0a5a5 28-Aug-2015 Nick Kralevich <nnk@google.com> am 608c349d: am 4e861bf5: am e1dc15ec: am 762c7139: am b04cfdf5: am d437c777: am 0981df6e: IMediaPlayer.cpp: make sure structures are initialized to 0

* commit '608c349d611e03e0143c23c3f77ddc62b137e354':
IMediaPlayer.cpp: make sure structures are initialized to 0
c6fc6a3ca618b0e72ee565ded2e4960797f53fa6 27-Aug-2015 Jeff Tinker <jtinker@google.com> Fix for security vulnerability in media server

bug: 23540426
Change-Id: Ifb12ac3350410a49ba7d81d1bde12822c3008cd5
Crypto.cpp
608c349d611e03e0143c23c3f77ddc62b137e354 28-Aug-2015 Nick Kralevich <nnk@google.com> am 4e861bf5: am e1dc15ec: am 762c7139: am b04cfdf5: am d437c777: am 0981df6e: IMediaPlayer.cpp: make sure structures are initialized to 0

* commit '4e861bf5d43eae00ae4cb8727c5a408c3728288b':
IMediaPlayer.cpp: make sure structures are initialized to 0
e1dc15ecfaa5bbbda28647749bad51e6d18d0c79 28-Aug-2015 Nick Kralevich <nnk@google.com> am 762c7139: am b04cfdf5: am d437c777: am 0981df6e: IMediaPlayer.cpp: make sure structures are initialized to 0

* commit '762c713900bd764570c8fda4e238497200da66d6':
IMediaPlayer.cpp: make sure structures are initialized to 0
b04cfdf51746dea51d2bb2f56fe9ef789fd30bd9 27-Aug-2015 Nick Kralevich <nnk@google.com> am d437c777: am 0981df6e: IMediaPlayer.cpp: make sure structures are initialized to 0

* commit 'd437c77716fcf454d99b8424bb01f37643b970cc':
IMediaPlayer.cpp: make sure structures are initialized to 0
d437c77716fcf454d99b8424bb01f37643b970cc 27-Aug-2015 Nick Kralevich <nnk@google.com> am 0981df6e: IMediaPlayer.cpp: make sure structures are initialized to 0

* commit '0981df6e3db106bfb7a56a2b668c012fcc34dd2c':
IMediaPlayer.cpp: make sure structures are initialized to 0
0981df6e3db106bfb7a56a2b668c012fcc34dd2c 20-Aug-2015 Nick Kralevich <nnk@google.com> IMediaPlayer.cpp: make sure structures are initialized to 0

Credit https://code.google.com/p/android/issues/detail?id=183310

Bug: 23515142
Change-Id: Idbd66fb148bd0ac1dd78f8651d0164f2a41e2427
(cherry picked from commit b73b826cc16291b33649402497efbe0f946413bd)
MediaPlayer.cpp
57bed83a539535bb64a33722fb67231119cb0618 27-Aug-2015 Andy Hung <hunga@google.com> libmedia: clear reply data for IEffect command

Bug: 23540907
Change-Id: Ib89afc6b273b0eb310bbc5a1bd92b1e3d407c249
Effect.cpp
d0b5910f78b45ce98511d31ec327ccaafe127f3f 27-Aug-2015 Andy Hung <hunga@google.com> libmedia: clear reply data for IEffect command

Bug: 23540907
Change-Id: Ib89afc6b273b0eb310bbc5a1bd92b1e3d407c249
Effect.cpp
ca095ac251ad02ad745d763f37ec3fcc5a8aa2ea 21-Aug-2015 Jeff Tinker <jtinker@google.com> am 8de6d690: Fix build break DO NOT MERGE

* commit '8de6d690ae5843bd8e005deedea571596f79bbd3':
Fix build break DO NOT MERGE
8de6d690ae5843bd8e005deedea571596f79bbd3 21-Aug-2015 Jeff Tinker <jtinker@google.com> Fix build break DO NOT MERGE

related-to-bug: 23223325

Change-Id: I7b09712b5f18912abddd50b75f6edaf860e894c1
Crypto.cpp
ff8a70733fdf9311bfdc3ef78e8455ced74d685f 21-Aug-2015 Nick Kralevich <nnk@google.com> Merge "IMediaPlayer.cpp: make sure structures are initialized to 0"
b512e0a3697ccaaf4687867fe0aee8d3dbb7003c 21-Aug-2015 Abhishek Arya <aarya@google.com> am 0ea1da27: am 5f126c0d: am e93a33a8: am 8cc71bc8: Merge "DO NOT MERGE Part of fix for libmedia OOB write anywhere" into lmp-dev

* commit '0ea1da27437575f6b075860fa858a257c806d5ef':
DO NOT MERGE Part of fix for libmedia OOB write anywhere
fd1d6df52f4c33f59d44abdbcdd0ec5b9a20f059 21-Aug-2015 Jeff Tinker <jtinker@google.com> am c2153d0d: DO NOT MERGE Part of fix for libmedia OOB write anywhere

* commit 'c2153d0dc800d0718788dccd0f2a2d29f4647c03':
DO NOT MERGE Part of fix for libmedia OOB write anywhere
5f126c0d09b55817d1f94b3845a3c220981a622d 21-Aug-2015 Abhishek Arya <aarya@google.com> am e93a33a8: am 8cc71bc8: Merge "DO NOT MERGE Part of fix for libmedia OOB write anywhere" into lmp-dev

* commit 'e93a33a8f2706d3918634d17c33491f69060a62c':
DO NOT MERGE Part of fix for libmedia OOB write anywhere
c2153d0dc800d0718788dccd0f2a2d29f4647c03 18-Aug-2015 Jeff Tinker <jtinker@google.com> DO NOT MERGE Part of fix for libmedia OOB write anywhere

Clarify that decrypt destination is not a pointer for
secure case.

b/23223325

Change-Id: I642dcf790a9eb9e32175f3e0d8f040c82228e3ac
(cherry picked from commit ed555d70d80964f40563d89a4e6d6a80f83f4b89)
Crypto.cpp
aa4da6fa7ca2454f0713de0a5a583b5b8160166b 18-Aug-2015 Jeff Tinker <jtinker@google.com> DO NOT MERGE Part of fix for libmedia OOB write anywhere

Clarify that decrypt destination is not a pointer for
secure case.

b/23223325

Change-Id: I642dcf790a9eb9e32175f3e0d8f040c82228e3ac
(cherry picked from commit ed555d70d80964f40563d89a4e6d6a80f83f4b89)
Crypto.cpp
b73b826cc16291b33649402497efbe0f946413bd 20-Aug-2015 Nick Kralevich <nnk@google.com> IMediaPlayer.cpp: make sure structures are initialized to 0

Credit https://code.google.com/p/android/issues/detail?id=183310

Change-Id: Idbd66fb148bd0ac1dd78f8651d0164f2a41e2427
MediaPlayer.cpp
6e85923d212cacf8a3616164ab6f32f8da26b5ce 20-Aug-2015 Jeff Tinker <jtinker@google.com> am e2abaffe: am 3cef9257: Merge "Part of fix for libmedia OOB write anywhere" into mnc-dev

* commit 'e2abaffefc0170f36d27b171fa8af0fd290fb794':
Part of fix for libmedia OOB write anywhere
7af849763a65f5e9a9adac767328d20811163cd0 20-Aug-2015 Jeff Tinker <jtinker@google.com> am 3cef9257: Merge "Part of fix for libmedia OOB write anywhere" into mnc-dev

* commit '3cef9257c9ed5ffaa507f8c27bfcae19cc6b96bd':
Part of fix for libmedia OOB write anywhere
3cef9257c9ed5ffaa507f8c27bfcae19cc6b96bd 20-Aug-2015 Jeff Tinker <jtinker@google.com> Merge "Part of fix for libmedia OOB write anywhere" into mnc-dev
6ee9b57b06a40e2490911cd390e8528eda0b21c5 18-Aug-2015 Eric Laurent <elaurent@google.com> am dd6a1764: am c08872f9: Merge "NuPlayerRenderer: handle error when resuming an offloaded track" into mnc-dev

* commit 'dd6a17649106fd48b0e69703d339bbc5a1ae9a0b':
NuPlayerRenderer: handle error when resuming an offloaded track
7a64655ba604993a6724b4a8ab09ed743bc40ec8 18-Aug-2015 Eric Laurent <elaurent@google.com> am c08872f9: Merge "NuPlayerRenderer: handle error when resuming an offloaded track" into mnc-dev

* commit 'c08872f977fc52c015cc17438dd3bd7981dfc0dc':
NuPlayerRenderer: handle error when resuming an offloaded track
ed555d70d80964f40563d89a4e6d6a80f83f4b89 18-Aug-2015 Jeff Tinker <jtinker@google.com> Part of fix for libmedia OOB write anywhere

Clarify that decrypt destination is not a pointer for
secure case.

b/23223325

Change-Id: I642dcf790a9eb9e32175f3e0d8f040c82228e3ac
Crypto.cpp
b9b2eee2e2457d57d97a74bf34285842477382f5 14-Aug-2015 Eric Laurent <elaurent@google.com> am f311db04: am 2517d62a: Merge "DO NOT MERGE - IAudioFlinger: add checks on binder calls" into lmp-mr1-dev

* commit 'f311db04e72f66cb5b31d44e8780a1fcb88b3cdd':
DO NOT MERGE - IAudioFlinger: add checks on binder calls
2517d62a1c888332e7407295f935c4a55361db3a 14-Aug-2015 Eric Laurent <elaurent@google.com> Merge "DO NOT MERGE - IAudioFlinger: add checks on binder calls" into lmp-mr1-dev
e4ac35fa524b011f272d396b2c12515382bddb94 02-Apr-2015 Eric Laurent <elaurent@google.com> DO NOT MERGE - IAudioFlinger: add checks on binder calls

Limit number of ports and patches listed by
LIST_AUDIO_PATCHES and LIST_AUDIO_PORTS.

Also fix typo causing wrong pointer to be used when writing to Parcel.

Bug: 19573085.
Change-Id: I41a9c710e45738a4f11990160587856c429a4646
(cherry picked from commit f75c2fef14354024ec27bff1444f9e50b5ef55a9)
AudioFlinger.cpp
97c9f4fd7bc31e2968d816402659ba1c64f10b42 12-Aug-2015 Eric Laurent <elaurent@google.com> NuPlayerRenderer: handle error when resuming an offloaded track

Make sure that an offloaded audio track is torn down if
start() returns an error in onResume().
This makes sure that a track invalidated due to a potential
audio path change while paused is re created on the correct
output.

Bug: 22256441.
Change-Id: I6c7bfec6e7322415daffc0451bab46d0c558522a
udioTrack.cpp
1b1928715253e74a5a782463907f93bdf7de52c4 25-Jul-2015 Robert Shih <robertshih@google.com> am b45cb776: Merge "Explicitly disconnect in MediaPlayer::reset" into mnc-dev

* commit 'b45cb776b7ae43f763200040d6358657ab80f855':
Explicitly disconnect in MediaPlayer::reset
7011a2eae4ee4fea95b53c309dd1a4d83a07d881 25-Jul-2015 Robert Shih <robertshih@google.com> am b45cb776: Merge "Explicitly disconnect in MediaPlayer::reset" into mnc-dev

* commit 'b45cb776b7ae43f763200040d6358657ab80f855':
Explicitly disconnect in MediaPlayer::reset
b45cb776b7ae43f763200040d6358657ab80f855 25-Jul-2015 Robert Shih <robertshih@google.com> Merge "Explicitly disconnect in MediaPlayer::reset" into mnc-dev
0c4249ae67222d09c1a0a8149672e4f1d9f3789f 25-Jul-2015 Andy Hung <hunga@google.com> am 2c7d0f20: Merge "Fix restore position warning and static track adjustment" into mnc-dev

* commit '2c7d0f2013203588f9307166cad42902eb5a676f':
Fix restore position warning and static track adjustment
50bd7422c37b682202124f3d7e4cdc502dbca728 24-Jul-2015 Andy Hung <hunga@google.com> am 2c7d0f20: Merge "Fix restore position warning and static track adjustment" into mnc-dev

* commit '2c7d0f2013203588f9307166cad42902eb5a676f':
Fix restore position warning and static track adjustment
2c7d0f2013203588f9307166cad42902eb5a676f 24-Jul-2015 Andy Hung <hunga@google.com> Merge "Fix restore position warning and static track adjustment" into mnc-dev
be6cbce6652cbc533f57f3e514b585e67f99d2dd 24-Jul-2015 Andy Hung <hunga@google.com> am 9f00e69c: Merge "Fix race condition in AudioTrackThread::wake" into mnc-dev

* commit '9f00e69c5f2702b66e9bdf8f4f75f99a338738d7':
Fix race condition in AudioTrackThread::wake
fca9868cc99fb5fd432526aca234054112a20045 24-Jul-2015 Andy Hung <hunga@google.com> am 63310b10: Merge "Fix race condition in AudioRecordThread::wake" into mnc-dev

* commit '63310b10c5834f92164a96ea2ad4ad8ab1e309ec':
Fix race condition in AudioRecordThread::wake
d7bd69e4d1e74f25413721804d5290c53ea87f2b 24-Jul-2015 Andy Hung <hunga@google.com> Fix restore position warning and static track adjustment

Remove unnecessary restoreTrack_l() position warning when
AudioTrack output device changes.

Also, fix rare getPosition() offset error if a static track is
continuously playing a long time (> 24 hours at 48khz sampling)
and its output device changes.

Bug: 22524122
Bug: 21699132
Change-Id: I5a35c13d62ff9f0702b09d5cd9362c730364b18c
udioTrack.cpp
491fb4ea563e118dc73e45b31c21457f8b21df53 24-Jul-2015 Andy Hung <hunga@google.com> am 9f00e69c: Merge "Fix race condition in AudioTrackThread::wake" into mnc-dev

* commit '9f00e69c5f2702b66e9bdf8f4f75f99a338738d7':
Fix race condition in AudioTrackThread::wake
d53dc28047cdf3f40f1d86e9e80096ff621d95f3 24-Jul-2015 Andy Hung <hunga@google.com> am 63310b10: Merge "Fix race condition in AudioRecordThread::wake" into mnc-dev

* commit '63310b10c5834f92164a96ea2ad4ad8ab1e309ec':
Fix race condition in AudioRecordThread::wake
2b95bda111444f2834e64221e3a3eb1a87d43c38 22-Jul-2015 Robert Shih <robertshih@google.com> Explicitly disconnect in MediaPlayer::reset

Even without calling disconnect in MediaPlayer::reset,
MediaPlayerService::Client (which lives on the other side of a
binder with MediaPlayer) would still perform a disconnect in its
destructor. Object destruction across binder is not synchronous, but
method calls are. This commit merely makes sure that the disconnect
happens deterministically before reset returns.

Bug: 22451733
Change-Id: Id9146a63a1872d68087a252aa614248b16d2556d
ediaplayer.cpp
a8d0890ca969ec40fdcf1cfcbeef85c0c379cfaf 22-Jul-2015 Andy Hung <hunga@google.com> Fix race condition in AudioTrackThread::wake

Bug: 22533684
Change-Id: I2f46770dca44fc9dae41e067d3bec893c42a826e
udioTrack.cpp
805a0c70574676d0fb29aa5e1f23417786b42259 22-Jul-2015 Andy Hung <hunga@google.com> Fix race condition in AudioRecordThread::wake

Bug: 22533684
Change-Id: Iba73d633b088dbc84159ed692019da39cc8e2233
udioRecord.cpp
f42d2eecfaf17367e094040906dad44f1e6b464d 18-Jul-2015 Ronghua Wu <ronghuawu@google.com> am 51390b48: Merge "mediaresourcemanager: add pid to removeResource method" into mnc-dev

* commit '51390b48d311d1164a6638d3fe0b4a48aaa9028f':
mediaresourcemanager: add pid to removeResource method
e4b62f7c0766f799b41e4ce9ad98735156ac64ac 18-Jul-2015 Ronghua Wu <ronghuawu@google.com> am 51390b48: Merge "mediaresourcemanager: add pid to removeResource method" into mnc-dev

* commit '51390b48d311d1164a6638d3fe0b4a48aaa9028f':
mediaresourcemanager: add pid to removeResource method
51390b48d311d1164a6638d3fe0b4a48aaa9028f 18-Jul-2015 Ronghua Wu <ronghuawu@google.com> Merge "mediaresourcemanager: add pid to removeResource method" into mnc-dev
28fa88f2f81260361944b81fbdb9bb40b795f8e9 17-Jul-2015 Glenn Kasten <gkasten@google.com> am dbd0f3c5: Fix build

* commit 'dbd0f3c5e15e56c2d91ae1405fecf2279785ef00':
Fix build
6d6f3c6dbc6eed1bf405c6bd34506ef3e6100cd6 17-Jul-2015 Glenn Kasten <gkasten@google.com> am dbd0f3c5: Fix build

* commit 'dbd0f3c5e15e56c2d91ae1405fecf2279785ef00':
Fix build
6ed5361d4f1fb9b83c9f73e7fcb9ff4e60b73a7c 17-Jul-2015 Andy Hung <hunga@google.com> am 3bf99265: Merge "Fix AudioTrack flush pointer wrap" into mnc-dev

* commit '3bf9926510aaec6d70a171b1ccf405abbd74c700':
Fix AudioTrack flush pointer wrap
dbd0f3c5e15e56c2d91ae1405fecf2279785ef00 17-Jul-2015 Glenn Kasten <gkasten@google.com> Fix build

Change-Id: I18b63d68d452c4ee7544ff1614f4e3f57f5a9e73
udioTrackShared.cpp
ef031187432128d47d1663468c2494f88f4abcd3 17-Jul-2015 Andy Hung <hunga@google.com> am 3bf99265: Merge "Fix AudioTrack flush pointer wrap" into mnc-dev

* commit '3bf9926510aaec6d70a171b1ccf405abbd74c700':
Fix AudioTrack flush pointer wrap
37c8924c508a7c9b8bd3c8ce80fc005070531902 15-Jul-2015 Ronghua Wu <ronghuawu@google.com> mediaresourcemanager: add pid to removeResource method

Bug: 22496209
Change-Id: I73311573e8d1ac15fec668a9ef6e6af7a07a1d30
ResourceManagerService.cpp
3bf9926510aaec6d70a171b1ccf405abbd74c700 17-Jul-2015 Andy Hung <hunga@google.com> Merge "Fix AudioTrack flush pointer wrap" into mnc-dev
a2d75cdb1e389f2b4ce5992fb6652399b4d30966 16-Jul-2015 Andy Hung <hunga@google.com> Fix AudioTrack flush pointer wrap

Occurs when read offset / write offset span the power of 2
mask boundary.

Bug: 22513776
Change-Id: If863577dac6666e8b2083d78f78fe9b9490fcf76
udioTrackShared.cpp
83582fafce2122286124710c3a9c749b4825a033 16-Jul-2015 Eric Laurent <elaurent@google.com> am a8dc93ef: Merge "mediaplayer: fix audio attributes override by stream type" into mnc-dev

* commit 'a8dc93efc9be8d5e37c7473601fb8654804188c1':
mediaplayer: fix audio attributes override by stream type
6c848ad95214545dd76c7f4c894bce89449bbfbd 16-Jul-2015 Eric Laurent <elaurent@google.com> am a8dc93ef: Merge "mediaplayer: fix audio attributes override by stream type" into mnc-dev

* commit 'a8dc93efc9be8d5e37c7473601fb8654804188c1':
mediaplayer: fix audio attributes override by stream type
4356269be6d2b62bbb945364e8fc4beb99e1aada 16-Jul-2015 Eric Laurent <elaurent@google.com> mediaplayer: fix audio attributes override by stream type

Make sure that when audio attributes are set, the stream type
is always derived from them.

Bug: 22481669.
Change-Id: Ia10c7017eb27e7753faf97a42dd4f44e15f2c986
ediaplayer.cpp
0d0da9b40469b847f9913dd97805b7bd99b1aeb9 11-Jul-2015 Elliott Hughes <enh@google.com> resolved conflicts for merge of 6052c89f to mnc-dr-dev-plus-aosp

Change-Id: If44e52b1dad6e5210931452fb160e64c7becbfc7
9bd9ed11ed5b3aa00aaaf32bae708158fd2f33ca 11-Jul-2015 Elliott Hughes <enh@google.com> resolved conflicts for merge of 6052c89f to mnc-dev-plus-aosp

Change-Id: I54bfc78454ff0ecba68f08879cab7097b9d7a7f6
2d908114b0ce5ba0d34aab5a721f9772340f936a 10-Jul-2015 Eric Laurent <elaurent@google.com> am a56d1303: Merge "audio: several fixes in audio routing callbacks" into mnc-dev

* commit 'a56d1303bc7505ca7ea17251218185557528d6bb':
audio: several fixes in audio routing callbacks
621b4199dd11ab4627e2ac874a157965c5071c53 10-Jul-2015 Eric Laurent <elaurent@google.com> am a56d1303: Merge "audio: several fixes in audio routing callbacks" into mnc-dev

* commit 'a56d1303bc7505ca7ea17251218185557528d6bb':
audio: several fixes in audio routing callbacks
242b400fc6e360d9444335a3fab296d96db024d8 10-Jul-2015 Elliott Hughes <enh@google.com> frameworks/av: libexpat now exports its includes.

Change-Id: I89412ddbe855af1b39636afbe98408321bb4a8be
ediaProfiles.cpp
7c1ec5f038e63a5eb8b04434577c25bc23f5f410 09-Jul-2015 Eric Laurent <elaurent@google.com> audio: several fixes in audio routing callbacks

- audio policy:
Force device change to ensure new audio patch creation
upon first track activity on a given output.
Fix function device_distinguishes_on_address() which could mistake
some output device with remote submix input device.

- audio flinger:
Reduce number of binder calls upon new client registration by only
sending ioConfigChanged() callbacks to newly registered client.
Fix first patch after output thread creation not triggering an
ioConfigChanged() callback.

-audio system:
Force client registration upon routing callback installation to force
new ioConfigChanged() callback from audio flinger.

Bug: 22381136.

Change-Id: Ieb0d9f92f563a40552eb31bc0499c8ac65f78ce4
udioSystem.cpp
5060960bfcbc7ecf54b4ccc29e4f74e590e8e3f8 27-Jun-2015 Eric Laurent <elaurent@google.com> am 6705edd4: Merge "reduce number of binder calls from mediaserver" into mnc-dev

* commit '6705edd4e58c4fcff0cbbff30bacffa561759ba8':
reduce number of binder calls from mediaserver
e8726fea8a53bf3474aa3c6deaf2f6c1f565e694 26-Jun-2015 Eric Laurent <elaurent@google.com> reduce number of binder calls from mediaserver

Reduce the number of audio port, audio patch and
IO config changed binder calls from mediaserver to
client processes:
- Do not call IO config changed callback if selected
device is the same as previously selected one on a given
audio flinger playback or capture thread.
- Do not call the audio port or audo patch list update
callback on a client if this client as no listener registered.

Bug: 22045560.

Change-Id: If780e105404de79b7cb5c80c27b793ceb6b1c423
udioSystem.cpp
AudioPolicyService.cpp
fdb9404f0ced6ecdd3b33e2074dfa274162dcd80 23-Jun-2015 Ricardo Garcia <rago@google.com> am 55a2dcce: Merge "Using centralized isAudioPlaybackRateValid to validate parameters" into mnc-dev

* commit '55a2dcce3a409393dc51ab2eb433914331f2df51':
Using centralized isAudioPlaybackRateValid to validate parameters
55a2dcce3a409393dc51ab2eb433914331f2df51 23-Jun-2015 Ricardo Garcia <rago@google.com> Merge "Using centralized isAudioPlaybackRateValid to validate parameters" into mnc-dev
6c7f062d3149d6890daaee64828959ad6f61ea54 01-May-2015 Ricardo Garcia <rago@google.com> Using centralized isAudioPlaybackRateValid to validate parameters

Centralized validation code
bug: 20701446

Change-Id: I9d9941c7639c05b2afe069ff4f858c693c910bfe
udioTrack.cpp
678afec35fe8c52cde2cb2f57639393e54fe93e1 22-Jun-2015 Ricardo Garcia <rago@google.com> am 99b38856: Merge "Fix for Visualizer release bug" into mnc-dev

* commit '99b38856e91a55bb67085dbabffac9739998fe8b':
Fix for Visualizer release bug
99b38856e91a55bb67085dbabffac9739998fe8b 22-Jun-2015 Ricardo Garcia <rago@google.com> Merge "Fix for Visualizer release bug" into mnc-dev
9b030df5ead9c039e4ebb16c745e2cc40e953d48 19-Jun-2015 Ricardo Garcia <rago@google.com> Fix for Visualizer release bug

Setting callback reference to NULL before requesting exit.

bug: 21804802
Change-Id: I54323959686880f4e7a10b766850f8c86c06edb6
isualizer.cpp
a548d0e8c675c7cd97d111b7f4b50f05473bbcec 19-Jun-2015 Jeff Tinker <jtinker@google.com> am 47b1ca9c: Merge "Check binder transact status" into mnc-dev

* commit '47b1ca9cf7c45564887832bfdec21ccc18eb448e':
Check binder transact status
d40f5f01d983b6d7fe0abb00ab0573bf737a17d7 19-Jun-2015 Andy Hung <hunga@google.com> am f86e831e: Merge "Return DEAD_OBJECT if getTimestamp cannot restore track" into mnc-dev

* commit 'f86e831ec0cbdce2d34c48fc567ad91a47099b70':
Return DEAD_OBJECT if getTimestamp cannot restore track
47b1ca9cf7c45564887832bfdec21ccc18eb448e 19-Jun-2015 Jeff Tinker <jtinker@google.com> Merge "Check binder transact status" into mnc-dev
f86e831ec0cbdce2d34c48fc567ad91a47099b70 19-Jun-2015 Andy Hung <hunga@google.com> Merge "Return DEAD_OBJECT if getTimestamp cannot restore track" into mnc-dev
8541205f3518fdb0b6711ad0ba713946fb27d752 19-Jun-2015 Andy Hung <hunga@google.com> am c675cf0f: Merge "Fix AudioTrack comments relating to use of restoreTrack_l()" into mnc-dev

* commit 'c675cf0fff3da75a92bc157e3bf698cc5a1f6eb3':
Fix AudioTrack comments relating to use of restoreTrack_l()
c675cf0fff3da75a92bc157e3bf698cc5a1f6eb3 19-Jun-2015 Andy Hung <hunga@google.com> Merge "Fix AudioTrack comments relating to use of restoreTrack_l()" into mnc-dev
6653c935d2518a713587b3887ca09aa09ebfa7fd 08-Jun-2015 Andy Hung <hunga@google.com> Return DEAD_OBJECT if getTimestamp cannot restore track

Bug: 21699132
Change-Id: I90443f8674ed949e2546048b231be75cd6fe6615
udioTrack.cpp
1f1db8356b599bc40703c907fb69e6e539343532 08-Jun-2015 Andy Hung <hunga@google.com> Fix AudioTrack comments relating to use of restoreTrack_l()

Bug: 21699132
Change-Id: Ib0d029a5e28676aeffbbbafc88c52a17367a413c
udioTrack.cpp
98895b31022a3b3229474701155eacdbc2636ee1 18-Jun-2015 Alex Klyubin <klyubin@google.com> am 808fa88b: Merge "readAt can return negative values (error codes)." into mnc-dev

* commit '808fa88be82c1646dc472ccd459d6498748e940a':
readAt can return negative values (error codes).
61c83317f1c8f18fd86afe0c776d16933816a83a 18-Jun-2015 Alex Klyubin <klyubin@google.com> readAt can return negative values (error codes).

This fixes the regression introduced in
59cea2616269f34b1f3d046995efd8da42cd5549 due to which MediaPlayer
treated all error codes returned by MediaHTTPConnection as
ERROR_OUT_OF_RANGE.

The regression was caused by accidentally converting negative values
(which represent error codes) returned by MediaHTTPConnection to very
large positive ones (which represent length of data received).

Bug: 21922241
Change-Id: I1b4592b5fec724aac1ba6c1ff8fdabcba56bcd2d
MediaHTTPConnection.cpp
3b5401ad38b4346920f9aff0440606b8b565ce90 16-Jun-2015 Jeff Tinker <jtinker@google.com> Check binder transact status

If mediaserver restarts, the binder transact
methods return DEAD_OBJECT. This status wasn't
being checked, so calls would proceed with
unpredictable results.

bug: 20614102
Change-Id: I11271974ef2ccf0129529d1f67204dff1f1d03b0
Drm.cpp
d81625a68eed25366bfc55e73f094cd640f672a0 12-Jun-2015 Marco Nelissen <marcone@google.com> am bd95df5d: Merge "Return correct error code from IMediaHttpConnection" into mnc-dev

* commit 'bd95df5def15fc8167f17846e7d1a4cc7440d06a':
Return correct error code from IMediaHttpConnection
8cecf014ad5c62b072fad8fc24a140e8ee294f62 11-Jun-2015 Marco Nelissen <marcone@google.com> Return correct error code from IMediaHttpConnection

It returns a boolean, not a status_t

Bug: 21654826
Change-Id: Id364a90598c5cf0bb567b5b25bbc9b7c73412760
MediaHTTPConnection.cpp
dd6b599598b5062da7e82fbb3cdf34cd147057d9 09-Jun-2015 Eric Laurent <elaurent@google.com> am c75a989a: Merge "Use only strong references to AudioEffect" into mnc-dev

* commit 'c75a989a38a157d48ca34bf127d5b4533e9356a7':
Use only strong references to AudioEffect
eecd7659823504c6c65a2b0f4267515a8e3f24cb 05-Jun-2015 Eric Laurent <elaurent@google.com> Use only strong references to AudioEffect

Do not refer to an AudioEffect instance by a raw pointer from the
child AudioEffectClient.

Also align destructor cleanup sequence on those of AudioTrack
and AudioRecord.

Bug: 21629892.

Change-Id: I970307aedbc38db2e41a2cc652fd6df9112f712c
udioEffect.cpp
cb39c917ead7f7e2ad8e9113a9936a16f501a5ca 06-Jun-2015 Lajos Molnar <lajos@google.com> am 26a48f30: stagefright: add support for batching OMX events

* commit '26a48f304a8754d655e554178ffb6d7ba4c5aac3':
stagefright: add support for batching OMX events
26a48f304a8754d655e554178ffb6d7ba4c5aac3 04-Jun-2015 Lajos Molnar <lajos@google.com> stagefright: add support for batching OMX events

Bug: 20503131
Change-Id: I762c419ed1245f8b83fb1f6bf61e5557213ca07b
OMX.cpp
6ec2fa6d3822adc3f73264e6c9fc7f340b581fb5 05-Jun-2015 Andy Hung <hunga@google.com> am 81c4d806: Merge "Improve AudioTrack offload timestamp startup glitch detector" into mnc-dev

* commit '81c4d806c574271e6e4e49a795bcbe809af4eff0':
Improve AudioTrack offload timestamp startup glitch detector
fffb53cfdfaaa090dec16429d62de9ccc79db053 05-Jun-2015 Andy Hung <hunga@google.com> am 1830513e: Merge "Compute sleep time when AudioTrack client callback returns no PCM data" into mnc-dev

* commit '1830513e7a2638e627a7991bc0c786451eadfc0b':
Compute sleep time when AudioTrack client callback returns no PCM data
c8e09c610fabc7390297ecb48e939acbdfe27325 04-Jun-2015 Andy Hung <hunga@google.com> Improve AudioTrack offload timestamp startup glitch detector

New or existing glitch behavior for Nexus 5 offload audio:
we receive several 0 timestamps,
then we get a stale timestamp (very large),
then a few ms later we get a correct nonzero timestamp.

We attempt to hide the glitch because the retrograde timestamp
correction makes the glitch "sticky".

Bug: 21633313
Change-Id: I39153af718c151f9435e7d315651a811f72743da
udioTrack.cpp
a7f03353d5f172016f324e2a01f301cca6794152 01-Jun-2015 Andy Hung <hunga@google.com> Compute sleep time when AudioTrack client callback returns no PCM data

Callbacks can go into a sleep-wait cycle if the client/app is unable to
deliver data. This can happen if the buffer is large, or if
the client/app cannot keep the buffer filled, or upon a stream end condition.
We improve the sleep time computation for AudioTrack PCM callbacks.

This minimizes the number of callbacks to NuPlayerRenderer.

Bug: 21198655
Change-Id: I4247798a6638def2f0d8f1b46f60323482065cb2
udioTrack.cpp
f4bc7dac039cb3b762f23dc758172597f51c3d82 03-Jun-2015 Lajos Molnar <lajos@google.com> am 15ab4996: stagefright: add support for fences in OMX

* commit '15ab4996019387f27a48b81cb4774c21502bc0e5':
stagefright: add support for fences in OMX
15ab4996019387f27a48b81cb4774c21502bc0e5 01-Jun-2015 Lajos Molnar <lajos@google.com> stagefright: add support for fences in OMX

Pass Fence between Surface and ACodec, and between ACodec and IOMX.

Bug: 12386081
Change-Id: Ifdc566979dec0d91ed8b07c3b69d2cf092accc73
OMX.cpp
46f7ee06c45732705f742fadb6140a236362c019 02-Jun-2015 Andy Hung <hunga@google.com> am 0eafa9d8: Merge "Store server latency, sample rate, framecount information in AudioTrack" into mnc-dev

* commit '0eafa9d8ee4069aa709ff85ceffe94d12995956d':
Store server latency, sample rate, framecount information in AudioTrack
0eafa9d8ee4069aa709ff85ceffe94d12995956d 02-Jun-2015 Andy Hung <hunga@google.com> Merge "Store server latency, sample rate, framecount information in AudioTrack" into mnc-dev
bf39c11f89aeb008b4edfce93218aead5048dd1f 02-Jun-2015 Lajos Molnar <lajos@google.com> am 05421987: stagefright: rework metadata buffer support

* commit '054219874873b41f1c815552987c10465c34ba2b':
stagefright: rework metadata buffer support
7fcc4ef203515737cd9a8f85277aaeee6123591e 02-Jun-2015 Lajos Molnar <lajos@google.com> am cc7cc673: stagefright: allow to overallocate OMX codec buffers

* commit 'cc7cc67349b7a3f498882087aa42ffc05a2daf11':
stagefright: allow to overallocate OMX codec buffers
054219874873b41f1c815552987c10465c34ba2b 16-May-2015 Lajos Molnar <lajos@google.com> stagefright: rework metadata buffer support

- Add fence to new metadata buffer mode structure, but don't use it
yet, so that we don't have to add another mode soon.
- Change GraphicBuffers to ANativeWindowBuffer in new metadata mode.
This removes internal depencency from vendor codecs.
- Extend new metadata mode from SW encoders to all codecs.
- Fallback from new metadata mode to old mode (so Camera can always
use the new mode even with legacy codecs)

Related-bug: 19614055
Bug: 13222807
Change-Id: I405a21dd6ce8e99808f633bfeab8f14278eb7079
OMX.cpp
9f9e21ed9a342e0ca945818bdc6c0c4fb3bfb9bd 01-Jun-2015 Andy Hung <hunga@google.com> Store server latency, sample rate, framecount information in AudioTrack

Bug: 21198655
Change-Id: I24590196642a97ea5d61bc6356f0aff782bd37d3
udioTrack.cpp
cc7cc67349b7a3f498882087aa42ffc05a2daf11 01-Jun-2015 Lajos Molnar <lajos@google.com> stagefright: allow to overallocate OMX codec buffers

Specify allottedSize for useBuffer and allocateBufferWithBackup,
where OMX will see only the allottedSize, even though framework may
allocate and use a bigger buffer.

Bug: 13222807
Change-Id: Ibfa93f6c7b7c8ca0853ef17d4a0758e496eaf921
OMX.cpp
1f776a6d02ae592c6db1005dcb332f886dfe8f96 01-Jun-2015 Chong Zhang <chz@google.com> am 187b78c3: Merge "remove video editor from MediaProfile" into mnc-dev

* commit '187b78c384ddc0119da9909e89884ed5511a01e9':
remove video editor from MediaProfile
279795ceacea01dd05cd7c19783f3f68cb7a8e9f 01-Jun-2015 Glenn Kasten <gkasten@google.com> am db431db5: Merge "Deprecations are warnings not errors" into mnc-dev

* commit 'db431db53fbbb9024b6e72c528e2d195d63ad544':
Deprecations are warnings not errors
187b78c384ddc0119da9909e89884ed5511a01e9 30-May-2015 Chong Zhang <chz@google.com> Merge "remove video editor from MediaProfile" into mnc-dev
db431db53fbbb9024b6e72c528e2d195d63ad544 29-May-2015 Glenn Kasten <gkasten@google.com> Merge "Deprecations are warnings not errors" into mnc-dev
f6b3e7db0b18a7d187d026dd729ae12fd521005e 18-May-2015 Glenn Kasten <gkasten@google.com> Deprecations are warnings not errors

Change-Id: Ib77f45fdc27ea53f1dd181f48c76810d03f8dcdb
ndroid.mk
ba3e7f5b31b8110ee93b69d28002a1827fd1346b 28-May-2015 Chong Zhang <chz@google.com> remove video editor from MediaProfile

bug: 17112465
Change-Id: Id59ba13e9c796298ad7dbaf03a595cc1fa62c169
ediaProfiles.cpp
dfbd894b8c91a340d7aaf7b836e01504114e4016 27-May-2015 Ronghua Wu <ronghuawu@google.com> am 5eabb019: Merge "libmedia: read from parcel only when there\'s a data available." into mnc-dev

* commit '5eabb0191ab25a45ae19575a7a443ba12bd1800a':
libmedia: read from parcel only when there's a data available.
d66ef45e09272b85a79c8d3c87666f26269bfa68 27-May-2015 Ronghua Wu <ronghuawu@google.com> libmedia: read from parcel only when there's a data available.

Bug: 21374704
Change-Id: I87dc2ee36fe8db99cceeb25ec6657feb423de133
ResourceManagerService.cpp
8830b4c8b2566486d68c067c3bfad5dad5bf94c1 22-May-2015 Ronghua Wu <ronghuawu@google.com> am 3a9a6ea4: Merge "libmedia: fix unmatch Parcel read in BnResourceManagerService::onTransact." into mnc-dev

* commit '3a9a6ea4e9f67c6a43f00ae3d980eb475e49deaf':
libmedia: fix unmatch Parcel read in BnResourceManagerService::onTransact.
475ed1d6c842abdb773fa8e39290375ceda39b62 22-May-2015 Ronghua Wu <ronghuawu@google.com> am 0a7989f5: Merge "libmediaplayerservice: try to open audio sink in offload mode in error." into mnc-dev

* commit '0a7989f5691f161fff97dd550eb602e44a6e6185':
libmediaplayerservice: try to open audio sink in offload mode in error.
3a9a6ea4e9f67c6a43f00ae3d980eb475e49deaf 22-May-2015 Ronghua Wu <ronghuawu@google.com> Merge "libmedia: fix unmatch Parcel read in BnResourceManagerService::onTransact." into mnc-dev
0a7989f5691f161fff97dd550eb602e44a6e6185 22-May-2015 Ronghua Wu <ronghuawu@google.com> Merge "libmediaplayerservice: try to open audio sink in offload mode in error." into mnc-dev
faeb0f291330134dc4468359a36e099aae508449 21-May-2015 Ronghua Wu <ronghuawu@google.com> libmediaplayerservice: try to open audio sink in offload mode in error.

Bug: 19061432
Bug: 21370108
Change-Id: Iaa757555ef37fd1ac87b6e2d5a9969bb58cc5ebc
udioTrack.cpp
2d32dcde5ba90063a269b2117dee810037eede33 22-May-2015 Ronghua Wu <ronghuawu@google.com> libmedia: fix unmatch Parcel read in BnResourceManagerService::onTransact.

Bug: 21374704
Change-Id: Ibe8823a55b597fe5a70d6b4c5214695263712204
ResourceManagerService.cpp
9d774ecdb266c42c440f68404ebcbea3541d3370 21-May-2015 Eric Laurent <elaurent@google.com> am 748a792b: Merge "audio flinger: do not call JAVA services until system is ready" into mnc-dev

* commit '748a792be85838c429ebf46acf7d6eb02e79f00b':
audio flinger: do not call JAVA services until system is ready
748a792be85838c429ebf46acf7d6eb02e79f00b 21-May-2015 Eric Laurent <elaurent@google.com> Merge "audio flinger: do not call JAVA services until system is ready" into mnc-dev
72e3f39146fce4686bd96f11057c051bea376dfb 20-May-2015 Eric Laurent <elaurent@google.com> audio flinger: do not call JAVA services until system is ready

Wait for system ready indication form AudioService before enabling
calls to scheduling service or power manager.

Bug: 11520969.
Change-Id: I221927394f4a08fd86c9d457e55dd0e07949f0cf
udioSystem.cpp
AudioFlinger.cpp
3d4d897cf6a933dd02e8d83e674a4ecfe2ea578b 19-May-2015 Glenn Kasten <gkasten@google.com> am d45d75d7: Merge "Clear mAudioRecord and mAudioTrack on set() failure" into mnc-dev

* commit 'd45d75d7c19811c5afe9b115c7282f9aa4e1ee4d':
Clear mAudioRecord and mAudioTrack on set() failure
3e98ecd18c906dc3ac2ff1a890f0b3163447272d 18-May-2015 Glenn Kasten <gkasten@google.com> Clear mAudioRecord and mAudioTrack on set() failure

Bug: 20818955
Bug: 20890069
Change-Id: I243205b99b198eb1b5a1a027b27cbb7d5aaaa8db
etPlayer.cpp
1181db0dc7207c18b11fb41d5d985999617a23e0 15-May-2015 Chong Zhang <chz@google.com> am a6e9dd94: am 270caf9a: am 23d41fb1: am 2a9ccb66: am fd3a6e71: HDCP: buffer over flow check -- DO NOT MERGE

* commit 'a6e9dd941a3055526f6e967017e91a76c153087a':
HDCP: buffer over flow check -- DO NOT MERGE
96a41a2ba5985aeb9163923f54d84cdaa3d0363d 15-May-2015 Chong Zhang <chz@google.com> am dbe6c320: HDCP: buffer over flow check -- DO NOT MERGE

* commit 'dbe6c320b414d8139c46aaf880d5f154ef4f9af8':
HDCP: buffer over flow check -- DO NOT MERGE
23d41fb11de0a5acb12733f7cd8875ea06d99eb5 15-May-2015 Chong Zhang <chz@google.com> am 2a9ccb66: am fd3a6e71: HDCP: buffer over flow check -- DO NOT MERGE

* commit '2a9ccb66c052d16e870d2db1fa6edb9a39f6526b':
HDCP: buffer over flow check -- DO NOT MERGE
fd3a6e7126023e01da119a2587cdf8505c4d1809 28-Apr-2015 Chong Zhang <chz@google.com> HDCP: buffer over flow check -- DO NOT MERGE

bug: 20222489
Change-Id: I3a64a5999d68ea243d187f12ec7717b7f26d93a3
(cherry picked from commit 532cd7b86a5fdc7b9a30a45d8ae2d16ef7660a72)
HDCP.cpp
dbe6c320b414d8139c46aaf880d5f154ef4f9af8 28-Apr-2015 Chong Zhang <chz@google.com> HDCP: buffer over flow check -- DO NOT MERGE

bug: 20222489
Change-Id: I3a64a5999d68ea243d187f12ec7717b7f26d93a3
(cherry picked from commit 532cd7b86a5fdc7b9a30a45d8ae2d16ef7660a72)
HDCP.cpp
f2b90f170a3afad1ab5f8fbdf20c23284189c213 13-May-2015 Chong Zhang <chz@google.com> am 55c3bd0c: Merge "stagefright: rename usePersistentInputSurface to setInputSurface" into mnc-dev

* commit '55c3bd0cacfb6e1601cd03fdba814be544a34326':
stagefright: rename usePersistentInputSurface to setInputSurface
8f469e18c307cb9dc0d16ed9225972aa8be4516f 13-May-2015 Chong Zhang <chz@google.com> stagefright: rename usePersistentInputSurface to setInputSurface

and clear persistent surface pointer when MediaRecorder is reset

bug: 21045118
bug: 21045402
Change-Id: Ifd0d6deeb969f2252123929541b30b518cecbf9a
MediaRecorder.cpp
OMX.cpp
ediarecorder.cpp
d82d34c319e89cd043af5ca2f3ffd4ebf2da8228 08-May-2015 Ronghua Wu <ronghuawu@google.com> am 9ba21b94: libstagefright: config resource manager with secure codec co-existing policy.

* commit '9ba21b9418d10ddcc39f08901e24fbf43d82b2bc':
libstagefright: config resource manager with secure codec co-existing policy.
9ba21b9418d10ddcc39f08901e24fbf43d82b2bc 21-Apr-2015 Ronghua Wu <ronghuawu@google.com> libstagefright: config resource manager with secure codec co-existing policy.

Bug: 19620911
Change-Id: I0d729782c1622f23e9c37b7a9231e58e3f807470
ediaResourcePolicy.cpp
0460d51dd85680b2335d670f9197848cf7ac6866 07-May-2015 Chong Zhang <chz@google.com> am d975e98a: Merge "MediaHTTP: add more null ptr and init checks" into mnc-dev

* commit 'd975e98aac096b8b0ed600f39c18630ba234ef7d':
MediaHTTP: add more null ptr and init checks
d975e98aac096b8b0ed600f39c18630ba234ef7d 07-May-2015 Chong Zhang <chz@google.com> Merge "MediaHTTP: add more null ptr and init checks" into mnc-dev
37d8b27e5470d8243288a87e90871efd43f29606 07-May-2015 Chong Zhang <chz@google.com> MediaHTTP: add more null ptr and init checks

bug: 20912192
Change-Id: I83cf59ff85fd8aa3a19a696ceb97cd8aa922b8ba
MediaHTTPService.cpp
2806bf0307c622b3633caff7742a5553086b4c01 07-May-2015 Marco Nelissen <marcone@google.com> am 831352e9: am d7446564: am 1e5670ab: am 296dc670: am d8e41553: am bd28ac74: am 59cea261: Add some sanity checks

* commit '831352e926c2896996df285b343cc06f39053499':
Add some sanity checks
831352e926c2896996df285b343cc06f39053499 07-May-2015 Marco Nelissen <marcone@google.com> am d7446564: am 1e5670ab: am 296dc670: am d8e41553: am bd28ac74: am 59cea261: Add some sanity checks

* commit 'd7446564c3e469aea1bba5460ff1fb9441f9fc09':
Add some sanity checks
d7446564c3e469aea1bba5460ff1fb9441f9fc09 07-May-2015 Marco Nelissen <marcone@google.com> am 1e5670ab: am 296dc670: am d8e41553: am bd28ac74: am 59cea261: Add some sanity checks

* commit '1e5670abf9c1b714819ab6ec529a6bc19cbdacf4':
Add some sanity checks
d8e41553b96432c4d4dae80fcc042b95fd9d27d9 07-May-2015 Marco Nelissen <marcone@google.com> am bd28ac74: am 59cea261: Add some sanity checks

* commit 'bd28ac7471e2c7cab0ce9df4c2d5a295adc163a1':
Add some sanity checks
c28f8372a37664191168372c4d77c2a2adf86d0b 06-May-2015 Eric Laurent <elaurent@google.com> am d7ab7afa: Merge "Implement audio device callback" into mnc-dev

* commit 'd7ab7afa57ed1fa6fb9c4ce18ea0df3ec939c067':
Implement audio device callback
d7ab7afa57ed1fa6fb9c4ce18ea0df3ec939c067 06-May-2015 Eric Laurent <elaurent@google.com> Merge "Implement audio device callback" into mnc-dev
c14649e2e7313bb63301b577b562e60c4df64188 06-May-2015 Jeff Tinker <jtinker@google.com> am eb58c6d9: Merge "Pass all DRM errors through ICrypto" into mnc-dev

* commit 'eb58c6d9ee8eac81864aaecb38a1831014ebf152':
Pass all DRM errors through ICrypto
eb58c6d9ee8eac81864aaecb38a1831014ebf152 06-May-2015 Jeff Tinker <jtinker@google.com> Merge "Pass all DRM errors through ICrypto" into mnc-dev
296fb13dd9b5e90d6a05cce897c3b1e7914a478a 01-May-2015 Eric Laurent <elaurent@google.com> Implement audio device callback

Add class AudioSystem::AudioDeviceCallback notifying
AudioSystem clients upon device selection change on a given
input or output thread.
Maintain a list of installed callback per I/O handle in AudioSystem
and call registered callbacks when an OPEN of CONFIG_CHANGED event
is received on IAudioFlingerClient::ioConfigChanged().
Add methods to AudioTrack and AudioRecord to add and remove device
change callbacks.
Add methods to AudioTrack and AudioRecord to query currently selected
device.
ioConfigChanged() events now convey the audio patch describing
the input or output thread routing.

Fix AudioRecord failure to start when invalidation is
handled by start().

Change-Id: I9e938adf025fa712337c63b1e02a8c18f2a20d39
udioRecord.cpp
udioSystem.cpp
udioTrack.cpp
AudioFlingerClient.cpp
ceffd8cc911bd2e685b525f838cd3d8198ab35cf 06-May-2015 Jeff Tinker <jtinker@google.com> Pass all DRM errors through ICrypto

Previously only the detailed messages for vendor-defined DRM
errors were being passed. This change allows detailed messages
to be passed for any DRM error, including the ones defined in
the framework.

bug: 20857014
Change-Id: I72aa85b31ac852fb1fb6ad0a93f3309100b52c9d
Crypto.cpp
f7118daa00bb7bc2c54c384159a72c4910f10e01 05-May-2015 Jean-Michel Trivi <jmtrivi@google.com> am 9f578d32: Merge "AudioRecord keeps track of UID" into mnc-dev

* commit '9f578d3297782be6de5373e171f3b4af49726709':
AudioRecord keeps track of UID
9f578d3297782be6de5373e171f3b4af49726709 05-May-2015 Jean-Michel Trivi <jmtrivi@google.com> Merge "AudioRecord keeps track of UID" into mnc-dev
4cb668392ee0433462251afbee109405c6efacc8 02-May-2015 Jean-Michel Trivi <jmtrivi@google.com> AudioRecord keeps track of UID

Bug 20832981

Change-Id: If5f3c61fae02d86b9d6fdf411711f854fd56c77d
udioRecord.cpp
AudioFlinger.cpp
b7e16c36e19859e1f702581f30c42e85e52010fa 02-May-2015 Chong Zhang <chz@google.com> am e2a2dfcb: MediaRecorder: implement persistent input surface APIs

* commit 'e2a2dfcbf0c9d6bb7139263ecf0d8e53b4ca1049':
MediaRecorder: implement persistent input surface APIs
a4ea4775492cd94fafb38f69dfb8f3591e8bbc50 02-May-2015 Chong Zhang <chz@google.com> am d291c222: MediaCodec: implement persistent input surface APIs

* commit 'd291c222357303b9611cab89d0c3b047584ef377':
MediaCodec: implement persistent input surface APIs
e2a2dfcbf0c9d6bb7139263ecf0d8e53b4ca1049 01-May-2015 Chong Zhang <chz@google.com> MediaRecorder: implement persistent input surface APIs

Bug: 19127604
Bug: 19489395

Change-Id: I7dd8015a8fe029f9867fcdb52322629c77eff50b
MediaRecorder.cpp
ediarecorder.cpp
d291c222357303b9611cab89d0c3b047584ef377 01-May-2015 Chong Zhang <chz@google.com> MediaCodec: implement persistent input surface APIs

Bug: 19127604
Bug: 19489395

Change-Id: Idaf1cc9008016f66903e93907a676f54e342e1a3
OMX.cpp
cbe655e7b7039fe9e2347c9e9a0736ff43f06056 02-May-2015 Phil Burk <philburk@google.com> am 93927035: Merge "AudioTrack: reduce retrograde motion spew" into mnc-dev

* commit '939270353bff5bc7497b0c77e203520b997268c9':
AudioTrack: reduce retrograde motion spew
939270353bff5bc7497b0c77e203520b997268c9 01-May-2015 Phil Burk <philburk@google.com> Merge "AudioTrack: reduce retrograde motion spew" into mnc-dev
d3c388fd4b2c4739bbc3200463d127d4926f4e23 01-May-2015 Eric Laurent <elaurent@google.com> am cc85abcf: Merge "AudioSystem: refactor audio config cache and callbacks" into mnc-dev

* commit 'cc85abcf4ac398dca240db356b8b4db052b415a4':
AudioSystem: refactor audio config cache and callbacks
cc85abcf4ac398dca240db356b8b4db052b415a4 01-May-2015 Eric Laurent <elaurent@google.com> Merge "AudioSystem: refactor audio config cache and callbacks" into mnc-dev
73e26b661af50be2c0a4ff6c9ac85f7347a8b235 28-Apr-2015 Eric Laurent <elaurent@google.com> AudioSystem: refactor audio config cache and callbacks

Clean up implementation of audio configuration cache and
callback events from AudioFlinger:

- Define class AudioIoDescriptor for audio input and output
configurations outside of AudioSystem class.
- Do not use void * but an AudioIoDescriptor as argument to
audio config callbacks from AudioFlinger.
- Remove unused configuration events.
- Move AudioSystem audio input and output cache from static singletons to
members of AudioFlingerClient subclass.

Change-Id: I67c196c32c09ce2756af0755ee1fe631040c3270
udioSystem.cpp
AudioFlingerClient.cpp
4c5a3675ed6b429dfaa2707acf2b3faf2808baf2 01-May-2015 Phil Burk <philburk@google.com> AudioTrack: reduce retrograde motion spew

Change-Id: I96aced52b136ceea924aa3d9ef56374dd4c49784
Signed-off-by: Phil Burk <philburk@google.com>
udioTrack.cpp
0ab2c4ce6f669722c055f1f4d35d6a79d21ba7c7 01-May-2015 Lajos Molnar <lajos@google.com> am 3a474aa6: stagefright: support setting/getting playback/sync config in MediaSync

* commit '3a474aa67fc31505740526dd249d96204c08bf79':
stagefright: support setting/getting playback/sync config in MediaSync
3a474aa67fc31505740526dd249d96204c08bf79 25-Apr-2015 Lajos Molnar <lajos@google.com> stagefright: support setting/getting playback/sync config in MediaSync

Bug: 18249558
Bug: 19666434
Bug: 20057497
Change-Id: I5868b17423d7c20cfaf4a399f3eb67bfba440605
udioTrack.cpp
MediaPlayer.cpp
ediaplayer.cpp
b61645e06c829d9775b4cbc933eec6f0e7cb3713 01-May-2015 Phil Burk <philburk@google.com> am 5aab9254: AudioTrack: fix build

* commit '5aab9254a5c4f1951c12216a71550ab95b4adeaa':
AudioTrack: fix build
5aab9254a5c4f1951c12216a71550ab95b4adeaa 30-Apr-2015 Phil Burk <philburk@google.com> AudioTrack: fix build

Using format %llu did not work for uint64_t on 64-bit systems!

Change-Id: I727094e460141b9da3e433ceaa95e069dad948bc
Signed-off-by: Phil Burk <philburk@google.com>
udioTrack.cpp
42d9c221bb06c481406fb282265bde4f30e40aef 30-Apr-2015 Phil Burk <philburk@google.com> am dc0ac804: Merge "AudioTrack: fix spurious retrograde messages" into mnc-dev

* commit 'dc0ac804721efff054ec9720d53e93ecca86cf5e':
AudioTrack: fix spurious retrograde messages
dc0ac804721efff054ec9720d53e93ecca86cf5e 30-Apr-2015 Phil Burk <philburk@google.com> Merge "AudioTrack: fix spurious retrograde messages" into mnc-dev
18e28f0d24e704a8d147e34005a38837758988a9 30-Apr-2015 Eric Laurent <elaurent@google.com> am 5f9bf493: Merge "audio policy: session routes continued." into mnc-dev

* commit '5f9bf49397b36ad4ebd838aef66b83e9e9fa42bc':
audio policy: session routes continued.
5f9bf49397b36ad4ebd838aef66b83e9e9fa42bc 30-Apr-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: session routes continued." into mnc-dev
8c7e6dac6f5eb38cef627dab92eac8b38513450c 22-Apr-2015 Eric Laurent <elaurent@google.com> audio policy: session routes continued.

- Clear session routes when client process dies.
- Enforce the route only when the requesting session is active.
- Fix requested route not working if an output mix change is required
(e.g forcing to SPEAKER when the default route is USB or A2DP).
- Make sure all sessions sharing the strategy with a rerouted session
have the same route (needed for volume control consistency)

Change-Id: I0ab347a8fb97e73e2c5965374544c5f4fe509ef1
udioRecord.cpp
udioSystem.cpp
udioTrack.cpp
AudioPolicyService.cpp
0b60193059dac3f409640b9a7ae44e99761923a0 30-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> am d641af3e: Merge "AudioSystem callback for dynamic policy mix activity" into mnc-dev

* commit 'd641af3e9faf6c053ccbeea1bc20790021e57a11':
AudioSystem callback for dynamic policy mix activity
d641af3e9faf6c053ccbeea1bc20790021e57a11 30-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> Merge "AudioSystem callback for dynamic policy mix activity" into mnc-dev
f613d42b12389335b2ecf06df18d0d095d6bfd44 24-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> AudioSystem callback for dynamic policy mix activity

Add method to AudioPolicyServiceClient for dynamic policy mix
activity notification.
Propagate notification to a dedicated callback.

Bug 20226914

Change-Id: I37928ed38e15ea2b8fed022cccadeca8c4d6c876
udioPolicy.cpp
udioSystem.cpp
1b42097f38e72574ed853a35f4e8a66e4739c421 22-Apr-2015 Phil Burk <philburk@google.com> AudioTrack: fix spurious retrograde messages

The retrograde motion was confused by some positions coming from
the DSP on offloaded tracks. So the retrograde check was moved up
into AudioTrack.cpp. This allows us to take advantage of the checks
for invalid positions based on timing.

Bug: 2047891
Change-Id: Ifcad2349201443a7f1711347c203297100449536
Signed-off-by: Phil Burk <philburk@google.com>
udioTrack.cpp
5f63ceb4a27ed48df4f4cd4685b45f5608881edd 29-Apr-2015 Dianne Hackborn <hackbod@google.com> am eaa34703: Fix build.

* commit 'eaa34703cb5f1acedb20cbcdff1ab79c11ff6857':
Fix build.
eaa34703cb5f1acedb20cbcdff1ab79c11ff6857 29-Apr-2015 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: Ic8ae065dd912cb5ff130e8d78c98fd6bed4e11cc
AudioFlinger.cpp
7cc31f737508b7fd3205b9d8f971bffb71498740 29-Apr-2015 Svet Ganov <svetoslavganov@google.com> am afc750aa: Merge "Respect the record audio app op - media" into mnc-dev

* commit 'afc750aa3ac536067180f9714e34f626f8c981b3':
Respect the record audio app op - media
afc750aa3ac536067180f9714e34f626f8c981b3 29-Apr-2015 Svet Ganov <svetoslavganov@google.com> Merge "Respect the record audio app op - media" into mnc-dev
be71aa29a3c86d2e01cd17839d2a72ab09a1bce5 28-Apr-2015 Svet Ganov <svetoslavganov@google.com> Respect the record audio app op - media

Change-Id: I3a97977b6e9a09355e2008f780d22d480fb7308b
udioEffect.cpp
udioRecord.cpp
AudioFlinger.cpp
MediaPlayerService.cpp
isualizer.cpp
ediarecorder.cpp
f7e5a2e0c597cf2e7206c77a01009c96e6efb69b 29-Apr-2015 Marco Nelissen <marcone@google.com> am 5ca48347: am 67cb6d1c: Merge "Check allocation"

* commit '5ca4834740cb4eb3707eb7c557f42091fbabe006':
Check allocation
67cb6d1c1a1b02ebf411aee6901c42f121b9ef98 29-Apr-2015 Marco Nelissen <marcone@google.com> Merge "Check allocation"
170c73beeaf65e3a5ce8e969a9100c14557961c1 28-Apr-2015 Marco Nelissen <marcone@google.com> Check allocation

Bug: 20222446
Change-Id: I2f366a907886cd65e12a6f260a2ec77af6fb7b41
HDCP.cpp
4c3ba337bacce05165d37f63dfa0b7e845c391e0 28-Apr-2015 Marco Nelissen <marcone@google.com> Check allocation

Bug: 20222446
Change-Id: I2f366a907886cd65e12a6f260a2ec77af6fb7b41
HDCP.cpp
10aa4356e1f7ad38be7207eff735c288e941fe31 28-Apr-2015 Paul McLean <pmclean@google.com> am 466dc8ed: Explicit routing in AudioRecord

* commit '466dc8ed6ca6b7f585104806c48613dd34e608c9':
Explicit routing in AudioRecord
466dc8ed6ca6b7f585104806c48613dd34e608c9 17-Apr-2015 Paul McLean <pmclean@google.com> Explicit routing in AudioRecord

Change-Id: I9cc5d54883a3e5c75d553fabb619fc8e49f4f9e5
udioRecord.cpp
udioSystem.cpp
AudioPolicyService.cpp
36a5c7bae52dc4f5ee1704cd702a6d35135a995b 28-Apr-2015 Chong Zhang <chz@google.com> am dae24729: Merge "HDCP: buffer over flow check" into mnc-dev

* commit 'dae24729d0b3ced8c4a7d7f9b631e852f564db4f':
HDCP: buffer over flow check
580387a47e1e7419d9d9afc1dc2605759650b229 28-Apr-2015 Ronghua Wu <ronghuawu@google.com> am c721e71f: DO NOT MERGE libmedia: add sub resource type audio-codec and video-codec.

* commit 'c721e71f4d7e3cd4fc9332fd55fb6942f54cec39':
DO NOT MERGE libmedia: add sub resource type audio-codec and video-codec.
9c3e9c4ffd385abf12823cd3ffe0ee0bc688af76 28-Apr-2015 Marco Nelissen <marcone@google.com> am 31c81e9e: am b8111f83: Merge "Fix potential double close in IMediaMetadataRetriever::setDataSource"

* commit '31c81e9e4a468a448b387d5c905b4ac5c6a014fc':
Fix potential double close in IMediaMetadataRetriever::setDataSource
dae24729d0b3ced8c4a7d7f9b631e852f564db4f 28-Apr-2015 Chong Zhang <chz@google.com> Merge "HDCP: buffer over flow check" into mnc-dev
532cd7b86a5fdc7b9a30a45d8ae2d16ef7660a72 28-Apr-2015 Chong Zhang <chz@google.com> HDCP: buffer over flow check

bug: 20222489
Change-Id: I3a64a5999d68ea243d187f12ec7717b7f26d93a3
HDCP.cpp
c721e71f4d7e3cd4fc9332fd55fb6942f54cec39 25-Apr-2015 Ronghua Wu <ronghuawu@google.com> DO NOT MERGE libmedia: add sub resource type audio-codec and video-codec.

Bug: 20559813
Change-Id: If231cb44337ca7dc74c39fc3cd73e2b6f3cb85b8
(cherry picked from commit d4c1f6b4ecfef7323422359fc38bd1edb1abf205)
ediaResource.cpp
8f9dd872366f54b6260506c75c3d0cc3f9f73f81 24-Apr-2015 Ronghua Wu <ronghuawu@google.com> mediaresourcemanager: add dumpsys support.

Bug: 20233206
Change-Id: Ic253985e408b05b488e87cd5c50c0d619ac568ef
ResourceManagerClient.cpp
983f2e02b342ef3ac4004471cbfd4cd8d5aecf7d 22-Apr-2015 Ricardo Garcia <rago@google.com> Merge "Use AudioPlaybackRate to hold TimestretchBufferProvider parameters"
5a8a95de6dad1a3bcf3da5a37b35766e89086e13 18-Apr-2015 Ricardo Garcia <rago@google.com> Use AudioPlaybackRate to hold TimestretchBufferProvider parameters

Use this struct to handle the parameters for TimestretchBufferProvider all
across the system.
Add stretch mode and fallback mode to TimestretchBuffer Provider.

Change-Id: I19099924a7003c62e48bb6ead56c785cb129fba2
udioTrack.cpp
udioTrackShared.cpp
59cea2616269f34b1f3d046995efd8da42cd5549 20-Apr-2015 Marco Nelissen <marcone@google.com> Add some sanity checks

Bug: 19400722
Change-Id: Ib3afdf73fd4647eeea5721c61c8b72dbba0647f6
MediaHTTPConnection.cpp
493404d8c396e15ed73455acd39aa0f1940996e2 22-Apr-2015 Eric Laurent <elaurent@google.com> audio policy: fix AudioTrack output device selection

Have AudioTrack::setOutputDevice() set CBLK_INVALID flag instead
of calling restoreTrack_l(). This allows restoreTrack_l() to be called in
a safe context.

Allow device change while the AudioTrack is active by forcing a new
device selection in startOutput() if the output route for this
session was changed.

Remove some warnings.

Change-Id: I2d921a63c9bfa0e122233645e2d6d39f95f5f17d
udioTrack.cpp
55203e2e29428c2c7bd830d731f5e6ed890d9a10 21-Apr-2015 Taiju Tsuiki <tzik@google.com> Fix potential double close in IMediaMetadataRetriever::setDataSource

IMediaMetadataRetriever::setDataSource(fd, offset, length) takes the ownership
of |fd| on the direct invocation, and doesn't take the ownership on invocation
from Binder. This is inconsintent to other similar methods like
IMediaPlayer::setDataSource, and causes potential double close of |fd|.

This CL changes the caller and implementations to leave the ownership to make
them consistent.
Also, fixes a double close in IMediaPlayerService::setDataSource in an error
case.

Change-Id: Id551a1e725c4392b0fe6b7293871212eb101c0a5
MediaMetadataRetriever.cpp
f1063e2659cad01ec334a265c31734c63c319cc4 18-Apr-2015 Lajos Molnar <lajos@google.com> libmedia: fix all warning, make warnings errors, use clang

Change-Id: Ic00d2c5d0bbb1605e96666e25c9ccc22bea6d3ff
ndroid.mk
udioSystem.cpp
udioTrack.cpp
udioTrackShared.cpp
haracterEncodingDetector.cpp
MediaLogService.cpp
ResourceManagerService.cpp
ediaProfiles.cpp
ediaResource.cpp
ediaResourcePolicy.cpp
emoryLeakTrackUtil.cpp
oneGenerator.cpp
9ef830c6dbd4f6000b94abee3df14b9e27a38294 02-Apr-2015 Eric Laurent <elaurent@google.com> DO NOT MERGE - IAudioFlinger: add checks on binder calls

Limit number of ports and patches listed by
LIST_AUDIO_PATCHES and LIST_AUDIO_PORTS.

Also fix typo causing wring pointer to be used when writing to Parcel.

Bug: 19573085.
Change-Id: I41a9c710e45738a4f11990160587856c429a4646
AudioFlinger.cpp
0852843d304006e3ab333081fddda13b07193de8 08-Apr-2015 Robert Shih <robertshih@google.com> stagefright: initial timed id3 support in hls

Change-Id: I00a8a786b3f4b74742c34770edd94e937abe20a8
ediaplayer.cpp
71933d769c54dadb5d8618ccb1ae69a3926f890b 16-Apr-2015 Andy Hung <hunga@google.com> Merge "Work around lack of pitch adjustment in Timestretcher"
c224ec53a17994fa97ab2f29304647c9f195c51c 16-Apr-2015 Chris Watkins <watk@google.com> Merge "Unhide the android.media.[Media]DataSource interface."
26145643ce22d797b3b1675c82c47a2d8c79ecaa 16-Apr-2015 Andy Hung <hunga@google.com> Work around lack of pitch adjustment in Timestretcher

Change-Id: I3e057b97c250a826133248b6aa1ff9ed677d88df
udioTrack.cpp
99f31604136d66ae10e20669fb6b5716f342bde0 20-Mar-2015 Chris Watkins <watk@google.com> Unhide the android.media.[Media]DataSource interface.

This allows apps to implement MediaDataSource, which is modeled on
stagefright's DataSource, to supply media data to the framework. This
was already implemented for MediaExtractor, but it was renamed from
DataSource.

MediaExtractor, MediaPlayer and MediaMetadataRetriever each have a new
overload: #setDataSource(android.media.MediaDataSource)

Only NuPlayer supports this new data source.

The change introduces:
* IDataSource: The binder interface for DataSource.
* JMediaDataSource: The native counterpart to the java interface. It
implements IDataSource.
* CallbackDataSource: A stagefright DataSource that wraps an
IDataSource.

Change-Id: Ib3c944b49cc8a792c8eb9c85e5015c07f298ebc1
ndroid.mk
DataSource.cpp
MediaMetadataRetriever.cpp
MediaPlayer.cpp
ediametadataretriever.cpp
ediaplayer.cpp
554a277d4e42a3d3df3d90ba0e7dfa2d31690e32 10-Apr-2015 Eric Laurent <elaurent@google.com> audio policy: add binder calls for audio source control

Add binder methods to IAudioPolicyService to control activity
of external audio sources (e.g FM tuner).

Change-Id: I2008308a6a996baeae502b68a790d87281efe2ff
udioSystem.cpp
AudioPolicyService.cpp
cfdd52423cee9efea73023feeaa74279ebd45b7c 15-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> Merge "AudioPolicyManager: notification of dynamic policy mix activity"
de80105c3f2db0eabd47640c49387ea3b44d4782 15-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> AudioPolicyManager: notification of dynamic policy mix activity

Implement non-stream type specific ref counting in output
descriptors to keep track of mix activity.
Notify audio policy client of mix activity changes.

Bug 20226914

Change-Id: Iec939cb640c58056f88947b611d23b4bb6d8a11b
udioPolicy.cpp
udioSystem.cpp
AudioPolicyServiceClient.cpp
b23cabdb71b98dc5e852f5d06be271696fea92c7 14-Apr-2015 Glenn Kasten <gkasten@google.com> Merge "AudioRecord::obtainBuffer() can return nonContig like AudioTrack"
551b5355d34aa42890811fc3606d3b63429296cd 20-Mar-2015 Glenn Kasten <gkasten@google.com> AudioRecord::obtainBuffer() can return nonContig like AudioTrack

And fix error handling in both AudioRecord and AudioTrack.

Change-Id: I4853d736cc6d2c05de5b18b0eac62716edfa62ec
udioRecord.cpp
udioTrack.cpp
9e6955a19bf77ebf27b770e910efbe1ebf1ceac0 26-Mar-2015 Ronghua Wu <ronghuawu@google.com> media: handle overrides and measure max codec instance.

Bug: 19620911
Change-Id: I68d5919284700f37ccc6c6b9f96cd87ccdd40e6a
MediaCodecList.cpp
ediaCodecInfo.cpp
4c1efbc76f1dfeb9427617e451042a12bfb59ad3 10-Apr-2015 Jeff Tinker <jtinker@google.com> Merge "Add a method to associate MediaDrm session with MediaCrypto"
1849570240443d1f75775c205fa658f7070849c6 10-Apr-2015 Jeff Tinker <jtinker@google.com> Add a method to associate MediaDrm session with MediaCrypto

Previously, to associate a MediaDrm session with MediaCrypto,
the MediaDrm sessionId was passed as initData to the MediaCrypto
constructor. This is not ideal for two reasons: it's pretty
obscure and you can't change the association without tearing
down the MediaCodec/MediaCrypto and starting all over. Use
cases like key rotation require being able to update the
MediaDrm session post-construction. This CL addresses both of
these issues.

bug: 19570317
Change-Id: Ieb32d04d61742fc1dee2105dd904690d44c46c7b
Crypto.cpp
7d014e50b3acd60e73ed7d7a74dc58485c7a413c 10-Apr-2015 Andy Hung <hunga@google.com> Merge "Add playback rate to AudioTrack"
8edb8dc44b8a2f81bdb5db645b6b708548771a31 27-Mar-2015 Andy Hung <hunga@google.com> Add playback rate to AudioTrack

Bug: 19196501
Change-Id: I6411e1d3ce652b711a71a6d9df020cb5f60d4714
udioTrack.cpp
udioTrackShared.cpp
03763a9573fcfdd0f85dd9ac0203e7da525a6c98 09-Apr-2015 Jeff Tinker <jtinker@google.com> Merge "Pass crypto source data using a shared buffer"
c481b5012a5f6cf72e5e93b36f1ed4c9169916f2 07-Apr-2015 Jeff Tinker <jtinker@google.com> Pass crypto source data using a shared buffer

MediaCodec was using a binder transaction buffer
to pass encryption source data for protected content.
On some 4K content, the max binder transaction buffer
size was being exceeded. This change uses a shared
buffer for the encryption source data instead of a
binder transaction buffer, which avoids the problem and
may be more efficient.

bug: 20027687
Change-Id: I36a24ebf600d7e1064b78e48b167fdc29b2c65e9
Crypto.cpp
6770c6faa3467c92eabc5ec9b23d60eb556a0d03 07-Apr-2015 Andy Hung <hunga@google.com> Enable 8 bit and float pcm record formats for AudioFlinger

Update sampling rate handling as well.

Bug: 19570772
Change-Id: I872248e64c0578b2e48869a68fee0d51bd0640c3
udioRecord.cpp
aa9811945f575614b3482d09e4d969792701cebb 21-Mar-2015 Paul McLean <pmclean@google.com> Adding explicit routing API to AudioTrack

Change-Id: I40c048c7644c46f4e4f7103875206c0785c4b1dc
udioSystem.cpp
udioTrack.cpp
AudioPolicyService.cpp
002135d149d8604e972d1b353d768f293fbce15f 03-Apr-2015 Chong Zhang <chz@google.com> Merge "HLS: misc bug fixes"
d47dfcb5a2e5901c96fc92662cec7aa30f7f8843 27-Mar-2015 Chong Zhang <chz@google.com> HLS: misc bug fixes

- fix no target-duration case

- fix for audio-only <=> audio/video switching

- disable audio-only variants if there is at least
one variant with video

- fix mpeg2ts PTS wraparound when bandwidth adapting

- tweak up/down switch marks

bug: 19567254

Change-Id: Ib46144203c56dfc96eccd6ddaa3867e8a4f2c6a9
StreamSource.cpp
f75c2fef14354024ec27bff1444f9e50b5ef55a9 02-Apr-2015 Eric Laurent <elaurent@google.com> IAudioFlinger: add checks on binder calls

Limit number of ports and patches listed by
LIST_AUDIO_PATCHES and LIST_AUDIO_PORTS.

Also fix typo causing wrong pointer to be used when writing to Parcel.

Bug: 19573085.
Change-Id: I41a9c710e45738a4f11990160587856c429a4646
AudioFlinger.cpp
b28753e19550e5051cd02e6af72ab06e4eff04e0 01-Apr-2015 Eric Laurent <elaurent@google.com> audio port: support multiple clients

Add support for more than one audio port callback client per process.

Change-Id: I657c4fc28d5d2d993307551e3e69567dc60196cb
udioSystem.cpp
5cbb5785a58655e21f5f7805274b8c78b986216b 28-Mar-2015 Andy Hung <hunga@google.com> Reject sample rate changes for fast tracks

This is needed for a SoundPool fix.

Bug: 19970735
Change-Id: I46b69e059aabf0d06b16b31ea436bb71f7146750
udioTrack.cpp
82fd850ece75f53110d5c04b49646e5035b8cd24 25-Mar-2015 Eric Laurent <elaurent@google.com> am 414af268: am c42c4b52: am 424324b3: am 2fdd16b3: DO NOT MERGE - audio policy service: fix possible memory overflow

* commit '414af268fbc23e877680e084aeb64a4bed79c0a6':
DO NOT MERGE - audio policy service: fix possible memory overflow
c42c4b526422fada02f3522a08143f738e9e60af 25-Mar-2015 Eric Laurent <elaurent@google.com> am 424324b3: am 2fdd16b3: DO NOT MERGE - audio policy service: fix possible memory overflow

* commit '424324b327cc0b022ff8d10e03158b4594489ee7':
DO NOT MERGE - audio policy service: fix possible memory overflow
2fdd16b3cbe1c1e53d1c4b305f4c0174b995ad1a 06-Feb-2015 Eric Laurent <elaurent@google.com> DO NOT MERGE - audio policy service: fix possible memory overflow

Add limit on number of audio ports and patches requested by
listaudioPorts() and listAudioPatches().

Bug: 19261727.
Change-Id: I21dfdf11cf805734cc3b7b2a85762c5598f60580
(cherry picked from commit 1d670b11313250442455a22f1056ad649d607fb2)
AudioPolicyService.cpp
1147314379fccebdb072cd0c1a246b505839a2b0 24-Mar-2015 Glenn Kasten <gkasten@google.com> Merge "AudioRecord TRANSFER_OBTAIN can be used with FAST flag"
957af4cef721c1eec1606850e77ad2ef1fd0eb0a 24-Mar-2015 Glenn Kasten <gkasten@google.com> Merge "AudioRecord::read() can be non-blocking to match AudioTrack"
82ceac025459b5b8887441d709081ec29c6b9416 24-Mar-2015 Glenn Kasten <gkasten@google.com> Merge "set() in AudioRecord and AudioTracks needs no lock"
ebb80468d8e31e22b867744d86b57bd4bc3186fd 24-Mar-2015 Ronghua Wu <ronghuawu@google.com> Merge "media: add ResourceManagerService"
ec648447b7dcab701c436a54bd38a1abd8037be1 24-Mar-2015 Jeff Tinker <jtinker@google.com> Merge "Report key request message type for unprefixed EME"
231c3d169ad029689f9d688b68179af7e96b8d78 11-Mar-2015 Ronghua Wu <ronghuawu@google.com> media: add ResourceManagerService

Bug: 19620911
Change-Id: Iea173d310d31781bc50effe3d9bd6553cb5139eb
ndroid.mk
ResourceManagerClient.cpp
ResourceManagerService.cpp
ediaResource.cpp
ediaResourcePolicy.cpp
3622cdff65f34a99d2f55936a895387ad41510ce 20-Mar-2015 Glenn Kasten <gkasten@google.com> AudioRecord::read() can be non-blocking to match AudioTrack

Change-Id: I23b9466b81ab6037d0bccd5e6f5974b7bd4aeacb
udioRecord.cpp
bfd318402924414fbde4d31c9d23cc423f10b630 20-Mar-2015 Glenn Kasten <gkasten@google.com> set() in AudioRecord and AudioTracks needs no lock

Change-Id: I9d61b3d117e9b21fbbfad772d8981a5abb8fafae
udioRecord.cpp
udioTrack.cpp
b7fbf7ecc6b034243ec64f79f3113675b5e3c941 18-Mar-2015 Glenn Kasten <gkasten@google.com> AudioRecord TRANSFER_OBTAIN can be used with FAST flag

Change-Id: I001ba1a88150dddf79d99baf5927f31799745eef
udioRecord.cpp
4c36d6f48f4eecacc148317f775f65961a4f03d2 20-Mar-2015 Glenn Kasten <gkasten@google.com> Logging

Move log of latency to where it is first computed.
Log more parameters when a fast track is denied by client.
Log session ID in destructor.
Remove obsolete ALOGV that were for debugging a particular problem.
Log more parameters of set().

Change-Id: I0156bceaf397f2faa053214572c57136705685ee
udioRecord.cpp
udioTrack.cpp
4408d8ab70d3385ac043d0f9a210a971c3a570c2 23-Mar-2015 Andy Hung <hunga@google.com> Merge "Fix position when restoring streaming audio track"
138d6f9b0b77d94773a8a29d3c5bdb78f38ee142 20-Mar-2015 Glenn Kasten <gkasten@google.com> Update AudioTrack code to match AudioRecord

session ID check
buffer error code check

Change-Id: I092a61adfd249122f9127dceedf67c0a3bdcfe7b
udioTrack.cpp
5014c94c1bbac4a4284576b0015ba75145237593 20-Mar-2015 Glenn Kasten <gkasten@google.com> AudioRecord::releaseBuffer() buffer is const *, like AudioTrack

Change-Id: If09689a8411392281ad06fcf781f3198941c642d
udioRecord.cpp
32860f77787f41abac08afdfc2592272ccc31bcb 20-Mar-2015 Glenn Kasten <gkasten@google.com> Deprecate AudioRecord::getInput() and AudioTrack::getOutput()

Does not completely fix the bug, but is a step in the right direction.

Bug: 12593118
Change-Id: Id591cd700ab58fd927ae44c71c81dac55b5cac2d
udioRecord.cpp
40bc906252974d0b389ae4a147232d0c9a97193f 20-Mar-2015 Glenn Kasten <gkasten@google.com> namespace does not need a closing semicolon

Change-Id: Ie8f9d42fc061f6d558f23b98414e04eb3d14b376
udioEffect.cpp
udioParameter.cpp
udioPolicy.cpp
udioRecord.cpp
udioSystem.cpp
udioTrack.cpp
AudioFlinger.cpp
AudioFlingerClient.cpp
AudioPolicyService.cpp
AudioPolicyServiceClient.cpp
AudioRecord.cpp
AudioTrack.cpp
DrmClient.cpp
Effect.cpp
EffectClient.cpp
MediaCodecList.cpp
MediaDeathNotifier.cpp
MediaLogService.cpp
MediaMetadataRetriever.cpp
MediaPlayer.cpp
MediaPlayerClient.cpp
MediaPlayerService.cpp
MediaRecorder.cpp
MediaRecorderClient.cpp
RemoteDisplay.cpp
RemoteDisplayClient.cpp
tringArray.cpp
isualizer.cpp
ediametadataretriever.cpp
ediaplayer.cpp
ediarecorder.cpp
ae4b879d04c4b07c62241a8f507c8dce11e628e4 20-Mar-2015 Glenn Kasten <gkasten@google.com> Declare and initialize in one statement

Change-Id: Ie8593692907e67558f9d7654c9a4bf8cbce99bd8
udioRecord.cpp
udioTrack.cpp
d2027336b45f524a196403d351ec317782793792 20-Mar-2015 Glenn Kasten <gkasten@google.com> Whitespace

Change-Id: I4640be948ad3caff0eb7525991398a1353e4bfe6
MediaHTTPConnection.cpp
MediaHTTPService.cpp
17ea1351633d4f5e4f9eafd0778eb8b59fa30f10 20-Mar-2015 Glenn Kasten <gkasten@google.com> Update AudioRecord comments to match AudioTrack

Change-Id: I6c3620c60c0ba159e4688b42de4ec8b91920e048
udioRecord.cpp
7ccdaad38054474b1d84b7c37ceffd98e9df354d 20-Mar-2015 Andy Hung <hunga@google.com> Fix position when restoring streaming audio track

Bug: 19802225
Change-Id: I19ca7836bc89627f6cead4961641b94c6b27b5f6
udioTrack.cpp
803b3e558022c6d0eb069308339dc84e6e8035dc 19-Mar-2015 Andy Hung <hunga@google.com> Event driven wake for AudioRecordThread notification changes

Used for setMarkerPosition and setPositionUpdatePeriod.

Change-Id: Iedd1be8725dea32bdba6908b78c5166780a66fec
udioRecord.cpp
377165c24968b044faccaf366a2377fa32143e2f 17-Mar-2015 Andy Hung <hunga@google.com> Merge "Fix periodic notification timing error for AudioRecord"
d072c909d87f8150433860f6de4c11df6e09e2f9 16-Mar-2015 Jeff Tinker <jtinker@google.com> Report key request message type for unprefixed EME

bug: 19771299
Change-Id: I02f0a4532b5ea8a7e680d71f45ac0da06879f3d6
Drm.cpp
f59497bd3c190e087202043de5450ef06e92b27d 27-Jan-2015 Glenn Kasten <gkasten@google.com> Update comments

Change-Id: I37d3c4ce22b74fe8581a886fe5a7f9fef8266dad
udioTrackShared.cpp
fb7df2c355aad453f1978207e4116b2d4a61f34b 13-Mar-2015 Andy Hung <hunga@google.com> Fix periodic notification timing error for AudioRecord

Change-Id: I768d8a30c6845372ad7c306ed1bc0ec030ae1804
udioRecord.cpp
c6bd5db9d9cf4bba1649b5b7ddea2d23f5de23a9 10-Mar-2015 Eric Laurent <elaurent@google.com> fix flush on HW A/V sync tracks

Fix mismatch between track flags on client and server side
when HW A/V sync is requested.

The audio track was connected to a direct output by the audio policy
manager but the client failed to set the direct flag when creating
the track resulting in the direct flag not being set in audio flinger.

Bug: 19665934.
Change-Id: I0a5257b20bf76c9c4d89bc2ad9b44777b81f13bf
udioTrack.cpp
1dfe2f9c2d03fc8d0ed0cdfe0b9fb894bc0bcc11 09-Mar-2015 Glenn Kasten <gkasten@google.com> Allow TRANSFER_OBTAIN to be used for fast tracks

Change-Id: I8fa20c26f076567b38210af4a680fe1cb2eacee4
udioTrack.cpp
b46f394a85d704dd05287cf9bb77cf86e3c02a38 09-Mar-2015 Glenn Kasten <gkasten@google.com> AudioTrack::obtainBuffer() now returns number of non-contiguous frames

Change-Id: I1f61d7e3d057c3254babe456b4aa0f6a1809da55
udioTrack.cpp
54a8a456c2b4b382b3ffe3d99e40703df79c0717 09-Mar-2015 Glenn Kasten <gkasten@google.com> AudioTrack::releaseBuffer parameter is const *

Change-Id: I31ac20863107de05b83cd7f8cd7dd61bed98e456
udioTrack.cpp
3f02be2ceeaa4b67dc0b1a81aebcfa049276fad8 09-Mar-2015 Glenn Kasten <gkasten@google.com> AudioTrack obtain/release buffer comments

Change-Id: I0eb178d1ab4eea7f72f4c55852c19b216ca55f5f
udioTrack.cpp
d4bd93b22ab9f7dfa32dfc6d48e008db3ea9c634 28-Feb-2015 Andy Hung <hunga@google.com> Merge "Change AudioTrack resampling buffers from 3 to 2"
9816016afb2a13c6a866cd047d57020566a8b9a9 05-Feb-2015 Wei Jia <wjia@google.com> mediaplayer: support dynamic playback rate

Bug: 19196501

Change-Id: I856b1507d5fa2cedfb645706d2435683a7d3e050
MediaPlayer.cpp
ediaplayer.cpp
0e48d25606c82def035ad10a5b3923767a765cdd 26-Jan-2015 Andy Hung <hunga@google.com> Change AudioTrack resampling buffers from 3 to 2

Move computation of minimum AudioTrack buffer size to server
for normal streaming PCM tracks.

Use server-side computation to exactly determine requirements
for the resampler to avoid triple buffering.

This reduces latency for normal audio tracks that require resampling,
and makes things consistent with the minimum buffer size.

Change-Id: I2f2ca0e599ee20e16559bc5c5dab61ed100da16c
udioTrack.cpp
1d670b11313250442455a22f1056ad649d607fb2 06-Feb-2015 Eric Laurent <elaurent@google.com> audio policy service: fix possible memory overflow

Add limit on number of audio ports and patches requested by
listaudioPorts() and listAudioPatches().

Bug: 19261727.
Change-Id: I21dfdf11cf805734cc3b7b2a85762c5598f60580
AudioPolicyService.cpp
e743a47f445f02a0612018fa5640301304844fbf 28-Jan-2015 Paul McLean <pmclean@google.com> Add additional info to AudioPort for enum/selection API.

Add "device name" member to AudioPort.
Moved unique device ID from DevicePort to AudioPort.
Straighten out confusion between "name" and "address"
Created string constants for Intent "extra" data keys.
Combine card/address data into "address" at sender.Add additional info to AudioPort for enum/selection API.

Change-Id: I1be308e12b09cd0ead9a3e9fbc9c385462299fb5
udioSystem.cpp
AudioPolicyService.cpp
875cfd20f41b6e405f75fe4a9f9e848d63a67e28 29-Jan-2015 Marco Nelissen <marcone@google.com> am 183a0e52: am 5bcdfac9: am 2a6e5cf4: Merge "Fix uninitialized variable."

* commit '183a0e52ac3130501c417005f6363eeec62c0afd':
Fix uninitialized variable.
183a0e52ac3130501c417005f6363eeec62c0afd 29-Jan-2015 Marco Nelissen <marcone@google.com> am 5bcdfac9: am 2a6e5cf4: Merge "Fix uninitialized variable."

* commit '5bcdfac94a07c55ce021879d733749775d2d8880':
Fix uninitialized variable.
2a6e5cf4e8b39e3b0b540d3cf49568c61e9d67cd 29-Jan-2015 Marco Nelissen <marcone@google.com> Merge "Fix uninitialized variable."
13b97d6ece762cd96a7c3d3e3d60583104d1c0bc 29-Jan-2015 Marco Nelissen <marcone@google.com> Fix uninitialized variable.

Bug: 19020118
Change-Id: I0aceadfec6652d468a5a5d9eb5dcbf0845757ffa
idiIoWrapper.cpp
f26334cf7d60060e0e33b037dd9504c81b2e10eb 29-Jan-2015 Elliott Hughes <enh@google.com> am 6a0fbc68: am a3c9d5c3: am 166776fb: Merge "Add missing includes."

* commit '6a0fbc68e203058e3b7d62e95d46f2415bc3ed95':
Add missing includes.
6a0fbc68e203058e3b7d62e95d46f2415bc3ed95 29-Jan-2015 Elliott Hughes <enh@google.com> am a3c9d5c3: am 166776fb: Merge "Add missing includes."

* commit 'a3c9d5c3982591042c7c6cb5fb7c32fbd4765832':
Add missing includes.
9d014d04bd1e26b68ea979885ccbc6f131a7eda3 29-Jan-2015 Elliott Hughes <enh@google.com> Add missing includes.

Change-Id: Ib697ce44243e7cb07aee60944238e0854d82e9de
emoryLeakTrackUtil.cpp
3e68c081d905e3164e11797287484beb68747ab5 28-Jan-2015 Brian Carlstrom <bdc@google.com> am 88d74d20: Add missing AudioPolicy.cpp to Android.mk

* commit '88d74d203cda0ee6da387f3a5b929934b505d307':
Add missing AudioPolicy.cpp to Android.mk
980b106908cb8e105bb8849749722c5088e2f6eb 28-Jan-2015 Marco Nelissen <marcone@google.com> resolved conflicts for merge of 9391844d to master

Change-Id: I348a71d1b3e3238bc3871a69454edc8247d03111
88d74d203cda0ee6da387f3a5b929934b505d307 27-Jan-2015 Brian Carlstrom <bdc@google.com> Add missing AudioPolicy.cpp to Android.mk

Change-Id: Iddafc39affe1082dc437f863b35d82790eca550d
ndroid.mk
9391844deb3f6a442745cea62f78aca2cea19e50 27-Jan-2015 Marco Nelissen <marcone@google.com> resolved conflicts for merge of b955b722 to lmp-mr1-dev-plus-aosp

Change-Id: I385371869169eee4fe6330ffe0abc5eda4cb4f72
b7848f1c442bc8c71020957948d1b003a62a25b7 04-Dec-2014 Marco Nelissen <marcone@google.com> Remove MediaPlayerService::decode()

and make SoundPool use MediaCodec for decoding files to PCM.

Bug: 18239054
Change-Id: Ia144fc1bbb0d2787638ee972e2224339b4965310
ndroid.mk
MediaPlayerService.cpp
oundPool.cpp
oundPoolThread.cpp
oundPoolThread.h
ediaplayer.cpp
dda683a2ccb84ccc840b76e2ced10052f65ce43e 15-Jan-2015 Andy Hung <hunga@google.com> Merge "Allow AUDIO_FORMAT_PCM_8_BIT AudioTrack buffers"
dafbdeeb75856965de07aa64c405b518e9cdf373 14-Jan-2015 Andy Hung <hunga@google.com> Merge "Fix cumulative error in setPositionNotificationPeriod"
abdb990953ffe94a9dc544aea0bed17ef7d5f484 13-Jan-2015 Andy Hung <hunga@google.com> Allow AUDIO_FORMAT_PCM_8_BIT AudioTrack buffers

Previously conversion to AUDIO_FORMAT_PCM_16_BIT was required.
Client shared memory for static tracks and AudioFlinger track creation
and buffer delivery now use native 8 bit PCM data.

Change-Id: I485c07a4971fde9a25442bd43fed95019d39abcc
udioTrack.cpp
17c933cc07be9656aee8afc82dc866a67b3fd78e 14-Jan-2015 Marco Nelissen <marcone@google.com> am cec272df: am 724b9ea5: Merge "Replace MidiFile player with a Midi extractor"

* commit 'cec272dfe2cf6bf6cdb8a4afa5afdd0e910c915f':
Replace MidiFile player with a Midi extractor
a18eb9ea913e2cd19df9fe0f1b2a667339006581 12-Jan-2015 Glenn Kasten <gkasten@google.com> Merge "Move roundup from frameworks/av to system/media"
8840754c5bc44c7e11ed5e9acc15e9569f5814c5 08-Jan-2015 Marco Nelissen <marcone@google.com> resolved conflicts for merge of 2702d5a0 to lmp-mr1-dev-plus-aosp

Change-Id: Ic9841f0a66930f57a5ebea527c6a841d7c49cccf
0e8928bf4f2b01b783f6da97d15e8f1abb0fd7d7 08-Jan-2015 Marco Nelissen <marcone@google.com> Replace MidiFile player with a Midi extractor

This gets rids of a bunch of special midi handling and replaces it
with an extractor that works with NuPlayer and MediaMetadataRetriever.

Change-Id: I8d0f5bbdde2ca24267cf4d62ab26afe9630e0217
idiIoWrapper.cpp
bc11e713063f3f96f98256abc81c0d8ee1ddb312 08-Jan-2015 Marco Nelissen <marcone@google.com> Use callbacks for Midi I/O

Instead of having the Sonivox engine directly open the file and
use stdio to read from it, use caller-provided callbacks.

Change-Id: Ie55129109060a4a7862fee3177f994401e00b6c1
ndroid.mk
etPlayer.cpp
idiIoWrapper.cpp
2d85f097d653b21d1ff2c34f0b732c674d20ccc2 07-Jan-2015 Andy Hung <hunga@google.com> Fix cumulative error in setPositionNotificationPeriod

Time for AudioTrackThread sleep due to periodic notification
needs to be computed from actual position.
External reported AOSP issue 65807.

Change-Id: Ic46b64588e6c5803afcd8252cde8837eb3fbf6ff
udioTrack.cpp
2326ed104477a80c850eb3cef6a7039f1585a69d 08-Jan-2015 Andy Hung <hunga@google.com> Merge "Event driven wake for AudioTrackThread notification changes"
bb67a2e8942620240531b5d157d376fa3fa049af 08-Jan-2015 Andy Hung <hunga@google.com> Merge "Improve AudioTrack EVENT_LOOP_END and EVENT_BUFFER_END accuracy"
e391ddcb924af7f17978c0103f76a19f445ead40 07-Jan-2015 Andy Hung <hunga@google.com> Merge "Fix loop and position restoration in static AudioTracks"
e6910780274fb818f1432d10672af4b813c2bc59 07-Jan-2015 Andy Hung <hunga@google.com> Merge "Fix loop and position setting in static AudioTracks"
53dbe77b9f50cdd0de88b9d25dd643e90c8ba68b 06-Jan-2015 Glenn Kasten <gkasten@google.com> Move roundup from frameworks/av to system/media

Change-Id: I1083ab739e445e5bd3e3082fc1d3a20cc19601d5
ndroid.mk
65b13a59775ac0b4b5d59d9cd78e0c9914790426 07-Jan-2015 Eric Laurent <elaurent@google.com> am bb2e3e9d: am fb5d35c0: am 7ae3dfab: Merge "fix record from default input source" into lmp-mr1-dev

* commit 'bb2e3e9d05e3760cfcf3cc63c10e7e8336e63a06':
fix record from default input source
bb2e3e9d05e3760cfcf3cc63c10e7e8336e63a06 07-Jan-2015 Eric Laurent <elaurent@google.com> am fb5d35c0: am 7ae3dfab: Merge "fix record from default input source" into lmp-mr1-dev

* commit 'fb5d35c00d1c4d672d245b6820551808617eba46':
fix record from default input source
3c09c78aabcb9d314dfb400258fb99a37c7b50c9 30-Dec-2014 Andy Hung <hunga@google.com> Event driven wake for AudioTrackThread notification changes

Used for setMarkerPosition and setPositionUpdatePeriod.

Change-Id: I0d94b929438a5cd94b295d7c1884f876fae8b5e7
udioTrack.cpp
ocs/paused.dot
53c3b5fc1afe162a8669cb3d27d6bb14e1847e39 16-Dec-2014 Andy Hung <hunga@google.com> Improve AudioTrack EVENT_LOOP_END and EVENT_BUFFER_END accuracy

Fix timing computation to consider current position.
Fix EVENT_LOOP_END count accuracy (some could be dropped before)
for non-infinite loop static AudioTracks.

Change-Id: I255f692915b55ab6f08ccd6a2365fee3f5d0a4fe
udioTrack.cpp
4ede21d9c1f957baf5e561849ff9bbe4bcbefc20 13-Dec-2014 Andy Hung <hunga@google.com> Fix loop and position restoration in static AudioTracks

Allow restoration of loop and position.
Make position and loop synchronously readable.

Bug: 17964637
Change-Id: I8cfb5036e665f55fdff5c67d27e1363ce9a8665d
udioTrack.cpp
udioTrackShared.cpp
efbe92ef50b115e13034a80a16967b53cda7e4e1 13-Dec-2014 Andy Hung <hunga@google.com> SoundPool: Do not stop AudioTrack on EVENT_NEW_IAUDIOTRACK

Bug: 17964637
Change-Id: I2865959e476bee2f6e1a7344d9464b083cee88d2
oundPool.cpp
c447ded04f11169e9b96b31cd196b2c4ffa9f31c 06-Jan-2015 Eric Laurent <elaurent@google.com> fix record from default input source

Commit caf7f48a0e broke capture from default
input source on some devices: the input source is now specified as part of
the audio attributes and the default source was not remapped to mic source.

Bug: 18736417.
Change-Id: I3f5da33cdb56f959aaef68ed1952342babc63aa0
udioRecord.cpp
9b4615887c23548438fd0d8e3d8f04ac21912850 02-Dec-2014 Andy Hung <hunga@google.com> Fix loop and position setting in static AudioTracks

Allow independent setting of position and loop.

Bug: 17964637
Change-Id: I8b3bd97a244b932728b68da7684044f2636984a5
udioTrack.cpp
udioTrackShared.cpp
7e7f3ce6b5e6cafc8187b4c62c3d78cd6064f421 05-Jan-2015 Narayan Kamath <narayan@google.com> am 991aa3a7: am bef17542: am 5c97c4e1: Merge "Remove hardcoded ICU & OpenSSL include paths."

* commit '991aa3a70b26c7d9c93361394a43a95355c1c26e':
Remove hardcoded ICU & OpenSSL include paths.
991aa3a70b26c7d9c93361394a43a95355c1c26e 05-Jan-2015 Narayan Kamath <narayan@google.com> am bef17542: am 5c97c4e1: Merge "Remove hardcoded ICU & OpenSSL include paths."

* commit 'bef17542c7e0563c6004463b1ede18a404a17c89':
Remove hardcoded ICU & OpenSSL include paths.
f84f7c527427b521fd833210c23008ae3a7c09b8 05-Jan-2015 Narayan Kamath <narayan@google.com> Remove hardcoded ICU & OpenSSL include paths.

They're exported using LOCAL_EXPORT_C_INCLUDE_DIRS.

bug: 18581021
Change-Id: I9593422b9eddb8203bee88d60e31a03b4a5f976b
ndroid.mk
c52fb038dc91712fc5159226006e03ce59b21b9a 03-Jan-2015 Glenn Kasten <gkasten@google.com> Cleanup annoying whitespace that causes red markers

Change-Id: I0b1be110b0e0a9606d272c4d023f40ff93522725
tringArray.cpp
49d44ef14da70f3159cf7908cab58c32ed3dbf26 31-Dec-2014 Glenn Kasten <gkasten@google.com> Merge "Flowchart for handling of AudioTrack client paused"
3957ebaefc10eebdd24f204918fc0f864abed63f 31-Dec-2014 Glenn Kasten <gkasten@google.com> Flowchart for handling of AudioTrack client paused

Change-Id: I6fde6ea257684deaf5f92e97ee7c500192e7d8ca
ocs/Makefile
ocs/paused.dot
b187de1ada34a9023c05d020a4592686ba761278 30-Dec-2014 Glenn Kasten <gkasten@google.com> Line length 100

Change-Id: I6c8fe626a3825fa9e139319656d682a57b887c97
udioSystem.cpp
udioTrackShared.cpp
MediaRecorder.cpp
etPlayer.cpp
ediaProfiles.cpp
ediaplayer.cpp
486a7135593b4b40c067e9b06f393577abfef482 23-Dec-2014 Andy Hung <hunga@google.com> Fix 64 bit compiler warnings in AudioTrackShared

Comparisons between size_t and int64_t variables show
warnings for 64 bit compilation, fix with casting.

Change-Id: I3c1b12ea6eca01e49696c724a1cf1cc6b88df7aa
udioTrackShared.cpp
54bf12b85e666417957231dc06db200c6f140253 22-Dec-2014 Marco Nelissen <marcone@google.com> am af318e28: am 0b87c0d9: am bd08223c: Merge "Fix double close."

* commit 'af318e2882e0b8b1a594f079eb3d10b2daa3ff7e':
Fix double close.
af318e2882e0b8b1a594f079eb3d10b2daa3ff7e 22-Dec-2014 Marco Nelissen <marcone@google.com> am 0b87c0d9: am bd08223c: Merge "Fix double close."

* commit '0b87c0d9e074384d05e6563c1b1cf5dbd5246436':
Fix double close.
bd08223c450a7a2e8e8d79e6be148ed1ac64caa3 22-Dec-2014 Marco Nelissen <marcone@google.com> Merge "Fix double close."
84d8cf472c6f5b80f62c4eff8de0589b4b2fee74 22-Dec-2014 Andy Hung <hunga@google.com> Merge "Remove explicit instantiation of SingleStateQueue"
9b82924cbd203f1678c2f78aa73b15909efa3e81 13-Dec-2014 Andy Hung <hunga@google.com> Remove explicit instantiation of SingleStateQueue

Refactoring now possible due to changes in the Android
atomic include.

Change-Id: Ia0094d322d9ad3d8c186307306821376ca8002c4
ndroid.mk
ingleStateQueue.cpp
ingleStateQueueInstantiations.cpp
faf4efc6a41e88adf85f76f48f020a6d681f5ff1 17-Dec-2014 Marco Nelissen <marcone@google.com> Replace MidiFile player with a Midi extractor

This gets rids of a bunch of special midi handling and replaces it
with an extractor that works with NuPlayer and MediaMetadataRetriever.

Change-Id: I8d0f5bbdde2ca24267cf4d62ab26afe9630e0217
idiIoWrapper.cpp
23c8dc13787186dc98731055858b2fba3aedc105 17-Dec-2014 Eric Laurent <elaurent@google.com> am 85aca658: am d33712d7: am 145cf5d8: Merge "audioflinger: implement pause/resume for direct outputs" into lmp-mr1-dev

* commit '85aca658ac7d20584b0647427256df50a5f243ef':
audioflinger: implement pause/resume for direct outputs
85aca658ac7d20584b0647427256df50a5f243ef 17-Dec-2014 Eric Laurent <elaurent@google.com> am d33712d7: am 145cf5d8: Merge "audioflinger: implement pause/resume for direct outputs" into lmp-mr1-dev

* commit 'd33712d7ec5dcf427cc0be9b7d2ca1c99823c8e6':
audioflinger: implement pause/resume for direct outputs
08b9e2d113213c37506a416bc95a36789bcab4ca 16-Dec-2014 Marco Nelissen <marcone@google.com> Use callbacks for Midi I/O

Instead of having the Sonivox engine directly open the file and
use stdio to read from it, use caller-provided callbacks.

Change-Id: I4d775c8458c48c591a15794c4517e006dcf034e1
ndroid.mk
etPlayer.cpp
idiIoWrapper.cpp
d1f69b0b17acbd96987ecb2f3378abd394d05903 15-Dec-2014 Eric Laurent <elaurent@google.com> audioflinger: implement pause/resume for direct outputs

Extend pause/resume support to direct output threads
(was only for offload threads).

If the HAL implements pause/resume, track pause/resume is forwarded to
the HAL.

Pause, flush, resume sequence is respected by executing the HAL
calls in the playback thread (same as offload).

Make sure the track flags on client side are consistent with the
flags on server side.

Bug: 17883772.
Change-Id: I89b360d69818f7a9204bd36e3ec63a79e106ecf1
udioTrack.cpp
e7fdebaf1f8993df076ea2ae84999bc62da3005b 10-Dec-2014 Glenn Kasten <gkasten@google.com> am 66b17e9d: Merge commit \'f5a968a0\' into mm

* commit '66b17e9dfe114ae968bfb2f8ad8325527e373c65':
audio policy: binder calls for dynamic audio policy mixes
b67eb5856203e9869aa1e5b5a13c1eff62790335 10-Dec-2014 Eric Laurent <elaurent@google.com> am b279f5ad: am c49d9cda: am 2dda40d6: Merge "audio policy: add support for custom mixes" into lmp-mr1-dev

* commit 'b279f5adfa2fd6f22c87b3a7106fbb62a0b9a5d2':
audio policy: add support for custom mixes
66b17e9dfe114ae968bfb2f8ad8325527e373c65 10-Dec-2014 Glenn Kasten <gkasten@google.com> Merge commit 'f5a968a0' into mm

Change-Id: Ifd30546c11def40ad483f27c9d7baa4008fcbac3
b279f5adfa2fd6f22c87b3a7106fbb62a0b9a5d2 10-Dec-2014 Eric Laurent <elaurent@google.com> am c49d9cda: am 2dda40d6: Merge "audio policy: add support for custom mixes" into lmp-mr1-dev

* commit 'c49d9cda49dab8b7dd0376cf56476b3e1895d5c6':
audio policy: add support for custom mixes
c6ac859f5a82ea8642bc6351a45508a15f224f32 08-Dec-2014 Marco Nelissen <marcone@google.com> Remove filename based writer constructors

MediaPlayerService can't open files (it needs an already opened
file descriptor), so these were just wasting space.

Change-Id: I323044a6c1814a7bff952ed71b5c7792df2abf03
MediaRecorder.cpp
ediarecorder.cpp
baac183f3808d7b68f184647a97bd381620415fe 02-Dec-2014 Eric Laurent <elaurent@google.com> audio policy: binder calls for dynamic audio policy mixes

Add binder calls to register and unregister dynamic mixes
to AudioPolicyManager.

Bug: 16009464.

Change-Id: I4ef38166d0cfc88c984970969380d0cd6eb083ac
udioSystem.cpp
AudioPolicyService.cpp
275e8e9de2e11b4b344f5a201f1f0e51fda02d9c 01-Dec-2014 Eric Laurent <elaurent@google.com> audio policy: add support for custom mixes

Add support for custom mixes in AudioPolicyManager.

Two methods are added to register or unregister a list of custom mixes
with their attributes and format.

getOutputForAttr() and getInputForAttr() first look for a match in
registered mixes before defaulting to normal output/input selection

Remote submix device connection disconnection now takes address into
account to identify the correspnoding custom mix.

Bug: 16009464.

Change-Id: I3f1c2a485a0fb71b1f984ed0adc9b68aa971e408
ndroid.mk
udioPolicy.cpp
udioTrack.cpp
9574b6440b47a2c79fcfdf54a7ec3dd24dd88ef0 09-Dec-2014 zunkyu.lee <zunkyu.lee@lge.com> am c1b0d49c: am 82a69ea8: Prevent ANR when AudioTrack is paused or re-routed

* commit 'c1b0d49cacde26c2420528169d157d2c778a9b0d':
Prevent ANR when AudioTrack is paused or re-routed
82a69ea8b090d57bff5e02774688b546a711bbb8 07-Nov-2014 zunkyu.lee <zunkyu.lee@lge.com> Prevent ANR when AudioTrack is paused or re-routed

If ClientProxy was interrupted by AudioTrack::pause() just before futex syscall() in obtainBuffer() was called,
It will not call releaseBuffer to wake up AudioTrackThread.
It puts the AudioTrackThread to sleep and then a deadlock occurs.

In this case, CBLK_INTERRUPT flags can't prevent a deadlock,
so this patch set mFutex to FUTEX_WAKE during interrupt() to avoid deadlock.

A similar problem could occur due to re-route or recovery after mediaserver death.

Bug: 18641665
Change-Id: I66fcae43af9a91eb55f6cdb52c644ee6c0999772
udioTrackShared.cpp
56335ae2978765e3bbc510468d4812b691545d04 09-Dec-2014 Glenn Kasten <gkasten@android.com> Merge "Prevent ANR when AudioTrack is paused or re-routed"
a78e10495c51d09f92db9c33d34dcc7cd7f28511 07-Nov-2014 zunkyu.lee <zunkyu.lee@lge.com> Prevent ANR when AudioTrack is paused or re-routed

If ClientProxy was interrupted by AudioTrack::pause() just before futex syscall() in obtainBuffer() was called,
It will not call releaseBuffer to wake up AudioTrackThread.
It puts the AudioTrackThread to sleep and then a deadlock occurs.

In this case, CBLK_INTERRUPT flags can't prevent a deadlock,
so this patch set mFutex to FUTEX_WAKE during interrupt() to avoid deadlock.

A similar problem could occur due to re-route or recovery after mediaserver death.

Bug: 18641665
Change-Id: I66fcae43af9a91eb55f6cdb52c644ee6c0999772
udioTrackShared.cpp
be837c328ae1ea2b193d05aaa3d4214c263b5b77 22-Nov-2014 seunghak.han <seunghak.han@lge.com> Track volume should be maintained even if track is restored

If track is restored when it set its volume to a non-unity value (such as mute),
the volume was forced to unity again. Now, the previous volume is restored.

Bug: 18570664
Change-Id: I79f34c6c7d6f535baba813fd3b8ba8e55cac8ad7
udioTrack.cpp
aef46aa8eff1f975ae5253a334cf0c978427ca86 02-Dec-2014 Glenn Kasten <gkasten@android.com> am bde85d05: am 5458756a: Merge "Track volume should be maintained even if track is restored"

* commit 'bde85d05414cdd3888071635dd05e9ff78679d5e':
Track volume should be maintained even if track is restored
e6a9d65845032644b0865b6e3d0b5a820f35d9e4 22-Nov-2014 seunghak.han <seunghak.han@lge.com> Track volume should be maintained even if track is restored

If track is restored when it set its volume to a non-unity value (such as mute),
the volume was forced to unity again. Now, the previous volume is restored.

Bug: 18570664
Change-Id: I79f34c6c7d6f535baba813fd3b8ba8e55cac8ad7
udioTrack.cpp
61280541836947ce0b281b240ffa4c55bbf5bd55 27-Nov-2014 Eric Laurent <elaurent@google.com> am 390ef843: am f20c4356: Merge "AudioRecord: use audio attributes instead of audio source." into lmp-mr1-dev

* commit '390ef84373b7edd1397381f780ca235326357094':
AudioRecord: use audio attributes instead of audio source.
121143d5242a790d0bd01fe1b9cec5d28a1ba1d7 26-Nov-2014 Eric Laurent <elaurent@google.com> am bf14c62e: am 72bf901c: Merge "audio policy: new getOutputForAttr() prototype." into lmp-mr1-dev

* commit 'bf14c62e7973ed793a3b00c2c67beca4484c1c7a':
audio policy: new getOutputForAttr() prototype.
0e47b16ffcf78acb81b0ebf14d058db191f74af0 26-Nov-2014 Andy Hung <hunga@google.com> am 1e18795a: am d325005e: Merge "Fix AudioTrack loop mode to play audio from buffer start" into lmp-mr1-dev

* commit '1e18795a4847e9368baa7ecee146d3901b283cd0':
Fix AudioTrack loop mode to play audio from buffer start
72215491c60fbcdb9a2f0be782e24e39cca249c5 26-Nov-2014 Eric Laurent <elaurent@google.com> am 1a475921: am 223fd5c9: audio: new routing strategies and stream types

* commit '1a475921c0577a4650d1bbe40a85b732d1766939':
audio: new routing strategies and stream types
caf7f48a0ef558689d39aafd187c1571ff4128b4 26-Nov-2014 Eric Laurent <elaurent@google.com> AudioRecord: use audio attributes instead of audio source.

Added AudioRecord constructor with audio attributes.
Replaced AudioPolicymanager::getInput() by getInputForAttr().

No new functionality for now.

Also:

- Fixed warnings in AudioPolicyManager
- Allocate audio session ID before calling getOutputForAttr() in
AudioTrack.

Bug: 16006090.
Change-Id: I15df21e4411db688e3096dd801cf579d76d81711
udioRecord.cpp
udioSystem.cpp
udioTrack.cpp
AudioPolicyService.cpp
72bf901ca905ce154fe7866f06d25a01aadcf974 26-Nov-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: new getOutputForAttr() prototype." into lmp-mr1-dev
d325005e4a3be45c57e950f8c18b329c968602ce 26-Nov-2014 Andy Hung <hunga@google.com> Merge "Fix AudioTrack loop mode to play audio from buffer start" into lmp-mr1-dev
e83b55dc29ca16092ba02f36f55fa6e0e37fd78c 14-Nov-2014 Eric Laurent <elaurent@google.com> audio policy: new getOutputForAttr() prototype.

Update getOutputForAttr() prototype and group all logic
dealing with audio attributes to stream type conversion in
audio policy manager.

getOutputForAttr():
- specifies the audio session (for future use)
- returns a status code
- receives either stream type (for legacy) or audio attributes
- returns an updated streamtype

Remove logic dealing with legacy stream types to attributes conversion
from AudioTrack.

Use correct type for audio sessions in other APIs (startOutput() ...).

releaseOutput() specifies the audio session (for future use).

Bug: 18067208.

Change-Id: I1bfbe9626c04c7955d77f8a70aecfad2cb204817
udioRecord.cpp
udioSystem.cpp
udioTrack.cpp
AudioPolicyService.cpp
680b795435a5a501a56610258dce5eda40a1725d 12-Nov-2014 Andy Hung <hunga@google.com> Fix AudioTrack loop mode to play audio from buffer start

Bug: 18217633
Change-Id: Ica77acf0a32832d9b04eb657ef2f4f5329f8fbda
udioTrack.cpp
udioTrackShared.cpp
223fd5c9738e9665e495904d37d4632414b68c1e 11-Nov-2014 Eric Laurent <elaurent@google.com> audio: new routing strategies and stream types

Added new routing strategies and stream type for internal use
by audio policy manager and audio flinger:
- One for accessibility to allow different routing than media
- One for re-routing (remote submix) in preparation of dynamic
policies
- Added stream type for "internal" audio flinger tracks used
for audio patches and duplication.

Bug: 18067208.
Change-Id: I88f884b552e51e4a49c29125e5a1204cf58ff434
udioTrack.cpp
56df21d760d70a106adfbc8417b6ea179d576e24 21-Nov-2014 Glenn Kasten <gkasten@google.com> am f8c2d166: am a7cf01da: Merge "Fix missing loop count for static tracks." into lmp-mr1-dev

* commit 'f8c2d1665393d8e0620a7129ef3865f34489e6ef':
Fix missing loop count for static tracks.
c9769c557e202df671e35196c8c735b49257be7d 21-Nov-2014 Eric Laurent <elaurent@google.com> am 568689b1: am 3a2a32b5: Merge "AudioSystem: fix cross deadlock" into lmp-mr1-dev

* commit '568689b169d8b0ae2cc252b88602db5e5acaa604':
AudioSystem: fix cross deadlock
a7cf01da547bad8d4e66e3e4570eddeac98b6b05 20-Nov-2014 Glenn Kasten <gkasten@google.com> Merge "Fix missing loop count for static tracks." into lmp-mr1-dev
0ebd5f95b68a3a5c9e5509f21938c9e51e74d71b 20-Nov-2014 Eric Laurent <elaurent@google.com> AudioSystem: fix cross deadlock

Do not hold gLockAPS when calling
AudioPolicyService::registerClient() in get_audio_policy_service().
registerClient() will need to acquire the AudioPolicyService mutex and
if at the same time a method called from AudioPolicyService
(with mutex held) calls back into AudioSystem and get_audio_policy_service()
a cross deadlock occurs.

Same preventive fix for get_audio_flinger().

Use a separate mutex for notification client list in AudioPolicyService.
This prevents deadlocking if registerClient() is called as a consequence of
AudioFlinger calling back into AudioPolicyManager while executing a method
with AudioPolicyService locked

Bug: 18403952.
Bug: 18450065.
Change-Id: Ia832e41aede8bc6c843fc615508fbdd74e0863b5
udioSystem.cpp
2ff836294344b6e0b808b36191fdb0b457de4cb2 19-Nov-2014 Glenn Kasten <gkasten@android.com> am cd370c79: am de14fae7: Merge "Use standard syntax to initialize fields."

* commit 'cd370c790a9017560874a2588da46d4538087cad':
Use standard syntax to initialize fields.
de14fae779240a99c53d58ef16ce3086321ff897 19-Nov-2014 Glenn Kasten <gkasten@android.com> Merge "Use standard syntax to initialize fields."
57426fc6486c6c2fa27f4bc6fcf3349282c3fdd7 19-Nov-2014 Eric Laurent <elaurent@google.com> am 4fd641be: am bbda5ce4: Merge "AudioSystem: Add mutex for output cache" into lmp-mr1-dev

* commit '4fd641be9fed70743ca4fe823b69e74c258ce275':
AudioSystem: Add mutex for output cache
bbda5ce4782b20f3ed75482e5f73b8d999223438 19-Nov-2014 Eric Laurent <elaurent@google.com> Merge "AudioSystem: Add mutex for output cache" into lmp-mr1-dev
f6778fd0c72ab54328f0e9f5ecf0017b73e99dd8 19-Nov-2014 Eric Laurent <elaurent@google.com> AudioSystem: Add mutex for output cache

Fix cross deadlock with AudioFlinger by adding
a dedicated mutex to protect access to cached output list
and parameters.

Bug: 18410728.
Change-Id: Ia31283b1972d8865a46e84e63695173c187eb781
udioSystem.cpp
cb2129b3b568a4e31bcbda3545a468024bc972fe 11-Nov-2014 Andy Hung <hunga@google.com> Fix missing loop count for static tracks.

StaticAudioTrackServerProxy::framesReady() previously returned
only the contiguous frames, update to return the total
available frames. This resolves short-count looping in
SoundPool for FastTracks.

Also (1) Removes the racy condition of reading two variables
and (2) Fixes buffer->mNonContig to return the correct value
and (3) Restores behavior that loop count of 1 goes back to
loopStart once during playback.

Bug: 11830751
Bug: 12070295
Bug: 17456842
Change-Id: I64906e6036bb00a1d7375b03efe6deb69d6478ca
udioTrackShared.cpp
9544a8e904955f4b96ec9f2d6f4edc2a72afd270 18-Nov-2014 Eric Laurent <elaurent@google.com> am bfa77b5c: am 8cd37d67: Merge "audio policy: do not prevent routing to A2DP when suspended." into lmp-mr1-dev

* commit 'bfa77b5c687f217e26267693306aaa6cc8a63672':
audio policy: do not prevent routing to A2DP when suspended.
29e6cecdd8562700ab625c5645ddd6a7753789f1 14-Nov-2014 Eric Laurent <elaurent@google.com> audio policy: do not prevent routing to A2DP when suspended.

Allow A2DP sink selection even if A2DP is suspended.
It is not because use of A2DP is temporarily disabled by SCO
selection that the policy rule routing a given use case
to A2DP should be altered. The source will be routed to A2DP
but it will remain silent until suspend condition is cleared
which is the purpose of suspend mode.

Also make sure that accessibility prompts are audible while in call
by forcing stream type to STREAM_VOICE_CALL.
Fix inconsistent logic between AudioTrack::setStreamTypeFromAttributes()
and AudioPolicyManager::getStrategyForAttr()

Bug: 18095151.
Change-Id: I1c75dd8288ed3dd494eb942060eac9c9660dca50
udioTrack.cpp
e0064399d6bff89fd65e46829ea7ddffd911e936 17-Nov-2014 Elliott Hughes <enh@google.com> am 26d92768: am 34c55e3e: Merge "No need to #include atomic-inline.h if you have atomic.h."

* commit '26d92768d6dac505903c96e842673ee9a57a0989':
No need to #include atomic-inline.h if you have atomic.h.
ea7e5a1ffca7f1927af98a3f58b673581555284d 17-Nov-2014 Elliott Hughes <enh@google.com> No need to #include atomic-inline.h if you have atomic.h.

Change-Id: I79f9a53b95dcf84dff62ed4b3c0661c7c1e1fc64
ingleStateQueue.cpp
f1b0c671e85d7ad5e1aa94d16336cda57158cd33 17-Nov-2014 Elliott Hughes <enh@google.com> am 2716969d: resolved conflicts for merge of 3bc345f5 to stage-aosp-master

* commit '2716969d2b88e85a6ed5a766b54a0a34dc137118':
libcutils no longer requires that its users configure ANDROID_SMP.
1f2f4f26073b6bf979be3a3bb66f84e3e9c4c168 17-Nov-2014 Elliott Hughes <enh@google.com> libcutils no longer requires that its users configure ANDROID_SMP.

Change-Id: Ib91ff0696ab2472c62168eb5261bbda5d22f623e
ndroid.mk
77e79a509d19ab50b1867fe3903b5a8fae450591 17-Nov-2014 Marco Nelissen <marcone@google.com> resolved conflicts for merge of e78a27ca to lmp-mr1-dev-plus-aosp

Change-Id: If10a9cc17245f95d5e10b1507445abbb4020670e
e78a27ca9c701aa996eee0e47fa26dd69d80ffcf 17-Nov-2014 Marco Nelissen <marcone@google.com> am 9b77083e: Merge "Update calls to IInterface::asBinder()"

* commit '9b77083e582a8b6088ac6a2cb4151dfbdd324557':
Update calls to IInterface::asBinder()
f888020c6e2735624f2b2a30e72aca24e17b8b4d 14-Nov-2014 Marco Nelissen <marcone@google.com> Update calls to IInterface::asBinder()

to use the new static version.

Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a

Conflicts:
media/libmedia/IAudioFlinger.cpp
media/libmedia/IMediaPlayer.cpp
media/libstagefright/CameraSource.cpp
udioEffect.cpp
udioRecord.cpp
udioTrack.cpp
AudioFlinger.cpp
AudioPolicyService.cpp
AudioTrack.cpp
Drm.cpp
Effect.cpp
HDCP.cpp
MediaDeathNotifier.cpp
MediaLogService.cpp
MediaMetadataRetriever.cpp
MediaPlayer.cpp
MediaPlayerService.cpp
MediaRecorder.cpp
OMX.cpp
RemoteDisplayClient.cpp
StreamSource.cpp
ediametadataretriever.cpp
9ac0177da562b8f4d2ac6f001a16658a76e6aad8 14-Nov-2014 Eric Laurent <elaurent@google.com> am 990dad99: Merge "remove AudioSystem::getOutputSamplingRateForAttr()" into lmp-mr1-dev
automerge: 0e8a328

* commit '0e8a3284c6828e561f58e66a014c3b7ee37325cf':
remove AudioSystem::getOutputSamplingRateForAttr()
1b12b211cea11e319e72d9a5bf2bc4f7361f719d 14-Nov-2014 Chih-Hung Hsieh <chh@google.com> Use standard syntax to initialize fields.

Clang compiler gives warning to old gnu syntax.

BUG: 18193625
Change-Id: I1b5237d60866fc357fc808f6a6955ab20418a7d8
oneGenerator.cpp
0d6db582f2ccc9f8943c5f3965e2994b7d137158 13-Nov-2014 Eric Laurent <elaurent@google.com> remove AudioSystem::getOutputSamplingRateForAttr()

It is safer to query the output sampling rate once the output
have been acquired by calling getOutputForAttr().

Bug: 16009464.
Change-Id: Ib561facd19fba5359a6b837d75f1a1cd2dc51b29
udioSystem.cpp
udioTrack.cpp
6d60079e97c5fd6ba7de7b60adb0a027c0608d19 11-Nov-2014 Eric Laurent <elaurent@google.com> am 99370d2d: am ae6965ae: am 3aef3560: am e360f0f6: IAudioPolicyService: bound array size in queryDefaultPreProcessing

* commit '99370d2da54d7537ffda7fef1f6ef36f8b690321':
IAudioPolicyService: bound array size in queryDefaultPreProcessing
99370d2da54d7537ffda7fef1f6ef36f8b690321 11-Nov-2014 Eric Laurent <elaurent@google.com> am ae6965ae: am 3aef3560: am e360f0f6: IAudioPolicyService: bound array size in queryDefaultPreProcessing

* commit 'ae6965ae7664aaea489a8d58358035610075c9af':
IAudioPolicyService: bound array size in queryDefaultPreProcessing
ae6965ae7664aaea489a8d58358035610075c9af 11-Nov-2014 Eric Laurent <elaurent@google.com> am 3aef3560: am e360f0f6: IAudioPolicyService: bound array size in queryDefaultPreProcessing

* commit '3aef35600523eb6b4ccc8086a8913e80701a031a':
IAudioPolicyService: bound array size in queryDefaultPreProcessing
3aef35600523eb6b4ccc8086a8913e80701a031a 11-Nov-2014 Eric Laurent <elaurent@google.com> am e360f0f6: IAudioPolicyService: bound array size in queryDefaultPreProcessing

* commit 'e360f0f6cad290f69e07fd3a20dcf11a1dbc4160':
IAudioPolicyService: bound array size in queryDefaultPreProcessing
e360f0f6cad290f69e07fd3a20dcf11a1dbc4160 05-Nov-2014 Eric Laurent <elaurent@google.com> IAudioPolicyService: bound array size in queryDefaultPreProcessing

Bug: 18226810.
Change-Id: Ib8e2bfe835a8681aac50bf23161db14e50c9a124
(cherry picked from commit 74adca9ad30b7f8a70d40c5237bade0d16c4ea58)
AudioPolicyService.cpp
5239bad27472b9ae42be924a98850683e5e70476 07-Nov-2014 Glenn Kasten <gkasten@google.com> am b177468b: Merge "Improve AudioTrack recovery from mediaserver death" into lmp-mr1-dev automerge: e662cd5

* commit 'b177468bb1647c79ba48cd0a172cf3306b31ad69':
Improve AudioTrack recovery from mediaserver death
e662cd5cdbe1312d6b74754d2945fffe99e4fe2c 07-Nov-2014 Glenn Kasten <gkasten@google.com> Merge "Improve AudioTrack recovery from mediaserver death" into lmp-mr1-dev
caf27abc62e15abc628c04183d3188728fe98990 07-Nov-2014 Eric Laurent <elaurent@google.com> am 7e88fac0: Merge "AudioSystem: remove obsolete method." into lmp-mr1-dev automerge: c339a92

* commit '7e88fac080e3bb1cdc95667f82727ea6c19fb173':
AudioSystem: remove obsolete method.
c339a921642c38621f57e95b4ec41cfaa99c7a63 07-Nov-2014 Eric Laurent <elaurent@google.com> Merge "AudioSystem: remove obsolete method." into lmp-mr1-dev
989af5d7544a8f25cab558d045052a17558676f7 07-Nov-2014 Narayan Kamath <narayan@google.com> am 113adbbc: resolved conflicts for merge of bcf093bf to stage-aosp-master

* commit '113adbbc652874360332caa0c9df68e6b1e25fde':
Fix definining of ANDROID_SMP.
113adbbc652874360332caa0c9df68e6b1e25fde 07-Nov-2014 Narayan Kamath <narayan@google.com> resolved conflicts for merge of bcf093bf to stage-aosp-master

Change-Id: I545e15dde7774624139717e0b23bd96c444cb1bc
a36060891425c4ce0621e40344ac473ec14924dd 07-Nov-2014 Eric Laurent <elaurent@google.com> AudioSystem: remove obsolete method.

Bug: 18067208.
Change-Id: I9bbf9088485f5162c765ca504d9b784b956234c6
udioSystem.cpp
e1a2df553a6d151807a5da738a3cd853bef908d9 07-Nov-2014 The Android Open Source Project <initial-contribution@android.com> Resolve conflict
62fe78b66c87339a64f047561e7b4aac606310e2 07-Nov-2014 Glenn Kasten <gkasten@google.com> Merge "Fix memory leak" into lmp-mr1-dev
2be7786b9847861862c60eaf85c610823fdf2da9 06-Nov-2014 Ian Rogers <irogers@google.com> Fix definining of ANDROID_SMP.

If TARGET_CPU_SMP is undefined, such as in SDK builds, then the condition as
written before could cause SMP memory barriers to be missing.
Also, add a dependency for Android.mk so that changes to it cause
recompilation.

Change-Id: I63ac0dc4342a39b9355fce2b2200016244cffc4a
ndroid.mk
85f480e7fd7c5e70c91d2f205b5c49488a84eb4d 06-Nov-2014 Glenn Kasten <gkasten@google.com> Fix memory leak

Change-Id: I3f4110a88679b7e7841f40c6acdbf5dcde40fb19
AudioPolicyService.cpp
1cf9ad1abb599ce4057189e0db154cf00b4913f8 06-Nov-2014 Jeff Tinker <jtinker@google.com> Merge "Pass resolution to Crypto plugin on format change" into lmp-mr1-dev
19a3f69d9d5398db62ee7b15f2c13052d7ee9f07 06-Nov-2014 Jeff Tinker <jtinker@google.com> Merge "Add missing secure stop methods" into lmp-mr1-dev
d2d089fc86c62843992e7d5b371ee9227189a1e6 05-Nov-2014 Glenn Kasten <gkasten@google.com> Improve AudioTrack recovery from mediaserver death

1. Fix race condition in handling of binder death notifications.

AudioSystem has a mixture of APIs for both ordinary app clients,
and the AudioFlinger and AudioPolicy services within mediaserver.
Due to this mix of uses, it is possible for there to be "surprising"
sequences of calls on the call stack.

Previously, we used a single mutex for all global variables, but
this caused a deadlock. To avoid the deadlock, we unlocked the mutex
during the critical sequence of calls. But this was a a
crucial place where it should have stayed locked;
see Change-Id I315c1c5066f62b05e1c13b04fae1272b5fbce977

Now we use separate mutexes for the AudioFlinger, AudioPolicy, and audio port
related global variables. This allows us to correctly hold each mutex
throughout the atomic region, even when AudioFlinger calls AudioPolicy
via AudioSystem, or vice-versa.

2. AudioSystem::clearAudioConfigCache now clears the IAudioFlinger reference.

3. Make AudioSystem::get_audio_policy_service more like get_audio_flinger.

Bug: 18242291
Change-Id: I9761443d8337df5bf66d4ca2316a9fd0bd11be94
udioSystem.cpp
udioTrack.cpp
74adca9ad30b7f8a70d40c5237bade0d16c4ea58 05-Nov-2014 Eric Laurent <elaurent@google.com> IAudioPolicyService: bound array size in queryDefaultPreProcessing

Bug: 18226810.
Change-Id: Ib8e2bfe835a8681aac50bf23161db14e50c9a124
AudioPolicyService.cpp
2514d080c8a54ff603a45d7e336de668fe7329db 03-Nov-2014 Jeff Tinker <jtinker@google.com> Pass resolution to Crypto plugin on format change

Change-Id: I56cd557ce3525fe625db8c312d2557d3c8b51101
related-to-bug: 16034599
Crypto.cpp
461b02d3eccefea48fa15c67a9cd3a5895bd2765 04-Nov-2014 Eric Laurent <elaurent@google.com> Merge "audio: fix talkback why alarm is playing" into lmp-mr1-dev
03fcdcd0aa9758b6d882b18218fcfb9a1ccffdad 04-Nov-2014 Eric Laurent <elaurent@google.com> audio: fix talkback why alarm is playing

Convert attributes usage "assistance accessibility" to
a stream type guarantying that the prompt is audible
and not muted by policy manager.

Bug: 17994328.
Change-Id: I89f53f2ce84b499b859336c0a1a3a0332ee670f5
udioTrack.cpp
d9cfeb447356cb6334379eaf5da1e49424eb5979 23-Sep-2014 Jean-Michel Trivi <jmtrivi@google.com> Support speaker routing for FLAG_BEACON

Add support for routing audio stream to the speaker when audio
attributes carry the FLAG_BEACON value:
- associate streams with FLAG_BEACON to the up-to-now unused
STREAM_TTS ("Transmitted Through Speaker").
The remapping happens in AudioTrack.
- AudioPolicyManager: define new strategy for handling the Beacon
behavior, that only goes to speaker. Define new volume curves
for STREAM_TTS that are not silence only for the speaker device
category. Keep ref count of other streams and never play Beacon
streams when anything else is playing: either don't start playback
if something else is playing, or unmute STREAM_TTS when it's
allowed to play and mute when it's done.
- Take into account muting latency when starting an output.

Bug 15415971

Change-Id: I26539c7ec1a486accd85bbeb1623e9c7d3a1192f
udioTrack.cpp
3c1285e8f86bd497e14c14fb6df7b42072ef52bd 31-Oct-2014 Jeff Tinker <jtinker@google.com> Add missing secure stop methods

b/18053197
b/18076411

Change-Id: I923dc893d48c70bf17980007b32f0ac5dfd22896
Drm.cpp
20f51b1ea04c410a25f214e37bcdb586e2a028cc 30-Oct-2014 Glenn Kasten <gkasten@google.com> AudioTrack::flush() will no longer flush later data

Bug: 17832076
Change-Id: I4915d782acb8077923e419406b0dcea5b6aab961
udioTrackShared.cpp
aac745f29b0e8b18e9f9aff0d122c7d5d82f218a 28-Oct-2014 Glenn Kasten <gkasten@google.com> Merge "libmedia: ensure mCaptureThread exit within Visualizer destructor" into lmp-mr1-dev
63f6ffb996a7ffc920012f05c3deca731614373f 25-Sep-2014 Haynes Mathew George <hgeorge@codeaurora.org> libmedia: ensure mCaptureThread exit within Visualizer destructor

If mCaptureThread doesn't exit when Visualizer instance gets destroyed,
recycled member variables with random value such as danger pointer will
be accessed again and causes crash.

Thread which is created within Visualizer instance lifecycle should be
terminated before or within destructor.

CRs-Fixed: 688546
authored-by: wjiang@codeaurora.org
cherry-pick from CAF commit: 4823e3d6b8c60faa4d8fee5d58728eb70e56abf2

Bug: 18159501
Change-Id: Ie0b12ae8a3b9735b6ecbac0353781b8358cad644
isualizer.cpp
c2813e568aa476e03d159529c0af28c99536db8d 17-Oct-2014 Andy Hung <hunga@google.com> Fix AudioTrack retrograde getPosition when restoring tracks

mReleased represents the number of frames written to the
track, but was cleared on start() causing a mismatch if the
client wrote to the track before starting. Moved the clearing
to entering the STATE_STOPPED or STATE_FLUSHED state.

Bug: 18017947
Bug: 18022276
Change-Id: I3788c98c4c3c4d9cc004378432797b3f3138e22e
udioTrack.cpp
b6dcdbf436ffacb52a41ac8ef9b07f99fd64779f 16-Oct-2014 Chris Elliott <chriselliott@google.com> Revert "audio: prevent larger than required sleeps - DO NOT MERGE"

Revert change if we require a build beyond P

This reverts commit 620208dc0bbd7a0792702df3ab08800fdad60cec.

Change-Id: I07f65e35dbd9f814725f50f7bb346f7b285f41aa
udioTrack.cpp
620208dc0bbd7a0792702df3ab08800fdad60cec 15-Oct-2014 Chris Elliott <chriselliott@google.com> audio: prevent larger than required sleeps - DO NOT MERGE

This will be cherry picked into P build after O completes for other devices.

This reverts the revert from commit 2feb18ddfdbd20941ebcc3314780a582da5608e4.

b/17962037

From: Haynes Mathew George <hgeorge@codeaurora.org>
Date: Wed, 26 Mar 2014 16:18:42 -0700
Subject: [PATCH] AudioTrack: prevent larger than required sleeps

AudioTrackThread can end up waiting for larger than necessary
time for free space to be available in the cblk. Fix this by
waiting on the cblk futex instead of the (internal) condition variable.

Change-Id: Iba5b266f9b4082b3833f4abd52ebc6601c8e3034
udioTrack.cpp
2feb18ddfdbd20941ebcc3314780a582da5608e4 15-Oct-2014 Chris Elliott <chriselliott@google.com> Revert "audio: prevent larger than required sleeps - DO NOT MERGE"

This reverts commit 8c0417c173d1fd618ae54e2d721b0ec360ea70cc.

Reverting as we only wanted to include this CL the KNX01M build

Change-Id: Ib53292de658078285a38710915168e1746486fea
udioTrack.cpp
8c0417c173d1fd618ae54e2d721b0ec360ea70cc 09-Oct-2014 Haynes Mathew George <hgeorge@codeaurora.org> audio: prevent larger than required sleeps - DO NOT MERGE

b/17962037

From: Haynes Mathew George <hgeorge@codeaurora.org>
Date: Wed, 26 Mar 2014 16:18:42 -0700
Subject: [PATCH] AudioTrack: prevent larger than required sleeps

AudioTrackThread can end up waiting for larger than necessary
time for free space to be available in the cblk. Fix this by
waiting on the cblk futex instead of the (internal) condition variable.

Change-Id: I75bd14cd46f3b75afe0ea8bd9b48d7a2f95f654a
udioTrack.cpp
7985dcb06e0c29d5cc12d0c0e17e03d5d863cf53 08-Oct-2014 Eric Laurent <elaurent@google.com> AudioTrack: fix AudioTrackThread crash upon exit

In case of error during createTrack_l(), there is a possibility
that a newly created AudioTrackThread is resumed by requestExit()
just after entering the Thread class _threadLoop() but before
entering the class threadLoop(). In this case, processAudioBuffer()
is executed once with mCblk == 0 and we assert.

Bug: 17894033.
Change-Id: I93d0d0d4dbf14bcb88dad23e6ad49d2ecd47badd
udioTrack.cpp
bb6c9a05840d924b502ce0f1868fca4881ada1ed 25-Sep-2014 Eric Laurent <elaurent@google.com> audio: fix stream type for accessibility usage

Make sure that accessibility prompts are heard when
a ringtone is active by forcing stream type
to AUDIO_STREAM_RING when phone state is AUDIO_MODE_RINGTONE.

Bug: 17558149.
Change-Id: Ia3bead8052fca5cbf282c267f7b9b06014fef628
udioSystem.cpp
udioTrack.cpp
AudioPolicyService.cpp
dfc34daba6d6cb923683d96689a0cb7c7006eee5 19-Sep-2014 Glenn Kasten <gkasten@google.com> Reduce log spam from getTimestamp errors

Bug: 17576481
Change-Id: I07d99e7c42b7d4f0994b5a6d9c9fe8eb29fbbe40
udioTrack.cpp
6aadfce1d8c972faad7f4437dcd88d8cd3557611 19-Sep-2014 Jean-Michel Trivi <jmtrivi@google.com> Merge "AudioEffect acquires session" into lmp-dev
a0fd9ca66a68baefd9d76800fd66823fd654ef45 18-Sep-2014 Jean-Michel Trivi <jmtrivi@google.com> AudioEffect acquires session

Currently, users of audio sessions, AudioTrack and AudioRecord,
are acquiring and releasing audio sessions according to their
life-cycle. AudioEffect instances were not counting as users
of an audio session. This caused an effect used on a session
to be purged by AudioFlinger::purgeStaleEffects_l() whenever
the last user of that session went away.
This CL makes AudioEffect acquire and release a session when
created and destroyed.

Bug 15432115

Change-Id: I922532150009988d43872f9b5928044a830ae0b3
udioEffect.cpp
7f1bc8af1c46695191bf7e2aba6467f3616629c0 12-Sep-2014 Andy Hung <hunga@google.com> Fix AudioTrack offloaded timestamp handling.

getTimestamp for offloaded tracks now returns WOULD_BLOCK for
situations where the timestamp is unavailable due to the
previous track still flushing or the timestamp is stale.
It is fixed for normal playback conditions.

Bug: 14659809
Bug: 17428188
Change-Id: Ic9ec07ccabc604236979769db5c4ea2dec252660
udioTrack.cpp
200092b7f21d2b98f30b800e79d152636f9ba225 16-Aug-2014 Glenn Kasten <gkasten@google.com> Clean up AudioTrack position and timestamp handling

Replace epoch concept by observing and accumulating server delta
positions. The advantage of using server deltas instead of absolute
values is that they (1) are not sensitive to 32-bit wraparound,
(2) are not sensitive to server behavior for stop(), and
(3) prepare for future 64-bit client positions without requiring 64-bit
positions on server.

Add comments to AudioTrack::getTimestamp() and friends
that the timestamp output parameter is undefined on error.

Don't allow getTimestamp to return a negative frame position after stop().

Accumulate the client released frames, which may be useful for a future API.

Bug: 11815245
Change-Id: I652940fa2db2f34a78c012a3ead0d9204fa29c6e
udioTrack.cpp
9520aa609c505cf8a9ee105bd78dc186cfb7770b 10-Sep-2014 Zhijun He <zhijunhe@google.com> CamcorderProfile: Add QUALITY_HIGH_SPEED_2160P

Bug: 17059255
Change-Id: Ic6b272e4ceec8fc852c9eb787370f4d366dad0ac
ediaProfiles.cpp
b445375f50a1a619b2d7518d32387d5ea77ceb70 08-Sep-2014 Andy Hung <hunga@google.com> Fix potential deadlock between AudioPolicyService and AudioSystem

Bug: 17109761
Change-Id: I315c1c5066f62b05e1c13b04fae1272b5fbce977
udioSystem.cpp
640adb3cf89cc9b826372009fad8c9b3d120482e 05-Sep-2014 Jean-Michel Trivi <jmtrivi@google.com> Cache audio attributes when player not available

Cache the audio attributes stored in a Parcel in the client-side
MediaPlayer object if they are set through setParameter()
before the server-side MediaPlayer is available. Apply them when
the player is prepared.

Bug 17280746

Change-Id: I72f1a7fc4e2b076fae8cbdede77a2f74e98b2a03
ediaplayer.cpp
d71233a846aca7035a851941c1530d04c6a65086 03-Sep-2014 Marco Nelissen <marcone@google.com> Merge "Use CharacterEncodingDetector in metadataretriever" into lmp-dev
34581f44cde67960fbac3ba1f191a2c063ea5145 30-Aug-2014 Marco Nelissen <marcone@google.com> Use CharacterEncodingDetector in metadataretriever

instead of media scanner. This way the java MediaMetadataRetriever API
will give the same result as the media scanner.
Also apply some tweaks to the encoding detector to improve handling of
ISO-8859-1 tags.

Bug: 16302581, 17205395

Change-Id: I1682a7a6a8bf04cffaa455044ba72dd7fd152d49
ndroid.mk
haracterEncodingDetector.cpp
haracterEncodingDetector.h
ediaScannerClient.cpp
tringArray.h
a90cff5f7091bfb50c57e2d87bad3fc3f103f397 23-Aug-2014 Hochi Huang <hochi.huang@mediatek.com> [AU]Sync libmedia/Android.mk modification from KLP-Sprout

Bug: 17322146

Change-Id: If29fbd87252710bd794f2e0bb270bc846380ef1d
Signed-off-by: Hochi Huang <hochi.huang@mediatek.com>
ndroid.mk
732c6d955524ead6c31e6e1bafbd41ea4cee525d 15-Aug-2014 Lajos Molnar <lajos@google.com> stagefright/media: add support for codec features with text value

Bug: 11990470
Change-Id: I7600d999c5f4b6821d825d25fa7e8a2bb5a80c46
ediaCodecInfo.cpp
d018b8ffd84452a7a4b992b5325713b3256e48ff 12-Aug-2014 Lajos Molnar <lajos@google.com> Merge "MediaCodecList: handle errors gracefully" into lmp-dev
2461e0cf6ae3fe5c9b52ce9e3ac764f4aff5e5eb 12-Aug-2014 Lajos Molnar <lajos@google.com> MediaCodecList: don't return references

Bug: 16905025
Change-Id: I5b42b294f0cc785b8e4dda0e82c8f8377a46f487
ediaCodecInfo.cpp
6ff58f04f78886b07c72c0118eb71a78d08f5651 12-Aug-2014 Lajos Molnar <lajos@google.com> MediaCodecList: handle errors gracefully

Handle missing OMX codecs, and codecs that do not load.
Fix NULL dereference when initializing codec with no type.

Bug: 16907578
Bug: 16905025
Change-Id: I5d103db36ebb029d1aab03222bf6e9324beb1566
ediaCodecInfo.cpp
306c92dabc524f408445f7da2524c7a5e77ade63 11-Aug-2014 Andy Hung <hunga@google.com> Merge "Extend downsampling ratios greater than 2:1" into lmp-dev
cd04484f4837b8ca0041d118286ab6a98e84fc75 07-Aug-2014 Andy Hung <hunga@google.com> Extend downsampling ratios greater than 2:1

Also improve robustness to choice of sampling rate or buffer size
such that increasing either by 10x does not cause overflow.

Bug: 12979141
Bug: 15933066
Change-Id: If7989bd745d1bee3bdf811b8b7c978543ccafb65
udioTrack.cpp
5a446aafff3020d607ad6fb14cc7ae76dd8f7947 30-Jul-2014 Rachad <rachad@google.com> Added Tunneled video playback support to ACodec

Bug:16132368
Change-Id: I88d2d66b8548fc203f4a2c4797196af15e56ff38
OMX.cpp
1381d4b5c0385aec3741073e5998773b064c1fb0 08-Aug-2014 Lajos Molnar <lajos@google.com> media/playerservice: add getCodecList() to MediaPlayerService

Bug: 11990470
Change-Id: I8fa45946fd9b76f9b975fc59062819c57e6881ef
MediaPlayerService.cpp
60b1c0e79d12a1c70758bc8d060156924635f8ba 07-Aug-2014 Lajos Molnar <lajos@google.com> stagefright: rework media codec list and infos

This is in preparation of serving the codec list and codec infos
from the mediaserver

Bug: 11990470
Change-Id: Ib8e2708679c9ce461a4ba179974a740cdcdf2731
ndroid.mk
MediaCodecList.cpp
ediaCodecInfo.cpp
93c3d41bdb15e39dac0faea9c5b60f1637cd477c 01-Aug-2014 Eric Laurent <elaurent@google.com> AudioSystem: add API to query audio HW sync source

Add a method to query from the audio HAL the HW sync
source used for a given audio session.
Modify audio policy to select a direct output with HW sync
when requested.

Bug: 16132368.

Change-Id: I03038f9188f2d389f8a5fd76a671854013a4513e
udioSystem.cpp
AudioFlinger.cpp
df3dc7e2fe6c639529b70e3f3a7d2bf0f4c6e871 28-Jul-2014 Eric Laurent <elaurent@google.com> Add sound trigger control by audio policy

Audio policy:
- Added active capture indication to sound trigger service:
recognition stops if concurrent capture is not supported.
- Added generation of reserved I/O handle and session ID for
utterance capture.

Sound trigger service
- Added sound model update callback handling.
- Added service state callback
- Simplified callback shared memory allocation.

Bug: 12378680.

Change-Id: Ib0292c2733e6df90fdae480633dd9953d0016ef1
udioSystem.cpp
AudioPolicyService.cpp
68b15554f6dca3b056eac517fe5fa2fd4ee80a33 30-Apr-2014 Jeff Tinker <jtinker@google.com> Allow device to be unprovisioned

bug: 12247651
Change-Id: I564ac8de3da2430342a028f4058e2c5ac2d85d5e
Drm.cpp
4dc680607181e6a76f4e91a39366c4f5dfb7b03e 29-Jul-2014 Eric Laurent <elaurent@google.com> audio policy: pass session ID to capture activity methods

Indicate the audio session ID when calling getInput(),
startInput(), stopInput(), releaseInput().

Bug: 12378680.
Change-Id: I763793752f93e2f4e1445a5ab217c895af011038
udioRecord.cpp
udioSystem.cpp
AudioPolicyService.cpp
de3f8392fbf380ba6f09d009b00d7172477389a2 28-Jul-2014 Eric Laurent <elaurent@google.com> rename AudioSystem::newAudioSessionId()

Rename AudioSystem::newAudioSessionId() to
AudioSystem::newAudioUniqueId() as it can be used
also for I/O handles.

Bug: 12378680.
Change-Id: I611ea3b5eb57a4b0774437f477ee87dc4ccc2cc2
udioRecord.cpp
udioSystem.cpp
AudioFlinger.cpp
ediaplayer.cpp
cf2c0210c8afbe7d0661ccbbae3835b5ce73c0bf 26-Jul-2014 Eric Laurent <elaurent@google.com> AudioFlinger: update openInput() and openOutput()

Add parameters to openInput() and openOutput(): device address,
input source.
Allow caller to specify a given I/O handle
Group parameters in a struct audio_config.

Bug: 12378680.
Change-Id: I7e9af74c0d996561cc13cbee7d9012d2daf33025
AudioFlinger.cpp
6c28f1fb6d8262a327ffa8be5bb4c84c9ef7ce62 26-Jul-2014 Zhijun He <zhijunhe@google.com> Merge "CamcorderProfiles: add high speed profile constants" into lmp-dev
e07909715b44cc56df723750af93f0608210f94d 24-Jul-2014 Zhijun He <zhijunhe@google.com> CamcorderProfiles: add high speed profile constants

Change-Id: I8f783466f8c2560820db14488acc1a309d27ab0f
ediaProfiles.cpp
db2225b2a24fa4ade5c0353730dc2d6a2f5838d9 23-Jul-2014 Chong Zhang <chz@google.com> Merge "NuPlayer: save thread id in MediaPlayer::start" into lmp-dev
d88adb96ec867ed1b629c434f87514d2fabaf5e9 23-Jul-2014 Chong Zhang <chz@google.com> NuPlayer: save thread id in MediaPlayer::start

so that when MediaPlayer::notify is called from within start,
it doesn't try to lock itself again.

Bug: 15323063
Change-Id: Idd77e892cd22538bbfe3e65c64c9dd2a216a0aee
ediaplayer.cpp
f6f4c0d7c5e2d33b38f080896466e56e2d0a97d4 23-Jul-2014 Robert Shih <robertshih@google.com> Merge "StagefrightRecorder: webm (video only) support" into lmp-dev
114819633470ebd5b346c13c2a82a0025d2d39c0 10-Jul-2014 Robert Shih <robertshih@google.com> StagefrightRecorder: webm (video only) support

Bug: 16329805
Change-Id: I8a0ecd100fca397add97a1416125bcc6aeb86364
ediarecorder.cpp
df813a3ba59109ca519ce0cb00a1a9144074f40e 21-Jul-2014 Jean-Michel Trivi <jmtrivi@google.com> audio_attributes_t for SoundPool

Add support for the audio_attributes_t structure in the
SoundPoool constructor.
Remove SRC quality which was never implemented.
Remove stream types.

Add file to contain audio helper functions related to policy.

Change-Id: I1720ff15e7b23ea7b713a4395fdfac26dc3fd4da
oundPool.cpp
7410591dad836434c72ddee66680802708b70c10 03-Jul-2014 Glenn Kasten <gkasten@google.com> Move AudioRecord frame count calculations to server

Buffer frame count and notification frame count
are now calculated by server instead of by client.
The server has more information and can do a better job.

Also fix a few bugs:

- If a fast track was re-created, even with same pipe depth, it would fail.
Now it can correctly re-create a fast track provided the pipe depth is same.

- Notification frame count for fast tracks was calculated by client
as 1/2 of the total frame count, which is a large value due to the pipe.
Now the notification frame count is set by server to the HAL frame count.
This should reduce latency for fast tracks.

- EVENT_OVERRUN were happening frequently when there was sample rate conversion,
because the client didn't know about the sample rate conversion,
and under-estimated the necessary buffer size. Now since server
calculates the buffer sizes, EVENT_OVERRUN is unlikely.

- RecordThread::createRecordTrack_l was checking for mono and stereo
for fast tracks. This is not necessary, and now we can handle a
multi-channel fast track.

Bug: 7498763
Change-Id: I0c581618e8db33084d5ff9ed50a592990c9749e8
udioRecord.cpp
AudioFlinger.cpp
b3b1660ecb67f61f9da54efced8677fa3a6f4863 16-Jul-2014 Glenn Kasten <gkasten@google.com> Add audio_input_flags_t to IAudioPolicyService::getInput

Change-Id: I9f37be05f8dc7b85a8827a94e76ca0f45453e170
udioRecord.cpp
udioSystem.cpp
AudioPolicyService.cpp
ec40d284218466d8f0e832e7eb88e6ea6c479c88 16-Jul-2014 Glenn Kasten <gkasten@google.com> Add audio_input_flags_t to IAudioFlinger::openInput

For backward compatibility, until flags are correctly calculated,
we will assume that the request is for a low latency input stream.

Change-Id: I76746834e870df00833dc77cbdaa2edd2ffeec95
AudioFlinger.cpp
01cab9ce4fb203fab8f5115ff866f9f0cc96a73a 10-Jul-2014 Elliott Hughes <enh@google.com> resolved conflicts for merge of 373e21cc to master

Change-Id: I91afd8f9cba04559d21e1c84e25c5c60c990165d
373e21cc119cede767dc93d75c91645dbf9ae19f 10-Jul-2014 Elliott Hughes <enh@google.com> am be44e0e0: am 0bffd2e6: Merge "Switch frameworks/av/media/libmedia to the new icu."

* commit 'be44e0e0ffda04725c4864d894a7cc80bd74b5ca':
Switch frameworks/av/media/libmedia to the new icu.
51bc26144ca9c3872e41f9864622170d528be1b0 10-Jul-2014 Elliott Hughes <enh@google.com> Switch frameworks/av/media/libmedia to the new icu.

Change-Id: I45349756bac6d89b02dba082ba6d606f4c489dcf
ndroid.mk
7df8c0b799d8f52d6386e03313286dbd7d5cdc7c 03-Jul-2014 Glenn Kasten <gkasten@google.com> IAudioFlinger::openRecord now suggests notificationFrames

Change-Id: I08885cc381d03c522a23289e74f0e1ed46563863
udioRecord.cpp
AudioFlinger.cpp
d9d7fa0873796ac661c44a7fcd6ad5ff697ff01f 24-Jun-2014 Jean-Michel Trivi <jmtrivi@google.com> Support for audio attributes on audio output of media player

Change-Id: Iae4995c98e64add1ab9e6c8ae6501515032755f5
udioTrack.cpp
ediaplayer.cpp
34fb29696b0f3abf61b10f8d053b1f33d501de0a 19-Jun-2014 Mark Salyzyn <salyzyn@google.com> libmedia: 64-bit compile warnings

Change-Id: I600f062fa7148c01851023c1240c39939e648002
udioRecord.cpp
udioSystem.cpp
udioTrack.cpp
udioTrackShared.cpp
haracterEncodingDetector.cpp
MediaMetadataRetriever.cpp
MediaRecorder.cpp
ediaProfiles.cpp
oundPool.cpp
ediametadataretriever.cpp
ediaplayer.cpp
ediarecorder.cpp
ab5cdbaf65ca509681d2726aacdf3ac8bfb6b3fa 10-Jun-2014 Eric Laurent <elaurent@google.com> AudioTrack: add support for compressed audio

Add support for compressed audio playback by use
of an AudioTrack attached to a direct output thread.

Bug: 9428304.

Change-Id: I4a61be9cf0e31003ca85935d6e0ee38ca8192e03
udioTrack.cpp
5bd3f38638acab633d181359cc9ec27b80f84d43 14-Jun-2014 Jean-Michel Trivi <jmtrivi@google.com> AudioPolicyManager: return output for audio attributes

In AudioPolicyManager, support querying an output
or playback strategy for audio attributes,
instead of a stream type,
In AudioTrack creation, use the output returned
for the track's attributes.

Change-Id: I0fef05845ba676404775e2e338c10e6a96237268
udioSystem.cpp
udioTrack.cpp
AudioPolicyService.cpp
faabb51ceef13bf1e3f692219ac410c1cd75d0de 12-Jun-2014 Jean-Michel Trivi <jmtrivi@google.com> AudioTrack construction with audio attributes

Store audio attributes in AudioTrack class.
When an AudioTrack is "set" with non null audio
attributes, derive a stream type that reflects
the attributes.
When an AudioTrack is "set" without attributes,
and only has a stream type, derive default
audio attributes.

Change-Id: I322b91fa9a7e193118960c5e78cdddd85d66f9ad
udioTrack.cpp
ba7a4e11a66a7044dbbd767983865e1774092dc6 13-Jun-2014 Narayan Kamath <narayan@google.com> am 90732a3b: Merge "Remove dependency on Parcel::{read,write}IntPtr"

* commit '90732a3be5e70156486aca94bde8aa81106329ba':
Remove dependency on Parcel::{read,write}IntPtr
8b8e5d45928aed8592d321fe55f560e35a4fece8 13-Jun-2014 Narayan Kamath <narayan@google.com> resolved conflicts for merge of cbd74fcb to klp-modular-dev-plus-aosp

Change-Id: I00270ef6fe813c0d3649483cbc3aba6af789e033
9c68ac03f16cc32625f6965e869432eae4fded2d 13-Jun-2014 Jean-Michel Trivi <jmtrivi@google.com> Merge "AudioSystem: remove unused stream type"
20d16a8af2dc95e827be693edabde4f09eb90c32 13-Jun-2014 Eric Laurent <elaurent@google.com> am 3bcffa13: force command flush after releasing a reference to shared memory

* commit '3bcffa136909c1fb6e88ee4efd12ccac18360a85':
force command flush after releasing a reference to shared memory
3bcffa136909c1fb6e88ee4efd12ccac18360a85 13-Jun-2014 Eric Laurent <elaurent@google.com> force command flush after releasing a reference to shared memory

After releasing a reference to a shared memory interface,
IPCThreadState::self()->flushCommands() must be called to ensure
that the corresponding reference is also cleared immediately in the
remote process. Otherwise the binder implementaiton will not
push the clear systematically causing the memory region not to be freed.

See issues 10711502 and 2801375.

Bug: 14057166.
Change-Id: If55f36f00d452d6cf00cf83bd2fba1c8f3abcb57
udioRecord.cpp
udioTrack.cpp
7903bb2b3065d58cc75637900922b434f50024d9 12-Jun-2014 Elliott Hughes <enh@google.com> am 2a8270e6: am c323737d: Merge "Offer a type-safe album art interface."

* commit '2a8270e6944fb3addfcba87f6885aaad196b8b88':
Offer a type-safe album art interface.
2a8270e6944fb3addfcba87f6885aaad196b8b88 12-Jun-2014 Elliott Hughes <enh@google.com> am c323737d: Merge "Offer a type-safe album art interface."

* commit 'c323737dd46d724b4c1ec230b283f26ae2a22b4f':
Offer a type-safe album art interface.
b7f24b101d43139b4c747129bfbc4ecf5c468b86 11-Jun-2014 Jean-Michel Trivi <jmtrivi@google.com> AudioSystem: remove unused stream type

The audio stream type is not used in the getSampleRate() and
getFrameCount() methods.

Change-Id: I3d065ae272bd039204cd323cdab9b60460034f2d
udioSystem.cpp
udioTrack.cpp
8b1be2ca7cee71a4920d5d31fdcbad2b1d4ca49d 02-May-2014 Andy Hung <hunga@google.com> Update OMX messages for 64 bit

Change node_id and buffer_id to uint32_t.
Ensure IOMX messages are fixed size.
Remove 64 bit compile warnings in associated files.

Change-Id: Icdbef00aca575e5dc502ebb52e3ce7d0d7883203
Signed-off-by: Andy Hung <hunga@google.com>
OMX.cpp
f3e80dddd7376aa9deeb27de25e1d50030a2ad98 11-Jun-2014 Elliott Hughes <enh@google.com> Offer a type-safe album art interface.

Bug: 15514223
Change-Id: Iddfc33a00e6cd3779ca09c01a55f62b151f6ec95
ediaScanner.cpp
c5a66b77adcdfa2a403dfddc5ef3469fada75683 12-Jun-2014 Jeff Tinker <jtinker@google.com> Merge "Remove dependency on Parcel::{read,write}IntPtr"
5f6af1a8e34381ca2ac2527fcefe220a22f49b53 10-Jun-2014 Zhijun He <zhijunhe@google.com> MediaProfiles: Add 4K video related constants

Bug: 15287656
Change-Id: I4c49640a349afb336f52db1636902fc216bff6ad
ediaProfiles.cpp
90732a3be5e70156486aca94bde8aa81106329ba 13-Jun-2014 Narayan Kamath <narayan@google.com> Merge "Remove dependency on Parcel::{read,write}IntPtr"
1766b08d35a45e12a13b264a5944e1b622b8715b 10-Jun-2014 Jeff Tinker <jtinker@google.com> Remove dependency on Parcel::{read,write}IntPtr

bug: 15424960
bug: 15107693

(cherry picked from commit bcca9e072c1f288a53ce6862936f57dc36488f96)

Change-Id: I3ba59fccb184e99a07f6f82ccdbd00e5204901f6
Crypto.cpp
bcca9e072c1f288a53ce6862936f57dc36488f96 10-Jun-2014 Jeff Tinker <jtinker@google.com> Remove dependency on Parcel::{read,write}IntPtr

bug: 15424960
bug: 15107693

Change-Id: Ic3bf37f591e620985c37f345f9a5544fd20ec4a1
Crypto.cpp
c263ca0ad8b6bdf5b0693996bc5f2f5916e0cd49 05-Jun-2014 Glenn Kasten <gkasten@google.com> Squashed commit of the following:

commit 9128d6ffec43731d723f9b394f243d940f4c7e41
Author: Glenn Kasten <gkasten@google.com>
Date: Tue May 13 10:38:42 2014 -0700

Use of fast capture by normal capture

Will only configure fast capture path if the input buffer size is less than
10 ms and the input sample rate is same as the primary output sample rate.

Change-Id: I4a7cdc6069d750845412c626d27e83f72a1ab397

commit 2e5e0806a5abe7499848358ef5fde5c26405000d
Author: Glenn Kasten <gkasten@google.com>
Date: Mon Jun 2 08:29:22 2014 -0700

Add mPrimaryOutputSampleRate

Change-Id: I46b527fc3f2b5a5720a74b4f0b9a8f2e0d570b09

commit baf1d73467923996d1b1f2a9237260cc5697e050
Author: Andy Hung <hunga@google.com>
Date: Fri May 30 10:42:03 2014 -0700

Change parameter type for volume to float in AudioMixer

Change-Id: I4da1505ce852505f86f8e5b87f60e8edceeb30e0

commit 40fe20fa9760cd03c69778c2021cf7a490d75ece
Author: Andy Hung <hunga@google.com>
Date: Fri May 30 10:35:47 2014 -0700

Rename UNITY_GAIN to UNITY_GAIN_INT in AudioMixer

Change-Id: Ic040311305026f0b4c4280a5b3bef7a447ac1da3

commit 37c9a2b49f876abc5ff537a9ec036d7f0a423775
Author: Andy Hung <hunga@google.com>
Date: Thu May 29 21:33:13 2014 -0700

Refactor setVolumeRampVariables in AudioMixer

Change-Id: I8fcf3101bcea292de7c65433fa578f1c9cdd0974

commit 397070eca31f121d5d3993de1bfea99aaea5d4f3
Author: Andy Hung <hunga@google.com>
Date: Thu May 29 18:52:38 2014 -0700

Fix floating point output from mixer

A buffer pointer was being erroneously reset to buffer start,
potentially causing an audio glitch. The floating point
output mode is not enabled at this time, but will be in
the future.

Change-Id: If8b6414d232f064f3a2e2c5a6da889a91b27fb24

commit 2e61aa5b33b2247bbc5d4eaa0b519df9accd4bbc
Author: Andy Hung <hunga@google.com>
Date: Fri May 23 21:22:17 2014 -0700

Add multiple format capability to FastMixer

Floating point data from MixerThread into FastMixer.
Multiple output format capability from FastMixer to Sink.

Change-Id: I0da17810ee71381a39a006c46faec71108d22c26

commit b9ea653c702a785bbd23a66c5e588d40b4192c4e
Author: Andy Hung <hunga@google.com>
Date: Thu May 29 15:53:09 2014 -0700

Avoid resetting BufferProviders in mixer unnecessarily

Change-Id: Iad85c4dfd21be1dbf89dc11906106b34219376f8

commit 7f1a6d6da21c616f80cf9ba21bea11b419ec561b
Author: Andy Hung <hunga@google.com>
Date: Tue May 27 12:32:17 2014 -0700

Update dynamic resampler buffer fetching

Make the criteria tight for fetching to avoid storing
excessive frame data internal to the resampler.
This should reduce jitter in frame delivery computation.

Bug: 14962343
Change-Id: I7adaf714d11c272696ccdbf218bda994c7217477

commit b5e4aac07b9a02f0c803c090058602b03ac09ebb
Author: Glenn Kasten <gkasten@google.com>
Date: Tue May 27 12:30:54 2014 -0700

Allow kFastTrackMultiplier to be specified per device

Change-Id: I4eaaaf038df720cec4f5d9221d1b632970f9e3dd

commit b93cd97a52af31122df2da2cc0415cda888c8c73
Author: Andy Hung <hunga@google.com>
Date: Fri May 23 21:13:31 2014 -0700

Rename mixBuffer to mMixerBuffer in FastMixer

Likewise mixBufferState becomes mMixerBufferState.
This harmonizes with the naming in AF::MixerThread.

Change-Id: I1255d7c07cc2c6ee925d7430925236d2bd163122

commit 8340758622b9711365a8801806cbdf934803c63f
Author: Andy Hung <hunga@google.com>
Date: Mon May 12 16:51:41 2014 -0700

Add multiple format capability to AudioMixer

Change-Id: I04ac1cafd90b6ed652f8d51888ad07576678f0bc
Signed-off-by: Andy Hung <hunga@google.com>

commit 6b695b9d094820c232a897a3fabbe83d2b7193fe
Author: Glenn Kasten <gkasten@google.com>
Date: Thu Mar 13 14:59:31 2014 -0700

Start adding FastCapture based on FastThread WIP

This version supports at most one fast capture client.

Change-Id: Idf609bfc80ae22433433d66a5232c043c65506df

commit e951ad05a2c388471d7e2806d91e7d51325a150a
Author: Glenn Kasten <gkasten@google.com>
Date: Mon May 12 11:06:26 2014 -0700

Move validation of frameCount from set to openRecord_l

This move is needed because frameCount is validated on server side for
fast tracks (as should be done for normal tracks too).

Change-Id: I6d99e80869fd90fab373cf60ef348c01f075fbca

commit 73e76992dbba794894837c38e5472312ea829cf3
Author: Glenn Kasten <gkasten@google.com>
Date: Tue May 13 10:41:52 2014 -0700

Allow track buffer "allocation" to be from pipe

Change-Id: Ib9ac170f8e8b7746b3588157a56cbee3b753a1cb

commit 60de1d7ded05c6304037d4858b401094b1d2b4d3
Author: Andy Hung <hunga@google.com>
Date: Fri May 9 15:02:21 2014 -0700

Add format parameter to getTrackName() and track_t

Change-Id: Ia152a839014e235fbfb656104c15d7c1b456d02e
Signed-off-by: Andy Hung <hunga@google.com>

Change-Id: Ied0ade8b25d23e89bb03319a7e3135c238f735b9
udioRecord.cpp
udioTrackShared.cpp
e40ed90293eeb0feecb5b7729cf24f8ecea9b412 05-Jun-2014 Eric Laurent <elaurent@google.com> am 26594add: Merge "audio policy: new setAudioPortConfig implementation" into lmp-preview-dev

* commit '26594add1ec0b6255c96b39e43ccdc95b2c480aa':
audio policy: new setAudioPortConfig implementation
a121f90f388343dc48793cbc7eb899aba42e7664 03-Jun-2014 Eric Laurent <elaurent@google.com> audio policy: new setAudioPortConfig implementation

Rewrite setAudioPortConfig() to take advantage of the new
AudioPortConfig class.

The configuration is now checked against AudioPort capabilities
and stored in the AudioPortConfig.

Fix a bug where the config mask was not set properly when calling
setAudioPortConfig at the PatchPanel interface.

Remove debug log in IAudioPolicyService.

Bug: 14815883.
Change-Id: I7eb7683a96e049581c13f2a212486507883d008d
AudioPolicyService.cpp
6dbb5e3336cfff1ad51d429fcb847307c06efd61 13-May-2014 Glenn Kasten <gkasten@google.com> Use of fast capture by normal capture

Will only configure fast capture path if the input buffer size is less than
10 ms and the input sample rate is same as the primary output sample rate.

Change-Id: I4a7cdc6069d750845412c626d27e83f72a1ab397
udioTrackShared.cpp
72aa32f7dbbfb658097930b57659d8e50f24a953 31-May-2014 Eric Laurent <elaurent@google.com> resolved conflicts for merge of b52c152d to master

Change-Id: I34869bda071d511c9595ea0a5ff6571eb34da059
b52c152d553556b2d227ffc943489de0c60b4b02 20-May-2014 Eric Laurent <elaurent@google.com> audio policy: add routing update client interface

Added IAudioPolicyServiceClient client binder interface
for client process to receive notifications from AudioPolicyService
when audio ports are added/removed or audio patches created/released.

The audio patches owned by a given client are automatically released when
this client binder dies.

Bug: 14815883.

Change-Id: I6013f6aec03b50565cffb1ad2cd1f0f8852032c5
ndroid.mk
udioSystem.cpp
AudioPolicyService.cpp
AudioPolicyServiceClient.cpp
203b1a18a806e2c56c701aac49cda963bccfad5b 01-Apr-2014 Eric Laurent <elaurent@google.com> DO NOT MERGE - IAudioPolicyService interface extension for patch panel

Change-Id: I0a62e5416edc41c3a0e816275085ab18a23066f1
udioSystem.cpp
AudioPolicyService.cpp
1cda6afaf6207a41303e653a6ecd7909d73186eb 11-Apr-2014 Eric Laurent <elaurent@google.com> DO NOT MERGE - IAudioFlinger interface extension for patch panel

Change-Id: Iaabe0a7e315d5725e00a74a6ed40339b98f20330
AudioFlinger.cpp
8670c31fddbeadcf9627aa970c69a823f13939ff 01-Apr-2014 Eric Laurent <elaurent@google.com> IAudioPolicyService interface extension for patch panel

Change-Id: I0a62e5416edc41c3a0e816275085ab18a23066f1
udioSystem.cpp
AudioPolicyService.cpp
4b123406c10c17852734a1b691bb9ce2a4cb7caf 11-Apr-2014 Eric Laurent <elaurent@google.com> IAudioFlinger interface extension for patch panel

Change-Id: Iaabe0a7e315d5725e00a74a6ed40339b98f20330
AudioFlinger.cpp
29b703eec27b305e7b5b2343bf257643e38f6b68 12-May-2014 Glenn Kasten <gkasten@google.com> Move validation of frameCount from set to openRecord_l

This move is needed because frameCount is validated on server side for
fast tracks (as should be done for normal tracks too).

Change-Id: I6d99e80869fd90fab373cf60ef348c01f075fbca
udioRecord.cpp
e348c5b72ad889389c7c1c900c121f0fbee221b5 22-May-2014 Elliott Hughes <enh@google.com> resolved conflicts for merge of c0bf836f to master

Change-Id: I5cf238fa56d6fff443b212870cf9dd7f1110e7da
c0bf836f8a4e34d66c10a2bb8b8cee0db04790cc 22-May-2014 Elliott Hughes <enh@google.com> am ad71caf2: am 3b6da6bf: Merge "Move frameworks/av off private API."

* commit 'ad71caf25e31ecfc4ecf2c925e38fd87905fbc8e':
Move frameworks/av off private API.
ad71caf25e31ecfc4ecf2c925e38fd87905fbc8e 22-May-2014 Elliott Hughes <enh@google.com> am 3b6da6bf: Merge "Move frameworks/av off private API."

* commit '3b6da6bfb50a1c0324fb4c87326d3a477944d5fe':
Move frameworks/av off private API.
ee499291404a192b059f2e04c5afc65aa6cdd74c 22-May-2014 Elliott Hughes <enh@google.com> Move frameworks/av off private API.

Bug: 11156955
Change-Id: Ib3bb9d66a2bf92977c2445b62aa074a2d7a45aea
udioTrackShared.cpp
9382378b6b271949bdce527ea3da748c13c4c692 22-May-2014 Elliott Hughes <enh@google.com> resolved conflicts for merge of b1080917 to master

Change-Id: Iabbe3e95e29f28461ff722b550e8a9f35bd2528f
b108091734ee7668084cc1063187c2b10ddb7bb7 22-May-2014 Elliott Hughes <enh@google.com> am acbd9492: am d084206d: Merge "Move frameworks/av off __futex_syscall3."

* commit 'acbd9492996348bf4565fbaa5a14772f0f4ace38':
Move frameworks/av off __futex_syscall3.
acbd9492996348bf4565fbaa5a14772f0f4ace38 22-May-2014 Elliott Hughes <enh@google.com> am d084206d: Merge "Move frameworks/av off __futex_syscall3."

* commit 'd084206d5a4a5364211af46e4201311933e83bfc':
Move frameworks/av off __futex_syscall3.
77e1512aee8092069514973379a59a318e721be3 22-May-2014 Elliott Hughes <enh@google.com> Move frameworks/av off __futex_syscall3.

Bug: 11156955
Change-Id: I943080bc51b6efa781059b48b5b5ecc4fa287512
udioTrackShared.cpp
b4db73d022f3de3530bc2b3c9c831ccfdd1a2ead 20-May-2014 Andy Hung <hunga@google.com> Merge "Use new channel count functions for audio masks"
c56f3426099a3cf2d07ccff8886050c7fbce140f 22-Mar-2014 Glenn Kasten <gkasten@google.com> Pass stereo gains as packed minifloat

This will allow (eventually) a greater dynamic range for gains.
However there are still a few remaining places in effects and mixer
that will also need to be changed in order to get the full benefit.

Also fixes a minor bug: was not checking for NaN in AudioTrack C++.

Change-Id: I63bce9e82e0a61546d8ff475fb94bcb700d99c96
udioTrack.cpp
udioTrackShared.cpp
5225ba0632e9dcf6fab562e4632ae8d6d4312959 16-May-2014 Bao Haojun <baohaojun@gmail.com> Fix double close.

This patch will fix the double close issue in SoundPool::doLoad():

status = MediaPlayer::decode(mFd, mOffset, mLength, &sampleRate, &numChannels, &format,
mHeap, &mSize);
ALOGV("close(%d)", mFd);
::close(mFd);
mFd = -1;

In MediaPlayerService::decode() which is called directly by
MediaPlayer::decode(), the fd will be closed, and after it return, the
mFd will be closed again.

When the system is idle, the second close will fail with EBADFD, but if
the system is busy, the mFd will be reused with another open/socket/pipe
system call, and the second close will cause errors.

Change-Id: If709515392cd490fea569658202524c51f8df785
Signed-off-by: Bao Haojun <baohaojun@gmail.com>
Signed-off-by: Wang Liang <wangliang@smartisan.cn>
MediaPlayerService.cpp
e541269be94f3a1072932d51537905b120ef4733 16-May-2014 Andy Hung <hunga@google.com> Use new channel count functions for audio masks

Change-Id: Ia658ab4b6320d19fdb50f123c930918724ff0ef3
Signed-off-by: Andy Hung <hunga@google.com>
udioRecord.cpp
udioTrack.cpp
609b815a3131d22da38b2f452faa9f89daad4039 02-May-2014 Andy Hung <hunga@google.com> Update OMX messages for 64 bit

Change node_id and buffer_id to uint32_t.
Ensure IOMX messages are fixed size.
Remove 64 bit compile warnings in associated files.

Change-Id: Icdbef00aca575e5dc502ebb52e3ce7d0d7883203
Signed-off-by: Andy Hung <hunga@google.com>
OMX.cpp
844f88ccfcca95687e774bccb5e9065da61d33f8 09-May-2014 Glenn Kasten <gkasten@google.com> Cache mCblk in local variable cblk

This is the style used throughout the rest of AudioTrackShared.

Change-Id: I959a6be3064e087bb19eba41173fd130dfcb4a9a
udioTrackShared.cpp
fe9570c7b937b49d3603ccb394aed732b79bc6be 07-May-2014 Glenn Kasten <gkasten@google.com> Remove obsolete IAudioRecord::getCblk()

Change-Id: Id20b5efd765b9796b0e391610e06dc928a829ebf
AudioRecord.cpp
d776ac63ce9c013c9626226e43f7db606e035838 07-May-2014 Glenn Kasten <gkasten@google.com> IAudioFlinger::openRecord returns IMemory(s)

openRecord() now explicitly returns the control block and data buffer
as separate IMemory references. If the IMemory for data buffer
is 0, this means it immediately follows the control block.

Change-Id: Ic098f88f0e037f8fbe30006689e18cacacf09d06
udioRecord.cpp
AudioFlinger.cpp
96b292fd3c76f9af155ee6f7a8559258eeedc6fd 08-May-2014 Glenn Kasten <gkasten@google.com> Merge "Add client side support for more AUDIO_FORMAT_PCM_*"
b773038277ba328696832b690b91ce6e95bd1a6c 01-May-2014 Glenn Kasten <gkasten@google.com> Add client side support for more AUDIO_FORMAT_PCM_*

As much as possible, the checks for specific formats are done on server
side. The only exception is 8-bit, which needs a client side workaround.

Change-Id: I52fe086c039460c8dac009de03b67eb54c56a836
udioTrack.cpp
828f883a43f66f77d776a75d0ea2b87c7c826071 07-May-2014 Glenn Kasten <gkasten@google.com> Fix a couple of fast capture typo bugs

AudioRecord constructor was not passing flags through to set().
Server-side check was using wrong kind of channel mask.

Change-Id: Ifaa880ec323771e9fd168262be05f3e539f53390
udioRecord.cpp
c4b88a8d0f524666bf0f390075c334d047a104f2 01-May-2014 Glenn Kasten <gkasten@google.com> Fix bug for direct track with PCM != 16-bit

The AUDIO_FORMAT_PCM_8_BIT format was being converted to
AUDIO_FORMAT_PCM_16_BIT on client side even for direct tracks.
That conversion was incorrect; it should only be done for mixed tracks.

Also remove checks for specific PCM formats in the generic part of
server side of createTrack. Those format checks should only be done by
the thread. This will allow direct tracks for PCM 8-bit, PCM 24-bit, etc.

Change-Id: If5b9fd79f8642ed93e2aeabcaf4809b2ed798978
udioTrack.cpp
b53fc4ef8da47df8d5f580e8ee6135866ffebc33 02-May-2014 Glenn Kasten <gkasten@google.com> resolved conflicts for merge of 47c888a9 to master

Change-Id: I4ba2fdc6374a93a892bb7651b0d174e495f09bf6
47c888a9fb74f8a46fbf666f0611fd1a9491466f 02-May-2014 Glenn Kasten <gkasten@google.com> am e580aa4a: am 86438382: Merge "When passing a size_t via binder, use 64-bits unconditionally"

* commit 'e580aa4a756d1825c440a4b4309022b1babb6de1':
When passing a size_t via binder, use 64-bits unconditionally
e580aa4a756d1825c440a4b4309022b1babb6de1 02-May-2014 Glenn Kasten <gkasten@google.com> am 86438382: Merge "When passing a size_t via binder, use 64-bits unconditionally"

* commit '86438382a381eb39ed8da53fbd16cf6730fded6c':
When passing a size_t via binder, use 64-bits unconditionally
86438382a381eb39ed8da53fbd16cf6730fded6c 02-May-2014 Glenn Kasten <gkasten@google.com> Merge "When passing a size_t via binder, use 64-bits unconditionally"
33ddcb6f1049cb4b6c71bb7ea605375f9492601d 02-May-2014 Glenn Kasten <gkasten@google.com> Merge "Use AUDIO_INTERLEAVE_* constants"
8710fb4b39e1807a5f2a4486fe0b140129b3618d 02-May-2014 Glenn Kasten <gkasten@android.com> am f38e1908: am 3d9164da: am 236f8ddd: Merge "Add missing include"

* commit 'f38e190887e73bc08735af95b073ebfaabd65f95':
Add missing include
f38e190887e73bc08735af95b073ebfaabd65f95 02-May-2014 Glenn Kasten <gkasten@android.com> am 3d9164da: am 236f8ddd: Merge "Add missing include"

* commit '3d9164da1b3d58701e41c78e06839d61ed1b4ff9':
Add missing include
3d9164da1b3d58701e41c78e06839d61ed1b4ff9 02-May-2014 Glenn Kasten <gkasten@android.com> am 236f8ddd: Merge "Add missing include"

* commit '236f8ddd23af92f98f2deae86bf6e6b5c9278857':
Add missing include
236f8ddd23af92f98f2deae86bf6e6b5c9278857 02-May-2014 Glenn Kasten <gkasten@android.com> Merge "Add missing include"
877a0ac7e8677fa1cbd0e8565ad9d38ba0db5fc0 01-May-2014 Glenn Kasten <gkasten@google.com> Use AUDIO_INTERLEAVE_* constants

Change-Id: I6609fa75c9a57fc4ca3887d626a2f4fb8b6593a1
udioTrack.cpp
1a7be1ec9c769203e6c8e26378de0ab8e2ad493d 29-Apr-2014 Bill Yi <byi@google.com> Merge commit '91820d46b5f3065c2fded3cdf65d305715b33bb1' into HEAD
29fe1ea4b5a1d1fc1fb87b53866901357c04c5c1 14-Apr-2014 Mark Salyzyn <salyzyn@google.com> am 9829344d: Merge "media: memset sizeof argument issues"

* commit '9829344d526f87ca745208f04216ec795b239581':
media: memset sizeof argument issues
d6579cc9f06052f94bf5a2c34261c84de0efce23 10-Apr-2014 Mark Salyzyn <salyzyn@google.com> media: memset sizeof argument issues

Change-Id: I37ef154eea0f77fb7f22faf6891f3025f6ff346e
ediaplayer.cpp
80a5d305a8408651fbc9b11e9d21125887da8c40 02-Apr-2014 Igor Chernyshev <igorc@google.com> Add missing include

Change-Id: I9fc3ebf60b98760611ac2071c7c519a0f8326341
emoryLeakTrackUtil.cpp
99021c47f45ee8bf3317cff7d08226e76c8d8227 02-Apr-2014 Jeff Tinker <jtinker@google.com> am f356a123: am 68d9d71a: Support CAST V2 Authentication in MediaDrm

* commit 'f356a123bf966150965a1af1cb9bd6ff2ca020de':
Support CAST V2 Authentication in MediaDrm
f356a123bf966150965a1af1cb9bd6ff2ca020de 02-Apr-2014 Jeff Tinker <jtinker@google.com> am 68d9d71a: Support CAST V2 Authentication in MediaDrm

* commit '68d9d71a792deed75d32fe13febc07c9c12c8449':
Support CAST V2 Authentication in MediaDrm
68d9d71a792deed75d32fe13febc07c9c12c8449 04-Mar-2014 Jeff Tinker <jtinker@google.com> Support CAST V2 Authentication in MediaDrm

Java API version

Update frameworks to enable support for CAST
V2 Authentication in the DRM Plugin.

Change-Id: I9066ada0edf8e0d777c503897d8c7fc7f76f2861
related-to-bug: 12702350
Drm.cpp
c9b8d90dabdf1234be0117c592f635a92c4eb0d9 27-Mar-2014 Glenn Kasten <gkasten@google.com> Merge "Use symbol AUDIO_IO_HANDLE_NONE from <system/audio.h>"
5c4fa907328c8ee586367272c7525cb87742f14d 26-Mar-2014 Glenn Kasten <gkasten@google.com> Merge "Use LOG_ALWAYS_FATAL instead of LOG_FATAL"
142f519aa1acd5804d111e60d100f170fed28405 26-Mar-2014 Glenn Kasten <gkasten@google.com> Use symbol AUDIO_IO_HANDLE_NONE from <system/audio.h>

Change-Id: Id6b1aa17558eb73e17f22b8eab6cd02e00a96dff
udioRecord.cpp
udioSystem.cpp
udioTrack.cpp
2301acc6a9c7a3af4ad01f3d1d0f76f13eca7350 17-Jan-2014 Glenn Kasten <gkasten@google.com> Update comments

Change-Id: I5776313b9b49072cd666d28880f0d07cc73f827b
udioSystem.cpp
AudioFlinger.cpp
AudioPolicyService.cpp
adad3d7d935da176ff24941b4ae9edf7340e9b96 21-Feb-2014 Glenn Kasten <gkasten@google.com> Use LOG_ALWAYS_FATAL instead of LOG_FATAL

LOG_FATAL is compiled out in most builds, so the
assertion checks were not being performed.

Change-Id: I774f0985ab9c5ccecd8989a0f1c940386b73fc35
udioTrackShared.cpp
ecdca392ed40e89a6ef14b86446e952c35497ac4 26-Mar-2014 Glenn Kasten <gkasten@google.com> Merge "Use symbolic constants from <system/audio.h>"
51beebba9d4989d05831a13bbe5cdf53ecac1bf5 26-Mar-2014 Glenn Kasten <gkasten@google.com> Merge "Use symbol AUDIO_DEVICE_NONE from <system/audio.h>"
b8f8d231685afdec472136b45c527a71bfb8bcc4 26-Mar-2014 Glenn Kasten <gkasten@google.com> Merge "Remove stream type from AudioSystem::getRenderPosition()"
73ec11738cd4399c55d4905665a14a7c4cd42cbf 26-Mar-2014 Glenn Kasten <gkasten@google.com> Merge "Fix uses of KeyedVector"
8c7b9fb41585fccb06573252823b929c82a40999 26-Mar-2014 Glenn Kasten <gkasten@google.com> Merge "Remove streamType parameter from AudioSystem::getLatency()"
0ed19594452c901c3c8665d06610fffe46895d06 26-Mar-2014 Glenn Kasten <gkasten@google.com> Remove stream type from AudioSystem::getRenderPosition()

The I/O handle is never equal to AUDIO_IO_HANDLE_NONE,
so the stream type is not needed.

Change-Id: I1ab134a2fa379d6dd0b6167345a856a192d478f9
udioSystem.cpp
f7f21b93bfce562784ee8f632fb01a2f8e4ffa6b 26-Mar-2014 Glenn Kasten <gkasten@google.com> Merge "Remove dead code"
ebb80e4f9873cc1a5ee3f766323f622bb0c07ae5 26-Mar-2014 Glenn Kasten <gkasten@google.com> Remove dead code

Change-Id: I0878d11451c7bbbf96b59f5fe0cd97ba1f033aa9
udioTrack.cpp
241618f1b286f9e7e02fe61e96d9194e2e1e8a7a 26-Mar-2014 Glenn Kasten <gkasten@google.com> Remove streamType parameter from AudioSystem::getLatency()

Change-Id: Ie7346e93436ddc215cad7d16be555dcb6c277d54
udioSystem.cpp
udioTrack.cpp
45faf7e02791993a487d6e038d16ff46395f1975 17-Jan-2014 Glenn Kasten <gkasten@google.com> Use symbol AUDIO_DEVICE_NONE from <system/audio.h>

Change-Id: I61f882c5e7c949bf00d3bfc745ebf3b5e1c42a58
udioSystem.cpp
AudioFlinger.cpp
66e4635cb09fadcaccf912f37c387396c428378a 17-Jan-2014 Glenn Kasten <gkasten@google.com> Use symbolic constants from <system/audio.h>

AUDIO_INTERLEAVE_*
AUDIO_STREAM_MIN
AUDIO_SESSION_ALLOCATE

Change-Id: I31dd6f327204685e50716079ce21c4ba206dff11
udioTrack.cpp
oneGenerator.cpp
9ea65d0f4a564478343b1a722fae4ce5883670c3 17-Jan-2014 Glenn Kasten <gkasten@google.com> Fix uses of KeyedVector

Constructor for AudioFlinger::mAudioHwDevs was missing, and so
AudioFlinger::findSuitableHwDev_l() could return an undefined pointer
if a non-0 module wasn't found.

A KeyedVector of Plain Old Data (POD) element type must specify the
default value in the constructor, or else the default will be undefined.

Minor:
- Parameter had wrong type in constructor for AudioSystem::gOutputs.
- Remove obsolete AudioSystem::gStreamOutputMap.

Change-Id: I9841493e018440e559d8b8b0e4e748ba2b2d365b
udioSystem.cpp
85d109a4b0eddd76a8c5cee170bc2bcc99d00118 17-Jan-2014 Glenn Kasten <gkasten@google.com> Document AudioSystem::newAudioSessionId() failures

Change-Id: Iaa168722f362c36bdfa87fe20dc0a59b43cf1ca3
udioSystem.cpp
AudioFlinger.cpp
1392eb3d1802e9f894f87d7a7387207d1b6faca1 25-Mar-2014 Glenn Kasten <gkasten@google.com> Fix operator precedence

Change-Id: I164708a5b76a341a185467b008ecbec98d58a6df
haracterEncodingDetector.cpp
d4a31b8bcd7df99dfce2f25a32badf4611a6ba1a 19-Mar-2014 John Spurlock <jspurlock@google.com> Merge "Add MediaPlayer::getAudioStreamType."
de9453fb5cbc9cd69fd1ea45d577851e3aa3b8c9 19-Mar-2014 John Spurlock <jspurlock@google.com> Add MediaPlayer::getAudioStreamType.

Change-Id: I9cd8a718d2873543609aa651fd85749478f4f89f
ediaplayer.cpp
bfd55f243feb3f04e26ad07aae035475768ada8a 18-Mar-2014 Marco Nelissen <marcone@google.com> Use more tags to help the ICU detector.

The detector only gave non-ascii data to ICU. In some cases that could
result in very short data, for which ICU would issue a low confidence
level for the actual encoding. By padding the data with additional
(ascii) tags, we improve accuracy for such files. Becauses this can
reduce accuracy in other cases, only do this when the initial confidence
is low.

b/13473604

Change-Id: I63d932043155c310b0e358cdf2d37787961e94b7
haracterEncodingDetector.cpp
haracterEncodingDetector.h
c5a17425986b4ce3384e6956762c86018b49c4a0 13-Mar-2014 Glenn Kasten <gkasten@google.com> Remove name output parameter from createTrack

It was only used for one log.
A better solution will be a per-track unique ID.

Change-Id: Ia440e02ae4a5a4019a9a2d08970e1ee93ac4c3a3
udioTrack.cpp
AudioFlinger.cpp
c644345b0b8f5292a049c4cee2bb7a2a6159b884 11-Mar-2014 Jean-Michel Trivi <jmtrivi@google.com> Merge "AudioTrack non-blocking write"
3a90f2849d49bf65f2d6257fd6da30ae46d745fa 10-Mar-2014 Marco Nelissen <marcone@google.com> Fix freeze on pause

isOffloaded() tries to lock mLock again. We should be calling isOffloaded_l()
b/13394633

Change-Id: I155be6fee937f894d8e6c974e593223ab6014ade
udioTrack.cpp
f566406a48ecf878d8a0034b6c600d42454d264c 08-Mar-2014 Eric Laurent <elaurent@google.com> am 6db20dcb: Merge "AudioTrack: When paused, return cached playback position" into klp-dev

* commit '6db20dcb54dad932a3ea2e3a5dca41fce5802eb4':
AudioTrack: When paused, return cached playback position
6950d10077d10757e894d8e125ba5111eb02517a 08-Mar-2014 Glenn Kasten <gkasten@google.com> am 2f55c2c0: Merge "Simplify AudioTrack stream end and fix race" into klp-dev

* commit '2f55c2c03b17795e94b325d402ac5b409e3ba0e8':
Simplify AudioTrack stream end and fix race
3a20f9af8587d2e5bbf4654a3a958f43c4133445 08-Mar-2014 Eric Laurent <elaurent@google.com> am 38efe8eb: am 6db20dcb: Merge "AudioTrack: When paused, return cached playback position" into klp-dev

* commit '38efe8eb08e08610d535a164768851ac7c13d654':
AudioTrack: When paused, return cached playback position
38efe8eb08e08610d535a164768851ac7c13d654 08-Mar-2014 Eric Laurent <elaurent@google.com> am 6db20dcb: Merge "AudioTrack: When paused, return cached playback position" into klp-dev

* commit '6db20dcb54dad932a3ea2e3a5dca41fce5802eb4':
AudioTrack: When paused, return cached playback position
6db20dcb54dad932a3ea2e3a5dca41fce5802eb4 08-Mar-2014 Eric Laurent <elaurent@google.com> Merge "AudioTrack: When paused, return cached playback position" into klp-dev
77a85ebe1fc28f3af07ebefeea53fad778f442c0 07-Mar-2014 Glenn Kasten <gkasten@google.com> am 4ee774f3: am 2f55c2c0: Merge "Simplify AudioTrack stream end and fix race" into klp-dev

* commit '4ee774f322ad3292fcfbb3c120cf250643419425':
Simplify AudioTrack stream end and fix race
4ee774f322ad3292fcfbb3c120cf250643419425 07-Mar-2014 Glenn Kasten <gkasten@google.com> am 2f55c2c0: Merge "Simplify AudioTrack stream end and fix race" into klp-dev

* commit '2f55c2c03b17795e94b325d402ac5b409e3ba0e8':
Simplify AudioTrack stream end and fix race
dcec903589ac651b9f558454392d286c13f743fb 20-Sep-2013 Glenn Kasten <gkasten@google.com> Simplify AudioTrack stream end and fix race

Bug: 10994052
Change-Id: Ib2e38e7a600bcffef8cbc68c1722e40fbbc7ea67
udioTrack.cpp
b8d0b780c9ae160b830cc7a31b22600293e4978b 07-Mar-2014 Glenn Kasten <gkasten@google.com> am af191eb4: Merge "Replace size_t in shared memory by uint32_t"

* commit 'af191eb4feac513d17dc0362e0cea5bc9e0ffe9d':
Replace size_t in shared memory by uint32_t
e857b65c1d3aa055281cb48f59c9b5eb4a062dd0 07-Mar-2014 Narayan Kamath <narayan@google.com> am 3c9130a8: Merge "Make frameworks/av 64-bit compatible"

* commit '3c9130a8a12ce962dc8d22e04243b135b9e98b01':
Make frameworks/av 64-bit compatible
32fbb48de0248518fc5a14099b32fe4b8e9fc102 07-Mar-2014 Glenn Kasten <gkasten@android.com> am 4361749d: Merge "AudioTrack: Never try to use the fast path if resampling is required"

* commit '4361749d74113069aafb0620a1189404205c58d0':
AudioTrack: Never try to use the fast path if resampling is required
2048c2292c0466b184fb8f67c91f4d0ab9f5c3f3 08-Jan-2014 Haynes Mathew George <hgeorge@codeaurora.org> AudioTrack: When paused, return cached playback position

An offload output can be re-used between two audio tracks having
the same configuration. A timestamp query for a paused track
while the other is running would return an incorrect time.
To fix this, cache the playback position on a pause() and return
this time when requested until the track is resumed.

Bug: 12826612.
Change-Id: Ia42b8b8fd2ba8993dfcc9abca72da48d71d78d74
udioTrack.cpp
1c32a00b8750998562a8d76351ba5c6d2ed788c8 07-Mar-2014 Glenn Kasten <gkasten@google.com> Merge "Simplify AudioTrack stream end and fix race"
7064fd2dcdfeafea53cd5a992bb78c413542f29f 08-Jan-2014 Haynes Mathew George <hgeorge@codeaurora.org> AudioTrack: When paused, return cached playback position

An offload output can be re-used between two audio tracks having
the same configuration. A timestamp query for a paused track
while the other is running would return an incorrect time.
To fix this, cache the playback position on a pause() and return
this time when requested until the track is resumed.

Bug: 12826612.
Change-Id: I324112ea9827e52fff53ef44cd8513c8d85a0bc4
udioTrack.cpp
ebcb254adb7402ab89ae97c4d9d16d886790dcb3 06-Mar-2014 Eric Laurent <elaurent@google.com> audio policy service: clean up type casting.

Change-Id: If16d6495c16e0d61a221f81bfd49e7d14bbfdc12
AudioPolicyService.cpp
c1e06f692cf16a8c9f5ae921ab4d642f7a082877 06-Mar-2014 Eric Laurent <elaurent@google.com> am 09e45992: am 25a86930: am 88876fb4: AudioTrack: fix obtainBuffer timeout calculation

* commit '09e45992067f03a05f82400a6cacf16bb8018f16':
AudioTrack: fix obtainBuffer timeout calculation
25a86930ac0ccf4750ad2fb0c2f5a4a122d24ecf 06-Mar-2014 Eric Laurent <elaurent@google.com> am 88876fb4: AudioTrack: fix obtainBuffer timeout calculation

* commit '88876fb4eb8365343f2a9ca0e8f53148ca38b845':
AudioTrack: fix obtainBuffer timeout calculation
d812fc012298470a1b8120e6d60a24b0b1d48047 03-Dec-2013 Glenn Kasten <gkasten@google.com> Increase kFastTrackMultiplier from 1 to 2

Bug: 11967381
Change-Id: Iedec06280aa745d9df5d661f4916940cede9c191
udioTrack.cpp
88876fb4eb8365343f2a9ca0e8f53148ca38b845 28-Jan-2014 Eric Laurent <elaurent@google.com> AudioTrack: fix obtainBuffer timeout calculation

AudioTrack::obtainBuffer() passes a pointer to a timeout
variable that has gone out of scope when calling
ClientProxy::obtainBuffer().

Same fix for AudioRecord.

Bug: 11968591.
Change-Id: I5b3d0d86ed2bd8c0412eb2432b1ab519d70efce9
udioRecord.cpp
udioTrack.cpp
d0115d8c4db2f337030dea706bc0a434c4a03ed6 27-Jul-2013 Eric Laurent <elaurent@google.com> update offloaded audio track sampling rate

AudioPlayer must read the sampling rate from offloaded audio sinks
whenever a new time position is computed as the decoder can update
the sampling rate on the fly.

Bug: 12823955.

Change-Id: I997e5248cfd4017aeceb4e11689324ded2a5bc88
udioTrack.cpp
720ad9ddb2ac6b55b0dfbfcd2d8360151d8ac427 04-Feb-2014 Jean-Michel Trivi <jmtrivi@google.com> AudioTrack non-blocking write

Bug 7531968

Change-Id: I6d0e79fa8cab5b6eb36bcc34977f4cf0d7eec8ea
udioTrack.cpp
ecc8155914bf006d435b825c0fda24f446228709 01-Mar-2014 Glenn Kasten <gkasten@google.com> Merge "Make openRecord_l more like createTrack_l for fast tracks: part 3"
f0aaabfeab95f67889fd417947900d6ec7dbdd3c 28-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "Make openRecord_l more like createTrack_l for fast tracks: part 2"
879707057cde0a83b5f6143c918c66b8f4a97581 28-Feb-2014 Glenn Kasten <gkasten@google.com> Make openRecord_l more like createTrack_l for fast tracks: part 3

Create the callback thread earlier, before creating the IAudioRecord,
so that the thread's tid is available as a parameter to openRecord().

Also move initialization of mCbf to same point as in AudioTrack.cpp.

Change-Id: I61ea4c5e2724ccfc691aaf51bc02a7c10d5a7495
udioRecord.cpp
2c48f27be6b3ae58e451d9b56c1dfd00e606f345 27-Feb-2014 Glenn Kasten <gkasten@google.com> Make openRecord_l more like createTrack_l for fast tracks: part 2

Assume double-buffering because we don't know the true HAL sample rate,
and for fast tracks we must accomodate kernel scheduling and app
computation jitter.

Change-Id: I983d6048a8b4814cfa5bf789397cdd9f1572256c
udioRecord.cpp
d2304db2fcb5112292105a0949a55986a4c9875f 03-Feb-2014 Glenn Kasten <gkasten@google.com> Rename setStreamOutput to invalidateStream

And simplify by removing the unused I/O handle parameter 'output'.

Change-Id: Ie9c4df17a7378066312d4ed8790fda7a9125c95e
AudioFlinger.cpp
33ca5cf8826f5fcd9c011e8d336138b62d982f2a 28-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "Make openRecord_l more like createTrack_l for fast tracks: part 1"
bce50bfc3846ab008bafa75c5d3f29fd7b5395f7 28-Feb-2014 Glenn Kasten <gkasten@google.com> Fix type of AudioTrack/AudioRecord parameter frameCount

It's size_t consistently

Change-Id: I29638ef59ac773218025f2403a3508a307b487e0
udioRecord.cpp
udioTrack.cpp
etPlayer.cpp
oundPool.cpp
838b3d8bafa4a781e277870dee4e0390165cff52 28-Feb-2014 Glenn Kasten <gkasten@google.com> Fix type of AudioTrack/AudioRecord parameter notificationFrames

It's uint32_t consistently

Change-Id: If8298c7e9aeea2b951fe47b675adbdf48d104846
udioRecord.cpp
udioTrack.cpp
484b4cd809aa46a54791d5c82a78d0f8aac895cf 27-Feb-2014 Marco Nelissen <marcone@google.com> Merge "Don't crash on remote read error, just return"
c6ba823a397abf865b02f4f48fe18231f94d8e87 27-Feb-2014 Glenn Kasten <gkasten@google.com> Make openRecord_l more like createTrack_l for fast tracks: part 1

Use the transfer mode to distinguish use cases, as the presence of
a callback handler is not sufficient. For example, the track could be
configured for synchronous transfer with write() or read(), and also
have a callback handler for position updates. But that does not mean
the track can operate in fast track mode.

Change-Id: I2a7f1f0ca98e68efe180b524496985109d8ce291
udioRecord.cpp
udioTrack.cpp
19a9fef6d2970a615f4f33025f9141e44b7c9f34 27-Feb-2014 Marco Nelissen <marcone@google.com> Don't crash on remote read error, just return

Change-Id: I35a2af255f55e008d64142ed0eceb6e83473d630
MediaHTTPConnection.cpp
e27e2d9bcabc1a367cb56b4599665c931a1d22ec 27-Feb-2014 Derek Sollenberger <djsollen@google.com> Fix includes to no longer pull in Skia includes directories.

bug:13225538
Change-Id: I4fccc414923f7e62cd46d691c67cb44b9692c225
ndroid.mk
c08d20b6a37122ebf116262c9372509ed060d4c1 25-Feb-2014 Glenn Kasten <gkasten@google.com> Simplify error handling after track creation

IAudioFlinger::createTrack and IAudioFlinger::openRecord
both guarantee that (status == OK) == (sp<> != 0).

Change-Id: I91cb4f7e843019efb65cace7ba146f7da7aa5b59
udioRecord.cpp
udioTrack.cpp
045e739161f5ae00321a6cfba20935abb791005b 26-Feb-2014 Glenn Kasten <gkasten@google.com> Move initialize of mInput to match AudioTrack

Change-Id: I4dc977f22f51cd618dc83d800b4b8756929a4612
udioRecord.cpp
f7cc3631c5c264e13ce8c6bc15bd829b2ff9b036 26-Feb-2014 Glenn Kasten <gkasten@google.com> Update comments to match AudioTrack

Change-Id: I7dd14eabd78c9130a157da2063a1d65ec4f9c65a
udioRecord.cpp
a5ed48d3476df7dd1e10b380a68e3333f2b646fd 26-Feb-2014 Glenn Kasten <gkasten@google.com> Move initialization of mRefreshRemaining to match AudioTrack

This also fixes a bug where, for a re-created IAudioRecord,
mRefreshRemaining was not being reset correctly.

Change-Id: I9f721a4edf92aab859cf3f247ab7f65562d14fb0
udioRecord.cpp
591d9a3652f868652ccc48dd9e9714f3a9813963 25-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "mAudioRecord is always non-0 if set() is successful"
7c1b8941bb54e38f2a717e41af0d9565f5977c27 25-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "Unify comments and whitespace between AudioTrack and AudioRecord"
6c69333431b2fdd995a1c2eb6f01182155f4a691 25-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "Update channel fields at same place in AudioTrack and AudioRecord"
882469cfe767188a4c67d2d83f3d72ab553a4818 25-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "Update mReqFrameCount at same point in AudioTrack and AudioRecord"
99ef241a8d310b3319c02eac18de9bb7422c5ab0 25-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "Permit AudioRecord to support non-linear formats in future"
9f474b7824abb0d5408d02e365cf37a986663979 25-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "Simplify and cleanup error handling in AudioRecord::getMinFrameCount"
172abfe2cc30104282f8e65b82e9c9758adc83da 25-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "Add log at entry to set() in AudioTrack and AudioRecord"
b42f318d9733f88c7eb9bedfd33b086b8ea5dff5 24-Feb-2014 Glenn Kasten <gkasten@google.com> Simplify and cleanup error handling in AudioRecord::getMinFrameCount

Change-Id: I8721ecedfb429c4e233453d1e768ddf69ecabbe4
udioRecord.cpp
089e87201522c8979ac8f00fa729e907f54c790b 25-Feb-2014 Glenn Kasten <gkasten@google.com> mAudioRecord is always non-0 if set() is successful

Change-Id: I0c2483210903c922f06f097ada373a37b9a90a02
udioRecord.cpp
5f631515d098c29603cda88f7a7e7580a2d55b57 25-Feb-2014 Glenn Kasten <gkasten@google.com> Unify comments and whitespace between AudioTrack and AudioRecord

Change-Id: I5320a6b2d7f7077cb12d7da4f2ca30a940100bf2
udioRecord.cpp
udioTrack.cpp
e3247bf8dd4f8fa8dfa3a108260241ae4a967569 25-Feb-2014 Glenn Kasten <gkasten@google.com> Update channel fields at same place in AudioTrack and AudioRecord

Change-Id: I4b649feeef47e7968a9fa3a460217017ca9b05fe
udioTrack.cpp
11cb175005db0090345f44bfa049b52fd8c809b8 25-Feb-2014 Glenn Kasten <gkasten@google.com> Update mReqFrameCount at same point in AudioTrack and AudioRecord

Change-Id: I12369dfbb9e75389f2cab015a706decdaf310a0d
udioRecord.cpp
c85df82b1e8b05714268926a8bb3deb9c65f9a22 25-Feb-2014 Glenn Kasten <gkasten@google.com> Permit AudioRecord to support non-linear formats in future

But still restricted to 16-bit PCM currently

Change-Id: I5df0e5033da9144ca73e44addf14a63d31406034
udioRecord.cpp
86f04663032ddaa25110149d709bbf896ad83b02 25-Feb-2014 Glenn Kasten <gkasten@google.com> Add log at entry to set() in AudioTrack and AudioRecord

Change-Id: Ife23b88474c1d62c0cf682c1a310d951f2c0f54a
udioRecord.cpp
udioTrack.cpp
c9c7e25a4b1c34439fb365f6cfbef063884566cc 21-Feb-2014 Marco Nelissen <marcone@google.com> Add method to get redirected Uri

Change-Id: Id8aac1077c3de1bb1f58bfcfcca93d685abe9b79
MediaHTTPConnection.cpp
e9841c60ab2b954b97628801bd3bb2f84a69a35e 18-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "Simplify and remove old comment"
6dd62fb91d82dedcfa3ab38c02eb0940b4ba932a 06-Dec-2013 Glenn Kasten <gkasten@google.com> Multi-client recording

Supports multiple clients both at native sample rate and with resampling.

Change-Id: Icea55b4fd30751761b7debaa3ce016c79e712d8d
udioRecord.cpp
ee3759090c2194eaeca4944a01104771ff1c91d2 18-Feb-2014 Glenn Kasten <gkasten@google.com> Simplify and remove old comment

Change-Id: Iee41641252f65cea9ce0ea0ec1ea4229608f7c64
ndroid.mk
f3b785ae6ea135115b54ac58cedc12b444483902 18-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "Move StateQueueInstantiations to libinstantssq"
3e8027a04c20a4b7028f1615538b36219386c9e5 15-Oct-2013 Glenn Kasten <gkasten@google.com> Move StateQueueInstantiations to libinstantssq

This removes a circular dependency between libmedia and libnbaio

Change-Id: I3692cbbe2b76028a953b36606b62cdda70c8c26f
ndroid.mk
7074296c72b3be919ebc9dfd504f4572a188d2e7 18-Feb-2014 Glenn Kasten <gkasten@google.com> Fix warning due to incorrect log format

Change-Id: I58ff399ace74965ebf8e5690c20637385f9425ad
AudioFlinger.cpp
e03dd22716e688faa56467561827d9b1ea0c4214 28-Jan-2014 Glenn Kasten <gkasten@google.com> When passing a size_t via binder, use 64-bits unconditionally

64-bits is almost always over-kill. But it's easier and cleaner to change
the binder code to be accurate, than to rename all the the API parameter
types to be 32-bit.

Bug: 12381724
Change-Id: Ib8f198d814a2027760ef24e9e3feacee21a973b1
AudioFlinger.cpp
AudioFlingerClient.cpp
AudioTrack.cpp
MediaLogService.cpp
MediaMetadataRetriever.cpp
OMX.cpp
StreamSource.cpp
751a9c8cbc391a91604dd1052fb95d3e4d278c2f 28-Jan-2014 Glenn Kasten <gkasten@google.com> Replace size_t in shared memory by uint32_t

Eventually we may want to use uint64_t, but will need to confirm atomicity.

Bug: 12381724
Change-Id: Ia2c591d262d22b47b6f7dab4b9d9faa14b86d865
udioTrackShared.cpp
d457c970c8d08519cd77280a90b61ae1e342cfe3 11-Feb-2014 Marco Nelissen <marcone@google.com> Track pid for each session

so they can be properly freed.

Change-Id: I6f389035bc29e74e7c367c1c6d0252b180f666b3
udioRecord.cpp
udioSystem.cpp
udioTrack.cpp
AudioFlinger.cpp
ediaplayer.cpp
1d6fa7af1288b550faabe4ec2cf98684236723db 11-Feb-2014 Narayan Kamath <narayan@google.com> resolved conflicts for merge of 566be7c3 to master

Change-Id: I7b1cc71057b2bd4f771e7bcf508a8c3abd6017ce
377b2ec9a2885f9b6405b07ba900a9e3f4349c38 03-Feb-2014 Kévin PETIT <kevin.petit@arm.com> Make frameworks/av 64-bit compatible

Contains the necessary changes to make frameworks/av build and work
on a 64-bit machine.

Signed-off-by: Craig Barber <craig.barber@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>

Change-Id: I725feaae50ed8eee25ca2c947cf15aee1f395c43
udioSystem.cpp
udioTrack.cpp
AudioFlinger.cpp
43bdc1de363a3c72c7dcf9c9a898bac109dc7cb5 10-Feb-2014 Glenn Kasten <gkasten@google.com> Fix build after merge from AOSP

Change-Id: I1cd3432c02db1600e49ade67e6a89e39e7a8d3ed
udioTrack.cpp
3523e8c40bc60af0c95d1aa71a51a13d69ec80a2 10-Feb-2014 Glenn Kasten <gkasten@android.com> am 4e12dade: am 4361749d: Merge "AudioTrack: Never try to use the fast path if resampling is required"

* commit '4e12dadeec10993d2f77cce96600e73ca0dd86e2':
AudioTrack: Never try to use the fast path if resampling is required
ec95f0e82a680931e9c7c9011dbbd68d5ab484c8 10-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "Use printf format %#x for audio_format_t in logs"
1dd3da08445ac96e64a1ca72ba0c11876cc4d631 08-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "Fix warnings about unused parameters"
4944acb7355b3aa25748fd25945a363a69d65444 19-Aug-2013 Glenn Kasten <gkasten@google.com> Fix whitespace

Change-Id: I9add0872030a26933f6b6dad1be299154611cc56
udioSystem.cpp
oundPool.cpp
cac3daa6332bf6d1f7d26adc4a9915f3d7992dd9 07-Feb-2014 Glenn Kasten <gkasten@google.com> Use printf format %#x for audio_format_t in logs

Change-Id: I1c611d1037685d52ccc84efe0fccd6413ec938e9
udioRecord.cpp
udioSystem.cpp
udioTrack.cpp
80520381d0bdf3451bd17c9ddef73d3fe71c58c2 01-Feb-2014 Glenn Kasten <gkasten@google.com> Fix warnings about unused parameters

Change-Id: I27dc108e2c1f7ffd414bb7ff3d4c349651da6c26
ediaProfiles.cpp
cfb2c130153eaf6e8bb36c5d787557e78bf9804b 06-Feb-2014 Andreas Huber <andih@google.com> Merge "Remove no longer needed http proxy handling code, it's obsolete now"
81e68448f3361eaf8618930471fdc3c21bdf5cbc 05-Feb-2014 Andreas Huber <andih@google.com> Remove no longer needed http proxy handling code, it's obsolete now

since we started to use java's HTTPConnection instead of the native
implementation. Also remove other remnants of the previous http implementation,
such as accounting for the http user's uid.

Change-Id: I60bfd31381ea40d2220db587ec5c433093b60034
MediaPlayerService.cpp
ediaplayer.cpp
0f1f2826893bd55da8e93b79830d3a7b171509e3 05-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "Add AudioRecord::mReqFrameCount similar to AudioTrack"
b3b2e23fcf7e050710d23b82a6682c0f3d869b69 05-Feb-2014 Glenn Kasten <gkasten@google.com> Add AudioRecord::mReqFrameCount similar to AudioTrack

Change-Id: I62d6534a9581e84ae20c2422f7ad9aeda9b7c4df
udioRecord.cpp
412d4744efae64083e4f99a664e3efaba031af48 05-Feb-2014 Andreas Huber <andih@google.com> Merge "FINAL ATTEMPT: HTTP services are now provided from JAVA and made available to media code"
2a16afb8dc056877f34124ba5befe75171de930f 05-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "Fix unused parameter warnings in audio"
1b86fe063badb5f28c467ade39be0f4008688947 29-Jan-2014 Andreas Huber <andih@google.com> FINAL ATTEMPT: HTTP services are now provided from JAVA and made available to media code

Change-Id: I9f74a86e70422187c9cf0ca1318a29019700192d
ndroid.mk
MediaHTTPConnection.cpp
MediaHTTPService.cpp
MediaMetadataRetriever.cpp
MediaPlayer.cpp
MediaPlayerService.cpp
oundPool.cpp
ediametadataretriever.cpp
ediaplayer.cpp
e726d65778ce78092010df2354156c09d311423f 03-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "Replace size_t in shared memory by uint32_t"
0f11b51a57bc9062c4fe8af73747319cedabc5d6 01-Feb-2014 Glenn Kasten <gkasten@google.com> Fix unused parameter warnings in audio

Change-Id: I665ba3358dd9502f0adec70d486e7bf8a2e1b0fe
udioEffect.cpp
udioRecord.cpp
udioSystem.cpp
398f21348e5100289f6e5be30c8b5257fa04aaf9 31-Jan-2014 Martin Storsjo <martin@martin.st> AudioTrack: Never try to use the fast path if resampling is required

Unless AudioFlinger was built with FAST_TRACKS_AT_NON_NATIVE_SAMPLE_RATE
enabled, AudioFlinger would deny using the fast path (and internally
fall back to the normal codepath) when it realized that resampling
was required. Since the buffer size calculations within AudioFlinger
don't take resampling into account properly (see the calculation
below "AUDIO_OUTPUT_FLAG_FAST denied" in audioflinger/Threads.cpp,
just below the hunk that this patch changes), make sure AudioTrack
doesn't try to use the fast path if resampling is required.

This removes the possibility to enable
FAST_TRACKS_AT_NON_NATIVE_SAMPLE_RATE in AudioFlinger since it
AudioTrack now won't even try to use the fast path for content
that requires resampling, regardless of the AudioFlinger configuration.

Change-Id: Icf0f8ad50bf0fdb84657f518c0120aa0535f23f9
udioTrack.cpp
fdac7c00f9201bb3a9862069145f01d37e39755b 28-Jan-2014 Glenn Kasten <gkasten@google.com> Replace size_t in shared memory by uint32_t

Eventually we may want to use uint64_t, but will need to confirm atomicity.

Bug: 12381724
Change-Id: Ia2c591d262d22b47b6f7dab4b9d9faa14b86d865
udioTrackShared.cpp
df576995a5aad3428aeeef765387d650945c161d 28-Jan-2014 Eric Laurent <elaurent@google.com> AudioTrack: fix obtainBuffer timeout calculation

AudioTrack::obtainBuffer() passes a pointer to a timeout
variable that has gone out of scope when calling
ClientProxy::obtainBuffer().

Same fix for AudioRecord.

Bug: 11968591.
Change-Id: I22af8f94fa2f8cc54ab5c25c89167c805e754317
udioRecord.cpp
udioTrack.cpp
8e26486d2d811f94118381a163178078a3eee6c0 27-Jan-2014 Eric Laurent <elaurent@google.com> am 9f875b27: am 8ba3192f: am d0e7e801: Merge "Do partial reads in MemoryLeakTrackUtil"

* commit '9f875b2717b683cc61e3fa4ba24b3693fab5b46a':
Do partial reads in MemoryLeakTrackUtil
363fb75db26698cbb50065506e0c80b61d1fbf92 15-Jan-2014 Glenn Kasten <gkasten@google.com> Remove the redundant parameters from createTrack_l()

AudioRecord::openRecord_l() code was refactored earlier to
remove the redundant parameters:
> Change-Id: I124dce344b1d11c2dd66ca5e2c9aec0c52c230e2

This changelist refactors AudioTrack similarly.

Change-Id: Iefd2bd662870ea81d04eff7b7c26f9c8b0dadd26
udioTrack.cpp
38e905b3cbba4da443d799b16999989781afc6d8 13-Jan-2014 Glenn Kasten <gkasten@google.com> Refactor code related to I/O handles to reduce chance for leaks

The AudioRecord input handle code was refactored earlier
to fix a potential handle leak, and to simplify the code:
> Change-Id: I124dce344b1d11c2dd66ca5e2c9aec0c52c230e2

This changelist refactors AudioTrack similarly,
and adds further cleanup of both AudioTrack and AudioRecord.

We attempt to implement the rules for referencing counting I/O handles,
but there is still the possibility of a handle leak if the client process
dies after allocating the handle reference but before releasing it.
That issue is being tracked separately.

Details:
- AudioSystem::getOutput() is now called within createTrack_l
- restoreTrack_l was missing offload info
now it has the info available,
but is not yet being called for offloaded tracks
- AudioTrack::getOutput() is now const
- Remove getOutput_l()

Change-Id: I44a0a623d24fc5847bcac0939c276400568adbca
udioRecord.cpp
udioTrack.cpp
f0002d142e6d24c5438600b2c259679de710f8ac 24-Jan-2014 Glenn Kasten <gkasten@google.com> Merge "Replace control block frameCount_ by explicit in/out parameter"
6d39eb9d7da2ca8eb733f2d2eba686c56b24885b 22-Jan-2013 Oscar Rydhé <oscar.rydhe@sonymobile.com> Do partial reads in MemoryLeakTrackUtil

Do partial read in MemoryLeakTrackUtil dumpMemoryAddresses
to avoid using more memory than what is allocated.

Change-Id: I94feb4e00647407f938571167b981c7371f39e3d
emoryLeakTrackUtil.cpp
3a0b6bd22aa32daa729b05c33896400807027eee 17-Jan-2014 Glenn Kasten <gkasten@google.com> Merge "Use uint32_t sequence numbers for IAudioRecord"
1071915ad4ffb47825a946706f8fa73c0d22d7f8 17-Jan-2014 Glenn Kasten <gkasten@google.com> Merge "Make copy of audio_offload_info_t for future use"
543140eb709a07bc386eb5f667a4a72e31dba56c 17-Jan-2014 Glenn Kasten <gkasten@google.com> Merge "Move up initialization of mFormat, mStreamType, and mSharedBuffer earlier"
0ce5ca5e113d58cbcb7cb48615d6dbbf3fbe7c66 17-Jan-2014 Glenn Kasten <gkasten@google.com> Merge "Cleanup createTrack error handling"
d0b33f63a9364364a827e77da26b112edf3c4d6e 17-Jan-2014 Glenn Kasten <gkasten@google.com> Merge "Remove dead code in AudioTrack::processAudioBuffer"
269a7e210949c4b28ba84dc71b9f99f6ef14f94e 17-Jan-2014 Glenn Kasten <gkasten@google.com> Merge "Cleanup loop termination logic in AudioRecord::obtainBuffer()"
a1ebc3b03d4dca534374c19e3c4f32ee687942e3 17-Jan-2014 Glenn Kasten <gkasten@google.com> Merge "Improve logs in AudioTrack::getMinFrameCount"
6d88aaf9cd810d96a4888dff8bd33d44cd01ccaa 17-Jan-2014 Glenn Kasten <gkasten@google.com> Merge "AudioRecord: fix unwanted overrun when restarting"
6a507298357c9ff869b97db57a890e58bd6bdec0 17-Jan-2014 Glenn Kasten <gkasten@google.com> Merge "AudioRecord::getInputFramesLost() cleanup"
32a7e0a5f7b000951b9adb80b17796f35b024816 17-Jan-2014 Glenn Kasten <gkasten@google.com> Merge "Unify comments between AudioTrack and AudioRecord"
b5ccb2d99b2af400c70777a6452f090ac14f5a96 13-Jan-2014 Glenn Kasten <gkasten@google.com> Make copy of audio_offload_info_t for future use

Change-Id: I515970aa0660418d5d1640fb1bf477e112c89bdd
udioTrack.cpp
dd5f4c8c4059f890e81b28b026a688febb4e1dd9 13-Jan-2014 Glenn Kasten <gkasten@google.com> Move up initialization of mFormat, mStreamType, and mSharedBuffer earlier

This will allow removal of most of the parameter list to createTrack_l.

Also check for valid stream type at client so we can log a better error
message.

Change-Id: Ia7176896d47fbb49106119fca26d9de8e7efe859
udioTrack.cpp
0cde076ddb283c84c3801a2df4cc3df99bd1577f 17-Jan-2014 Glenn Kasten <gkasten@google.com> Cleanup createTrack error handling

Similar to cleanup done earlier for openRecord in this CL:
> Change-Id: I84897dd7d30b370640b54e928f230604b873cb68

Bug: 10888816
Change-Id: I804a47f898e0319a60a9bd58906bbb037e45cc25
udioTrack.cpp
AudioFlinger.cpp
5e1f79baa5c7355effbd2c9183787d6604487908 15-Jan-2014 Glenn Kasten <gkasten@google.com> AudioRecord: fix unwanted overrun when restarting

Apply the same fix to AudioRecord as this CL did for AudioTrack:
> Change-Id: Id703f8dc092a6f07c905eee194054b4a978f979d

Details:
When restarting an AudioRecord from stopped state, it is necessary
to force refresh of mRemainingFrames by processAudioBuffer() as
the last read before stop() could be partial. No doing so will lead
into unnecessary sleep before filling the non contiguous part
of the buffer returned by obtainBuffer() when processAudioBuffer()
is executed for the first time after start().

Change-Id: I0ff04648e990e97bad5ea3db5be0c4151250d5e1
udioRecord.cpp
d8a9d0220e84ae0b5049385aa9b1a0d8ea02b5bb 15-Jan-2014 Glenn Kasten <gkasten@google.com> Cleanup loop termination logic in AudioRecord::obtainBuffer()

Apply the same change to AudioRecord, that was already done for AudioTrack in this CL:
> Change-Id: I0fc48117946364cb255afd653195498891f622bd

If the proxy->obtainBuffer at the end of the "do" loop fails with status
DEAD_OBJECT, and the restoreRecord_l during the next trip of the "do"
loop also fails, then the value of the buffer fields will be based on
the previous proxy->obtainBuffer that returned DEAD_OBJECT. This will
have cleared the buffer, but it's tricky. So instead explicitly clear
the buffer after restoreRecord_l, before breaking out of the loop.

Change-Id: Ifc97f2ab7b8195d6b149502bb5d765d2983b07be
udioRecord.cpp
70c0bfbe5ec88dcc3efa2bd8df26f36cff1cf03a 15-Jan-2014 Glenn Kasten <gkasten@google.com> Improve logs in AudioTrack::getMinFrameCount

Change-Id: I8b478e6abdded26a43f32c131931939e9ae36fd7
udioTrack.cpp
7103d9671ded507fd3f6938297019a32f71ea5a0 15-Jan-2014 Glenn Kasten <gkasten@google.com> Remove dead code in AudioTrack::processAudioBuffer

Change-Id: I0baefe9dc08bb5ec45d34698fc764caa160789d2
udioTrack.cpp
8ff50e7526d24aca11713006933b8dcb64ef6be9 15-Jan-2014 Glenn Kasten <gkasten@google.com> Use uint32_t sequence numbers for IAudioRecord

This makes it the same as for IAudioTrack.

Previously we had a mix of int, int32_t and uint32_t,
which could cause comparisons to fail.

Change-Id: Ic72ef650ee81f65db11e42ed16d818fdf3e310f4
udioRecord.cpp
ac1954cb9a480a409e8cee4193fc534a6a29fbb6 15-Jan-2014 Glenn Kasten <gkasten@google.com> Merge "Document AudioTrack mFrameCount and mReqFrameCount better"
dbed8955148dd2fe39584007c528e3a532f1a04e 15-Jan-2014 Glenn Kasten <gkasten@google.com> Merge "Fix error handling in AudioSystem::getOutputForEffect"
5f972c031d4061f4f037c9fda1ea4bd9b6a756cd 13-Jan-2014 Glenn Kasten <gkasten@google.com> AudioRecord::getInputFramesLost() cleanup

Fixed bug that if the binder call failed (for example if the
IAudioFlinger binder is dead), then getInputFramesLost was returning
garbage. Now it correctly returns zero, which is the error value for
this method.

The type declarations for getInputFramesLost were inconsistent:
a mixture of unsigned int, size_t, and uint32_t. Now it returns uint32_t
everywhere, which is what the underlying HAL API returns.

Added a FIXME about the side effect behavior. This will need review
for multi-client.

Change-Id: Ifa2e117a87dbd0c1f2c892a31d1c3dd919bf1a0a
udioRecord.cpp
udioSystem.cpp
AudioFlinger.cpp
5b27ccd67c845aa20a12a1fb58339e7e81e3d536 15-Jan-2014 Glenn Kasten <gkasten@google.com> Merge "Use AUDIO_SESSION_ALLOCATE instead of 0"
2b2165c75790050810460c8de3f414876bce4c0e 13-Jan-2014 Glenn Kasten <gkasten@google.com> Unify comments between AudioTrack and AudioRecord

Change-Id: I00a1025e2891a1c96218b3c2187eaddda6614ebc
udioRecord.cpp
udioTrack.cpp
23a7545c4de71e989c2d8ebf1d5b9dcf463c36a9 13-Jan-2014 Glenn Kasten <gkasten@google.com> Document locking rules for mFlags, and fix discrepancies

Change-Id: Id45ba544cc84133ed5e578fb4fd8a11b62211dc1
udioTrack.cpp
84fba38b60c2ddb02b9a787f56be88fc084b4a16 14-Jan-2014 Glenn Kasten <gkasten@google.com> Merge "Fix race in AudioTrack::getParameters()"
7e47f25f9031e231f5fdbbb789435485d1af45af 14-Jan-2014 Glenn Kasten <gkasten@google.com> Merge "Improve error logging for getOutputSamplingRate"
41721bb796da589f8a669d1db7687a0da8f88761 13-Jan-2014 Glenn Kasten <gkasten@google.com> Fix race condition in AudioRecord::pause followed by start

Bug: 11148722
Change-Id: Ia1e14133d73ac301fe06a047e70a573911822630
udioRecord.cpp
b1bef51fec06e8bceec914d1b48b411d3ff2adff 13-Jan-2014 Glenn Kasten <gkasten@google.com> Improve error logging for getOutputSamplingRate

Change-Id: I3b52402a663b27efe1d7c6a4f684521f33f3ff8f
udioTrack.cpp
2c6c5294388e251ebc1e00d6c8785190561c27fc 13-Jan-2014 Glenn Kasten <gkasten@google.com> Fix race in AudioTrack::getParameters()

mOutput is protected by mLock.

Change-Id: Id02e627062855ca60f28bd8961b1d5f44939c727
udioTrack.cpp
396fabdb6efcdac5aea3d9f559d1beedf6a4cedc 08-Jan-2014 Glenn Kasten <gkasten@google.com> Document AudioTrack mFrameCount and mReqFrameCount better

and remove unnecessary initialization of mFrameCount in set().

Change-Id: I9effeb0a6dd035ca02fe77f6992c55d9515b4df6
udioTrack.cpp
efa6ea97022780b68e595e5326e30dbe2a799202 08-Jan-2014 Glenn Kasten <gkasten@google.com> Fix error handling in AudioSystem::getOutputForEffect

and AudioPolicyService::getOutputForEffect.
The conventional error value for audio_io_handle_t is 0,
not a status_t cast to audio_io_handle_t.

Change-Id: I34b3fd1a50f3fa1cbf39f32eea1911112a4e094a
udioSystem.cpp
e2b2858b6ff0249b0c3bd6cb042afc8cf1fd78cf 09-Jan-2014 Glenn Kasten <gkasten@google.com> Merge "Cleanup AudioTrack::getMinFrameCount error handling"
f344c6cef51df9974640557f7baccb537492fa54 09-Jan-2014 Glenn Kasten <gkasten@google.com> Merge "Cleanup AudioSystem::getInputBufferSize error handling and caching"
66a0467fdddada4caabd0f0a999fbb367fea7bee 08-Jan-2014 Glenn Kasten <gkasten@google.com> Cleanup AudioTrack::getMinFrameCount error handling

Guarantee to return a non-zero frameCount for return status NO_ERROR;

Return the correct specific status_t if any of the AudioSystem APIs fail,
instead of the generic NO_INIT.

API change: getMinFramCount no longer defaults to zero on error, so
callers _must_ check the return status. This change makes
getMinFrameCount more like other APIs. All known callers were reviewed,
and they do check the return status.

Change-Id: I4a8342a75ee89a068c23c84b8380ed9d1b968507
udioTrack.cpp
f94006ca0f30c27868c284e553f57bf467ae92bc 08-Jan-2014 Glenn Kasten <gkasten@google.com> Cleanup error handling in AudioSystem get methods

Don't return zero sample rate or frame count without an error.

Change-Id: I052d841080ed33e4f081ae9825a2f33dff444fb9
udioSystem.cpp
5446e541367061b53f45f3fd4600f9060680bca3 08-Jan-2014 Glenn Kasten <gkasten@google.com> Cleanup AudioSystem::getInputBufferSize error handling and caching

Previously, if the IAudioFlinger::getInputBufferSize failed,
it would return NO_ERROR but a zero buffer size value, which could
confuse the caller. Now it returns BAD_VALUE in this case.

Also it would still cache the zero buffer size. Now it does
not cache on failure.

Removed over-initialization of the cache globals.

Change-Id: I6835fcb56fe52535e018fc8c0c242115221b5d85
udioSystem.cpp
a36ff9fdf912b54f639118578e8d9582e1d70dca 21-Dec-2013 Glenn Kasten <gkasten@google.com> Merge "Fix some (but not all) unused parameter warnings"
73b61d3c2906d6d70a0843c1f0470f514c312956 21-Dec-2013 Glenn Kasten <gkasten@google.com> Merge "Add versions of get/SetParameters without I/O handle"
aea7ea06394bcb155972d82055d4ea59962e4051 26-Jun-2013 Glenn Kasten <gkasten@google.com> Use AUDIO_SESSION_ALLOCATE instead of 0

Also fix a couple of places where we were using AUDIO_SESSION_OUTPUT_MIX,
which happens to also be equal to 0, but has a different meaning.

Change-Id: I90e39be3b89f5021a96d9e3b8d10929013ca977f
udioRecord.cpp
AudioFlinger.cpp
74935e44734c1ec235c2b6677db3e0dbefa5ddb8 19-Dec-2013 Glenn Kasten <gkasten@google.com> Replace control block frameCount_ by explicit in/out parameter

in IAudioFlinger::createTrack and IAudioFlinger::openRecord

Change-Id: I09c644c80e92c8e744b1b99055988a2588b2a83d
udioRecord.cpp
udioTrack.cpp
udioTrackShared.cpp
AudioFlinger.cpp
7c7be1e05634d96d08210efb4bdeb012ffba440d 20-Dec-2013 Glenn Kasten <gkasten@google.com> Fix some (but not all) unused parameter warnings

Change-Id: Ia99e23a0b46db3f3e6aa46f9018e63c14f4af369
udioRecord.cpp
udioSystem.cpp
udioTrack.cpp
udioTrackShared.cpp
MediaDeathNotifier.cpp
oundPool.cpp
ediametadataretriever.cpp
c23885ebb142b9da31543789ecc3f7cf7111bc67 20-Dec-2013 Glenn Kasten <gkasten@google.com> Add versions of get/SetParameters without I/O handle

This is a step towards hiding I/O handles from application level,
as much as possible.

Change-Id: I30f4171d5dcf77f8e8eb332ce2e9245b30f5f2e1
udioSystem.cpp
be08f6a6688f3b1ae6914fbe800953c9bfb13c45 19-Dec-2013 Glenn Kasten <gkasten@google.com> Fix compile warning / incomplete initialization

Change-Id: Ib4accf99be800988e081f96222e1ee73538221ec
ediaplayer.cpp
dfeed91152cb54772b1411d7e82833ca4a48efcc 27-Nov-2013 Eric Laurent <elaurent@google.com> AudioTrack: fix position callback after restore

When restoring an AudioTrack, the next position callback point
should not be modified and set ahead of current buffer head.
Otherwise, as frames are dropped, the new position is never reached
and an application relying on position callbacks to reload the buffer
would be stalled.

Bug: 11868603.
Change-Id: I93b2a311642a0c89944b78bcc0482d4ceed98ae4
udioTrack.cpp
5e49afd05566820517747b9a8071c99ec0918328 27-Jul-2013 Eric Laurent <elaurent@google.com> update offloaded audio track sampling rate

AudioPlayer must read the sampling rate from offloaded audio sinks
whenever a new time position is computed as the decoder can update
the sampling rate on the fly.

Change-Id: I997e5248cfd4017aeceb4e11689324ded2a5bc88
udioTrack.cpp
688ca6330a5e7d072f67a1791e464fa7dec08b72 17-Dec-2013 Glenn Kasten <gkasten@google.com> am 5c474238: am 5893736d: am a67c7653: Merge "Increase kFastTrackMultiplier from 1 to 2"

* commit '5c474238bc579224ec8f7267d05651b0aa934100':
Increase kFastTrackMultiplier from 1 to 2
a67c76538fff102cd44b2f38dd073df5f2a33605 17-Dec-2013 Glenn Kasten <gkasten@google.com> Merge "Increase kFastTrackMultiplier from 1 to 2"
544ad2be674423238c47650d2c8588ba7dfc9ed2 13-Nov-2013 Marco Nelissen <marcone@google.com> Better character set encoding detection

Id3 tags are supposed to be ISO-8859-1 or unicode, but often aren't.
To better detect the real encoding we now use ICU to detect possible
encodings for a given byte sequence, then apply additional heuristics
to determine the most likely one.
b/5564857

Change-Id: I53bc83b006433da5c2f2ccfcd770ddb3a26b64d0
ndroid.mk
haracterEncodingDetector.cpp
haracterEncodingDetector.h
haracterEncodingDetectorTables.h
ediaScannerClient.cpp
utodetect.cpp
utodetect.h
b5fed68bcdd6f44424c9e4d12bfe9a3ff51bd62e 03-Dec-2013 Glenn Kasten <gkasten@google.com> Increase kFastTrackMultiplier from 1 to 2

Change-Id: I158f147295eebcea96e4047d7618069bc48bdd7d
udioTrack.cpp
b31788687736666e58b852e744a93f772d3f7148 27-Nov-2013 Eric Laurent <elaurent@google.com> AudioTrack: fix position callback after restore

When restoring an AudioTrack, the next position callback point
should not be modified and set ahead of current buffer head.
Otherwise, as frames are dropped, the new position is never reached
and an application relying on position callbacks to reload the buffer
would be stalled.

Bug: 11868603.
Change-Id: I93b2a311642a0c89944b78bcc0482d4ceed98ae4
udioTrack.cpp
a4f24ff9b239300b4bb2098c1413c0a60edc2d7e 27-Nov-2013 Eric Laurent <elaurent@google.com> AudioTrack: fix position callback after restore

When restoring an AudioTrack, the next position callback point
should not be modified and set ahead of current buffer head.
Otherwise, as frames are dropped, the new position is never reached
and an application relying on position callbacks to reload the buffer
would be stalled.

Bug: 11868603.
Change-Id: I93b2a311642a0c89944b78bcc0482d4ceed98ae4
udioTrack.cpp
71008b39396932f2f68f25598e9b7eb08d17d663 23-Nov-2013 Glenn Kasten <gkasten@google.com> Merge "Check all server-provided sp<IMemory>"
6f59db12a64f4496866952a251122ccb77a36c6b 27-Jul-2013 Eric Laurent <elaurent@google.com> update offloaded audio track sampling rate

AudioPlayer must read the sampling rate from offloaded audio sinks
whenever a new time position is computed as the decoder can update
the sampling rate on the fly.

Change-Id: I997e5248cfd4017aeceb4e11689324ded2a5bc88
udioTrack.cpp
a1d401d9f4a6ba477f0e07204e0b9481befcc928 20-Nov-2013 Glenn Kasten <gkasten@google.com> Check all server-provided sp<IMemory>

If the sp<IMemory> from server is non-0, make sure it also has
a non-NULL pointer(). If it is NULL, treat it as if the sp<> was 0.

Change-Id: I6d0bd786587eb73fac38af787c11eba541880685
AudioRecord.cpp
AudioTrack.cpp
Effect.cpp
a218f53d6cf9138aa5482935c16a84a5983ec6af 08-Nov-2013 Glenn Kasten <gkasten@google.com> Merge "Remove default channel mask for AudioTrack"
8ba90326d683b035d99e24db669093e4602a7149 30-Oct-2013 Glenn Kasten <gkasten@google.com> Remove default channel mask for AudioTrack

It doesn't make sense to have a default channel mask, since the caller
needs to know what format it will use when supplying data, and there
is currently no API to return the channel mask of an AudioTrack.
audio_is_output_channel() does not allow 0, so it will catch any
stragglers (I'm not aware of any).

Also move channel mask validation earlier.

Change-Id: Ia018ded8711455581a2a935f37432b049422d492
udioTrack.cpp
79c5786cf5a5d572cfcf21c3d40613d86bb4093a 30-Oct-2013 Glenn Kasten <gkasten@google.com> Clean up channel mask handling

Use type audio_channel_mask_t instead of uint32_t.

Use function audio_channel_out_mask_from_count() to convert from channel
count to channel mask instead of hard-coded assumption.

Rename 'channels' to 'channelMask' to avoid confusion with channel count.

Change-Id: I21a85e668458b773d108f95c2381eef9c4816251
oundPool.cpp
241be8d5874023761121043b8709a6062baac6f1 26-Oct-2013 Marco Nelissen <marcone@google.com> am 9cae2170: Assign blame for playback wakelocks.

* commit '9cae217050aa1347d4ac5053c305754879e3f97f':
Assign blame for playback wakelocks.
9cae217050aa1347d4ac5053c305754879e3f97f 14-Jan-2013 Marco Nelissen <marcone@google.com> Assign blame for playback wakelocks.

Set a work source for the playback wakelock, so that playback is
counted against the requesting app instead of the media server.

Cherrypicked from master.

b/9464621

Change-Id: I7329f88a288a95a582a78005a1c3d16a5a611e31
udioTrack.cpp
AudioFlinger.cpp
462fd2fa9eef642b0574aa7409de0bde3fec8d43 14-Jan-2013 Marco Nelissen <marcone@google.com> Assign blame for playback wakelocks.

Set a work source for the playback wakelock, so that playback is
counted against the requesting app instead of the media server.

Change-Id: I7329f88a288a95a582a78005a1c3d16a5a611e31
udioTrack.cpp
AudioFlinger.cpp
a153b68f2260a8ed7fbb236fa659b13264ac5ac0 19-Oct-2013 Glenn Kasten <gkasten@google.com> am 77177fa2: am 95c03858: Merge "Allow releaseBuffer after flush" into klp-dev

* commit '77177fa20773d02b4f9c4147ecb98107f019fa7d':
Allow releaseBuffer after flush
77177fa20773d02b4f9c4147ecb98107f019fa7d 19-Oct-2013 Glenn Kasten <gkasten@google.com> am 95c03858: Merge "Allow releaseBuffer after flush" into klp-dev

* commit '95c03858e2ab4fb693a2bfe47b3caa806e43c044':
Allow releaseBuffer after flush
2e422c472c91aa7912befd0fc038d1e11f354bc1 18-Oct-2013 Glenn Kasten <gkasten@google.com> Allow releaseBuffer after flush

After AudioTrack start checks for pending flush,
allow releaseBuffer on any previously obtained buffer.
For example, this can happen if the resampler has obtained
a buffer but not released the whole buffer yet.
Note that the resampler will be reading obsolete data.

Bug: 11285590
Change-Id: I0614fbb62e43604aac3089cce4b7797c87a306b5
udioTrackShared.cpp
abe0948c7b9aa32dceb82cebbfca52beb782754b 17-Oct-2013 Glenn Kasten <gkasten@google.com> am b2059ff3: am f8f15b05: Merge "Fix race condition in AudioTrack::pause followed by start" into klp-dev

* commit 'b2059ff384eee8ffb70a7ec8fc5570405201c734':
Fix race condition in AudioTrack::pause followed by start
b2059ff384eee8ffb70a7ec8fc5570405201c734 17-Oct-2013 Glenn Kasten <gkasten@google.com> am f8f15b05: Merge "Fix race condition in AudioTrack::pause followed by start" into klp-dev

* commit 'f8f15b05fe051009945c9042a1a9260280e0feb2':
Fix race condition in AudioTrack::pause followed by start
f8f15b05fe051009945c9042a1a9260280e0feb2 17-Oct-2013 Glenn Kasten <gkasten@google.com> Merge "Fix race condition in AudioTrack::pause followed by start" into klp-dev
598de6c701e989385eeffa7c5dfd61f0459a2631 17-Oct-2013 Glenn Kasten <gkasten@google.com> Fix race condition in AudioTrack::pause followed by start

Bug: 11148722
Change-Id: Iec88f00c8510363d4418e4b8d5b34feb06ecf04d
udioTrack.cpp
771f1b6d196b7924707fc44177ac3a88fc31fa9e 17-Oct-2013 Eric Laurent <elaurent@google.com> am 7f8c3973: am 120a8847: Merge "AudioTrack: fix head position after restore" into klp-dev

* commit '7f8c397378a7ee5abd395413be71388ad36d3ed2':
AudioTrack: fix head position after restore
7f8c397378a7ee5abd395413be71388ad36d3ed2 17-Oct-2013 Eric Laurent <elaurent@google.com> am 120a8847: Merge "AudioTrack: fix head position after restore" into klp-dev

* commit '120a88471a607c85c4d60300d73c3be0a1e8f8c8':
AudioTrack: fix head position after restore
cc21e4f1e41dfa17e7e2bef995fcd22c45f6bcd0 17-Oct-2013 Eric Laurent <elaurent@google.com> AudioTrack: fix head position after restore

The head position transfered to the new track
by restoreTrack_l() must take into account the frames that
are dropped from the old track to avoid a non recoverable
offset in the playback head position returned to applications.

Bug: 11230062.
Change-Id: I51143a08b95e8f264ed709ae2054360315f2b8b1
udioTrack.cpp
udioTrackShared.cpp
d5ce2091c7e11c4d869f11f22d8a38a1aedcf3ad 14-Oct-2013 Eric Laurent <elaurent@google.com> am b930056e: am b3cb72a1: SoundPool: handle new audio track event

* commit 'b930056ed4c6e1f8288d4f2cef828c3c02940482':
SoundPool: handle new audio track event
b930056ed4c6e1f8288d4f2cef828c3c02940482 13-Oct-2013 Eric Laurent <elaurent@google.com> am b3cb72a1: SoundPool: handle new audio track event

* commit 'b3cb72a17d9a472883e9e2faa18b42eac533fe99':
SoundPool: handle new audio track event
b3cb72a17d9a472883e9e2faa18b42eac533fe99 13-Oct-2013 Eric Laurent <elaurent@google.com> SoundPool: handle new audio track event

If the AudioTrack is torn down, SoundPool will never
receive the buffer end event and the track will stay active
for ever.

The fix consists in stopping the AudioTrack when a new audiotrack
event is received.

Bug: 11193583.
Change-Id: I9876eb2a8f75c601368f669acd67b0accf6e2736
oundPool.cpp
7a72e2aca9a6c46a08bc605166f90915aaeb81cb 07-Oct-2013 Glenn Kasten <gkasten@google.com> Merge "Fix AudioTrack pause followed by stop"
35295078ab59c8c5d143a54d5a55557c3ca62c51 07-Oct-2013 Glenn Kasten <gkasten@google.com> resolved conflicts for merge of 9a7d11f0 to master

Change-Id: Ie4d101185a93d37ec280f608813ad62a077a584e
9a7d11f07dc19327892915f0bfecce758d2f4098 07-Oct-2013 Glenn Kasten <gkasten@google.com> am fee4ce33: Merge "Cleanup openRecord error handling" into klp-dev

* commit 'fee4ce338d78eeb58af1f66831ead53322d3859e':
Cleanup openRecord error handling
fee4ce338d78eeb58af1f66831ead53322d3859e 07-Oct-2013 Glenn Kasten <gkasten@google.com> Merge "Cleanup openRecord error handling" into klp-dev
b7f82eaed2876bacc3a402182b75323026813c30 04-Oct-2013 Lajos Molnar <lajos@google.com> am aa50cc78: am 56ce7260: IOMX: Add prepareForAdaptivePlayback method

* commit 'aa50cc78be8a1067a0694a97b04d5a24b80af475':
IOMX: Add prepareForAdaptivePlayback method
aa50cc78be8a1067a0694a97b04d5a24b80af475 04-Oct-2013 Lajos Molnar <lajos@google.com> am 56ce7260: IOMX: Add prepareForAdaptivePlayback method

* commit '56ce726019f700a95ce5b45beebceadae4836e30':
IOMX: Add prepareForAdaptivePlayback method
56ce726019f700a95ce5b45beebceadae4836e30 03-May-2013 Lajos Molnar <lajos@google.com> IOMX: Add prepareForAdaptivePlayback method

prepareForAdaptivePlayback is the fallback mechanism to support
seamless resolution change for devices that do not support dynamic
output buffers. It is up to the codecs to handle this appropriately,
but codecs that do not handle dynamic output buffers would
request enough buffers up to the requested size in this method
to avoid port reconfiguration on resolution changes.

Change-Id: I58d4aa8ef1359ea3472735bbe9140c3132039b3d
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 10192531
Related-to-bug: 7093648
OMX.cpp
34717c83733def81287e2b4ba2f62b416325c7ae 02-Oct-2013 Eric Laurent <elaurent@google.com> am 3424d6e1: am 1adf20ce: Merge "fix volume and effect enable delay on offloaded tracks" into klp-dev

* commit '3424d6e17637e0743ddf3bf4688af8ee36e69264':
fix volume and effect enable delay on offloaded tracks
3424d6e17637e0743ddf3bf4688af8ee36e69264 01-Oct-2013 Eric Laurent <elaurent@google.com> am 1adf20ce: Merge "fix volume and effect enable delay on offloaded tracks" into klp-dev

* commit '1adf20ce868b80a24f7387daa6549364d5509c6a':
fix volume and effect enable delay on offloaded tracks
59fe010bcc072597852454a2ec53d7b0a2002a3b 28-Sep-2013 Eric Laurent <elaurent@google.com> fix volume and effect enable delay on offloaded tracks

Volume: add a method to wake up the mediaserver playback
thread when a volume command is received on an offloaded track.

Effects: call effect chain process on offloaded playback threads
asynchronously from writes to allow effect state updates while
waiting for async write callback.

Bug: 10796540.

Change-Id: Id2747ae88783575d1d7ffd6fc86fbd054ab2c739
udioTrack.cpp
AudioTrack.cpp
96f04886d1c1bfbc422e2be033ea66be83e42441 20-Sep-2013 Glenn Kasten <gkasten@google.com> Simplify AudioTrack stream end and fix race

Bug: 10994052
Change-Id: Ib2e38e7a600bcffef8cbc68c1722e40fbbc7ea67
udioTrack.cpp
397edb3377e5775f4df60afb8bf6d4711e5adc0e 31-Aug-2013 Glenn Kasten <gkasten@google.com> Fix AudioTrack pause followed by stop

Now the stop is not a nop.

Bug: 10993355
Change-Id: Idfbfd6d14897574578b80648a16e0fc73765cb6c
udioTrack.cpp
c666b8f16310fc826471c0fb6ee3f7e4d3a2d067 24-Sep-2013 Eric Laurent <elaurent@google.com> am 8ee02943: am 1c7f35d1: Merge "soundpool: allocate shared memory heap by client" into klp-dev

* commit '8ee02943b61e0a7dd78e5596720261b185a223d5':
soundpool: allocate shared memory heap by client
8ee02943b61e0a7dd78e5596720261b185a223d5 24-Sep-2013 Eric Laurent <elaurent@google.com> am 1c7f35d1: Merge "soundpool: allocate shared memory heap by client" into klp-dev

* commit '1c7f35d1f25eb7160314fdef536463fc34deb1ea':
soundpool: allocate shared memory heap by client
e93cf2ca27ae6f4a81d4ef548bbf10a34db6d98f 24-Sep-2013 Glenn Kasten <gkasten@google.com> Cleanup openRecord error handling

Bug: 10888816
Change-Id: I84897dd7d30b370640b54e928f230604b873cb68
udioRecord.cpp
AudioFlinger.cpp
3d00aa6de95fb46e36f2bab4e3facdf0b96acf06 24-Sep-2013 Eric Laurent <elaurent@google.com> soundpool: allocate shared memory heap by client

Current SoundPool implementation allocates the shared memory heap
containing decoded PCM samples in mediaserver process.
When mediaserver process crashes, the shared memory heaps allocated by
AudioCache cannot be mapped anymore in the new instance of mediaserver.
This causes a silent failure to end playback of new sounds because
AudioFlinger believes the new AudioTracks are opened in streaming mode
and not static mode: it sees a NULL shared memory pointer when the track
is created.

The fix consists in allocating the memory heap in the client process. Thus
the heap is not lost when mediaserver restarts. The global memory usage is
the same as this is shared memory.

Also added a way to detect that a shared memory is passed when the track is
created but cannot be mapped on mediaserver side.

Also fix a crash in SoundPool when ALOGV is enabled.

Bug: 10894793.
Change-Id: Ice6c66ec3b2a409d75dc903a508b6c6fbfb2e8a7
AudioFlinger.cpp
MediaPlayerService.cpp
oundPool.cpp
ediaplayer.cpp
20fb283150ddbcf362c764d7b822f54e5bcdd457 24-Sep-2013 Jean-Michel Trivi <jmtrivi@google.com> am c7b2f9dc: am 402dfba6: Merge "Add support for level measurements in Visualizer" into klp-dev

* commit 'c7b2f9dce911026fa13854b49aa2bb5353f68499':
Add support for level measurements in Visualizer
2e3dcb8a00b0b151a548bfa6e61547a9dce51d72 24-Sep-2013 Eric Laurent <elaurent@google.com> am 3f079bb9: am 1d2536f4: Merge "AudioTrack: fix music resume" into klp-dev

* commit '3f079bb9ca87c3c1834cc5be0dafc6514938b578':
AudioTrack: fix music resume
c7b2f9dce911026fa13854b49aa2bb5353f68499 24-Sep-2013 Jean-Michel Trivi <jmtrivi@google.com> am 402dfba6: Merge "Add support for level measurements in Visualizer" into klp-dev

* commit '402dfba6dcd68f5fd8d8921f9751f3e47eb1449d':
Add support for level measurements in Visualizer
3f079bb9ca87c3c1834cc5be0dafc6514938b578 24-Sep-2013 Eric Laurent <elaurent@google.com> am 1d2536f4: Merge "AudioTrack: fix music resume" into klp-dev

* commit '1d2536f460d4678770f423f50cbf6a61a13d4d11':
AudioTrack: fix music resume
402dfba6dcd68f5fd8d8921f9751f3e47eb1449d 24-Sep-2013 Jean-Michel Trivi <jmtrivi@google.com> Merge "Add support for level measurements in Visualizer" into klp-dev
09647d29eaf429ce88c9c9709ff63dee62f2147a 20-Sep-2013 Jean-Michel Trivi <jmtrivi@google.com> Add support for level measurements in Visualizer

New commands to set a measurement mode and perform peak + RMS
measurements.

Bug 8413913

Change-Id: Ib25254065c79d365ebb34f9dc9caa0490e2d300d
isualizer.cpp
9d2c78c4798ffd8c276c1bf0eaa0b34bc255a2da 23-Sep-2013 Eric Laurent <elaurent@google.com> AudioTrack: fix music resume

Fix regression introduced by commit 5a6cd22 in AudioTrack resume:
the callback thread was not signaled if paused internaly.

Bug: 10895013.
Change-Id: Ic356b115132d6fccbcee2d9bb855e92671dc20c5
udioRecord.cpp
udioTrack.cpp
342d52bc0ebc4be85b4806dae9addce2230d01b4 21-Sep-2013 Glenn Kasten <gkasten@google.com> am e97d1ba9: am 4b701cc0: Merge "Revert "Workaround slow AudioTrack destruction"" into klp-dev

* commit 'e97d1ba9471a71c6b18cee23c98535d553303dac':
Revert "Workaround slow AudioTrack destruction"
e97d1ba9471a71c6b18cee23c98535d553303dac 21-Sep-2013 Glenn Kasten <gkasten@google.com> am 4b701cc0: Merge "Revert "Workaround slow AudioTrack destruction"" into klp-dev

* commit '4b701cc041d635e5ec56e382043a4c5d01aedd80':
Revert "Workaround slow AudioTrack destruction"
4b701cc041d635e5ec56e382043a4c5d01aedd80 21-Sep-2013 Glenn Kasten <gkasten@google.com> Merge "Revert "Workaround slow AudioTrack destruction"" into klp-dev
dd0a81253bcf4daef56e991c94dc3c0d1124ef90 20-Sep-2013 Glenn Kasten <gkasten@google.com> am f2c643c8: am 3b3cfcfa: Merge "Fix slow AudioTrack and AudioRecord destruction" into klp-dev

* commit 'f2c643c89e405b57c7ce42067b876fb80031e5fa':
Fix slow AudioTrack and AudioRecord destruction
f2c643c89e405b57c7ce42067b876fb80031e5fa 20-Sep-2013 Glenn Kasten <gkasten@google.com> am 3b3cfcfa: Merge "Fix slow AudioTrack and AudioRecord destruction" into klp-dev

* commit '3b3cfcfa272c8e3e16c89765b8817f5a8de0c505':
Fix slow AudioTrack and AudioRecord destruction
5a6cd224d07c05b496b6aca050ce5ecf96f125af 20-Sep-2013 Glenn Kasten <gkasten@google.com> Fix slow AudioTrack and AudioRecord destruction

There were two causes for the slowness:

When thread was paused, it used nanosleep and sleep. These usually
run to completion (except for POSIX signal, which we avoid because it
is low-level). Instead, replace the nanosleep and sleep by condition
timed wait, as that can be made to return early by a condition signal.
Another advantage of condition timed wait is that a condition wait was
already being used at top of thread loop, so it is a simpler change.

The AudioRecord destructor was missing a proxy interrupt that was correct
in AudioTrack. This proxy interrupt is needed in case another thread
is blocked in proxy obtainBuffer.

Does not address the 1 second polling for NS_WHENEVER.

Bug: 10822765
Change-Id: Id665994551e87e4d7da9c7b015f424fd7a0b5560
udioRecord.cpp
udioTrack.cpp
e2773bb17bc5d01e05a77b8913539575ebd04500 20-Sep-2013 Glenn Kasten <gkasten@google.com> Revert "Workaround slow AudioTrack destruction"

This reverts commit 8bbbd7da02fac3de40139af19f7cf7a7cc3cc824.

Change-Id: I269a6c445cbce33451b6a9e74223e36e6abbdbe0
oundPool.cpp
5b510cd44a4ed5fb8b08336d966d34f093fbd8b0 19-Sep-2013 Glenn Kasten <gkasten@google.com> am 88e0f302: am feb6d27b: Merge "Workaround slow AudioTrack destruction" into klp-dev

* commit '88e0f302bf700a7b4d2b6e6a83838c1793508809':
Workaround slow AudioTrack destruction
88e0f302bf700a7b4d2b6e6a83838c1793508809 19-Sep-2013 Glenn Kasten <gkasten@google.com> am feb6d27b: Merge "Workaround slow AudioTrack destruction" into klp-dev

* commit 'feb6d27bf61cd266cf753215e9cae16b9bc9dbbd':
Workaround slow AudioTrack destruction
8bbbd7da02fac3de40139af19f7cf7a7cc3cc824 18-Sep-2013 Glenn Kasten <gkasten@google.com> Workaround slow AudioTrack destruction

Bug: 10809586
Change-Id: I5f30d4deb1233e8ade8967568e40684ef680c395
oundPool.cpp
362ebe187a39e063c7434bf3c002a0688fa27cdb 18-Sep-2013 Glenn Kasten <gkasten@google.com> am 684e0ae8: am 9a98b6de: Merge "Partial fix for SoundPool not terminating" into klp-dev

* commit '684e0ae8ac8cfb7c7a9709a7b4fc6caf485dfb8a':
Partial fix for SoundPool not terminating
684e0ae8ac8cfb7c7a9709a7b4fc6caf485dfb8a 18-Sep-2013 Glenn Kasten <gkasten@google.com> am 9a98b6de: Merge "Partial fix for SoundPool not terminating" into klp-dev

* commit '9a98b6de791aeb130192df10744f5b35f8b6ef1a':
Partial fix for SoundPool not terminating
8d0fda9660aee7059f802f400875247b01226084 18-Sep-2013 Glenn Kasten <gkasten@google.com> Partial fix for SoundPool not terminating

SoundPool was waiting for EVENT_UNDERRUN only to indicate end of clip. In
J, AudioTrack delivered both EVENT_UNDERRUN followed by EVENT_BUFFER_END.
However, as of K, AudioTrack is only delivering EVENT_BUFFER_END (this
lack of EVENT_UNDERRUN is another bug which still needs to be fixed).
The workaround is to also respond to EVENT_BUFFER_END in SoundPool.

Bug: 10787103
Change-Id: Id68a23bddd6dd9df6c49c55138197260d71ca468
oundPool.cpp
16f3201d2fe99a39a8a9bb478528ae9003645dfe 18-Sep-2013 Glenn Kasten <gkasten@google.com> am 11454092: am 18f86140: Merge "Fix underruns when fast track denied due to SRC" into klp-dev

* commit '11454092e4a94d3c8b4576c981595339abdfac0d':
Fix underruns when fast track denied due to SRC
11454092e4a94d3c8b4576c981595339abdfac0d 18-Sep-2013 Glenn Kasten <gkasten@google.com> am 18f86140: Merge "Fix underruns when fast track denied due to SRC" into klp-dev

* commit '18f861404efc054da0a2ea6c582e293940f63bc8':
Fix underruns when fast track denied due to SRC
44173e2805eba1c5812dd39c02e3964ebdd2104e 17-Sep-2013 Glenn Kasten <gkasten@android.com> am 440b5a49: am fc270954: am e56f3c96: Merge "strtok stores its values in thread local storage. So it can not guarantee works well when multithread environment. AudioFlinger has multithread. so strtok_r is more safe."

* commit '440b5a496ac4f10f1221ecb110f67bcd253ef70a':
strtok stores its values in thread local storage. So it can not guarantee works well when multithread environment. AudioFlinger has multithread. so strtok_r is more safe.
440b5a496ac4f10f1221ecb110f67bcd253ef70a 17-Sep-2013 Glenn Kasten <gkasten@android.com> am fc270954: am e56f3c96: Merge "strtok stores its values in thread local storage. So it can not guarantee works well when multithread environment. AudioFlinger has multithread. so strtok_r is more safe."

* commit 'fc270954192ef7e15ac2c88daadd8890d22096e3':
strtok stores its values in thread local storage. So it can not guarantee works well when multithread environment. AudioFlinger has multithread. so strtok_r is more safe.
fc270954192ef7e15ac2c88daadd8890d22096e3 17-Sep-2013 Glenn Kasten <gkasten@android.com> am e56f3c96: Merge "strtok stores its values in thread local storage. So it can not guarantee works well when multithread environment. AudioFlinger has multithread. so strtok_r is more safe."

* commit 'e56f3c96fa6e7550b67e8b049f999aaa2ada1192':
strtok stores its values in thread local storage. So it can not guarantee works well when multithread environment. AudioFlinger has multithread. so strtok_r is more safe.
ce8828a016b082f730152af2204b8ea3610dc1ec 17-Sep-2013 Glenn Kasten <gkasten@google.com> Fix underruns when fast track denied due to SRC

OpenSL ES requests a fast track. If sample rate conversion is needed,
the request is denied by server, and a larger client buffer is used
to handle the higher latency of a normal track. However the client
notification period was calculated based on buffer being divided into
2 sub-buffers. That resulted in the notification period being too long.
The server pulls chunks that are smaller than half the total buffer.
So now the client uses 3 sub-buffers when there is SRC.

Also removed the 'defer wake' optimization because it was incorrect.
This optimization attempted to reduce the number of wakeups of client,
when server releaseBuffer knows that another releaseBuffer will be
following. But there is no way for the first releaseBuffer to predict
how soon the second releaseBuffer will occur. In some cases it was
a long time, and the client underran. So now the client is woken up
immediately if the total number of available frames to client is >=
the minimum number the client wants to see (the notification period).

Also fix bug where minimum frame count was not being used in the
calculation of notification period.

Bug: 10342804
Change-Id: I3c246f4e7bc3684a344f2cf08268dc082e338e2a
udioTrack.cpp
udioTrackShared.cpp
ff7455c0c1df0c316a306fb81ee660840d08b6d0 07-Sep-2013 seunghak.han <seunghak.han@lge.com> strtok stores its values in thread local storage.
So it can not guarantee works well when multithread environment.
AudioFlinger has multithread.
so strtok_r is more safe.

Change-Id: I6d77ef9cc49a4478dd856dcdca14e4920ce955c6
udioParameter.cpp
d09752c849e9a66a7af5f92797874d16a09f8507 14-Sep-2013 Glenn Kasten <gkasten@google.com> am 617e2a1c: am d176ec1e: Merge "Fix SoundPool.play() looping" into klp-dev

* commit '617e2a1c9fe56e4f92146a1ec8b14a7726ff7c31':
Fix SoundPool.play() looping
8973c0439984f85870dffa7a100580271933c964 11-Sep-2013 Glenn Kasten <gkasten@google.com> Fix SoundPool.play() looping

This is done by configuring SoundPool for shared memory and fast track.
Previously SoundPool used a streaming track, and looping in streaming
mode relied on the ability to loop the most recently enqueued data.
That 'feature' was lost in the new implementation of streaming, so we're
now switching from streaming mode to shared memory mode. Shared memory
mode had always been desired, but was blocked by bug 2801375 which is fixed now.

Bug: 10171337
Change-Id: I2a938e3ffafa2a74d5210b4198b50db20ad5da0e
oundPool.cpp
83da1fcb120a2d09642be74cf9091ab321a60c8f 05-Sep-2013 Chong Zhang <chz@google.com> am c74630bc: am a1991255: Merge "wifi-display: do not use HDCP\'s encryptNative method if its unsupported" into klp-dev

* commit 'c74630bcbdc6f9a88a019b7ced6fbe7a58675ea2':
wifi-display: do not use HDCP's encryptNative method if its unsupported
a19912554f3779fac0c341ac702227bf4b5fe399 05-Sep-2013 Chong Zhang <chz@google.com> Merge "wifi-display: do not use HDCP's encryptNative method if its unsupported" into klp-dev
344202e13a91c9d3d109fd8f4a67f5b23efa7800 04-Sep-2013 Glenn Kasten <gkasten@google.com> am 55817ab9: am fe346c70: Fix miscellanous AudioTrack::getTimestamp() bugs

* commit '55817ab9c1868f1e6a59155f55c768f01509cda5':
Fix miscellanous AudioTrack::getTimestamp() bugs
fe582a379aa775b34b6aba387eea046b6c4632f1 04-Sep-2013 Glenn Kasten <gkasten@google.com> am 1a3a8078: am a07a1c2c: Instantiate SingleStateQueue<AudioTimestamp>

* commit '1a3a8078462e52b450dbad7443abaca1ca9cbfb8':
Instantiate SingleStateQueue<AudioTimestamp>
ec3acca4a75fc4adc076b56751124f507b419622 03-Sep-2013 Chong Zhang <chz@google.com> wifi-display: do not use HDCP's encryptNative method if its unsupported

Bug: 10609422
Change-Id: I005f1d04a4191b1503b5f3e895a98b8d6560c402
HDCP.cpp
fe346c707f59d763ded93bc3d27b51f0c0408258 30-Aug-2013 Glenn Kasten <gkasten@google.com> Fix miscellanous AudioTrack::getTimestamp() bugs

Check that get_presentation_position is non-NULL before calling.

AudioTrack::getTimestamp not implemented for fast tracks.

Fix typo in Track::getTimestamp().

Fix bugs in AudioTrack::getTimestamp after stop:
- getTimestamp while stopped is not allowed.
- stop, start, getTimestamp now returns the correct value.

Change-Id: Ie8d9dc1f28d8927634e04175a68b147ffc2ea8eb
udioTrack.cpp
a07a1c2c91dc7ee6ded319262499f20cd01edcf7 23-Aug-2013 Glenn Kasten <gkasten@google.com> Instantiate SingleStateQueue<AudioTimestamp>

as typedef AudioTimestampSingleStateQueue and use it in MonoPipe.

Change-Id: Idaebb362bd9d0a81a7ed83792ab9369dc37c0e74
ndroid.mk
ingleStateQueueInstantiations.cpp
ec9ad1b0947f5d6b465281312dbe92f096a8f881 30-Aug-2013 Glenn Kasten <gkasten@google.com> am f94b2946: am 56b59224: Merge "Add IAudioTrack::getTimestamp()" into klp-dev

* commit 'f94b2946a511c5cbb6b9001449ca8278cb332bda':
Add IAudioTrack::getTimestamp()
56b592240073b1ab116c6e23a9c4c34ef5ad80d8 30-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "Add IAudioTrack::getTimestamp()" into klp-dev
6dc365f0d5a92084517f0c3846e4f07fc7206bab 30-Aug-2013 Glenn Kasten <gkasten@google.com> am 73e4f3d4: am 865f6f24: Merge "New AudioTrack C++ API for audio timestamps" into klp-dev

* commit '73e4f3d44f7022b03943ae34f08363e049e4b46f':
New AudioTrack C++ API for audio timestamps
865f6f248bf10189272020ebfdbf4827433caf0f 30-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "New AudioTrack C++ API for audio timestamps" into klp-dev
0c9abdf4d71ef01a48c8b988bfec86559a773fb9 30-Aug-2013 Eric Laurent <elaurent@google.com> am 697e50e4: am ed474f37: Merge "AudioTrack: fix write retries for compressed audio" into klp-dev

* commit '697e50e4558e23606dc28773de6dd75ebc5f8af8':
AudioTrack: fix write retries for compressed audio
42a6f422c09ca6a960673e0e805ddf71a9b51bef 29-Aug-2013 Eric Laurent <elaurent@google.com> AudioTrack: fix write retries for compressed audio

When the amount of frames that can be written to the buffer
is less than requested, AudioTrack::processAudioBuffer() estimates
the time needed to free the missing amount of frames and asks the
callback thread to sleep.
This behavior is not possible for compressed audio and should not
be enabled for offloaded tracks.

Change-Id: I5b657283cfba06254c9ac0ea9b447467cce7eb61
udioTrack.cpp
53cec22821072719ee02c856e9ac2dda2496c570 29-Aug-2013 Glenn Kasten <gkasten@google.com> Add IAudioTrack::getTimestamp()

with dummy implementation in AudioFlinger::TrackHandle, and
implement AudioTrack::getTimestamp() using IAudioTrack.

Also document invariant that mAudioTrack and control block are always
non-0 after successful initialization.

Change-Id: I9861d1454cff7decf795d5d5898ac7999a9f3b7e
udioTrack.cpp
AudioTrack.cpp
ce70374bf105f8a6160bf5dd70affea012b2a464 20-Jul-2013 Glenn Kasten <gkasten@google.com> New AudioTrack C++ API for audio timestamps

This new API is intended to replace latency(), especially for A/V sync.
The application will receive periodic timestamp notifications. The period
is unspecified, but will likely be more frequent after a pause or stop,
set position, underrun, display on/off change, route change, or when audio
framework notices drift. It will be up to the higher level application
(e.g. Stagefright) to reconstruct a clock that updates more frequently.

The current latency() method doesn't indicate when latency changes
due to screen on/off state, route changes, etc.

Includes squahsed change-Id: I2082f8752040be0c234b1a6f1be2e269abf2ce7c
Dummy implementation of AudioTrack:getTimestamp()
Rename AudioTrack::Timestamp to AudioTimestamp.
Renaming and pulling up to a higher level allows more modules to use it.

Change-Id: Ibf7f6a207c3f8d8697f25ede2cd5200697fadb86
(cherry picked from commit dd69eb893867634fd169c03204a6ad7c74b351e7)
udioTrack.cpp
876e62329e9ef9e6522c451413270a4258bbcabf 28-Aug-2013 Eric Laurent <elaurent@google.com> am 21b0ab8b: am c063c175: Merge "AudioTrack: fix unwanted underrun when restarting" into klp-dev

* commit '21b0ab8b2de355673606c3751ce4cdcba28fe8ca':
AudioTrack: fix unwanted underrun when restarting
ec9a032c2e104ab1e3b5bf73e69dab1408ced0ad 28-Aug-2013 Eric Laurent <elaurent@google.com> AudioTrack: fix unwanted underrun when restarting

When restarting an AudioTrack from stopped state, it is necessary
to force refresh of mRemainingFrames by processAudioBuffer() as
the last write before stop() could be partial. No doing so will lead
into unnecessary sleep before filling the non contiguous part
of the buffer returned by obtainBuffer() when processAudioBuffer()
is executed for the first time after start().

Change-Id: Id703f8dc092a6f07c905eee194054b4a978f979d
udioTrack.cpp
733ba4dc9161741930464818618855962bdb1297 27-Aug-2013 Chong Zhang <chz@google.com> am f79d6e44: am 33142e1e: Merge "wifi-display: pass session info to wifi display settings" into klp-dev

* commit 'f79d6e44ffd427cf9d331a95777cfbbcc99f72f1':
wifi-display: pass session info to wifi display settings
6e74cc78e3e16686b895958d2a623abc3f5a775f 27-Aug-2013 Chong Zhang <chz@google.com> am 24850793: am 2484040e: Merge "MediaPlayer: add listener for raw track data" into klp-dev

* commit '24850793d3ca7e29d2ef553639d2e133c3983f7e':
MediaPlayer: add listener for raw track data
33142e1e318c0c766a385d88d2434f62f9e2dfe7 24-Aug-2013 Chong Zhang <chz@google.com> Merge "wifi-display: pass session info to wifi display settings" into klp-dev
2484040e0f413989e4edbe26ba3bf71122382af6 23-Aug-2013 Chong Zhang <chz@google.com> Merge "MediaPlayer: add listener for raw track data" into klp-dev
c398c1a9a8296c20dcc566e9f6f148de9d2b0342 23-Aug-2013 Jeff Tinker <jtinker@google.com> am 6c6dc760: am 62c1a46e: Merge "Add ability to test supported content types to MediaDrm" into klp-dev

* commit '6c6dc760006b14a63c839a15d5612c7e19d16bc5':
Add ability to test supported content types to MediaDrm
62c1a46eec047eb5fbc4b90432ec1ce65b76fb75 23-Aug-2013 Jeff Tinker <jtinker@google.com> Merge "Add ability to test supported content types to MediaDrm" into klp-dev
9cf69e0fc110f17c28e988ed0f9bf91abfaf710d 21-Aug-2013 Jeff Tinker <jtinker@google.com> Add ability to test supported content types to MediaDrm

bug: 10244066
Change-Id: I317f05b146db962c271893f6208890a5a6c396f1
Drm.cpp
87ecf19404586672008e98babc225e094292ceb5 06-Jun-2013 Chong Zhang <chz@google.com> wifi-display: pass session info to wifi display settings

Bug: 9371882

Change-Id: I9e4b8c2154b03ce8ff3e14c465a5224bb6e8db9a
RemoteDisplayClient.cpp
d6a2f3f03197998f44374e68ba1d838a7ebb180d 20-Aug-2013 Eric Laurent <elaurent@google.com> am 9f178e70: am 99ad37a4: Merge "AudioSystem: new audioflinger restart detection" into klp-dev

* commit '9f178e705836d9ac8de64487929732c302644bee':
AudioSystem: new audioflinger restart detection
46291616486979986cba3ab83e894728ef53063f 18-Jul-2013 Eric Laurent <elaurent@google.com> AudioSystem: new audioflinger restart detection

Add a specific method to AudioSystem for AudioService to poll
for AudioFlinger service restart instead of relying on current
callback mechanism which is flaky.

Bug: 9693068.
Change-Id: Ie88bc9d25033503bc5cd2fa9d8c754d0f8045b8f
udioSystem.cpp
dcb89b3b505522efde173c105a851c412f947178 06-Aug-2013 Chong Zhang <chz@google.com> MediaPlayer: add listener for raw track data

Bug: 10326117

Change-Id: I2c0bdf8adc67b11f8dc633423bee66897548f181
ediaplayer.cpp
8845337fff1c8faa4296b3bcafcefb41e07fc3ad 13-Aug-2013 Jeff Brown <jeffbrown@google.com> am 82278b2c: am fe9611bd: Merge "Fix potential leak of audio input handle." into klp-dev

* commit '82278b2ceeebbcf345ed81413eeffa82fa82e05b':
Fix potential leak of audio input handle.
ac0bbe16f3eba46b3d8057b66c2aff9101fc6f7d 10-Aug-2013 Jeff Brown <jeffbrown@google.com> Fix potential leak of audio input handle.

The audio input handle is ultimately owned by the audio recorder
object but it could be dropped on the floor if an error occurred
before that object was fully initialized.

Rearranged some of the argument validation and merged getInput_l
with openRecord_l to simplify the code and prevent such a leak
from occurring.

Bug: 10265163
Change-Id: I124dce344b1d11c2dd66ca5e2c9aec0c52c230e2
udioRecord.cpp
a0d77cd6bf5f4ee3ee9d67ad26e7f9981991d4e7 09-Aug-2013 Glenn Kasten <gkasten@google.com> Fix SoundPool.play() looping regression in 4.3 DO NOT MERGE

The change I7370d6e59a7ef26dfb284a8b058d5ab2e0a42ccf caused a regression
in SoundPool looping when using SoundPool's streaming implementation.
This reverts a portion of that change.

Bug: https://code.google.com/p/android/issues/detail?id=58113
Bug: 10171337
Change-Id: I8af0dc8683a7c7f225c80f0eb4d39770667b52e5
udioTrack.cpp
3cb40d7882b93c242267de0b8db10ef8957b3a24 09-Aug-2013 Glenn Kasten <gkasten@google.com> am 1b832c3d: Merge "Fix regression for AudioRecord streaming callback mode" into klp-dev

* commit '1b832c3d8f2b1b24f9bc7025afd2b4a8b4e6c6f9':
Fix regression for AudioRecord streaming callback mode
4a0efb77198c69df711ab369ac482a42dbdfab07 09-Aug-2013 Glenn Kasten <gkasten@google.com> Fix regression for AudioRecord streaming callback mode

The notification period (frequency of client wakeups) was broken in
streaming callback mode. Fast tracks were OK, but non-fast tracks with
normal latency weren't getting woken up at all.

Bug: 10222943
Change-Id: Ife9a2f57fa73c6eb921f1c5ba62de0bfcc20557b
udioRecord.cpp
6b682a20b66322bf673f575f8c4fd9e45f3e8183 08-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "Consistent style for comparisons of raw pointers to NULL"
89a70f71cef61d10437b3901e8efc1f082a857c5 07-Aug-2013 Lajos Molnar <lajos@google.com> Merge "IOMX: add updateGraphicBufferInMeta method for metadata mode"
d0715867861c216e88a4a7523b6da8a3cb128724 22-Jul-2013 Lajos Molnar <lajos@google.com> IOMX: add updateGraphicBufferInMeta method for metadata mode

This is used to set the handle in the metadata buffer that is
valid in the mediaserver process, as well as to keep a reference
for the graphic buffers in BufferMeta.

Change-Id: I46bb68d8bed894f357eeeb25368360d11b276634
Signed-off-by: Lajos Molnar <lajos@google.com>
OMX.cpp
230c5bde2779c618b26edc73443280b2d9371c70 06-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "AudioRecord notification frames"
33f3177c08d238285b296d137e527ec99e34228f 06-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "AudioRecord::openRecord_l use flags"
b85187332e740be337ce2e3e0d8d21c5c8651bf8 06-Aug-2013 Marco Nelissen <marcone@google.com> Merge "Reject unprepared MediaPlayers"
743649fa70392b668377fb507d251b346c7b2769 06-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "AudioRecord::openRecord_l now take flags"
507b2860cfe0bb4a712064f1c503caa9a7325886 01-Aug-2013 Glenn Kasten <gkasten@google.com> Consistent style for comparisons of raw pointers to NULL

Change-Id: Iec102a5ccb2fe69229887b5432cd1fb66f26f0cf
AudioFlinger.cpp
3aa03e40668dd90390d9f1702f8c576e15b366c3 06-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "IAudioFlinger::openRecord track_flags_t flags is in/out"
77baebfe89c99415a0ee4c2ea87bfd8a0f9e51f1 05-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "AudioRecord::set and constructor now take flags"
f86b18b1ce3cf20a39aea1fcaf90ec66f9d6d63e 05-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "AudioRecord callback thread waits for priority boost"
b13820ffafcb6bcdd33b6272676535afb4dff479 05-Aug-2013 Marco Nelissen <marcone@google.com> Reject unprepared MediaPlayers

Don't allow a MediaPlayer that has been reset() or release()d to be
used as the argument to setNextMediaPlayer.

Change-Id: I47da1460ec3742f5b2bd7b79e7998b290032d5a1
ediaplayer.cpp
6c104a4a245ea72b7bdf8c7c016121189045d4bc 05-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "AudioRecord has no default sample rate"
7cd9cf70e36ad4b8eb12e24f9adbbe6fd69edebd 01-Aug-2013 Glenn Kasten <gkasten@google.com> AudioRecord notification frames

Change-Id: I76ec536d1504eb9a558178b62bf225aace4b40d1
udioRecord.cpp
3151427b6b0adf99929433715bab6f1e505100c1 01-Aug-2013 Glenn Kasten <gkasten@google.com> AudioRecord::openRecord_l use flags

Use the flags to determine input parameters for IAudioFlinger::openRecord.

Change-Id: I98d2726503af75c8830ce80ceaf3b94a755b342f
udioRecord.cpp
73493688f4190f790ee15d9ca54831cd64f4e195 01-Aug-2013 Glenn Kasten <gkasten@google.com> AudioRecord::openRecord_l now take flags

The new parameter 'flags' of type audio_input_flags_t will be used for
requesting a fast track, but is currently ignored.

Change-Id: If68dfda8b2d4eaaca42927d721b4630c47f71f3b
udioRecord.cpp
eeca32671896739e84050da5992d5f151a1629de 01-Aug-2013 Glenn Kasten <gkasten@google.com> IAudioFlinger::openRecord track_flags_t flags is in/out

This will allow AudioFlinger to tell client it is denying a request.

Change-Id: Iff2be3ad6636371bbda9c9899a283c94620c1f06
udioRecord.cpp
AudioFlinger.cpp
27f7b2a8fe899565487d8a326676a5f7d0a05a37 01-Aug-2013 Glenn Kasten <gkasten@google.com> AudioRecord::set and constructor now take flags

The new optional parameter 'flags' of type audio_input_flags_t will be
used for requesting a fast track.

Change-Id: Ia7e070cb57c833e608352da354fb30dc26df6918
udioRecord.cpp
28f1351369682801e1bb40a835bdae3c97b73c1c 31-Jul-2013 Glenn Kasten <gkasten@google.com> AudioRecord callback thread waits for priority boost

Change-Id: Iae38fa4ac20a45751566169213a08a15deb0a2f6
udioRecord.cpp
954315a10089fa3684ac94db5be77c6655c08fc0 02-Aug-2013 Glenn Kasten <gkasten@google.com> Recording of non-linear formats is not supported

Such formats are already rejected in AudioRecord::set()

Change-Id: I5ba1fd9e4cd659e5226c75aa4f63e52f655e0521
udioRecord.cpp
f0f33c4acd231fa95deb9eeef2c46b0129e64463 31-Jul-2013 Glenn Kasten <gkasten@google.com> AudioRecord has no default sample rate

Change-Id: I72feefdd6f3a623fd3669b80d4b264518fdc0929
udioRecord.cpp
82aaf94a5b18939e4d790bbc752031f3070704a3 18-Jul-2013 Glenn Kasten <gkasten@google.com> Report underruns for fast tracks also

This fixes a regression that was introduced earlier
by commit 9f80dd223d83d9bb9077fb6baee056cee4eaf7e5
called "New control block for AudioTrack and AudioRecord".
That commit broke underrun reporting for fast tracks.

Also remove Track::mUnderrunCount, which counted the number of underrun
events, and was only used by dumpsys media.audio_flinger.

Now dumpsys media.audio_flinger reports the number of underrun frames,

Isolated underrun-related control block accesses via the proxy, so that
the server is not directly poking around in the control block.

The new proxy APIs are AudioTrackServerProxy::getUnderrunFrames() and
AudioTrackServerProxy::tallyUnderrunFrames(). getUnderrunFrames() returns
a rolling counter for streaming tracks, or zero for static buffer tracks
which never underrun, but do a kind of 'pause' at end of buffer.
tallyUnderrunFrames() increments the counter by a specified number of frames.

Change-Id: Ib31fd73eb17cbb23888ce3af8ff29f471f5bd5a2
udioTrackShared.cpp
d054c32443a493513ab63529b0c8b1aca290278c 12-Jul-2013 Glenn Kasten <gkasten@google.com> Move control block mName to createTrack() output

This is part of a series of CLs to clean up the shared memory
control block, by removing any fields that don't have to be there.

Change-Id: I6e51003a1293b6800258c31b22cff2eba42162e7
udioTrack.cpp
udioTrackShared.cpp
AudioFlinger.cpp
96f60d8f04432a1ed503b3e24d5736d28c63c9a2 12-Jul-2013 Glenn Kasten <gkasten@google.com> Rename control block flags to mFlags

Change-Id: I7b6d31e24531954ab1ecdf3ed56c19433700bd89
udioRecord.cpp
udioTrack.cpp
udioTrackShared.cpp
97252bb0e40a5a9b41f020163393cf6c5da10b7e 30-Jul-2013 Glenn Kasten <gkasten@google.com> Merge "AudioRecord and HAL input stream must be 16-bit PCM only"
f20e1d8df84c5fbeeace0052d100982ae39bb7a4 12-Jul-2013 Glenn Kasten <gkasten@google.com> Rename control block server to mServer and add comments

Change-Id: Ieabd91acee92d0e84e66fbd358df5282b856306e
udioTrackShared.cpp
eced2daaa6c91a3731eef978ce65c6ec319c5e6a 17-Jul-2013 Glenn Kasten <gkasten@google.com> Use correct type for OutputDescriptor::format

Change-Id: Ide608ef452d57da29b708180d90470361c123d1d
AudioFlingerClient.cpp
7f249fa9bcb64da324d19f551943fac7686d221c 29-Jul-2013 Glenn Kasten <gkasten@google.com> Merge "Use standard name and type for channel mask"
3dcd00dddec86a1c5133083ad7ba2265d49c048c 17-Jul-2013 Glenn Kasten <gkasten@google.com> Declare methods in binder opcode order

Change-Id: I5f624b7a51ffe1a17a67c056cf984f74e4c56eac
AudioRecord.cpp
b1a270d1e926fb9a01b4265a7675ed0c2c8f4868 14-May-2013 Richard Fitzgerald <rf@opensource.wolfsonmicro.com> libmedia: offloaded playback support

- start() returns a status so that upper layers can
recreate a non offloaded track in case of error.

- Added states to handle offloaded tracks specific:
- waiting for stream end (drain) notification by
audio flinger
- allow pause while waiting for stream end notification

- getPosition() queries the render position directly from
audio HAL.

- disable APIs not applicable to offloaded tracks

- Modified track restoring behavior for invalidated
offloaded tracks: just send the callback and wait for
upper layers to create a new track.

- Added wait for stream end management in audio track client
proxy. Similar to obtainBuffer and should be factored in.

Change-Id: I0fc48117946364cb255afd653195498891f622bd
Signed-off-by: Eric Laurent <elaurent@google.com>
udioTrack.cpp
udioTrackShared.cpp
AudioFlinger.cpp
AudioPolicyService.cpp
bfb1b832079bbb9426f72f3863199a54aefd02da 07-Jan-2013 Eric Laurent <elaurent@google.com> AudioFlinger: offload playback, non-blocking write

- Added specialized playback thread class for offload playback,
derived from directoutput thread.
This thread type handles specific state transitions for offloaded
tracks and offloading commands (pause/resume/drain/flush..) to audio HAL.
As opposed to other threads, does not go to standby if the track is paused.

- Added support for asynchronous write and drain operations at audio HAL.
Use a thread to handle async callback events from HAL: this avoids locking
playback thread mutex when executing the callback and cause deadlocks when
calling audio HAL functions with the playback thread mutex locked.

- Better accouting for track activity: call start/stop and release Output
methods in audio policy manager when tracks are actually added and removed
from the active tracks list.
Added a command thread in audio policy service to handle stop/release commands
asynchronously and avoid deadlocks with playback thread.

- Track terminated status is not a state anymore. This condition is othogonal
to state to permitted state transitions while terminated.

Change-Id: Id157f4b3277620568d8eace7535d9186602564de
udioTrackShared.cpp
fad226abd12435dbcd232f7de396f1a097b2bd5f 17-Jul-2013 Glenn Kasten <gkasten@google.com> Use standard name and type for channel mask

Former name 'channels' was ambiguous with respect to channel count.

Change-Id: I716f792d95a7e0c787d27514ad6e93dbcef8a415
udioSystem.cpp
AudioFlingerClient.cpp
291bb6d8947c5b0c062f0895d623c529259bfa39 17-Jul-2013 Glenn Kasten <gkasten@google.com> AudioRecord and HAL input stream must be 16-bit PCM only

Currently there are 16-bit PCM assumptions in several places for capture:
- resampler API
- mRsmpInBuffer and mRsmpOutBuffer
- RecordThread::threadLoop upmix, downmix, and resampling
- possibly other places

Until those assumptions are removed, this CL enforces 16-bit PCM in both
client and server at all places where a format is checked.

Change-Id: I08b0570bff626ad0d341804825a72c14e61b4233
udioRecord.cpp
4182c4e2a07e2441fcd5c22eaff0ddfe7f826f61 15-Jul-2013 Glenn Kasten <gkasten@google.com> Use AudioSystem::setLowRamDevice() to configure memory

Bug: 9798886
Change-Id: I9321e3f369f1ed9429ae222e3926ebdeb012b8b0
udioSystem.cpp
AudioFlinger.cpp
0b83a15d97f61d575a7cffbf42f9ed6edfa25ccc 18-Jul-2013 Andreas Huber <andih@google.com> Merge "Support "suspension" of a video encoder in "surface-input" mode."
e40cda70eec141fa05cbcca1de420fdb22b98be6 17-Jul-2013 Andreas Huber <andih@google.com> Support "suspension" of a video encoder in "surface-input" mode.

i.e. feed no more input frames to the encoder while suspended.

Change-Id: I51391e18c1517548e869f8ddece19f4af37e78f9
OMX.cpp
cff1b2359b8a302f19539c0bc5d25c98a52733fd 17-Jul-2013 Glenn Kasten <gkasten@google.com> Merge "Add comments"
bb849b5d1a0364b69aa15ed00709edf4b7e348fc 17-Jul-2013 Glenn Kasten <gkasten@google.com> Merge "Fix typo in logs"
ce177bb31493d3cd4450f9d4760fa1fd32ec6bf4 11-Jul-2013 Glenn Kasten <gkasten@google.com> Merge "AudioTrackShared cleanup"
050501d11d944dcb256d37d3b86bd658d94f6a7f 11-Jul-2013 Glenn Kasten <gkasten@google.com> Fix AudioTrack::flush()

It was only flushing at a surface level, and even then only the first time
the server observed the client's flush request. Now it flushes at a
deeper level, but there may be even deeper device-specific flushing.

Bug: 9770947
Change-Id: I687cc3410ff9e5e5d4a5dcb9e3b129501e53d247
udioTrackShared.cpp
fb1fdc9d6603aa228362e7349451f6455c9849c2 11-Jul-2013 Glenn Kasten <gkasten@google.com> Add comments

Change-Id: Ifbf3a46a4183c8abc0feee1c588953ab10303cc1
udioSystem.cpp
udioTrack.cpp
b0dfd4613225a3b2a17bdf8d85e89a4b04d65ef3 11-Jul-2013 Glenn Kasten <gkasten@google.com> Fix type error in AudioTrack::processAudioBuffer

It returned a bool instead of nsecs_t

Change-Id: If0c096dac411afc0a4142ec1e59c1fdd36d4867c
udioTrack.cpp
0bc32ae1a8ef45f98101b78bfe64798875b569e3 08-Jul-2013 Glenn Kasten <gkasten@google.com> Merge "Explicitly compare raw pointers to NULL"
7c5977f0322204240b3d1874a44c1f3911275ae5 02-Jul-2013 Glenn Kasten <gkasten@google.com> Explicitly compare raw pointers to NULL

Change-Id: Id2c7828a36a6912333465475b21fa87e294c83c7
AudioFlinger.cpp
7db7df0e8d9d7cee8ba374468cdbfa0108e3337c 26-Jun-2013 Glenn Kasten <gkasten@google.com> AudioTrackShared cleanup

Maintain unreleased frame count on client side also (was already there on server side).
Assertion failure instead of BAD_VALUE status for incorrect usage of APIs.
Clean up error handling code.

Change-Id: I23ca2f6f8a7c18645309ee5d64fbc844429bcba8
udioTrackShared.cpp
85007a9bd3c310f96fed47208dfee566fd00351f 14-Nov-2012 Glenn Kasten <gkasten@google.com> Fix typo in logs

Change-Id: I889e31ea3a45a3d8d34fdfb54ebc3947de51d2be
udioSystem.cpp
1ab85ec401801ef9a9184650d0f5a1639b45eeb9 31-May-2013 Glenn Kasten <gkasten@google.com> Include what is needed

Remove old includes.
Header files only include other header files that they directly need themselves.

Change-Id: Ic471386808d9f42ea19ccbd59cb50a5f83a89dd0
udioRecord.cpp
udioSystem.cpp
udioTrack.cpp
etPlayer.cpp
oundPool.cpp
oneGenerator.cpp
isualizer.cpp
ad3af3305f024bcbbd55c894a4995e449498e1ba 25-Mar-2013 Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Public API changes for audio offload support.

NOTE: this does _not_ include all private member variables added
to classes as part of offload support. Only public/protected functions
and stubs functions/variables needed to make the changes buildable.

- isOffloadSupported() added to audio policy service
A stub implementation is required to build, this always returns false
- setParameters() added to IAudioTrack
A stub implementation is required to build, this always returns
INVALID_OPERATION

- CBlk flag for stream end

- Change AudioSystem::getRenderPosition() to take an audio_output_t
so caller can specify which output to query

- Add AudioSystem::isOffloadSupported()
This is fully implemented down to the AudioFlinger function
AudioPolicyServer::isOffloadSupported() which is just a stub
that always returns false.

- Add EVENT_STREAM_END to AudioTrack interface.
STREAM_END is used to signal when the hardware has actually finished
playing all the data it was sent.

- Add event type enumeration to media player interface AudioSink callbacks
so that the same callback can be used to handle multiple types of
event. For offloaded tracks we also have to handle STREAM_END and
TEAR_DOWN events

- Pass audio_offload_info_t to various functions used for opening outputs,
tracks and audio players. This passes additional information about the
compressed stream down to the HAL when using offload.
For publicly-available APIs this is an optional parameter (for some of
the internal and low-level APIs around the HAL interface it is mandatory)

- Add getParameters() and setParameters() API to AudioTrack
Currently dummy implementations.

- Change AudioPlayer contructor so that it takes a set of bitflags defining what
options are required. This replaces the original bool which only specified
whether to use deep buffering.

- Changes to StageFright class definition related to handling tearing-down of
an offloaded track when we need to switch back to software decode

- Define new StageFright utility functions used for offloaded tracks
Currently dummy implementations.

- AudioFlinger changes to use extended audio_config_t.
Fills in audio_offload_info_t member if this info is passed in when
opening an output.

- libvideoeditor changes required to add the new event type parameter
to AudioSink callback functions

- libmediaplayerservice changes required to add the new event type parameter
to AudioSink callback functions

Change-Id: I3ab41138aa1083d81fe83b886a9b1021ec7320f1
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Eric Laurent <elaurent@google.com>
udioSystem.cpp
udioTrack.cpp
AudioFlinger.cpp
AudioPolicyService.cpp
AudioTrack.cpp
93bb77da5481ab75c2cd6e3aa681839273c6e43d 24-Jun-2013 Glenn Kasten <gkasten@google.com> Workaround AudioRecord bug for large buffer sizes

Bug: 9556436
Change-Id: I92d1238b623d2cfd648e0a684d0e710fb0bd8b43
udioTrackShared.cpp
0d09a9bec07b3bec78bd473ff0bfcf0a261f3f25 24-Jun-2013 Glenn Kasten <gkasten@google.com> Use mFutex as an event flag rather than semaphore

An event flag can be more fault-tolerant in case of loss of synchronization,
as it cannot overflow. It also allows more bits to be used in the future.
See http://en.wikipedia.org/wiki/Event_flag

Change-Id: I01ca25d951eb263124da54bb4738f0d94ec4a48b
udioTrackShared.cpp
224309a0f21e37d58fa62ed2aef8b444421cdc0f 14-Jun-2013 Glenn Kasten <gkasten@android.com> am 767227fc: am 82fc2ca6: am d5018116: Merge "Fix typo."

* commit '767227fcac7be843b338473954420d390e354bf7':
Fix typo.
82fc2ca6905978b4f49f2c6bf948a6872575f2cc 14-Jun-2013 Glenn Kasten <gkasten@android.com> am d5018116: Merge "Fix typo."

* commit 'd5018116252a3ecb491e2eaddad12180b85d1e78':
Fix typo.
d5018116252a3ecb491e2eaddad12180b85d1e78 14-Jun-2013 Glenn Kasten <gkasten@android.com> Merge "Fix typo."
9f80dd223d83d9bb9077fb6baee056cee4eaf7e5 19-Dec-2012 Glenn Kasten <gkasten@google.com> New control block for AudioTrack and AudioRecord

Main differences between old and new control block:
- removes the mutex, which was a potential source of priority inversion
- circular indices into shared buffer, which is now always a power-of-2 size

Change-Id: I4e9b7fa99858b488ac98a441fa70e31dbba1b865
udioRecord.cpp
udioTrack.cpp
udioTrackShared.cpp
oneGenerator.cpp
da5b509fd8323bacf4043e2c29c6ee1d0716be60 27-Feb-2013 Ming Zhou <b42586@freescale.com> Noise will be heard if audio sample rate not matched with audio track

When audio sample rate which set to audio track is not the same with
the actual pcm data, noise will be heard. Fix the bug when write 8 bit
pcm samples.

Change-Id: Idcb0d7b0e9aaa250dd22b758c8337e23d1706049
Signed-off-by: Ming Zhou <b42586@freescale.com>
Signed-off-by: guoyin.chen <guoyin.chen@freescale.com>
udioTrack.cpp
f65fa170b28f97503df3c309ecdaab377a042ba6 06-Jun-2013 Masaki Muranaka <monaka@monami-software.com> Fix typo.

Change-Id: Ia72ed2bef54751dc2d6c3379a58de95a0e9ebfdd
ediaplayer.cpp
bb6f0a0bb413817d707cfb4c4a30847fda520787 04-Jun-2013 Glenn Kasten <gkasten@google.com> Fix underruns when sample rate != native sample rate

This forces a minimum of 3 application buffers when the sample rates
don't match, using the normal mixer and low latency HAL.

There is still an issue that the latency() varies depending on whether
screen was off or on at the time of creating the AudioTrack.

With screen on:
I/AudioTrack( 2028): afFrameCount=960, minBufCount=2, afSampleRate=48000, afLatency=50
I/AudioTrack( 2028): minFrameCount: 2646, afFrameCount=960, minBufCount=3, sampleRate=44100, afSampleRate=48000, afLatency=50

With screen off:
I/AudioTrack( 2817): afFrameCount=960, minBufCount=4, afSampleRate=48000, afLatency=84
I/AudioTrack( 2817): minFrameCount: 3528, afFrameCount=960, minBufCount=4, sampleRate=44100, afSampleRate=48000, afLatency=84

Change-Id: Ib45515edff2afcd672dda34881b658c800ffc25a
udioTrack.cpp
2799d743ee2ae5a25fe869a7f9c052acc029559f 30-May-2013 Glenn Kasten <gkasten@google.com> Use sp<AudioTrack> instead of raw AudioTrack *

This change prepares for the new implementation of AudioTrack client, which
will require clients to use only sp<AudioTrack>, not raw AudioTrack *.
A raw delete will cause a race condition during AudioTrack destruction.

AudioTrack was made a RefBase by commit b68a91a70bc8d0d18e7404e14443d4e4020b3635
on 2011/11/15, when it was needed by OpenSL ES (for the callback protector).
At that time, the only other client that was also converted from
AudioTrack * to sp<AudioTrack> was android.media.AudioTrack JNI in
project frameworks/base (file android_media_AudioTrack.cpp).

Details:
* Use .clear() instead of delete followed by = NULL.
* ALOG %p need .get().
* sp<> don't need to be listed in constructor initializer, if initially 0.
* Use == 0 for sp<> vs == NULL for raw pointers.
* Use if (sp != 0) instead of if (raw).

Change-Id: Ic7cad25795d6e862e112abdc227b6d33afdfce17
etPlayer.cpp
oundPool.cpp
oneGenerator.cpp
7c684c622110af460025eff85082030947278430 03-Jun-2013 Andreas Huber <andih@google.com> am f9bb8358: am b7319a7e: Update HTTP proxy configuration for all media playback inside stagefright.

* commit 'f9bb8358e454be6dc88403171db7e0e182407f17':
Update HTTP proxy configuration for all media playback inside stagefright.
b7319a7eb0a06ef4fd3a0c9157ee63e637ad7aa1 29-May-2013 Andreas Huber <andih@google.com> Update HTTP proxy configuration for all media playback inside stagefright.

Change-Id: Ie0dd00045aba668d8b49da73224e7a7c9c04f69b
related-to-bug: 8873723
(cherry picked from commit 2704965b8a1ff3b7450ff58ccecf86d8ec688c40)
MediaPlayerService.cpp
ediaplayer.cpp
7c027248e1a4ccd5b22bc4deafb03e2d87ac8f38 26-Dec-2012 Glenn Kasten <gkasten@google.com> Consistent whitespace

Change-Id: I118cce68d3b777f9ec9b6bfb70367496422a40f2
udioRecord.cpp
udioTrack.cpp
MediaDeathNotifier.cpp
308bcaa44e578279e61be32b572fdb0b11b1e4c7 04-May-2013 Chong Zhang <chz@google.com> wifi-display: add support for metadata mode on encoder output

pass buffer_handle_t from encoder output to HDCP encryptor input

Bug: 8968123

Change-Id: Iea8007ce568641e213fd2e3cf6947a6f7a95746c
HDCP.cpp
754995dc19159d5dd00095aca27d42f3bc8b3e5b 14-May-2013 Eric Laurent <elaurent@google.com> am a83b9767: am 375379a4: Merge "Fix unreleased mutex in ToneGenerator stopTone()" into jb-mr2-dev

* commit 'a83b9767bc81d13101cad1df080ffeadedca2887':
Fix unreleased mutex in ToneGenerator stopTone()
704455a5a6cd22f03bb8984e0c7f46108eb1afb7 13-May-2013 Eric Laurent <elaurent@google.com> Fix unreleased mutex in ToneGenerator stopTone()

Commit 09108ade introduced a regression by not releasing
the ToneGenerator mutex before exiting in case of error.

Bug: 8852855
Change-Id: I8ba2755b218842e2034ed8dbd54b18bf2a5fc571
oneGenerator.cpp
1e27c22a3a024a7ba193ec48b9ec13d1ea0f03c6 13-May-2013 Eric Laurent <elaurent@google.com> Fix unreleased mutex in ToneGenerator stopTone()

Commit 09108ade introduced a regression by not releasing
the ToneGenerator mutex before exiting in case of error.

Bug: 8852855
Change-Id: I8ba2755b218842e2034ed8dbd54b18bf2a5fc571
oneGenerator.cpp
1ba7c0abc004333be7768df03553b6ffaa242d0a 11-May-2013 Marco Nelissen <marcone@google.com> am 780dbd33: am 0d24eb5e: Merge "Don\'t purge effects we\'re about to start using" into jb-mr2-dev

* commit '780dbd3357511770d655e55f69036d63c90089a9':
Don't purge effects we're about to start using
082aa3f335ffeedacafeb8982684cbb371a18c32 10-May-2013 Marco Nelissen <marcone@google.com> Don't purge effects we're about to start using

By acquiring the new session id before releasing the old, we prevent
purging existing effects with the new session id that aren't currently
attached but will be once the player is switched to the new session id.
b/8767565

Change-Id: I703881b69c5accd8832ac834246925a20ada4c21
ediaplayer.cpp
8bdb01c279828e286a6e8b22ff0c1bcb6aa6ee8f 10-May-2013 Marco Nelissen <marcone@google.com> Don't purge effects we're about to start using

By acquiring the new session id before releasing the old, we prevent
purging existing effects with the new session id that aren't currently
attached but will be once the player is switched to the new session id.
b/8767565

Change-Id: I703881b69c5accd8832ac834246925a20ada4c21
ediaplayer.cpp
1f7d356fa094b975ad2ebf9217be6abba2c70825 07-May-2013 Mathias Agopian <mathias@google.com> libutils clean-up

Change-Id: I3bf32d72aa8eec627249a675c130c91a8aff6710
ndroid.mk
ediaScannerClient.cpp
tringArray.cpp
tringArray.h
61aa989a5768b9b0571ca14edaf15886509a0ec8 03-May-2013 Eric Laurent <elaurent@google.com> am 1641f328: am 4170f515: Merge "Remove timing jitter during startup of audio" into jb-mr2-dev

* commit '1641f328d4de3b2b61481607dc482ccaefe808a9':
Remove timing jitter during startup of audio
a07f17ca46db04c9d5d9e7d6b2878db59ca2b9ea 23-Apr-2013 Glenn Kasten <gkasten@google.com> Remove timing jitter during startup of audio

This fixes a regression introduced recently, that increased timing jitter
during the startup of the FastMixer and AudioTrack callback threads.

The regression was to make requestPriority() asynchronous as a way to
avoid an apparent priority inversion in system_server. This means that
the target thread could run briefly with the initial priority, before
the new priority takes effect.

This change removes the startup jitter for FastMixer, by making the
requestPriority() synchronous again for that case. It doesn't matter
that this restores the priority inversion involving normal mixer thread,
because it happens during startup of both threads.

The change also removes the startup jitter for the AudioTrack callback
thread, by having the target thread check whether the requestPriority()
has completed yet. If not, the target thread blocks with a timeout
until the priority boost finishes.

Finally, we now log an error message if the expected priority boost
doesn't happen.

Bug: 8698989
Change-Id: Id590e9a274b70ec1ba85b44a585ee37a22e41cbc
udioTrack.cpp
f8197a6a9d9363cb52bb8a2c15c0e5a52064355e 23-Apr-2013 Glenn Kasten <gkasten@google.com> Remove timing jitter during startup of audio

This fixes a regression introduced recently, that increased timing jitter
during the startup of the FastMixer and AudioTrack callback threads.

The regression was to make requestPriority() asynchronous as a way to
avoid an apparent priority inversion in system_server. This means that
the target thread could run briefly with the initial priority, before
the new priority takes effect.

This change removes the startup jitter for FastMixer, by making the
requestPriority() synchronous again for that case. It doesn't matter
that this restores the priority inversion involving normal mixer thread,
because it happens during startup of both threads.

The change also removes the startup jitter for the AudioTrack callback
thread, by having the target thread check whether the requestPriority()
has completed yet. If not, the target thread blocks with a timeout
until the priority boost finishes.

Finally, we now log an error message if the expected priority boost
doesn't happen.

Bug: 8698989
Change-Id: Id590e9a274b70ec1ba85b44a585ee37a22e41cbc
udioTrack.cpp
7a3cb8963cc5cb21cd90e41edfc0e812ff93b7d8 17-Apr-2013 Jeff Tinker <jtinker@google.com> am 65e0123c: am 9e0727ca: Merge "Added CTS test for secure stop APIs" into jb-mr2-dev

* commit '65e0123ced0a1891fc66e631de5ba3d1d5a515bf':
Added CTS test for secure stop APIs
423e33ce6569cb14ecf772e9670208517f7b30c4 09-Apr-2013 Jeff Tinker <jtinker@google.com> Added CTS test for secure stop APIs

bug: 8604418

Change-Id: I173fa1ec904ba11dc4cff0343462b3f4bac0d365
Drm.cpp
1808736b17073b2fdb82a87abf103cbd31aba4fc 09-Apr-2013 Jeff Tinker <jtinker@google.com> Added CTS test for secure stop APIs

bug: 8604418

Change-Id: I173fa1ec904ba11dc4cff0343462b3f4bac0d365
Drm.cpp
0011777d54148dc84a923dda21b25f4f5a99ffed 15-Apr-2013 Andreas Huber <andih@google.com> am 2dd69cfc: am 5ce9c299: Merge "Instead of returning an error, return an invalid duration (-1 ms)" into jb-mr2-dev

* commit '2dd69cfca3e2a2b7c398198366d03ba1801e1bd9':
Instead of returning an error, return an invalid duration (-1 ms)
d85929f6086e050d7cb33bfe0d29f339ad7279e5 11-Apr-2013 Andreas Huber <andih@google.com> Instead of returning an error, return an invalid duration (-1 ms)

if no duration information was available. This prevents us from
entering ERROR state, effectively rendering the player instance useless.

Change-Id: I602d2661ae8b8633360306c0ea9208fb11e2bf17
related-to-bug: 8596285
ediaplayer.cpp
2070254f241f52cadb69bc2323f56df72704f1ca 11-Apr-2013 Andreas Huber <andih@google.com> Instead of returning an error, return an invalid duration (-1 ms)

if no duration information was available. This prevents us from
entering ERROR state, effectively rendering the player instance useless.

Change-Id: I602d2661ae8b8633360306c0ea9208fb11e2bf17
related-to-bug: 8596285
ediaplayer.cpp
844ebdef8c73b98ec29c75f1fd7940624e70d14d 10-Apr-2013 Ying Wang <wangying@google.com> am e63f850b: am da0dc0af: Add liblog

* commit 'e63f850b179a43a344d438f202ad34ec7566f955':
Add liblog
da0dc0af0effe9fbfb3ce3187c8472fca2baf3c6 10-Apr-2013 Ying Wang <wangying@google.com> Add liblog

Bug: 8580410
Change-Id: If493d87d60d71be664ad75b140c62acadb75b0d0
ndroid.mk
ecba7488c5cceaacef95836b1b476433451e7761 10-Apr-2013 Ying Wang <wangying@google.com> Add liblog

Bug: 8580410
Change-Id: If493d87d60d71be664ad75b140c62acadb75b0d0
ndroid.mk
d76fcd616b9d049cb658cb7502a2325db8d20344 05-Apr-2013 Jeff Tinker <jtinker@google.com> am c2ccb7d9: am d5ef30b2: Merge "Implement async event callout from drm plugin to Java app" into jb-mr2-dev

* commit 'c2ccb7d9948c01551dbb5ceb0f3d06004b86ce7c':
Implement async event callout from drm plugin to Java app
d5ef30b223b627c21b11f2850eeb48426c74220d 05-Apr-2013 Jeff Tinker <jtinker@google.com> Merge "Implement async event callout from drm plugin to Java app" into jb-mr2-dev
505208dd38ab2f143e6a3ff6a2c262d0fab76b7e 05-Apr-2013 Jeff Tinker <jtinker@google.com> Merge "Implement async event callout from drm plugin to Java app" into jb-mr2-dev
c0d5f1f8405de861ed6f1725f26cd6601e7103ab 02-Apr-2013 Jeff Tinker <jtinker@google.com> Implement async event callout from drm plugin to Java app

Change-Id: I007f147d693664e777b8758be2bb8a4c7ec0236b
ndroid.mk
Drm.cpp
DrmClient.cpp
0cb126a34fe32f81c830858102471e7be2ce85b1 02-Apr-2013 Jeff Tinker <jtinker@google.com> Implement async event callout from drm plugin to Java app

Change-Id: I007f147d693664e777b8758be2bb8a4c7ec0236b
ndroid.mk
Drm.cpp
DrmClient.cpp
5309f59db078739e3eeb6992f0f11fe0818266cb 03-Apr-2013 Jeff Tinker <jtinker@google.com> am 1ef63d1a: am a56e1506: Merge "MediaDrm API update" into jb-mr2-dev

* commit '1ef63d1a6a03d713954acbdb4e4641f53ade1d66':
MediaDrm API update
a56e15065bc45082d913c8c8e71e60692ce8c8f0 03-Apr-2013 Jeff Tinker <jtinker@google.com> Merge "MediaDrm API update" into jb-mr2-dev
df41f485a9162407b32b7db1cea483f64bbd0c65 03-Apr-2013 Jeff Tinker <jtinker@google.com> Merge "MediaDrm API update" into jb-mr2-dev
5005a7c6ffc6b1013a6155a28e3e6eaff52e3273 02-Apr-2013 Eric Laurent <elaurent@google.com> am 0a2d8961: am 0fb6aabf: Merge "ToneGenerator: fix overflow in stopTone" into jb-mr2-dev

* commit '0a2d896126ffacdaa905694757bc193a6b4ea436':
ToneGenerator: fix overflow in stopTone
4c63a239c404af1e055e5f9939939ab0fd09d98a 31-Mar-2013 Jeff Tinker <jtinker@google.com> MediaDrm API update

Clarify offline usage of sessions and keys and implement
implement CryptoSession to support additional crypto use
cases.

Change-Id: I5d8000ce7e1dd7eba08969fc50296c9e1456c4fc
Drm.cpp
8856c8b8777d0e0de11b2de863a336b001024e29 31-Mar-2013 Jeff Tinker <jtinker@google.com> MediaDrm API update

Clarify offline usage of sessions and keys and implement
implement CryptoSession to support additional crypto use
cases.

Change-Id: I5d8000ce7e1dd7eba08969fc50296c9e1456c4fc
Drm.cpp
a8eccec73a40d4afcff505eb463a016c89aeed42 28-Mar-2013 Eric Laurent <elaurent@google.com> ToneGenerator: fix overflow in stopTone

Fix overflow in tone duration calculation introduced in
commit 681be039.

Bug 6607077

Change-Id: Ie12f13701345c2b2d3be0b3c4d71cbfa2394a29b
oneGenerator.cpp
b133a4cb2a5a310a7461050a2d96537c6ce2415e 28-Mar-2013 Eric Laurent <elaurent@google.com> ToneGenerator: fix overflow in stopTone

Fix overflow in tone duration calculation introduced in
commit 681be039.

Bug 6607077

Change-Id: Ie12f13701345c2b2d3be0b3c4d71cbfa2394a29b
oneGenerator.cpp
08b7c1ed00b04465e66fd6c14877d4b2784c4e30 28-Mar-2013 Eric Laurent <elaurent@google.com> am 2a2f0ece: am 681be039: ToneGenerator: fix truncated tones

* commit '2a2f0ecec93bac15eb58dcf643b11867baf51804':
ToneGenerator: fix truncated tones
681be0398a06da7e24db4ed934a92af64d1409b1 27-Mar-2013 Eric Laurent <elaurent@google.com> ToneGenerator: fix truncated tones

The first DTMF tone after a silent period is truncated.
This is because the phone app starts and stops the tone
when the user presses and releases the key.
This combined to the fact that the tones use the low latency path
and that when the output stream exists standby there is a period
of several milliseconds during which no audio is mixed until the
stream is "warmed up".
The result is that much less audio is generated than the actual
key press duration.

The fix consists in storing the tone start time and making sure that
the number of samples generated corresponds at least to the time difference
between the tone start and stop commands.

Bug 6607077

Change-Id: I070d20dd8600c25a9e5d5a60c1d3313b7917b00d
oneGenerator.cpp
857583fd2ecbeb8696ede1f93b7291449fb2d133 27-Mar-2013 Eric Laurent <elaurent@google.com> ToneGenerator: fix truncated tones

The first DTMF tone after a silent period is truncated.
This is because the phone app starts and stops the tone
when the user presses and releases the key.
This combined to the fact that the tones use the low latency path
and that when the output stream exists standby there is a period
of several milliseconds during which no audio is mixed until the
stream is "warmed up".
The result is that much less audio is generated than the actual
key press duration.

The fix consists in storing the tone start time and making sure that
the number of samples generated corresponds at least to the time difference
between the tone start and stop commands.

Bug 6607077

Change-Id: I070d20dd8600c25a9e5d5a60c1d3313b7917b00d
oneGenerator.cpp
16ba880fa8457f27a37467f405fe236e72032d44 28-Mar-2013 Eric Laurent <elaurent@google.com> am 7ffe7689: am 2d595c0e: Merge "ToneGenerator: fix stop/destroy concurrency" into jb-mr2-dev

* commit '7ffe76894f0b68f4af159c68053fcfd29ca2e6fa':
ToneGenerator: fix stop/destroy concurrency
09108adeca8cbbf3fbb21f8aea2a2ff250db9531 27-Mar-2013 Eric Laurent <elaurent@google.com> ToneGenerator: fix stop/destroy concurrency

There is a problem if the stopTone() method is called
from two different threads (for instance if the destructor is called
while stopTone() is waiting for the audio callback to finish).

In this case, the second call to stopTone() will not wait for the
condition to be signaled and call clearWaveGens() while the callback
can still be active, thus causing a crash.

There is a similar problem in case of concurrent calls to startTone()
and stopTone().

The fix consists in making sure that stopTone() always waits for call
back completion or timeout and exits before calling clearWaveGens()
if a concurrent start request is detected.

Bug 8163071

Change-Id: I9ddb4390407701dcad5bf83660fd9903f0d72268
oneGenerator.cpp
2af030214e08f76c796365b0f9e1aca3dc14a6ef 27-Mar-2013 Eric Laurent <elaurent@google.com> ToneGenerator: fix stop/destroy concurrency

There is a problem if the stopTone() method is called
from two different threads (for instance if the destructor is called
while stopTone() is waiting for the audio callback to finish).

In this case, the second call to stopTone() will not wait for the
condition to be signaled and call clearWaveGens() while the callback
can still be active, thus causing a crash.

There is a similar problem in case of concurrent calls to startTone()
and stopTone().

The fix consists in making sure that stopTone() always waits for call
back completion or timeout and exits before calling clearWaveGens()
if a concurrent start request is detected.

Bug 8163071

Change-Id: I9ddb4390407701dcad5bf83660fd9903f0d72268
oneGenerator.cpp
ee1203117c37db7546f0e5669555437394b46eb1 26-Mar-2013 Eric Laurent <elaurent@google.com> am 44ae449b: am 6386b50b: ToneGenerator: fix AudioTrack pointer init

* commit '44ae449bd1c85be87e7b1fa4ffac21dd7d1a5d8f':
ToneGenerator: fix AudioTrack pointer init
6386b50b67185a966d43ee761acdfe7add569d10 26-Mar-2013 Eric Laurent <elaurent@google.com> ToneGenerator: fix AudioTrack pointer init

The pointer to AudioTrack should be initialized before
early return from ToneGenerator constructor because
it is tested by the destructor.

Bug 8140963

Change-Id: I9a7dfb60ba162b75dfaa5630ab7fc9485afd0074
oneGenerator.cpp
db372594bf27390d2bee089e35c5fb8f67370026 26-Mar-2013 Eric Laurent <elaurent@google.com> ToneGenerator: fix AudioTrack pointer init

The pointer to AudioTrack should be initialized before
early return from ToneGenerator constructor because
it is tested by the destructor.

Bug 8140963

Change-Id: I9a7dfb60ba162b75dfaa5630ab7fc9485afd0074
oneGenerator.cpp
5787070c802a79b8f2a6615fd2afea91117a4b01 26-Mar-2013 Eric Laurent <elaurent@google.com> am ead8ae2a: am 19c11e1c: Merge "ToneGenerator: optimize silent tone" into jb-mr2-dev

* commit 'ead8ae2a46daa3aaf81094720477e5450af5c500':
ToneGenerator: optimize silent tone
19c11e1c854ae3c20bacf66fbb20d53dcdb8d100 26-Mar-2013 Eric Laurent <elaurent@google.com> Merge "ToneGenerator: optimize silent tone" into jb-mr2-dev
bbef2b3f42de20c7d2a920de62d3d1eca40e054f 26-Mar-2013 Eric Laurent <elaurent@google.com> Merge "ToneGenerator: optimize silent tone" into jb-mr2-dev
6eb954f54e4a92b3c4bfbee177a3259d1320500d 25-Mar-2013 Eric Laurent <elaurent@google.com> ToneGenerator: optimize silent tone

Do not create an AudioTrack and start playback when a silent
tone is requested to ToneGenerator.

Bug 7946399

Change-Id: Ib9282871a56f7a862af7d1504ce3fbd7c18e34e2
oneGenerator.cpp
3beec60725cf0e5cf8e365d6c85928160c2cb75e 25-Mar-2013 Eric Laurent <elaurent@google.com> ToneGenerator: optimize silent tone

Do not create an AudioTrack and start playback when a silent
tone is requested to ToneGenerator.

Bug 7946399

Change-Id: Ib9282871a56f7a862af7d1504ce3fbd7c18e34e2
oneGenerator.cpp
793cc53aaa6b46ccd5ad7c6acfe2e62b268c84d3 25-Mar-2013 Jeff Tinker <jtinker@google.com> am d247aa8c: am 351f28e2: Merge "Load crypto plugins from additional shared libraries" into jb-mr2-dev

* commit 'd247aa8cec243a0a49a44057749820149e826d1a':
Load crypto plugins from additional shared libraries
bafb682ec7f51486e751fea954169deb91846063 22-Mar-2013 Jeff Tinker <jtinker@google.com> Load crypto plugins from additional shared libraries

Currently crypto plugins are expected to be in libdrmdecrypt.so.
When there are multiple plugins supporting different schemes,
this approach requires source code integration across
vendors which is unmanagable. Also, for integration with
MediaDrm where the crypto keys are obtained from a drm server,
the MediaCrypto plugin needs to interoperate with the MediaDrm
plugin. This change allows {MediaCrypto, MediaDrm} pairs that
are logically related to be implemented in a common shared
library.

Change-Id: I7f6638f29171f91609fc2d944396365568630b56
Crypto.cpp
5beac28a34e557251bd4bbd77a6d9303a69d4319 22-Mar-2013 Jeff Tinker <jtinker@google.com> Load crypto plugins from additional shared libraries

Currently crypto plugins are expected to be in libdrmdecrypt.so.
When there are multiple plugins supporting different schemes,
this approach requires source code integration across
vendors which is unmanagable. Also, for integration with
MediaDrm where the crypto keys are obtained from a drm server,
the MediaCrypto plugin needs to interoperate with the MediaDrm
plugin. This change allows {MediaCrypto, MediaDrm} pairs that
are logically related to be implemented in a common shared
library.

Change-Id: I7f6638f29171f91609fc2d944396365568630b56
Crypto.cpp
a2bacf9dcb22243ffaa96a50a008694344fc5da0 20-Mar-2013 Jeff Tinker <jtinker@google.com> am 81c859d6: am de5cdcae: Merge "Implementing MediaDrm APIs" into jb-mr2-dev

* commit '81c859d64ae58c565b66afee6b6232b7bb4fd38b':
Implementing MediaDrm APIs
de5cdcae51d3afd9b14e818087be14288c0c6b8c 20-Mar-2013 Jeff Tinker <jtinker@google.com> Merge "Implementing MediaDrm APIs" into jb-mr2-dev
aab193b107e302e145b5c3d6e6c87f92ac296186 20-Mar-2013 Jeff Tinker <jtinker@google.com> Merge "Implementing MediaDrm APIs" into jb-mr2-dev
4757d457bb6943931253176b5ba63758d5ea44c2 14-Mar-2013 Mathias Agopian <mathias@google.com> am 1be720b5: am a32fd0e2: Merge "remove uses of Surface in favor or IGraphicBufferProducer" into jb-mr2-dev

* commit '1be720b5a2af2dfb2ef1cd2614ef2e7dfa3513dc':
remove uses of Surface in favor or IGraphicBufferProducer
441a78d5e224e0d67f9b52fa9adc795c6944159b 08-Feb-2013 Jeff Tinker <jtinker@google.com> Implementing MediaDrm APIs

Change-Id: I9ff8eeb7d0c383b5c0c68cd54eb54ce7d2d22fe6
ndroid.mk
Drm.cpp
MediaPlayerService.cpp
cc82dc6d500023eba6048616301a4b12682458db 08-Feb-2013 Jeff Tinker <jtinker@google.com> Implementing MediaDrm APIs

Change-Id: I9ff8eeb7d0c383b5c0c68cd54eb54ce7d2d22fe6
ndroid.mk
Drm.cpp
MediaPlayerService.cpp
99617adda9bc46c43f511f0940bc735c73de61de 13-Mar-2013 Mathias Agopian <mathias@google.com> remove uses of Surface in favor or IGraphicBufferProducer

Change-Id: I13d7a9553aa335bca790a3a59d389d7533c83d57
MediaRecorder.cpp
ediarecorder.cpp
33da402287605e40e189289b11a08b8f5d515818 13-Mar-2013 Mathias Agopian <mathias@google.com> remove uses of Surface in favor or IGraphicBufferProducer

Change-Id: I13d7a9553aa335bca790a3a59d389d7533c83d57
MediaRecorder.cpp
ediarecorder.cpp
660fbbb77f42745d2c05b436f1a09c5cbd3853c5 09-Mar-2013 Glenn Kasten <gkasten@google.com> Merge "Propose new interpretation for setPosition and setLoop"
2217a40453b4b13232be77121bde76d6f31be012 06-Mar-2013 Glenn Kasten <gkasten@google.com> Merge "Add template class SingleStateQueue" into jb-mr2-dev
060c68497a9ab59fd71ffbe7c9a7cd3e58489265 06-Mar-2013 Glenn Kasten <gkasten@google.com> Merge "Add template class SingleStateQueue" into jb-mr2-dev
e51d8b3ba4533b7f94345a97e3cc633dc7b31f12 05-Mar-2013 Andy McFadden <fadden@android.com> Merge "Implement Surface input to MediaCodec." into jb-mr2-dev
a7a5917a064710edea9cfacc8eda44532150e852 05-Mar-2013 Andy McFadden <fadden@android.com> Merge "Implement Surface input to MediaCodec." into jb-mr2-dev
5c4cc0d99d3b1cb35c5d7c237272ee53142745fb 26-Nov-2012 Glenn Kasten <gkasten@google.com> Add template class SingleStateQueue

Change-Id: If7e2bc9b2a216524ee9cbb68682e2634933b4973
ndroid.mk
ingleStateQueue.cpp
ingleStateQueueInstantiations.cpp
538f498bbd5a2da51c9037a2689afc97f8bded8f 26-Nov-2012 Glenn Kasten <gkasten@google.com> Add template class SingleStateQueue

Change-Id: If7e2bc9b2a216524ee9cbb68682e2634933b4973
ndroid.mk
ingleStateQueue.cpp
ingleStateQueueInstantiations.cpp
7cd58537932ef6f481f68be0b9c597a89cebdfec 19-Feb-2013 Andy McFadden <fadden@android.com> Implement Surface input to MediaCodec.

Also, renamed a CHECK_INTERFACE macro that was clashing with the
Binder version.

Bug 7991062

Change-Id: If5e6ed0a06d9f67975497676e4b05abe3aa3d6c0
OMX.cpp
f779bb50d9746d9526541c3e6dcdf619cac941b7 19-Feb-2013 Andy McFadden <fadden@android.com> Implement Surface input to MediaCodec.

Also, renamed a CHECK_INTERFACE macro that was clashing with the
Binder version.

Bug 7991062

Change-Id: If5e6ed0a06d9f67975497676e4b05abe3aa3d6c0
OMX.cpp
c9b2e20f7c9a71e07ef398152709c76079decbcd 26-Feb-2013 Glenn Kasten <gkasten@google.com> Miscellaneous cleanup

Abbreviation framesReady to fRdy for new systrace.
Put inline const on one line.
Use local copy of mState in state.
Improve logging.
Line length 100.

Change-Id: I8201c3ce0e53fd464fd33d02544e52c342d40b68
udioRecord.cpp
a265845ecafe06c9668ce7ac67636657f4bedf86 26-Feb-2013 Glenn Kasten <gkasten@google.com> Miscellaneous cleanup

Abbreviation framesReady to fRdy for new systrace.
Put inline const on one line.
Use local copy of mState in state.
Improve logging.
Line length 100.

Change-Id: I8201c3ce0e53fd464fd33d02544e52c342d40b68
udioRecord.cpp
ea2839f133b989b770cc5f093aca4754e5523599 01-Mar-2013 Marco Nelissen <marcone@google.com> am c0048178: Merge "Avoid invalid memory access when using extractMetadata()"

* commit 'c0048178a1d312e7e05557ba99becd6a89b9e97a':
Avoid invalid memory access when using extractMetadata()
551bb75ae1bec8db8577febcf6faaa35a37947dc 01-Mar-2013 Marco Nelissen <marcone@google.com> am c0048178: Merge "Avoid invalid memory access when using extractMetadata()"

* commit 'c0048178a1d312e7e05557ba99becd6a89b9e97a':
Avoid invalid memory access when using extractMetadata()
c0048178a1d312e7e05557ba99becd6a89b9e97a 01-Mar-2013 Marco Nelissen <marcone@google.com> Merge "Avoid invalid memory access when using extractMetadata()"
1a76084dd8918533b00d76fbef15888742f752df 01-Mar-2013 Marco Nelissen <marcone@google.com> Merge "Avoid invalid memory access when using extractMetadata()"
d01c148195283d6bc68e2bd1486380f118d89e00 08-Feb-2013 Sangkyu Lee <sk82.lee@lge.com> Avoid invalid memory access when using extractMetadata()

BpMediaMetadataRetriever::extractMetadata() returns a string
which is returned by readCString() function of the reply parcel object.
However, the parcel object is destroyed at the end of the
extractMetadata() function, and so the returned pointer is invalid.
This patch fixes this problem by storing the metadata string value.

Change-Id: I2a2ccba78246175b2845a237679d6cebe881e83b
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
MediaMetadataRetriever.cpp
d72b2aa86e19644bbaa72039b3a3044390ba0ecd 08-Feb-2013 Sangkyu Lee <sk82.lee@lge.com> Avoid invalid memory access when using extractMetadata()

BpMediaMetadataRetriever::extractMetadata() returns a string
which is returned by readCString() function of the reply parcel object.
However, the parcel object is destroyed at the end of the
extractMetadata() function, and so the returned pointer is invalid.
This patch fixes this problem by storing the metadata string value.

Change-Id: I2a2ccba78246175b2845a237679d6cebe881e83b
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
MediaMetadataRetriever.cpp
ceb388d6c03c38b96dc41c0ea4804b749aa077c4 19-Feb-2013 Eino-Ville Talvala <etalvala@google.com> CameraService and Stagefright: Support AppOps

Camera:
- Signal to AppOpsService when camera usage starts and stops
- Listen to permissions revocations and act on them
- Currently just kill camera connection when permissions lost

Stagefright:
- Pass on client name, UID to camera as needed

Bug: 8181262
Change-Id: I9e33c9d05e9daa77dbb2d795045d08eb887ec8f0
MediaRecorder.cpp
ediarecorder.cpp
48af7e8dd40883d6154e7029d9500072b551b5fa 19-Feb-2013 Eino-Ville Talvala <etalvala@google.com> CameraService and Stagefright: Support AppOps

Camera:
- Signal to AppOpsService when camera usage starts and stops
- Listen to permissions revocations and act on them
- Currently just kill camera connection when permissions lost

Stagefright:
- Pass on client name, UID to camera as needed

Bug: 8181262
Change-Id: I9e33c9d05e9daa77dbb2d795045d08eb887ec8f0
MediaRecorder.cpp
ediarecorder.cpp
1a2952aee048ca7b1765e2bc09ebe9aeddaeafa3 15-Feb-2013 Mathias Agopian <mathias@google.com> Refactoring: Rename SurfaceTextureClient to Surface

Change-Id: I4e8a8b20914cb64edc37abe68233fbc9f2b5d830
ediaplayer.cpp
b1e7cd156ca3e1747374e0d20cdd1ce467210453 15-Feb-2013 Mathias Agopian <mathias@google.com> Refactoring: Rename SurfaceTextureClient to Surface

Change-Id: I4e8a8b20914cb64edc37abe68233fbc9f2b5d830
ediaplayer.cpp
272ab546940054ad7991bef4b3a36f15175721cd 05-Feb-2013 Jean-Michel Trivi <jmtrivi@google.com> Add support for querying if a stream is active remotely

Bug 7485803

Change-Id: I0744374f130fd2dd0714102354cffed2fa915361
udioSystem.cpp
AudioPolicyService.cpp
e336f9113bdd35119866a3c3f8008ca01c576660 05-Feb-2013 Jean-Michel Trivi <jmtrivi@google.com> Add support for querying if a stream is active remotely

Bug 7485803

Change-Id: I0744374f130fd2dd0714102354cffed2fa915361
udioSystem.cpp
AudioPolicyService.cpp
a416756864e2c7750d59d967ec2185532fa5c2e0 01-Feb-2013 Glenn Kasten <gkasten@google.com> Merge "Add media.log service based on NBLog"
0be9fe5864c39c11eefe335038cf6ce5473e4ec5 01-Feb-2013 Glenn Kasten <gkasten@google.com> Merge "Add media.log service based on NBLog"
a6a88d9c445e261972c2433254e0a996336e78a4 30-Jan-2013 Andreas Huber <andih@google.com> Plumbing to reflect minor changes in the HDCP module API that allow for

support of _decryption_ modules in addition to what we already supported.

Change-Id: Ic37b87dc170ba8def3817991d25df798f21e950b
HDCP.cpp
MediaPlayerService.cpp
279dcd89ab1d2de91dfe95e461412a0f577a6891 30-Jan-2013 Andreas Huber <andih@google.com> Plumbing to reflect minor changes in the HDCP module API that allow for

support of _decryption_ modules in addition to what we already supported.

Change-Id: Ic37b87dc170ba8def3817991d25df798f21e950b
HDCP.cpp
MediaPlayerService.cpp
6f1c1918d0dfece10f728711b055441e4d135c73 19-Jan-2013 Glenn Kasten <gkasten@google.com> Add media.log service based on NBLog

Change-Id: Ie45093df6ac9a739d05c8d408fab52a9a8a27e7f
ndroid.mk
MediaLogService.cpp
fdf4e4f1859771b95585cbc87f8cd038ea2815c6 19-Jan-2013 Glenn Kasten <gkasten@google.com> Add media.log service based on NBLog

Change-Id: Ie45093df6ac9a739d05c8d408fab52a9a8a27e7f
ndroid.mk
MediaLogService.cpp
2e4664677d72ce54201d3fd0beb0e10280add93c 10-Jan-2013 Glenn Kasten <gkasten@google.com> Fix AudioRecord

Bug: 7965744
Change-Id: Ic024e7fb32f7459b8093c2cf6cd5752aade21ddb
udioRecord.cpp
45490af027a15af9fe0fdfca21f423c74cd8e4e9 10-Jan-2013 Glenn Kasten <gkasten@google.com> Fix AudioRecord

Bug: 7965744
Change-Id: Ic024e7fb32f7459b8093c2cf6cd5752aade21ddb
udioRecord.cpp
9c6745f128648f6e0144b74ee593911a9fa10d51 30-Nov-2012 Glenn Kasten <gkasten@google.com> Propose new interpretation for setPosition and setLoop

Add new API getBufferPosition to return position relative
to start of fixed buffer.

Change-Id: I7aca8e392d45b988545f07b36b5032691057b03e
udioTrack.cpp
a589764c3c0617c7a8996e929ce2d6db1cc01d77 05-Jan-2013 Glenn Kasten <gkasten@google.com> Fix bug in AudioRecord() constructor

It was calling set() with wrong parameter list.
This goes back to commit be916aa1267e2e6b1c148f51d11bcbbc79cb864c from 2010.

Change-Id: I2f6917765baf58260bf35e89a2cc59c199734ff6
udioRecord.cpp
b438f008d958fbe3c1ef668822c128dfe5ce97ac 05-Jan-2013 Glenn Kasten <gkasten@google.com> Fix bug in AudioRecord() constructor

It was calling set() with wrong parameter list.
This goes back to commit be916aa1267e2e6b1c148f51d11bcbbc79cb864c from 2010.

Change-Id: I2f6917765baf58260bf35e89a2cc59c199734ff6
udioRecord.cpp
d5681bc9a38fe4cd1d591e6ae62b9c68fb851041 22-Dec-2012 Glenn Kasten <gkasten@google.com> Merge "Start isolating control block accesses in a proxy"
856ff4e4c3c43550f013e80277358fdf514342bf 22-Dec-2012 Glenn Kasten <gkasten@google.com> Merge "Start isolating control block accesses in a proxy"
49d24d3fcd01aef0ec1fa4abd9c1b85473f64c0f 21-Dec-2012 Glenn Kasten <gkasten@google.com> Merge "Remove unnecessary parameter"
5570227ac334479982a9dd8c1647c00f58f47c18 21-Dec-2012 Glenn Kasten <gkasten@google.com> Merge "Remove unnecessary parameter"
0fd58c9758d2083915864d3cc63df7495b497e52 20-Dec-2012 Glenn Kasten <gkasten@google.com> Merge "Fix bug with discarded AudioRecord::read count"
e30c14b48fb9c5f47802fce32a3a1115b374b357 20-Dec-2012 Glenn Kasten <gkasten@google.com> Merge "Fix bug with discarded AudioRecord::read count"
8d6cc842e8d525405c68e57fdf3bc5da0b4d7e87 03-Feb-2012 Glenn Kasten <gkasten@google.com> Remove unnecessary parameter

Just get the parameter on server side

Change-Id: I433a63104dbb257e0d862be2ab61847cb36d1c15
udioEffect.cpp
udioRecord.cpp
udioTrack.cpp
AudioFlinger.cpp
MediaPlayerService.cpp
ediametadataretriever.cpp
ediaplayer.cpp
ediarecorder.cpp
f37971f624164c3ed185d3f976404a6f60f49b9a 03-Feb-2012 Glenn Kasten <gkasten@google.com> Remove unnecessary parameter

Just get the parameter on server side

Change-Id: I433a63104dbb257e0d862be2ab61847cb36d1c15
udioEffect.cpp
udioRecord.cpp
udioTrack.cpp
AudioFlinger.cpp
MediaPlayerService.cpp
ediametadataretriever.cpp
ediaplayer.cpp
ediarecorder.cpp
8ba01021b573889802e67e029225a96f0dfa471a 18-Dec-2012 Andy McFadden <fadden@android.com> Rename ISurfaceTexture and SurfaceTexture

The C++ class names don't match what the classes do, so rename
ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to
GLConsumer.

Bug 7736700

Change-Id: I64520a55f8c09fe6215382ea361c539a9940cba5
MediaPlayer.cpp
MediaRecorder.cpp
RemoteDisplayClient.cpp
ediaplayer.cpp
ediarecorder.cpp
484566c410afdfbc4b6bc5aa1732aef37428a5b8 18-Dec-2012 Andy McFadden <fadden@android.com> Rename ISurfaceTexture and SurfaceTexture

The C++ class names don't match what the classes do, so rename
ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to
GLConsumer.

Bug 7736700

Change-Id: I64520a55f8c09fe6215382ea361c539a9940cba5
MediaPlayer.cpp
MediaRecorder.cpp
RemoteDisplayClient.cpp
ediaplayer.cpp
ediarecorder.cpp
89b629b398e87095cf262692f4e476d605fe87ed 17-Dec-2012 Glenn Kasten <gkasten@google.com> Fix bug with discarded AudioRecord::read count

Formerly, if an AudioRecord::read() got a timeout on obtainBuffer()
after already successfully transferring some data, then it returned zero.
This had the effect of discarding a partial transfer, which resulted in
a gap in the audio data delivered to the app. Now if a timeout occurs
after a partial transfer, it returns that partial transfer count so that
no data is lost.

Change-Id: I0d9c2f4e495a400b56ef916a06613ba26537ca97
udioRecord.cpp
74b8adfbec4b34da7904de544f1e549e21a90426 17-Dec-2012 Glenn Kasten <gkasten@google.com> Fix bug with discarded AudioRecord::read count

Formerly, if an AudioRecord::read() got a timeout on obtainBuffer()
after already successfully transferring some data, then it returned zero.
This had the effect of discarding a partial transfer, which resulted in
a gap in the audio data delivered to the app. Now if a timeout occurs
after a partial transfer, it returns that partial transfer count so that
no data is lost.

Change-Id: I0d9c2f4e495a400b56ef916a06613ba26537ca97
udioRecord.cpp
e3aa659e9cee7df5c12a80d285cc29ab3b2cbb39 04-Dec-2012 Glenn Kasten <gkasten@google.com> Start isolating control block accesses in a proxy

The proxy object will eventually be the only code that understands the
details of the control block. This should make it easier to change the
control block in the future.

Initial set of control block fields that are isolated:
- sample rate
- send level
- volume

Prepare for streaming/static separation by adding a union to the control
block for the new fields.

Fix bug in handling of max sample rate on a track. It was only checking
at re-configuration, not at each mix.

Simplify OutputTrack::obtainBuffer.

Change-Id: I2249f9d04f73a911a922ad1d7f6197292c74cd92
udioRecord.cpp
udioTrack.cpp
udioTrackShared.cpp
552f274d82fb4988fb972df69134e031d375abfe 04-Dec-2012 Glenn Kasten <gkasten@google.com> Start isolating control block accesses in a proxy

The proxy object will eventually be the only code that understands the
details of the control block. This should make it easier to change the
control block in the future.

Initial set of control block fields that are isolated:
- sample rate
- send level
- volume

Prepare for streaming/static separation by adding a union to the control
block for the new fields.

Fix bug in handling of max sample rate on a track. It was only checking
at re-configuration, not at each mix.

Simplify OutputTrack::obtainBuffer.

Change-Id: I2249f9d04f73a911a922ad1d7f6197292c74cd92
udioRecord.cpp
udioTrack.cpp
udioTrackShared.cpp
a8190fc518b6769257896605f3aee091aeb60b50 04-Dec-2012 Glenn Kasten <gkasten@google.com> Split off the current control block to separate file

Prepare for a new implementation of step() etc.

Change-Id: I268421976ba577aa1fb5d7015de5441c05861190
ndroid.mk
udioTrack.cpp
udioTrackShared.cpp
e6106dff611a0056495719c62e0c92abd9afe4c1 04-Dec-2012 Glenn Kasten <gkasten@google.com> Split off the current control block to separate file

Prepare for a new implementation of step() etc.

Change-Id: I268421976ba577aa1fb5d7015de5441c05861190
ndroid.mk
udioTrack.cpp
udioTrackShared.cpp
083d1c1492d496960d5b28f4664ff02101736677 01-Dec-2012 Glenn Kasten <gkasten@google.com> Emphasize distinction between streaming and static

Update comments and improve error checks to match

Change-Id: I7370d6e59a7ef26dfb284a8b058d5ab2e0a42ccf
udioTrack.cpp
8f7453f6770070f4789cb769bd2b6a3eabad7d68 01-Dec-2012 Glenn Kasten <gkasten@google.com> Emphasize distinction between streaming and static

Update comments and improve error checks to match

Change-Id: I7370d6e59a7ef26dfb284a8b058d5ab2e0a42ccf
udioTrack.cpp
4bae3649d504d590a546717a8e49f96a30d9a745 30-Nov-2012 Glenn Kasten <gkasten@google.com> flush() comments and checks

flush() is only useful for streaming mode.
It is a no-op if track is active or uses a static buffer.

Change-Id: I918ac181ffae3d16a0d67d8a7208f4aec61b5bd6
udioTrack.cpp
ec7dcac79c121ef015ee237891a5c90e67a977ab 30-Nov-2012 Glenn Kasten <gkasten@google.com> flush() comments and checks

flush() is only useful for streaming mode.
It is a no-op if track is active or uses a static buffer.

Change-Id: I918ac181ffae3d16a0d67d8a7208f4aec61b5bd6
udioTrack.cpp
e4756fe3a387615acb63c6a05788c8db9b5786cb 29-Nov-2012 Glenn Kasten <gkasten@google.com> AudioTrack::mute() is unused so remove it

If ever needed again, it could be implemented on client side by forcing
a track volume of 0.

Change-Id: I88a9b4f675b6dca2948549414f9ec2c192d29269
udioTrack.cpp
AudioTrack.cpp
4b3a49e3a9ced6e63adab08acc5b720f8feddefa 29-Nov-2012 Glenn Kasten <gkasten@google.com> AudioTrack::mute() is unused so remove it

If ever needed again, it could be implemented on client side by forcing
a track volume of 0.

Change-Id: I88a9b4f675b6dca2948549414f9ec2c192d29269
udioTrack.cpp
AudioTrack.cpp
391f1bb93d5720bfe1a025307178b3208a3ce7d7 03-Dec-2012 Glenn Kasten <gkasten@google.com> Merge "AudioTrack inline short const methods"
9862e8f3ba69c46efbafdc8438bd88848a9d55da 03-Dec-2012 Glenn Kasten <gkasten@google.com> Merge "AudioTrack inline short const methods"
01437b7cdaecf53acb46b50ff8b5d86b9d36eb20 29-Nov-2012 Glenn Kasten <gkasten@google.com> AudioTrack inline short const methods

Change-Id: I142917edb454d510bbe545e94e6eaea30b650fae
udioTrack.cpp
ab5bfb15f63887f999f11239e12d78a7babcd112 29-Nov-2012 Glenn Kasten <gkasten@google.com> AudioTrack inline short const methods

Change-Id: I142917edb454d510bbe545e94e6eaea30b650fae
udioTrack.cpp
5876f2f28f31c1bd99864ba3bb1590e3d6765018 30-Nov-2012 Glenn Kasten <gkasten@google.com> Remove last bits of IAudioFlinger::channel_count

Change-Id: I9e13678e0aa32a86eb27367a4aff4b32b8aec8cc
AudioFlinger.cpp
217916f47c77870200856941480b5861ac7e2424 30-Nov-2012 Glenn Kasten <gkasten@google.com> Remove last bits of IAudioFlinger::channel_count

Change-Id: I9e13678e0aa32a86eb27367a4aff4b32b8aec8cc
AudioFlinger.cpp
37a9e8e13bcc9ac614c1b733ec2c66764c29679a 29-Nov-2012 Andreas Huber <andih@google.com> am 2f6107ec: am b64def9a: Merge "[wfd] Support a low(er) power state by triggering PAUSE/RESUME." into jb-mr1.1-dev

* commit '2f6107ec8e67eea1f73b9558a5ad34caec52867f':
[wfd] Support a low(er) power state by triggering PAUSE/RESUME.
f59ab0eb162cc32df4fc0af8d1a4500c5bce3ecc 29-Nov-2012 Andreas Huber <andih@google.com> am 2f6107ec: am b64def9a: Merge "[wfd] Support a low(er) power state by triggering PAUSE/RESUME." into jb-mr1.1-dev

* commit '2f6107ec8e67eea1f73b9558a5ad34caec52867f':
[wfd] Support a low(er) power state by triggering PAUSE/RESUME.
2f6107ec8e67eea1f73b9558a5ad34caec52867f 29-Nov-2012 Andreas Huber <andih@google.com> am b64def9a: Merge "[wfd] Support a low(er) power state by triggering PAUSE/RESUME." into jb-mr1.1-dev

* commit 'b64def9a555bfbf533a2da41ba0189b9842a76fb':
[wfd] Support a low(er) power state by triggering PAUSE/RESUME.
53faa7ee457eb9b27be1fd814e42ffe43c8520a0 29-Nov-2012 Andreas Huber <andih@google.com> am b64def9a: Merge "[wfd] Support a low(er) power state by triggering PAUSE/RESUME." into jb-mr1.1-dev

* commit 'b64def9a555bfbf533a2da41ba0189b9842a76fb':
[wfd] Support a low(er) power state by triggering PAUSE/RESUME.
5131d127a042ee88f903370be88845dc8c9f8578 16-Nov-2012 Andreas Huber <andih@google.com> [wfd] Support a low(er) power state by triggering PAUSE/RESUME.

Change-Id: Ibe42bfa73816bbfeb7e652d435254d0171b89727
related-to-bug: 7638150
RemoteDisplay.cpp
bf4950aa265ec7b54777d122b27037461638af0f 16-Nov-2012 Andreas Huber <andih@google.com> [wfd] Support a low(er) power state by triggering PAUSE/RESUME.

Change-Id: Ibe42bfa73816bbfeb7e652d435254d0171b89727
related-to-bug: 7638150
RemoteDisplay.cpp
2546219a54970e0ad53bd218586cdc48d6039b20 28-Nov-2012 Andreas Huber <andih@google.com> am 7b7f17dc: am b7c8e918: Add support for HLS playlists of type \'event\'.

* commit '7b7f17dc9b30ff4ecdf0aea9bcfa1c518d4ac1e7':
Add support for HLS playlists of type 'event'.
1bfcf04b27bdd5320ab70b74285b855380e83f26 28-Nov-2012 Andreas Huber <andih@google.com> am 7b7f17dc: am b7c8e918: Add support for HLS playlists of type \'event\'.

* commit '7b7f17dc9b30ff4ecdf0aea9bcfa1c518d4ac1e7':
Add support for HLS playlists of type 'event'.
7b7f17dc9b30ff4ecdf0aea9bcfa1c518d4ac1e7 28-Nov-2012 Andreas Huber <andih@google.com> am b7c8e918: Add support for HLS playlists of type \'event\'.

* commit 'b7c8e91880463ff4981e3e53e98e45d68e2fe374':
Add support for HLS playlists of type 'event'.
61c195615176903bb077a10d6b88ba112fefa250 28-Nov-2012 Andreas Huber <andih@google.com> am b7c8e918: Add support for HLS playlists of type \'event\'.

* commit 'b7c8e91880463ff4981e3e53e98e45d68e2fe374':
Add support for HLS playlists of type 'event'.
b7c8e91880463ff4981e3e53e98e45d68e2fe374 28-Nov-2012 Andreas Huber <andih@google.com> Add support for HLS playlists of type 'event'.

related-to-bug: 6870049

Squashed commit of the following:

commit eee2f3ba6bb7335f4e285632726db85645669929
Author: Andreas Huber <andih@google.com>
Date: Tue Nov 27 15:02:01 2012 -0800

Make everything a lot less verbose by default.

Change-Id: I884d7a7901aa1e7d4ff590f065ca57a79d2af8b3

commit 6bbdb837ed5bd88008e45efb8faf595e4051ba26
Author: Andreas Huber <andih@google.com>
Date: Tue Nov 27 14:34:46 2012 -0800

HLS now properly signals media time changes at discontinuities including

the start of playback (which may not necessarily be at time 0 if the playlist
is of type 'event' and hasn't completed yet).

Change-Id: I5ab747d024f9b8d0df72a4e06a12ebb29f62802e

commit 1555589832b1878a144a976a643e1af4d61f877c
Author: Andreas Huber <andih@google.com>
Date: Tue Nov 27 14:32:28 2012 -0800

As part of a time discontinuity, clients of IStreamListener can now

signal the corresponding media time after the discontinuity, i.e. the first PTS
timestamp following the discontinuity will be considered equivalent to the
specified media time and media buffers timestamped accordingly.

Change-Id: Id7db7679b7faa6efd6270620ff52e34e884f3e92

commit 5c24c605c073a11c426d025b1e7478fc1ad8365a
Author: Andreas Huber <andih@google.com>
Date: Tue Nov 27 13:00:56 2012 -0800

NuPlayer sources now expose flags() and can announce

that duration may change (increase) dynamically, in which case duration
will be polled at 1 second intervals and communicated to the upper layers.

Change-Id: I45102909b7a19eed0dda576747e3814d742a0eea

commit ecb71de8e281e61971a2cd73e7161a97540bc357
Author: Andreas Huber <andih@google.com>
Date: Tue Nov 27 12:57:47 2012 -0800

Stop caching duration in MediaPlayer, duration could increase dynamically.

Change-Id: I7bb2f16c0abe49debdf45c776d2266aa069d7791

commit 544aec5823e6d7a3e97e15b6b23546616bcd343e
Author: Andreas Huber <andih@google.com>
Date: Tue Nov 27 08:46:28 2012 -0800

An attempt to add support for "event" style HLS playlists.

Change-Id: I3dfb2e801ecaff8f5d8bdb3a4fca1b18aeeb2c60

Change-Id: I48cf7f65a654d33f2f49ded74f8be22aed9e3b98
StreamSource.cpp
ediaplayer.cpp
a4c5bc0f18fe272146426ab2eccad6215279c9f3 28-Nov-2012 Andreas Huber <andih@google.com> Add support for HLS playlists of type 'event'.

related-to-bug: 6870049

Squashed commit of the following:

commit eee2f3ba6bb7335f4e285632726db85645669929
Author: Andreas Huber <andih@google.com>
Date: Tue Nov 27 15:02:01 2012 -0800

Make everything a lot less verbose by default.

Change-Id: I884d7a7901aa1e7d4ff590f065ca57a79d2af8b3

commit 6bbdb837ed5bd88008e45efb8faf595e4051ba26
Author: Andreas Huber <andih@google.com>
Date: Tue Nov 27 14:34:46 2012 -0800

HLS now properly signals media time changes at discontinuities including

the start of playback (which may not necessarily be at time 0 if the playlist
is of type 'event' and hasn't completed yet).

Change-Id: I5ab747d024f9b8d0df72a4e06a12ebb29f62802e

commit 1555589832b1878a144a976a643e1af4d61f877c
Author: Andreas Huber <andih@google.com>
Date: Tue Nov 27 14:32:28 2012 -0800

As part of a time discontinuity, clients of IStreamListener can now

signal the corresponding media time after the discontinuity, i.e. the first PTS
timestamp following the discontinuity will be considered equivalent to the
specified media time and media buffers timestamped accordingly.

Change-Id: Id7db7679b7faa6efd6270620ff52e34e884f3e92

commit 5c24c605c073a11c426d025b1e7478fc1ad8365a
Author: Andreas Huber <andih@google.com>
Date: Tue Nov 27 13:00:56 2012 -0800

NuPlayer sources now expose flags() and can announce

that duration may change (increase) dynamically, in which case duration
will be polled at 1 second intervals and communicated to the upper layers.

Change-Id: I45102909b7a19eed0dda576747e3814d742a0eea

commit ecb71de8e281e61971a2cd73e7161a97540bc357
Author: Andreas Huber <andih@google.com>
Date: Tue Nov 27 12:57:47 2012 -0800

Stop caching duration in MediaPlayer, duration could increase dynamically.

Change-Id: I7bb2f16c0abe49debdf45c776d2266aa069d7791

commit 544aec5823e6d7a3e97e15b6b23546616bcd343e
Author: Andreas Huber <andih@google.com>
Date: Tue Nov 27 08:46:28 2012 -0800

An attempt to add support for "event" style HLS playlists.

Change-Id: I3dfb2e801ecaff8f5d8bdb3a4fca1b18aeeb2c60

Change-Id: I48cf7f65a654d33f2f49ded74f8be22aed9e3b98
StreamSource.cpp
ediaplayer.cpp
2b691b90507ec45a98636a855c46de5dbe27c84a 11-Oct-2012 Zbigniew Mazur <zbigniew.mazur@sonyericsson.com> AudioTrack::dump null mCblk check test

This fix is protecting AudioTrack::dump from SIGSEGEV
when calling dumpsys shell command.

Change-Id: I30d136e195a12d6fdad41e14f557b0ad9e59b8a2
udioTrack.cpp
3ac30b696d8f3ae2c6ee87d58acfd71db7c2e808 11-Oct-2012 Zbigniew Mazur <zbigniew.mazur@sonyericsson.com> AudioTrack::dump null mCblk check test

This fix is protecting AudioTrack::dump from SIGSEGEV
when calling dumpsys shell command.

Change-Id: I30d136e195a12d6fdad41e14f557b0ad9e59b8a2
udioTrack.cpp
4d9cef6c007afd195a8f36d35d46b359bf909331 19-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Clean up channel count and channel mask"
a81a88597138de226da88fe10456d46289107e8a 19-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Clean up channel count and channel mask"
a42ff007a17d63df22c60dd5e5fd811ee45ca1b3 14-Nov-2012 Glenn Kasten <gkasten@google.com> Clean up channel count and channel mask

Channel count is uint32_t.
Remove redundant mask parameter to AudioTrack::createTrack_l()
and AudioRecord::openRecord_l().

Change-Id: I5dc2b18eb609b2c0dc3091994cbaa4628062c17f
udioRecord.cpp
udioTrack.cpp
c45128af9231a6e26c4deef798b79e74e4fad904 14-Nov-2012 Glenn Kasten <gkasten@google.com> Clean up channel count and channel mask

Channel count is uint32_t.
Remove redundant mask parameter to AudioTrack::createTrack_l()
and AudioRecord::openRecord_l().

Change-Id: I5dc2b18eb609b2c0dc3091994cbaa4628062c17f
udioRecord.cpp
udioTrack.cpp
a6b47a17fb1288936b491f30cd751172a572df5c 19-Nov-2012 Marco Nelissen <marcone@google.com> delete -> free

Strings duplicated with strdup() should be free()d, not deleted.

Change-Id: I42bb3df9625bb8d35f80b02d15364b94c36496f8
oundPool.cpp
40b13798d735429d1f00d8a89113e9ab2ef88fca 19-Nov-2012 Marco Nelissen <marcone@google.com> delete -> free

Strings duplicated with strdup() should be free()d, not deleted.

Change-Id: I42bb3df9625bb8d35f80b02d15364b94c36496f8
oundPool.cpp
aa25c0321bd4b9eb46a4d1cb4ac5fa47af30eeb4 17-Nov-2012 Glenn Kasten <gkasten@google.com> Merge ""if" statements use curly braces per media style"
7aeff3f2197de81271c3e5547486f3407be56182 17-Nov-2012 Glenn Kasten <gkasten@google.com> Merge ""if" statements use curly braces per media style"
77035d10a740914313500811b31a90ab948bd267 17-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Fix time vs. bytes units bug in getRenderPosition"
645f38376b042759ee3cfe78b7e97a6867b65814 17-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Fix time vs. bytes units bug in getRenderPosition"
67ba2b6b8018ce7556cdd880dbf28d06a92ebb78 17-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Don't use control block frame count after create"
0dec3d6af5ad8783149134e594aadbe5dc339b4d 17-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Don't use control block frame count after create"
b603744e96b07b1d5bf745bde593fb2c025cefcf 14-Nov-2012 Glenn Kasten <gkasten@google.com> Don't use control block frame count after create

This is part of a series to clean up the control block.

Change-Id: I7f4cb05aef63053f8e2ab05b286d302260ef4758
udioRecord.cpp
udioTrack.cpp
d7101432aa28f18b1510d9c186a27eecbeba46b2 14-Nov-2012 Glenn Kasten <gkasten@google.com> Don't use control block frame count after create

This is part of a series to clean up the control block.

Change-Id: I7f4cb05aef63053f8e2ab05b286d302260ef4758
udioRecord.cpp
udioTrack.cpp
d65d73c4ae74d084751b417615a78cbe7a51372a 23-Jun-2012 Glenn Kasten <gkasten@google.com> "if" statements use curly braces per media style

Change-Id: I130e7849fd1da7a0b7fe56c3c53919d26e3843b8
udioRecord.cpp
udioTrack.cpp
a204922b4c04633a4e9896db3c40763bcf921ade 23-Jun-2012 Glenn Kasten <gkasten@google.com> "if" statements use curly braces per media style

Change-Id: I130e7849fd1da7a0b7fe56c3c53919d26e3843b8
udioRecord.cpp
udioTrack.cpp
827e5f1237757aee78b677efcf0f7c44fd0dd3d8 02-Nov-2012 Glenn Kasten <gkasten@google.com> Don't explicitly log tid

If needed, it can be obtained with adb logcat -v threadtime

Change-Id: I91b3911d20f7bcfc3361db4052db21ff9181f1cf
udioTrack.cpp
411e447c4b90298f5ff635429c53f94fbce4fff9 02-Nov-2012 Glenn Kasten <gkasten@google.com> Don't explicitly log tid

If needed, it can be obtained with adb logcat -v threadtime

Change-Id: I91b3911d20f7bcfc3361db4052db21ff9181f1cf
udioTrack.cpp
26c77556efc30800466b60b3975bc35a70c8c28b 16-Nov-2012 Glenn Kasten <gkasten@google.com> Fix time vs. bytes units bug in getRenderPosition

Rename correctLatency since it requires thread to be locked.
Use size_t for byte and frame counts.

Change-Id: I178fdd18bdb823813b9563927bdff8c0d28ca5a5
AudioFlinger.cpp
b59a5026ecdb3dc283c448e5bbd51b1c6d42b946 16-Nov-2012 Glenn Kasten <gkasten@google.com> Fix time vs. bytes units bug in getRenderPosition

Rename correctLatency since it requires thread to be locked.
Use size_t for byte and frame counts.

Change-Id: I178fdd18bdb823813b9563927bdff8c0d28ca5a5
AudioFlinger.cpp
e33054eb968cbf8ccaee1b0ff0301403902deed6 14-Nov-2012 Glenn Kasten <gkasten@google.com> Use size_t for frame counts

Also fix typo: bufferCount should be frameCount.

Change-Id: Ibed539504db75ef99dc21c8ff1bf2987122063a5
udioRecord.cpp
udioSystem.cpp
udioTrack.cpp
AudioFlinger.cpp
oundPool.cpp
7da35f231725aa6e0b2ac8714a7d66471368df77 14-Nov-2012 Glenn Kasten <gkasten@google.com> Use size_t for frame counts

Also fix typo: bufferCount should be frameCount.

Change-Id: Ibed539504db75ef99dc21c8ff1bf2987122063a5
udioRecord.cpp
udioSystem.cpp
udioTrack.cpp
AudioFlinger.cpp
oundPool.cpp
60a839204713e0f8258d082af83262b1eb33a6c3 21-Jun-2012 Glenn Kasten <gkasten@google.com> Clean up frame size in AudioTrack and AudioFlinger

TrackBase::mFrameSize, mChannelMask, and mChannelCount are now const.
Use TrackBase::mFrameSize instead of re-calculating frame size.
AudioFlinger only sees 16-bit PCM format, conversion from 8-bit is
now entirely on the client side. Previously a small part of the
responsibility was on server side also.
size_t is unsigned, so use %u in logs.
Fix theoretical bug where TrackBase constructor was over-allocating space
for non-linear AudioTrack or 8-bit PCM AudioRecord (probably benign).

Change-Id: I7cbbba0bf4dba29ea751d8af341ab8e5cbbdc206
udioTrack.cpp
520a9af9438c29b24e328dd2b7a287c7a96a4e6b 21-Jun-2012 Glenn Kasten <gkasten@google.com> Clean up frame size in AudioTrack and AudioFlinger

TrackBase::mFrameSize, mChannelMask, and mChannelCount are now const.
Use TrackBase::mFrameSize instead of re-calculating frame size.
AudioFlinger only sees 16-bit PCM format, conversion from 8-bit is
now entirely on the client side. Previously a small part of the
responsibility was on server side also.
size_t is unsigned, so use %u in logs.
Fix theoretical bug where TrackBase constructor was over-allocating space
for non-linear AudioTrack or 8-bit PCM AudioRecord (probably benign).

Change-Id: I7cbbba0bf4dba29ea751d8af341ab8e5cbbdc206
udioTrack.cpp
3b16c766d1ae2cfd8487e8ffb2b23936fc0a8e17 14-Nov-2012 Glenn Kasten <gkasten@google.com> Use uint32_t for sample rate

Change-Id: Ie240b48fb54b08359f69ecd4e5f8bda3d15cbe80
udioRecord.cpp
udioSystem.cpp
udioTrack.cpp
AudioFlinger.cpp
oundPool.cpp
1127d65d536ebbe447ee17ce0926a7ce4a2a3c08 14-Nov-2012 Glenn Kasten <gkasten@google.com> Use uint32_t for sample rate

Change-Id: Ie240b48fb54b08359f69ecd4e5f8bda3d15cbe80
udioRecord.cpp
udioSystem.cpp
udioTrack.cpp
AudioFlinger.cpp
oundPool.cpp
b4a17e834b718eff1ba2eac4232de6e73a4bf9f5 15-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Update audio comments"
1513ad2d2de0962cc3b3121e6fae73d8ee1a4639 15-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Update audio comments"
6d92e415c6551d881429151c1902d301a7bf7cf0 15-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Remove deprecated AudioSystem methods"
8f1c74943c454fec3f1adf87312c4a4c89829d90 15-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Remove deprecated AudioSystem methods"
22eb4e239fbe9103568147d566d7482e480350b8 07-Nov-2012 Glenn Kasten <gkasten@google.com> Update audio comments

Change-Id: I85d7d2f6381b251db5695202fec75128883a8662
udioTrack.cpp
020f79fd967736d36c7ec860814e2e93866a020f 07-Nov-2012 Glenn Kasten <gkasten@google.com> Update audio comments

Change-Id: I85d7d2f6381b251db5695202fec75128883a8662
udioTrack.cpp
b26e3e9f2ab0334bff21a4fa4851dbf6e57fba5d 14-Nov-2012 Glenn Kasten <gkasten@google.com> Fix build warnings

Change-Id: Ic43bcca166a529a6431711b05a7fa21849b6a38b
AudioFlinger.cpp
98d9922247ef21b0faf8c7d817650b8327052a4a 14-Nov-2012 Glenn Kasten <gkasten@google.com> Fix build warnings

Change-Id: Ic43bcca166a529a6431711b05a7fa21849b6a38b
AudioFlinger.cpp
a552d6049ccf674b083d011ce7b8a443a9cd68a4 14-Nov-2012 Glenn Kasten <gkasten@google.com> Remove deprecated AudioSystem methods

Change-Id: I952d504e03af9a1d3e1e0aa379c82dfb00197d9f
udioSystem.cpp
f6fd99cc07deb0fa4f3e8fc278836bd90649964f 14-Nov-2012 Glenn Kasten <gkasten@google.com> Remove deprecated AudioSystem methods

Change-Id: I952d504e03af9a1d3e1e0aa379c82dfb00197d9f
udioSystem.cpp
b36a7a68af073b1e7fd5cad6aa2c52223fd30efd 13-Nov-2012 Glenn Kasten <gkasten@google.com> Simplify AudioRecord::restoreTrack_l()

Finish removing CBLK_RESTORING and CBLK_RESTORED from control block flags,
and remove constant RESTORE_TIMEOUT_MS.

Also minor cleanup:
- Cache mCblk in local variable cblk and make cblk allocatable in a register.
- Use "iMem" for sp<IMemory>.
- Add missing error log to AudioRecord; it was already in AudioTrack.

This is part of a series to clean up the control block.

Change-Id: Ia5f5ab4763c392bc06a45851b167ddaee29e3455
udioRecord.cpp
55186024431cda03aa4a9960a1c90b6954412e98 13-Nov-2012 Glenn Kasten <gkasten@google.com> Simplify AudioRecord::restoreTrack_l()

Finish removing CBLK_RESTORING and CBLK_RESTORED from control block flags,
and remove constant RESTORE_TIMEOUT_MS.

Also minor cleanup:
- Cache mCblk in local variable cblk and make cblk allocatable in a register.
- Use "iMem" for sp<IMemory>.
- Add missing error log to AudioRecord; it was already in AudioTrack.

This is part of a series to clean up the control block.

Change-Id: Ia5f5ab4763c392bc06a45851b167ddaee29e3455
udioRecord.cpp
83a0382dc17364567667a4e6135db43f5bd92efc 12-Nov-2012 Glenn Kasten <gkasten@google.com> Move frame size out of the control block

This is part of a series to clean up the control block.

Change-Id: Ifab1c42ac0f8be704e571b292713cd2250d12a3f
udioRecord.cpp
udioTrack.cpp
5aab59a2bd0a2cd80240ffd66c1b963b5fe06d65 12-Nov-2012 Glenn Kasten <gkasten@google.com> Move frame size out of the control block

This is part of a series to clean up the control block.

Change-Id: Ifab1c42ac0f8be704e571b292713cd2250d12a3f
udioRecord.cpp
udioTrack.cpp
bc0f6b92bba33ca9c2e76f2a520d290f055da6b2 12-Nov-2012 Glenn Kasten <gkasten@google.com> Fix regression for AudioTrack::write() 8-bit PCM

Bug: 7526532
Change-Id: I8ddd1f0e9d035b54401788dcc422591281dcd97a
udioTrack.cpp
9c6c02eb5badf4ffcd44fc88f2587def2fd628b6 12-Nov-2012 Glenn Kasten <gkasten@google.com> Fix regression for AudioTrack::write() 8-bit PCM

Bug: 7526532
Change-Id: I8ddd1f0e9d035b54401788dcc422591281dcd97a
udioTrack.cpp
b929e417853694e37aba1ef4399f188987b709d9 08-Nov-2012 Glenn Kasten <gkasten@google.com> Move buffers pointer out of the control block

This is part of a series to clean up the control block.

Change-Id: Ie474557db7cb360f2d9a0f11600a68f5a3d46f07
udioRecord.cpp
udioTrack.cpp
2f6226ad7a3fa81dc102001fbc1d1288e55a0947 08-Nov-2012 Glenn Kasten <gkasten@google.com> Move buffers pointer out of the control block

This is part of a series to clean up the control block.

Change-Id: Ie474557db7cb360f2d9a0f11600a68f5a3d46f07
udioRecord.cpp
udioTrack.cpp
a47f3165f53c8e8fb8907a94de7417e2c3047eeb 07-Nov-2012 Glenn Kasten <gkasten@google.com> Simplify AudioTrack::restoreTrack_l()

Remove CBLK_RESTORING and CBLK_RESTORED from control block flags,
for AudioTrack only. They are still used by AudioRecord.

This is part of a series to clean up the control block.

Change-Id: Iae4798f5b527c492bdaf789987ff3a1dadd0cb37
udioTrack.cpp
e0461d1d47c3e3cac625ce062b641519da37ba94 07-Nov-2012 Glenn Kasten <gkasten@google.com> Simplify AudioTrack::restoreTrack_l()

Remove CBLK_RESTORING and CBLK_RESTORED from control block flags,
for AudioTrack only. They are still used by AudioRecord.

This is part of a series to clean up the control block.

Change-Id: Iae4798f5b527c492bdaf789987ff3a1dadd0cb37
udioTrack.cpp
659004c2949620d8adb29e1d950a2dd1c75ba9a9 08-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Add all-channel AudioTrack::setVolume() API"
1ec74dab269d21535a89d058da82a7d28aacbb12 08-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Add all-channel AudioTrack::setVolume() API"
755e8e1dcf36f282b727ff22d87d3c2fac70d30a 08-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Fix call to restoreTrack_l() without lock held"
4f3ebe4090a3be3bb7622cc01b2f9af476914798 08-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Fix call to restoreTrack_l() without lock held"
d5ed6e88a9bea1879e41d7defaf1edea7c09f554 02-Nov-2012 Glenn Kasten <gkasten@google.com> Fix call to restoreTrack_l() without lock held

Also document lock order

Change-Id: I2c1f273a0a51fa79ee3dd766de8d23083e270051
udioTrack.cpp
a96bd95dcfe886436652debbda77ceb634729da0 02-Nov-2012 Glenn Kasten <gkasten@google.com> Fix call to restoreTrack_l() without lock held

Also document lock order

Change-Id: I2c1f273a0a51fa79ee3dd766de8d23083e270051
udioTrack.cpp
864585df53eb97c31e77b3ad7c0d89e4f9b42588 07-Nov-2012 Glenn Kasten <gkasten@google.com> Remove CBLK_DIRECTION from control block flags

This is part of a series to clean up the control block.

Change-Id: I0265fece3247356b585d4d48fbda6f37aea8a851
udioRecord.cpp
udioTrack.cpp
ba85098eb31bd2637db49816f0591361211024f2 07-Nov-2012 Glenn Kasten <gkasten@google.com> Remove CBLK_DIRECTION from control block flags

This is part of a series to clean up the control block.

Change-Id: I0265fece3247356b585d4d48fbda6f37aea8a851
udioRecord.cpp
udioTrack.cpp
8fa3ad0e4c77f7868348ad2a4cacc34c34e7c39e 07-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Remove CBLK_FAST from control block flags"
891b11da870ad3f860c1d2610ef4d8836ed6c590 07-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Remove CBLK_FAST from control block flags"
9d91e2a52b74380dae2662c8c00477c013b83c2c 07-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Remove unused fields in AudioTrack::Buffer"
b2800e8f1360cbc3c5af2bea228b9622b1ddc9dd 07-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Remove unused fields in AudioTrack::Buffer"
e0b07179a48ee50fda931d2aa1b3c751d167e4d7 07-Nov-2012 Glenn Kasten <gkasten@google.com> Remove CBLK_FAST from control block flags

This is part of a series to clean up the control block.

Change-Id: Ic881a3560d9547cb63fcc0cefec87aa3da480e0d
udioTrack.cpp
AudioFlinger.cpp
c26741598a840f7c1d12ee457fb26f68fcdbcc70 07-Nov-2012 Glenn Kasten <gkasten@google.com> Remove CBLK_FAST from control block flags

This is part of a series to clean up the control block.

Change-Id: Ic881a3560d9547cb63fcc0cefec87aa3da480e0d
udioTrack.cpp
AudioFlinger.cpp
05d499958e4030938ed77a924ebdd9899f36752e 06-Nov-2012 Glenn Kasten <gkasten@google.com> Remove unused fields in AudioTrack::Buffer

Change-Id: Iab75f6e2348d8b6d1f3cec95aeb3fcd5135dfb50
udioTrack.cpp
8424361609e0a94b9a240b43920529a84a63ed15 06-Nov-2012 Glenn Kasten <gkasten@google.com> Remove unused fields in AudioTrack::Buffer

Change-Id: Iab75f6e2348d8b6d1f3cec95aeb3fcd5135dfb50
udioTrack.cpp
26ba972eafde73a26271ecf027a1d5988ce50eb8 22-Jun-2012 Glenn Kasten <gkasten@google.com> Removed unused fields in AudioRecord::Buffer

Change-Id: I89fc6d8f695b48516d956b0a9a4a43d408f369f9
udioRecord.cpp
6608582c5fc4dc4041d18d0e619fb3042380607b 22-Jun-2012 Glenn Kasten <gkasten@google.com> Removed unused fields in AudioRecord::Buffer

Change-Id: I89fc6d8f695b48516d956b0a9a4a43d408f369f9
udioRecord.cpp
d2c38fc4d5dc742d7441444316849510dd2b7363 01-Nov-2012 Glenn Kasten <gkasten@google.com> Cache mCblk in local variable cblk

Use "iMem" for sp<IMemory>

Change-Id: I2f1fbbc517fbd77cfc92f6c3b1f253c26bae93b0
udioTrack.cpp
c9f872e69889d0cffd1a7d74fe2a84f92368e1ff 01-Nov-2012 Glenn Kasten <gkasten@google.com> Cache mCblk in local variable cblk

Use "iMem" for sp<IMemory>

Change-Id: I2f1fbbc517fbd77cfc92f6c3b1f253c26bae93b0
udioTrack.cpp
8e825a57202ce6cb2ddac67683ee5885334ce75d 06-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Simplify control block flag names"
fda32926cfbdad0aae5a3e0bf88b2a218f9e7f6c 06-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Simplify control block flag names"
b1c0993b215c5c3eebd1c6bafc22bba23d57a70b 28-Feb-2012 Glenn Kasten <gkasten@google.com> Add all-channel AudioTrack::setVolume() API

Add combined channel APIs setVolume to AudioTrack,
and remove obsolete getVolume.

Change-Id: I0c87bfdbff4f4292259fa33e65f67badbafd270b
udioTrack.cpp
oneGenerator.cpp
164d6539e0620d08b0395efcdd0e4aaf437daf54 28-Feb-2012 Glenn Kasten <gkasten@google.com> Add all-channel AudioTrack::setVolume() API

Add combined channel APIs setVolume to AudioTrack,
and remove obsolete getVolume.

Change-Id: I0c87bfdbff4f4292259fa33e65f67badbafd270b
udioTrack.cpp
oneGenerator.cpp
847d05dc8fa144dcf8f4f435d6a6ac1727f00937 28-Feb-2012 Glenn Kasten <gkasten@google.com> Remove deprecated AudioTrack APIs

Change-Id: I88be6525f3e33df529c0c3cb701d12a484809477
udioTrack.cpp
7c28540fccf996bed1744686aca1ee9e67b9cf22 28-Feb-2012 Glenn Kasten <gkasten@google.com> Remove deprecated AudioTrack APIs

Change-Id: I88be6525f3e33df529c0c3cb701d12a484809477
udioTrack.cpp
9c5fdd83f9b9f49be35107971feb33528d60b945 05-Nov-2012 Glenn Kasten <gkasten@google.com> Simplify control block flag names

Use only one symbol per flag

Change-Id: Ia3582e2134abd60c896d11337face65383e79c7c
udioRecord.cpp
udioTrack.cpp
d12b033552585cd8761ba6241f21e4cea4a21878 05-Nov-2012 Glenn Kasten <gkasten@google.com> Simplify control block flag names

Use only one symbol per flag

Change-Id: Ia3582e2134abd60c896d11337face65383e79c7c
udioRecord.cpp
udioTrack.cpp
9a08ebc8de71e260efb86cd1a04559b075b38ebc 02-Nov-2012 Glenn Kasten <gkasten@google.com> Fix spurious wakeup waiting for new IAudioTrack

If there was a spurious wakeup while waiting for another thread to create
a new IAudioTrack, we assumed that the track has been created when it
might not have been.

Change-Id: I5f3999b4f7a06a00aabd65a746cc7222fff396ab
udioTrack.cpp
36665ac2e7edae3e733b7f52145b80dfed9821a6 02-Nov-2012 Glenn Kasten <gkasten@google.com> Fix spurious wakeup waiting for new IAudioTrack

If there was a spurious wakeup while waiting for another thread to create
a new IAudioTrack, we assumed that the track has been created when it
might not have been.

Change-Id: I5f3999b4f7a06a00aabd65a746cc7222fff396ab
udioTrack.cpp
85ab62c4b433df3f1a9826bed1c9bec07a86c750 01-Nov-2012 Glenn Kasten <gkasten@google.com> Line length 100

Change-Id: Ib28fd7b9ce951a6933f006e7f8812ba617625530
udioEffect.cpp
udioRecord.cpp
udioSystem.cpp
udioTrack.cpp
AudioFlinger.cpp
AudioFlingerClient.cpp
AudioPolicyService.cpp
isualizer.cpp
8af901cdea0af7e536579dee6d56e69987035a01 01-Nov-2012 Glenn Kasten <gkasten@google.com> Line length 100

Change-Id: Ib28fd7b9ce951a6933f006e7f8812ba617625530
udioEffect.cpp
udioRecord.cpp
udioSystem.cpp
udioTrack.cpp
AudioFlinger.cpp
AudioFlingerClient.cpp
AudioPolicyService.cpp
isualizer.cpp
c41590251aa84c078c942d258e838aad814b73a5 30-Oct-2012 Glenn Kasten <gkasten@google.com> Remove obsolete references to libmedia_native

Bug: 6654403
Change-Id: I3993d62987cf0dd85db10bf002a5cce53d4f01bd
ndroid.mk
faa4420344216ccbad15a49aa7c1cd6141532fcb 30-Oct-2012 Glenn Kasten <gkasten@google.com> Remove obsolete references to libmedia_native

Bug: 6654403
Change-Id: I3993d62987cf0dd85db10bf002a5cce53d4f01bd
ndroid.mk
18a6d9029e18a93748d3d9c33f04c1b360aeb7ae 24-Sep-2012 Glenn Kasten <gkasten@google.com> Fix typo

Change-Id: I8cc2969eb329a830ee866622a8633adcb4e967cc
udioSystem.cpp
d7823e49c324a76e1e3a5e51e244aabe8eecdfca 24-Sep-2012 Glenn Kasten <gkasten@google.com> Fix typo

Change-Id: I8cc2969eb329a830ee866622a8633adcb4e967cc
udioSystem.cpp
b1eb1a0dd38a36dd0c0626d3d57043dbd0042a92 23-Oct-2012 Eric Laurent <elaurent@google.com> stagefright: discard audio at start of capture

The new camcorder start sound is longer than previous one and we
must discard more audio when capture starts.

Ideally, camcorder should use synchronous record start.

Bug 7394330.

Change-Id: I219b4e231aba706776dc7ccc4f1c996eaf22f61a
ediaProfiles.cpp
31988edd4c346bc0b19f4e96670afce5cb056037 23-Oct-2012 Eric Laurent <elaurent@google.com> stagefright: discard audio at start of capture

The new camcorder start sound is longer than previous one and we
must discard more audio when capture starts.

Ideally, camcorder should use synchronous record start.

Bug 7394330.

Change-Id: I219b4e231aba706776dc7ccc4f1c996eaf22f61a
ediaProfiles.cpp
d7086030fcf731e4bcef6c033cc6418cd04e6b91 10-Oct-2012 Jean-Michel Trivi <jmtrivi@google.com> Support querying active record sources

Add support for querying whether there is currently a recording
underway from the specified audio source.

Bug 7314859

Change-Id: I986b231a10ffd368b08ec2f9c7f348d28eaeb892
udioSystem.cpp
AudioPolicyService.cpp
e3f641fd9348bf7f4c07f6cc707347fccea1439c 10-Oct-2012 Jean-Michel Trivi <jmtrivi@google.com> Support querying active record sources

Add support for querying whether there is currently a recording
underway from the specified audio source.

Bug 7314859

Change-Id: I986b231a10ffd368b08ec2f9c7f348d28eaeb892
udioSystem.cpp
AudioPolicyService.cpp
cc0f1cfb69ce8b8985fc2c0984847a06a13ad22d 24-Sep-2012 Glenn Kasten <gkasten@google.com> Implement android.media.AudioManager.getProperty()

Bug: 6635041
Change-Id: I3386a4a6c226bc4eceaf65556119e4fb15f73224
udioSystem.cpp
AudioFlinger.cpp
4c6db4ce1e2760682d1c9e66448dbb39bb5d14d8 24-Sep-2012 Glenn Kasten <gkasten@google.com> Implement android.media.AudioManager.getProperty()

Bug: 6635041
Change-Id: I3386a4a6c226bc4eceaf65556119e4fb15f73224
udioSystem.cpp
AudioFlinger.cpp
207e18540fefbaf530a4fdf506d266f34ddec84f 21-Sep-2012 Andreas Huber <andih@google.com> Remove legacy code and APIs in wifi display related code.

Change-Id: Ia010e7a00534f9356b3247369d0ffd65591d91aa
MediaPlayerService.cpp
45d76bb6c8f15335f89c287dbae04cc38f79d0a8 21-Sep-2012 Andreas Huber <andih@google.com> Remove legacy code and APIs in wifi display related code.

Change-Id: Ia010e7a00534f9356b3247369d0ffd65591d91aa
MediaPlayerService.cpp
efbb781c15abf8e085f5ab8d39710bd58ea0b6e4 18-Sep-2012 Andreas Huber <andih@google.com> HDCP module binderized

Change-Id: I866768b1e3f3b232f1934a35b65f66befc12f3f6
MediaPlayerService.cpp
59451f8ced48874427ff1550391c4f3cd2ba2e35 18-Sep-2012 Andreas Huber <andih@google.com> HDCP module binderized

Change-Id: I866768b1e3f3b232f1934a35b65f66befc12f3f6
MediaPlayerService.cpp
896adcd3ae6a1c7010e526327eff54e16179987b 13-Sep-2012 Eric Laurent <elaurent@google.com> audioflinger: send priority request from a thread

When creating a fast AudioTrack, a request is sent to SchedulingPolicyService
to elevate the requesting thread priority. This generates a binder
call into system_server process and to a JAVA service via JNI.
If the thread from which the track was created is in the system_server
process and does not have the "can call java" attribute, a crash occurs because
the binder optimization reuses the same thread to process the returning binder
call and no JNI env is present.

The fix consists in sending the priority change request from the AudioFlinger
mixer thread, not from the binder thread.

This also reverts the workaround in commit 73431968

Bug 7126707.

Change-Id: I3347adf71ffbb56ed8436506d4357eab693078a3
udioTrack.cpp
ef6be0bb71c08db7e9e9274d70edffb95f0da25f 13-Sep-2012 Eric Laurent <elaurent@google.com> audioflinger: send priority request from a thread

When creating a fast AudioTrack, a request is sent to SchedulingPolicyService
to elevate the requesting thread priority. This generates a binder
call into system_server process and to a JAVA service via JNI.
If the thread from which the track was created is in the system_server
process and does not have the "can call java" attribute, a crash occurs because
the binder optimization reuses the same thread to process the returning binder
call and no JNI env is present.

The fix consists in sending the priority change request from the AudioFlinger
mixer thread, not from the binder thread.

This also reverts the workaround in commit 73431968

Bug 7126707.

Change-Id: I3347adf71ffbb56ed8436506d4357eab693078a3
udioTrack.cpp
73431968e3c5cf420b5d63c54cf72d10ff7ee7bc 13-Sep-2012 Jean-Michel Trivi <jmtrivi@google.com> Workaround for track recreation bug

Ignore thread can call Java parameter to work around bug where
AudioTrack instance gets recreated when key clicks are enabled
and WFD gets turned on, with the wrong parameters.

Change-Id: Ia42c8704b46fe3ffea560b05b60939fa2e4b29e1
udioTrack.cpp
8645717388acc74efd9127b84da121be8bf733ba 13-Sep-2012 Jean-Michel Trivi <jmtrivi@google.com> Workaround for track recreation bug

Ignore thread can call Java parameter to work around bug where
AudioTrack instance gets recreated when key clicks are enabled
and WFD gets turned on, with the wrong parameters.

Change-Id: Ia42c8704b46fe3ffea560b05b60939fa2e4b29e1
udioTrack.cpp
fd48021dfc3278b048ba99ecffe7f996751fb440 10-Sep-2012 Elliott Hughes <enh@google.com> am e7c992c6: am 5abc91d6: Merge "Fix libmedia and libstagefright to get expat header files from the approved location."

* commit 'e7c992c675e0075cd60b0b11c06d5956e3ddd7a3':
Fix libmedia and libstagefright to get expat header files from the approved location.
947be6bf6700d07e148f6fbf6308e86b08d3c926 10-Sep-2012 Elliott Hughes <enh@google.com> am e7c992c6: am 5abc91d6: Merge "Fix libmedia and libstagefright to get expat header files from the approved location."

* commit 'e7c992c675e0075cd60b0b11c06d5956e3ddd7a3':
Fix libmedia and libstagefright to get expat header files from the approved location.
e7c992c675e0075cd60b0b11c06d5956e3ddd7a3 10-Sep-2012 Elliott Hughes <enh@google.com> am 5abc91d6: Merge "Fix libmedia and libstagefright to get expat header files from the approved location."

* commit '5abc91d61718e334e05c6d4858bd868bd5a5769c':
Fix libmedia and libstagefright to get expat header files from the approved location.
e8057dd8208f0a185109992339a995c518b12780 09-Sep-2012 Elliott Hughes <enh@google.com> Fix libmedia and libstagefright to get expat header files from the approved location.

Found during a libexpat upgrade.

Change-Id: I9e5abd502a884975d898486edde374fb2519164e
ndroid.mk
ediaProfiles.cpp
261fd2119c70fda3af64453881a6346dd48eb956 07-Sep-2012 Eric Laurent <elaurent@google.com> Merge "AudioRecord: Fix minimum frame count calculation." into jb-mr1-dev
741b47db87db45dad47d115ffcc67553184ffbe3 07-Sep-2012 Eric Laurent <elaurent@google.com> Merge "AudioRecord: Fix minimum frame count calculation." into jb-mr1-dev
6f744d75d3439f7984245e3c489cc7cf91cea41c 06-Sep-2012 Eric Laurent <elaurent@google.com> AudioRecord: Fix minimum frame count calculation.

AudioRecord::set() was calling getMinFrameCount() with
a channel count instead of a channel mask.

Change-Id: Iabace7686426430fd53deac0c71b0c36aa64171c
udioRecord.cpp
75b9bb09a7cde18a31b68f6aef96e5182d652e8d 06-Sep-2012 Eric Laurent <elaurent@google.com> AudioRecord: Fix minimum frame count calculation.

AudioRecord::set() was calling getMinFrameCount() with
a channel count instead of a channel mask.

Change-Id: Iabace7686426430fd53deac0c71b0c36aa64171c
udioRecord.cpp
455d02eca342d8159637af317a5d83219d267812 06-Sep-2012 Jeff Brown <jeffbrown@google.com> Update remote display API.

Renamed disconnect() to dispose() to emphasize the fact that
this method is intended to clean up the IRemoteDisplay
completely, not just temporarily disconnect the current client
(which might be useful someday).

Other minor tweaks.

Change-Id: I1209639eb0cd8af09c724206642d7e52aab48257
RemoteDisplay.cpp
ced24b36bbeed1ddd086a9304a9639c04ffe0962 06-Sep-2012 Jeff Brown <jeffbrown@google.com> Update remote display API.

Renamed disconnect() to dispose() to emphasize the fact that
this method is intended to clean up the IRemoteDisplay
completely, not just temporarily disconnect the current client
(which might be useful someday).

Other minor tweaks.

Change-Id: I1209639eb0cd8af09c724206642d7e52aab48257
RemoteDisplay.cpp
e104596061b219e9bce6d4db49a9d15242f8d2e5 05-Sep-2012 Jeff Brown <jeffbrown@google.com> Implement remote display service stubs.

Change-Id: I582ed000026bba6d116db8304e15a3c52f8a9a01
ndroid.mk
MediaPlayerService.cpp
RemoteDisplay.cpp
RemoteDisplayClient.cpp
2013a54981d4ffb036dff279b88cc9f08c0ee1c2 05-Sep-2012 Jeff Brown <jeffbrown@google.com> Implement remote display service stubs.

Change-Id: I582ed000026bba6d116db8304e15a3c52f8a9a01
ndroid.mk
MediaPlayerService.cpp
RemoteDisplay.cpp
RemoteDisplayClient.cpp
cd89e8014368af1bbdfa08406d5d2eb0bbbfcca1 31-Aug-2012 Andreas Huber <andih@google.com> Merge "Added an additional virtual method IStreamSource::flags()." into jb-mr1-dev
3e76a27a5e57435369794016494093b5b1b29513 31-Aug-2012 Andreas Huber <andih@google.com> Merge "Added an additional virtual method IStreamSource::flags()." into jb-mr1-dev
da7ff5321539ac07ec76d0d03bd1b9b09a1823bf 31-Aug-2012 Andreas Huber <andih@google.com> Added an additional virtual method IStreamSource::flags().

Change-Id: I89e62d84328e12f08c8f73cbfd53cfb42569de97
StreamSource.cpp
330accb419ebfb1d8b9d7dcc3b616f56f737f29a 31-Aug-2012 Andreas Huber <andih@google.com> Added an additional virtual method IStreamSource::flags().

Change-Id: I89e62d84328e12f08c8f73cbfd53cfb42569de97
StreamSource.cpp
c3ae93f21280859086ae371428ffd32f39e76d50 30-Jul-2012 Glenn Kasten <gkasten@google.com> Update audio comments

Change-Id: Ie7504d0ddb252f7e4d4f99ed0b44cfc7b1049816
udioTrack.cpp
2662ac9220c9e07cd343e78bf3a0c21ca3e4ffd1 30-Jul-2012 Glenn Kasten <gkasten@google.com> Update audio comments

Change-Id: Ie7504d0ddb252f7e4d4f99ed0b44cfc7b1049816
udioTrack.cpp
bcf09f8c995221e75c7cd328f25c7cc6d2b5f7c9 30-Aug-2012 Andreas Huber <andih@google.com> Only run the wifi display RTSP server on demand, and only on the wifi direct

interface.

Change-Id: I7d3c44cb79cd40e73499f2d7ccf35c69b628e6d7
MediaPlayerService.cpp
ab1bd84889273bc21efdabe5ff6f4633eb918a85 30-Aug-2012 Andreas Huber <andih@google.com> Only run the wifi display RTSP server on demand, and only on the wifi direct

interface.

Change-Id: I7d3c44cb79cd40e73499f2d7ccf35c69b628e6d7
MediaPlayerService.cpp
d8ee4e56f92eeb44ddc0997efe280b9f28ad814d 30-Aug-2012 Andreas Huber <andih@google.com> Merge "Initial checkin of support for acting as a wifi display source" into jb-mr1-dev
a2c31a786cfea83f4028c4c5ae00386ae96542e9 30-Aug-2012 Andreas Huber <andih@google.com> Merge "Initial checkin of support for acting as a wifi display source" into jb-mr1-dev
d7bee3a9d2ad76d073d91f0ee36d5ac5f9df480c 29-Aug-2012 Andreas Huber <andih@google.com> Initial checkin of support for acting as a wifi display source

Change-Id: I08f17efa0c7d007e17408feb7d4fbef0a19f531a
MediaPlayerService.cpp
35213f1420c669f43314cb75eadea450d21a75cb 29-Aug-2012 Andreas Huber <andih@google.com> Initial checkin of support for acting as a wifi display source

Change-Id: I08f17efa0c7d007e17408feb7d4fbef0a19f531a
MediaPlayerService.cpp
1b19c9d120869c3182373a9b06a1ed98898df882 29-Aug-2012 Andreas Huber <andih@google.com> Preliminary support for HDCP as a binder service for wifi display support.

Change-Id: Ie0de1c086c629a668d1c7863992eef56fb94157c
ndroid.mk
HDCP.cpp
9bd5a93ed8b4c4b3361c35dd1acdc3f1f49ede33 29-Aug-2012 Andreas Huber <andih@google.com> Preliminary support for HDCP as a binder service for wifi display support.

Change-Id: Ie0de1c086c629a668d1c7863992eef56fb94157c
ndroid.mk
HDCP.cpp
6a8ea471a9f3b001bd0ffa3381eba12975dfc59f 21-Aug-2012 Glenn Kasten <gkasten@google.com> Merge "Revert "Swap the order of creating IAudioTrack and thread"" into jb-mr1-dev
44a7e42f0310831e6a846d1b6bb40bf3a399bf6d 22-Jun-2012 John Grossman <johngro@google.com> Add the ability to dynamicaly register MediaPlayer types.

Add the ability to dynamically register low level MediaPlayer
factories which will be probed at setDataSource time to determine the
proper MediaPlayerBase to instantiate.

This change is in preparation for moving libaah_rtp out of
frameworks/base and into phantasm platform directory.

Change-Id: Icf8904db3ab9e3c85df6e780d5546d9988cb9076
Signed-off-by: John Grossman <johngro@google.com>
MediaPlayer.cpp
a997e7a7c5aa2fc7e95316218316f8b7b98786ba 07-Aug-2012 Glenn Kasten <gkasten@google.com> Revert "Swap the order of creating IAudioTrack and thread"

This reverts commit 5d464eb0b8cffb994a754ff108795e858a882414.
It caused the wrong thread ID -1 to be passed to IAudioFlinger::createTrack().

Change-Id: Ic221d2bb4af572d3d2d752af19238c52f6728e3a
udioTrack.cpp
5d464eb0b8cffb994a754ff108795e858a882414 23-Jun-2012 Glenn Kasten <gkasten@google.com> Swap the order of creating IAudioTrack and thread

Simplifies the error recovery in case IAudioTrack fails.

Change-Id: I6aee41a2ac747a5689fb4836b04174e6107bf32f
udioTrack.cpp
0ec23ce0d1ff79566c402bc30df3074f6e25a22b 10-Jul-2012 Glenn Kasten <gkasten@google.com> Clean up start() parameters

Document where int is used instead of AudioSystem::sync_event_t
(probably because of a header file dependency).
TrackBase::start() and RecordTrack::start() don't need default parameters.

Change-Id: I82f4a4d078be900f3aa4bd926697e32f5ed68ec8
AudioRecord.cpp
58e5aa34f01d663654d8bafad65db1dda42161ff 20-Jun-2012 Glenn Kasten <gkasten@google.com> effect_descriptor_t const correctness

Change-Id: Iad008f20d35a18acf500f773900164552fd0c19e
udioSystem.cpp
AudioPolicyService.cpp
955e78180ac6111c54f50930b0c4c12395e86cf7 21-Feb-2012 Glenn Kasten <gkasten@google.com> AudioRecord locking

Fix race conditions for EVENT_MARKER and EVENT_NEW_POS callbacks.
Marker and new position update fields are protected by lock.

getSampleRate() doesn't need a lock because it reads from shared memory
control block.

Enforce that the parameter passed with EVENT_MARKER and EVENT_NEW_POS
cannot not be changed by the callback handler, and will not change during
the call by another thread.

Session ID should never change; log if it does.

Change-Id: Ia2c63cf1a71b10bb06c37981bd76437f83fffa91
udioRecord.cpp
a189a6883ee55cf62da1d7bf5bf5a8ab501938a4 20-Feb-2012 Glenn Kasten <gkasten@google.com> Use struct assignment instead of explicit memcpy

for POD structs effect_descriptor_t and effect_config_t

Change-Id: Ib2fc47f85fb65ed91b0abb1f87217c49b5eb571d
udioEffect.cpp
28b76b334f92a15a2be3cc9e2f7d229a3275d1ac 04-Jul-2012 Glenn Kasten <gkasten@google.com> Use audio_channel_mask_t for channel mask

Change-Id: I1c1896da48983aa9f1462a4b471f910498816f60
udioTrack.cpp
AudioFlinger.cpp
dcda3b325f465aa6ec2be11db1c56c8a5e867f33 16-Jul-2012 Glenn Kasten <gkasten@google.com> Merge "AudioRecord::stop() return void"
2bdb2f25861f3a3ac9cf3b7af561975fc9b9eead 14-Jul-2012 Edwin Wong <edwinwong@google.com> am 190313ec: am 65e8d62a: Merge "Fixed sample video corrupted in MediaCodec mode." into jb-dev

* commit '190313ec68e81c10d200ff3c20ac152cf90760d6':
Fixed sample video corrupted in MediaCodec mode.
d64cd233eef39430561c1e1df423336a199cc5d7 21-Feb-2012 Glenn Kasten <gkasten@google.com> AudioRecord::stop() return void

like AudioTrack::stop()

Change-Id: Iab62f4665151345f1ad5874c97a21d1a331f0154
udioRecord.cpp
190313ec68e81c10d200ff3c20ac152cf90760d6 14-Jul-2012 Edwin Wong <edwinwong@google.com> am 65e8d62a: Merge "Fixed sample video corrupted in MediaCodec mode." into jb-dev

* commit '65e8d62a5b243518795cdafa498df4a49baf6940':
Fixed sample video corrupted in MediaCodec mode.
68337edf595a0c345ba4b8adcd4f1e541a1d7eb7 12-Jul-2012 Glenn Kasten <gkasten@google.com> AudioRecord client threading cleanup

Rename ClientRecordThread to AudioRecordThread to be more similar to
AudioTrack naming.

Only create the thread once, and use resume() and pause() for start()
and stop(). This will allow us to have a known client callback thread
tid that we can pass to AudioFlinger before start().

mActive:
Made mActive a bool not int.
mActive is protected by mLock; volatile is meaningless.
Fixed a few places where mActive was accessed without a lock:
- stopped()
- processAudioBuffer()
These aren't used internally, so no need for _l() versions.

Change-Id: I4b8a5c90f3a22d3894b344564cb1c5aef4f1fda2
udioRecord.cpp
fa2b8f243eb048fb2b8e5a14356190f69eb31a36 11-Jul-2012 Edwin Wong <edwinwong@google.com> Fixed sample video corrupted in MediaCodec mode.

Change-Id: I50c5660072d40f6e297e58fd026ea04c89d6a70a
related-to-bug: 6732061
Crypto.cpp
04cd0186305e2b59d23c9147787046c6662029cc 25-Jun-2012 Glenn Kasten <gkasten@google.com> getMinFrameCount error handling

Convention is for "get" APIs that directly return status_t and indirectly
return a value via a pointer, to return BAD_VALUE if the pointer is NULL.
Also indirectly return 0 for other errors.

Change-Id: I1599f20ecb26e9723f9fb384ffbf911ff3a2ce1c
udioRecord.cpp
udioTrack.cpp
5f0033d27b75fead593ed7ca2b86f5b6f5adf6cc 13-Jul-2012 Glenn Kasten <gkasten@google.com> Merge "Remove dead code in libmedia"
1879fff068422852c1483dcf8365c2ff0e2fadfc 12-Jul-2012 Glenn Kasten <gkasten@google.com> Add tid parameter to IAudioFlinger::openRecord

Not yet implemented

Change-Id: I35523fb15ad71727ecc9f4bb870f07e4b7397dc4
udioRecord.cpp
AudioFlinger.cpp
d4070955e28ae62aa4be1657f9d32acde104bb86 12-Jul-2012 Glenn Kasten <gkasten@google.com> Remove dead code in libmedia

Change-Id: I7d8201590cda29c9fa99662a4fdba222091febfe
udioTrack.cpp
isualizer.cpp
bf04a5d7f287fc712e0ed91849dc85c90c1e182d 12-Jul-2012 Glenn Kasten <gkasten@google.com> Simplify AudioRecord::getInputFramesLost()

This also fixes a benign race in reading mActive without a lock.

Change-Id: I19e953d4f275e5c266ca1ca3fece7b6c02ad1707
udioRecord.cpp
254af180475346b6186b49c297f340c9c4817511 03-Jul-2012 Glenn Kasten <gkasten@google.com> Use audio_channel_mask_t more places

Use it in AudioSystem::getOutput(), AudioSystem::getInput(),
IAudioPolicyService::getOutput(), IAudioPolicyService::getInput(),
and various other places in AudioFlinger.

Not done: AudioTrack and OutputDescriptor.

Change-Id: I70e83455820bd8f05dafd30c63d636c6a47cd172
udioSystem.cpp
AudioPolicyService.cpp
f89a0deef1ecafcba164045b76d4d6c7bf8eb24d 10-Jul-2012 Glenn Kasten <gkasten@google.com> Merge "Move declarations of local variables to first use"
dd8104cc5367262f0e5f13df4e79f131e8d560bb 02-Jul-2012 Glenn Kasten <gkasten@google.com> Use audio_channel_mask_t more consistently

In IAudioFlinger::createTrack() and IAudioFlinger::openRecord(),
declare input parameter to use correct type audio_channel_mask_t.

In IAudioFlinger::getInputBufferSize(), input parameter is now channel mask
instead of channel count.

Remove unused IAudioFlinger::channelCount(audio_io_handle_t).

In AudioRecord::getMinFrameCount() and AudioSystem::getInputBufferSize(),
input parameter is channel mask instead of channel count.

Change-Id: Ib2f1c29bea70f016b3cfce83942ba292190ac965
udioRecord.cpp
udioSystem.cpp
AudioFlinger.cpp
20010053daabfa43fcfe781bbf004473b4c08538 22-Jun-2012 Glenn Kasten <gkasten@google.com> Remove acoustics from AudioSystem::getInput()

Change-Id: I29fb3ee5664c1f0ee0409c1bb2be087ecca637db
udioRecord.cpp
udioSystem.cpp
AudioPolicyService.cpp
624a7fcb377f2a40109c16de5109ae8ea1f67a69 22-Jun-2012 Glenn Kasten <gkasten@google.com> Use audio_channel_mask_t in AudioRecord

Change-Id: I9e1b918b2635d961604a4a9d88eb1c7179a167a7
udioRecord.cpp
868a6a357018e5872e064b7a13a9b891e2078962 22-Jun-2012 Glenn Kasten <gkasten@google.com> Include what you use

Change-Id: I12ef9367d05dbe069c037b1b4acd6347a8cf3ece
udioRecord.cpp
f92eec53f886f43e4374a36195be55f2a7bbcf36 07-Mar-2012 Glenn Kasten <gkasten@google.com> Remove AudioRecord record_flags

Change-Id: I021ddcc1bcb63132a4597d13e3d09db2a5f2c628
udioRecord.cpp
d3a9ff4b725de612bf0354c035ba8f8564dbc6e8 21-Jun-2012 Glenn Kasten <gkasten@google.com> Move declarations of local variables to first use

Change-Id: I48b193a742b32b6746aa938b84dc405124a6a5c3
udioTrack.cpp
4ebbabda6584aeb5ad2714e7db1702d00e84dad4 14-Jun-2012 Eric Laurent <elaurent@google.com> am 192cbbad: Fix audio track pause.

* commit '192cbbad773979a6fe3b5a0c223356de4fc3309c':
Fix audio track pause.
192cbbad773979a6fe3b5a0c223356de4fc3309c 13-Jun-2012 Eric Laurent <elaurent@google.com> Fix audio track pause.

AudioTrack::pause() should signal the control block condition
to release threads waiting for available buffers in obtainBuffer().
Otherwise the behavior relies on the timout on the condition
or the fact that audioflinger will mix a new audio buffer while executing
the pause.

Bug 6653769.

Change-Id: I5f8f73c471fe306070f30b814f32fd4b4dc1d575
udioTrack.cpp
48a0bfa6f731386f2794ff36d6677d56e98fc6ea 14-Jun-2012 Glenn Kasten <gkasten@google.com> am 49dd5cf3: Merge "Log track name on obtain/releaseBuffer warnings" into jb-dev

* commit '49dd5cf3469cd755321f8ec10013ad4fcfaf723d':
Log track name on obtain/releaseBuffer warnings
0c9d26d187017f7fb028ab52a0fbc6395142faa4 31-May-2012 Glenn Kasten <gkasten@google.com> Log track name on obtain/releaseBuffer warnings

This should help diagnose problems by allowing us to correlate
the logs with the dumpsys media.audio_flinger output.

Change-Id: I8c7c592b4f87d13b0f29c66ce7a2f301a0f063c9
udioTrack.cpp
ea5008d8abfdf1479b4efa266cdb7c842d168aa9 08-Jun-2012 Glenn Kasten <gkasten@google.com> am 28ed2f93: Reduce underruns in screen off, esp. with EQ

* commit '28ed2f93324988767b5658eba7c1fa781a275183':
Reduce underruns in screen off, esp. with EQ
28ed2f93324988767b5658eba7c1fa781a275183 07-Jun-2012 Glenn Kasten <gkasten@google.com> Reduce underruns in screen off, esp. with EQ

Add MonoPipe APIs to specify setpoint.
Use screen state to configure pipe setpoint.
Fix a long-standing bug where pipe sleep time was excessive,
which interacted poorly with governor and low clock frequencies.
Now it deducts the elapsed time since last write(),
which was significant when there was EQ and low clock frequency.

Bug: 6618373
Change-Id: I6f3b0072c2244aeb033ef0795ad164491a164ff5
udioParameter.cpp
721e18b75824eae3f3e79c915f4800ecad5dac80 01-Jun-2012 Eric Laurent <elaurent@google.com> am 27d33134: Merge "Do not keep audio wake lock when apps underrun." into jb-dev

* commit '27d33134130379cc91d936cdc742700311901a9d':
Do not keep audio wake lock when apps underrun.
df839841d2db4cb8e2acb10205b3942622b3e7a2 31-May-2012 Eric Laurent <elaurent@google.com> Do not keep audio wake lock when apps underrun.

Do not automatically restart an AudioTrack after an underrun
if the callback is executed but no data is written by the app.

Bug 6541286.

Change-Id: I11e7ab8dc968d7ff087058fec68f44490d3a7731
udioTrack.cpp
3c8889e827d95b195fe5ba077a01cb5b6042e534 29-Mar-2012 Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> libmedia: Fix build with gcc 4.7

gcc 4.7 doesn't like the redefinition of n in the same
scope:
for(size_t n=...;;) {
size_t n = 2; // <-- duplicate definition
}

Change-Id: Idfc2e768a0eb85a3dacccd3431b4ad44775432a4
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
ediaProfiles.cpp
2986460984580833161bdaabc7f17da1005a8961 09-May-2012 Eric Laurent <elaurent@google.com> Fix issues with synchronous record start.

- Added a timeout in case the trigger event is never fired.
- Extend AudioRecord obtainBuffer() timeout in case of
synchronous start to avoid spurious warning.
- Make sure that the event is triggered if the track is
destroyed.
- Reject event if the triggering track is in an incompatible state.

Also fix a problem when restoring a static AudioTrack after
a mediaserver crash.

Bug 6449468.

Change-Id: Ib36e11111fb88f73caa31dcb0622792737d57a4b
udioRecord.cpp
udioTrack.cpp
093000f7d11839b920e8dfaa42ed1d09f48e24b8 03-May-2012 Glenn Kasten <gkasten@google.com> Don't allow AudioTrack frameCount to decrease

This is a workaround for bug that client can cache return value of
frameCount(), and is not notified when this value changes due to automatic
re-recreation of the underlying IAudioTrack.

A better long-term fix would be to notify clients when these kinds of
parameters change, and to fix assumptions in client code that they are
constant (e.g. in SoundPool and maybe obtainBuffer).

Also, once a fast track request is denied, don't request it again.

Bug: 6431187
Change-Id: I55b4ff30bbd9ed3a402e39452a38de52cdea53a9
udioTrack.cpp
f4022f90db5acb680870db8c1150b673cdd211d9 02-May-2012 Glenn Kasten <gkasten@google.com> Fix race in AudioTrack destruction

Bug: 6427369
Change-Id: Id3b4487406235b881f6f0b4b95c5a02a9b797e75
udioTrack.cpp
31dfd1db7a4d2228d9642008af6f3dd744368eb6 01-May-2012 Glenn Kasten <gkasten@google.com> Disable fast track log spam

except for "denied by client" and "denied by server"

Change-Id: I133ab747933729cc1f386813ee06ece055bdb294
udioTrack.cpp
1477e92867a950016579a644e74f803ed1d90cbb 01-May-2012 Glenn Kasten <gkasten@google.com> Enable fast track for SoundPool

Change-Id: Ia80b3a7738e4c5dbe2bd5b0f55f0ca49943e2f64
oundPool.cpp
98f153091e8f4190b35b9ce15250f308baf4805c 25-Apr-2012 Glenn Kasten <gkasten@google.com> Re-enable fast track for ToneGenerator

Change-Id: If4152169778df124c750dc45023322ee23c80587
oneGenerator.cpp
f60c660f048d5f5e2458cff243c20400d73757a7 29-Apr-2012 Dave Burke <daveburke@google.com> Added support for HE-AAC recording

Fixed bug in decoder related to sample rates / channel counts
Made decoder follow Fraunhofer pattern
Log if bitrate not available
Bug: 6275957

Change-Id: I47a8e29358fa4a88ebc73fe02d46a2bfb96c64fe
ediaProfiles.cpp
aeb8fd460ed87d032b3fb8bb61e21eb542ce0f5b 19-Apr-2012 Dave Burke <daveburke@google.com> Add Fraunhofer AAC encoder with AAC-ELD support.

Change-Id: I6cd499d257d72f50a5b508bed97796a591a51506
ediaProfiles.cpp
e0fa467e1150c65a7b1b1ed904c579b40f97c9df 24-Apr-2012 Glenn Kasten <gkasten@google.com> Move frame count calculations for fast tracks

For fast tracks: move the default and minimum frame count calculations
from client to server. If accepted, the default and minimum frame count
is the fast mixer (HAL) frame count. If denied, the default and minimum
frame count is the same as it currently is for normal tracks.

For normal tracks: there is no change yet, preserve legacy behavior for
now but add a FIXME to change this later.

Bug fix: the test for buffer alignment matches channelCount was wrong.

Bug fix: check for 8-bit data in shared memory, which isn't supported.

Optimizations:
- in set(), only call AudioSystem::getOutputSamplingRate() when needed
- in createTrack_l(), only call AudioSystem::getSamplingRate() and
AudioSystem::getFrameCount() when needed

Change-Id: I79d2fe507db1a8f7bb094c71da8a129951dbb82f
udioTrack.cpp
a636433cbd09c0708b85f337ef45c0cdef3bcb4d 19-Apr-2012 Glenn Kasten <gkasten@google.com> Use C APIs instead of C++ APIs for policy

The C++ APIs are going away.

Note: we use tid == 0 which is not supported yet by the C APIs,
do not submit this until that is added.

Change-Id: I0e90789e6c81c69f2544e899c52421ea5d1342be
udioRecord.cpp
udioTrack.cpp
ca8b28013c0558a4a3323a1a0f58520277200086 23-Apr-2012 Glenn Kasten <gkasten@google.com> Fix regression in AudioTrack::pause()

Bug: 6379646
Change-Id: I12b53bc4118499ddc73a53a981f3f56328140868
udioTrack.cpp
1d685d767a5dd1003eb62f6ad1a26b39645a474f 23-Apr-2012 Glenn Kasten <gkasten@google.com> Fix ToneGenerator regression

Bug: 6378847
Change-Id: Ib3324c7a5951ac95f99993bfae27ea02bfda08ff
oneGenerator.cpp
3acbd053c842e76e1a40fc8a0bf62de87eebf00f 28-Feb-2012 Glenn Kasten <gkasten@google.com> Configure policy of mediaserver threads

Change-Id: Ifd825590ba36996064a458f64453a94b84722cb0
udioRecord.cpp
udioTrack.cpp
AudioFlinger.cpp
AudioRecord.cpp
AudioTrack.cpp
1948eb3ea6eee336e8cdab9b0c693f93f5f19993 14-Apr-2012 Eric Laurent <elaurent@google.com> Add support for deep audio buffers

Allow AudioSink to use deep audio buffering when the
source is audio only and its duration is more than
a certain threshold.
This helps improve battery life but implies higher
audio latency.

Change-Id: Ie79915b61c370292f05aabda9779356570e03cbb
udioTrack.cpp
5b8987e7de9d04b09153f329c680d2316cdb44ec 19-Apr-2012 Andreas Huber <andih@google.com> Allow propagation of error information and description from the CryptoPlugin to

the higher layers.

Change-Id: I9f434ad55cdf575803c208bedf47b607baff2330
related-to-bug: 6365261
Crypto.cpp
2d359a85ef5b72f1cb47df227b44fe4f3c5fbd60 19-Apr-2012 Jean-Michel Trivi <jmtrivi@google.com> Merge "Add support for scaling mode parameter"
3476de62fb10e76412452ef4c6bd71936c9f7db1 16-Apr-2012 Jean-Michel Trivi <jmtrivi@google.com> Add support for scaling mode parameter

Support VISUALIZER_PARAM__SCALING_MODE parameter.

Modify process() function to use new volume scaling parameter,
used to set whether captured values are maximized by current
headroom in the buffer (default existing behaviora) or left
as is and thus affected by volume.

Modify AudioEffect to allow subclasses to override the following
events: control status changed, enable status changed, command
executed.
In Visualizer class (a subclass of AudioEffect), reset the
scaling mode and capture size on the actual effect
as cached when control is regained.
This will allow the effect to be properly
configured whenever Visualizers with different scaling
modes or capture sizes are released (e.g. from java
release() method).

Change-Id: I05cb9f925a296dceca91bafa9fe294ef2b2c2bd5
isualizer.cpp
0ca3cf94c0dfc173ad7886ae162c4b67067539f6 18-Apr-2012 Eric Laurent <elaurent@google.com> rename audio policy output flags

Change-Id: I27c46bd1d1b2b5f96b87af7d05b951fef18a1312
udioSystem.cpp
udioTrack.cpp
AudioFlinger.cpp
AudioPolicyService.cpp
etPlayer.cpp
oundPool.cpp
oneGenerator.cpp
eee482b84bb456e87fa42e8ad02fd2d803839586 17-Apr-2012 Glenn Kasten <gkasten@google.com> Merge "ToneGenerator requests fast track"
2120fe5bd4e14b53d8bef4a220e8a32830cf8cf9 11-Apr-2012 Glenn Kasten <gkasten@google.com> ToneGenerator requests fast track

Also add comments to AudioTrack::set() parameter list

Change-Id: I28c76e9d813778d86b15d75cf7f01a17c258b6d9
oneGenerator.cpp
77d837ae86c791c46ce019b58e09ac62780bf973 16-Apr-2012 Glenn Kasten <gkasten@google.com> Order of evaluation of parameters is not specified

Change-Id: Id545e54c2ec8ed2f70ede630542ed999a9b2c5e2
AudioRecord.cpp
705868c0f2a6e85a39addefe4db9f2130627c219 12-Apr-2012 Andreas Huber <andih@google.com> Make it possible to pass empty opaque data as (NULL, 0) to ICrypto.

Change-Id: Ifee1744890b645e008c9aff3783625a7bfbcff27
related-to-bug: 6275919
Crypto.cpp
4b75a9c8b93a90749bc5d22912ad0d96c12f4ecf 06-Apr-2012 Andreas Huber <andih@google.com> New API to support submitting encrypted buffers to the decoder.

Change-Id: I69dd60e43078c4211c6123cf6e0ce90e676bf873
related-to-bug: 6275919
Crypto.cpp
a4c5a550e2a3bc237179b8684e51718e05894492 29-Mar-2012 Eric Laurent <elaurent@google.com> audio policy: load audio hw modules.

Audio HW modules are now loaded upon request from audio policy manager
according to the configuration in audio_policy.conf.
Removed hard coded HW module loading by AudioFlinger at init time.
Added methods to IAudioFlinger and AudioPolicyInterface
to control the loading of audio HW modules.
Added methods to open an output or input stream on a specific hw module.

Change-Id: I361b294ece1a9b56b2fb39cc64259dbb73b804f4
AudioFlinger.cpp
1a9ed11a472493cac7f6dfcbfac2064526a493ed 21-Mar-2012 Eric Laurent <elaurent@google.com> audio policy: add configuration file

removed outputs to stream mapping cache in audio system: the output for a
given stream type must always be queried from audio policy manager as the cache
is not always updated fast enough by audioflinger callback.

removed AudioFlinger::PlaybackThread::setStreamValid() not used anymore if
stream to output mapping is not cached.

Change-Id: Ieca720c0b292181f81247259c8a44359bc74c66b
udioSystem.cpp
udioTrack.cpp
1bd139a2a68690e80398b70b27ca59550fea0e65 03-Apr-2012 Andreas Huber <andih@google.com> New Crypto services talking to the new crypto "HAL".

Change-Id: I69ed31e7a8b4d69d1209d2d516f94d258f072566
related-to-bug: 6275919
Crypto.cpp
2d6486f9112a6f0d23f17eaaad94bac62e16caab 02-Apr-2012 Glenn Kasten <gkasten@google.com> Merge "Update AudioParameter"
4a4a0959bca78e03e3c3f486ba17829c28314d8c 19-Mar-2012 Glenn Kasten <gkasten@google.com> AudioTrack client fast policy

Change-Id: I42ce691df3f586ac061b62237f35a263a0116f1f
udioTrack.cpp
edf47a8cba2d1d8985b64bf4a4fac661ba34f35a 01-Apr-2012 Glenn Kasten <gkasten@google.com> Update AudioParameter

Use definitions for AUDIO_PARAMETER_STREAM_* from <hardware/audio.h>
instead of repeating these constants.

String constants are const char * const.

Change-Id: I1c9ebe0bc9c827d719d3181aea55251c6db28ec4
udioParameter.cpp
a1472d9883e35edd280201c8be3191695007dfd4 30-Mar-2012 Marco Nelissen <marcone@google.com> Make AudioTrack/AudioRecord handle more than 2^32 frames

b/6160363
Change-Id: I471815012c6a113ec2c4dd7676e8fa288a70bc76
udioRecord.cpp
udioTrack.cpp
a011e35b22f95f558d81dc9c94b68b1465c4661d 30-Mar-2012 Eric Laurent <elaurent@google.com> implemented synchronous audio capture

Added the infrastructure to support the synchronization of playback and
capture actions on specific events.
The first requirement for this feature is to synchronize the audio capture
start with the full rendering of a given audio content.
The applications can further be extended to other use cases
(synchronized playback start...) by adding new synchronization events and
new synchronous control methods on player or recorders.

Also added a method to query the audio session from a ToneGenerator.

Change-Id: I51f1167290d9cafdf2fbcdf9e4785156973af44c
udioRecord.cpp
AudioRecord.cpp
559bf2836f5da25b75bfb229fec0d20d540ee426 28-Mar-2012 James Dong <jdong@google.com> AV Android make files changes

o plus a few file relocation: ActivityManager.cpp/h, SoundPool.h, etc
o remove some runtime dependencies to libandroid, libandroid_runtime, etc

Change-Id: I047a47c5fb361dd5cf85cd98798c39f629a75d10
oundPool.cpp
oundPool.h
oundPoolThread.h
15147270aa1c56503902b424f946389294875665 26-Mar-2012 Andreas Huber <andih@google.com> Merge "Provisional support for secure decryption of media streams."
ed3e3e046840d5bf1ca84a8c0cc097425e89d6d6 26-Mar-2012 Andreas Huber <andih@google.com> Provisional support for secure decryption of media streams.

Change-Id: Ib3982a9c960bfdb0cb7e1b174440b141b194cfbe
ndroid.mk
Crypto.cpp
MediaPlayerService.cpp
131c36ef343a604e9aee10c830ebe9c55a743379 26-Mar-2012 Eric Laurent <elaurent@google.com> Merge "reorganize SoundPool and JetPlayer code."
1f08900408927bd2b3bef59aaa15ab68ec765c06 26-Mar-2012 Colin Cross <ccross@android.com> Merge changes Ib4d0e0c0,Iea8f4a23

* changes:
libmedia: remove skia include
stagefright: remove dependency on skia
2e66a7896c9a9da3a15fc6cff9be28b4174d8719 26-Mar-2012 Eric Laurent <elaurent@google.com> reorganize SoundPool and JetPlayer code.

Reorganize SoundPool and JetPlayer code to be ready for the
creation of libmedia_native.

Split SoundPool between libsoundpool (JNI) and libmedia(sound pool implementation).
Remove dependencies on nativehelper/jni.h from JetPlayer.

Change-Id: I130c6014173b714329929dd82c5dfb70b757a610
ndroid.mk