History log of /frameworks/av/services/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6c2f7aeb10fb2050c27afa0212a1e167ca2809ec 21-Jun-2017 Shuzhen Wang <shuzhenwang@google.com> Camera: Add debug messages for camera latency

Log latency histogram of:
- processCaptureRequest call,
- dequeueBuffer call, and
- waiting time for handout count fall below max_buffers

Test: Camera CTS
Bug: 62651109
Change-Id: I5ee1cdb4139fa359f0887d6f6871884e28739340
(cherry picked from commit 686f644f981badd481d8781bf80b221544df7b1f)
amera/libcameraservice/Android.mk
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3IOStreamBase.cpp
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.h
amera/libcameraservice/device3/Camera3Stream.cpp
amera/libcameraservice/device3/Camera3Stream.h
amera/libcameraservice/utils/LatencyHistogram.cpp
amera/libcameraservice/utils/LatencyHistogram.h
d0b096052c753f916cb25f9a67c84b69dc5a1293 22-Jun-2017 Tomasz Wasilczyk <twasilczyk@google.com> Fix null pointer dereference.

Bug: b/62282239
Test: vendor verified it
Change-Id: I9d8560f07044c83f6ab58ef534514061f900319e
adio/RadioHalHidl.cpp
1f3a28ec6ba9bafa4e0a6f0ae0838c392ce43b73 19-Jun-2017 Andy Hung <hunga@google.com> Merge "Track: Check buffer size of static tracks" into lmp-dev am: 782a30d2ab am: a3416fc6b4 am: 42f2fab126 am: 483cf88382 am: f89b2427ad am: 7779f826d4 am: c343fd2846 am: 69b0154d59 am: 1d66db35e5 am: 849b3d0cdb am: ef0a06bae0
am: 9a5104ddf1

Change-Id: Ia053b76c9dc3aa7d2e953bfc2eadadb40ea16b93
9a5104ddf13b8b9a1dec28fbc0fcd2e3ae0668c5 19-Jun-2017 Andy Hung <hunga@google.com> Merge "Track: Check buffer size of static tracks" into lmp-dev am: 782a30d2ab am: a3416fc6b4 am: 42f2fab126 am: 483cf88382 am: f89b2427ad am: 7779f826d4 am: c343fd2846 am: 69b0154d59 am: 1d66db35e5 am: 849b3d0cdb
am: ef0a06bae0

Change-Id: I05967a0f1c610d9cbcbc674de6f7c5551024b16d
ef0a06bae01bf8e8ac17df204e4ef3917d911611 19-Jun-2017 Andy Hung <hunga@google.com> Merge "Track: Check buffer size of static tracks" into lmp-dev am: 782a30d2ab am: a3416fc6b4 am: 42f2fab126 am: 483cf88382 am: f89b2427ad am: 7779f826d4 am: c343fd2846 am: 69b0154d59 am: 1d66db35e5
am: 849b3d0cdb

Change-Id: Icad90fe25c2d54202216c28488f025ce76cedd3b
849b3d0cdba9e6b6c2e0142714c260b9e6e20567 19-Jun-2017 Andy Hung <hunga@google.com> Merge "Track: Check buffer size of static tracks" into lmp-dev am: 782a30d2ab am: a3416fc6b4 am: 42f2fab126 am: 483cf88382 am: f89b2427ad am: 7779f826d4 am: c343fd2846 am: 69b0154d59
am: 1d66db35e5

Change-Id: I962eeaea659e99f5a9f082ab2f479bbb4cface15
1d66db35e5da3eeaf311f95c65b0349c58bae280 19-Jun-2017 Andy Hung <hunga@google.com> Merge "Track: Check buffer size of static tracks" into lmp-dev am: 782a30d2ab am: a3416fc6b4 am: 42f2fab126 am: 483cf88382 am: f89b2427ad am: 7779f826d4 am: c343fd2846
am: 69b0154d59

Change-Id: Ifbb0da32f562fe5b1001e5dc2fcc3490305e694e
69b0154d59293511b3a4071342d9c3b769b4abfa 19-Jun-2017 Andy Hung <hunga@google.com> Merge "Track: Check buffer size of static tracks" into lmp-dev am: 782a30d2ab am: a3416fc6b4 am: 42f2fab126 am: 483cf88382 am: f89b2427ad am: 7779f826d4
am: c343fd2846

Change-Id: I72c4c8d74ffaa8b8bc03a265ae3ff06796bbeb5b
c343fd2846e78579f0a86d806a3cef01c71992b1 19-Jun-2017 Andy Hung <hunga@google.com> Merge "Track: Check buffer size of static tracks" into lmp-dev am: 782a30d2ab am: a3416fc6b4 am: 42f2fab126 am: 483cf88382 am: f89b2427ad
am: 7779f826d4

Change-Id: I6ec7ea434317d8d3c38314a9dc49f6b620e0db9f
7779f826d4b86b70ab1dba6fceb5a5cec1e0742a 19-Jun-2017 Andy Hung <hunga@google.com> Merge "Track: Check buffer size of static tracks" into lmp-dev am: 782a30d2ab am: a3416fc6b4 am: 42f2fab126 am: 483cf88382
am: f89b2427ad

Change-Id: I6d32c77c6e4cdd2868c9b58254a36e26fa10695a
f89b2427ad2d17b83354e3b03603f99af000b1bd 19-Jun-2017 Andy Hung <hunga@google.com> Merge "Track: Check buffer size of static tracks" into lmp-dev am: 782a30d2ab am: a3416fc6b4 am: 42f2fab126
am: 483cf88382

Change-Id: I745c19ce57ca9055b5cb11a9ac5072b0b8954cd6
483cf88382bd6c8b9523d9d57eafd693cd06aaec 19-Jun-2017 Andy Hung <hunga@google.com> Merge "Track: Check buffer size of static tracks" into lmp-dev am: 782a30d2ab am: a3416fc6b4
am: 42f2fab126

Change-Id: Ifb95a65ef32c643b94554c3904b84678d5459625
a3416fc6b4fc40e65f36dc83038a40a2d778ddfa 19-Jun-2017 Andy Hung <hunga@google.com> Merge "Track: Check buffer size of static tracks" into lmp-dev
am: 782a30d2ab

Change-Id: Ie27330ced83beccaed5a5a3d69ec6833be7e36e1
782a30d2abbf20bf617c19983829fe78cdc235f1 19-Jun-2017 Andy Hung <hunga@google.com> Merge "Track: Check buffer size of static tracks" into lmp-dev
ab73156cdf345dad1787b0d54e630bcf99fab8e1 17-Jun-2017 Andy Hung <hunga@google.com> AudioFlinger: Fix memory allocation for client-less tracks am: 1159ffd5e3 am: f242b890c4 am: 24ef54ecb8 am: a35816475b am: 1ce123cf91 am: d06e47540d am: 103b751e55 am: 0851e2f4c6 am: aff0808bcf am: 109247df7a am: a92d05fc1e am: 85c8828a32 am: 2eed9fd5a0
am: 59e144ffff

Change-Id: If062d74a0217798101a767536dada4d853238f08
59e144ffffaa23cbbfaf8ca4afff81b5c7211844 17-Jun-2017 Andy Hung <hunga@google.com> AudioFlinger: Fix memory allocation for client-less tracks am: 1159ffd5e3 am: f242b890c4 am: 24ef54ecb8 am: a35816475b am: 1ce123cf91 am: d06e47540d am: 103b751e55 am: 0851e2f4c6 am: aff0808bcf am: 109247df7a am: a92d05fc1e am: 85c8828a32
am: 2eed9fd5a0

Change-Id: I452dc4e48876a906a4d44ae40cc97a815ddd81d2
2eed9fd5a02ab67ad141b515b944b6dc5fc818a3 17-Jun-2017 Andy Hung <hunga@google.com> AudioFlinger: Fix memory allocation for client-less tracks am: 1159ffd5e3 am: f242b890c4 am: 24ef54ecb8 am: a35816475b am: 1ce123cf91 am: d06e47540d am: 103b751e55 am: 0851e2f4c6 am: aff0808bcf am: 109247df7a am: a92d05fc1e
am: 85c8828a32

Change-Id: I2ac2e1e00639f686905900308b3f675925e44a9d
85c8828a32679eb960d21ac992238471d4b2da3d 17-Jun-2017 Andy Hung <hunga@google.com> AudioFlinger: Fix memory allocation for client-less tracks am: 1159ffd5e3 am: f242b890c4 am: 24ef54ecb8 am: a35816475b am: 1ce123cf91 am: d06e47540d am: 103b751e55 am: 0851e2f4c6 am: aff0808bcf am: 109247df7a
am: a92d05fc1e

Change-Id: I73340a812c24ea421d68fa88f6b18cfa4867a0a5
a92d05fc1ec048541d888c4ef72ee63617ee18f1 17-Jun-2017 Andy Hung <hunga@google.com> AudioFlinger: Fix memory allocation for client-less tracks am: 1159ffd5e3 am: f242b890c4 am: 24ef54ecb8 am: a35816475b am: 1ce123cf91 am: d06e47540d am: 103b751e55 am: 0851e2f4c6 am: aff0808bcf
am: 109247df7a

Change-Id: I4f55d2cdd5ef430742e3b6e3680603d2a9618593
109247df7a1d7328f2c6f8f39d0987d7f6395ab2 17-Jun-2017 Andy Hung <hunga@google.com> AudioFlinger: Fix memory allocation for client-less tracks am: 1159ffd5e3 am: f242b890c4 am: 24ef54ecb8 am: a35816475b am: 1ce123cf91 am: d06e47540d am: 103b751e55 am: 0851e2f4c6
am: aff0808bcf

Change-Id: I4c7698da6176547fd9ebc23ae52e2e9e53e83f61
aff0808bcf454041bccc287ddd9a0ed144bee117 17-Jun-2017 Andy Hung <hunga@google.com> AudioFlinger: Fix memory allocation for client-less tracks am: 1159ffd5e3 am: f242b890c4 am: 24ef54ecb8 am: a35816475b am: 1ce123cf91 am: d06e47540d am: 103b751e55
am: 0851e2f4c6

Change-Id: I8401f004580f03d23a7423468f6966aba768e783
0851e2f4c6abe3340259b0e02b61857215762281 17-Jun-2017 Andy Hung <hunga@google.com> AudioFlinger: Fix memory allocation for client-less tracks am: 1159ffd5e3 am: f242b890c4 am: 24ef54ecb8 am: a35816475b am: 1ce123cf91 am: d06e47540d
am: 103b751e55

Change-Id: I3d03741eca351ad131d5bae700a5024fda36e1be
103b751e5511c2cf4b250455e07ec1e1fc4befe2 17-Jun-2017 Andy Hung <hunga@google.com> AudioFlinger: Fix memory allocation for client-less tracks am: 1159ffd5e3 am: f242b890c4 am: 24ef54ecb8 am: a35816475b am: 1ce123cf91
am: d06e47540d

Change-Id: I22405b81c7351961f8aca57289a15cc99e67525a
1ce123cf912a00547830fc742b927cf72007ff86 17-Jun-2017 Andy Hung <hunga@google.com> AudioFlinger: Fix memory allocation for client-less tracks am: 1159ffd5e3 am: f242b890c4 am: 24ef54ecb8
am: a35816475b

Change-Id: I77aa056b71679b0d0d6703a59f46c788e77d5351
a35816475b907f3cead491f1c39ea72967f49fe5 17-Jun-2017 Andy Hung <hunga@google.com> AudioFlinger: Fix memory allocation for client-less tracks am: 1159ffd5e3 am: f242b890c4
am: 24ef54ecb8

Change-Id: I0b413afa5c0e41fadcd0320f7481172cc2398018
24ef54ecb8e825f51b2750dbb8b2ea2139cebd8c 17-Jun-2017 Andy Hung <hunga@google.com> AudioFlinger: Fix memory allocation for client-less tracks am: 1159ffd5e3
am: f242b890c4

Change-Id: I5bd38c33b13de93e641e50c39cdfe37dbae59923
f4aeab2bd69bead05ed75ae3254f53a6ab2316b5 13-Jun-2017 Andy Hung <hunga@google.com> Track: Check buffer size of static tracks

Merged-In: Ia7edd9a802905214a27961dbcec6352f6ef98f73
Test: Native POC
Bug: 38340117
Change-Id: I633caf563d3607dbe4b9be10be1687efce33469c
udioflinger/Tracks.cpp
9eef26c39af2f69b921e9d2e85d830bddcc31829 15-Jun-2017 Eino-Ville Talvala <etalvala@google.com> CameraService: ZslProcessor: Don't call back into BQ from callback

This causes a deadlock.

Test: Camera1 CTS passes
Bug: 62648829
Change-Id: I88aed08fe952fead2b356861ba0a9e24c0535e92
amera/libcameraservice/api1/client2/ZslProcessor.cpp
amera/libcameraservice/api1/client2/ZslProcessor.h
18ffb8304a8bf73c12c03948d1781f2ef1311243 14-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "added audio policy configuration files for generic target" into oc-dev
87977a493692e39f42547b986175b68d83c57d10 20-Feb-2017 Eric Laurent <elaurent@google.com> added audio policy configuration files for generic target

Bug: 62524944
Test: make
Change-Id: Ifa8b523d3f1f09dfb6f8e88fab12e170b628dfb5
udiopolicy/config/audio_policy_configuration_generic.xml
udiopolicy/config/primary_audio_policy_configuration.xml
1159ffd5e3f832206982d45a7b030b943cc4775e 14-Feb-2017 Andy Hung <hunga@google.com> AudioFlinger: Fix memory allocation for client-less tracks

Test: Ringtone with BT
Bug: 35350587
Bug: 38340117
Change-Id: If247d319d58f8f4d18b49f58ec950491871ebb2d
(cherry picked from commit afb31487f3156a7284d2f0d06646c7bc00d99537)
udioflinger/Tracks.cpp
479a20f0ee5e9033abd2860279b1261fc86ea542 06-Jun-2017 Jiyong Park <jiyong@google.com> fix: NCs in mediaextractor

Bug: 62255959
Test: adb shell monkey -p com.google.android.deskclock -p
com.android.calculator2 -p com.google.android.contacts -p
com.android.launcher -p com.google.android.launcher -p com.android.mms
-p com.google.android.apps.messaging -p com.android.phone -p
com.google.android.dialer -p com.android.providers.downloads.ui -p
com.android.settings -p com.google.android.calendar -p
com.google.android.GoogleCamera -p com.google.android.apps.photos -p
com.google.android.gms -p com.google.android.setupwizard -p
com.google.android.googlequicksearchbox -p
com.google.android.packageinstaller -p
com.google.android.apps.nexuslauncher -c
android.intent.category.LAUNCHER --ignore-security-exceptions
--monitor-native-crashes -s 490 -v -v -v 125000
Change-Id: If0aab0bca3237d1140dd8153ec614479c3c0ba2e
ediaextractor/main_extractorservice.cpp
7921524cce62d03edad53e470fc312424a9b9e28 02-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "add permission check for all radio API calls" into oc-dev
0e37854e54944892b15a72ed4633f0347dbc2cb8 02-Jun-2017 Keun-young Park <keunyoung@google.com> add permission check for all radio API calls

- RadioManager is system API and should be protected with
android.permission.ACCESS_FM_RADIO

bug: 62264079
Test: build
Change-Id: Idab5a6eea0e1bf03acc771b2c266ba7b65d0a805
adio/RadioService.cpp
5d6ebe53418ae8783ac295a8753e287fbb187868 01-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Free buffers more aggressively" into oc-dev
160078a07033fb015ecaa46e7249d7702be2a169 01-Jun-2017 Glenn Kasten <gkasten@google.com> Merge "Fix copy/paste errors in use of AAUDIO_FORMAT_UNSPECIFIED" into oc-dev
89954d931d7b952597dc8e29e7a87da31a4ae0b1 22-May-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: Free buffers more aggressively

This change attempts to free buffers managerd by
BufferManager more aggresively to reduce memory pressure.

Also fix a small buffer accounting issue: check detachBuffer
actually returns a non-null buffer.

Test: keep taking single shot in GCA, CTS
Bug: 38483630
Change-Id: I6c64d1dc2244cec4f1300bbf3992f66f2167eed2
amera/libcameraservice/device3/Camera3BufferManager.cpp
amera/libcameraservice/device3/Camera3BufferManager.h
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.h
37a466ae847cf08fc346e629fe4cf964ad67063f 31-May-2017 Glenn Kasten <gkasten@google.com> Fix copy/paste errors in use of AAUDIO_FORMAT_UNSPECIFIED

Bug: 62222736
Test: builds OK
Change-Id: Iabdac7a3d0893699eb72f85985002535c8f619c7
boeservice/AAudioServiceStreamShared.cpp
9dca9824da74d50be02bc81f539cc77b7bde678a 26-May-2017 Phil Burk <philburk@google.com> aaudio: remove deprecated aaudio_audio_format_t

Should be using aaudio_format_t

Bug: 62141619
Test: compile and run CTS test_aaudio.cpp
Change-Id: Ibbba2769dfd8bcd9c108d87c19fe1fad2ba43df1
Signed-off-by: Phil Burk <philburk@google.com>
boeservice/AAudioServiceStreamBase.h
boeservice/AAudioServiceStreamMMAP.cpp
d08f04f33b80c37bd3889f461846d59f70e726c7 27-May-2017 Phil Burk <philburk@google.com> Merge "aaudio: reduce logspam, improve critical logs" into oc-dev
cf5f6d2825d9a8430a291042ca9c6f68e5b666d0 26-May-2017 Phil Burk <philburk@google.com> aaudio: reduce logspam, improve critical logs

This will make AAudio less annoying and easier to debug.

Bug: 62080950
Test: look in logcat
Change-Id: Id7ae26a212f83ea8be0b285bd20334eb48607be8
Signed-off-by: Phil Burk <philburk@google.com>
boeservice/AAudioEndpointManager.cpp
boeservice/AAudioService.cpp
boeservice/AAudioServiceEndpoint.cpp
boeservice/AAudioServiceEndpointCapture.cpp
boeservice/AAudioServiceStreamBase.cpp
boeservice/AAudioServiceStreamMMAP.cpp
boeservice/AAudioServiceStreamShared.cpp
4d351037a53438ca0355efe6a845d29e3ef11bec 26-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: fix new device register logic" into oc-dev
92e3321e41e10f2e07a71f9512a6cadef7f40b64 25-May-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix new device register logic

Test: smoking test GCA, CTS
Bug: 38452093
Change-Id: I984cfbb61a7c4983e27f250f9825f9418cf940e9
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/common/CameraProviderManager.cpp
433ecd85ef10284a71c4ea57279f53427fb9983d 25-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "aaudio: lower latency using MMAP capture" into oc-dev
f9637d6311cf65a27c2b26d3ff2a094a96f9a8e1 25-May-2017 Josh Gao <jmgao@google.com> Merge "media{codec, extractor}: update seccomp policy." into oc-dev
87c9f646a94259d7c321c3b3d5947fa1778f5ac2 17-May-2017 Phil Burk <philburk@google.com> aaudio: lower latency using MMAP capture

MMAP can be enabled by setting system properties.

Bug: 38267780
Test: input_monitor.cpp
Change-Id: I5e86fd1d9baef4fe59837ccbca7971acbb54d8b5
Signed-off-by: Phil Burk <philburk@google.com>
boeservice/AAudioEndpointManager.cpp
boeservice/AAudioEndpointManager.h
boeservice/AAudioServiceEndpoint.cpp
boeservice/AAudioServiceEndpoint.h
boeservice/AAudioServiceEndpointCapture.cpp
boeservice/AAudioServiceEndpointCapture.h
boeservice/AAudioServiceEndpointPlay.cpp
boeservice/AAudioServiceEndpointPlay.h
boeservice/AAudioServiceStreamBase.cpp
boeservice/AAudioServiceStreamMMAP.cpp
boeservice/AAudioServiceStreamShared.cpp
boeservice/AAudioServiceStreamShared.h
boeservice/Android.mk
0f0c0e7e9dbe18ba58f8cb41cd525863634f47e8 24-May-2017 Josh Gao <jmgao@google.com> media{codec, extractor}: update seccomp policy.

Update the mediacodec and mediaextractor seccomp policies to allow
getpid and gettid, which started being used after this CL:
https://android-review.googlesource.com/c/390273/

Bug: http://b/38508369
Test: debuggerd -b `pidof media.codec`
Test: debuggerd -b `pidof media.extractor`
Change-Id: I1be61f645fa475856fa814747a5740689492aa2b
ediacodec/seccomp_policy/mediacodec-arm.policy
ediaextractor/seccomp_policy/mediaextractor-arm.policy
ediaextractor/seccomp_policy/mediaextractor-arm64.policy
ediaextractor/seccomp_policy/mediaextractor-x86.policy
da6b9eafb5de2434717aea264ad61b025bc4fe7f 24-May-2017 Phil Burk <philburk@google.com> Merge "aaudio: fix mixer volume to match AudioTrack" into oc-dev
e97d86657de7b733d1b767caa6301549e3b00e56 24-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Handle consumer side detach in BufferManager" into oc-dev
37dad7380c04cd4343999ffba012a0542482acea 23-May-2017 Phil Burk <philburk@google.com> aaudio: fix mixer volume to match AudioTrack

Bug: 62033564
Test: write_sine.cpp - play with MMAP and with Legacy and compare by ear

Change-Id: I4d142f872fabb732cab01bec8c17d821232ab2d1
Signed-off-by: Phil Burk <philburk@google.com>
boeservice/AAudioServiceEndpoint.cpp
6aa929c9296180abac526f594137f18c38620c62 19-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "audio policy manager: do not reapply same forced usage" into oc-dev
46260c37420f82a6e664b740365b2537767e5a76 18-May-2017 Kevin Rocard <krocard@google.com> Merge "audiopolicy: Two session can not offload concurrently" into oc-dev
8dc87a60e69f462e0382d025c335e45699025b48 17-May-2017 Eric Laurent <elaurent@google.com> audio policy manager: do not reapply same forced usage

Skip systematic audio path and volume reevaluation when the new
forced configuration for the selected usage is the same as current one.

Bug: 38276985
Test: try repro steps in b/38276985. Check regressions with audio routing for music
and calls over speaker, headset and Bluetooth

Test: connect BT A2DP and launch CNN
Change-Id: Id43a5270c666065e099d02d9e52de86b20cb8039
udiopolicy/managerdefault/AudioPolicyManager.cpp
fd76cf5246c714a1c1ef10b2b974cacf0077f216 15-May-2017 Shuzhen Wang <shuzhenwang@google.com> Camera: Handle consumer side detach in BufferManager

- BufferQueue consumer may detach buffers, and BufferManager isn't
aware. Hook up onBufferRemoved callback so that BufferManager's internal
handoutBuffer and attachedBuffer counts can be updated when a buffer
is detached.
- Deleted some code that's not exercised any more.

Test: Camera CTS and burst capture.
Bug: 38238747
Change-Id: I6861da6e013fe5609907f807639c5d691c0c3af9
amera/libcameraservice/device3/Camera3BufferManager.cpp
amera/libcameraservice/device3/Camera3BufferManager.h
amera/libcameraservice/device3/Camera3OutputStream.cpp
c2bc4385fff526318caaecaa5dcc92479378bb73 17-May-2017 Phil Burk <philburk@google.com> Merge "aaudio: control MMAP mode using system properties" into oc-dev
c8f69a08a409fd163873d725c63f8d60259ae21d 12-May-2017 Phil Burk <philburk@google.com> aaudio: control MMAP mode using system properties

To facilitate testing of MMAP mode.

Bug: 38268547
Test: set properties, see framesPerBurst in write_sine_callback.cpp
Change-Id: I6e15c563215017f6a5020d89ac312ff8331afc4f
Signed-off-by: Phil Burk <philburk@google.com>
boeservice/AAudioServiceEndpoint.cpp
boeservice/AAudioServiceEndpoint.h
boeservice/AAudioServiceStreamMMAP.cpp
c03b7307eba75fab7e617be5ad1f3f5a36f3f629 15-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Advertise only unique API1 compatible devices" into oc-dev
169753cd5f71ba92560e993bb7cb461d2f094272 06-Mar-2017 Kevin Rocard <krocard@google.com> audiopolicy: Two session can not offload concurrently

Previously the patch I98a8913d6faf5092a1e43a0bdd0f1ce1482221a9
forbade two tracks from different application to be offloaded
concurrently.

Concurrent offload is only needed for back to back playback...
Detect this use case by checking the session id instead of the
PID.

Test: call & play music & assistant
Test: run new CTS testConcurentPlayAudio
Bug: 35841692
Change-Id: I2c09c54adedf12644205bef115f1a2e16b05de91
Signed-off-by: Kevin Rocard <krocard@google.com>
udiopolicy/common/managerdefinitions/include/AudioOutputDescriptor.h
udiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
9ec59fc5d016a609adffdb7e68236b9d5d05254d 12-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Close acquire fences on failed buffers" into oc-dev
d1cdbf268afaef3f70768d45f9aed14e64689530 12-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Re-enumarate new providers" into oc-dev
cdb74a6840fc4ae594afadf5eedc1d27106989ea 11-May-2017 Emilian Peev <epeev@google.com> Camera: Advertise only unique API1 compatible devices

Providers could have devices with same id but different
API versions. The total number of API1 compatible devices
needs to consider only the unique ids in this case.

Bug: 38237265
Test: Manual using application
Change-Id: I5a31c3cd28f00e8af3029213711505e4075a61b2
amera/libcameraservice/common/CameraProviderManager.cpp
amera/libcameraservice/common/CameraProviderManager.h
afc598dbbcc002123ecb8923f1a5b345fda801fb 11-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "DO NOT MERGE Bring Metrics summarizers over from master" into oc-dev
c58cf4c4104b001425f9d4a36f3e5441874efd3d 11-May-2017 Emilian Peev <epeev@google.com> Camera: Close acquire fences on failed buffers

Buffers that didn't get a chance to be processed
might still hold valid acquire fences. Check and
close those if necessary.

Bug: 38229510
Test: Manual using application
Change-Id: I8e823a655cc30ed966e277ace090e96c64ba1c8c
amera/libcameraservice/device3/Camera3Device.cpp
aee727dd2f16bf299f738542b5e72fc72671f770 04-May-2017 Emilian Peev <epeev@google.com> Camera: Re-enumarate new providers

Camera service should enumarate newly added
camera providers.

Bug: 37592461
Test: Manual using camera application
Change-Id: I4c886b99127d23148c70ce1e1e773cb8393d91b4
amera/libcameraservice/CameraFlashlight.cpp
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/common/CameraProviderManager.cpp
amera/libcameraservice/common/CameraProviderManager.h
31e436e23a2a6f7d2de57158a1ae6542098a8e63 11-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "aaudio: plug some resource leaks" into oc-dev
24fd2f7d2900797b1300d6bc89d28bd94a31c3cb 05-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix wait time for audio threads in suspend mode" into oc-dev
942bdc0aebc88dc8b12c0e7742ec0003bbb8b80f 03-May-2017 Phil Burk <philburk@google.com> aaudio: plug some resource leaks

Close some file descriptors for shared memory that were not getting closed.

Bug: 37947848
Test: see bug for test procedure
Change-Id: Icdc13188b0a49d08b67babff0852c3a4eda8fd2b
Signed-off-by: Phil Burk <philburk@google.com>
boeservice/AAudioServiceStreamBase.cpp
boeservice/AAudioServiceStreamBase.h
boeservice/AAudioServiceStreamMMAP.cpp
boeservice/AAudioServiceStreamMMAP.h
boeservice/AAudioServiceStreamShared.cpp
boeservice/SharedRingBuffer.cpp
8e301b17a297234757959ace170e3d77ef87b5a6 05-May-2017 Phil Burk <philburk@google.com> Merge "aaudio: add setPerformanceMode()" into oc-dev
bc4040efd06835a620d97a5dc8cc2fd0c8830de3 05-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "audioflinger: Do not report underruns for stopped or paused tracks" into oc-dev
1bb9082596c9cac2995dc9b4465a7c6d5666d099 03-May-2017 rago <rago@google.com> Fix wait time for audio threads in suspend mode

Better estimation of wait time in suspended audio threads.

Bug: 34772697

Test: phone calls with BT headset.
Change-Id: Icf99c0671def810b57332a321e4de4680697715b
udioflinger/Threads.cpp
udioflinger/Threads.h
e2fbb59e729f6c3cade3b531f6f6411417ccbf40 02-May-2017 Phil Burk <philburk@google.com> aaudio: add setPerformanceMode()

The performance mode affects the latency and the implementation of the
data path.

MMAP is still disabled for now.

Bug: 37867485
Test: write_sine.cpp
Change-Id: I9bf5d5d13d1047d5ace69bd5ebdce7b6d65c14e7
Signed-off-by: Phil Burk <philburk@google.com>
boeservice/Android.mk
a66d3899f7d13e69ee451f1071f0d999678803ce 04-May-2017 Mikhail Naganov <mnaganov@google.com> audioflinger: Do not report underruns for stopped or paused tracks

PlaybackThread::Track is missing checks for the track state
when reporting underruns. These checks present on other instances
when tallyUnderrunFrames is being called.

This eliminates fake underrun reportings when playing
multichannel tracks via deep buffer.

Bug: 36181621
Test: play multichannel track and check underrun count at the end
Change-Id: Ieff338b33807e66df91234d85b782ee383fe95b9
udioflinger/Tracks.cpp
63eb7e79cf94662a5412fd6e473cf12f5f48eef0 04-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Cleanup 'CameraModule' dependend code" into oc-dev
9b6cd785f3854e47e1874df60163b0e8207bc5d9 04-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "audio policy: always provide a valid device address when opening a stream" into oc-dev
441f2ccb103fdb6fe6409eac870ea30ee3ccfb33 04-May-2017 Phil Burk <philburk@google.com> Merge "aaudio: Fix getFramesWritten() for callback mode." into oc-dev
845eb1e48ddaa3af9be8dc84b4b58b24fba46e6f 03-May-2017 Ray Essick <essick@google.com> DO NOT MERGE Bring Metrics summarizers over from master

Bring media metrics 'summarizer' construct across from master so
that we can use it in oc-dev.
This is the functionality described in b/36736083, along
with a bug fix (b/37276863).
Simple CP didn't work because of some header file movement.

the do-not-merge is because this is already in master as a couple
of separate commits and we don't want any auto-merger complaints.
(The Merged-in line documents the commit into master)

Bug: 37915543
Test: read 'dumpsys media.metrics -summary' output
Merged-in: I325c2d2b25720d384bcc75b73c97e5b3d8fa9731
Change-Id: I8d1c29c066f6289863e99379e4bd5989af5688ea
ediaanalytics/Android.mk
ediaanalytics/MediaAnalyticsService.cpp
ediaanalytics/MediaAnalyticsService.h
ediaanalytics/MetricsSummarizer.cpp
ediaanalytics/MetricsSummarizer.h
ediaanalytics/MetricsSummarizerCodec.cpp
ediaanalytics/MetricsSummarizerCodec.h
ediaanalytics/MetricsSummarizerExtractor.cpp
ediaanalytics/MetricsSummarizerExtractor.h
ediaanalytics/MetricsSummarizerPlayer.cpp
ediaanalytics/MetricsSummarizerPlayer.h
ediaanalytics/MetricsSummarizerRecorder.cpp
ediaanalytics/MetricsSummarizerRecorder.h
e301410b8495a3702e21019e92d44ade2a3f81d1 03-May-2017 Eric Laurent <elaurent@google.com> audio policy: always provide a valid device address when opening a stream

Treble audio HAL mandates that a valid device address is passed when
opening an output or input stream and teh device type requires and
address.

Bug: 37905534
Test: USB capture at various sampling rates. Audio playback and capture regression
Change-Id: I12f2128120b1bbe8530e8c2428e3e2cba1ba1535
udiopolicy/managerdefault/AudioPolicyManager.cpp
4c5129b410884ec0400cbe65fce56d0ade12d11b 29-Apr-2017 Phil Burk <philburk@google.com> aaudio: Fix getFramesWritten() for callback mode.

Plus other small fixes for CTS and cleanup

Bug: 37910599
Test: test_aaudio.cpp
Change-Id: I65a23daf99e9de857d3ce9fd12e9f11c614e298e
Signed-off-by: Phil Burk <philburk@google.com>
boeservice/AAudioServiceStreamMMAP.cpp
478d5df3a0e1693669f5809176d5c7f6e8c9aa88 01-May-2017 Phil Burk <philburk@google.com> aaudio: fix mmap result checking

Was checking for nullptr not MAP_FAILED

Bug: 33398120
Test: see mmap() docs
Change-Id: I02d178cb0188f8b0d6cd009699dccc7c97952e4b
Signed-off-by: Phil Burk <philburk@google.com>
boeservice/SharedRingBuffer.cpp
c5cbb87d00ead068a7088db4060bce1c0e699b8c 27-Apr-2017 Eino-Ville Talvala <etalvala@google.com> Camera service: Don't crash if the camera HAL dies mid-use.

Check for transaction errors in all calls to the HIDL interface;
return DEAD_OBJECT consistently if a transaction error occurs.

Test: Camera CTS does not regress; killing camera HAL does not kill camera service.
Bug: 37748853
Change-Id: Iab3ad08376e164db340f8f29c3cfc7fdf261cc00
amera/libcameraservice/device3/Camera3Device.cpp
0e69c9e25152b08a188ef254065e044594eba896 01-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "aaudio: apply volume in the MMAP data path" into oc-dev
e572f469de5dca1078a79d3d80e5b04f96ae7505 20-Apr-2017 Phil Burk <philburk@google.com> aaudio: apply volume in the MMAP data path

The volume scaling is in AudioStreamInternal and not the mixer
because we will need volume scaling in EXCLUSIVE mode too.

Bug: 37518243
Test: play a tone using NativeOboe app then press volume keys
Change-Id: Ibbac9770ea4493f8ade64681be86f109a92803cd
Signed-off-by: Phil Burk <philburk@google.com>
boeservice/AAudioServiceEndpoint.cpp
f53f66edb3b06d1df5caf1fa806f7ed95305a4cf 11-Apr-2017 Emilian Peev <epeev@google.com> Camera: Cleanup 'CameraModule' dependend code

CameraModule is already part of the HIDL wrapper and
is no longer needed in the service code.
Add extra logic in camera provder manager for identifying
camera API1 compatible devices.

Bug: 34392075
Test: Complete Camera CTS
Change-Id: I64a49e9091557c88859872d0c599c5be378db8b5
amera/libcameraservice/Android.mk
amera/libcameraservice/CameraFlashlight.cpp
amera/libcameraservice/CameraFlashlight.h
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/Camera2Client.h
amera/libcameraservice/api1/CameraClient.cpp
amera/libcameraservice/api1/CameraClient.h
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
amera/libcameraservice/common/Camera2ClientBase.cpp
amera/libcameraservice/common/Camera2ClientBase.h
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/common/CameraModule.cpp
amera/libcameraservice/common/CameraModule.h
amera/libcameraservice/common/CameraProviderManager.cpp
amera/libcameraservice/common/CameraProviderManager.h
amera/libcameraservice/device1/CameraHardwareInterface.cpp
amera/libcameraservice/device1/CameraHardwareInterface.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
6527a56de00c47887e28eee03bbdd28b2472ef2e 27-Apr-2017 John W. Bruce <juce@google.com> Prefix ENABLE_MEDIADRM_64 with TARGET_

This build-time flag should be prefixed.

Bug: 37039525
Test: Built OS
Change-Id: I09ab0a1ed672a88db5741102d87973eb9267efb3
ediadrm/Android.mk
c20c484ba51a6d85e89998f6de6fcb244715e17b 28-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topic 'device_version_cleanup' into oc-dev

* changes:
Camera: Cleanup 'Camera2Client' device dependend code
Camera: Remove RAW boost value override logic
Camera: Remove AE pre-capture trigger cancel override
Camera: Make device related code version agnostic
9ba03c881f92f1bd62b28f1c38dc7579382ebdbc 27-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "audioflinger: improve mmap stream volume" into oc-dev
4271c82efd7c59f6e75e09fa748769bad4cfeee2 27-Apr-2017 Pawin Vongmasa <pawin@google.com> Make IOmx registration independent of IOmxStore

This CL allows IOmx to attempt registration even when IOmxStore fails to
register.

Test: Manual use of Camera

Bug: 37657124
Bug: 37726880
Change-Id: I108c507326ee55c17acc524233e70afa5cb5a4f0
ediacodec/main_codecservice.cpp
12b97c8d659c48923e42ce4abd2b22b3b7a9909a 27-Apr-2017 Pawin Vongmasa <pawin@google.com> Merge "Stub implementation for IOmxStore." into oc-dev
7e8d4590f75afc2b271e7d2e5762ac43d56728db 10-Apr-2017 Emilian Peev <epeev@google.com> Camera: Cleanup 'Camera2Client' device dependend code

Bug: 34392075
Test: Manual using application.
Change-Id: I365b83c9cfbfe3ddbd9d41f2aa9788490b87b5cf
amera/libcameraservice/api1/client2/FrameProcessor.cpp
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
2a53da4379f1a5624203673cce8c1773b0cffa50 10-Apr-2017 Emilian Peev <epeev@google.com> Camera: Remove RAW boost value override logic

RAW boost value will be inserted by HIDL wrapper. The logic
needs to move there.

Bug: 34392075
Test: runtest -x
cts/tests/camera/src/android/hardware/camera2/cts/DngCreatorTest.java
Change-Id: I7d4321d728eba11b5ec1345536bb669d70f3cffc
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
7e25e5e2195823b4b9cbe61c072b9267297cab34 07-Apr-2017 Emilian Peev <epeev@google.com> Camera: Remove AE pre-capture trigger cancel override

Bug: 34392075
Test: runtest -x
cts/tests/camera/src/android/hardware/camera2/cts/StillCaptureTest.java
-m testAePrecaptureTriggerCancelJpegCapture
Change-Id: I0e632c83fb3ae0e4df26fe35bf1ef8441c1f20fa
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
08dd245c7c30900637197065213fbaa2b2a5c1ee 06-Apr-2017 Emilian Peev <epeev@google.com> Camera: Make device related code version agnostic

Camera device related code should be agnostic w.r.t.
device version as much as possible. Specifically the
following requirements must hold true:
- Since support for devices 3.0&3.1 is deprecated
"ANDROID_QUIRKS_USE_PARTIAL_RESULT" is no longer considered.
- "ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS" is always
used instead of the deprecated "ANDROID_SCALER_AVAILABLE_JPEG_SIZES".
- Buffer manager for camera streams is used for dynamic buffer
allocation.
- "flush" is always used instead of waiting for buffers to drain.
- Similar to "flush" stream "tearDown" is always available.
- Dead code handling buffer registration is removed.

Bug: 34392075
Test: Manual using camera application
Change-Id: If1b215f785ba61c6991fdf163d4eb18733690471
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/common/FrameProcessorBase.cpp
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3Stream.cpp
amera/libcameraservice/device3/Camera3Stream.h
9706527f86fc9895ffd0bf288bab6a2b5749a822 25-Apr-2017 Andy Hung <hunga@google.com> Merge "VolumeShaper: improve logging and dumpsys" into oc-dev
52257b75115135821bba562ac35c0c6325a1e100 25-Apr-2017 Pawin Vongmasa <pawin@google.com> Stub implementation for IOmxStore.

Test: Small CtsMediaTestCases

Bug: 37657124
Change-Id: I5728a12d000223231600ab3c3ab4eb044dd1847d
ediacodec/main_codecservice.cpp
da540db0fc21bc9319d9602aefe1a109d00a7e6c 20-Apr-2017 Andy Hung <hunga@google.com> VolumeShaper: improve logging and dumpsys

Test: CTS and dumpsys
Bug: 37536598
Change-Id: I9a838a8605defde3aaf42a872e48f01425df0f0e
udioflinger/Tracks.cpp
9934951f3476a2d01d8a4c2a9447f31ba365021d 24-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Allow fstatfs64 syscall for mediacodec/extractor" into oc-dev
1516b02c1a4ab5739bffea9d75ad9b52fc1d5b91 24-Apr-2017 Dimitry Ivanov <dimitry@google.com> Allow fstatfs64 syscall for mediacodec/extractor

This syscall is used by the linker to detect files located on tmpfs

Bug: http://b/37245203
Bug: http://b/37590327
Test: boot an angler and check that mediacodec does not crash
Change-Id: I7147063db7d6b8ec39a25d39b60e8e6882addf6e
ediacodec/seccomp_policy/mediacodec-arm.policy
ediaextractor/seccomp_policy/mediaextractor-arm.policy
ediaextractor/seccomp_policy/mediaextractor-arm64.policy
ediaextractor/seccomp_policy/mediaextractor-x86.policy
7d25f0f525ffa97687dde3636a354694d59cbf37 24-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Clear available callback buffers during recording stop" into oc-dev
dff774afa22569774eb2c8c25b1b3f934badea4b 22-Apr-2017 Eric Laurent <elaurent@google.com> audioflinger: improve mmap stream volume

First try to use HW volume control and then fall back
to volume control in AAudio service.

Bug: 37518243
Test: play a sound and check AAudio volume callback is called
when pressing volume keys.

Change-Id: Ie18be9f553ae23c247974d8923e7dcddeb1047c8
udioflinger/Threads.cpp
6534425f9f508561928fa5c39dd315fd4c354060 21-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "audioflinger: fix mmap stream volume" into oc-dev
698f0a75c3740ac100b0b3ab89a6ab2453a3dadc 05-Apr-2017 Emilian Peev <epeev@google.com> Camera: Clear available callback buffers during recording stop

Make sure we don't keep any stale available callback buffer
references after recording stops. This can lead to resource
leaks.

Bug: 36478361
Test: Complete Camera/Camera2 CTS tests
Change-Id: I9f72b784ba3ae1cf9f9b16064a13b7ba8a1d0394
amera/libcameraservice/api1/CameraClient.cpp
4aa3bd0474befeff4d410b5ef5dad630ea4d2879 21-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "aaudio: fix SHARED MMAP mode in server plus other bugs" into oc-dev
71f35bb687476694882a617ba4a810a0bb56fe23 14-Apr-2017 Phil Burk <philburk@google.com> aaudio: fix SHARED MMAP mode in server plus other bugs

Fixed some buffer miscalculations, and some NPEs in the close() code.
Added debugging and some general cleanup.
Fixed data conversion.
Fixed start/pause/flush in server.
Added reference counting in server for endpoints.
Programs can now be ran more than once.
General code cleanup.
Reconnect with service if server dies.
Move stop() logic into server for better synchronization.
Add sleep to prevent race condition when closing an MMAP stream.

Bug: 33398120
Test: two write_sine_callback.cpp can be run simultaneously
Change-Id: Ibb006215a498868c222228d675ff961d7e0bf514
Signed-off-by: Phil Burk <philburk@google.com>
boeservice/AAudioEndpointManager.cpp
boeservice/AAudioEndpointManager.h
boeservice/AAudioMixer.cpp
boeservice/AAudioMixer.h
boeservice/AAudioService.cpp
boeservice/AAudioService.h
boeservice/AAudioServiceEndpoint.cpp
boeservice/AAudioServiceEndpoint.h
boeservice/AAudioServiceStreamBase.cpp
boeservice/AAudioServiceStreamBase.h
boeservice/AAudioServiceStreamMMAP.cpp
boeservice/AAudioServiceStreamMMAP.h
boeservice/AAudioServiceStreamShared.cpp
boeservice/AAudioServiceStreamShared.h
7459b90d769a85a4727a2fc02aa96695454ba652 20-Apr-2017 Eric Laurent <elaurent@google.com> audioflinger: fix mmap stream volume

Fix bad casting from MmapPlaybackThread to VolumeInterface causing
volume commands to be lost by audio flinger for MMAP threads.

Bug: 37518243
Test: Verify volume is received by the audio HAL on MMAP streams
Verify no regression for other stream types.

Change-Id: I584ae868245358b2edefecc46a5249092f8be229
udioflinger/AudioFlinger.cpp
2a6a4689d39b4b4ad1f5d690ac54cce0fd6aae6c 20-Apr-2017 Emilian Peev <epeev@google.com> Camera: Ignore buffer handle 'int' section

Bufer handle hashing and comparison currently uses the buffer
'Int' section along with the Fd section. However the values there
can dynamically change after the buffer gets allocated which will
introduce side-effects in the buffer id map.

Bug: 37257356
Test: Complete Camera/Camera2 CTS
Change-Id: I2cf09ced69f155285dae67b3a2502e6b87f7d9cc
amera/libcameraservice/device3/Camera3Device.h
ad2024079f4abd65aa3da27e6ba07f50772e03cf 19-Apr-2017 Chong Zhang <chz@google.com> Merge "MediaCas: move clear key plugin to /system/lib" into oc-dev
e9e78196f9e1b4f7cb787b089710e0e8c6c32432 19-Apr-2017 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: allow shifted camera metadata for some interface" into oc-dev
1b1e248f69f3933cef4aab97ee8388151145bbc9 19-Apr-2017 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: use framework VideoNativeHandleMetadata header" into oc-dev
3b1d140980a8329dd47f73e9fd8688ffcc13b216 19-Apr-2017 Chong Zhang <chz@google.com> MediaCas: move clear key plugin to /system/lib

Non-treble process can no longer load .so from /vendor/lib.
Move the clear key plugin to /system/lib until MediaCas is converted
to treble.

bug: 37476803
Change-Id: I563b4576aeada5470355e7e168fa2c73997004d7
ediadrm/FactoryLoader.h
5c1b4f3a1d42f1a9eeecb20881c28d48edec4f90 19-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "audio policy: disable concurrent capture" into oc-dev
238ef5f352a59e97a90e2f9af88a27ad705442e5 19-Apr-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: allow shifted camera metadata for some interface

Allow shifted metadata when the buffer is allocated by
hwbinder (which might allocate buffers to 4 bytes boundary
on 32-bits CPU)

Test: compile, GCA working
Bug: 37095012
Change-Id: I404b73ac3b460f5ff03cb64001c24f7a05b91396
amera/libcameraservice/common/CameraProviderManager.cpp
amera/libcameraservice/device3/Camera3Device.cpp
a81ce34cf26bc344474380885ec1c9af2c6543ef 14-Apr-2017 Shuzhen Wang <shuzhenwang@google.com> Camera: Make finalizeOutputConfigurations more resilient

There could be race in application where finalizeOutputconfigurations
doesn't include any new surface. Do not fail in this case.

Test: CameraStressTest#testBackCameraSwitchPreview
Bug: 36811459
Bug: 35137641
Change-Id: Ic185e6d8bfcb8af5b81a33fbbd2fd4e49cc647ce
amera/libcameraservice/api2/CameraDeviceClient.cpp
067606686b9f8bf78580f07dbde78989b755dcbc 18-Apr-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: use framework VideoNativeHandleMetadata header

Test: build
Bug: 35625849
Change-Id: I8e95677267646f897abdf94881ef335635461c0a
amera/libcameraservice/device1/CameraHardwareInterface.cpp
amera/libcameraservice/device1/CameraHardwareInterface.h
2efd6be69a00b55bd2c20f27a99039b5ac2c5ff3 31-Mar-2017 Shuzhen Wang <shuzhenwang@google.com> Camera: Use slowJpeg if JPEG minimum duration is less than preview fps

If the minimum duration of JPEG is less than the frame duration derived
from maximum fps, enable slowJpeg mode so that JPEG doesn't slow down
preview.

Cap the default max fps to 30 so that the switch between different
sensor modes can be minimized while still allowing the app to go higher
than 30fps.

Test: Camera1 CTS
Bug: 36692074
Change-Id: If4d367ac587c0f4d3620ca2d25063c5a12ebfceb
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
6cb102d4a1cbaaacecde61d4e2a261c910c55e1c 17-Apr-2017 Eric Laurent <elaurent@google.com> Merge "audio policy: fix global effect attachment" into oc-dev
823451d7ee8a064aa758c9efefac359c9df065d0 15-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Use fmq for camera capture result." into oc-dev
a640c5a8731adb001b955192ce032c69c7322849 13-Apr-2017 Yifan Hong <elsk@google.com> Use fmq for camera capture result.

Test: camera works.

Bug: 35788245 [Treble] Pass camera metadata using shared memory

Change-Id: I344212cfd80f6df4e5aec01ec3f12f1ee9bb71c8
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
6772cfb5ac55fca9a31ce6a91855f6e8d14e18be 12-Apr-2017 Iliyan Malchev <malchev@google.com> mediacodec: route all libbinder traffic to /dev/vndbinder

This CL provides additional sandboxing to ensure that the ban on using
/dev/binder to communicate between system and vendor is enforced (even
if SE policy might otherwise permit it.) This is done only on
full-Treble devices.

b/36604251 OMX HAL (aka mediacodec) uses Binder and even exposes a
Binder service

Test: marlin

Change-Id: I344f5eb9d8719beec02207be65caca78336afff5
Signed-off-by: Iliyan Malchev <malchev@google.com>
ediacodec/main_codecservice.cpp
49ad5522d1012b683ca3c76a008bcee5e19668c3 13-Apr-2017 Mikhail Naganov <mnaganov@google.com> soundtrigger: Use "default" instance name for HAL service

"default" implies using "primary" legacy device module.
This doesn't change anything for binderized mode, because
the server was only registering itself as "sound_trigger.primary",
so it was the only possibility anyways.

Usage of "stub" (debugging) module is still possible
if audioflinger and corresponding services are built with
USE_LEGACY_LOCAL_AUDIO_HAL=true (added makefile check to ensure
that).

Test: "Ok Google" from screen off state on sailfish
Bug: 36570720
Change-Id: Ibef7fb312ce593d71255cfac71ba4e8f1dd28666
oundtrigger/Android.mk
oundtrigger/SoundTriggerHalHidl.cpp
997b94353ae6a3201416dfb40a9f03573144f849 14-Apr-2017 Yifan Hong <elsk@google.com> Merge "Use fmq for camera capture request." into oc-dev
f79b55484121b70652411272cf286a3bebd4fdb6 11-Apr-2017 Yifan Hong <elsk@google.com> Use fmq for camera capture request.

Test: camera works.
Bug: 35788245 [Treble] Pass camera metadata using shared memory

Change-Id: I58d7f6ef91ff45680840bf61a431a0c071ebbdfb
amera/libcameraservice/Android.mk
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
36829f97c0c547d9c6c918e248071cc616818616 08-Apr-2017 Eric Laurent <elaurent@google.com> audio policy: fix global effect attachment

Fix logic for global music effects (e.g Visualizer) attachement to
output streams.
- Consider only outputs with active music sessions first and then all
outputs
- Reevaluate effect attachment systematically on music playback start/stop
and when outputs are opened/closed
- Use the same logic every where.

Bug: 33397379
Test: CTS: AudioEffectTest, VisualizerTest, EqualizerTest, BassBoostTest
Manual test with music playback with and without Effects in
offload and non offload mode on speaker, headset, BT A2DP.

Change-Id: Iabc23bc8a24f36b68942b7f32749c535781497b4
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
a4eb0d86a29be2763be5fac51727858d5095794b 13-Apr-2017 Phil Burk <philburk@google.com> aaudio: merge contents of AAudioDefinitions.h into AAudio.h

As requested by native API council.

Bug: 30210002
Bug: 33398120
Test: CTS test_aaudio
Change-Id: I5ea7c53d09469221263d84cf6f82082e67c2523b
Signed-off-by: Phil Burk <philburk@google.com>
boeservice/AAudioService.cpp
boeservice/AAudioThread.cpp
boeservice/AAudioThread.h
boeservice/SharedMemoryProxy.cpp
boeservice/SharedMemoryProxy.h
boeservice/TimestampScheduler.h
74708e7c4622d65a7798d5fa9347c55583d347fe 08-Apr-2017 Eric Laurent <elaurent@google.com> audio policy: disable concurrent capture

Disable concurrent capture until the corresponding UI is available.
Restore preemption for HOTWORD audio source.

Bug:36891272
Test: capture regression tests, run CTS AudioRecordTest, run GTS SearchHostTest
Change-Id: I1b6c32c2a76ae0e004e14e46fedd596a8844c0d4
udiopolicy/managerdefault/AudioPolicyManager.cpp
d9534fb35245b8bcd2489e717bdd1ad9269b3000 12-Apr-2017 Phil Burk <philburk@google.com> Merge "AAudioService: integrated with audioserver" into oc-dev
c0c70e3c7dd10bc2c0caffcab1f3f5fb406b35fb 09-Feb-2017 Phil Burk <philburk@google.com> AAudioService: integrated with audioserver

Call the MmapStreamInterface from AudioFlinger instead of the FakeHAL.
Fix sending timestamps from the thread.
Add shared mode in service.

Bug: 35260844
Bug: 33398120
Test: CTS test_aaudio.cpp
Change-Id: I44c7e4ecae4ce205611b6b73a72e0ae8a5b243e5
Signed-off-by: Phil Burk <philburk@google.com>
(cherry picked from commit 7f6b40d78b1976c78d1300e8a51fda36eeb50c5d)
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
boeservice/AAudioEndpointManager.cpp
boeservice/AAudioEndpointManager.h
boeservice/AAudioMixer.cpp
boeservice/AAudioMixer.h
boeservice/AAudioService.cpp
boeservice/AAudioService.h
boeservice/AAudioServiceDefinitions.h
boeservice/AAudioServiceEndpoint.cpp
boeservice/AAudioServiceEndpoint.h
boeservice/AAudioServiceMain.cpp
boeservice/AAudioServiceStreamBase.cpp
boeservice/AAudioServiceStreamBase.h
boeservice/AAudioServiceStreamExclusive.h
boeservice/AAudioServiceStreamFakeHal.cpp
boeservice/AAudioServiceStreamFakeHal.h
boeservice/AAudioServiceStreamMMAP.cpp
boeservice/AAudioServiceStreamMMAP.h
boeservice/AAudioServiceStreamShared.cpp
boeservice/AAudioServiceStreamShared.h
boeservice/AAudioThread.cpp
boeservice/AAudioThread.h
boeservice/Android.mk
boeservice/FakeAudioHal.cpp
boeservice/FakeAudioHal.h
boeservice/SharedMemoryProxy.cpp
boeservice/SharedMemoryProxy.h
boeservice/SharedRingBuffer.cpp
boeservice/SharedRingBuffer.h
boeservice/TimestampScheduler.h
ddb332138cc8f3b4efad9b14b038f0a462b1b661 12-Apr-2017 Glenn Kasten <gkasten@google.com> Merge "Improve audio logs and dumpsys media.audio_flinger" into oc-dev
a4fe7d9cd54753ac068699eaf5750d34603220e9 12-Apr-2017 Glenn Kasten <gkasten@google.com> Merge "Fix log spam for media.log" into oc-dev
cbd0e571958736a4036bcd0496d4933780af880e 12-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Configurable Audio Policy: Various fixes" into oc-dev
d9d9ae29730a7305d5513475e3e03d7748f8d6f2 12-Apr-2017 Jean-Michel Trivi <jmtrivi@google.com> Merge "Audio policy / flinger: updates to recording callback and record stop" into oc-dev
38f86713cbd22caae9fdd4ac2f0bb76ff91df34d 11-Apr-2017 Jean-Michel Trivi <jmtrivi@google.com> Audio policy / flinger: updates to recording callback and record stop

Do not trigger the callback for recording events when the patch
handle is NONE, the patch handle will be updated for the
recording session later.
When stopping recording, only stop the record thread if the
track is not active, not if it's not the first one.

Test: cts-tradefed run cts-dev -m CtsMediaTestCases -t android.media.cts.AudioRecordingConfigurationTest
Bug: 36569938

Change-Id: I1b7445ef4115d6337ba7b926f7e6b068361926a7
udioflinger/Threads.cpp
udiopolicy/common/managerdefinitions/src/AudioSession.cpp
68dbd4ea14b11b2da16cadbce0edc574e05b5f5d 11-Apr-2017 Emilian Peev <epeev@google.com> Camera: Update service test for multiple vendor providers

Appending to a source with valid vendor id from a metadata without
vendor id should be supported.

Bug: 37198452
Test: CameraProviderManagerTest.MultipleVendorTagTest
Change-Id: Ic0b160216386fcfe1aa57b7e4a363b405459b3d0
amera/libcameraservice/tests/CameraProviderManagerTest.cpp
3ac24a14e36085bb26b65652e11747deda0f1e18 10-Apr-2017 Glenn Kasten <gkasten@google.com> Fix log spam for media.log

Bug: 36481537
Test: logcat does not show "Waiting for service media.log"
Change-Id: Ia69b679d3b1f1dd292237c63855ff650566df133
(cherry picked from commit 04b96fc3a6cfa8312c51bbba4e5729c9dd869f78)
udioflinger/AudioFlinger.cpp
8d8ebcaa7d13f163abee5bbf23b4e5a21fbfb44c 11-Apr-2017 Chia-I Wu <olv@google.com> Merge "libcameraservice: update for revised HIDL gralloc" into oc-dev
0ba7cd85016caac178ee8e52f067ca9c42511dc3 10-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Don't advertize zoom in case max digital zoom is 1" into oc-dev
04ecef31886cdcd41eff19f80a905c95abe57177 10-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Advertise AE/AWB locks in case they are supported" into oc-dev
67a0c0e77dce4dccc9155f4bfce490d167457c8a 06-Apr-2017 Chia-I Wu <olv@google.com> libcameraservice: update for revised HIDL gralloc

There is only BufferUsage instead of ProducerUsage/ConsumerUsage
now.

Test: make
Change-Id: I265ca4c27e284fb1f704659efd74355f82d3c192
amera/libcameraservice/device1/CameraHardwareInterface.cpp
amera/libcameraservice/device1/CameraHardwareInterface.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
ddee203a1bcc1b5602536586dd72b0d3f1bdb903 27-Jan-2017 Di Folco, Neil <neil.di.folco@intel.com> Configurable Audio Policy: Various fixes

-- Update pre-compiled xml files due to a misalignment with
EDD files from previous bug fixes.
-- Add support for AUDIO_USAGE_ASSISTANT in engineconfigurable.
-- Fix UsbDevice select for strategy accessibility.
Volume cannot be changed when play music via UsbHeadset.
Strategy accessibility selects Speaker instead of UsbHeadset
This corrects the device selected by accessibility strategy.
-- Fix Sonification respectful with A2DP devices issue. No
notification sound is heard on BT A2DP devices. This
corrects the applicable list of audio output devices in
case of Sonification Respectful strategy.

Bug: 37157254
Test: built angler with CAP enabled
Change-Id: Ie6b401d28d3211846bb2b5345509d80f31440708
Signed-off-by: David Brageul <david.brageul@intel.com>
Signed-off-by: Mohamed LAHMADI <mohamedx.lahmadi@intel.com>
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/PolicyConfigurableDomains.xml
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/device_for_strategy_accessibility.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/device_for_strategy_sonification_respectful.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/strategy_for_usage.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Structure/PolicySubsystem.xml
6d8018f0b7be9deec6b0acab10a0dca6e91d0fb8 21-Feb-2017 Glenn Kasten <gkasten@google.com> Improve audio logs and dumpsys media.audio_flinger

Include mFrameCount in shared memory corrupt error log.

Fix typo in log for primary audio interface.

Include the new server frame count in logs for fast tracks.

Always log when fast is successful for output tracks, as it helpful
(was already there for input).

Cleanup dumpsys for threads.

Bug: 37153050
Test: builds OK, and logs contain more information
Change-Id: I2b5b4d700e8eb7c261a3125fb03ddc00bf08537e
(cherry picked from commit 1bfe09a0b1755a79abd32b41c0dd433b88fc260c)
udioflinger/AudioFlinger.cpp
udioflinger/FastThread.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
97e6e199f9470cea3d686e0ed1033b171747356a 06-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Support vendor tags from multiple providers" into oc-dev
0f0c9b5007ff694d05a91c28359db0553e4dd061 05-Apr-2017 Ray Essick <essick@google.com> Move MediaMetrics into its own library

Changes for the new HAL structure have brought about a build time
circular dependency between libmedia and libmediadrm. This set of
changes the media metrics code into its own library and arranges
for the relevant consumers of the media metrics code to link
to this new library (where they had previously picked it up by
including libmedia).

Bug: 36990807
Test: build, boot.
Change-Id: I81768eecca88d5e59e6e6e547f29308a94e30c7b
ediaanalytics/Android.mk
71c73a2985a7ac65ee597be3441ab300fa56e22e 21-Mar-2017 Emilian Peev <epeev@google.com> Camera: Support vendor tags from multiple providers

Different vendors could have different vendor tags.
A global vendor tag cache will store all available
vendor tag descriptors from different providers.
The cache will then be shared with each camera client.
Camera metadata will use specific vendor ids stored
in the metadata buffer to identify the correct vendor
tag provider.

Bug: 34275821
Test: adb shell /data/nativetest/cameraservice_test/cameraservice_test
--gtest_filter=CameraProviderManagerTest.MultipleVendorTagTest
Complete Camera/Camera2 CTS tests
Change-Id: I2262128f21a0167504f018230624e2a89786c467
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/api1/client2/FrameProcessor.cpp
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/common/CameraProviderManager.cpp
amera/libcameraservice/common/CameraProviderManager.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/tests/Android.mk
amera/libcameraservice/tests/CameraProviderManagerTest.cpp
amera/libcameraservice/utils/TagMonitor.cpp
amera/libcameraservice/utils/TagMonitor.h
47cf8e62b81770c0896aac444ef22a840b3a2c5e 04-Apr-2017 Yin-Chia Yeh <yinchiayeh@google.com> Revert "Camera: Map between bufferqueue gralloc0 usage, and HIDL gralloc1 usages"

This reverts commit 1a2f15daf13552e86324025cf6d31d887cd8fa02.

Test: fix b/36876770
Bug: b/36876770
Change-Id: Ie7b8c9ee444e3e8667154b396e3e6a556b54739a
amera/libcameraservice/Android.mk
amera/libcameraservice/api1/client2/ZslProcessor.cpp
amera/libcameraservice/device1/CameraHardwareInterface.cpp
amera/libcameraservice/device1/CameraHardwareInterface.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3OutputStream.cpp
5b3570dcede02e7427b0bf3350499974ec8c75c7 04-Apr-2017 Emilian Peev <epeev@google.com> Camera: Don't advertize zoom in case max digital zoom is 1

Mark immediate zoom as not supported in case the camera has
maximum digial zoom close to 1. This will avoid corner
cases wehere we can have 'NUM_ZOOM_STEPS' all equal to 1.

Bug: 33093106
Test: Complete CameraTest CTS package
runtest -x cts/tests/camera/src/android/hardware/cts/

Change-Id: I039276385de74192375f36b1504dd89cb8ae0c52
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
2638f7216de92f254a50dd55be1539f1c6b23552 04-Apr-2017 Emilian Peev <epeev@google.com> Camera: Advertise AE/AWB locks in case they are supported

AE/AWB lock availability is present in the camera static metadata.
Check whether they are supported before advertising them in Camera
Parameters.

Bug: 33091727
Test: Complete CameraTest CTS
runtest -x cts/tests/camera/src/android/hardware/cts/
Change-Id: I9a8cc8ffcc28b6b476904c3c011ab0ec65b162c9
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
ac3e2cce871b7cdbb0526d4af9d0bc477e795b2e 04-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Try to remove inflight requests during error notifications" into oc-dev
03857c4b5a029a588b647532e907a875026e593a 04-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: add buffer freed notification for output streams" into oc-dev
654be2e6354e4685393c8c1bc8408ae6579ce7dd 04-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: add buffer freed notification interface" into oc-dev
017d49c409af17a2e0ef3ca48fadb1b5a5ec3fe4 01-Apr-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: add buffer freed notification for output streams

Test: ReprocessCaptureTest fixed
Bug: 34461678
Change-Id: Icd5af79a8f7fc35b0a040c57a639ae6777e71024
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.h
ff4e56e96d3d84ad6431c57bc473d8d028890d77 04-Apr-2017 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Map between bufferqueue gralloc0 usage, and HIDL gralloc1 usages" into oc-dev
be83fa713da45b1c751d33ad69ce0017ebe9f707 30-Mar-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: add buffer freed notification interface

To cleanup caches of obsolete buffers.
This CL addressed the input stream bit, the output
stream hook will be a followup CL.
Also cleanup some dead API in CameraDeviceBase.h

Test: fix CTS ReprocessCaptureTest
Bug: 34461678
Change-Id: I801cd81c29becaa45630ed0a5c2dab8df1278a6a
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3InputStream.cpp
amera/libcameraservice/device3/Camera3InputStream.h
amera/libcameraservice/device3/Camera3Stream.cpp
amera/libcameraservice/device3/Camera3Stream.h
amera/libcameraservice/device3/Camera3StreamBufferFreedListener.h
amera/libcameraservice/device3/Camera3StreamInterface.h
ba0fac313cc2451681f62a398253c2c01c1c61e7 30-Mar-2017 Emilian Peev <epeev@google.com> Camera: Try to remove inflight requests during error notifications

Make it possible for clients to clear the internal inflight queue
as part of error result notifications. For this to work all pending
buffers must be returned previously with the exception of the
result metadata.

Bug: 35652756
Test: Complete Camera/Camera2 CTS without any regressions.
Change-Id: I9d8a6b63364fd254311cda2f8c836b99ee05cacb
amera/libcameraservice/device3/Camera3Device.cpp
32a81b609574523c69e3534337c222f3294a050d 03-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: HAL1 recording batching support" into oc-dev
2fdf283c82b24caf4150b32b5e893322a3e3524b 02-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add Flag for Enabling 64-bit Media DRM Server" into oc-dev
b5df547bce900fa5764d735bee304e79c001d60d 21-Mar-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: HAL1 recording batching support

Test: Angler HAL1 + batching normal recording mode
Bug: 35997432
Change-Id: If088715ccdb40163f44150c16deed62432692c07
amera/libcameraservice/CameraFlashlight.cpp
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/Camera2Client.h
amera/libcameraservice/api1/CameraClient.cpp
amera/libcameraservice/api1/CameraClient.h
amera/libcameraservice/device1/CameraHardwareInterface.cpp
amera/libcameraservice/device1/CameraHardwareInterface.h
4d5f24ab62f5892ff1b0fac046fc0ccdb870cc47 31-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove dependency on persist.hal.binderization." into oc-dev
d4e9ca49a3863beeb0027f51e2331e4c5ec2402b 30-Mar-2017 Pawin Vongmasa <pawin@google.com> Remove dependency on persist.hal.binderization.

Test: Manual use of Camera, Movies, Photos and YouTube apps.

Test: With CtsMediaTestCases.apk installed,
adb shell am instrument -e size small -w
'android.media.cts/android.support.test.runner.AndroidJUnitRunner'

Bug: 34274385
Change-Id: I5251fea337f33460d1f0db174cedc465822f2a47
ediacodec/main_codecservice.cpp
1a2f15daf13552e86324025cf6d31d887cd8fa02 23-Mar-2017 Eino-Ville Talvala <etalvala@google.com> Camera: Map between bufferqueue gralloc0 usage, and HIDL gralloc1 usages

Otherwise some bits aren't where they're supposed to be.

Also stop using HW_CAMERA_ZSL; we need to only set HW_CAMERA_READ, and it's
confusing to set a producer flag on the consumer usage side.

Test: Camera CTS passes
Bug: 35215313
Change-Id: I23e6e60bf875fe9d8f2d7a1f805d2ef854c16b97
amera/libcameraservice/Android.mk
amera/libcameraservice/api1/client2/ZslProcessor.cpp
amera/libcameraservice/device1/CameraHardwareInterface.cpp
amera/libcameraservice/device1/CameraHardwareInterface.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3OutputStream.cpp
e9fec5451704893412c8e707940483a6bdb5f238 14-Mar-2017 John W. Bruce <juce@google.com> Add Flag for Enabling 64-bit Media DRM Server

We are ready for devices to begin migrating to a 64-bit Media DRM
Server. However, not all devices are ready to make this jump yet. A
device needs to have all of its DRM Plugins ready to run as 64-bit
before it can do this. This includes having 64-bit hardware
integrations.

So that devices can turn on 64-bit support as they get ready, I am
adding flags that can be set in a device's device.mk file. There are two
parts:

* ENABLE_MEDIADRM_64 enables building the mediadrmserver as 64-bit.

* Setting drm.64bit.enabled=true in PRODUCT_PROPERTY_OVERRIDES switches
mediadrmserver to searching for DRM Plugins in the 64-bit directory.

Test: Validated that turning on these flags enables a 64-bit
mediadrmserver that loads 64-bit DRM Plugins from the lib64
directory (after setting DISABLE_TREBLE_DRM to true to load this
code as opposed to the Legacy DRM Plugin HAL)
Bug: 36076017
Change-Id: I141cfd57ff75b40c8b0cb40a5bf1439a1ab5b766
ediadrm/Android.mk
d49dbd6b625cddb82f3f7bbeac62d48ef338ef0f 07-Jul-2016 Andy Hung <hunga@google.com> Allow MediaExtractor to create FileSource

Remove binder call to MediaServer for reading files.

Test: Photos, Play Music, Play Movies, Youtube
Bug: 29125703
Change-Id: Id6abf592bf6d70b81158f6038b1982f0a537b9b9
ediaextractor/MediaExtractorService.cpp
ediaextractor/MediaExtractorService.h
ediaextractor/seccomp_policy/mediaextractor-arm.policy
ediaextractor/seccomp_policy/mediaextractor-arm64.policy
ediaextractor/seccomp_policy/mediaextractor-x86.policy
be3d40cadb8490291512a6d7882791dda9104316 27-Mar-2017 Emilian Peev <epeev@google.com> Camera: Update 'indexOfKey' return check

Method 'indexOfKey' will return 'NAME_NOT_FOUND' error
status in case it doesn't find any values matching the
given key. Checking for anything other than this error
code could lead to instabilities.

Bug: 35925482
Test: Manual using application
Change-Id: Ie72eb29776b27a6d485f6e42ee7e62c62795ca9e
(cherry picked from commit 4219c290e526c6cb1767038776fff4f9b5d74cc7)
amera/libcameraservice/device3/Camera3Device.cpp
f71a3c2569960ad6c68b2e33e7739baa06e923fc 26-Mar-2017 Andy Hung <hunga@google.com> Merge "AudioFlinger: Improve Thread logging."
abd441afaa247044a6849c66a41fb025dcb5c811 25-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: fix FlashLightTest"
293558ad1977e24e65f7ba78f47382d33fc77d64 21-Mar-2017 Andy Hung <hunga@google.com> AudioFlinger: Improve Thread logging.

Test: dumpsys media.audio_flinger
Bug: 30572472
Change-Id: I43f72354a6ece045f5f9f664946a406166974258
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
udioflinger/Threads.h
dc3134e3f612050ae2c8a0d847bf091c53ed2f4c 23-Mar-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix FlashLightTest

Fix issues related Treble HAL1 path.

Test: FlashLightTest pass on Angler HAL1/module 1.0
Bug: 35674539
Change-Id: I6bd749464c0e6e437a4743d2d66a0a5f54cdba38
amera/libcameraservice/CameraFlashlight.cpp
amera/libcameraservice/CameraFlashlight.h
amera/libcameraservice/common/CameraProviderManager.cpp
amera/libcameraservice/common/CameraProviderManager.h
a09948a50e93f25a31f10cded88a595325e11196 23-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add support for USB headset device"
be71a5e7a3310f605560d527acf294fa64e117dc 23-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topic 'preview_video_surface_share'

* changes:
Camera: Do not crash if detachNextBuffer fails
Camera: Allow different kinds of IMPLEMENTATION_DEFINED surfaces to share
904d632a24db8f94de83e44f7179d1c0af022b03 18-Mar-2017 Eric Laurent <elaurent@google.com> Add support for USB headset device

Add missing rules for USB headset devices in routing, volume and effects
management.

Test: playback and catpure regression tests.
Change-Id: I42cd157f483deba2371a05d332cd11dceb2b2fa3
udiopolicy/common/include/Volume.h
udiopolicy/enginedefault/src/Engine.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
eecac2cab4fda565018237d52be4a9ca1fbc4434 22-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Move mediacodec to vendor partition."
afa8a910f065246c8c59386b8b0d9d96669ac85c 15-Mar-2017 Shuzhen Wang <shuzhenwang@google.com> Camera: Do not crash if detachNextBuffer fails

Test: Camera CTS
Bug: 33777818
Change-Id: I965d741df6ce6bdb701dbe1d721cf42ea53c7a40
amera/libcameraservice/device3/Camera3StreamSplitter.cpp
e8ecda97764c45c86f71b50f7eff3e30ee9f540c 21-Feb-2017 Shuzhen Wang <shuzhenwang@google.com> Camera: Allow different kinds of IMPLEMENTATION_DEFINED surfaces to share

Do not guard against mismatching usage flag and data space for
IMPLEMENTATION_DEFINED formats, so that different formats can share
the same stream if HAL support is available.

Test: Camera CTS
Bug: 33777818
Change-Id: I62a1f458c06ae417c9a2c407d433319a1158fdcc
amera/libcameraservice/api2/CameraDeviceClient.cpp
9470b9e3ebe6b5786cd37742f684c2772a1708d2 20-Mar-2017 Luis Hector Chavez <lhchavez@google.com> seccomp-x86: allow sched_yield and gettid syscalls

Addresses:
media.extractor: libminijail: blocked syscall: sched_yield, gettid

Bug: None
Test: make USE_CLANG_PLATFORM_BUILD:=true SANITIZE_TARGET=address -j42
media extractor complains no more.
Change-Id: I3d499b0400df10ede08801fe6b608e6003727734
ediaextractor/seccomp_policy/mediaextractor-x86.policy
4658418c5545763cd0cc81caedb422a97cf78a63 28-Feb-2017 Pawin Vongmasa <pawin@google.com> Move mediacodec to vendor partition.

Test: Camera, Photos, YouTube, and Play Movies apps.
Test: With CtsMediaTestCases.apk installed,
adb shell am instrument -e size small -w
'android.media.cts/android.support.test.runner.AndroidJUnitRunner'

Bug: 35328855
Change-Id: I0f36683b531fc645835a94e449996e5b44d0a3de
ediacodec/Android.mk
ediacodec/android.hardware.media.omx@1.0-service.rc
ediacodec/mediacodec.rc
e8e9e191502ce306a04221e10ea2fe06ee40cacb 16-Mar-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix number of cameras logic

Test: no Camera CTS regression
Bug: 36289841
Change-Id: I7218347a0f2e8184dd43a9f35acc0554b761e15e
amera/libcameraservice/common/CameraProviderManager.cpp
amera/libcameraservice/common/CameraProviderManager.h
94c68e09c9a9f30a68ce46b5efb5795fccb34616 06-Mar-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: add batching support for HFR

Test: GCA slow motion recording workin
Bug: 34899394
Change-Id: Icf56458d3fa6f0b4a6b8cfffe6a61da0626e81ec
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
403044af4352f6d56aef0fb9548d2bfce56d3127 27-Feb-2017 Shuzhen Wang <shuzhenwang@google.com> Camera: Fix error check for HFR timestamp

With Camera HAL sending empty metadata for HFR batching, service
shouldn't check matching timestamp for empty metadata.

Test: Manually test high speed recording
Bug: 35775704
Change-Id: I68f3c16ea9a91f15c70e406540764b02cb6951e1
amera/libcameraservice/device3/Camera3Device.cpp
8ce2339cb7dc61e5fac5af90ce73716dc9e3ba52 17-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Send shutter and result once per batch"
6fcb1488b835568dd1423ccd5f0b09483b8d9917 17-Mar-2017 Glenn Kasten <gkasten@google.com> Merge "Use static_assert instead of COMPILE_TIME_ASSERT_FUNCTION_SCOPE"
f3df83d5957fd717c1663d97cd96eb5b733902c6 16-Mar-2017 Eric Laurent <elaurent@google.com> Merge "audio policy: add rule for ringtone duplication over speaker + SCO" am: dc671c4e33 am: 42d5e65d2b
am: 6e51336da3

Change-Id: I67dd17852ae81df011eeb232daab5c1f290ab18a
6e51336da3487318459b47191270391f3cf98b96 16-Mar-2017 Eric Laurent <elaurent@google.com> Merge "audio policy: add rule for ringtone duplication over speaker + SCO" am: dc671c4e33
am: 42d5e65d2b

Change-Id: I84d1c0db37b1aa026b2473e50301bf26f4ef394d
42d5e65d2bd83999b435fe5be2cf76c4e38f692c 16-Mar-2017 Eric Laurent <elaurent@google.com> Merge "audio policy: add rule for ringtone duplication over speaker + SCO"
am: dc671c4e33

Change-Id: Ic19309906b00121c4cd02ff8ed620416d5b9678f
a8e0f02dee635b88ea21c20f26356354e83ec83a 28-Jan-2017 Eric Laurent <elaurent@google.com> audio policy: add rule for ringtone duplication over speaker + SCO

Bug: 19171297
Test: make, testplans/79248

Change-Id: Ic539256e53782806d5dbbca5fb6ebe9f2ca5ec76
udiopolicy/enginedefault/src/Engine.cpp
107488f4d20f3c4595a78ae33ba2f38bca0a50b9 15-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Move hybrid interface from libbinder to libhidl/transport."
04563aafa0debc95d50951ca944abf37ef2777ce 09-Mar-2017 Pawin Vongmasa <pawin@google.com> Move hybrid interface from libbinder to libhidl/transport.

Also, merge android.hardware.media.omx@1.0-impl into libstagefright_omx.

Test: With CtsMediaTestCases.apk installed,
adb shell am instrument -e size small -w
'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Test: Manual use of Camera, Photos, Play Movies and YouTube apps.
Test: Manual use of screen mirroring.

Bug: 33854657
Change-Id: Ie927bcafd86dc7e9509bb8b76bb3b51f9a423cc7
ediacodec/Android.mk
ediacodec/main_codecservice.cpp
b96b515ac582b05c4be87956d4f4a55f943ed7ae 14-Mar-2017 Eino-Ville Talvala <etalvala@google.com> Merge "CameraProviderManager: Handle transaction errors, HAL process death"
8d942f9a5c5affcdc6f1138d4ce3bac4b7ee53d5 13-Mar-2017 Eino-Ville Talvala <etalvala@google.com> CameraProviderManager: Handle transaction errors, HAL process death

- Register and handle camera provider deaths
- Check for transport errors on all provider calls
- Clean up provider callback locking

Test: No camera CTS regressions
Bug: 35096594
Bug: 35441122
Change-Id: I08117f38f5201368a28093debdbcae67a68a4e7
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/common/CameraProviderManager.cpp
amera/libcameraservice/common/CameraProviderManager.h
886deb506ea2938cfec40fc0dd2bff072850386b 13-Mar-2017 Glenn Kasten <gkasten@google.com> Merge "Re-format to decrease the maximum line length of files to 100 characters"
d3bb645f0b7f567b033b8664499d685f8ec10628 06-Dec-2016 Glenn Kasten <gkasten@google.com> Re-format to decrease the maximum line length of files to 100 characters

Test: compiles OK
Change-Id: Ibe663032cd390ed2bcca6dc921d47732e6e15e21
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
1e039394f351ef77592689f32294a1c73840ad0e 13-Mar-2017 Glenn Kasten <gkasten@google.com> Merge "Rename audio_utils/conversion.h to mono_blend.h"
91164e7f94030b3e49a31d88c91d70d4bd358ebe 15-Mar-2016 Glenn Kasten <gkasten@google.com> Use static_assert instead of COMPILE_TIME_ASSERT_FUNCTION_SCOPE

Test: builds OK
Change-Id: I5923dce96e43d7107f1d8e3145ad4bb5eca261e7
udioflinger/FastMixerDumpState.h
00bf9d385f4dbfd11debd89b9fe7d5547aea5956 13-Mar-2017 Glenn Kasten <gkasten@google.com> Merge "FastMixerState was missing a LOG_TAG"
a843e7bac59fd8a97ab3b4d5171c5d21bbd325fd 13-Mar-2017 Steven Moreland <smoreland@google.com> audio: remove unused using statements.

Bug: 36099713
Test: pass
Change-Id: Ib7a48469788a60778186368667c7043c33129e91
adio/RadioHalHidl.h
a7ddf89bada71b2b88b88becbc690b99450f3ebd 11-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "cameraservice: remove String\d+::std_string"
6bf707f4c0752643757a7389384817da41d34fab 24-Feb-2017 Glenn Kasten <gkasten@google.com> Rename audio_utils/conversion.h to mono_blend.h

There is only one function declared in that header file, and it is
mono_blend, so a more specific filename may be easier to understand.

Test: compiles OK
Change-Id: Ie2aec6c706b1822581b34d3702818b8200a1db8a
udioflinger/FastMixer.cpp
udioflinger/Threads.cpp
8649ed0e5096ae2f47e8015ac43dd9e874976245 11-Mar-2017 Andy Hung <hunga@google.com> Merge "AudioFlinger: Check framecount overflow when creating track" into lmp-dev am: 51a3483ec9 am: 5dc0e88cc1 am: 6d4b5fc334 am: 5562d70451 am: 3fb4149ed2 am: 78ec332732 am: 9262496af9 am: 12b5b3b008 am: dfecfdb28f am: 3c93457cfc am: a447516329
am: cd0677fdfd

Change-Id: Ie1e192c8b0013797c9e08194b6d4bf75ae536538
cd0677fdfde5d4962c432b698faba222878e219c 11-Mar-2017 Andy Hung <hunga@google.com> Merge "AudioFlinger: Check framecount overflow when creating track" into lmp-dev am: 51a3483ec9 am: 5dc0e88cc1 am: 6d4b5fc334 am: 5562d70451 am: 3fb4149ed2 am: 78ec332732 am: 9262496af9 am: 12b5b3b008 am: dfecfdb28f am: 3c93457cfc
am: a447516329

Change-Id: I63259b73f31fbd64d79a5cfb426767f2f18e0904
a447516329ba52b23985e0753ec51e08c9c6bf99 11-Mar-2017 Andy Hung <hunga@google.com> Merge "AudioFlinger: Check framecount overflow when creating track" into lmp-dev am: 51a3483ec9 am: 5dc0e88cc1 am: 6d4b5fc334 am: 5562d70451 am: 3fb4149ed2 am: 78ec332732 am: 9262496af9 am: 12b5b3b008 am: dfecfdb28f
am: 3c93457cfc

Change-Id: I93dfca6c08ba2c9096b1c297c33e0a773d16d054
3c93457cfce2c82ee17b226c46942d133ed24b61 11-Mar-2017 Andy Hung <hunga@google.com> Merge "AudioFlinger: Check framecount overflow when creating track" into lmp-dev am: 51a3483ec9 am: 5dc0e88cc1 am: 6d4b5fc334 am: 5562d70451 am: 3fb4149ed2 am: 78ec332732 am: 9262496af9 am: 12b5b3b008
am: dfecfdb28f

Change-Id: I0b4de04aab9058db4beb6346c00208b697ed4f78
dfecfdb28fbc99b87588a9db0dd5dde9d621ea30 10-Mar-2017 Andy Hung <hunga@google.com> Merge "AudioFlinger: Check framecount overflow when creating track" into lmp-dev am: 51a3483ec9 am: 5dc0e88cc1 am: 6d4b5fc334 am: 5562d70451 am: 3fb4149ed2 am: 78ec332732 am: 9262496af9
am: 12b5b3b008

Change-Id: I9a46a6aaa2ff3afc4be729f7877703d1bf97faa7
12b5b3b00803eac0ab5b6c7ff09b8aad3d78c2e1 10-Mar-2017 Andy Hung <hunga@google.com> Merge "AudioFlinger: Check framecount overflow when creating track" into lmp-dev am: 51a3483ec9 am: 5dc0e88cc1 am: 6d4b5fc334 am: 5562d70451 am: 3fb4149ed2 am: 78ec332732
am: 9262496af9

Change-Id: I8df7a4c1308afb39a1f1a37a588e70e049a868fa
9262496af91c790d865e31a1f550410f088ba642 10-Mar-2017 Andy Hung <hunga@google.com> Merge "AudioFlinger: Check framecount overflow when creating track" into lmp-dev am: 51a3483ec9 am: 5dc0e88cc1 am: 6d4b5fc334 am: 5562d70451 am: 3fb4149ed2
am: 78ec332732

Change-Id: I50a7b9f86a494bff6aa43e719e5c819eb0c191ae
78ec332732fa4e1669eb1a791da31103eb379f5e 10-Mar-2017 Andy Hung <hunga@google.com> Merge "AudioFlinger: Check framecount overflow when creating track" into lmp-dev am: 51a3483ec9 am: 5dc0e88cc1 am: 6d4b5fc334 am: 5562d70451
am: 3fb4149ed2

Change-Id: I9101bb9cc966e9d99c78427697b6c570a7da753d
3fb4149ed2983be6f0f9a32fff2646f37eca6759 10-Mar-2017 Andy Hung <hunga@google.com> Merge "AudioFlinger: Check framecount overflow when creating track" into lmp-dev am: 51a3483ec9 am: 5dc0e88cc1 am: 6d4b5fc334
am: 5562d70451

Change-Id: Ia73c4a1d2911cf930700bf796fc7ee18d94500fe
5562d704519b5662d2165d688c50f85ff3d7aedd 10-Mar-2017 Andy Hung <hunga@google.com> Merge "AudioFlinger: Check framecount overflow when creating track" into lmp-dev am: 51a3483ec9 am: 5dc0e88cc1
am: 6d4b5fc334

Change-Id: Ie47307f09c5fcb49f81a2d034c42d69b8417c9a6
de6072164a8d2bca2cd404741a121344a3e8bc33 10-Mar-2017 Andy Hung <hunga@google.com> Merge "DO NOT MERGE AudioFlinger: Check framecount overflow when creating track" into klp-dev am: e0da30dc57
am: 737754e97a

Change-Id: Ide9fb3f4955a31ade22f99c299f441d8413c1b88
5dc0e88cc14128d54bae2297c0ee1bac2042b6a1 10-Mar-2017 Andy Hung <hunga@google.com> Merge "AudioFlinger: Check framecount overflow when creating track" into lmp-dev
am: 51a3483ec9

Change-Id: I6fe5fb0a7142218b16c84bc1966a84ac920fd70a
60fd12ab581e151522cf6d73f86031acf8fb46e7 21-Feb-2017 Glenn Kasten <gkasten@google.com> FastMixerState was missing a LOG_TAG

Test: logs in FastMixerState module have the correct tag
Change-Id: Id38826754e35803a72376a9198d2839fe195b0b2
udioflinger/FastMixerState.cpp
5ff9c91a90d7d5fad49de38bc314910251b25774 10-Mar-2017 Steven Moreland <smoreland@google.com> cameraservice: remove String\d+::std_string

Part of removing libc++ from libutils.

Bug: 35363681
Test: pass
Change-Id: Iae07bb7a5e3ce4794e0b999249c2e101e860e64a
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/device1/CameraHardwareInterface.cpp
amera/libcameraservice/device3/Camera3Device.cpp
89e5a2b102b484fe19dbda2a0b118edfefc70241 09-Mar-2017 Nicolas Roulet <nicoroulet@google.com> Merge "NBLog periodic merging thread"
ca47e6d574cd3d02821b87657a80d84b328d4f26 09-Mar-2017 Josh Gao <jmgao@google.com> Merge "Allow mediaextractor/mediacodec to connect to tombstoned."
dcdfaecc1fa630a799e1fdb508a9b92da55abc36 14-Feb-2017 Nicolas Roulet <nicoroulet@google.com> NBLog periodic merging thread

Bug: 35468674
Test: no change in functionality, everything works as before
Change-Id: Id2cea243bc15767ca6803c9505bf23a18411500e
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
edialog/IMediaLogService.cpp
edialog/MediaLogService.cpp
edialog/MediaLogService.h
2752e5b66ac80b5d6bcba1db186f29f86722956b 28-Feb-2017 Mathias Agopian <mathias@google.com> fallout of getting rid of IGraphicBufferAlloc

Test: compile & run
Bug: cleanup
Change-Id: Ifba0668d798c523c556ca7dae2c172711a256b05
amera/libcameraservice/device3/Camera3BufferManager.cpp
amera/libcameraservice/device3/Camera3BufferManager.h
4a472663e85585403ad0d15e1bf5b37c10628dd0 27-Feb-2017 Shuzhen Wang <shuzhenwang@google.com> Camera: Send shutter and result once per batch

For High Speed Recording, only send the shutter and result for the last
request in the batch, and count on the application process to derive
other results in the batch.

This reduces the binder transaction between the two processes, and saves
power.

Test: Manually test high speed recording with GCA, and CTS
Bug: 35775704
Change-Id: I3e1b4c1db3d1d1044400d825e2affa4461362b39
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
22fd9de35b387f1ed808f4fe6e0b87eac3e82690 08-Mar-2017 Eric Laurent <elaurent@google.com> Merge "audioflinger: add standby() method to MmapStreamInterface"
18b570146c971fe729c391bfbb869391084e623d 14-Feb-2017 Eric Laurent <elaurent@google.com> audioflinger: add standby() method to MmapStreamInterface

Bug: 33398120
Test: open/start/stop/close MMAP no IRQ stream for capture and playback

Change-Id: I48ec202a71565f759c441c2a835d8c8190e76334
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
udioflinger/Threads.h
e7091aa805f44bc030235b4f5de12c151a35312a 08-Mar-2017 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Fix regression to old camera API operation.

When Camera2Client uses Camera3Device, it operates with lazy stream
configuration (in which streams are configured only once a capture
request is going to actually be sent). In this path, the operating
mode may never get set to a valid mode, and thus always fail
stream configuration.

Ensure that all paths calling into configureStreamsLocked set the
appropriate operating mode.

Test: Actually no camera CTS regressions this time, honest!
Bug: 34853980
Change-Id: I6e1855206f6d76cca5ff8348555b26bd7b868843
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
bbbbe84b3a7296c9c3266bb16e0dc98b11cb5939 01-Mar-2017 Eino-Ville Talvala <etalvala@google.com> Camera: Allow direct selection of operating mode

Instead of a true/false switch for high-speed mode, use an integer
enum instead and define the two existing modes, plus the start
of a vendor mode space.

For all non-high-speed modes, use the normal configuration path,
but pass the operating mode to the HAL.

Test: New CTS test passes
Bug: 34853980
Change-Id: I9dc2b2a2164e9779f079a30e936c4117bcf96efe
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
194af9f6b3c347392d2852fab9ee0af561fe291b 07-Mar-2017 Josh Gao <jmgao@google.com> Allow mediaextractor/mediacodec to connect to tombstoned.

Whitelist recvmsg so that mediaextractor and mediacodec can get an
output fd from tombstoned.

Bug: http://b/35858739
Test: debuggerd -b `pidof media.codec`
Change-Id: I2126da6c77bde739ae37c48b1a13dcefc6482a64
ediacodec/seccomp_policy/mediacodec-arm.policy
ediaextractor/seccomp_policy/mediaextractor-arm.policy
ediaextractor/seccomp_policy/mediaextractor-arm64.policy
ediaextractor/seccomp_policy/mediaextractor-x86.policy
0012417ddc1320c6df79258266da1e869036b211 28-Feb-2017 Dhananjay Kumar <dhakumar@codeaurora.org> soundtrigger: Modify conditional check in detach

- All the required SoundTrigger models of a module client
are not getting unloaded and removed as part of detach.
- mModels.size() is evaluated for every iteration which
gives current size of vector which results in exit of
loop without checking for all models in case elements
are removed in loop.
removeItemsAt would modify the vector indices for each
iteration and this would result in skipping access of
some models.
- Iterate from end of models to check and unload.

Bug: 35910617
Test: mmm frameworks/av/services/soundtrigger/
Author: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
Change-Id: I72415e53d2e6f366f8ba6e6eeb0cd8323364a231
oundtrigger/SoundTriggerHwService.cpp
80ab5ab91c9a31192bc42c4326173d38e42bcc24 04-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "fallout of cleaning-up libutils includes"
2ef9f26aa5c75ff7f549404064d95db0552f7303 03-Mar-2017 Josh Gao <jmgao@google.com> Allow syscalls required for logging in mediacodec/mediaextractor.

Bug: http://b/34684590
Test: `killall -ABRT media.codec; killall -ABRT media.extractor` on sailfish
Change-Id: I798ed37fce27fee55a46916d7bccdf0818b3983b
ediacodec/seccomp_policy/mediacodec-arm.policy
ediaextractor/seccomp_policy/mediaextractor-arm.policy
ediaextractor/seccomp_policy/mediaextractor-arm64.policy
ediaextractor/seccomp_policy/mediaextractor-x86.policy
05d19b08f3affa6fa8407e779f67e7ad1c1ca84f 01-Mar-2017 Mathias Agopian <mathias@google.com> fallout of cleaning-up libutils includes

Test: run & compile
Bug: n/a
Change-Id: I63585ed5a764b9ce7af2187b79ca0c83e683fd7f
udioflinger/FastThread.cpp
udiopolicy/common/managerdefinitions/src/AudioPatch.cpp
udiopolicy/common/managerdefinitions/src/AudioPort.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
amera/libcameraservice/api1/CameraClient.cpp
amera/libcameraservice/device3/Camera3StreamSplitter.cpp
oundtrigger/SoundTriggerHalHidl.h
14b3b1200341103081ede8a4ce7f09eae29ac99a 03-Mar-2017 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: camera service HAL1 HIDL path"
4717c470bf989e02f798857358471f8feb77660f 13-Feb-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: camera service HAL1 HIDL path

Bug: 32991422
Test: Camera CTS pass (except FlashLightTest)
Change-Id: If6668540d9b24696031c893f3fa257cd294d773c
amera/libcameraservice/Android.mk
amera/libcameraservice/device1/CameraHardwareInterface.cpp
amera/libcameraservice/device1/CameraHardwareInterface.h
fc9c52f773827a08d37af018b7368bda91a5e791 28-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Rework StreamSplitter for camera use cases"
1cbdb4170cba2115c8397507a79938070e3032d4 28-Feb-2017 Eino-Ville Talvala <etalvala@google.com> Merge "Cameraserver: Use multiple hwbinder threads"
6141fe19f1e16330dab3632cf8b93e54b6417164 28-Feb-2017 Phil Burk <philburk@google.com> Merge "AudioFlinger: fix Effects handling for MMapThread"
d48b3a7a3bd95d9efb157ebbfc0f11dc8d7a87fb 28-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Combine platform and vendor seccomp policy at runtime"
869fab171971f350d5adf4680608ff39049270c3 28-Feb-2017 Phil Burk <philburk@google.com> AudioFlinger: fix Effects handling for MMapThread

Test: CTS test_aaudio.cpp in Exclusive mode
Change-Id: Iac63d901822255028b16c5b90ca07a72ceec372a
Signed-off-by: Phil Burk <philburk@google.com>
udioflinger/Effects.cpp
6566536c89a9e8646404bd2e671e3e081c181b4a 24-Feb-2017 Eino-Ville Talvala <etalvala@google.com> Cameraserver: Use multiple hwbinder threads

Some interactions between camera service and hwservicemanager require
multiple threads to execute without deadlocks, such as calling
getService() from within an onRegistered() callback.

Increase thread count to 3 to accomodate.

Also switch the order of listener registration and legacy provider
addition back to what it was originally.

Test: No deadlock when camera service is restarted
Bug: 35096594
Change-Id: I6def961d5765958fef284c0a1820e903abc851ef
amera/libcameraservice/common/CameraProviderManager.cpp
76f4bc38916fce8a9901168e411859e45ab8473a 26-Feb-2017 Christopher Ferris <cferris@google.com> Merge "Remove references to kernel macros."
bee0f0a5e7aa19aa7c59de03b508985b68bc6b5e 24-Jan-2017 Shuzhen Wang <shuzhenwang@google.com> Camera: Rework StreamSplitter for camera use cases

- Merge notifyRequestedSurfaces into getBufferLocked, so that during
getBufferLocked, the stream splitter gets to know which outputs the
current request is on.

- Reserve buffer slot in the output queue during getBufferLocked instead
of during onFrameAvailable. So if there is no slot/buffer available, no
new request is sent to HAL. This aligns with current cameraservice logic.
Do not hold the lock while calling attachBuffer to output queue because
it could block for a slow consumer.

- Instead of setting the consumer buffer count of input buffer queue to
maximum of all shared outputs, set it to sum of them. By doing this,
In the case of a slow consumer, other consumers sharing the same stream
won't be impacted.

- Handle the case where onBufferReleased not being fired for buffer
replaced by attachBuffer/queueBuffer.

- Add function to check the return value of onFrameAvailable so that
when output is abandoned, the error code is propagated back to
queueBuffer.

Test: Camera CTS, and CTS with StreamSplitter enabled for all
implementation defined use cases.
Bug: 33777818
Change-Id: I863f501d5283bbe70c71e66b4d37d690484b90fa
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3DummyStream.cpp
amera/libcameraservice/device3/Camera3DummyStream.h
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.h
amera/libcameraservice/device3/Camera3OutputStreamInterface.h
amera/libcameraservice/device3/Camera3SharedOutputStream.cpp
amera/libcameraservice/device3/Camera3SharedOutputStream.h
amera/libcameraservice/device3/Camera3Stream.cpp
amera/libcameraservice/device3/Camera3Stream.h
amera/libcameraservice/device3/Camera3StreamInterface.h
amera/libcameraservice/device3/Camera3StreamSplitter.cpp
amera/libcameraservice/device3/Camera3StreamSplitter.h
10cbff139360f3f642e0e3b3ccf2d463dbed22cf 22-Feb-2017 Andy Hung <hunga@google.com> VolumeShaper: Enable for offload and direct tracks

Test: Play Music in offload mode
Bug: 31015569
Change-Id: I00bb59e3e6809d4682f42057b1cc083f4fa9b9d1
udioflinger/PlaybackTracks.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
79234e4a1317167b23482024bf060080af04f257 23-Feb-2017 Jeff Vander Stoep <jeffv@google.com> Combine platform and vendor seccomp policy at runtime

Previously, vendor customization to seccomp policy was combined
with the platform's policy at build time. In order to remove
frameworks dependencies on the device folder, this policy
combination is being moved to runtime.

For mediacodec and mediaextractor, platform seccomp policy specified
in the frameworks will be loaded from /system/etc/seccomp_policy.
Optional vendor customizations must reside in
/vendor/etc/seccomp_policy. If the vendor policy exists, it will be
concatenated to the end of the platform policy and loaded, otherwise
just the platform policy will be loaded.

Bug: 34723744
Test: Dragon, Marlin, Muskie build and boot.
Test: Watch videos on youtube no seccomp violations observed.
Test: For both mediacodec and mediaextractor verify
"cat proc/<pid>/status | grep Seccomp" == Seccomp: 2
Change-Id: I08b79b207785df69add31e4662e2c33fa28b4f4d
ediacodec/Android.mk
ediacodec/main_codecservice.cpp
ediacodec/minijail/Android.mk
ediacodec/minijail/seccomp_policy/mediacodec-seccomp-arm.policy
ediacodec/seccomp_policy/mediacodec-arm.policy
ediaextractor/Android.mk
ediaextractor/main_extractorservice.cpp
ediaextractor/minijail/Android.mk
ediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-arm.policy
ediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-arm64.policy
ediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-x86.policy
ediaextractor/seccomp_policy/mediaextractor-arm.policy
ediaextractor/seccomp_policy/mediaextractor-arm64.policy
ediaextractor/seccomp_policy/mediaextractor-x86.policy
57fbe42f3b804d9b97504bee224a1a5cdc3385dc 24-Feb-2017 Christopher Ferris <cferris@google.com> Remove references to kernel macros.

The macros __force, __bitwise, __user are related to a kernel tool called
sparse to find kernel bugs. These macros are always defined as nothing
in the current uapi kernel header files, so these don't need to be here.

Change-Id: I37ab48123a85b3f9b8f67920e9d56cf518b32597
Test: Builds without warningers/errors.
boeservice/FakeAudioHal.cpp
c61a1f2939cf8924dfc680428fdb984f0eea0a93 23-Feb-2017 Chong Zhang <chz@google.com> Merge "MediaCas: add MediaCasService"
568e453d72f4026c1a0e902d533f9352a7ca190c 23-Feb-2017 Steven Moreland <smoreland@google.com> Merge "Revert "OMX: don't respect binderization toggle.""
a45c300fcad38e23107b3ad8dd1d3935f5127f9c 23-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "OMX: don't respect binderization toggle."
7e0c3c3e93cdf0d1fe59b82e8bc9c7c2fa678faf 23-Feb-2017 Steven Moreland <smoreland@google.com> Revert "OMX: don't respect binderization toggle."

This reverts commit 373580e1d51d3e89c16612998a10105fea09c3c5.
ediacodec/main_codecservice.cpp
373580e1d51d3e89c16612998a10105fea09c3c5 23-Feb-2017 Steven Moreland <smoreland@google.com> OMX: don't respect binderization toggle.

Test: pass
Change-Id: I495c71b0a39ae8423e109219f8f5e96812fe2aa1
ediacodec/main_codecservice.cpp
a42728489d3fbcd1d199099f33567119d05a7d2a 23-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "BroadcastRadio HAL uses "default" service name"
0d3a5edf232916e81adbc46fc0f4a1753166b066 22-Feb-2017 Pawin Vongmasa <pawin@google.com> Remove the dependency on passthrough IOmx in media.codec.

Also clean up some other dependencies.

Test: Manual testing with Camera, YouTube and Play Movies apps.
Bug: 35445903
Change-Id: I28562b5fbcc7054cf45c4ec2530bbe2ab4b5645f
ediacodec/Android.mk
ediacodec/main_codecservice.cpp
9d82aea709d206093df5ba6eae407fbcca5b9f5b 25-Jan-2017 Chris Phoenix <cphoenix@google.com> BroadcastRadio HAL uses "default" service name

The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.

Test: builds

Bug: 33844934
Change-Id: I22817cae1d5ce023db6e8b935ebff65e0abdf026
adio/RadioHalHidl.cpp
92a4bab4807d6a6736587e99094a10c420aa0a7d 22-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "mediacodec: include missing dependency"
f2832c42cf7d458b6297673bf95c5bc2d22e6519 21-Feb-2017 Steven Moreland <smoreland@google.com> mediacodec: include missing dependency

Test: pass

Change-Id: I937e9118a691ca855c40f7e89fc6509e594be1bd
ediacodec/Android.mk
5d7e5151e2572413fa7e30a8f65beadd89f45416 22-Feb-2017 Emilian Peev <epeev@google.com> Camera: Avoid possible race condition during provider init

The current sequence of registering for provider notifications
and trying to add a legacy provider could introduce a race
condition leading to a deadlock. The "onRegistration" callback
will try to acquire "mInterfaceMutex" which is still held during
the execution of "addProvider" for legacy. However "addProvider"
could get suspended waiting on the HIDL provider interface. If this
happens and the same thread that unblocks the service query tries
to notify the provider manager, then we will end up in a deadlock.
To avoid this, the initialization sequence can be modified a bit.
First add the legacy provider and then register for notifications.

Bug: 35096594
Test: Manual using stop/start of cameraserver
Change-Id: Ia381ae6bf567525cabd3f51246a192ddac37b7f8
amera/libcameraservice/common/CameraProviderManager.cpp
7ac1f99edbb6857d5ce07fd08784cd4db077207e 22-Feb-2017 Yunlian Jiang <yunlian@google.com> Merge "fix warning: Dereference of null pointer"
am: a2e67eb95e

Change-Id: I37a6738f637cfa1a5fa0ccdf0ed7f3aa2986b207
a2e67eb95e8dafeffb75c4e65f2648dedaa50a7d 22-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "fix warning: Dereference of null pointer"
20bd4b508cddd60818822ff2f71d1082bb0de477 21-Feb-2017 Steven Moreland <smoreland@google.com> Remove unused includes.

Found while debugging 35096594.

Test: pass
Change-Id: I9d637ea4fc2cdb57afebdb299e4c890a9d814333
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/common/CameraProviderManager.cpp
9dbe9a57bf0ae2494ec312d6c1b06feec20e9ec9 03-Jan-2017 Chong Zhang <chz@google.com> MediaCas: add MediaCasService

This CL adds API only without implementation.

bug: 22804304
Change-Id: Ibb5a29cc616ec0af81957b2bfe1419c482591753
ediadrm/Android.mk
ediadrm/FactoryLoader.h
ediadrm/MediaCasService.cpp
ediadrm/MediaCasService.h
ediadrm/main_mediadrmserver.cpp
a146a0c499e53a4f064777ab2b45407c14429fa0 18-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Treblize audio policy xml config file location"
0e701fd27a2daad2eadf83f904c68a418f93cf92 17-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "fallout of splitting rect.h out of libandroid."
ccaeb5f08d037cc0ec7a9ab69bf03364b3fad452 17-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Treat Seccomp failures as fatal errors."
0d4a6aff271586161a1fcd273572a00d2e01fe80 17-Feb-2017 Jaekyun Seok <jaekyun@google.com> Treblize audio policy xml config file location

Treblization requires to locate partner-specific configs in its own
partition. So the audio policy xml config file could be located in
/odm/etc or /vendor/etc.
This CL is to support those locations for the config.

Test: building succeeded and tested on sailfish.
Bug: 35369237
Change-Id: Ie59db630456f7690bbeca08017bea8b174651394
udiopolicy/managerdefault/AudioPolicyManager.cpp
bc1713d3b85d7ce656e032da6e4b6b342f14db03 14-Feb-2017 Mathias Agopian <mathias@google.com> fallout of splitting rect.h out of libandroid.

A lot of media makefiles didn’t specify libui or
libgui but included headers from these libraries
directly.

It works because these headers are on the global
include path. With this change, though, rect.h
is not anymore (albeit exported from libui).

Test: built and booted device
Bug: 35164655
Change-Id: I72e8f0b7bd25c6a67eedc17afe52c4c484a147fe
amera/libcameraservice/gui/RingBufferConsumer.h
ediacodec/Android.mk
87251eee475a53599b980334df777326fa8e1527 17-Feb-2017 Nicolas Roulet <nicoroulet@google.com> Merge "Implement log merging."
d5973043bed640cf634a26d65dedcde5d5ab3037 17-Feb-2017 Nicolas Roulet <nicoroulet@google.com> Merge "Minor code style changes and namespace fix"
8dc323ef737babc1b1c0b0347b4b895969aee77b 17-Feb-2017 Nicolas Roulet <nicoroulet@google.com> Merge "Added process name to PID log"
67a155a2ee89e7fed3eb079cc7af929c74a21f7a 17-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "libaaudio: changes for API council"
ad13f70fb66bfe0833acc536487a97b2006ee10a 17-Feb-2017 Tomasz Wasilczyk <twasilczyk@google.com> Merge "Review radio metadata allocations/deallocations."
40a4498b967d000c93e8561db5fdd0488cc1d824 03-Feb-2017 Nicolas Roulet <nicoroulet@google.com> Implement log merging.

Still missing:
* Put in separate periodical thread

Bug: 35329293
Test: manual
Change-Id: Ie8802fb7972e20d8dec493376ea253bb782f3a46
edialog/MediaLogService.cpp
edialog/MediaLogService.h
3316d5e6d375a4f09c681205e9094d30a0bfc4a2 15-Feb-2017 Phil Burk <philburk@google.com> libaaudio: changes for API council

Removed typedefs like aaudio_sample_rate_t
Removed use of handles. Just pass back opaque pointers.
Simplified gettersi in Stream.
Removed getters from Builder.
Update libaaudio.map.txt

Test: CTS test_aaudio.cpp
Change-Id: I63eaec3e5a8ecc516cfc1f950f4b4f54df1bd518
Signed-off-by: Phil Burk <philburk@google.com>
boeservice/AAudioService.cpp
boeservice/AAudioService.h
boeservice/AAudioServiceDefinitions.h
boeservice/AAudioServiceStreamBase.h
boeservice/AAudioServiceStreamFakeHal.cpp
boeservice/AAudioThread.h
boeservice/TimestampScheduler.cpp
boeservice/TimestampScheduler.h
4da7820be451847bad698ac0f687b964d9b5d34f 03-Feb-2017 Nicolas Roulet <nicoroulet@google.com> Minor code style changes and namespace fix

Bug: 35329090
Test: recompile, no change of functionality
Change-Id: Ied3ec7d95ce29896e8bf1851b08345da74bf8299
udioflinger/Threads.cpp
udioflinger/TypedLogger.cpp
udioflinger/TypedLogger.h
c20cb50c1c14cd765874511872f087c875f43ed9 01-Feb-2017 Nicolas Roulet <nicoroulet@google.com> Added process name to PID log

Bug: 35357686
Test: included in CL
Change-Id: Ie4d3cb66a2c766ce87ebabcc9c0d3aa988702e09
udioflinger/Threads.cpp
8bee17760265b5c1be963f0b32c4168bc40a2f0c 16-Feb-2017 Jorge Lucangeli Obes <jorgelo@google.com> Treat Seccomp failures as fatal errors.

The return value of SetUpMinijail is not being checked.
media.codec and media.extractor should not run without Seccomp if
there's a policy.

Bug: 34723744
Test: media.codec, media.extractor start, have Seccomp.
Test: cat /proc/`pgrep .codec`/status | grep Seccomp
Seccomp: 2
Test: cat /proc/`pgrep .extractor`/status | grep Seccomp
Seccomp: 2

Change-Id: I30c59d3193b3ebc8beace221741889afa2bbc8ae
inijail/minijail.cpp
inijail/minijail.h
9c47c97ecac581d66b6febafd156618247e86742 08-Feb-2017 Pawin Vongmasa <pawin@google.com> Enable full migration of OMX to Treble.

1. Toggling between Treble and non-Treble OMX will now be controlled by
two properties: "persist.hal.binderization" and
"persist.media.treble_omx". (Before this CL, this was controlled by
"debug.treble_omx".)
- If persist.media.treble_omx is not set, it will assume a default value
of -1.
- If persist.media.treble_omx is -1, persist.hal.binderization will be
used to determine whether OMX will be created as a Treble or non-Treble
service.
- If persist.media.treble_omx is 1, OMX will be created as a Treble
service.
- If persist.media.treble_omx has any other value, OMX will be created
as a non-Treble service.
- persist.media.treble_omx can be changed without rebooting, but it will
only take effect after media.codec and mediaserver processes are killed.

2. Remove all dependencies on non-Treble service. This was not done for
MediaCodec, MediaPlayerService::Client, MediaRecorderClient, stagefright
command, and omx_tests command. OMXClient and media.codec process will
now pick the right version of OMX based on properties mentioned above.
Before this CL, media.codec would always present the non-Treble version
of OMX regardless of the flag.

3. Provide workarounds for some HIDL issues.
- A sequence of nested binder and hwbinder calls require many threads to
handle. (b/35283480) The workaround is to increase the number of threads
in the thread pool of media.codec process.
- android.hidl.base@1.0::IBase::unlinkToDeath takes a strong pointer
instead of a weak pointer. (b/35233970) This causes an infinite
recursion in the destructor of ServiceDeathNotifier in
MediaPlayerService::Client and MediaRecorderClient. The workaround moves
calls to unlinkToDeath() outside of the destructor.

Test: Recorded and played videos with Camera app. Ran stagefright and
omx_tests commands.
Bug: 31399200

Change-Id: Id1940ed982838e10bf10fe8ed5b7bb912a5a2d3a
ediacodec/Android.mk
ediacodec/main_codecservice.cpp
9ee35d72c4b89db99c2df0b0125373f360b337f8 16-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "AudioFlinger: Prevent FastMixer for A2DP sink"
a0ea70c5764131c44abeeb26867f1a9f0394ac2f 16-Feb-2017 Tomasz Wasilczyk <twasilczyk@google.com> Review radio metadata allocations/deallocations.

Bug: b/34054813
Test: VTS, manual
Change-Id: I8c402ff6fed8d1fe7c5c2d468f2e7822dc0dac6f
adio/HidlUtils.cpp
adio/RadioHalHidl.cpp
fda69406966f8578a7827e889bff615f0144b441 15-Feb-2017 Andy Hung <hunga@google.com> AudioFlinger: Prevent FastMixer for A2DP sink

Also avoids issues with FastMixer and BT suspend.

Test: BT with Play Movies
Bug: 34335167
Bug: 35166960
Bug: 35384619
Change-Id: Ie1bfaf2d09b7cfe6b86a1d26fc1d5fdabf82c020
udioflinger/Threads.cpp
45e4bf1cb9b202a7f25f8dc890e32e12fb60d982 15-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "AudioFlinger: Do not wait for FastMixer if in cold idle."
a898440aa3185aadf067208da04df251f5af1575 15-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes If5c3dcc9,Ia8be7b9c

* changes:
Allow media.codec and media.extractor to specify two policy files.
Unify media.codec and media.extractor Minijail usage.
f228531c5d01f497f5802c44545e0000ec44ab83 15-Feb-2017 Andy Hung <hunga@google.com> AudioFlinger: Do not wait for FastMixer if in cold idle.

Test: BT outgoing call
Bug: 34335167
Bug: 35166960
Change-Id: I1da0de844560bf77b4149dc30979eebc131d009e
udioflinger/Threads.cpp
80959a7c89e310b74c7e3a68d7f80ceac7a1574d 14-Feb-2017 Jorge Lucangeli Obes <jorgelo@google.com> Allow media.codec and media.extractor to specify two policy files.

Bug: Bug: 34723744
Test: Unit tests.
Test: media.codec, media.extractor start, have Seccomp.
Test: cat /proc/`pgrep .codec`/status | grep Seccomp
Seccomp: 2
Test: cat /proc/`pgrep .extractor`/status | grep Seccomp
Seccomp: 2
Change-Id: If5c3dcc934f5d76bd32859b2f7b7ecb772a56303
ediacodec/main_codecservice.cpp
ediaextractor/main_extractorservice.cpp
inijail/Android.mk
inijail/av_services_minijail_unittest.cpp
inijail/minijail.cpp
inijail/minijail.h
09cf7cab168663ca98a440a9473b1515e0eb0cfa 15-Feb-2017 Andy Hung <hunga@google.com> Merge "AudioFlinger: Fix memory allocation for client-less tracks"
30ba02eab9e5075df2a5ee78f7cf298697dbf39f 15-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "Link against libhidltransport.""
af515713a6ce5ad9d268c20e1317fe84bdcaa6de 13-Feb-2017 Yifan Hong <elsk@google.com> Revert "Link against libhidltransport."

This reverts commit e3b713d4b73ac1ffbc87d419a898dd10aa04fd45.

Bug: 35151407
Bug: 35041785

Test: verified with Play Movies on fugu

Change-Id: I7bb2be082cc97e7993aa14f1550b3935ad3661c8
ediadrm/Android.mk
64e843f1c312382e3e1a6f6e17f8d895e9c6efe8 14-Feb-2017 Andy Hung <hunga@google.com> DO NOT MERGE AudioFlinger: Check framecount overflow when creating track

Test: Native POC
Bug: 34749571
Change-Id: I7529658e52ac7e64d162eb5338f10fb25eaa8fe7
udioflinger/Tracks.cpp
eaa3969f757291f151efedde17ec529b8659024d 14-Feb-2017 Andy Hung <hunga@google.com> AudioFlinger: Check framecount overflow when creating track

Test: Native POC
Bug: 34749571
Change-Id: I7529658e52ac7e64d162eb5338f10fb25eaa8fe7
(cherry picked from commit 1883f69de5f2c4e71df58d5b71d7c39f9779b50c)
udioflinger/Tracks.cpp
afb31487f3156a7284d2f0d06646c7bc00d99537 14-Feb-2017 Andy Hung <hunga@google.com> AudioFlinger: Fix memory allocation for client-less tracks

Test: Ringtone with BT
Bug: 35350587
Change-Id: If247d319d58f8f4d18b49f58ec950491871ebb2d
udioflinger/Tracks.cpp
1883f69de5f2c4e71df58d5b71d7c39f9779b50c 14-Feb-2017 Andy Hung <hunga@google.com> AudioFlinger: Check framecount overflow when creating track

Test: Native POC
Bug: 34749571
Change-Id: I7529658e52ac7e64d162eb5338f10fb25eaa8fe7
udioflinger/Tracks.cpp
fbfb8e8b9a7e6a2d351b28bfd8cdd3dacd10e975 14-Feb-2017 Jorge Lucangeli Obes <jorgelo@google.com> Unify media.codec and media.extractor Minijail usage.

That way we can modify this code in one place to take a list of seccomp
policy files.

This CL removes around 70 lines by unifying identical code. No change
in behavior.

Bug: 34723744
Test: media.codec, media.extractor start, have Seccomp.
Test: cat /proc/`pgrep .codec`/status | grep Seccomp
Seccomp: 2
Test: cat /proc/`pgrep .extractor`/status | grep Seccomp
Seccomp: 2
Change-Id: Ia8be7b9c3d6163804d2a45954f8d03315ae32e7a
ediacodec/Android.mk
ediacodec/main_codecservice.cpp
ediacodec/minijail/minijail.cpp
ediacodec/minijail/minijail.h
ediaextractor/Android.mk
ediaextractor/main_extractorservice.cpp
ediaextractor/minijail/minijail.cpp
ediaextractor/minijail/minijail.h
inijail/Android.mk
inijail/minijail.cpp
inijail/minijail.h
760d007ba00ccafd9b0bc5839bc0141eadc40e0e 14-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Allow finalizeOutputConfiguration not adding new surface"
30d48d9542fb3f85889108c1ee2daff98a4860e7 14-Feb-2017 Andy Hung <hunga@google.com> Merge "VolumeShaper: Initial implementation"
9fc8b5cd4a64ef07e84c69112461324d5c13a0b0 24-Jan-2017 Andy Hung <hunga@google.com> VolumeShaper: Initial implementation

The VolumeShaper is used to apply a volume
envelope to an AudioTrack or a MediaPlayer.

Test: CTS
Bug: 30920125
Bug: 31015569
Change-Id: I42e2f13bd6879299dc780e60d143c2d465483a44
udioflinger/AudioFlinger.h
udioflinger/PlaybackTracks.h
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
88fd00509164dc46a98ff2921c956e2d37919117 10-Feb-2017 Shuzhen Wang <shuzhenwang@google.com> Camera: Allow finalizeOutputConfiguration not adding new surface

If the application calls finalizeOutputConfiguration without adding new
surface, as long as there is at least one surface in the
OutputConfiguration, do not throw exception.

Add logic to not allow finalizeOutputConfigurations twice on a
particular stream.

Test: testDeferredSurfaces cts and GoogleCameraApp manual test.
Bug: 35137641
Change-Id: I96061231e9b884e73c92520e7f2c021db32fa731
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
f5f4056014118f6ddd16affe853fd0605001ab40 13-Feb-2017 Eric Laurent <elaurent@google.com> Merge "audio: several concurrent capture fixes"
2d6140b8dce137f89029b12468e25d5911f23420 13-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topic 'api1_zsl_rework'

* changes:
Camera2: Add native test for framework-backed ZSL
Camera: Rework ZSL path when using API1 with HAL3
4441393a9d9830de8b059b279127c6b558f194ba 10-Feb-2017 Jeff Tinker <jtinker@google.com> Merge "Enable DRM HIDL HAL by default"
49c7d08d4976dba22d9c5f1ec759da61762ede3f 10-Feb-2017 Phil Burk <philburk@google.com> Merge "libaaudio: change name from liboboe"
7863c791dba8c4e5e9591b6837d410e580be0a25 10-Feb-2017 Eric Laurent <elaurent@google.com> Merge changes from topic 'mmap_no_irq'

* changes:
Add support for mmap stream
audioflinger: define MMAP HAL Stream control interface
f53e613b3dedab3ecada2c93d8846233c442d129 09-Feb-2017 Phil Burk <philburk@google.com> libaaudio: change name from liboboe

Bug: 34749573
Test: CTS test_aaudio.cpp
Change-Id: I7e2b621488047f0798ca6f2fc00d2b5fed2bf015
Signed-off-by: Phil Burk <philburk@google.com>
boeservice/Android.mk
d1adbd51e6450a8ee1770921e3b99e91ecc1be4f 10-Feb-2017 Mikhail Naganov <mnaganov@google.com> Merge "audioflinger: Adjust priority of hal threads"
555530ab903504ad3586bc24cd8a4f200f5c39ae 08-Feb-2017 Eric Laurent <elaurent@google.com> audio: several concurrent capture fixes

Make sure AudioRecord clients are invalidated synchronously
when closing an input stream instead of when the capture thread
exits.

Fix AudioPolicyManager::getInputForDevice() logic to make sure that
not only the first opened input encountered is considered when looking
for a compatible input to reuse for concurrent capture.

Bug: 22702906
Test: run CTS test
Change-Id: I7f69609d4ee70a37ab06753ff970b12df17d885b
udioflinger/Threads.cpp
udioflinger/Threads.h
udiopolicy/managerdefault/AudioPolicyManager.cpp
c96fc852f010f9254a38a0073a4de7a848e33e44 10-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "audiopolicy: Two clients can not offload concurrently"
83f042776b131b149f803fff6ab184ae2c4d98cd 07-Feb-2017 Mikhail Naganov <mnaganov@google.com> audioflinger: Adjust priority of hal threads

HALs are prohibited from using framework binder, and there is
no equivalent scheduling policy service in hwbinder. Thus, in order
to match priorities of FastCapture / Mixer threads with their
counterparts in the HAL, it is needed to request the priority boost
from audioflinger on behalf of the HAL.

Test done to verify the priority was correctly set.

Bug: 34131400
Change-Id: If8b6b031c0fcba771fae901a5b8e7da89b3a1570
Test: check priority match between audioflinger's and hal's threads
udioflinger/Threads.cpp
udioflinger/Threads.h
amera/libcameraservice/device3/Camera3Device.cpp
3775c69f1c851b20779a6018854ce7ab422c1a51 10-Feb-2017 Phil Burk <philburk@google.com> Merge "AAudio: add setBufferCapacity()"
551061ab211e1da0f060d7c895617814618da5c2 07-Feb-2017 Kevin Rocard <krocard@google.com> audiopolicy: Two clients can not offload concurrently

If two application are playing a compatible offload stream at the same
time.
Eg: two games playing MP3. At least one not taking the audio
focus.

The audio policy was offloading both stream resulting in audio glitches
and one stream being dropped.

Concurrent offload streams is intended to be a transitioning state when
an application wants back to back playbacks.

It should not be allowed for two different applications to stream at the
same time.

Test: Play mp3 while mp3 is already offloaded.
Bug: 34012147

Change-Id: I98a8913d6faf5092a1e43a0bdd0f1ce1482221a9
Signed-off-by: Kevin Rocard <krocard@google.com>
udiopolicy/common/managerdefinitions/include/AudioOutputDescriptor.h
udiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
e2ce9366d1b138326035c643b7fec68cd2dc83c5 09-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Check for invalid camera during API version calls"
76cfc06bda06200df6056e17fbfac8c9db064d44 09-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix potential null dereference in SoundTriggerHwService"
3df348fbaca567ca891503213ff8c344a1ea2e05 08-Feb-2017 Phil Burk <philburk@google.com> AAudio: add setBufferCapacity()

This is needed so that an app can request a larger buffer.
Also fix a bug related to passing configuration data to the service.

Test: test_aaudio.cpp
Change-Id: Idd3066c84f6bac76a5d545b12081bc311025a6c3
Signed-off-by: Phil Burk <philburk@google.com>
boeservice/AAudioServiceStreamFakeHal.cpp
boeservice/AAudioServiceStreamFakeHal.h
boeservice/FakeAudioHal.cpp
boeservice/FakeAudioHal.h
395d1a36e38f3dd100368cc89226870be3508d7a 08-Feb-2017 Martijn Coenen <maco@google.com> Merge "Link against libhidltransport."
e3b713d4b73ac1ffbc87d419a898dd10aa04fd45 08-Feb-2017 Martijn Coenen <maco@google.com> Link against libhidltransport.

To work around an issue where future dlopen()
of libraries depending on libhidltransport works
correctly.

Bug: 35041785
Test: secure video playback works again
Change-Id: I6e01dae16761044e5c89dad593aeca946c96b7bd
ediadrm/Android.mk
9aa1dcbccba23378312e63bb0dd2cbe4ef4cb1f9 08-Feb-2017 Mathias Agopian <mathias@google.com> Merge "Add missing includes"
3b7958fa8a6d4bc84e45fcee4f30d50acc62ce36 08-Feb-2017 Tomasz Wasilczyk <twasilczyk@google.com> Merge "Fix uninitialized pointer dereference when loading default radio module." am: 94388e4b63 am: e5bad5f89a am: 2ab6368f1c
am: 4bc99bcd45

Change-Id: Id7bf3aec2086611700f2a8705aee7ca1c4e4c997
4bc99bcd453559938d85b7f559b119d7dd46a9ba 08-Feb-2017 Tomasz Wasilczyk <twasilczyk@google.com> Merge "Fix uninitialized pointer dereference when loading default radio module." am: 94388e4b63 am: e5bad5f89a
am: 2ab6368f1c

Change-Id: I660ebdec3573621c7f51050d5483b5f8bafc092f
2ab6368f1c78abb7788516f99f8878767335d8be 08-Feb-2017 Tomasz Wasilczyk <twasilczyk@google.com> Merge "Fix uninitialized pointer dereference when loading default radio module." am: 94388e4b63
am: e5bad5f89a

Change-Id: I68b567b13be1d2293cf13e61d92fa676d97b8381
2f140ed90057ca0df3f9da8318241ecfb6dda9eb 08-Feb-2017 Zhijun He <zhijunhe@google.com> CameraService: don't skip device dump when there is no client

We shouldn't skip the device metadata dump when the camera is not
in use.

Test: adb shell dumpsys media.camera works
Bug: 35125905
Change-Id: I26e2a612efa55b3289adb160c90d3fbc95bb4085
amera/libcameraservice/CameraService.cpp
164f36815fe5ff8bb3d0f0da013eca8a6408eab2 08-Feb-2017 Tomasz Wasilczyk <twasilczyk@google.com> Fix uninitialized pointer dereference when loading default radio module.

Test: manual
Change-Id: I6ea492536cabc2574dfc9113ca599865d578fbfe
adio/RadioService.cpp
28ad2eae9ac86df397b27d27fcc92d2c893138af 07-Feb-2017 Emilian Peev <epeev@google.com> Camera: Check for invalid camera during API version calls

CTS test case 'testCameraManagerInvalidDevice' will try
to query the static characteristics of invalid devices.
The supported camera API will also get checked as
part of the current call flow. A camera device access
exception will be thrown which is not expected. The
correct exception should be "IllegalArgumentException".

BUG: 35095452
Test: run cts -m Camera -t
android.hardware.camera2.cts.CameraManagerTest#testCameraManagerInvalidDevice
-d -o --abi armeabi-v7a --disable-reboot
Change-Id:I055deea116d5f3a69ed1a47b00d820be88a87232
amera/libcameraservice/CameraService.cpp
c8a9f4ad35f24ac59645bb262bd8f16fd4f6f0d8 07-Feb-2017 Chris Thornton <thorntonc@google.com> Fix potential null dereference in SoundTriggerHwService

Identified by static analysis as a potential problem.

Test: mmma frameworks/av/services/soundtrigger
Change-Id: If24519faeec260c3d357b369d53d0f68689bdf8a
oundtrigger/SoundTriggerHwService.cpp
01d56fe3fcad97dbed15093e03d6f50eca9fbef9 08-Feb-2017 Mathias Agopian <mathias@google.com> Add missing includes

Test: compiled
Bug: not applicable
Change-Id: Ie4007970f83e5d08b2d35e78a49d93d696809d7b
amera/libcameraservice/device3/Camera3BufferManager.cpp
amera/libcameraservice/device3/Camera3BufferManager.h
d2b0b504f1762cf31f61fda093b180544acd3b53 07-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera service: Update client eviction priorities"
8131a26957de26f15c6b41a64eb299ff61888e88 01-Feb-2017 Emilian Peev <epeev@google.com> Camera service: Update client eviction priorities

Use both oom score and process state for client eviction.
The score will have higher priority over the process state.
This should resolve the state ambiguity when PiP clients
try to connect to exclusive camera resources while
foreground clients are running.

BUG: 34701266
Test: Manual testing, complete CTS Camera package
Change-Id: Ic775b011a20e50f9c0c1c0a4bc1cf7ca75410740
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/utils/ClientManager.h
9b16e197e25dd665933869f33bc304127535bdb8 03-Feb-2017 Marco Nelissen <marcone@google.com> Add getdents64 to seccomp policy

Bug: 34819438
Test: recorded video
Change-Id: Ia764bb0c20a95d822f350e546d61e4948f60a5ac
ediacodec/minijail/seccomp_policy/mediacodec-seccomp-arm.policy
8eacd8090e16c022dcbb11850cff83f984fe2357 03-Feb-2017 Nicolas Roulet <nicoroulet@google.com> Merge "Implemented typed, thread-specific logging system. Currently supported types are: * Strings * Integers * Floats * Timestamps * Process IDs"
fe1e1449cadff4f946c33403aecc73b4b4a11e56 30-Jan-2017 Nicolas Roulet <nicoroulet@google.com> Implemented typed, thread-specific logging system. Currently supported types are:
* Strings
* Integers
* Floats
* Timestamps
* Process IDs

Added printf-like formatted logging using mentioned types.

Test: included in this CL
Bug: 29421410
Change-Id: Ie07b78d8d39c32fcc8a122ffa9b1b7082800b990
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
udioflinger/TypedLogger.cpp
udioflinger/TypedLogger.h
5086a64b694ee3cc35006ac7e1e026abf2bd8cbc 02-Feb-2017 Phil Burk <philburk@google.com> Merge "liboboe: rename Oboe to AAudio"
2d16ffaae63051b5faf7c39a455c6d5af0226377 24-Jan-2017 Emilian Peev <epeev@google.com> Camera: Rework ZSL path when using API1 with HAL3

Currently this path relies entirely on the deprecated bi-directional
streams. This needs to be re-worked and the functionality should
only use input&ouput streams. In this case the dedicated
'Camera3ZslStream' module becomes mostly obsolete. Some of the logic
for buffer comparison will still be needed and can be moved to ZSL
processor entirely.
The processor module will now use two streams, one input stream and
one ZSL output stream, which will produce the queue data. Both of
them will be configured to use the supported sensor array size and
private format. Scaling from the sensor resolution to the final user
requested size will happen during the re-process pass once image
capture gets triggered.

BUG: 34131351
Test: Manual via TestingCamera, 'CameraTest' API1 test cases
Change-Id: I7c87b7e7f89815e01a7cb5ce39d9c561c58562df
amera/libcameraservice/Android.mk
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/ZslProcessor.cpp
amera/libcameraservice/api1/client2/ZslProcessor.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3ZslStream.cpp
amera/libcameraservice/device3/Camera3ZslStream.h
f3a591cc9d604133e2c5cae3d34322b52cd7575d 02-Feb-2017 Jeff Tinker <jtinker@google.com> Enable DRM HIDL HAL by default

Eliminate ENABLE_TREBLE since it is obsolete.
Switching back to legacy DRM is still possible
by building with DISABLE_TREBLE_DRM=true

Change-Id: I6b921050dff6162112c60df21549fc93bc46e379
ediadrm/Android.mk
ediadrm/MediaDrmService.cpp
03904c44cdf8ce30333d7e96e3eda959e5a8c208 02-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: StreamSplitter: Return overwritten buffer to input"
be0ee69ae88f9082eab0083cbf7b8a0676b5f673 02-Feb-2017 Eric Laurent <elaurent@google.com> Merge "audio: fix audioSession null check"
ec0a5ac45728bc610e0266ec1a21d65ac340562a 02-Feb-2017 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3Device: Update frame counters/timestamps for dumpsys info"
5ed503c7a66c90f93759c90237a9b432dbd93f9f 01-Feb-2017 Phil Burk <philburk@google.com> liboboe: rename Oboe to AAudio

All of the edits were done using scripts in media/liboboe/scripts.
The conversion is done using SED, which is called from
convert_oboe_aaudio.sh
The conversion can be reverted when debugging using revert_all_aaudio.sh
The string substitutions are in oboe_to_aaudio.sed

Bug: 34749573
Test: cts/tests/tests/nativemedia/aaudio

Change-Id: Ia10b34472a90df2652b87607c99156e9084e57aa
Signed-off-by: Phil Burk <philburk@google.com>
boeservice/AAudioService.cpp
boeservice/AAudioService.h
boeservice/AAudioServiceDefinitions.h
boeservice/AAudioServiceMain.cpp
boeservice/AAudioServiceStreamBase.cpp
boeservice/AAudioServiceStreamBase.h
boeservice/AAudioServiceStreamFakeHal.cpp
boeservice/AAudioServiceStreamFakeHal.h
boeservice/AAudioThread.cpp
boeservice/AAudioThread.h
boeservice/Android.mk
boeservice/FakeAudioHal.cpp
boeservice/FakeAudioHal.h
boeservice/OboeAudioService.cpp
boeservice/OboeAudioService.h
boeservice/OboeService.h
boeservice/OboeServiceMain.cpp
boeservice/OboeServiceStreamBase.cpp
boeservice/OboeServiceStreamBase.h
boeservice/OboeServiceStreamFakeHal.cpp
boeservice/OboeServiceStreamFakeHal.h
boeservice/OboeThread.cpp
boeservice/OboeThread.h
boeservice/SharedRingBuffer.cpp
boeservice/SharedRingBuffer.h
boeservice/TimestampScheduler.cpp
boeservice/TimestampScheduler.h
2987b83c782667dd3740f731268fe3372c343fce 01-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera service: Fix dump() for treble path and rearrange it"
b23ba1ddd57b12e632e470ba21ce3c6ef44de4b3 01-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix warning: Dereference of null pointer."
aadc336983e503f1b86533eb910f693383711b6a 01-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera service: Clean up dump() command indenting."
c31dc7e61eb37214ad186f6a2bc43d7b92bd236e 01-Feb-2017 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Update frame counters/timestamps for dumpsys info

For output streams, increment frame count and update timestamp when a
filled buffer is queued to the output buffer queue.

For input streams, increment frame count and update timestamp when a
buffer is acquired from the input buffer queue.

Test: Manual inspection of adb shell dumpsys media.camera while
running DevCamera
Change-Id: I8dc1d134baf5ad467e169f3ba6ffe0d1486df9dc
amera/libcameraservice/device3/Camera3InputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.cpp
d00111e3b0c2ee59736fda992dd9ea24b23ef46a 31-Jan-2017 Eino-Ville Talvala <etalvala@google.com> Camera service: Fix dump() for treble path and rearrange it

Get camera service dump working again in the Treble path, and clean
up the formatting a bit

- Switch to dprintf instead of write() for most dump calls
- Add clearer headers for each section
- Add static metadata details to CameraProviderManager dump

Test: adb shell dumpsys media.camera with Treble both enabled and disabled
Bug: 32991422
Change-Id: Ie1d431b68649777bfe84fbb1be0687dd02e671af
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/common/CameraProviderManager.cpp
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/utils/CameraTraces.cpp
8131418cf06d38431aff416f1d38ec011d4259ee 31-Jan-2017 Eino-Ville Talvala <etalvala@google.com> Camera service: Clean up dump() command indenting.

In preparation for fixing dump() for Treble codepath.

Test: Compiles
Bug: 32991422
Change-Id: I1d889361e4836b75483e066b97de4015a2ef84cf
amera/libcameraservice/CameraService.cpp
32ba98626834cb77e5d14b3e419385f0e32ec0bc 01-Feb-2017 Yunlian Jiang <yunlian@google.com> Fix warning: Dereference of null pointer.

Bug: None
Test: The warning is gone.
Change-Id: I4c08397c0ee18c7714eb9b1029844d427259907b
udioflinger/AudioFlinger.cpp
12eb31583f40220b73a5e33b427e1d8f58243939 01-Feb-2017 Pawin Vongmasa <pawin@google.com> Merge "Add the Treble version of OMX to the service."
587b8dfdbc3d3b1dd9ffc1996b9a07cd9b284833 31-Jan-2017 vivek mehta <mvivek@codeaurora.org> audio: fix audioSession null check

Test: make

Change-Id: Ied514f8fb7496143bad45504151ca16226c67767
udiopolicy/managerdefault/AudioPolicyManager.cpp
a1ee4c28facd2e4ae0eb288178c8988bf1806148 01-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: remove wait for remote HIDL interface"
9f910521ca5f06e728cf946822fa1d5c4ddb95ec 01-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "CameraService: Fill in missing facing information in Treble path"
4c5b1c777680df26af1d28624b99f8388fb9df4c 31-Jan-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: remove wait for remote HIDL interface

The new getService implementation does it.

Test: fixing Marlin flashlight control
Bug: 34821019
Change-Id: Ifd21f41313b85ef0abbd306d2862524e19b94e7d
amera/libcameraservice/common/CameraProviderManager.cpp
amera/libcameraservice/common/CameraProviderManager.h
6963d0ad7b621dcdaa74cbfed17c776121635146 31-Jan-2017 Eino-Ville Talvala <etalvala@google.com> CameraService: Fill in missing facing information in Treble path

getDeviceVersion(), for whatever reason, also optionally returns the
facing of the specified camera device. The latter part was left
out of the Treble path implementation, resulting in incorrect
display orientation calculations higher up the chain.

Also add checks for invalid facings returned by getDeviceVersion so
that error logs will point this out next time.

Test: Manual inspection: API1-based applications do not have upside-
down preview. API1 CTS passes.
Bug: 34816614
Change-Id: Ice4c644e504f59e7df9be6636d9e6a3b38c52d4b
amera/libcameraservice/CameraService.cpp
70537c1ce74eff5cbd6554fc972a7d44b7157eca 31-Jan-2017 Jeff Tinker <jtinker@google.com> Fix fugu build break on aosp

bug:34767350
Change-Id: Ibc10bec4f79e3d58b5c72c99a7f1e56e7a2fbd86
ediadrm/Android.mk
82e1a5e928b6b73c6b568ed8bc4d0b81e503afd8 31-Jan-2017 Phil Burk <philburk@google.com> Merge "OboeAudioService: add thread to service for passing timestamps"
8345f77901ff4715a450c025807eac05aefda761 31-Jan-2017 Andy Hung <hunga@google.com> DO NOT MERGE Revert "Log audio information to ensure complete delivery"
am: 1da5859d05

Change-Id: Ie5b427db9af0fdb8427e0985450328f3a2977013
50181a137661fcb775111228f3a83092df5cb22a 31-Jan-2017 Edwin Wong <edwinwong@google.com> Merge "Pass application packagename to drm plugin."
1da5859d05267b336325f2662a72c1456f61e430 31-Jan-2017 Andy Hung <hunga@google.com> DO NOT MERGE Revert "Log audio information to ensure complete delivery"

This reverts commit 1f82f9569d257adc1d6d1c9a58e542c3c99c0109.
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
033975f9afa776fab47c027c0b3b80c438216d77 26-Dec-2016 Pawin Vongmasa <pawin@google.com> Add the Treble version of OMX to the service.

To enable the Treble version of IOmx in mediacodec process, use "setprop
debug.treble_omx 1".

Test: Compiles
Bug: 31399200
Change-Id: I0935dc7943e25067f5d8e75264cf2b088498a862
ediacodec/Android.mk
ediacodec/main_codecservice.cpp
dec33abe3739b2116ef6fbac36f7ca5d26f9d190 17-Jan-2017 Phil Burk <philburk@google.com> OboeAudioService: add thread to service for passing timestamps

Cleanup several TODOs.

Test: test_aaudio in CTS
Change-Id: I7fc956b6a21cbb592f98e1e5a8f43ebd6926d796
Signed-off-by: Phil Burk <philburk@google.com>
boeservice/Android.mk
boeservice/OboeAudioService.cpp
boeservice/OboeAudioService.h
boeservice/OboeServiceStreamBase.cpp
boeservice/OboeServiceStreamBase.h
boeservice/OboeServiceStreamFakeHal.cpp
boeservice/OboeServiceStreamFakeHal.h
boeservice/OboeThread.cpp
boeservice/OboeThread.h
boeservice/TimestampScheduler.cpp
boeservice/TimestampScheduler.h
b3642e0acd7deb2e3ff2fec4e3b103654e7448d1 31-Jan-2017 Ray Essick <essick@google.com> Merge "clean up a fixed size buffer"
68b3d9f49e68a11af5225175dc9e60ce88819e84 07-Jan-2017 Edwin Wong <edwinwong@google.com> Pass application packagename to drm plugin.

Pass application package name to createPlugin and createDrmPlugin.
The application packagename will be used as part of a unique
identifier for drm plugin.

Test: Play Movies.

Test: ANDROID_BUILD_TOP= ./android-gts/tools/gts-tradefed run gts -m
GtsMediaTestCases --test
com.google.android.media.gts.WidevineH264PlaybackTests#testL1With480P60

Verify the application's packagename is reachable in the drm plugin's
debug log.

bug: 27101531

Change-Id: I84fb09b591a7af63f6e20004e910112a4ce6ebac
ediadrm/Android.mk
ediadrm/MediaDrmService.cpp
35ad27fa15b3da0c63f218e5a88b8f7c7f3419b8 30-Jan-2017 Ray Essick <essick@google.com> clean up a fixed size buffer

eliminate the size of a fixed length buffer for a potentially very
long record. Code was safe in that it didn't allow an overflow, but
we really wanted the information that was being truncated.

also some cleanup on parameters for "dumpsys media.metrics":
time units for "-since" and include a -help.

Bug: 34792286 34793404
Test: invoke dumpsys with assorted parameters to see output
Change-Id: If960afd52a509f277910e62c13d4ba60f9ed7e34
ediaanalytics/MediaAnalyticsService.cpp
78b3ee27f696980c999c9ac5db87e626ff6f717f 28-Jan-2017 Eino-Ville Talvala <etalvala@google.com> Merge "Camera service: Switch to HIDL by default, add prop to disable"
9cbbc837625cced18adabc57d71479044999155d 24-Jan-2017 Eino-Ville Talvala <etalvala@google.com> Camera service: Switch to HIDL by default, add prop to disable

On camera service startup, use the HIDL provider codepath unless the
system property "camera.disable_treble" is set to true.

The system property is needed until the HALv1 implementation is
complete and the emulator can switch over, as well as for devices not
yet tested in passthrough mode.

Whether passthrough or separate-process HAL is used depends on the
services and libraries available on each device.

Test: Camera CTS on angler, bullhead, sailfish, ryu. HFR performance
test on sailfish. Basic operation of camera app.
Bug: 32991422

Change-Id: I3dd580cbcddd0df2e6b1e422920aa84270286e0a
amera/libcameraservice/Android.mk
amera/libcameraservice/CameraService.cpp
4a4193efd481dc3d26148bb8c5b43187f0777b60 26-Jan-2017 Eric Laurent <elaurent@google.com> Merge "audio: enable concurrent capture for voice recognition"
29bcb38457deb3c69e0b5d2e8658446e969bd380 26-Jan-2017 Jeff Tinker <jtinker@google.com> Merge "Implement client code to use Drm and Crypto HALs"
bb9480975322b0d1a09f76ef14f3285fc8af4e5f 24-Jan-2017 Eric Laurent <elaurent@google.com> audio: enable concurrent capture for voice recognition

Add AUDIO_SOURCE_VOICE_RECOGNITION to the list of use
cases allowed for concurrent capture. As AUDIO_SOURCE_HOTWORD is
enabled for concurrent capture it makes sense to enable a client
to transition to voice recognition after the hotword has been detected
in a concurrent capture situation.

Also fixed some concurrent capture scenarii

Bug: 22702906
Test: build and check "OK Google" detection
Change-Id: Ic6dd41372fe74122395764beca7ca9a65197464b
udiopolicy/common/managerdefinitions/include/AudioInputDescriptor.h
udiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
a53d6553fce1818bdf87833f93633c93ad1b5915 20-Jan-2017 Jeff Tinker <jtinker@google.com> Implement client code to use Drm and Crypto HALs

This change adds DrmHal & CryptoHal classes that connect to the Treble
HAL interfaces for drm. These classes mirror the existing Drm and
Crypto classes that connect to the DrmPlugin and CryptoPlugin
interfaces. Having both allows mediadrmserver to run in either mode
while the HAL is stabilized.

The shared memory interfaces between mediaserver's ACodecBufferChannel
and ICrypto had to be reworked to use the Treble HALs. Specifically,
the shared memory path for returning decrypted buffers in the
non-secure case had to become separate instead of piggy-backing on the
source shared memory buffer. A separate shared memory destination
buffer is now allocated on the buffer channel. An abstraction for a
decrypt destination buffer was also introduced to clarify ICrypto's
decrypt method.

Tests: Playback using Play Movies and ExoPlayer works on angler
with and without the treble hal enabled.

bug: 32815560
Change-Id: I5a3dc84f99902eb8cf8eabab9ad074d307744950
ediadrm/Android.mk
ediadrm/MediaDrmService.cpp
1d399328e24b3ea0512e10f0925d8d09b43225ef 25-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "audioflinger: Fix crash in EffectChain::dump"
c778e59330a01a9aee6ad354c1e53462df4c88af 25-Jan-2017 Mikhail Naganov <mnaganov@google.com> audioflinger: Fix crash in EffectChain::dump

Check for null buffer in dumpInOutBuffer

Bug: 34691158
Change-Id: I5d11fcb1ce0170da7a742fdbe42a7eaeba4370fe
Test: try bug repro steps
udioflinger/Effects.cpp
929104f6cf4a1d0f54c0e92a0b9a0bdc3814a45a 25-Jan-2017 Martijn Coenen <maco@google.com> Allow mediacodec _llseek() syscall.

The mediacodec process will attempt to load one or
more HIDL HALs. Code for retrieving a handle to HAL
services recently changed to include retrieving and
parsing a manifest from the device; this parsing code
causes the _llseek system call to be executed, which
was previously not allowed.

Since mediacodec already has lseek, adding _llseek
here should be safe.

Bug: 34692351
Test: media.codec no longer crashes
Change-Id: I7f0b173522a8e88395f54c7d2630270509f7799c
ediacodec/minijail/seccomp_policy/mediacodec-seccomp-arm.policy
b4728afbf8095d5349de9fcd49f3f34b900682ad 25-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Combine handling of deferred surface and shared surface"
a437457c4f802c8df577da452f3a26a64f55bba4 25-Jan-2017 Ray Essick <essick@google.com> Merge "Change from mediaanalytics to mediametrics"
a141c5f3cc2214a96f250999edacc3bd4d454601 24-Jan-2017 Shuzhen Wang <shuzhenwang@google.com> Camera: StreamSplitter: Return overwritten buffer to input

For Async buffer queue, if a pending buffer is overwritten by an
incoming buffer, onBufferReleased callback isn't called. But the stream
splitter depends on the onBufferReleased to return buffer to input.

Fix the problem by checking the bufferReplaced flag in
QueueBufferOutput.

Test: Camera CTS
Bug: 33777818
Change-Id: I270c7bae7873797ae9b050782828b5a124d3eff9
amera/libcameraservice/device3/Camera3StreamSplitter.cpp
amera/libcameraservice/device3/Camera3StreamSplitter.h
758c215374dba397dabe17b8e96dd38593c09dd7 11-Jan-2017 Shuzhen Wang <shuzhenwang@google.com> Camera: Combine handling of deferred surface and shared surface

- Refactor the OutputConfiguration to contain isDeferred and isShared
flag, and not contain NULL surface.
- Unify the handling of deferred surface and shared surface.

Test: Camera CTS, and manual testing of GoogleCamera use cases
Bug: 33777818
Change-Id: I5dd3472f0f2133699b0e9fbdd8ba456956222746
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3DummyStream.cpp
amera/libcameraservice/device3/Camera3DummyStream.h
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.h
amera/libcameraservice/device3/Camera3OutputStreamInterface.h
amera/libcameraservice/device3/Camera3SharedOutputStream.cpp
amera/libcameraservice/device3/Camera3SharedOutputStream.h
amera/libcameraservice/device3/Camera3StreamSplitter.cpp
amera/libcameraservice/device3/Camera3StreamSplitter.h
d38e174ddbde8e7419ba01deaded4ff0ead1caaa 24-Jan-2017 Ray Essick <essick@google.com> Change from mediaanalytics to mediametrics

reflect the change from "media.analytics" to "media.metrics" in
what service names we use; bring the metrics service main code into the
service directory (vs an additional shared library).
Removed references to tentative binder functions that the service
won't be offering, at least not in the near future.

Bug: 34615027
Test: build, boot, new services run, clients talking to said services.
Change-Id: If17772a8f03c05b142e8d5779830d198710210c1
ediaanalytics/Android.mk
ediaanalytics/MediaAnalyticsService.cpp
ediaanalytics/MediaAnalyticsService.h
ediaanalytics/main_mediaanalytics.cpp
ediaanalytics/main_mediametrics.cpp
ediaanalytics/mediaanalytics.rc
ediaanalytics/mediametrics.rc
ceec4a06595253a6dcc167064f318e470e1c3b58 24-Jan-2017 Wonsik Kim <wonsik@google.com> Merge "stagefright: fix unreleased OMX handle"
3e378967b379afcd559b53d70d00e758f9c2616d 05-Jan-2017 Wonsik Kim <wonsik@google.com> stagefright: fix unreleased OMX handle

- Ensure OMX handle is freed even if binder death notification comes
first.
- Add DeathRecipient in ResourceManagerService so that it could
handle dead clients properly.

Fix: 28824626
Fix: 34252788
Test: adb shell am instrument -e size small -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Change-Id: Ifc441a2771b5674749ff65a4520177dda115b292
ediaresourcemanager/ResourceManagerService.cpp
ediaresourcemanager/ResourceManagerService.h
5867438fb562c80b8952c0b206ca1bf2f02e6a07 20-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Whitelist mremap for the mediacodec seccomp filter."
0688880d2862e6cddfea1fceca24e8a081a6be60 19-Jan-2017 Mikhail Naganov <mnaganov@google.com> audioflinger and hal: Compatibility fixes for Treble

1. Treat both reply size being 0 and reply buffer being NULL
as an indication that the reply isn't needed.

2. Synchronize both input and output effect chain buffers,
and avoid excessive copies when the input buffer is the same as
the output buffer.

3. Improve effect chain debug dump by showing both
"external" and "allocated" pointers for effect audio data buffers.

Bug: 34368451
Change-Id: I56aba6908408b5fce3f15c8d29138555101e8720
Test: volume controls works when both Bass Boost and EQ effects enabled
udioflinger/Effects.cpp
3187436320be4c370b02aefe1acb064f364f4e1f 21-Dec-2016 Vishwath Mohan <vishwath@google.com> Whitelist mremap for the mediacodec seccomp filter.

This CL whitelists the mremap() syscall for the seccomp filter for
mediacodec. We need to do this for CFI, which uses mremap
internally.

Bug: 30227045
Test: m -j40 and the device boots and works.

Change-Id: I3b95798b4c8653bd95fb1b3d54060d4a12adc5bd
ediacodec/minijail/seccomp_policy/mediacodec-seccomp-arm.policy
f3a8a2392e5dadee8afa51d384da008ae22b4091 18-Jan-2017 Yin-Chia Yeh <yinchiayeh@google.com> Merge changes from topics 'cam-hidl-fence', 'camera-hidl-bufId'

* changes:
Camera: wait for remote camera provider
Camera: setup vendor tag in binderized mode
Camera: treble: close acquire_fence
Camera: pass bufferId to HIDL interface
2355edbcacfcb6e852a8707d893aaca788d42fdc 26-Dec-2016 Phil Burk <philburk@google.com> OboeService: initial commit

This builds a standalone service that is easy to test.

Bug: 33269952
Test: test_oboe_api

Change-Id: I1890b1b974e728c2c0c15e24aa02121c2774bd56
Signed-off-by: Phil Burk <philburk@google.com>
boeservice/Android.mk
boeservice/FakeAudioHal.cpp
boeservice/FakeAudioHal.h
boeservice/OboeAudioService.cpp
boeservice/OboeAudioService.h
boeservice/OboeService.h
boeservice/OboeServiceMain.cpp
boeservice/OboeServiceStreamBase.cpp
boeservice/OboeServiceStreamBase.h
boeservice/OboeServiceStreamFakeHal.cpp
boeservice/OboeServiceStreamFakeHal.h
boeservice/SharedRingBuffer.cpp
boeservice/SharedRingBuffer.h
cac8d4ea54ece7aeb4b2ffa7aafd06fbec731a62 18-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "audio policy: allows dumping Audio Policy Mix"
addae1cfa92c3bae2b59917160da5520d2a25865 18-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "camera2: Add support for secondary surface for stream"
6540509f9180bbaf9b0a76bc061ea3c0d7f8dbb8 14-Jan-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: wait for remote camera provider

Before we attempt to get passthrough implementation.

Test: run binderized camera HAL mode with Camera2 CTS.
Bug: 34250977
Change-Id: I5ef81429c85e7761e60541d1a8764b4e6d58b24a
amera/libcameraservice/common/CameraProviderManager.cpp
amera/libcameraservice/common/CameraProviderManager.h
067428c5a8429d711f94bf008debde29ac118849 14-Jan-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: setup vendor tag in binderized mode

Bug: 34275821
Change-Id: I0472ab3d68279129a8713d4862de8e4608e7a5f7
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/common/CameraProviderManager.cpp
amera/libcameraservice/common/CameraProviderManager.h
f4650601b4615f6a28727c1ad6bc956fd5ea532c 10-Jan-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: treble: close acquire_fence

This is to make the behavior agnostic to passthrough/binderized
mode.

Test: running API2 CTS
Bug: 30985004
Change-Id: I48ce307f8566ff0a2a5b35763e1a37733e6ed9a0
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
773270525f68bdb706b85c3cd6e3750f27ca6d11 10-Jan-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: pass bufferId to HIDL interface

This gives each buffer a unique ID and save some time sending
buffer_handle_t to HAL process.

Bug: 30985004
Change-Id: Idf0d3edde94e1331cadb271dce3e4bed8bfb8c14
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
7da83aadf4e765c38bc6cad04ce086dad20ef54a 02-Dec-2016 Eric Laurent <elaurent@google.com> DO NOT MERGE - improve audio effect framwework thread safety

- Reorganize handle effect creation code to make sure the effect engine
is created with both thread and effect chain mutex held.
- Reorganize handle disconnect code to make sure the effect engine
is released with both thread and effect chain mutex held.
- Protect IEffect interface methods in EffectHande with a Mutex.
- Only pin effect if the session was acquired first.
- Do not use strong pointer to EffectModule in EffectHandles:
only the EffectChain has a single strong reference to the EffectModule.
- Check reply size before writing status in EffectHandle::command()

Bug: 32707507
Bug: 32095713
Change-Id: Ia1098cba2cd32cc2d1c9dfdff4adc2388dfed80e
(cherry picked from commit 84c392104e905bfacc753ec0ddb96ce7813d1889)
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Effects.cpp
udioflinger/Effects.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udiopolicy/AudioPolicyInterfaceImpl.cpp
d621ac82e648c8ef395068edb1af2747f49b700a 13-Jan-2017 Mikhail Naganov <mnaganov@google.com> Monitor crashes of audio hal service via linkToDeath

Hwbinder 'linkToDeath' mechanism is used to track abrupt
disappearance of server hal objects due to hal server crash.

Upon hal server crash, notifications can be sent to binder
clients if needed, then the audioserver crashes itself as the
current audio HAL design does not provide an easy way to restore
all the transient objects (devices, streams, effects) in their
pre-crash state.

Bug: 34158778
Test: In binderized mode, kill audio hal server
Change-Id: If9265711edc445984601fcb5c29d2c173a370762
adio/Android.mk
adio/RadioHalHidl.cpp
adio/RadioHalHidl.h
oundtrigger/Android.mk
oundtrigger/SoundTriggerHalHidl.cpp
9bb03b4e10bfd26247eeb1865e40bb0645489816 14-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "audioflinger: Fix effect creation handling"
2247f7b84bf0ce3cc9c909ef987eedb086e3b4e8 13-Jan-2017 Mikhail Naganov <mnaganov@google.com> audioflinger: Fix effect creation handling

The code flow was incorrect for sure. The 'if' branch is chosen
if 'effect == 0', and 'effectRegistered' is set to 'true' before
the effect is even created.

Test: audioflinger doesn't crash if effect failed to get created
Change-Id: I00d5f28e8b96acd765867e212c5b8193e21f9b4a
udioflinger/Threads.cpp
8c48184651df8edb5b9490fe616844dbcfbbb0a4 13-Jan-2017 Andy Hung <hunga@google.com> Merge "AudioFlinger: Move RecordBufferConverter to libaudioprocessing"
060a6c53b5022c9e539a4c9b03b16da546964bec 13-Jan-2017 Mark Salyzyn <salyzyn@google.com> Merge "liblog: use log/log.h for ALOG macros" am: 59cfe7de39 am: c6d07e8230 am: 15b18326b6
am: 49d3b5ee8e

Change-Id: I87a85c85d3f509e0496f5946d6e9e58174398ea5
49d3b5ee8e89e274a5c259dddb7cde38e98c2cde 13-Jan-2017 Mark Salyzyn <salyzyn@google.com> Merge "liblog: use log/log.h for ALOG macros" am: 59cfe7de39 am: c6d07e8230
am: 15b18326b6

Change-Id: I5f4906534e4b892566776b8ee0f005fb6543c283
15b18326b67cde4bfe1d71f7a4e703c411dec2e5 13-Jan-2017 Mark Salyzyn <salyzyn@google.com> Merge "liblog: use log/log.h for ALOG macros" am: 59cfe7de39
am: c6d07e8230

Change-Id: Ia3c81c04b689ae06610df61d27627dd66d5f71bd
e74bbf18a6595a914d3c771be08a72077465c51f 13-Jan-2017 Mark Salyzyn <salyzyn@google.com> liblog: use log/log.h for ALOG macros

Test: compile
Bug: 34250038
Change-Id: Ie3b92790df631dbacdd51053264dddeba66913c1
udioflinger/tests/resampler_tests.cpp
udiopolicy/common/managerdefinitions/src/AudioPatch.cpp
udiopolicy/common/managerdefinitions/src/AudioSession.cpp
ediacodec/minijail/minijail.cpp
ediaextractor/minijail/minijail.cpp
44344b05261cb9ad46a43e635f637b89aecc7afe 13-Dec-2016 Mikhail Naganov <mnaganov@google.com> audio policy: allows dumping Audio Policy Mix

This patch adds the dump of AudioPolicyMix if registered.
It also adds the required conversion map to human readable strings
of the types involved in Mixes.

Adapted for the development branch from the AOSP patch:
https://android-review.googlesource.com/#/c/309127/

Change-Id: I91cf7afe6de5ff837970d9063ca437d4f6201e89
Test: build, dumpsys media.audio_policy
udiopolicy/common/managerdefinitions/include/AudioPolicyMix.h
udiopolicy/common/managerdefinitions/include/TypeConverter.h
udiopolicy/common/managerdefinitions/src/AudioPolicyMix.cpp
udiopolicy/common/managerdefinitions/src/TypeConverter.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
9fe81732b695d16e7f4fac12d6f6c0ff4d4fa11c 12-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Enable passthrough mode by default for audio, soundtrigger, and radio"
9dc1747e214a3d4b3c08e8c1f3d7982ef5108162 11-Jan-2017 Mikhail Naganov <mnaganov@google.com> Enable passthrough mode by default for audio, soundtrigger, and radio

Remove ENABLE_TREBLE flag usage for legacy hal fallback.
Introduce new build flag USE_LEGACY_LOCAL_AUDIO_HAL for fallback.

Bug: 32978887
Test: checked "OK Google" (from standby), Hangouts, YouTube,
Play Music, fake radio hal + test app
KI: issues when using equializer and virtualuzer in Play Music

Change-Id: I1c279e622c885f799481f1287e0660ca576fcea0
adio/Android.mk
oundtrigger/Android.mk
8981605d43e24c46d395acb5f145b99589d45917 12-Jan-2017 Andy Hung <hunga@google.com> AudioFlinger: Move RecordBufferConverter to libaudioprocessing

Test: Recording loopback
Bug: 31015569
Change-Id: I7897d959f36ac7424544e35f47576c99a442dd54
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
5a3b54df3014ece49eb1f339e5598c01c6126251 12-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove unnecessary #includes."
1ab9e983429a7ab609d664cd46a0deb0913f2dc3 11-Jan-2017 Yifan Hong <elsk@google.com> Remove unnecessary #includes.

Test: mma
Test: make ENABLE_TREBLE=true
Change-Id: Ie083ae17979f17065a10ae30e8a824ca8ddb5e2a
oundtrigger/SoundTriggerHalHidl.h
6acd1d432f526ae9a055ddaece28bf93b474a776 04-Jan-2017 Eric Laurent <elaurent@google.com> Add support for mmap stream

Add support for MMAP streams created by Oboe service.
- A new audio thread class MmapThread deriving from ThreadBase
is added to manage permissions, volume, routing and wakelocks for activity
on MMAP streams.
- Requests received over MmapStreamInterface to open, start and stop
a MMAP stream are forwarded to audio policy manager so that activity
on MMAP capture and playback streams is visible to audio policy and
taken into account in volume and routing management.
`

Bug: Bug: 33398120
Test: manual test
Change-Id: I957906495fe9277d2972d810b633f50cd1e14ec3
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Effects.cpp
udioflinger/MmapTracks.h
udioflinger/PatchPanel.cpp
udioflinger/PlaybackTracks.h
udioflinger/RecordTracks.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/TrackBase.h
udioflinger/Tracks.cpp
fc23520d9c3f15e28baa81de5f7dfa6c1b0af426 21-Dec-2016 Eric Laurent <elaurent@google.com> audioflinger: define MMAP HAL Stream control interface

Added definition of MmapStreamInterface used by Oboe service
to open, configure and control MMAP streams at the audio HAl.

This interface is implemented by audioflinger and abstracts the details
of interacting with audio policy manager and audio HAL from Oboe service.

A callback interface MmapStreamCallback is also defiend to communicate
volume and routing changes back to Oboe service.

Bug: 33398120
Test: build
Change-Id: If953d44903aaa4eb17ff16f1922ca16e5e0e0a87
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
d7c5ec857930496bb8a1045dc8b87b2fdd99899c 11-Jan-2017 Pavlin Radoslavov <pavlin@google.com> Merge "Add missing nullptr checks for data.readCString() strings" am: ce961d374f am: 238c48e42e am: 877f779979
am: 4b058e7e5d

Change-Id: Idc3298b161380e9ace8b7fcceb4339b0805a3123
4b058e7e5d58fb1bc6ba82eba94f7664e5b85706 11-Jan-2017 Pavlin Radoslavov <pavlin@google.com> Merge "Add missing nullptr checks for data.readCString() strings" am: ce961d374f am: 238c48e42e
am: 877f779979

Change-Id: Ic6e96b9ff3ecc609c40f8c5d5367a789b3732b7e
877f77997987212ae0fbfecb24b35c03a0573006 11-Jan-2017 Pavlin Radoslavov <pavlin@google.com> Merge "Add missing nullptr checks for data.readCString() strings" am: ce961d374f
am: 238c48e42e

Change-Id: I2e9cb8ec6752506cc5445aee3d38ae92e4f5e514
c694ff449bef4ca1e45a6506f34e66c613757311 10-Jan-2017 Pavlin Radoslavov <pavlin@google.com> Add missing nullptr checks for data.readCString() strings

Protect the Audio Policy Manager by adding extra checks
for data.readCString() strings when parsing / decoding
a Binder transaction.

Also:
* Moved audio_is_output_device() / audio_is_input_device() checks
inside handleDeviceConfigChange()
from the AudioPolicyInterface to the AudioPolicyManager
* Removed similar redundant checks inside
AudioPolicyService::setDeviceConnectionState()

Test: code compilation
Change-Id: Ib32a28ba2669b73aaf32b31bb18f41c8dd7d2605
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
068561c8e84569d51df2adbbb53b56fdfd09c06b 04-Jan-2017 Andy Hung <hunga@google.com> AudioFlinger: Split off audio processing library

Test: native AudioResampler test, general playback test
Bug: 31015569
Change-Id: Ifb248f4402a583438d756c014dcd7a4577aef713
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/AudioMixerOps.h
udioflinger/AudioResampler.cpp
udioflinger/AudioResampler.h
udioflinger/AudioResamplerCubic.cpp
udioflinger/AudioResamplerCubic.h
udioflinger/AudioResamplerDyn.cpp
udioflinger/AudioResamplerDyn.h
udioflinger/AudioResamplerFirGen.h
udioflinger/AudioResamplerFirOps.h
udioflinger/AudioResamplerFirProcess.h
udioflinger/AudioResamplerFirProcessNeon.h
udioflinger/AudioResamplerFirProcessSSE.h
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
udioflinger/AudioResamplerSincDown.h
udioflinger/AudioResamplerSincUp.h
udioflinger/BufferProviders.cpp
udioflinger/BufferProviders.h
udioflinger/FastMixer.cpp
udioflinger/LinearMap.h
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
udioflinger/audio-resampler/Android.mk
udioflinger/audio-resampler/AudioResamplerCoefficients.cpp
udioflinger/audio-resampler/filter_coefficients.h
udioflinger/test-resample.cpp
udioflinger/tests/Android.mk
udioflinger/tests/README
udioflinger/tests/build_and_run_all_unit_tests.sh
udioflinger/tests/mixer_to_wav_tests.sh
udioflinger/tests/resampler_tests.cpp
udioflinger/tests/run_all_unit_tests.sh
udioflinger/tests/test-mixer.cpp
udioflinger/tests/test_utils.h
ee454fcb25bff0f9c5d3455775a4cb66429e875e 11-Jan-2017 Mikhail Naganov <mnaganov@google.com> Merge "Re-implement HIDL effect processing using FMQ and IMemory"
a6edcbb2026fe0a75fa55b6763c8d51b49083e47 10-Jan-2017 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: fix API1 HAL3 path"
ad880540d13db9e39c94496fd9bc89dfbfd1e1f5 10-Jan-2017 Mark Salyzyn <salyzyn@google.com> Merge "liblog: use log/log.h for ALOG macros" am: 06d8feefec am: 71bf335ffa am: 8790fb2613
am: 9033512273

Change-Id: I67837417d7c8fbc2cc5239f903a0cdf3b107558b
9033512273129383c8cc78beee61f17b50ffff49 10-Jan-2017 Mark Salyzyn <salyzyn@google.com> Merge "liblog: use log/log.h for ALOG macros" am: 06d8feefec am: 71bf335ffa
am: 8790fb2613

Change-Id: I8ccebdc05c7f280a101af02032d41413c198ef39
8790fb2613b493ab5ac3470deb522f79415eb6fe 10-Jan-2017 Mark Salyzyn <salyzyn@google.com> Merge "liblog: use log/log.h for ALOG macros" am: 06d8feefec
am: 71bf335ffa

Change-Id: Id07d468c8e95af39e189f53919a0ac6aabc9604c
0129d52df9794d6fdf06be304722b5cb51a2eab5 31-Oct-2016 Shuzhen Wang <shuzhenwang@google.com> camera2: Add support for secondary surface for stream

- Enhance OutputConfiguration to contain multiple surfaces for one
underlying stream.
- Create Camera3SharedOutputStream to handle streams with multiple
surfaces.
- Create Camera3StreamSplitter to handle buffer flows between camera and
multiple consumers.

Test: cts, and manually test camera preview/snapshot/recording
Bug: 33777818
Change-Id: Ia010c3cc9d9b4bd5b9ea03cc42fe4e0a0d8033f1
amera/libcameraservice/Android.mk
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3DummyStream.cpp
amera/libcameraservice/device3/Camera3DummyStream.h
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.h
amera/libcameraservice/device3/Camera3OutputStreamInterface.h
amera/libcameraservice/device3/Camera3SharedOutputStream.cpp
amera/libcameraservice/device3/Camera3SharedOutputStream.h
amera/libcameraservice/device3/Camera3StreamSplitter.cpp
amera/libcameraservice/device3/Camera3StreamSplitter.h
eb16561336e6445f7edae047998f2459e046cdfe 10-Jan-2017 Mark Salyzyn <salyzyn@google.com> liblog: use log/log.h for ALOG macros

Test: compile
Bug: 30465923
Change-Id: I247151363604714088b6059279702702b4e9f89a
udioflinger/AudioResampler.cpp
udioflinger/AudioResamplerCubic.cpp
udioflinger/tests/test_utils.h
022b9953153bdb1984f0abb17d21ef8c1826ad49 05-Jan-2017 Mikhail Naganov <mnaganov@google.com> Re-implement HIDL effect processing using FMQ and IMemory

Result: no hwbinder calls due music processing.

Test: make, use Play Music with effects, check traces
Bug: 30222631
Change-Id: I06d0e94e603688874b31824427f3b0878b5f7c8e
udioflinger/AudioFlinger.h
udioflinger/BufferProviders.cpp
udioflinger/BufferProviders.h
udioflinger/Effects.cpp
udioflinger/Effects.h
udioflinger/Threads.cpp
dce65c8103a8e8c3267590e90c5141d6bf842872 07-Jan-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix API1 HAL3 path

1. Disable the ZSL path for now
2. Add the missing provider version of initialize()

Test: All API1 CTS passing
Bug: 32991422
Bug: 34131351
Change-Id: I437a00db44c4fbb836875040fd4a91e1abbab734
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/Camera2Client.h
amera/libcameraservice/api1/client2/Parameters.cpp
e83be8af690ef1ac820a63414d522e77ca9d4db6 06-Jan-2017 Steven Moreland <smoreland@google.com> Remove usage of getStatus.

- remove from libaudiohal
- remove from services/radio
- remove from soundtrigger
- remove from omx

Bug: 31348667
Test: compiles
Change-Id: I75bb7b7388527dacfdc5bf128712cb8690bc286b
adio/RadioHalHidl.cpp
adio/RadioHalHidl.h
oundtrigger/SoundTriggerHalHidl.cpp
oundtrigger/SoundTriggerHalHidl.h
66b5f382ba9e7b94b14ad3d6ff181eab69ccf246 07-Jan-2017 Tomasz Wasilczyk <twasilczyk@google.com> Merge "Make metadata field mandatory for program info struct."
96966995da4418326a01dd53719c8355a0db9415 07-Jan-2017 Andy Hung <hunga@google.com> Merge "Add SSE optimization of FIR float filter" am: 5783c0a053 am: 440279f709 am: 61028e78a9
am: b20b027d86

Change-Id: Ibde0e3f33a88431a009b7f0550a8fd12c346037e
b20b027d86c5ae7b84e88925bc0f1ee4f7487445 07-Jan-2017 Andy Hung <hunga@google.com> Merge "Add SSE optimization of FIR float filter" am: 5783c0a053 am: 440279f709
am: 61028e78a9

Change-Id: I562825a1a689bcbc4cbe0ef5f7ebf281985b1a13
61028e78a9c0dae060e4331f16d31eb8cc4e8dbe 07-Jan-2017 Andy Hung <hunga@google.com> Merge "Add SSE optimization of FIR float filter" am: 5783c0a053
am: 440279f709

Change-Id: I8d994318bf3e4c143a3a308ab98c3b6f9aed33e0
5783c0a053191a75e8cd32b1e048b16f6f3021f4 07-Jan-2017 Andy Hung <hunga@google.com> Merge "Add SSE optimization of FIR float filter"
10eb0c33a090fa72148aac136dc5e54789461e3e 07-Jan-2017 Andy Hung <hunga@google.com> Merge "AudioResampler: Add mono stopband tests"
c856cf0d72e5abb0c9db5fff46b8e4ebe6d04ef6 07-Jan-2017 Andy Hung <hunga@google.com> Merge "AudioResampler: Workaround for Clang assembly bug"
22e20cfa42647a041ab1299c9314e145fcb7bf56 07-Jan-2017 Andy Hung <hunga@google.com> Merge "AudioResampler: Fix intrinsic integer mode for 64b"
30f1d9f6262280b3e5269d53b1d05ed699325c06 07-Jan-2017 Andy Hung <hunga@google.com> Merge "AudioFlinger: Fix resampler tests"
adc5d9c58f32ed66219202513078c28398836d17 06-Jan-2017 Andy Hung <hunga@google.com> AudioResampler: Add mono stopband tests

Test: Native audioresampler test on Pixel XL
Change-Id: I4a36df1ca0e6b5bfb3b352f4bd16ed7697448031
udioflinger/tests/resampler_tests.cpp
9145202c61433682ba26aeb283c87d774f41032a 06-Jan-2017 Andy Hung <hunga@google.com> AudioResampler: Workaround for Clang assembly bug

Used to work on M with gcc.

Test: Native audioresampler tests on Pixel XL disabling NEON
Bug: 34110890
Change-Id: Ibaaaf9ed833a37a9017a3217d31cb5ced6fa2c82
udioflinger/AudioResamplerFirOps.h
51157baa6c8b142ec2c723ffd0cf8dc53565ca11 06-Jan-2017 Andy Hung <hunga@google.com> AudioResampler: Fix intrinsic integer mode for 64b

For legacy compatibility in 64 bit resampling mode (doubly
unlikely to be used, but we should still fix it).

Test: Native audioresampler tests on Pixel XL
Bug: 27174404
Change-Id: Ia65a0c6aa4255f0fb62f16d05a225ded58373f8e
udioflinger/AudioResamplerFirProcessNeon.h
ccbba6e66e49eddf9942c0bc710f12bec983e134 06-Jan-2017 Andy Hung <hunga@google.com> AudioFlinger: Fix resampler tests

Test: Run resampler tests on Pixel XL
Bug: 34113617
Change-Id: Idee23b90bd1a353f841beab95c74a7b0ddb13783
udioflinger/tests/build_and_run_all_unit_tests.sh
udioflinger/tests/resampler_tests.cpp
udioflinger/tests/run_all_unit_tests.sh
5e3030fd4ef828cc7254e96030f38ad64f162151 07-Jan-2017 Glenn Kasten <gkasten@google.com> Merge "media.log: re-implement NBLog using audio_utils_fifo"
049475c201d6801e0a15ce102a4f9c357de83b61 06-Jan-2017 Tomasz Wasilczyk <twasilczyk@google.com> Make metadata field mandatory for program info struct.

Test: VTS, manual
Change-Id: I3e4ed1f203dc28315d7c7db10c9ce3d83e4ec59d
adio/HidlUtils.cpp
adio/HidlUtils.h
adio/RadioHalHidl.cpp
0ab12ecf971252442baaf4426a21a83b32c683aa 06-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topics 'camera-hidl-service-2', 'camera-hidl-service'

* changes:
Camera: patching camera service for treble
Camera: Update camera service to use new HIDL HALs, part 2
Camera: Update camera service to use new HIDL HALs, part 1
52778d448123c185fd30cd77e84659fab966d740 23-Dec-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: patching camera service for treble

Bug: 30985004
Change-Id: Idf3ec26abb6b10a0e3839e301e84c8b05ac165c5
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/common/CameraProviderManager.cpp
amera/libcameraservice/common/CameraProviderManager.h
amera/libcameraservice/device3/Camera3Device.cpp
0b1cb14c804d7d4343fe91c78578da8db9a678d5 20-Dec-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Update camera service to use new HIDL HALs, part 2

- Use string for device ID in Camera3Device
- Remove camera3_device_t parameter from Camera3Stream::finishConfiguration
- Disables ability for the stream to register buffers
- This means device HALv3.0 and v3.1 are no longer supported
- Add HIDL support to Camera3Device:
- Add HalInterface class to abstract whether legacy or HIDL HAL is in use
- TODO
- CameraHardwareInterface
- Switch to using HIDL definitions instead of camera3.h definitions in
main body of code

Test: Compiles
Bug: 30985004
Bug: 32991422
Change-Id: I9c3c0f7b7ea5d1d74e14b1d882779e3b9445da69
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/common/CameraProviderManager.cpp
amera/libcameraservice/common/CameraProviderManager.h
amera/libcameraservice/common/FrameProcessorBase.cpp
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3Stream.cpp
amera/libcameraservice/device3/Camera3Stream.h
amera/libcameraservice/device3/Camera3StreamInterface.h
2f09bac6632a5ee27ee14baa2aa1367f16b5b013 13-Dec-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Update camera service to use new HIDL HALs, part 1

- Add CameraProviderManager
- Enumerates individual camera provider HAL instances, as well
as the devices they provide
- Handles dynamic provider and device appearance/disappearance
- Maps device names to public API namespace
- Add unit tests for CameraProviderManager
- Add logic to enable new HIDL path
- Switch various bits of service internals to use string camera IDs,
though leaving most camera1-facing bits using int IDs, since that's
what the old API uses.
- Update CameraService to use CameraProviderManager instead of
the legacy camera HAL
- Update clients to pass through provider manager to devices instead
of just camera module
- Still TODO:
- Update Camera3Device to use new HIDL interface
- Update CameraHardwareInterface to use new HIDL interface
- Update dump()
- Update vendor tag handling

Test: New unit tests pass, camera CTS passes with Treble disabled
Bug: 30985004
Bug: 32991422
Change-Id: I7ac41f13b9501d5e53256e28c0465ec70aa3980e
amera/libcameraservice/Android.mk
amera/libcameraservice/CameraFlashlight.cpp
amera/libcameraservice/CameraFlashlight.h
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/CameraClient.cpp
amera/libcameraservice/api1/CameraClient.h
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
amera/libcameraservice/common/Camera2ClientBase.cpp
amera/libcameraservice/common/Camera2ClientBase.h
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/common/CameraProviderManager.cpp
amera/libcameraservice/common/CameraProviderManager.h
amera/libcameraservice/device1/CameraHardwareInterface.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/tests/Android.mk
amera/libcameraservice/tests/CameraProviderManagerTest.cpp
e1c4b5d7a94c21b8ce0c5707b4af84de596fbb79 22-Dec-2016 Mikhail Naganov <mnaganov@google.com> Re-implement HIDL stream read and write using FMQ

Result: no hwbinder calls due read / write session.

Test: make, perform Loopback RTT, check traces
Bug: 30222631

Change-Id: I4a8792525ec374111302cfd5c0a2e41f9f4cc418
udioflinger/Threads.cpp
d9e0deef93bec5f725ad52b32ff0d7379fe7171e 04-Jan-2017 Eric Laurent <elaurent@google.com> DO NOT MERGE - improve audio effect framwework thread safety am: bc7f347ff5 am: 068881e79c
am: 35912764e9

Change-Id: I9f13363bb537031a3c252c91efee911561cf1633
73a152960b7c795f1fe2e16a09451417181a998c 04-Jan-2017 Eric Laurent <elaurent@google.com> DO NOT MERGE - improve audio effect framwework thread safety am: b47a5ab107
am: 26cf2f4d73

Change-Id: I6513190cce6756c47e5ede0dc578fa0d2c5889b3
35912764e9e7249d95810e9a5372d77151c62e23 04-Jan-2017 Eric Laurent <elaurent@google.com> DO NOT MERGE - improve audio effect framwework thread safety am: bc7f347ff5
am: 068881e79c

Change-Id: I03e5bd37b916c2b3390a20f59f69de8cf970b1db
068881e79c90c7f44cf31c63be764284255d64bd 04-Jan-2017 Eric Laurent <elaurent@google.com> DO NOT MERGE - improve audio effect framwework thread safety
am: bc7f347ff5

Change-Id: I75cb2ddf4df152e740d773a4904b581b1ff5f811
d01b0f18491c355d808a57cb272404480e69618f 08-Nov-2016 Andy Hung <hunga@google.com> AudioFlinger: update to use uid_t

Test: Power manager shows correct uids for audio
Bug: 32713790
Change-Id: I60134f60631ea00886efc912ba298443aadd3c00
udioflinger/Threads.cpp
udioflinger/Threads.h
36867767ba86244b0d942255b9d241b092151309 29-Dec-2016 Jean-Michel Trivi <jmtrivi@google.com> USAGE_ASSISTANT/ACCESSIBILITY in audio policy manager

Add support for USAGE_ASSISTANT.
Fix stream type for USAGE_ACCESSIBILITY.

Test: enable Talkback, check volume; make
Bug: 30947943

Change-Id: Ie35adf0115dce1fac6d3deddc1e57e36b36913f6
udiopolicy/enginedefault/src/Engine.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
535e161e2e404dffb8389dd331be0132704b6d82 05-Dec-2016 Glenn Kasten <gkasten@google.com> media.log: re-implement NBLog using audio_utils_fifo

NBLog previously has its own shared memory circular buffer code.
Now NBLog operates on top of the circular buffer code in audio_utils.

Test: media.log still works
Change-Id: Ib3026d2a96e6c0b433603e8baf19164ad97a1e1f
udioflinger/AudioFlinger.cpp
udioflinger/FastThreadDumpState.cpp
edialog/Android.mk
edialog/MediaLogService.cpp
5fd7ccaeba88da7e170f067bfd754b3f64ff5566 29-Dec-2016 Pavlin Radoslavov <pavlin@google.com> Merge "Add a mechanism for handling audio device configuration change" am: 549e431947 am: a1b496ac35 am: fcc1132010
am: c6fe843463

Change-Id: I7812e3e4426e526b886c1a414ac8ddec7649291e
c6fe843463abc965f3082738c8812506cf5ba232 29-Dec-2016 Pavlin Radoslavov <pavlin@google.com> Merge "Add a mechanism for handling audio device configuration change" am: 549e431947 am: a1b496ac35
am: fcc1132010

Change-Id: I4c25c229b0bb8a385a231c7a9f444b923bb46456
fcc113201018703727a0d6b17dd165efce00db1a 29-Dec-2016 Pavlin Radoslavov <pavlin@google.com> Merge "Add a mechanism for handling audio device configuration change" am: 549e431947
am: a1b496ac35

Change-Id: Ie8871fad611dc16d7cd08a85e4cd748cf3c4650d
f862bc6a7a35054e38cb50fa16ae7a07f683ee01 27-Dec-2016 Pavlin Radoslavov <pavlin@google.com> Add a mechanism for handling audio device configuration change

* Added new call handleDeviceConfigChange() to the Media Framework.
That call can be used when there are device configuration changes
(e.g., Bluetooth A2DP codec configuration has changed).
* Added new method AudioPolicyManager::handleDeviceConfigChange().
That method toggles the UNAVAILABLE/AVAILABLE connection state of the
device, so it can be reconfigured as appropriate - e.g., the audio
feeding parameters can be updated.
* Fix ALOGVV compilation errors when extra logging is enabled.

Test: A2DP streaming to headsets
Bug: 30958229
Change-Id: I388abbbb3ec4d1a003b441cb0c77e00d80cad668
udiopolicy/AudioPolicyInterface.h
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
udiopolicy/service/AudioPolicyService.h
0ce91633d8a4f5dcb3706a7734c02ddb5099eefd 27-Dec-2016 Mikhail Naganov <mnaganov@google.com> audioflinger: Fix deletion of input buffer in EffectChain

mInBuffer, when it is owned by EffectChain, comes from
AudioFlinger::PlaybackThread::addEffectChain_l where it is
allocated using "new[]", and thus needs to be deleted
using "delete[]".

Change-Id: Ib16bab59f9e00627f8ef52f7232ebdd74a6c9a74
Test: make
udioflinger/Effects.cpp
32a5f5d53f9fe2ba584d2ecdf3edd487fb4146a7 22-Dec-2016 Mark Salyzyn <salyzyn@google.com> resolve merge conflicts of 4532a36 to master

Test: build
Change-Id: I9b93c4a703c0ee16116be2bea0e6df0606d29363
4532a36bf509d822a77cbc1b7837f9f1158c7796 22-Dec-2016 Mark Salyzyn <salyzyn@google.com> Merge "Replace cutils/log.h with either android/log.h or log/log.h" am: a05da2eea4 am: 9e97dc7832
am: 1121dfb5f3

Change-Id: Ie8bea1c228c602fef54012228ed714e8053d8fa6
1121dfb5f30a04393ddce02fe7808589fa9e3e25 22-Dec-2016 Mark Salyzyn <salyzyn@google.com> Merge "Replace cutils/log.h with either android/log.h or log/log.h" am: a05da2eea4
am: 9e97dc7832

Change-Id: I414954c96ad8b803a0401d416887c9ce167db210
a96898c40c38449d4f28c72cee434eee062021a1 22-Dec-2016 Andy Hung <hunga@google.com> Merge "AudioFlinger: Use property for local log lines"
60d02077d86d2d1092443519290101f503aa6f7a 29-Sep-2016 Mark Salyzyn <salyzyn@google.com> Replace cutils/log.h with either android/log.h or log/log.h

Test: compile
Bug: 31289077
Change-Id: I795a76f978d2213737f1fa908da789c543219b75
udioflinger/AudioResampler.cpp
udioflinger/AudioResamplerCubic.cpp
udioflinger/AudioResamplerCubic.h
udioflinger/AudioResamplerDyn.h
udioflinger/AudioResamplerSinc.h
udioflinger/tests/resampler_tests.cpp
udiopolicy/common/managerdefinitions/src/AudioPatch.cpp
udiopolicy/common/managerdefinitions/src/AudioSession.cpp
ediacodec/minijail/minijail.cpp
ediaextractor/minijail/minijail.cpp
f28bcf5c057dd9738a09f3cb367cf0b44087135d 20-Dec-2016 Andy Hung <hunga@google.com> AudioFlinger: Use property for local log lines

dumpsys lines can be increased up to 256 (kLogSize) by

adb shell setprop persist.audio.locallog.lines 256

Test: Run piano app and check audioflinger dumpsys
Bug: 30572472
Change-Id: Ie27812b15732432856452e4c46d81abf860aaee2
udioflinger/AudioFlinger.h
udioflinger/Threads.h
da913494a93667a037e7923258b46d0d1dd2bf50 22-Dec-2016 Ray Essick <essick@google.com> Merge "Refine MediaAnalytics framework"
b5fac8ef36b302c12f897d06c7e097981843f3a0 12-Dec-2016 Ray Essick <essick@google.com> Refine MediaAnalytics framework

Rework some interfaces to avoid unnecessary sp<> mechanisms;
document which side of caller/callee owns pointers afterwards.
Rework internal attribute representation, add support routines.

Bug: 33547720
Test: Boot, ran subset of CTS media tests
Change-Id: Id0d65bd6a847704dc98d38be9aa5e1ce63c20e1c
ediaanalytics/main_mediaanalytics.cpp
5b8655e002bd96b91907b68ebbf27b2b13503cdb 20-Dec-2016 Eric Laurent <elaurent@google.com> Merge "default no ouput verbose message of APM::AudioPolicyEngine/PFWWrapper" am: 36a75eeb15 am: c3b85c54db am: 48dd690be5
am: 583b413081

Change-Id: If3c7f2d1a820efe570ebe0a8d618902fe5a076c4
583b4130811d8c3b0c9b22aa1a947059a9ba5458 20-Dec-2016 Eric Laurent <elaurent@google.com> Merge "default no ouput verbose message of APM::AudioPolicyEngine/PFWWrapper" am: 36a75eeb15 am: c3b85c54db
am: 48dd690be5

Change-Id: I437af35da2e8f10c8e823c0d8ae2f80b7945b498
48dd690be5bf590991858086f2db60ec925389b4 20-Dec-2016 Eric Laurent <elaurent@google.com> Merge "default no ouput verbose message of APM::AudioPolicyEngine/PFWWrapper" am: 36a75eeb15
am: c3b85c54db

Change-Id: I242b0c71d1b0ac66bc53fd6d1a02a721f8020619
5b4051afc26367d7accd06580c5135c8295759f9 20-Dec-2016 Andy Hung <hunga@google.com> Merge "AudioFlinger: Associate audio time with client uid"
ae2026ecfe37e92b0a2ba5084a8ab9fe07b7134d 19-Dec-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Use libxml2 as shared lib."
8d8125714f07598c8557fcdf0f2540d39c07cb00 17-Dec-2016 Eric Laurent <elaurent@google.com> DO NOT MERGE - audioflinger: fix recursive mutex lock in EffectHandle. am: 31a4598a19 am: bc9bdb3b3e
am: 6e5dc44277

Change-Id: If35caac5a9880137dcb2efbf34ba71f1d21ecb74
ef4c260b0b474ed21117185f7e0aac14899003d8 17-Dec-2016 Eric Laurent <elaurent@google.com> DO NOT MERGE - audioflinger: fix recursive mutex lock in EffectHandle. am: 31a4598a19
am: bc9bdb3b3e

Change-Id: Ife374d1c3549680690bc6a2aee2240b7d5cabfd2
6e5dc44277dbe613b32bf634193c4b0dd7aea511 17-Dec-2016 Eric Laurent <elaurent@google.com> DO NOT MERGE - audioflinger: fix recursive mutex lock in EffectHandle. am: 31a4598a19
am: bc9bdb3b3e

Change-Id: I30ce59dfb1438b2d09b16db96936e03ae01d83d8
bc9bdb3b3e67490cf2f816438306decc0783aa24 17-Dec-2016 Eric Laurent <elaurent@google.com> DO NOT MERGE - audioflinger: fix recursive mutex lock in EffectHandle.
am: 31a4598a19

Change-Id: Ia927eff3ef692fddf17de11478ce93cf1d28e629
e2bc75d146276c3cfe2b349073cf46f7706fa38d 16-Dec-2016 Eric Laurent <elaurent@google.com> Merge "audioflinger: fix recursive mutex lock in EffectHandle."
6a308b02f138e358fb239ee2df5d54dd988f34fd 16-Dec-2016 Eric Laurent <elaurent@google.com> Merge "Add unique audio port IDs to AudioTrack and AudioRecord"
e4c3c4310f4e4a76195dc08323c4a26dd28ffd08 15-Dec-2016 Jaekyun Seok <jaekyun@google.com> Use libxml2 as shared lib.

The dependencies to static libraries in frameworks should be removed
as many as possible to reduce a size of the system partition.
And that will improve coverage of the VNDK libraries because this
effort might find new necessary shared libs which were linked
statically before.

Size diffs of affected binaries on sailfish-userdebug build are as
follows.

libaudiopolicymanagerdefault.so: 583440 -> 267288 (-316152)
libaudiopolicymanager.so : 16008 -> 16004 (-4)

total : (-316156)

Test: building succeeded, and the image was tested on sailfish.
Bug: 33056637
Change-Id: I51d98c5c2b5d94561190a1651063737fb1cb06ff
udiopolicy/Android.mk
udiopolicy/common/managerdefinitions/Android.mk
udiopolicy/engineconfigurable/Android.mk
udiopolicy/enginedefault/Android.mk
bc7f347ff5dc890ad0fa306f58d145e934e31ed4 02-Dec-2016 Eric Laurent <elaurent@google.com> DO NOT MERGE - improve audio effect framwework thread safety

- Reorganize handle effect creation code to make sure the effect engine
is created with both thread and effect chain mutex held.
- Reorganize handle disconnect code to make sure the effect engine
is released with both thread and effect chain mutex held.
- Protect IEffect interface methods in EffectHande with a Mutex.
- Only pin effect if the session was acquired first.
- Do not use strong pointer to EffectModule in EffectHandles:
only the EffectChain has a single strong reference to the EffectModule.
- Check reply size before writing status in EffectHandle::command()

Bug: 32707507
Bug: 32095713

Change-Id: Ia1098cba2cd32cc2d1c9dfdff4adc2388dfed80e
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Effects.cpp
udioflinger/Effects.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
84c392104e905bfacc753ec0ddb96ce7813d1889 02-Dec-2016 Eric Laurent <elaurent@google.com> DO NOT MERGE - improve audio effect framwework thread safety

- Reorganize handle effect creation code to make sure the effect engine
is created with both thread and effect chain mutex held.
- Reorganize handle disconnect code to make sure the effect engine
is released with both thread and effect chain mutex held.
- Protect IEffect interface methods in EffectHande with a Mutex.
- Only pin effect if the session was acquired first.
- Do not use strong pointer to EffectModule in EffectHandles:
only the EffectChain has a single strong reference to the EffectModule.
- Check reply size before writing status in EffectHandle::command()

Bug: 32707507
Bug: 32095713
Change-Id: Ia1098cba2cd32cc2d1c9dfdff4adc2388dfed80e
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Effects.cpp
udioflinger/Effects.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udiopolicy/AudioPolicyInterfaceImpl.cpp
b47a5ab10732758aa84a064a0729314f3897d802 02-Dec-2016 Eric Laurent <elaurent@google.com> DO NOT MERGE - improve audio effect framwework thread safety

- Reorganize handle effect creation code to make sure the effect engine
is created with both thread and effect chain mutex held.
- Reorganize handle disconnect code to make sure the effect engine
is released with both thread and effect chain mutex held.
- Protect IEffect interface methods in EffectHande with a Mutex.
- Only pin effect if the session was acquired first.
- Do not use strong pointer to EffectModule in EffectHandles:
only the EffectChain has a single strong reference to the EffectModule.
- Check reply size before writing status in EffectHandle::command()

Bug: 32707507
Bug: 32095713

Change-Id: Ia1098cba2cd32cc2d1c9dfdff4adc2388dfed80e
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioPolicyService.cpp
udioflinger/Effects.cpp
udioflinger/Effects.h
udioflinger/Threads.cpp
udioflinger/Threads.h
b37f28adaea5e64ba61fc6533ed9a7f5a76b9f78 02-Dec-2016 Eric Laurent <elaurent@google.com> DO NOT MERGE ANYWHERE - improve audio effect framwework thread safety

- Reorganize handle effect creation code to make sure the effect engine
is created with both thread and effect chain mutex held.
- Reorganize handle disconnect code to make sure the effect engine
is released with both thread and effect chain mutex held.
- Protect IEffect interface methods in EffectHande with a Mutex.
- Only pin effect if the session was acquired first.
- Do not use strong pointer to EffectModule in EffectHandles:
only the EffectChain has a single strong reference to the EffectModule.

Bug: 32707507
Bug: 32095713
Change-Id: Ia1098cba2cd32cc2d1c9dfdff4adc2388dfed80e
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Effects.cpp
udioflinger/Effects.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
31a4598a1908b3ccac7ddb33c511ce66840aa911 15-Dec-2016 Eric Laurent <elaurent@google.com> DO NOT MERGE - audioflinger: fix recursive mutex lock in EffectHandle.

Bug: 33661708
Bug: 32707507
Bug: 32095713

Test: run CTS AudioEffectTest#test5_0Command, Custom binder test

Change-Id: I03f674f126c191143bd8bdfe236f793e975826a5
udioflinger/Effects.cpp
1ffc585aaaa236806bc0464566ea51189ad2d36e 15-Dec-2016 Eric Laurent <elaurent@google.com> audioflinger: fix recursive mutex lock in EffectHandle.

Bug: 33661708
Bug: 32707507
Bug: 32095713

Test: run CTS AudioEffectTest#test5_0Command, Custom binder test

Change-Id: I03f674f126c191143bd8bdfe236f793e975826a5
udioflinger/Effects.cpp
7f208022668b5f77fecaeff7a655c90f41712af6 15-Dec-2016 Eric Laurent <elaurent@google.com> DO NOT MERGE - improve audio effect framwework thread safety am: b378b73dd7 am: 993c09b27b
am: 72db998b4f

Change-Id: I0d46e03a152fa697a329e80d5976e55237493915
98810b1a06eb3ea045b6f93b2d1327ca3dacd250 15-Dec-2016 Eric Laurent <elaurent@google.com> DO NOT MERGE - improve audio effect framwework thread safety am: b378b73dd7
am: 993c09b27b

Change-Id: I5c0f8aadc0929f9bb77e344fab6b3c257bc2b7cf
72db998b4f41e795420055cda362847d5c5f8c92 15-Dec-2016 Eric Laurent <elaurent@google.com> DO NOT MERGE - improve audio effect framwework thread safety am: b378b73dd7
am: 993c09b27b

Change-Id: Ib46c5c88aa112e819fe320857b2136f14f84db1a
993c09b27bc5b2b9f93b29fac8e212a196a52c67 15-Dec-2016 Eric Laurent <elaurent@google.com> DO NOT MERGE - improve audio effect framwework thread safety
am: b378b73dd7

Change-Id: Ie7431955f75364bb7e450594387be41f669a98f0
dcc65c73953d885d8d7433da2a8153f6d3c494a1 15-Dec-2016 Marco Nelissen <marcone@google.com> Merge "Add missing syscalls to mediaextractor arm64 seccomp filter"
dae27707fc7d8370eb200d25d1a7c6dd7ad5e201 31-Oct-2016 Andy Hung <hunga@google.com> AudioFlinger: Associate audio time with client uid

Group active track operations for add and remove together.
PlaybackThread now uses strong pointer for active tracks.

Test: Play Music, Youtube, Batterystats, CTS AudioTrack
Bug: 32361950
Change-Id: I101df081dd8d090560a83c44c2fa9ffcbf39c84d
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
udioflinger/Threads.h
51ac35503501692300f9772c29c2d2f4dc43a245 15-Dec-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera service: Updates in preparation for HIDL"
cc3237a31b293905423c7d71f5a3e8ea130e1a88 14-Dec-2016 Andy Hung <hunga@google.com> APM::updateCallRouting: ignore for stub output hal am: a76c7de622 am: 116160d668
am: f476960a28

Change-Id: Iaa58887ee83e5cb611d26bf61cadafb058245b03
f476960a2886e2a1c2a743aa235c868f01584f4d 14-Dec-2016 Andy Hung <hunga@google.com> APM::updateCallRouting: ignore for stub output hal am: a76c7de622
am: 116160d668

Change-Id: I691997cd078d09df4830cb705946dd47801cea98
116160d6680a0eabeea6510463c863f9afbe2956 14-Dec-2016 Andy Hung <hunga@google.com> APM::updateCallRouting: ignore for stub output hal
am: a76c7de622

Change-Id: Iee1637bcb01cd41daa70162684212c9eaf085763
0dd913994cc029847c56f73a763f77457e748d49 14-Dec-2016 Andy Hung <hunga@google.com> APM::updateCallRouting: ignore for stub output hal
am: a76c7de622

Change-Id: I2a42d69c45f419f2cfde3116aeafec65955077a6
49209a36958218c6f51bb9a8e603a69e496481f0 14-Dec-2016 Andy Hung <hunga@google.com> Merge "APM::updateCallRouting: ignore for stub output hal" into cw-f-dev
a76c7de622e6e29f8559921d8d2e9ef93eb37d1f 14-Dec-2016 Andy Hung <hunga@google.com> APM::updateCallRouting: ignore for stub output hal

Bug: 33463233
Change-Id: I9b6708bef087e3f4a97868b2d8f7a9b1558233d0
udiopolicy/managerdefault/AudioPolicyManager.cpp
f51fca277eb5b86bd0b2e3fc90ecb2b63089de29 13-Dec-2016 Eino-Ville Talvala <etalvala@google.com> Camera service: Updates in preparation for HIDL

- For all camera2 paths, and anything shared between the legacy API and
camera2, switch to using strings for camera IDs
- Update ICameraService.addListener to return current set of known
devices and their status, to allow for immediate return of camera
devices when first connecting to camera service
- Remove unused code path for getCameraCharacteristics with HALv1
- Add namespace qualifiers to Binder objects that are also used by
hardware binder.
- Switch to using new HIDL DeviceStatus and TorchStatus enumerations
for better type safety in the service; map more clearly between
the HAL, service-internal, and Binder enums.

Test: cts-tradefed run cts -m Camera --skip-connectivity-check -d -o --abi armeabi-v7a --disable-reboot
Bug: 32991422
Change-Id: I765951d9a21000a8432bed9aa0e3604709daa4b1
amera/libcameraservice/Android.mk
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
70aac1583d7b5370350b249dacdddfa69a972824 13-Dec-2016 Marco Nelissen <marcone@google.com> Add missing syscalls to mediaextractor arm64 seccomp filter

Two missing calls were preventing debuggerd from catching crashes
in mediaextractor

Test: triggered crash and verified debuggerd catches it

Change-Id: I3306207bff9af1fd63ad66761bc650d6f5147d98
ediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-arm64.policy
20b9ef0b55c9150ae11057ab997ae61be2d496ef 05-Dec-2016 Eric Laurent <elaurent@google.com> Add unique audio port IDs to AudioTrack and AudioRecord

This will allow to track activity at the track level instead of
at audio session level as only possible with current implementation.

AudioTracks and AudioRecords will receive a unique audio port ID the
first time they register to audio policy with
getOutputForAttr()/getInputForAttr() and keep this ID for their
lifetime.

This CL is the first partial change and just updates the
audio policy and audio flinger APIs used at track creation time.

Test: basic regression test of audio playback and capture use cases

Change-Id: I8d612e67738e120494f61e3f7c60bfd0b2c6a329
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/PlaybackTracks.h
udioflinger/RecordTracks.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/TrackBase.h
udioflinger/Tracks.cpp
udiopolicy/AudioPolicyInterface.h
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
udiopolicy/service/AudioPolicyService.h
9f57e3c9da8923649adff62e63c644537f565e90 05-Dec-2016 Mikhail Naganov <mnaganov@google.com> Crash audioserver if EPIPE (DEAD_OBJECT) is received from the HAL

audioflinger doesn't have a proper way to re-establish all
the opened streams if HAL crashes. The only valid way of dealing
with them is to restart the audioserver.

Although broadcastradio and sountrigger have cleaner protocols
for dealing with HAL failures and can handle HAL crash and restart,
since the audio side will anyway get broken, it makes sense
to also kill the audioserver when they detect HAL crash.

Change-Id: I5f8e8c1d0981042cdd435a3ddbb6526e9f226e6b
Test: kill audio-hal process, watch dmesg and logcat
adio/RadioHalHidl.cpp
adio/RadioHalHidl.h
oundtrigger/SoundTriggerHalHidl.cpp
oundtrigger/SoundTriggerHalHidl.h
34e5d30e54650b210c1b9730b1e4b412ec1cdb0c 10-Dec-2016 Samuel Saccone <samccone@google.com> Revert "Crash audioserver if EPIPE (DEAD_OBJECT) is received from the HAL"

This reverts commit 9f55e5f998644d58cb8f3625e06d9b7a4e78555c.

Change-Id: Ic76c0cb5032af422699da2b43106b4b1de5ac935
adio/RadioHalHidl.cpp
adio/RadioHalHidl.h
oundtrigger/SoundTriggerHalHidl.cpp
oundtrigger/SoundTriggerHalHidl.h
9f55e5f998644d58cb8f3625e06d9b7a4e78555c 05-Dec-2016 Mikhail Naganov <mnaganov@google.com> Crash audioserver if EPIPE (DEAD_OBJECT) is received from the HAL

audioflinger doesn't have a proper way to re-establish all
the opened streams if HAL crashes. The only valid way of dealing
with them is to restart the audioserver.

Although broadcastradio and sountrigger have cleaner protocols
for dealing with HAL failures and can handle HAL crash and restart,
since the audio side will anyway get broken, it makes sense
to also kill the audioserver when they detect HAL crash.

Test: kill audio-hal process, watch dmesg and logcat
Change-Id: Ib2150b69c791ac49de9404de08fc6c309a3fcbd5
adio/RadioHalHidl.cpp
adio/RadioHalHidl.h
oundtrigger/SoundTriggerHalHidl.cpp
oundtrigger/SoundTriggerHalHidl.h
b378b73dd7480b584340b8028802c9ca2d625123 02-Dec-2016 Eric Laurent <elaurent@google.com> DO NOT MERGE - improve audio effect framwework thread safety

- Reorganize handle effect creation code to make sure the effect engine
is created with both thread and effect chain mutex held.
- Reorganize handle disconnect code to make sure the effect engine
is released with both thread and effect chain mutex held.
- Protect IEffect interface methods in EffectHande with a Mutex.
- Only pin effect if the session was acquired first.
- Do not use strong pointer to EffectModule in EffectHandles:
only the EffectChain has a single strong reference to the EffectModule.

Bug: 32707507
Change-Id: Ia1098cba2cd32cc2d1c9dfdff4adc2388dfed80e
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Effects.cpp
udioflinger/Effects.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
b15ed7a197061d688e465ac4a0d489fed65b8ceb 09-Dec-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Use libmedia_helper as shared lib."
30cf41f2d7c35eef05654ea7493792a7bf1b6af7 07-Dec-2016 Liu Changcheng <changcheng.liu@intel.com> default no ouput verbose message of APM::AudioPolicyEngine/PFWWrapper

The verbose output consume much time. Change ALOGD to ALOGV in info
function. Developer could define LOG_NDEBUG to be 0 if need verbose
message to debug system

Change-Id: Iecb621d0eb8ec6a058608bf1b695b5ebd889c802
Signed-off-by: Liu Changcheng <changcheng.liu@intel.com>
Signed-off-by: Jerry Liu <primerlink@gmail.com>
udiopolicy/engineconfigurable/wrapper/ParameterManagerWrapper.cpp
353613ca6ec69e9663b7188305cdd46914dccfb4 08-Dec-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "fix client pid for effects applied by audio policy"
0c65440126a3679d98c321f4d8493fd820e3a91c 08-Dec-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera service: Speed up camera service startup on boot"
b643627a557e44b9ab5879cf71e162af2d514ce3 08-Dec-2016 Eric Laurent <elaurent@google.com> fix client pid for effects applied by audio policy

Test: Hangouts call, Play Music with and w/o effects

Change-Id: Ia9b20f94be667dd92e0497f8ef9c0dc0e95afe28
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udiopolicy/service/AudioPolicyEffects.cpp
f4db13db84c40299de4f9997f08d05259bdb8716 08-Dec-2016 Eino-Ville Talvala <etalvala@google.com> Camera service: Speed up camera service startup on boot

In the common case, cameraserver starts before system server, which
contains the proxy camera service. This means that
getCameraServiceProxy() will wait for the proxy to be up (or time out
after 5 seconds). Since the proxy will call the camera service once it
is up and running, there's no reason to block.

Switch to checkService() instead of getService() to remove this timeout
and fail immediately.

Test: Manual: Build and boot phone; confirm that camera functions normally
Change-Id: I03596c18b13c68b5bcb15ee71de465cd14fba4de
amera/libcameraservice/CameraService.cpp
08dab5ae92ddd1f3b337b6e35f918fea8c284a56 07-Dec-2016 Jaekyun Seok <jaekyun@google.com> Use libmedia_helper as shared lib.

The dependencies to static libraries in frameworks should be removed
as many as possible to reduce a size of the system partition.
And that will improve coverage of the VNDK libraries because this
effort might find new necessary shared libs which were linked
statically before.

Size diffs of affected binaries on angler-userdebug build are as
follows.

libmedia : 598056 -> 547928 (-50128)
libstagefright : 1496420 -> 1492124 (-4296)
libaudiopolicyservice : 75372 -> 66940 (-8432)
libaudiopolicymanagerdefault: 613168 -> 583516 (-29652)
libaudioflinger : 397840 -> 364380 (-33460)
libaudiohal : 114752 -> 68684 (-46068)
libaudiopolicyenginedefault : 122096 -> 71968 (-50128)
libmedia_helper : 0 -> 66288 (+66288)

total : (-155876)

Test: building succeeded, and the image was tested on angler.
Bug: 33056637
Change-Id: I00a71e518337a1efcf7f55256145776311596991
udioflinger/Android.mk
udiopolicy/Android.mk
udiopolicy/engineconfigurable/Android.mk
udiopolicy/engineconfigurable/wrapper/Android.mk
udiopolicy/enginedefault/Android.mk
78cbdfa7b68615cc61573f39a87563d891aed652 07-Dec-2016 Andy Hung <hunga@google.com> Log audio information to ensure complete delivery
am: 1f82f9569d

Change-Id: I8c3045b0331a97b98168897d03ec1dc55235a59e
29e230c08668325c0b75d62380789fab606a524c 07-Dec-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: remove effects before releasing input"
f10c709fda87d971a206eebd5df47356e7f2aa39 07-Dec-2016 Eric Laurent <elaurent@google.com> audio policy: remove effects before releasing input

modify releaseInput() implementation so that effects added by policy
rules are removed before closing the input stream to avoid
failure to destroy the effect chain

make sure that orphan effect chains are checked when an EffectHandle is
disconnected after thread destruction.

Test: make and run Hangouts
Bug: 32707507

Change-Id: I7833b4c5e42c0057a4477eb4485a20dd26ca2f90
udioflinger/Effects.cpp
udioflinger/Effects.h
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
c744370facd47991ad009e053490778050493132 06-Dec-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Support multiple clients attaching to a module"
e52c500c096fce010c99e92c4fc3ef51832e67c6 13-Oct-2016 Haynes Mathew George <hgeorge@codeaurora.org> Support multiple clients attaching to a module

Currently service allows only a single client to be attached to a Module.
This limits only a single client can use sound trigger at a time.

Add changes to attach multiple clients to a given Module through ModuleClient
interface so that multiple clients can paralelly use sound trigger on a given
Module. ModuleClient class is introduced as a client interface to a Module.
Service provides a unique instance of ModuleClient to each client being attached
and adds this client to the module clients list.

Test: Manual with modified version of SoundTriggerTestApp that talks to
the module directly

Bug:32030191
Change-Id: I66912e862b8c4232a49d92c0464a9a8b876bdb26
oundtrigger/SoundTriggerHwService.cpp
oundtrigger/SoundTriggerHwService.h
1f82f9569d257adc1d6d1c9a58e542c3c99c0109 29-Nov-2016 Andy Hung <hunga@google.com> Log audio information to ensure complete delivery

Test: Audio playback
Bug: 30572472
Change-Id: Ibad6fc202692cd3480ae726627252afdead083f3
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
7cdef381717e3a96acc6c5786c88bf1eaf03d2f2 05-Dec-2016 Eric Laurent <elaurent@google.com> Merge "audioflinger: update comment on mutex locking order"
3bc859bfba96815315c05469e9da07adfc0aa8d5 05-Dec-2016 Eric Laurent <elaurent@google.com> audioflinger: update comment on mutex locking order

Test: make
Bug: 32707507
Change-Id: Ief55cb740373a97c59de470738e3c36fcde03aae
udioflinger/Effects.h
65abff18873fab87305049418c9b7c24fc0a2ef4 03-Dec-2016 Ray Essick <essick@google.com> Merge "initial mediasanalytics framework"
abf6ff26df459d991cdbc2dca3b78046c97469db 03-Dec-2016 Andy Hung <hunga@google.com> Merge "Log audio information to ensure complete delivery"
45b375d2fac26cb0c43a603757165deb9f36a309 03-Dec-2016 Andy Hung <hunga@google.com> Effect: Use local cached data for Effect commit am: dd79ccda92 am: 82c8c7656f am: 9851dee7da am: 4242950061 am: a661c82829 am: b45c856249 am: 39ca98f547 am: 9ea4b8abdf am: 25813f0a7a am: 1155d119b4 am: 70dc13599d am: 2fd05aa3f0 am: 79366efacc am: f319a8fa1a
am: 7c01b5c1ab

Change-Id: I6145eb93b44066fa8587d6c15cad75378b216d1d
7c01b5c1ab2ccf85a7d1b2be3d822c105c3387e3 03-Dec-2016 Andy Hung <hunga@google.com> Effect: Use local cached data for Effect commit am: dd79ccda92 am: 82c8c7656f am: 9851dee7da am: 4242950061 am: a661c82829 am: b45c856249 am: 39ca98f547 am: 9ea4b8abdf am: 25813f0a7a am: 1155d119b4 am: 70dc13599d am: 2fd05aa3f0 am: 79366efacc
am: f319a8fa1a

Change-Id: Ic86107d8fbd5f73da988f6db1af8c8789bc357bf
94ebc05bbca070922c6134b2d4dfbb190545f6dc 03-Dec-2016 Andy Hung <hunga@google.com> Effect: Use local cached data for Effect commit am: dd79ccda92 am: 82c8c7656f am: 9851dee7da am: 4242950061 am: a661c82829 am: b45c856249 am: 39ca98f547 am: 9ea4b8abdf am: 25813f0a7a am: 1155d119b4 am: 70dc13599d am: 2fd05aa3f0 am: 79366efacc
am: f319a8fa1a

Change-Id: Ife2daa7400bdf7f1e560424e923d148b7a806509
79366efacc2da6e531bf4e2f44776288feab44dd 03-Dec-2016 Andy Hung <hunga@google.com> Effect: Use local cached data for Effect commit am: dd79ccda92 am: 82c8c7656f am: 9851dee7da am: 4242950061 am: a661c82829 am: b45c856249 am: 39ca98f547 am: 9ea4b8abdf am: 25813f0a7a am: 1155d119b4 am: 70dc13599d
am: 2fd05aa3f0

Change-Id: Ic3a3443d71ac628d5727970b75d65c4e29813a14
2fd05aa3f0d2a22e1b4625aa2a9a384ac4691d91 03-Dec-2016 Andy Hung <hunga@google.com> Effect: Use local cached data for Effect commit am: dd79ccda92 am: 82c8c7656f am: 9851dee7da am: 4242950061 am: a661c82829 am: b45c856249 am: 39ca98f547 am: 9ea4b8abdf am: 25813f0a7a am: 1155d119b4
am: 70dc13599d

Change-Id: I0cb9e61f3bad85c85f433ae0bd7dbd5ef74afa34
70dc13599db3519108bccd0f3d7f8c3e2e37b572 03-Dec-2016 Andy Hung <hunga@google.com> Effect: Use local cached data for Effect commit am: dd79ccda92 am: 82c8c7656f am: 9851dee7da am: 4242950061 am: a661c82829 am: b45c856249 am: 39ca98f547 am: 9ea4b8abdf am: 25813f0a7a
am: 1155d119b4

Change-Id: Ia29bfe12f493e94b451b973e8e027007630b4c55
1155d119b4265d52e45eada6d5c4895af22ff12a 03-Dec-2016 Andy Hung <hunga@google.com> Effect: Use local cached data for Effect commit am: dd79ccda92 am: 82c8c7656f am: 9851dee7da am: 4242950061 am: a661c82829 am: b45c856249 am: 39ca98f547 am: 9ea4b8abdf
am: 25813f0a7a

Change-Id: I7232cde71eb075f5446d3a1297cb73f9197f9f38
25813f0a7a899bf61b4a7138497c071546ea8f55 03-Dec-2016 Andy Hung <hunga@google.com> Effect: Use local cached data for Effect commit am: dd79ccda92 am: 82c8c7656f am: 9851dee7da am: 4242950061 am: a661c82829 am: b45c856249 am: 39ca98f547
am: 9ea4b8abdf

Change-Id: I71203acd393a5104c121d1d3c91ee84c5af64143
9ea4b8abdf2c8950691f9a053cf00003338b204e 03-Dec-2016 Andy Hung <hunga@google.com> Effect: Use local cached data for Effect commit am: dd79ccda92 am: 82c8c7656f am: 9851dee7da am: 4242950061 am: a661c82829 am: b45c856249
am: 39ca98f547

Change-Id: Id699ab91ec473ee08de7782e8c606209b6372fe5
39ca98f547e786a6c0258f17bd496a206f4a0ac3 03-Dec-2016 Andy Hung <hunga@google.com> Effect: Use local cached data for Effect commit am: dd79ccda92 am: 82c8c7656f am: 9851dee7da am: 4242950061 am: a661c82829
am: b45c856249

Change-Id: I6cb0c8e2dbaa2ebe3d4fd4f283a2028ac099f3c3
a661c8282967a16dc5fb957eaf161a6866edcc59 03-Dec-2016 Andy Hung <hunga@google.com> Effect: Use local cached data for Effect commit am: dd79ccda92 am: 82c8c7656f am: 9851dee7da
am: 4242950061

Change-Id: I9cee35a3c8df1747c5461dc62c3210a0de134b87
42429500612b768902442c9fe594327511462cc5 03-Dec-2016 Andy Hung <hunga@google.com> Effect: Use local cached data for Effect commit am: dd79ccda92 am: 82c8c7656f
am: 9851dee7da

Change-Id: I3d375c671122e61cf0b530457c37c1cd5c06e563
9851dee7da476848ae9ef5e8fe07d3634d50c208 03-Dec-2016 Andy Hung <hunga@google.com> Effect: Use local cached data for Effect commit am: dd79ccda92
am: 82c8c7656f

Change-Id: I8819bc1146b0b751abc0790edd4b7d73f2198038
82c8c7656f7c7b7269fd7f7a9f1e657109824123 03-Dec-2016 Andy Hung <hunga@google.com> Effect: Use local cached data for Effect commit
am: dd79ccda92

Change-Id: Ide8165907e03b9d400eaa33a222ceeae782d6509
1576f5968c4458af357065bf0f10acf71754cc21 03-Dec-2016 Andy Hung <hunga@google.com> Merge "Effect: Use local cached data for Effect commit" into klp-dev
3938dc6363949ef126bb6188d26b5bef6db8be4d 01-Nov-2016 Ray Essick <essick@google.com> initial mediasanalytics framework

This encompasses the basic framework files for mediaanalytics. This
includes the library code to run in clients, the interface definitions
to get to the service, and the mediaanalytics service.

This version of the patchset also incorporates a wholesale change from
"Media Statistics" to "Media Analytics" -- which involved both textual
changes and file renaming

This does not include the changes to other entities that will be sending
data. We'll do those under separate per-entity commits.

Bug: 30267133
Test: run through cts' media stress tests
Change-Id: Iee7e722d10fd57c5d6b14e2947117ed0d3af4f2a
ediaanalytics/Android.mk
ediaanalytics/main_mediaanalytics.cpp
ediaanalytics/mediaanalytics.rc
eac5ddad235d11c64ff34037789466f22be4e005 02-Dec-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "improve audio effect framwework thread safety"
0d5a2ed0a05a2bf337c68edb54f24c60e18032c1 02-Dec-2016 Eric Laurent <elaurent@google.com> improve audio effect framwework thread safety

- Reorganize handle effect creation code to make sure the effect engine
is created with both thread and effect chain mutex held.
- Reorganize handle disconnect code to make sure the effect engine
is released with both thread and effect chain mutex held.
- Protect IEffect interface methods in EffectHande with a Mutex.
- Only pin effect if the session was acquired first.
- Do not use strong pointer to EffectModule in EffectHandles:
only the EffectChain has a single strong reference to the EffectModule.

Test: Tested with EffectTest app. Regression tests in main audio use cases.

Bug: 32707507
Change-Id: Ia1098cba2cd32cc2d1c9dfdff4adc2388dfed80e
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Effects.cpp
udioflinger/Effects.h
udioflinger/Threads.cpp
udioflinger/Threads.h
ba1dbe6e1fbb77a6b52549d42402d0ebf7c01c59 02-Dec-2016 Marco Nelissen <marcone@google.com> Merge "Use property_get_bool where possible"
315031e04c6642c9a91de2e48053c82f78a2ea24 02-Dec-2016 Pavlin Radoslavov <pavlin@google.com> Merge "Add a mechanism for Audio Feeding Parameters negotiation" am: 653748414b am: 1081e9ac62 am: 5b2fa9ad09
am: 00072a89c0

Change-Id: I8ce7baf3bf6fca36d8e07db3d48b3eca98da54d5
00072a89c00ecbd29ca9148996fef8138449327c 02-Dec-2016 Pavlin Radoslavov <pavlin@google.com> Merge "Add a mechanism for Audio Feeding Parameters negotiation" am: 653748414b am: 1081e9ac62
am: 5b2fa9ad09

Change-Id: Id1bec989a45302e453c0d9f7e96b82a63ec84f16
5b2fa9ad09bde1579250eb31490ed2488ce1deff 02-Dec-2016 Pavlin Radoslavov <pavlin@google.com> Merge "Add a mechanism for Audio Feeding Parameters negotiation" am: 653748414b
am: 1081e9ac62

Change-Id: Iafbd0d46b69cdd9a98e288f1e03d58c25111c23b
1081e9ac62c7fb4998037272d47954fd62100016 02-Dec-2016 Pavlin Radoslavov <pavlin@google.com> Merge "Add a mechanism for Audio Feeding Parameters negotiation"
am: 653748414b

Change-Id: Id6855d139a248d15ec0ea0ee0f01cf7655862ac7
4c9cd19bdb3186b7450dd9f33b6abcdd80088d1c 22-Nov-2016 Pavlin Radoslavov <pavlin@google.com> Add a mechanism for Audio Feeding Parameters negotiation

Previously, the Audio Feeding Parameters between the Media Framework
and A2DP were hard-coded: 44.1 KHz sample rate, 16-bits per sample, Stereo.
Now the Media Framework queries A2DP, and uses the returned values.

Bug: b/30958229
Test: Manual testing: A2DP streaming to headphones. TestTracker/68727
Change-Id: Ib86035814c49f773b7ed3d64da334ca9ea87eb14
udiopolicy/config/a2dp_audio_policy_configuration.xml
2148bf0e79c436b8764b9edc4c8f2730cce98a32 29-Nov-2016 Andy Hung <hunga@google.com> Log audio information to ensure complete delivery

Test: Audio playback
Bug: 30572472
Change-Id: Ibad6fc202692cd3480ae726627252afdead083f3
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
4a6a59e0865fa14ff8e6e68c296134656ac1c61b 02-Dec-2016 Mikhail Naganov <mnaganov@google.com> Merge "libaudiohal: Implement simple HIDL client"
96626b7f9a4e5c9e1e04f7f710383631d1470364 01-Dec-2016 Marco Nelissen <marcone@google.com> Use property_get_bool where possible

Make handling of boolean properties more readable and consistent by
using property_get_bool instead of parsing the result of property_get

Change-Id: I8490d0f0b41a92eab5131e0aac0ecdf704a63381
amera/libcameraservice/api1/client2/Parameters.cpp
dbb1afd703c1435e0be5d5fd85248ab48dac2b02 01-Dec-2016 Marco Nelissen <marcone@google.com> Remove unneeded libcutils references

mediaserver, mediadrmserver, cameraserver don't actually use libcutils

Change-Id: Ieac17ec8bce73910672db4e3e239bc6cbe5f0be0
ediadrm/Android.mk
f558e0218d2677a813c9c600886f673894eec927 15-Nov-2016 Mikhail Naganov <mnaganov@google.com> libaudiohal: Implement simple HIDL client

This client requires both HIDL client and server to be of the same
ABI version (e.g. 32-bit).

EffectHalHidl::process and EffectHalHidl::processReverse are stubs.

Some extra warnings are logged due to unimplemented functions
in the legacy HAL.

Bug: 30222631
Change-Id: Id074131dec6d6c4f1031695abcf3ea066e92a5af
Test: Play Music (play / EQ), YouTube, Loopback RTLT, Ok Google on N5X
udioflinger/AudioFlinger.cpp
c64e124bca8b7813ecea19d38452dd55fee4082f 30-Nov-2016 rago <rago@google.com> Fix security vulnerability: potential OOB write in audioserver am: e275907e57 am: 01e854056a am: 3e8ab60b7f am: 9161586309 am: ad29b47d91 am: 8b9b199891 am: 72729c449d am: 97bb7fe084 am: 3d6aada999 am: ffe82a3b4a am: ec601622f8 am: f50635bdc4 am: f1e829a54e am: a2e95f5c9b am: c6239b0d4d
am: cbc7183fbb

Change-Id: I7a13718ab24d1c4c9c64d83e148031af046921e1
cbc7183fbbb30af5611795740e0db5affb7c9e29 30-Nov-2016 rago <rago@google.com> Fix security vulnerability: potential OOB write in audioserver am: e275907e57 am: 01e854056a am: 3e8ab60b7f am: 9161586309 am: ad29b47d91 am: 8b9b199891 am: 72729c449d am: 97bb7fe084 am: 3d6aada999 am: ffe82a3b4a am: ec601622f8 am: f50635bdc4 am: f1e829a54e am: a2e95f5c9b
am: c6239b0d4d

Change-Id: I7763dd999e46b0c07891e888222853c22a2ae9cb
03e561ce4f7fedb4b31343f41d728353d451a6f3 30-Nov-2016 rago <rago@google.com> Fix security vulnerability: potential OOB write in audioserver am: e275907e57 am: 01e854056a am: 3e8ab60b7f am: 9161586309 am: ad29b47d91 am: 8b9b199891 am: 72729c449d am: 97bb7fe084 am: 3d6aada999 am: ffe82a3b4a am: ec601622f8 am: f50635bdc4 am: f1e829a54e
am: a2e95f5c9b

Change-Id: Ib06632143709a83ed37633dc6be6a40eb5955582
c6239b0d4dfa730c122f2de214dfd2e62f7f8eea 30-Nov-2016 rago <rago@google.com> Fix security vulnerability: potential OOB write in audioserver am: e275907e57 am: 01e854056a am: 3e8ab60b7f am: 9161586309 am: ad29b47d91 am: 8b9b199891 am: 72729c449d am: 97bb7fe084 am: 3d6aada999 am: ffe82a3b4a am: ec601622f8 am: f50635bdc4 am: f1e829a54e
am: a2e95f5c9b

Change-Id: Ic25053a111913dfd4490633b9f0eff1e7fe1d359
f1e829a54ec8c5e28063366d378a110e14b98811 30-Nov-2016 rago <rago@google.com> Fix security vulnerability: potential OOB write in audioserver am: e275907e57 am: 01e854056a am: 3e8ab60b7f am: 9161586309 am: ad29b47d91 am: 8b9b199891 am: 72729c449d am: 97bb7fe084 am: 3d6aada999 am: ffe82a3b4a am: ec601622f8
am: f50635bdc4

Change-Id: I2a763c6477374600f84d5c3aae646af395b947c5
f50635bdc4613bfd8f4a3a76dc0e5c6fc752c77a 30-Nov-2016 rago <rago@google.com> Fix security vulnerability: potential OOB write in audioserver am: e275907e57 am: 01e854056a am: 3e8ab60b7f am: 9161586309 am: ad29b47d91 am: 8b9b199891 am: 72729c449d am: 97bb7fe084 am: 3d6aada999 am: ffe82a3b4a
am: ec601622f8

Change-Id: I406374de32920003302cff5a78c0ced400dacbdc
ec601622f852cd1710bb92023d318a28dd03c56d 30-Nov-2016 rago <rago@google.com> Fix security vulnerability: potential OOB write in audioserver am: e275907e57 am: 01e854056a am: 3e8ab60b7f am: 9161586309 am: ad29b47d91 am: 8b9b199891 am: 72729c449d am: 97bb7fe084 am: 3d6aada999
am: ffe82a3b4a

Change-Id: I428d5c72ea37518c30d50d21b1ef47e440933cde
ffe82a3b4ac5e9c286b5b24836efdd87581274a7 30-Nov-2016 rago <rago@google.com> Fix security vulnerability: potential OOB write in audioserver am: e275907e57 am: 01e854056a am: 3e8ab60b7f am: 9161586309 am: ad29b47d91 am: 8b9b199891 am: 72729c449d am: 97bb7fe084
am: 3d6aada999

Change-Id: Id7d701e1a6189cb674b75895a430b260d9e0690c
3d6aada99991a7fc6d50350d22c4e71f90559b59 30-Nov-2016 rago <rago@google.com> Fix security vulnerability: potential OOB write in audioserver am: e275907e57 am: 01e854056a am: 3e8ab60b7f am: 9161586309 am: ad29b47d91 am: 8b9b199891 am: 72729c449d
am: 97bb7fe084

Change-Id: I324b70466e9306fe724bd858f4f70edea8637cc6
97bb7fe0846fc3cebc7ededd8cb337f83ff5a13d 30-Nov-2016 rago <rago@google.com> Fix security vulnerability: potential OOB write in audioserver am: e275907e57 am: 01e854056a am: 3e8ab60b7f am: 9161586309 am: ad29b47d91 am: 8b9b199891
am: 72729c449d

Change-Id: I97c6b4935971fa201e5107940643eaf0355bcaaa
72729c449d9f7a6f217be629066cb683ad27b37b 30-Nov-2016 rago <rago@google.com> Fix security vulnerability: potential OOB write in audioserver am: e275907e57 am: 01e854056a am: 3e8ab60b7f am: 9161586309 am: ad29b47d91
am: 8b9b199891

Change-Id: Id1d62d9ebabab42f5ca82ff2fbbcf14d130466f4
ad29b47d91c26f65d1d9a58d2dac1970175a885c 30-Nov-2016 rago <rago@google.com> Fix security vulnerability: potential OOB write in audioserver am: e275907e57 am: 01e854056a am: 3e8ab60b7f
am: 9161586309

Change-Id: Ibcceb08d7db77f67f3dfc3cdad1d2bd6994183ae
9161586309fd018a1503dc5227f2cb329b935213 30-Nov-2016 rago <rago@google.com> Fix security vulnerability: potential OOB write in audioserver am: e275907e57 am: 01e854056a
am: 3e8ab60b7f

Change-Id: Ib575df34ec5bb7dc2cd83a859e10abe94e894317
379254d561700c55fae6292428aefa20e45b26f6 30-Nov-2016 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: fix camera facing override logic" am: 853f568b31
am: f02844c434

Change-Id: I0f136beed5de56795e20b14bbe2e64c4290d0e99
3e8ab60b7f65dd4c5c9efa4a1c388a51fbbb5d11 30-Nov-2016 rago <rago@google.com> Fix security vulnerability: potential OOB write in audioserver am: e275907e57
am: 01e854056a

Change-Id: I7ea6a871eed4b9e1c56c5350c4e5fb5eb628e816
f02844c434fe1ff97403b43fa6ab4bc5d2733939 30-Nov-2016 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: fix camera facing override logic"
am: 853f568b31

Change-Id: I5028a6f298eb2c961556760b6ea248c673c13ba6
0bdd9ffd24b266b3b8c79a82db871bf22436ceba 30-Nov-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix camera facing override logic am: 13cd59a7ea
am: e67f6da367

Change-Id: Ie356c8cf4f0b15cce677ecc5e5954b97bea775c0
e67f6da3673a6596a1058598c6cd4a9ed9cfdf15 30-Nov-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix camera facing override logic
am: 13cd59a7ea

Change-Id: Id2f4f8a02843ad90cd4a61d1223346361e88e18a
f96b08d53781db2b572980a2539e86dd39cb3927 30-Nov-2016 Andy Hung <hunga@google.com> Merge "Change order of EFFECT_CMD_GET_PARAM command size check"
f85b5689ce993eb7f160003c52bf18faf245f280 29-Nov-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix camera facing override logic

Test: hack existing HAL to report EXTERNAL and run cts
Bug: 33091893
Change-Id: Idae8742fb4b18b2ef4842ec66284268fc650df22
amera/libcameraservice/CameraService.cpp
13cd59a7ea9110546088e76f9c844503fa638850 29-Nov-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix camera facing override logic

Test: hack existing HAL to report EXTERNAL and run cts
Bug: 33091893
Change-Id: Idae8742fb4b18b2ef4842ec66284268fc650df22
amera/libcameraservice/CameraService.cpp
d3c61c2c74a9a83392ccaee17b6f1dd54492a530 29-Nov-2016 Eric Laurent <elaurent@google.com> Merge "remove support for legacy audio policy manager"
e275907e576601a3579747c3a842790bacf111e2 23-Nov-2016 rago <rago@google.com> Fix security vulnerability: potential OOB write in audioserver

Bug: 32705438
Bug: 32703959
Test: cts security test
Change-Id: I8900c92fa55b56c4c2c9d721efdbabe6bfc8a4a4
udioflinger/Effects.cpp
8243fcd644bd4b4865c3977435bb758c981ccf65 29-Nov-2016 Eric Laurent <elaurent@google.com> remove support for legacy audio policy manager

Test: make

Change-Id: I7294a52674abadfdbc4da40a72c8fe1a229d0815
udiopolicy/Android.mk
udiopolicy/service/AudioPolicyClientImplLegacy.cpp
udiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/service/AudioPolicyService.cpp
udiopolicy/service/AudioPolicyService.h
382bbc8fd1617e96881693c5f747def476c5786f 28-Nov-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Do not hardcode media - a11y stream aliasing"
b34566440cad5da599fb93b87b37cb6d38168839 28-Nov-2016 Andy Hung <hunga@google.com> Change order of EFFECT_CMD_GET_PARAM command size check

Test: Custom APK
Bug: 33003822
Change-Id: I7801cf73377ec4086df5da6b138ebc9d13067ebc
udioflinger/Effects.cpp
a447a0f52fff7f1cab3bbe7c0a2f9b96f8e3914e 16-Nov-2016 Andy Hung <hunga@google.com> Effect: Use local cached data for Effect commit

Test: POC, Cts Effect, BassBoost, EnvReverb, Equalizer,
Test: LoudnessEnhancer, PresetReverb, Virtualizer, Visualizer
Bug: 32220769
Change-Id: Iea96ba0daf71691ee8954cca4ba1c10fe827626e
udioflinger/Effects.cpp
99bb2f9afd956174785051827aa96d008b33faee 24-Nov-2016 Jean-Michel Trivi <jmtrivi@google.com> Do not hardcode media - a11y stream aliasing

Media and accessibility volume aliasing is now modal, and
now handled in AudioService.

Test: see bug
Bug: 30448020
Change-Id: Ie4e1775163fb65da2c0ed766b477cd9fc1c919d1
udiopolicy/managerdefault/AudioPolicyManager.cpp
fc707ea9bf781fe53c456163abafc8509bad4ee5 23-Nov-2016 Baligh Uddin <baligh@google.com> Merge "Merge remote-tracking branch 'goog/cw-f-dev' into fix_merger" into nyc-mr1-dev-plus-aosp
c9d24d07ec243a183993595a6902c0687a937ddc 23-Nov-2016 Yunlian Jiang <yunlian@google.com> fix warning: Dereference of null pointer

This fixes the static analyzer warning
warning: Dereference of null pointer (loaded from variable 'devices')

Bug: None
Test: The warning is gone.
Change-Id: If0d2649bf0a90a403013c4af1b94814357b792c2
udioflinger/AudioFlinger.cpp
3e9e728ef329e49424d5878c682bf82dac5009ef 23-Nov-2016 Yunlian Jiang <yunlian@google.com> Merge "fix Potential leak of memory pointed to by 'sourcesLiteral'" am: fa81ba8775 am: e16a2029e0 am: 228b9dec45
am: 504a885be0

Change-Id: Iba5669ae28b61114a9357291e9ff5ac63ba7ad63
504a885be0d8ca46c8787486f26d676648e21704 23-Nov-2016 Yunlian Jiang <yunlian@google.com> Merge "fix Potential leak of memory pointed to by 'sourcesLiteral'" am: fa81ba8775 am: e16a2029e0
am: 228b9dec45

Change-Id: Id1062cbb6be6c6f02ee09bd575b40ccd49b20b78
e16a2029e073d348f480665db799de5a922f43f8 23-Nov-2016 Yunlian Jiang <yunlian@google.com> Merge "fix Potential leak of memory pointed to by 'sourcesLiteral'"
am: fa81ba8775

Change-Id: I7d261ceb8cfce3b3f56ed907e1e32d70e7a40d45
fa81ba8775c497c229078c25bcf8374e8420ea18 23-Nov-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "fix Potential leak of memory pointed to by 'sourcesLiteral'"
221bfde160c9d0f52cab903bfb2e48d04881243e 23-Nov-2016 Baligh Uddin <baligh@google.com> Merge remote-tracking branch 'goog/cw-f-dev' into fix_merger

Bug: 32849428

* goog/cw-f-dev:
If a device does not have a camera, do not set a camera death notifier
Fix security vulnerability: Effect command might allow negative indexes
Make VBRISeeker more robust
DO NOT MERGE: defensive parsing of mp3 album art information
Effects: Check get parameter command size
IOMX: convert ANWB to Gralloc meta if using useBuffer in the same process
DO NOT MERGE: defensive parsing of mp3 album art information
DO NOT MERGE: defensive parsing of mp3 album art information
DO NOT MERGE: defensive parsing of mp3 album art information
DO NOT MERGE: defensive parsing of mp3 album art information
Camera API1: don't pick wrong preview fps value
Fix security vulnerability: Equalizer command might allow negative indexes
Camera API1: relax the fps check with some margin
stagefright: remove allottedSize equality check in IOMX::useBuffer
Camera API1: filter out the unsupported preview fps range
DO NOT MERGE: Visualizer: Check capture size and latency parameters
Visualizer: Check capture size and latency parameters
7fd5bdb5fa9db81f0293793b7b6d45dd833d05b2 23-Nov-2016 Yunlian Jiang <yunlian@google.com> fix warning The left operand of '!=' is a garbage value

The 'res' is uninitialized if params.state == Parameters::PREVIEW.
This sets the default value to 'OK' to silence this warning.

Bug: None
Test: Run clang-tidy on this code and the warning is gone.
Change-Id: I9d1b5e09c7957813f3c66d052c6a9f7d4b074b84
amera/libcameraservice/api1/Camera2Client.cpp
bd54eef2d289f786a7ae02139ce3bb9db2b03b24 22-Nov-2016 Jinguang Dong <dongjinguang@huawei.com> Merge "framework/av: fixbug for mistake clear mainbuffer data, root cause by not offset to fout" am: 25ef483a8c am: c7ad5838d2 am: a030efa8c9
am: 35c5866abb

Change-Id: Ib67027c035e48e956380adf11380123b884d3c92
35c5866abb0a8e26a607ae648f6d472c508f74f4 22-Nov-2016 Jinguang Dong <dongjinguang@huawei.com> Merge "framework/av: fixbug for mistake clear mainbuffer data, root cause by not offset to fout" am: 25ef483a8c am: c7ad5838d2
am: a030efa8c9

Change-Id: I36f7616aa8d01715007677a9a66b83b9964d1d78
c7ad5838d2aec7ff90db36069f3577d3c4feaa95 22-Nov-2016 Jinguang Dong <dongjinguang@huawei.com> Merge "framework/av: fixbug for mistake clear mainbuffer data, root cause by not offset to fout"
am: 25ef483a8c

Change-Id: I6c8ee1c28b51f1578a781fdc7dd1d51326046d2f
25ef483a8c46d8ca7cbacf96e3bce5d783a63a86 22-Nov-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "framework/av: fixbug for mistake clear mainbuffer data, root cause by not offset to fout"
7c5ec035fe1c6f30f1303eee8e0a4c76389228ee 14-Nov-2016 Jinguang Dong <dongjinguang@huawei.com> framework/av: fixbug for mistake clear mainbuffer data,
root cause by not offset to fout

Test: 1. pair and connect with bluetooth ear phone;
2. record video by camera ,play and pause again by
loop test;
3. Checking whether ear phone has pop sound.

Change-Id: Ief4117d634b9e7a9f27c669b8de7626b15df7636
udioflinger/AudioMixer.cpp
475d5837cd0d5cce89b0a43cb1e7939583f3a7a5 21-Nov-2016 Eric Laurent <elaurent@google.com> fix build for HIDL broadcast radio HAL.

Test: make full-eng
Change-Id: I384502539ad60c6a232e3cd9b65ba7fa6ca6ba58
adio/Android.mk
73e17f219e9ebcf45d6bc471b00b981428a4bc62 21-Nov-2016 Eric Laurent <elaurent@google.com> Revert "Revert "broadcast radio: initial support for HIDL HAL""

This reverts commit 9a24e9127481b222c338dcbecef8394eaf899d51.
adio/Android.mk
adio/HidlUtils.cpp
adio/HidlUtils.h
adio/RadioHalHidl.cpp
adio/RadioHalHidl.h
9ea205b1302f85bbf9364c1f41210c1837863f00 19-Nov-2016 Eric Laurent <elaurent@google.com> Merge "Revert "broadcast radio: initial support for HIDL HAL""
9a24e9127481b222c338dcbecef8394eaf899d51 19-Nov-2016 Eric Laurent <elaurent@google.com> Revert "broadcast radio: initial support for HIDL HAL"

This reverts commit 9347a7710968313b392a5faa61eca9285e68e19c.

Change-Id: I14dede64a24b08c58affd6709d3e8a95f9dbda0c
adio/Android.mk
adio/HidlUtils.cpp
adio/HidlUtils.h
adio/RadioHalHidl.cpp
adio/RadioHalHidl.h
8af409bce70eb556d4ce528f0a376d6e32127956 19-Nov-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "broadcast radio: initial support for HIDL HAL"
1adf7f847bf8ab20c89a5cc39545250112135e5c 19-Nov-2016 Dan Willemsen <dwillemsen@google.com> Merge "Remove LOCAL_COPY_HEADERS from libparameter" am: 76321a335c am: d5eb866c53 am: 9708e85a18
am: 6371c4361b

Change-Id: Id6a027637ad27f7471b1aa07d6a788158549a8e3
6371c4361b0f5f96dad40f1367fa975e4cfa9601 19-Nov-2016 Dan Willemsen <dwillemsen@google.com> Merge "Remove LOCAL_COPY_HEADERS from libparameter" am: 76321a335c am: d5eb866c53
am: 9708e85a18

Change-Id: I5825cd3bfaeb4fd752f6153274f3a248428c0e65
d5eb866c536c3497e778742e5fda22ac1def9fc6 19-Nov-2016 Dan Willemsen <dwillemsen@google.com> Merge "Remove LOCAL_COPY_HEADERS from libparameter"
am: 76321a335c

Change-Id: Ie99187aa91ddb1a9fa199dcf681edd4565cc0d1b
76321a335ccd1e810221e5ffbae2f045d4f397fa 19-Nov-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Remove LOCAL_COPY_HEADERS from libparameter"
4ffbc764411421a9a9cb73e21382ec711d21fc47 18-Nov-2016 Dan Willemsen <dwillemsen@google.com> Remove LOCAL_COPY_HEADERS from libparameter

Requires the libaudiopolicypfwwrapper to depend on libparameter to get
the exported headers. Also fix the libaudiopolicyengineconfigurable
build to resolve missing liblog symbols.

Test: USE_CONFIGURABLE_AUDIO_POLICY=1 mmma -j frameworks/av/services/audiopolicy
udiopolicy/engineconfigurable/Android.mk
udiopolicy/engineconfigurable/wrapper/Android.mk
6299e7b1626713ff75377537245f8ba3aa6dec35 18-Nov-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix sound trigger capture disabling in startInput()"
05b345e504a0affd24eefa12686812c554b294ff 18-Nov-2016 Eric Laurent <elaurent@google.com> audio policy: fix sound trigger capture disabling in startInput()

Fix test on number of active sessions in startInput()
deciding of overall capture state indication to sound trigger service.
As session active count is incremented before the test, the count indicating
the first active session is 1 and not 0.

Bug: 3289438
Test: verify OK google detection on Angler

Change-Id: I0a6c5d6240942e978fefffb536577b9d7dc29961
udiopolicy/managerdefault/AudioPolicyManager.cpp
a730ae63c247f2d2f5951238598930177112706a 18-Nov-2016 Yifan Hong <elsk@google.com> Split libhidl into base and transport.

Bug: 32756130

Test: mma
Change-Id: Ib3f5e05268661c6065bf6b6f6740d6e117b06e67
oundtrigger/Android.mk
81d472ef3635bcf5cf05e4567f715c52f2cf3b22 17-Nov-2016 Jinguang Dong <dongjinguang@huawei.com> Merge "Camera3: Add missing mTriggerMutex lock" am: ad4663c5a5 am: fa43b5468f am: 51c4a65f5c
am: ce85a6975b

Change-Id: I0b2995ef33ae80eebb32085fd42a81d868aeb8aa
ce85a6975b2b416c8c267265f47ad32f924c0556 17-Nov-2016 Jinguang Dong <dongjinguang@huawei.com> Merge "Camera3: Add missing mTriggerMutex lock" am: ad4663c5a5 am: fa43b5468f
am: 51c4a65f5c

Change-Id: I0fbb1098a246db4dd2b0a6b9720dea275be23a42
fa43b5468f93af356297b5e2f381274d4b484ece 17-Nov-2016 Jinguang Dong <dongjinguang@huawei.com> Merge "Camera3: Add missing mTriggerMutex lock"
am: ad4663c5a5

Change-Id: I59b7de9cdd9f608afa503293947a19d3f11d533b
9347a7710968313b392a5faa61eca9285e68e19c 04-Nov-2016 Eric Laurent <elaurent@google.com> broadcast radio: initial support for HIDL HAL

Test: make.
Test: run, load HIDL HAL and enumerate modules.

Bug: 31973526.

Change-Id: I74a8f526e9f8c03e4cc07f82dc4a89b05abe3b87
adio/Android.mk
adio/HidlUtils.cpp
adio/HidlUtils.h
adio/RadioHalHidl.cpp
adio/RadioHalHidl.h
b26e7a07894882f8cef2c6b0127106e649f22d42 14-Nov-2016 Jinguang Dong <dongjinguang@huawei.com> Camera3: Add missing mTriggerMutex lock

There is thread safety problem for mTriggerMap in
Camera3Device::RequestThread::clear(). For correctness,
acquire mTriggerMutex before mTriggermap.clear().

Test: 1. Configure power saving mode to 2 seconds by
modification software;
2. using pyhon or monkey to turn on the screen every 4
second;
3. device doesn't crash any more on loop test.

Change-Id: I2f04e21dae3a9879d6cebfefb9d9c191ef3f4df4
amera/libcameraservice/device3/Camera3Device.cpp
b59c2fb19f03bba8a558be71848bafa6a0ad3cbc 16-Nov-2016 Greg Hartman <ghartman@google.com> Merge "Adds nanosleep to x86 syscalls"
dd79ccda92c1e9b982b2d0f8877d98e5258fbb73 16-Nov-2016 Andy Hung <hunga@google.com> Effect: Use local cached data for Effect commit

Test: POC, Cts Effect, BassBoost, EnvReverb, Equalizer,
Test: LoudnessEnhancer, PresetReverb, Virtualizer, Visualizer
Bug: 32220769
Change-Id: Iea96ba0daf71691ee8954cca4ba1c10fe827626e
udioflinger/Effects.cpp
cc7c0d6fff90c867f661b795e803043aee4d0bb8 16-Nov-2016 Yunlian Jiang <yunlian@google.com> fix Potential leak of memory pointed to by 'sourcesLiteral'

Bug: none
Test: the warning is gone.
Change-Id: I8fe9610e24e31e3f788d00fa7f594e1274771433
udiopolicy/common/managerdefinitions/src/Serializer.cpp
430fffcebdbf278c80872419e5e148822551c099 15-Nov-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Use layered version of graphic buffer allocation calls."
8f84707376ee662491855966cdc213594d7b8a46 12-Nov-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "soundtrigger service: fix HIDL HAL status reporting"
4b38e7ad3565de208c8a8d7a401c1e7b07b0108b 11-Nov-2016 Eric Laurent <elaurent@google.com> soundtrigger service: fix HIDL HAL status reporting

Test: make

Change-Id: I27d8b65b7d42e7df2da37ca6f63bcb365a876f21
oundtrigger/SoundTriggerHalHidl.cpp
4b2f81808a3d6600ead4d51d0f5a0eba4a7ee6fe 26-Oct-2016 Craig Donner <cdonner@google.com> Use layered version of graphic buffer allocation calls.

Allocators now require a layer count, but in these cases we can
assume that a single layer is sufficient, since that's what they
effectively do now.

Bug: 31686534
Test: manual
Change-Id: Ic22f56f8dbbf5bca01ad21421d12faac95783de7
amera/libcameraservice/device3/Camera3BufferManager.cpp
f348da28b5bba5022fdf13fcadb7b2eb65c2a853 11-Nov-2016 Alex Naidis <alex.naidis@linux.com> Merge "mediacodec/mediaextractor: allow multiple Seccomp extensions" am: da4cb8cb6c am: 07d040d389 am: c9c32a8dcc
am: bff72ff3ae

Change-Id: Iadf9ab52e1f1974f45f951ef8182609b3dd9a723
bff72ff3ae5edc740c48a59b147767c31a7ec438 11-Nov-2016 Alex Naidis <alex.naidis@linux.com> Merge "mediacodec/mediaextractor: allow multiple Seccomp extensions" am: da4cb8cb6c am: 07d040d389
am: c9c32a8dcc

Change-Id: Ida14853e8bd5aa68e9ac7b21d5aa81338dfb0897
07d040d3892a105b124080760a0d8767899fc1c7 11-Nov-2016 Alex Naidis <alex.naidis@linux.com> Merge "mediacodec/mediaextractor: allow multiple Seccomp extensions"
am: da4cb8cb6c

Change-Id: Ia85752fe429a0fbb985ca0ad5425029c0a2811cf
9cab746b116b8aed38ca6b97bfea35103535e522 10-Nov-2016 Eric Laurent <elaurent@google.com> Revert "AudioFlinger: Associate audio time with client uid"

This reverts commit 2f366df67c31119bb6dd726becd32d14b18e6573.

Bug: 32728805
Change-Id: If0a158154814492eda427de0af8a49c0b0a91180
udioflinger/Threads.cpp
udioflinger/Threads.h
5850c4c8eecbe0db3cee8511a4f82cb443e27d08 10-Nov-2016 Eric Laurent <elaurent@google.com> Revert "AudioFlinger: Remove naked track pointers"

This reverts commit 062bfceaefab29f0f71db7d5a248b3f5f0572b6a.
Bug: 32728805
udioflinger/Threads.cpp
udioflinger/Threads.h
be0d729212c5711f78d3475e77b8e5a975b67048 10-Nov-2016 Andy Hung <hunga@google.com> Effects: Check get parameter command size am: 3d34cc76e3 am: 59920bf785 am: 14d87911d7 am: 79a088a065 am: 58e5681c96 am: f0f864a1e4 am: 134e208477 am: 5662efe76b am: 1ad93b9617 am: 8c8eb964c0 am: 34f29aac04 am: dfb1bd9794 am: 791d393881 am: 4b7780abd1
am: 01ee07728f

Change-Id: Ia1a615c3776cfe02f401659fa8dc342404c83ce0
01ee07728fcb83a36bac83af139003653289f8d9 10-Nov-2016 Andy Hung <hunga@google.com> Effects: Check get parameter command size am: 3d34cc76e3 am: 59920bf785 am: 14d87911d7 am: 79a088a065 am: 58e5681c96 am: f0f864a1e4 am: 134e208477 am: 5662efe76b am: 1ad93b9617 am: 8c8eb964c0 am: 34f29aac04 am: dfb1bd9794 am: 791d393881
am: 4b7780abd1

Change-Id: I41624c5146e5888b17ff9fedc7b322e56bbf6aea
791d393881025ccebb5674b82b636000dddd94b1 10-Nov-2016 Andy Hung <hunga@google.com> Effects: Check get parameter command size am: 3d34cc76e3 am: 59920bf785 am: 14d87911d7 am: 79a088a065 am: 58e5681c96 am: f0f864a1e4 am: 134e208477 am: 5662efe76b am: 1ad93b9617 am: 8c8eb964c0 am: 34f29aac04
am: dfb1bd9794

Change-Id: I1507778b7b095b92fda6f664da6111a91d388010
dfb1bd97947b71019d4be758572875edebb01808 10-Nov-2016 Andy Hung <hunga@google.com> Effects: Check get parameter command size am: 3d34cc76e3 am: 59920bf785 am: 14d87911d7 am: 79a088a065 am: 58e5681c96 am: f0f864a1e4 am: 134e208477 am: 5662efe76b am: 1ad93b9617 am: 8c8eb964c0
am: 34f29aac04

Change-Id: I7dc182307420e375c5f63bd9b2ba2be472845dca
34f29aac0400290f98d42a3d807b2b8d6e8bd4e6 10-Nov-2016 Andy Hung <hunga@google.com> Effects: Check get parameter command size am: 3d34cc76e3 am: 59920bf785 am: 14d87911d7 am: 79a088a065 am: 58e5681c96 am: f0f864a1e4 am: 134e208477 am: 5662efe76b am: 1ad93b9617
am: 8c8eb964c0

Change-Id: If5f09a4ad11bc1045e8a961091cfaa90ff554237
d4050242bc4e4aeb3d008c4f6fe77365e0bbadbe 29-Oct-2016 Alex Naidis <alex.naidis@linux.com> mediacodec/mediaextractor: allow multiple Seccomp extensions

This is useful if we have multiple device
layers and want to have common extensions while
supporting device specific extensions at the same time.

Change-Id: Iefbff9c1ec680963a7ea4c2db09d8e888dd87703
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
ediacodec/minijail/Android.mk
ediaextractor/minijail/Android.mk
8c8eb964c09435a4834dedcba248c4a0944653ba 10-Nov-2016 Andy Hung <hunga@google.com> Effects: Check get parameter command size am: 3d34cc76e3 am: 59920bf785 am: 14d87911d7 am: 79a088a065 am: 58e5681c96 am: f0f864a1e4 am: 134e208477 am: 5662efe76b
am: 1ad93b9617

Change-Id: I0b66ac456a906d813da5c9b9caf5b572b7b371a2
1ad93b96176bd0b0fc168a53bad5c9a846a8997a 10-Nov-2016 Andy Hung <hunga@google.com> Effects: Check get parameter command size am: 3d34cc76e3 am: 59920bf785 am: 14d87911d7 am: 79a088a065 am: 58e5681c96 am: f0f864a1e4 am: 134e208477
am: 5662efe76b

Change-Id: I2f5f4aebaf09d2ecf5b0dd57468f9ce210ce2b41
5662efe76bfa566c27bf622722c9831be410d8b5 10-Nov-2016 Andy Hung <hunga@google.com> Effects: Check get parameter command size am: 3d34cc76e3 am: 59920bf785 am: 14d87911d7 am: 79a088a065 am: 58e5681c96 am: f0f864a1e4
am: 134e208477

Change-Id: Icb77516db563dc75d8405eccbb5012ebb128d775
134e20847763b64ae4afb968f55801c0cfb26c5f 10-Nov-2016 Andy Hung <hunga@google.com> Effects: Check get parameter command size am: 3d34cc76e3 am: 59920bf785 am: 14d87911d7 am: 79a088a065 am: 58e5681c96
am: f0f864a1e4

Change-Id: I4e1a1cbcc97223abf9f87a0e575f198342c2accf
58e5681c969afd6dfe708476b75ac253b02eff4c 10-Nov-2016 Andy Hung <hunga@google.com> Effects: Check get parameter command size am: 3d34cc76e3 am: 59920bf785 am: 14d87911d7
am: 79a088a065

Change-Id: I9d46fdc8a919d5339dddac558f1f5496f35b498a
79a088a065f04239f404c4f94bc0d8bcc82ffaad 10-Nov-2016 Andy Hung <hunga@google.com> Effects: Check get parameter command size am: 3d34cc76e3 am: 59920bf785
am: 14d87911d7

Change-Id: Icbc43a1d34af774dcf500cdb3548d0399f0b6943
14d87911d7409ce7ccea00980fafccf2bd60e301 10-Nov-2016 Andy Hung <hunga@google.com> Effects: Check get parameter command size am: 3d34cc76e3
am: 59920bf785

Change-Id: I2d90659faa7d0085b33d0f527a97fa6dc82a70d7
77109420fe285b4e9618bd5f0cd12e0fcef6eced 10-Nov-2016 Andy Hung <hunga@google.com> Merge "Audio: Use uid_t for uids"
eb6300d4bbe1cb0e24e26b15e3b5af8afe874c5f 10-Nov-2016 Ricardo Garcia <rago@google.com> Merge "Override Auxiliary audio effect output as stereo" am: 568085d022 am: f34b5f6e93 am: 7b5b1e315d
am: 1c79c0531c

Change-Id: I2ef049fd9a82711022179938838c3f4598552b62
1c79c0531cfd3730253a3e07da7a4348b1f920fb 10-Nov-2016 Ricardo Garcia <rago@google.com> Merge "Override Auxiliary audio effect output as stereo" am: 568085d022 am: f34b5f6e93
am: 7b5b1e315d

Change-Id: I460e557f1d594d82c1ff3df95e55068ed2045b0a
f34b5f6e93751a7ec05efccb658951ee90e1d09c 10-Nov-2016 Ricardo Garcia <rago@google.com> Merge "Override Auxiliary audio effect output as stereo"
am: 568085d022

Change-Id: I4f705ee2b47f30731d4f1ac46213fbcd678633a5
568085d022c299c9899e54ed886ed8ef3b7d47e0 10-Nov-2016 Ricardo Garcia <rago@google.com> Merge "Override Auxiliary audio effect output as stereo"
12ccef792da1f12a7916f2dca521eb2314eb5298 23-Aug-2016 Yuuki Yokoyama <yuuki.x.yokoyama@sonymobile.com> Override Auxiliary audio effect output as stereo

Auxiliary audio effect supports only stereo as output channel.
Override output channel in case of Auxiliary effect.

Bug: 31985321
Change-Id: I308a6281e2ae2b8f814a659aa40dc6220ab7660a
udioflinger/Effects.cpp
8d029bffae6ab6592ea0f2aaa8938d04bf4c8a97 09-Nov-2016 Andy Hung <hunga@google.com> Merge "Effects: Check get parameter command size"
1f12a8ad958344c50733b948628ffa06db9c5bc6 08-Nov-2016 Andy Hung <hunga@google.com> Audio: Use uid_t for uids

Test: Power manager shows correct uids for audio
Bug: 32713790
Change-Id: If5337e17283268f74dc0f00cc66ece9153d680ef
udioflinger/PlaybackTracks.h
udioflinger/RecordTracks.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/TrackBase.h
udioflinger/Tracks.cpp
afe53b6b9d8e0f295112a896261cc428b41b361d 09-Nov-2016 Mikhail Naganov <mnaganov@google.com> Merge "Add back AUDIO_DEVICE_*_STUB to the enum map."
0aa15c6e4d02d3aa96d5ddfc6c862fe4da1da594 08-Nov-2016 Mikhail Naganov <mnaganov@google.com> Add back AUDIO_DEVICE_*_STUB to the enum map.

It has been accidentally removed, and it is used in
audio_policy.conf on certain devices.

Bug: 32740394
Change-Id: I59a1b44472aeabc87f65c6cee6371ac3647ecf57
Test: make & check on the device
udiopolicy/common/include/policy.h
c0fff7e64a3205ec7e91eae4cbd7926813ae70f8 08-Nov-2016 Shuzhen Wang <shuzhenwang@google.com> Camera: Clear not-yet-submitted request in cleanupFailedRequest am: cadb330fd8
am: cc621decd5

Change-Id: Ic14af20f08280a4196388230040f8762b149bb7e
cc621decd54f2d469925de20f33812f2464fc313 08-Nov-2016 Shuzhen Wang <shuzhenwang@google.com> Camera: Clear not-yet-submitted request in cleanupFailedRequest
am: cadb330fd8

Change-Id: I655bdce42c508734a671c0f6f9ae8b668b8b2593
cadb330fd8b51d17b548e913651d13376ac2e3a5 04-Nov-2016 Shuzhen Wang <shuzhenwang@google.com> Camera: Clear not-yet-submitted request in cleanupFailedRequest

In case request fails for a burst, previous not-yet-submitted
requests that are put into mInFlightMap are never taken out.
This causes waitUntilDrained error.

Bug: 32466355
Change-Id: Icd28d465dca3f850938c13058c916efc477b0d2b
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
74d3601bea717111f77376cf1678d2bc65dd51a1 08-Nov-2016 Marco Nelissen <marcone@google.com> Merge "Clean up mediadrm dependencies"
0871d93cbadad8d736a09454b47846e09a793504 08-Nov-2016 Andy Hung <hunga@google.com> Merge "AudioFlinger: Remove naked track pointers"
19b396db94fa9dc3dfe713e8687dad4804e06327 08-Nov-2016 Andy Hung <hunga@google.com> Merge "AudioFlinger: Associate audio time with client uid"
75571e4bc76bd2defd4309c7154120840396329d 08-Nov-2016 Marco Nelissen <marcone@google.com> Clean up mediadrm dependencies

Move various things around so mediadrmserver doesn't need
libstagefright and libmedia

Test: build/boot
Change-Id: I48b713cd679b992cb6ad1262c20394a9892d7027
ediadrm/Android.mk
ediaresourcemanager/Android.mk
062bfceaefab29f0f71db7d5a248b3f5f0572b6a 01-Nov-2016 Andy Hung <hunga@google.com> AudioFlinger: Remove naked track pointers

Test: Play Music offloaded and kill audioserver
Change-Id: I3114a67f248e067e0b5334d76e4b5e6c39858040
udioflinger/Threads.cpp
udioflinger/Threads.h
2f366df67c31119bb6dd726becd32d14b18e6573 31-Oct-2016 Andy Hung <hunga@google.com> AudioFlinger: Associate audio time with client uid

Group active track operations for add and remove together.
PlaybackThread now uses strong pointer for active tracks.

Test: Play Music, Youtube, Batterystats, CTS AudioTrack
Bug: 32361950
Change-Id: Ica96e2b84b9dfa5766571e24de49401a81a30e9d
udioflinger/Threads.cpp
udioflinger/Threads.h
300379ab01ec4c5f9f538284dbb1e49ad012de29 07-Nov-2016 Mikhail Naganov <mnaganov@google.com> Merge "Move TypeConverter into a shared library"
ce5749ea9b510c4327c8656cf747a6997b957a58 07-Nov-2016 Marco Nelissen <marcone@google.com> Split libmedia into libmedia and libaudioclient am: 795a2a7554 am: 4ea929819e
am: e5a73e6a2d

Change-Id: Ib48ce56d342bfe745345d7c899613d3f950b9a67
913d06c099bd689375483a839e11057ccf284d1c 01-Nov-2016 Mikhail Naganov <mnaganov@google.com> Move TypeConverter into a shared library

This will be needed for the default implementation of the audio HAL
in TREBLE for parsing supported formats etc. provided by HAL in
a form of string literals.

As a bonus, remove some hand-written type conversions in AudioFlinger
used in dumps.

Example changes in the dump output:

HAL format: 0x1 (pcm16) ==> HAL format: 0x1 (AUDIO_FORMAT_PCM_16_BIT)
Processing format: 0x5 (pcmfloat) ==> Processing format: 0x5 (AUDIO_FORMAT_PCM_FLOAT)
Output device: 0x2 (SPEAKER) ==> Output device: 0x2 (AUDIO_DEVICE_OUT_SPEAKER)
Input device: 0 (NONE) ==> Input device: 0 (AUDIO_DEVICE_NONE)
AudioStreamOut: 0x... flags 0x6 (PRIMARY|FAST) ==>
AudioStreamOut: 0x... flags 0x6 (AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_FAST)

Test: make & run
Change-Id: I9cde640e6827b7aa6d62e9caade9e738227e299f
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Effects.cpp
udioflinger/Threads.cpp
udiopolicy/Android.mk
udiopolicy/common/managerdefinitions/include/TypeConverter.h
udiopolicy/common/managerdefinitions/src/AudioPatch.cpp
udiopolicy/common/managerdefinitions/src/ConfigParsingUtils.cpp
udiopolicy/common/managerdefinitions/src/DeviceDescriptor.cpp
udiopolicy/common/managerdefinitions/src/Serializer.cpp
udiopolicy/common/managerdefinitions/src/TypeConverter.cpp
udiopolicy/engineconfigurable/Android.mk
udiopolicy/engineconfigurable/wrapper/Android.mk
udiopolicy/engineconfigurable/wrapper/ParameterManagerWrapper.cpp
udiopolicy/enginedefault/Android.mk
udiopolicy/utilities/convert/convert.h
4ea929819e23ecd388e1edce25a10631ee53e9e3 07-Nov-2016 Marco Nelissen <marcone@google.com> Split libmedia into libmedia and libaudioclient
am: 795a2a7554

Change-Id: Ic08eddc5650d3f5d344ebcf93ad98ae5bb236c8c
3d34cc76e315dfa8c3b1edf78835b0dab4980505 05-Nov-2016 Andy Hung <hunga@google.com> Effects: Check get parameter command size

Test: Custom test.
Bug: 32438594
Bug: 32624850
Bug: 32635664
Change-Id: I9b1315e2c02f11bea395bfdcf5c1ccddccbad8a6
udioflinger/Effects.cpp
6660f12f004b5f9e45a6686c646b982ca5bf06d5 05-Nov-2016 Andy Hung <hunga@google.com> Effects: Check get parameter command size

Test: Custom test.
Bug: 32438594
Bug: 32624850
Bug: 32635664
Change-Id: I9b1315e2c02f11bea395bfdcf5c1ccddccbad8a6
udioflinger/Effects.cpp
795a2a75542d25eefa56bebc388340ee15fdff5c 02-Nov-2016 Marco Nelissen <marcone@google.com> Split libmedia into libmedia and libaudioclient

This makes it so audioserver doesn't need to link against the entire libmedia,
which has dependencies on camera, ICU, OpenGL and other things that aren't
needed for audio.

Test: build/boot

Change-Id: I99ba1a3dc3b33ca9b3abd98e7519dbf228ee62af
udioflinger/Android.mk
udiopolicy/Android.mk
adio/Android.mk
oundtrigger/Android.mk
61274c6e55c98dfd45c6c19a7dc98ded45414a3c 05-Nov-2016 Marco Nelissen <marcone@google.com> Merge "Move IMediaLogService to libmedialogservice" am: 12dc4449ee am: ad43cf3a8b
am: ba6f82173f

Change-Id: Ide44a7113edaffa323c76a479eb76a94164082e7
ad43cf3a8b3e52bda741b5759813dedfcc0e19d3 05-Nov-2016 Marco Nelissen <marcone@google.com> Merge "Move IMediaLogService to libmedialogservice"
am: 12dc4449ee

Change-Id: I78dd9164b47538205fbed6fe04fafb8bbcc55009
66ded7d95b9a2885b9750966f0ebdaa5082bf83d 04-Nov-2016 Marco Nelissen <marcone@google.com> Merge "Remove unneeded links with dynamic libraries" am: 46d0a5b493 am: 4f197ec220
am: b3250b0b8a

Change-Id: Ic1e29e8d1e91ab34c3b7d5f7ad3e25c48a150888
4f197ec220d2c9634429692dd37896233273111d 04-Nov-2016 Marco Nelissen <marcone@google.com> Merge "Remove unneeded links with dynamic libraries"
am: 46d0a5b493

Change-Id: Ica6dd538c30b9aeccddad229cb24ade4d82d2e4c
2805f438e8ba6449d2e10af4bd82e724c8e54f5e 04-Nov-2016 Marco Nelissen <marcone@google.com> Merge "Split libmedia into libmedia and libaudioclient"
4b21bd2dac2727531aad1e74079b4d34077524a0 02-Nov-2016 Marco Nelissen <marcone@google.com> Move IMediaLogService to libmedialogservice

So audioserver and libmedialogservice don't have to link against libmedia

Test: build/boot
Change-Id: I4040d9f6db59807c3fa56321d45fb6ab50fb5edb
udioflinger/Android.mk
edialog/Android.mk
edialog/IMediaLogService.cpp
263506542fbe480ddb247597bdcef16c437b48dd 25-Oct-2016 Marco Nelissen <marcone@google.com> Remove unneeded links with dynamic libraries

Various media components were linking against dynamic libraries that weren't needed.

Test: built and booted

Change-Id: I7379506fd06d4e28e0eff0001fd073a2d3860f8e
udiopolicy/Android.mk
udiopolicy/enginedefault/Android.mk
amera/libcameraservice/Android.mk
ediadrm/Android.mk
adio/Android.mk
oundtrigger/Android.mk
538ec5e04f389cba637b030757be317fcb8677a8 02-Nov-2016 Marco Nelissen <marcone@google.com> Split libmedia into libmedia and libaudioclient

This makes it so audioserver doesn't need to link against the entire libmedia,
which has dependencies on camera, ICU, OpenGL and other things that aren't
needed for audio.

Test: build/boot

Change-Id: I99ba1a3dc3b33ca9b3abd98e7519dbf228ee62af
udioflinger/Android.mk
udiopolicy/Android.mk
adio/Android.mk
oundtrigger/Android.mk
267e07cd8432679bcdd72b0bdf38846446c1c4ed 04-Nov-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "sound trigger service: remove bogus threasdpool init in HIDL wrapper"
3ede21c823661704e8a8d48403094a2de0f831d3 04-Nov-2016 Eric Laurent <elaurent@google.com> sound trigger service: remove bogus threasdpool init in HIDL wrapper

Test: make

Change-Id: I3f1f21c106c7b7acdb852917f0c3e557da8a0d78
oundtrigger/SoundTriggerHalHidl.cpp
oundtrigger/SoundTriggerHalHidl.h
90e2eec58b0db7ee84e4596c723462b9910aa0aa 03-Nov-2016 Steven Moreland <smoreland@google.com> SoundTrigger: Remove unused include.

Test: compiles
Change-Id: I2537c09c31096ea39a130a37f9ea7979fe473c3c
oundtrigger/SoundTriggerHalHidl.cpp
e085c1072f017d4910f7e49741f72e8a722b8892 03-Nov-2016 Janis Danisevskis <jdanis@google.com> Fix build error when building with ENABLE_TREBLE=true

Fixes use of renamed header file hidl/IServiceManager.h

Test: builds with ENALBE_TREBLE=true
Change-Id: Ia1bdc04d6e23243a46b6a897cca29dd26899f79d
oundtrigger/SoundTriggerHalHidl.cpp
8ad947667b8460f87f71aecab7ac8c23c40f5350 02-Nov-2016 Marco Nelissen <marcone@google.com> Move IMediaLogService to libmedialogservice

So audioserver and libmedialogservice don't have to link against libmedia

Test: build/boot
Change-Id: I4040d9f6db59807c3fa56321d45fb6ab50fb5edb
udioflinger/Android.mk
edialog/Android.mk
edialog/IMediaLogService.cpp
59e450f2f51601259b787d202b7438f50c76bc0d 02-Nov-2016 Zhijun He <zhijunhe@google.com> Camera API1: don't pick wrong preview fps value am: 49aac43b4a am: 73952713b5 am: 341d2236fa
am: 3b5fa81889

Change-Id: I2d6d9a128623ebab42b023d45a57f48ad9d38fd2
3b5fa81889299181f3463504ddff9e091846e1ba 02-Nov-2016 Zhijun He <zhijunhe@google.com> Camera API1: don't pick wrong preview fps value am: 49aac43b4a am: 73952713b5
am: 341d2236fa

Change-Id: I504588f8f97a44c00725685a3808a312b98ca899
0578109154b7c41d2e0618145522d2660e0a7bf4 02-Nov-2016 Nick Kralevich <nnk@google.com> Merge "Revert "mediacodec/mediaextractor: allow multiple Seccomp extensions"" am: 712690b374 am: 68f9d0dc3b am: e40f36df56
am: 7b9bd40f14

Change-Id: I5471b7363060b98c8a247459006b9cc08af4708a
7b9bd40f14393bc586ed829ef1fefe0901899a1d 02-Nov-2016 Nick Kralevich <nnk@google.com> Merge "Revert "mediacodec/mediaextractor: allow multiple Seccomp extensions"" am: 712690b374 am: 68f9d0dc3b
am: e40f36df56

Change-Id: I59d070f30ddc7de75f6321ad1d26bc2198d42748
68f9d0dc3b25c69eecccc9487319dd3343f0790b 02-Nov-2016 Nick Kralevich <nnk@google.com> Merge "Revert "mediacodec/mediaextractor: allow multiple Seccomp extensions""
am: 712690b374

Change-Id: Ia9c56bdf0fa132ef07508a660c44c4560d20f967
5a5842ab6d1bcbededcb4d62350685b52a1f7317 02-Nov-2016 Nick Kralevich <nnk@google.com> Revert "mediacodec/mediaextractor: allow multiple Seccomp extensions"

Seeing the following build errors:

$ . ./build/envsetup.sh && lunch aosp_dragon-userdebug
$ m -j 50
...
Starting build with ninja
ninja: Entering directory `.'
ninja: error: 'device/google/dragon/seccomp/mediaextractor-seccomp.policy', needed by 'out/target/product/dragon/obj/ETC/mediaextractor-seccomp.policy_intermediates/mediaextractor-seccomp.policy', missing and no known rule to make it
make: *** [ninja_wrapper] Error 1
make: Leaving directory `/SDD/master'


This reverts commit 87a80ef1e391247beb08854efded9cf9a52b8a09.

Change-Id: I5d039845c69b18f3a7199458c5301314d006f43b
ediacodec/minijail/Android.mk
ediaextractor/minijail/Android.mk
49aac43b4a323a8702d93b7cf878252905dc3987 01-Nov-2016 Zhijun He <zhijunhe@google.com> Camera API1: don't pick wrong preview fps value

Bug: 32556975
Change-Id: I69eb18abe191ae0f1e76f8b62daaf5717cce9669
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
add8b129899fc8e16cf3a63ea080876980c2a08b 02-Nov-2016 Alex Naidis <alex.naidis@linux.com> Merge "mediacodec/mediaextractor: allow multiple Seccomp extensions" am: e119cfe384 am: b5f5ca9c27 am: 7f9eed98a0
am: dd4e264b82

Change-Id: Ib9e79b5ca043c4dfeeda101caf0e8fcbc1844991
dd4e264b82c80df503d4aa8024c5605fa78f32ef 02-Nov-2016 Alex Naidis <alex.naidis@linux.com> Merge "mediacodec/mediaextractor: allow multiple Seccomp extensions" am: e119cfe384 am: b5f5ca9c27
am: 7f9eed98a0

Change-Id: Iba40ac6fe43ec45c4e599c039cfb6a3cac043f88
b5f5ca9c278af7014d7779348b468604a853b96b 02-Nov-2016 Alex Naidis <alex.naidis@linux.com> Merge "mediacodec/mediaextractor: allow multiple Seccomp extensions"
am: e119cfe384

Change-Id: I3e72b83d44731fa77f7ce7d397e804a9a5c46982
85e6bdd2b2bfd146a1d07c6edb52be5961ed18ba 13-Oct-2016 Greg Hartman <ghartman@google.com> Adds nanosleep to x86 syscalls

BUG: 32122229
Change-Id: I99bc266f4d7ddaa89d414392698324e1e955f841
(cherry picked from commit 4eb4ed6408e8b54223708251c1da01b68a0e6635)
(cherry picked from commit 868d6e09a560404d33bd80a3b5e68d6deb3b41aa)
ediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-x86.policy
87a80ef1e391247beb08854efded9cf9a52b8a09 29-Oct-2016 Alex Naidis <alex.naidis@linux.com> mediacodec/mediaextractor: allow multiple Seccomp extensions

This is useful if we have multiple device
layers and want to have common extensions while
supporting device specific extensions at the same time.

Change-Id: Iefbff9c1ec680963a7ea4c2db09d8e888dd87702
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
ediacodec/minijail/Android.mk
ediaextractor/minijail/Android.mk
51db74d1ab1366205e39c52ba3273a6cadab830a 01-Nov-2016 Zhijun He <zhijunhe@google.com> Camera API1: relax the fps check with some margin am: 84eb96049c am: b6d50049c7 am: aebb26a330
am: 36edfc5a6c

Change-Id: I3fe8e31d3a10833c8e40951ca1b3408002642586
36edfc5a6ce2257b8e6c50ea697319bdaccad1f5 01-Nov-2016 Zhijun He <zhijunhe@google.com> Camera API1: relax the fps check with some margin am: 84eb96049c am: b6d50049c7
am: aebb26a330

Change-Id: I1724e2690a8fe3b12887333cf5f3da84db7ac6fa
84eb96049ce0690334530ad916e22d6933c0223b 31-Oct-2016 Zhijun He <zhijunhe@google.com> Camera API1: relax the fps check with some margin

Some HALs may advertise slightly larger min frame durations, which
makes the supported fps check fail. Then, some supported fps range
may be missing in the supported preview fps range list.

Bug: 32544699
Change-Id: I1ed62b97d3d39e5d7f0e7c407c6cc482b8968373
amera/libcameraservice/api1/client2/Parameters.cpp
d72ffc4416959d2c94838888c781468b2351716d 28-Oct-2016 Wei Jia <wjia@google.com> Merge "BatteryNotifier: attribute battery usage of video to correct uid."
f2ae3e19080938db8cbf29a963fd744a3964fcc2 28-Oct-2016 Wei Jia <wjia@google.com> BatteryNotifier: attribute battery usage of video to correct uid.

Test: manual check batterystats
Bug: 32361950
Change-Id: Id052220e87f6667ca908d5bf6be6164dc8c14c53
udioflinger/Threads.cpp
c3e2c629e8d998cc44be7a759daa855f74a558b3 27-Oct-2016 Ricardo Garcia <rago@google.com> Merge "Buffer Log functionality for AudioFlinger"
7a987ecdab7e87f916fef28bf991a6183020f1b4 27-Oct-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove unneeded links with dynamic libraries"
306162c7bf122ea915d4c3e39044478cd9944258 27-Oct-2016 Eric Laurent <elaurent@google.com> Merge "broadcast radio: add wrapper over HAL implementation"
b3153c295c4f4831a6c6c5512ec6b769f85f4d73 27-Oct-2016 Eric Laurent <elaurent@google.com> Merge "radio: fix 64 bit process compatibility"
3bd1c87ac0d767566f5da387e90b8a3cd86ecc97 26-Sep-2016 rago <rago@google.com> Buffer Log functionality for AudioFlinger

Similar to ALOGV, this allows to capture to file audio samples from
within audioservice for debuggin purposes.

Test: manual. Mostly used for debugging
Change-Id: I4d43f573926805a27be910e343476c3f1be51579
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/BufLog.cpp
udioflinger/BufLog.h
7405dc62bbec9eed2384325db40ed95277217fa3 27-Oct-2016 Zhijun He <zhijunhe@google.com> Camera API1: filter out the unsupported preview fps range am: 4f5dc7799f am: c4bea30beb am: 34b27bc05f
am: 2e6d8d607f

Change-Id: I589c96f88b30dd062e922f3f086dd7dc6e8214a5
2e6d8d607fb3bd38d87fb7c1274680bbc4424398 27-Oct-2016 Zhijun He <zhijunhe@google.com> Camera API1: filter out the unsupported preview fps range am: 4f5dc7799f am: c4bea30beb
am: 34b27bc05f

Change-Id: I0593a3e694e6f8fa41b396cfbaaf4c7a4893ce7a
01d267e3a78e1fa78d27f6d3e745914a5ac56ffa 21-Oct-2016 Eric Laurent <elaurent@google.com> broadcast radio: add wrapper over HAL implementation

Add radio HAL wrapper in radio service to prepare migration to HIDL.

Bug: 31973526
Change-Id: I93fc6f00a2211f7ca425be73090f12b2855c9641
adio/Android.mk
adio/RadioHalLegacy.cpp
adio/RadioHalLegacy.h
adio/RadioInterface.h
adio/RadioService.cpp
adio/RadioService.h
adio/TunerCallbackInterface.h
adio/TunerInterface.h
4f5dc7799f082d77e399d8beee7b017a02755cf6 26-Oct-2016 Zhijun He <zhijunhe@google.com> Camera API1: filter out the unsupported preview fps range

The advertised supported preview fps ranges need to be supported
by all preview sizes. This change does the check to make sure the
API1 doesn't over-advertise its capability.

Bug: 32360340
Change-Id: Iccd13967305f1d0a62b89da87070591bfb973bbf
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
aebf5fbc6978ba6791690696e22a277be7eefa9b 25-Oct-2016 Eric Laurent <elaurent@google.com> radio: fix 64 bit process compatibility

Fix binder call implementations and shared memory layout to make sure
that structures containig a pointer to metadata buffer are passed
correctly between 32 bit and 64 bit processes.

Change-Id: Ibecf260555225e0764411f62b60831511cb68278
adio/RadioService.cpp
c661ae6165338fd5f0bca50a63058b4bcd6def4b 25-Oct-2016 Marco Nelissen <marcone@google.com> Remove unneeded links with dynamic libraries

Various media components were linking against dynamic libraries that weren't needed.

Test: built and booted

Change-Id: I7379506fd06d4e28e0eff0001fd073a2d3860f8e
udiopolicy/Android.mk
udiopolicy/enginedefault/Android.mk
amera/libcameraservice/Android.mk
ediadrm/Android.mk
adio/Android.mk
oundtrigger/Android.mk
bf2e61f54c7dcc37c97b4908c9ed6871cf3d2b49 24-Oct-2016 Glenn Kasten <gkasten@google.com> Merge "Use audio_patch_handle_t in startAudioSource() and stopAudioSource()"
1e4d737fcd3129f3b3cf29499f344b42219c6bc7 21-Oct-2016 Eric Laurent <elaurent@google.com> Merge changes from topic 'sound_trigger_hidl'

* changes:
audioserver: restart audio hal service on restart
Add support for treble sound trigger HAL
f7854d45bd12d5239c588767bf85953aca46b4ef 15-Oct-2016 Eric Laurent <elaurent@google.com> audioserver: restart audio hal service on restart

Also update to use common audio uuid type definition.

Bug: 32022304
Change-Id: I25ceb48af1446862d36b3be9d17c1f081b2cf1c7
oundtrigger/SoundTriggerHalHidl.cpp
oundtrigger/SoundTriggerHalHidl.h
7a544b44b7872b300f50e16fef480f76e9145fbb 06-Aug-2016 Eric Laurent <elaurent@google.com> Add support for treble sound trigger HAL

First implementation of Treble HAL in sound trigger hardware service.

If ENABLE_TREBLE build option is true, the treble HAL and HW
sevice is used. Otherwise the legacy HW module is loaded.

Bug: 30222631

Change-Id: Ibe5be680b7b7a3b261dd62913869e0bb412f438b
oundtrigger/Android.mk
oundtrigger/SoundTriggerHalHidl.cpp
oundtrigger/SoundTriggerHalHidl.h
oundtrigger/SoundTriggerHalInterface.h
oundtrigger/SoundTriggerHalLegacy.cpp
oundtrigger/SoundTriggerHalLegacy.h
oundtrigger/SoundTriggerHwService.cpp
oundtrigger/SoundTriggerHwService.h
c50e04a50c9598ac9ecc684b39fa3dc286a00caf 20-Oct-2016 Shuzhen Wang <shuzhenwang@google.com> Merge "Camera2: Add onCaptureQueueEmpty callback"
e8779bbfcb37d20b6a9f01b308b7d865e6f16b9c 21-Sep-2016 Andy Hung <hunga@google.com> Add logging of written frame counts

Bug: 31591209
Change-Id: Ife5917aa65b02c3b0791dfe1975c70ccf58f9a75
(cherry picked from commit 2c45393d842a5d2968ef78fa7a08667efdf15f2a)
udioflinger/FastMixer.cpp
udioflinger/FastMixerDumpState.cpp
udioflinger/FastMixerDumpState.h
udioflinger/Threads.cpp
1293298058251ba1e8b11a450e19012046bb61ad 28-Jul-2016 Andy Hung <hunga@google.com> AudioFlinger: Account for frames dropped in suspend mode

These frames must be added to the kernel position in timestamps.

Bug: 30025777
Change-Id: I30c14503c9467059c3782e5c96c01ae1cf3709f6
(cherry picked from commit 238fa3deff26d7e4d9e81bd0a88c936f16226c4e)
udioflinger/Threads.cpp
udioflinger/Threads.h
559d439c6fe8679e3c52f1cf265d46d7d2e65b68 29-Mar-2016 Glenn Kasten <gkasten@google.com> Use audio_patch_handle_t in startAudioSource() and stopAudioSource()

Bug: 27903060
Change-Id: Iafc2095f484b74978c6f080c54f548e293bf945e
udiopolicy/AudioPolicyInterface.h
udiopolicy/common/managerdefinitions/include/AudioSourceDescriptor.h
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
udiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/service/AudioPolicyService.h
9ee0540d3a61bff03d561ca431a371c3d9335d2b 14-Oct-2016 Mikhail Naganov <mnaganov@google.com> Remove last references to hardware/audio.h

DeviceHalInterface transitioned to "capabilities" model
(similar to the one already used by streams, e.g. 'supportsDrain').
No direct checking of the HAL version is needed.

AudioPolicy uses its own version read from the configuration,
and these values never checked against the actual HAL version,
thus it does not need versions and macroses from hardware/*.

Test: make & run on N6P
Change-Id: Ic4a56bfa19a9a61edac2b9f9a163fd8f63a0ff87
udioflinger/AudioFlinger.cpp
udioflinger/AudioHwDevice.cpp
udioflinger/AudioHwDevice.h
udioflinger/PatchPanel.cpp
udioflinger/Threads.cpp
udiopolicy/common/managerdefinitions/include/AudioPort.h
udiopolicy/common/managerdefinitions/include/HwModule.h
udiopolicy/common/managerdefinitions/src/AudioPort.cpp
udiopolicy/common/managerdefinitions/src/ConfigParsingUtils.cpp
udiopolicy/common/managerdefinitions/src/HwModule.cpp
udiopolicy/common/managerdefinitions/src/Serializer.cpp
udiopolicy/enginedefault/src/Engine.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
e7e8d636b486cf49487db1d8da5e8e7cb15d9549 18-Oct-2016 Mikhail Naganov <mnaganov@google.com> Merge "Move audio_effects_conf.h to system/audio_effects"
65fb65678345f03f38771523b7020f6777eff5c4 18-Oct-2016 Mikhail Naganov <mnaganov@google.com> Merge "Brush up audio parameters usage"
c2f710f89ec1a3ea8e448bfafcc02b03529cc681 18-Oct-2016 Mikhail Naganov <mnaganov@google.com> Move audio_effects_conf.h to system/audio_effects

This file is not really related to HAL.

Change-Id: Ie584266c708cebac651997c8086032b4cc25832b
Test: make
udiopolicy/Android.mk
udiopolicy/service/AudioPolicyEffects.cpp
9a79c8f84a6de3b942c6b0a347aece7ecb7daed5 18-Oct-2016 Glenn Kasten <gkasten@google.com> Merge "Remove executable bit from ordinary files"
388360c786cdcbec650b79db65c734b8952dfec0 18-Oct-2016 Mikhail Naganov <mnaganov@google.com> Brush up audio parameters usage

It is preferred to use the constants from AudioParameter
(which can now serve as an abstraction layer similar to libaudiohal).

Grepped for usages of defines and just string values
and replaced with references to AudioParameter.

Since the parameter definitions are being moved to system/audio.h,
update includes in AudioParemeter and stagefright Utils.

Change-Id: I2addb983707d866b16f39d45d0e14b802595e292
Test: make
udiopolicy/common/managerdefinitions/include/TypeConverter.h
udiopolicy/common/managerdefinitions/src/ConfigParsingUtils.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
e7557336920ca7e7d53e8ccc03d23359b41957af 18-Oct-2016 Glenn Kasten <gkasten@google.com> Remove executable bit from ordinary files

Test: builds OK
Change-Id: I7912c9c9c85dc500d33698fc174ba2a0db387407
udiopolicy/common/include/Volume.h
udiopolicy/common/include/policy.h
udiopolicy/engine/interface/AudioPolicyManagerInterface.h
udiopolicy/engine/interface/AudioPolicyManagerObserver.h
udiopolicy/engineconfigurable/Android.mk
udiopolicy/engineconfigurable/include/AudioPolicyEngineInstance.h
udiopolicy/engineconfigurable/include/EngineDefinition.h
udiopolicy/engineconfigurable/interface/AudioPolicyPluginInterface.h
udiopolicy/engineconfigurable/parameter-framework/examples/ParameterFrameworkConfigurationPolicy.xml.in
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/strategy_for_stream.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Structure/PolicyClass.xml
udiopolicy/engineconfigurable/parameter-framework/examples/Structure/PolicySubsystem-CommonTypes.xml
udiopolicy/engineconfigurable/parameter-framework/examples/Structure/PolicySubsystem.xml
udiopolicy/engineconfigurable/parameter-framework/examples/policy_criteria.txt
udiopolicy/engineconfigurable/parameter-framework/plugin/Android.mk
udiopolicy/engineconfigurable/parameter-framework/plugin/InputSource.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/InputSource.h
udiopolicy/engineconfigurable/parameter-framework/plugin/PolicyMappingKeys.h
udiopolicy/engineconfigurable/parameter-framework/plugin/PolicySubsystem.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/PolicySubsystem.h
udiopolicy/engineconfigurable/parameter-framework/plugin/PolicySubsystemBuilder.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/Strategy.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/Strategy.h
udiopolicy/engineconfigurable/parameter-framework/plugin/Stream.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/Stream.h
udiopolicy/engineconfigurable/parameter-framework/plugin/Usage.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/Usage.h
udiopolicy/engineconfigurable/src/Collection.h
udiopolicy/engineconfigurable/src/Element.h
udiopolicy/engineconfigurable/src/Engine.cpp
udiopolicy/engineconfigurable/src/Engine.h
udiopolicy/engineconfigurable/src/EngineInstance.cpp
udiopolicy/engineconfigurable/src/InputSource.cpp
udiopolicy/engineconfigurable/src/InputSource.h
udiopolicy/engineconfigurable/src/Strategy.cpp
udiopolicy/engineconfigurable/src/Strategy.h
udiopolicy/engineconfigurable/src/Stream.cpp
udiopolicy/engineconfigurable/src/Stream.h
udiopolicy/engineconfigurable/src/Usage.cpp
udiopolicy/engineconfigurable/src/Usage.h
udiopolicy/engineconfigurable/wrapper/ParameterManagerWrapper.cpp
udiopolicy/engineconfigurable/wrapper/audio_policy_criteria_conf.h
udiopolicy/engineconfigurable/wrapper/config/audio_policy_criteria.conf
udiopolicy/engineconfigurable/wrapper/include/ParameterManagerWrapper.h
udiopolicy/enginedefault/Android.mk
udiopolicy/enginedefault/include/AudioPolicyEngineInstance.h
udiopolicy/enginedefault/src/Engine.cpp
udiopolicy/enginedefault/src/Engine.h
udiopolicy/enginedefault/src/EngineInstance.cpp
9d06601e54848f076b7472a376c672215cd70c46 30-Sep-2016 Shuzhen Wang <shuzhenwang@google.com> Camera2: Add onCaptureQueueEmpty callback

onCaptureQueueEmpty is called when the non-repeating request queue in
cameraservice becomes empty. Application can use this callback as a
trigger for a new request.

Test: testMultipleCapture in PerformanceTest.java

Bug: 29006447
Change-Id: Id21afd74381e0b70f924c6026025c91a8ffd5ee0
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
amera/libcameraservice/common/Camera2ClientBase.cpp
amera/libcameraservice/common/Camera2ClientBase.h
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
9fe94012187a29eeeca2c74e75f121192560fba0 14-Oct-2016 Mikhail Naganov <mnaganov@google.com> Split audio effects headers

There can be different use cases with the code that imports
headers from audio_effects (each subsequent case is a more
specialized version of the previous one):

1. The code only needs access to general structures
like effect_descriptor_t:
==> include system/audio_effect.h
Example: AudioSystem in libmedia

2. The code that needs access to effect UUID and parameter
enums:
==> include system/audio_effects/effect_foo.h
Examples: media framework effects interfaces, libwilhelm

3. The code that needs to call into HAL:
==> include hardware/audio_effect.h
Examples: libaudiohal (implementation part) and libeffects

4. The code that implements a particular effect:
==> include audio_effects/effect_foo.h
Examples: cts/.../CTSTestEffect.cpp
stuff in hardware/, vendor/

Note that AudioPolicy still deals with the effects HAL directly,
this needs to be fixed.

Change-Id: I963335ede6a196f9225caf21e1a01d03635e363c
Test: make
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/BufferProviders.cpp
udioflinger/Effects.cpp
udioflinger/Threads.cpp
udioflinger/tests/Android.mk
61a4fac2e3ec271241e3a4f405d7357b7f6ca4c2 13-Oct-2016 Mikhail Naganov <mnaganov@google.com> Remove dependencies on hardware/audio_policy.h

Most of the time it's not needed, may be needed when
USE_LEGACY_AUDIO_POLICY is enabled.

Test: make

Change-Id: Id25eafc05352f07614965913d367d484f2673fbd
udioflinger/AudioFlinger.h
udiopolicy/AudioPolicyInterface.h
udiopolicy/service/AudioPolicyService.cpp
udiopolicy/service/AudioPolicyService.h
00260b5e6996b0a4b12f71c5b84e44adea040534 13-Oct-2016 Mikhail Naganov <mnaganov@google.com> Remove dependencies on hardware/audio_effects.h and EffectsFactoryApi.h

Also remove some outstanding dependencies on hardware/audio.h.

Most of the time, only constants and structs from audio_effects.h
are used, and no actual calls into HAL are made. Move these
definitions into system/audio_effect.h, and generate constants
from TREBLE HAL definition.

For parameters, always use values from AudioParameter class.

There are still some outstanding includes of hardware/audio.h
in code that directly deals with audio modules. Need to extend
libaudiohal interfaces to support required functionality.

Test: make

Change-Id: I0bcdf8ae199485d4d65f3eeb7e7a3b9b5cdb6ab6
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.h
udioflinger/BufferProviders.h
udioflinger/PatchPanel.cpp
udioflinger/Threads.cpp
udiopolicy/common/managerdefinitions/include/EffectDescriptor.h
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/service/AudioPolicyClientImplLegacy.cpp
udiopolicy/service/AudioPolicyEffects.cpp
udiopolicy/service/AudioPolicyEffects.h
udiopolicy/service/AudioPolicyService.cpp
473de569eed6438ee3eea955efe309900122f051 12-Oct-2016 Andy Hung <hunga@google.com> AudioFlinger: Improve effect compatibility with RAW and FAST am: d3bb0adfe4 am: 4a7ef5c1d7
am: 5bc5b90bbe

Change-Id: I681d68a632a527983972df160ba5dab1c50967cc
5bc5b90bbe3eae27c6de5a556eda531d4430dfab 12-Oct-2016 Andy Hung <hunga@google.com> AudioFlinger: Improve effect compatibility with RAW and FAST am: d3bb0adfe4
am: 4a7ef5c1d7

Change-Id: Ia7d516d957b0582ec6776d4306019e6f2dfc10c0
d3bb0adfe40e60bb94e9a87e8d5bffb4ea6863b0 12-Oct-2016 Andy Hung <hunga@google.com> AudioFlinger: Improve effect compatibility with RAW and FAST

Effects without process function now are allowed with RAW
and FAST playback and record tracks.

Bug: 32053844
Change-Id: I58064eb2c357043c2da1a781a20988f42570d97e
udioflinger/Effects.cpp
udioflinger/Effects.h
udioflinger/Threads.cpp
cbc8f617c1aebef5d041fa40dcd38a5466690b99 12-Oct-2016 Mikhail Naganov <mnaganov@google.com> Eliminate dependencies on hardware/audio.h (trivial cases)

frameworks/av must not depend on hardware/ (except for the code
from libaudiohal that actually calls into HAL).

This CL deals with simple cases where depending on system/audio.h
is enough.

Change-Id: Ia2cb66cc8c92316ce5ab884a008d5e531263c2e4
Test: make
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioHwDevice.cpp
udioflinger/AudioHwDevice.h
udioflinger/AudioStreamOut.cpp
udioflinger/SpdifStreamOut.cpp
udioflinger/Threads.cpp
udiopolicy/common/managerdefinitions/include/AudioPolicyMix.h
udiopolicy/common/managerdefinitions/include/StreamDescriptor.h
udiopolicy/common/managerdefinitions/include/VolumeCurve.h
udiopolicy/common/managerdefinitions/src/ConfigParsingUtils.cpp
udiopolicy/common/managerdefinitions/src/HwModule.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
5f5ee1110dd85001b43db7637a97474acfe8d681 16-Aug-2016 Glenn Kasten <gkasten@google.com> LOCAL_CLANG := true is now the default

Test: verify that build has no failures
Change-Id: Ib249b276c6295e55eb54fa37b6d15486415dfbed
ediadrm/tests/Android.mk
ediaresourcemanager/Android.mk
ediaresourcemanager/test/Android.mk
f7c50104b07091880019f4ecc70d977961148268 01-Oct-2016 Eric Laurent <elaurent@google.com> resolve merge conflicts of a3de77f to master

Change-Id: Idb3346465ee7f47d95fd24e2dafdd66f3759c1be
a3de77f1a7c994cdf53d10889d78d69c36fc85f3 30-Sep-2016 Eric Laurent <elaurent@google.com> audio policy: fix capture indication to sound trigger service. am: 271a93e924
am: 9080e17911

Change-Id: I2131473eb29d7896cad0d1459807214d89b0d754
271a93e924f46ccaf3f76a8fc38685afea40d3ee 29-Sep-2016 Eric Laurent <elaurent@google.com> audio policy: fix capture indication to sound trigger service.

Only indicate active capture to sound trigger service
when capturing from primay HW module.

Bug: 31826453
Bug: 31771879
Change-Id: Idf92393d3e7dbf926b847ab23f670e7ab5dd5248
udiopolicy/common/managerdefinitions/include/AudioInputDescriptor.h
udiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
ee4b2c9b3f63ed8a7acb7c6bba68dcd40b77bf8d 29-Sep-2016 Eric Laurent <elaurent@google.com> audio policy: fix media volume after ringtone am: 57de36ccd1 am: f3ef8248a7
am: 809acee9e2

Change-Id: I69beb8361d17fb215cf1d3d04faa97b25e78d371
809acee9e27acd2ce69b3f8324b30a96782d0444 29-Sep-2016 Eric Laurent <elaurent@google.com> audio policy: fix media volume after ringtone am: 57de36ccd1
am: f3ef8248a7

Change-Id: I7893c08978caf6ada73b5449ec3e1bcead96f9c1
f3ef8248a7b1419d52fcdb23ac07df3781a2db6e 29-Sep-2016 Eric Laurent <elaurent@google.com> audio policy: fix media volume after ringtone
am: 57de36ccd1

Change-Id: I369d267393605f461c3527ffa0a737a82a587eae
429a052c35e3cca601889b12dd34edbd61eda61d 29-Sep-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix media volume after ringtone" into nyc-mr1-dev
57de36ccd1f524d602d267884bdcfae8559a6e6a 29-Sep-2016 Eric Laurent <elaurent@google.com> audio policy: fix media volume after ringtone

Fix regression introduced by commit 11c499a5 causing
music volume not to be restored after ringtone playback
over duplicated output (speaker + A2DP).

Bug: 31539910

Change-Id: I1c4eebea1f1a8f82ae2acfeecb9a61c437a74e25
udiopolicy/managerdefault/AudioPolicyManager.cpp
a0c91339814f37ea78365afb436c9f3d1f0a0090 19-Sep-2016 Mikhail Naganov <mnaganov@google.com> Update NBAIO to use the new audio HAL abstraction layer

Moved the HAL access abstraction layer to a separate library so it
can be used both by audioflinger and libnbaio.

Bug: 30222631
Test: manual with Loopback app, Hangouts, YouTube

Change-Id: Id622c2f1aa8f55a775d34f369a596c2c4d29d5be
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioHwDevice.h
udioflinger/AudioStreamOut.cpp
udioflinger/BufferProviders.cpp
udioflinger/DeviceHalInterface.h
udioflinger/DeviceHalLocal.cpp
udioflinger/DeviceHalLocal.h
udioflinger/DevicesFactoryHalInterface.h
udioflinger/DevicesFactoryHalLocal.cpp
udioflinger/DevicesFactoryHalLocal.h
udioflinger/EffectHalInterface.h
udioflinger/EffectHalLocal.cpp
udioflinger/EffectHalLocal.h
udioflinger/Effects.cpp
udioflinger/EffectsFactoryHalInterface.h
udioflinger/EffectsFactoryHalLocal.cpp
udioflinger/EffectsFactoryHalLocal.h
udioflinger/StreamHalInterface.h
udioflinger/StreamHalLocal.cpp
udioflinger/StreamHalLocal.h
udioflinger/Threads.cpp
udioflinger/tests/Android.mk
711ee66377eb053cd7a3467ca519239ebb7bf300 25-Sep-2016 Eric Laurent <elaurent@google.com> audioflinger: limit max number of tracks per client am: ad7dd9610b am: 6cfa8fdc9f
am: 5c24d28bfc

Change-Id: I3653bed5e0a0ef1476aa4409b256a8a81c6bc3fa
5c24d28bfc72423ff5bb6de3d46fe4747d9b64b1 23-Sep-2016 Eric Laurent <elaurent@google.com> audioflinger: limit max number of tracks per client am: ad7dd9610b
am: 6cfa8fdc9f

Change-Id: I1952387cd010a11ce9512a8b56a363cc4bb7a078
6cfa8fdc9f28dabe98c44e7317330f06f7a88813 23-Sep-2016 Eric Laurent <elaurent@google.com> audioflinger: limit max number of tracks per client
am: ad7dd9610b

Change-Id: I0dd67dfc1324cd4969561370faf105bcf7286949
7bafda7a153cda393ce018241fa7304845225ae5 23-Sep-2016 Eric Laurent <elaurent@google.com> Merge "audioflinger: limit max number of tracks per client" into nyc-mr1-dev
39ed2aa31b0c6c8e485660c2aedff74f10d14411 23-Sep-2016 Andy Hung <hunga@google.com> Add logging of written frame counts am: 2c45393d84
am: 6353f121d7

Change-Id: I3f569f4587c09f9f3f85d2466a3c742e2720b529
ad7dd9610b6fafa81baf69607f4ac669da88182a 22-Sep-2016 Eric Laurent <elaurent@google.com> audioflinger: limit max number of tracks per client

Limit max number of audio tracks for a given application to
limit the chance of denial of service by misbehaving apps
not releasing tracks.

Bug: 7007023
Change-Id: Id7ac37450aabdbeaa5f83cb6e4b2a2b0c749f99c
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
b54c854d1ef1bb66e093c94099f915178eac570e 21-Sep-2016 Andy Hung <hunga@google.com> Add logging of written frame counts

Bug: 31591209
Change-Id: Ife5917aa65b02c3b0791dfe1975c70ccf58f9a75
(cherry picked from commit 2c45393d842a5d2968ef78fa7a08667efdf15f2a)
udioflinger/FastMixer.cpp
udioflinger/FastMixerDumpState.cpp
udioflinger/FastMixerDumpState.h
udioflinger/Threads.cpp
2c45393d842a5d2968ef78fa7a08667efdf15f2a 21-Sep-2016 Andy Hung <hunga@google.com> Add logging of written frame counts

Bug: 31591209
Change-Id: Ife5917aa65b02c3b0791dfe1975c70ccf58f9a75
udioflinger/FastMixer.cpp
udioflinger/FastMixerDumpState.cpp
udioflinger/FastMixerDumpState.h
udioflinger/Threads.cpp
b5ae35c5cf5cc7176661eea9bf725437c85693b0 22-Sep-2016 Mikhail Naganov <mnaganov@google.com> Merge "Abstract away access to audio streams HAL in AudioFlinger"
1dc98674f701dada94143b4d31b7221c58346c6c 19-Aug-2016 Mikhail Naganov <mnaganov@google.com> Abstract away access to audio streams HAL in AudioFlinger

In this CL all direct access to audio_stream_t, audio_stream_out_t, and
audio_stream_in_t their functions is encapsulated within the new
hierarchy of Stream[In|Out]HalLocal classes. AudioFlinger uses
interface classes Stream[In|Out]HalInterface to access these functions.

Note that NBAIO still receives raw HAL stream handles and needs to be
converted separately.

Bug: 30222631
Test: manual with Loopback app

Change-Id: I6388cfa2006791c9c0aa7bb186719209726a2d48
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioStreamOut.cpp
udioflinger/AudioStreamOut.h
udioflinger/BufferProviders.cpp
udioflinger/DeviceHalInterface.h
udioflinger/DeviceHalLocal.cpp
udioflinger/DeviceHalLocal.h
udioflinger/EffectHalInterface.h
udioflinger/EffectHalLocal.h
udioflinger/Effects.cpp
udioflinger/EffectsFactoryHalInterface.h
udioflinger/EffectsFactoryHalLocal.h
udioflinger/SpdifStreamOut.cpp
udioflinger/SpdifStreamOut.h
udioflinger/StreamHalInterface.h
udioflinger/StreamHalLocal.cpp
udioflinger/StreamHalLocal.h
udioflinger/Threads.cpp
udioflinger/Threads.h
7c9c33abb1ad874a277b17ceab91464966754926 21-Sep-2016 Eric Laurent <elaurent@google.com> AudioPolicyManager: fix setStreamVolumeIndex(). am: e76f29cbde am: fa94796ebb
am: 47406b6470

Change-Id: I2692aa7dc3dc206ba6aa6d30bc0064699059dad0
47406b64704137703f3d0ebe304a7286153d435a 21-Sep-2016 Eric Laurent <elaurent@google.com> AudioPolicyManager: fix setStreamVolumeIndex(). am: e76f29cbde
am: fa94796ebb

Change-Id: I15e9ff87ddd180eb6d5c3fc9dcdd3bd2be92d55f
fa94796ebba3d4813364c4b22a441d8544dce6c6 21-Sep-2016 Eric Laurent <elaurent@google.com> AudioPolicyManager: fix setStreamVolumeIndex().
am: e76f29cbde

Change-Id: I6eb6dbbea93321f366bea7fa39925bcac03225c2
3b0515db3405df2e759984aff7ac59aed0b16a98 21-Sep-2016 Eric Laurent <elaurent@google.com> Merge "AudioPolicyManager: fix setStreamVolumeIndex()." into nyc-mr1-dev
d7ccb844c7bd17b19fe40f9f59a303e462b6d552 20-Sep-2016 Tobias Melin <tobias.melin@sonymobile.com> Merge "Fix build when #define LOG_NDEBUG 0" am: 1b4c5978d1 am: 5a21680173 am: 2a20c4c33d
am: a6c2a013cf

Change-Id: Ib30efedd2d739cf6c7ae3964d6109f3a256e0deb
a6c2a013cf190c2cfbc8332e90178ff8bd0b8068 20-Sep-2016 Tobias Melin <tobias.melin@sonymobile.com> Merge "Fix build when #define LOG_NDEBUG 0" am: 1b4c5978d1 am: 5a21680173
am: 2a20c4c33d

Change-Id: Iced1a1c1914d30b9321ebc03eb1bb922bf51f7eb
2a20c4c33d925d435c420c5c5c5cce07f821a500 20-Sep-2016 Tobias Melin <tobias.melin@sonymobile.com> Merge "Fix build when #define LOG_NDEBUG 0" am: 1b4c5978d1
am: 5a21680173

Change-Id: I6e5f9e8f156e180b877e085ea061e59fbe51dc12
4348921d6168f301e28069478956ddaa7ef06f8b 16-Sep-2016 Tobias Melin <tobias.melin@sonymobile.com> Fix build when #define LOG_NDEBUG 0

A few variables have changed type and when building with LOG_NDEBUG 0
the code no longer compile. Adjust the ALOG_ASSERT strings to use the
correct types.

Test: make with LOG_NDEBUG enabled
Bug: 31584070
Change-Id: Ib47f369f8be9fa0c12fa4f69c294a719df8ad018
udioflinger/AudioResamplerDyn.cpp
db0fd69d5dd2cb70009884458d5c78c9e7256c15 16-Sep-2016 Eric Laurent <elaurent@google.com> Merge commit '77b44035440f4dfc1c8d29da7d800f111ebe6376' into fix_merge

Change-Id: I0f1d2b605a8d90f86f8fa27cbf971018981c6c38
e76f29cbde016e2a5e76e308f946644adae10a17 15-Sep-2016 Eric Laurent <elaurent@google.com> AudioPolicyManager: fix setStreamVolumeIndex().

Fix bug in setStreamVolumeIndex causing default volume not
being applied on active streams.

Bug: 31489345

Change-Id: I7d54ab63a7473b211c26c28099fbe8d9440fced3
udiopolicy/managerdefault/AudioPolicyManager.cpp
77b44035440f4dfc1c8d29da7d800f111ebe6376 16-Sep-2016 Eric Laurent <elaurent@google.com> audio flinger: add support for effects without process function am: 6dd0fd92d6
am: 79c3335e35

Change-Id: I719e0379c19d6e0e4e50597726f83b3a1d0b3cd8
79c3335e35ce7dea158ac8bf03922c843987f5a9 16-Sep-2016 Eric Laurent <elaurent@google.com> audio flinger: add support for effects without process function
am: 6dd0fd92d6

Change-Id: Ie73c96d5844522b4f250293ff8ef9252405180b3
bcaa1b278aa398fca187d6f388412935ede5e890 16-Sep-2016 Eric Laurent <elaurent@google.com> Merge "audio flinger: add support for effects without process function" into nyc-mr1-dev
681caefc7d3db69952daf1536513070c50b99635 16-Sep-2016 Elliott Hughes <enh@google.com> Merge "Stop including libcore/include/ in frameworks/av." am: adc9ba6520 am: c75164b942 am: 16fbb20e73
am: b58c4e1bbd

Change-Id: Iaf5158ff00eac7f4aff21eb7c3c31d62ec92ee33
b58c4e1bbd4e2420614e1bfe13f885e502301b63 16-Sep-2016 Elliott Hughes <enh@google.com> Merge "Stop including libcore/include/ in frameworks/av." am: adc9ba6520 am: c75164b942
am: 16fbb20e73

Change-Id: I751944e050b849e18c78857f64134ba54d0978eb
16fbb20e739eba747c1d478a4bbcae47c7d7a421 16-Sep-2016 Elliott Hughes <enh@google.com> Merge "Stop including libcore/include/ in frameworks/av." am: adc9ba6520
am: c75164b942

Change-Id: I93f9b2360e4bc50b9596cb02749d753ac282c3e5
6dd0fd92d6cdeb2cf5b7127c0e880e5eacfd4574 15-Sep-2016 Eric Laurent <elaurent@google.com> audio flinger: add support for effects without process function

Add support for effects indicating they do not implement a process
function and do not consume CPU or add latency.

Enable those effects on RAW and FAST outputs and inputs.
Do not call the process function.

Bug: 31491112.
Change-Id: If020c8bb3b180568dec5138b087edec8c2524182
udioflinger/Effects.cpp
udioflinger/Effects.h
udioflinger/Threads.cpp
fb78341ae3a11b4c0356b393b6163f3e1258d7be 15-Sep-2016 Elliott Hughes <enh@google.com> Stop including libcore/include/ in frameworks/av.

Change-Id: I7c0ffa84071c2080b5bfe2ce9ad7e1822fe863c7
udioflinger/Android.mk
8e1d94daf47a3b2b9358c82b26590cc995233681 15-Sep-2016 Jean-Michel Trivi <jmtrivi@google.com> Address the concurrency of accessibility and ringtone am: 3d8b4a450b am: 7eaff48959
am: 4c455ebfe6

Change-Id: Ice70f9e97a19fef9960c6660095f6bf4b438766c
4c455ebfe643dbe1e5fbccd68f7e3ad48841d58a 15-Sep-2016 Jean-Michel Trivi <jmtrivi@google.com> Address the concurrency of accessibility and ringtone am: 3d8b4a450b
am: 7eaff48959

Change-Id: Ie26f87a6e62b9b2bf7368afad8c4a5b14722186d
3d8b4a450b451183b4eaba321b594df4a4ae9948 15-Sep-2016 Jean-Michel Trivi <jmtrivi@google.com> Address the concurrency of accessibility and ringtone

Use ringtone level -4dB for accessibility when an accessibility
prompt is played while the ringtone is playing, and the
accessibility level is lower than the ringtone level.

Bug 30754235

Change-Id: I5f044c3bddabca45528292846a378be13d73ff6c
udiopolicy/managerdefault/AudioPolicyManager.cpp
1f12a380bef8aa162dec458cc7849e886815aeaa 14-Sep-2016 Mikhail Naganov <mnaganov@google.com> Merge "Fix RecordThread running too often if fast capture is active"
3366b888d878e25b5ab335d6e658a31fe38ab7a9 14-Sep-2016 Mikhail Naganov <mnaganov@google.com> Merge "Abstract away access to audio devices HAL"
e37736428f5393ea5f32729ad16f59c2c297c04f 14-Sep-2016 Phil Burk <philburk@google.com> AudioFlinger: flush direct tracks that are paused am: 4bb650bb3c am: b4fb66000f
am: 1935f31023

Change-Id: I7e6e7e73f2dd77c91995570c8719ab9c8e5561e9
1935f3102352256a6388224a49013c3b05b8f8d8 14-Sep-2016 Phil Burk <philburk@google.com> AudioFlinger: flush direct tracks that are paused am: 4bb650bb3c
am: b4fb66000f

Change-Id: I7b6a1b64871d40f50aea5a127219be210b9acb60
b4fb66000ff1148db0cc47697eda87dcbb0805c1 14-Sep-2016 Phil Burk <philburk@google.com> AudioFlinger: flush direct tracks that are paused
am: 4bb650bb3c

Change-Id: I86d50d180819dfb7abed479905fb5921b69188b5
a930117eb3c4e184395f87b5b6d7639dc11576d9 14-Sep-2016 Phil Burk <philburk@google.com> Merge "AudioFlinger: flush direct tracks that are paused" into nyc-mr1-dev
e4f1f63a2c54ee8687ad8cca18df0f6639ad7c81 31-Aug-2016 Mikhail Naganov <mnaganov@google.com> Abstract away access to audio devices HAL

In this CL all direct access to audio_hw_device_t and its functions is
encapsulated within the new class DeviceHalLocal. Loading of hardware
modules is encapsulated withing DevicesFactoryHalLocal. AudioFlinger
uses interface classes DevicesFactoryHalInterface and DeviceHalInterface
to access these functions.

Bug: 30222631
Change-Id: Ic88b20c55813a24b898f4a832e082c17d81935b7
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioHwDevice.cpp
udioflinger/AudioHwDevice.h
udioflinger/AudioStreamOut.cpp
udioflinger/AudioStreamOut.h
udioflinger/DeviceHalInterface.h
udioflinger/DeviceHalLocal.cpp
udioflinger/DeviceHalLocal.h
udioflinger/DevicesFactoryHalInterface.h
udioflinger/DevicesFactoryHalLocal.cpp
udioflinger/DevicesFactoryHalLocal.h
udioflinger/EffectHalInterface.h
udioflinger/EffectHalLocal.cpp
udioflinger/Effects.cpp
udioflinger/EffectsFactoryHalInterface.h
udioflinger/PatchPanel.cpp
udioflinger/Threads.cpp
1724ee3caa5f0b4e73979036073f0b71a115083a 13-Sep-2016 Eric Laurent <elaurent@google.com> audioflinger: fix error reporting in setParameters() am: d21bcd272d am: 2e992bd188
am: 92cd1cd127

Change-Id: I7bccd116e024720dbb50e9b8e9e52144b7a1b54e
92cd1cd127082f85cefad6fffe6671a991a52fe9 13-Sep-2016 Eric Laurent <elaurent@google.com> audioflinger: fix error reporting in setParameters() am: d21bcd272d
am: 2e992bd188

Change-Id: I7669ac1ca3a37d0c11e6c15c72c26666cd14e227
d21bcd272d43285baa32ffd48c909b4a29c614a4 09-Sep-2016 Eric Laurent <elaurent@google.com> audioflinger: fix error reporting in setParameters()

Return NO_ERROR if at least one audio HAL module returns NO_ERROR
as not all HALs are requested to support all parameters.

Bug: 31258387
Change-Id: Ia509c272f150afe7f56c699553f2e8782d69fd9b
udioflinger/AudioFlinger.cpp
4bb650bb3c4f15789232f3f3cf778c5441122360 09-Sep-2016 Phil Burk <philburk@google.com> AudioFlinger: flush direct tracks that are paused

Normally the flush is processed on ObtainBuffer.
But that is not called when the track is paused.
So it was not possible to flush and re-prime a
track that was paused.

Now we flush synchronously for inactive tracks,
and flush from prepareTracks_l for active tracks.

Bug: 19193985
Bug: 27791443
Change-Id: I39a7e4921e45041c3a51cf91fd3995b5edee6dd4
Signed-off-by: Phil Burk <philburk@google.com>
udioflinger/Tracks.cpp
1b291841a58ce6b2b291232dfdd56134b2185c48 18-Jul-2016 Glenn Kasten <gkasten@google.com> Fix RecordThread running too often if fast capture is active

Bug: 30159297
Change-Id: Ieca804450168391c162fc4862398586fcc5d7e4e
udioflinger/Threads.cpp
udioflinger/Threads.h
6b11f552f99ce7bd40ea164f65ac1590a3f4198b 12-Sep-2016 Chih-hung Hsieh <chh@google.com> Merge "Fix google-explicit-constructor warnings in camera." am: f9ee5183c8 am: beff1fb18b am: 019e54142c
am: 2f919a4951

Change-Id: I6b20f2f0e8c2153b11b8b1e54d92db290fb7bfab
2f919a49511af0b8736f6edb43d7ce579470b259 12-Sep-2016 Chih-hung Hsieh <chh@google.com> Merge "Fix google-explicit-constructor warnings in camera." am: f9ee5183c8 am: beff1fb18b
am: 019e54142c

Change-Id: I1278af9e5244995c7fdbc4ee7a54314571b3df3f
019e54142c85031e5320ba9103e3558835dda04c 12-Sep-2016 Chih-hung Hsieh <chh@google.com> Merge "Fix google-explicit-constructor warnings in camera." am: f9ee5183c8
am: beff1fb18b

Change-Id: I0f337390c99af8b300b28f8dfe60635290fc20b0
f9ee5183c82c645de8ed9ec79d9bae04b3bc6e51 12-Sep-2016 Chih-hung Hsieh <chh@google.com> Merge "Fix google-explicit-constructor warnings in camera."
ad477fed3d696cd5e27da4d281fcff3d2a83e862 10-Sep-2016 Chih-hung Hsieh <chh@google.com> Merge "Fix google-explicit-constructor warnings in audioflinger, audiopolicy." am: 9c9bad3c8d am: f7dc6d0df1 am: 5848eb65f6
am: 2e97f1eea4

Change-Id: I482687030a0ca02e61f68554b10515450dff1043
2e97f1eea42fc4acdec6094c552552447a29c24f 10-Sep-2016 Chih-hung Hsieh <chh@google.com> Merge "Fix google-explicit-constructor warnings in audioflinger, audiopolicy." am: 9c9bad3c8d am: f7dc6d0df1
am: 5848eb65f6

Change-Id: Ifdd4b164f9d8ad5fa1f285dc3ecda7faadb3cd72
5848eb65f6ced6bb9ada57223bdbc416602d6f6c 10-Sep-2016 Chih-hung Hsieh <chh@google.com> Merge "Fix google-explicit-constructor warnings in audioflinger, audiopolicy." am: 9c9bad3c8d
am: f7dc6d0df1

Change-Id: I83cd639d1d4d2cdb8a126efe7b87953c831cee65
9c9bad3c8dfd51ddd65c015588814f84fddd5630 10-Sep-2016 Chih-hung Hsieh <chh@google.com> Merge "Fix google-explicit-constructor warnings in audioflinger, audiopolicy."
15c1225da92bdae3c96a064fefbe745dd267185a 02-Sep-2016 Haynes Mathew George <hgeorge@codeaurora.org> audiopolicy: Avoid spurious routing in APM::stopSource am: 11c499a59e am: 5c261a2189
am: 61f87168e9

Change-Id: I0f97c34e0d8abb1ec130f6db781fbcfe2a455324
61f87168e91363d086ebbb5100c8684097681bc1 02-Sep-2016 Haynes Mathew George <hgeorge@codeaurora.org> audiopolicy: Avoid spurious routing in APM::stopSource am: 11c499a59e
am: 5c261a2189

Change-Id: I31ff3ac4e07d072b1756fa333057f67ecaf4285f
5c261a21898e086f4a1dbb503690f3d7018ea48b 02-Sep-2016 Haynes Mathew George <hgeorge@codeaurora.org> audiopolicy: Avoid spurious routing in APM::stopSource
am: 11c499a59e

Change-Id: I042716ea38ed1da72a822a0da852836deca25835
12c7be6230e4828571745eb2231153cf7b7b88e8 02-Sep-2016 Glenn Kasten <gkasten@google.com> Merge "audiopolicy: Avoid spurious routing in APM::stopSource" into nyc-mr1-dev
c7239f10fafe26e948d8505554f4f0f113395a93 02-Sep-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Use symbolic name for return value in legacy audio policy client" am: e31f1491f8 am: d6229bb516 am: 95852cbbbb
am: 3c96a7253f

Change-Id: Ia4fd2e6fc79fea1754bd81c5fc5b847bb347dbe1
3c96a7253fbdadf27c6ebcea1e28d5c903b3d69c 02-Sep-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Use symbolic name for return value in legacy audio policy client" am: e31f1491f8 am: d6229bb516
am: 95852cbbbb

Change-Id: I376781094ef5c565be1db23784636b7422b38ad8
95852cbbbb3d1caabc6d03444d9a762bb78aee5d 02-Sep-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Use symbolic name for return value in legacy audio policy client" am: e31f1491f8
am: d6229bb516

Change-Id: I1102631d4bcd83d84a5d299b61941d2f5037c1e3
e31f1491f87804595ad2f2a4a0842ffe7f35f32f 02-Sep-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Use symbolic name for return value in legacy audio policy client"
598857bdcfc99e8afc597ea815a9b93aa81fe0c4 31-Aug-2016 Andy Hung <hunga@google.com> AudioFlinger: Disable (revert) LockWatch am: deb0335714 am: d8d2728947 am: 5d819b4794
am: 9b7a8f9461

Change-Id: I1840bd725020242337af910ea3f51cd094e3c937
9b7a8f94619b6847db7dc37deb5918b6f3439a43 31-Aug-2016 Andy Hung <hunga@google.com> AudioFlinger: Disable (revert) LockWatch am: deb0335714 am: d8d2728947
am: 5d819b4794

Change-Id: I4754604909ec4658aa3d12e70dbb735e34955901
d8d2728947b1c1517584afe39476e080ed4051c8 31-Aug-2016 Andy Hung <hunga@google.com> AudioFlinger: Disable (revert) LockWatch
am: deb0335714

Change-Id: Ie0efbf73132b21d4662582fc08c673827cc47d04
11c499a59eb8effc59209f6c06df3ed78c2998a8 26-Aug-2016 Haynes Mathew George <hgeorge@codeaurora.org> audiopolicy: Avoid spurious routing in APM::stopSource

On AudioOutput::stopSource, ignore routing calls
on an output descriptor to the same device

Bug: 31185954
Change-Id: I80f442982f7e66efb59b639a7ca9424745dbd70a
udiopolicy/managerdefault/AudioPolicyManager.cpp
18e6e46cfa616c34095e269505121f5033312924 30-Aug-2016 Andy Hung <hunga@google.com> Do not park the FastMixer on AudioPatch changes am: f60abceac7 am: 927fefa85b
am: 85cda4dc02

Change-Id: Iabc962fec667ad2f77dfb2721cccb05e00adb2b2
b2569aa382f29a20652726133d89c8ca7d4c9e28 30-Aug-2016 Alex Deymo <deymo@google.com> Merge "Mark unused parameters as UNUSED in BRILLO." am: 1567662f5a am: 002a0ffe14 am: 744c307046
am: 56b0c92009

Change-Id: I6a97138b8e801b22c95d9e737738135a3575bfd8
deb0335714cabc906098fb1d971d992027267fc6 29-Aug-2016 Andy Hung <hunga@google.com> AudioFlinger: Disable (revert) LockWatch

Revert "audioflinger: add watchdog on main mutex"
This reverts commit 17a58b2560c38a8e31a38186f9ab6eb98a38e229.

Revert "LockWatch: Update to Mutex::timeLock specs"
This reverts commit 51a6319111df875710dab25a1a99b10d002c4869.

Bug: 30936184
Change-Id: I0f6df6c98c06e161038b1bf0aae5912619cb4066
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/LockWatch.cpp
udioflinger/LockWatch.h
cc43d1616acadbb18c60db29777bf4eea45797bd 29-Aug-2016 Andy Hung <hunga@google.com> AudioFlinger: Prevent offload underrun during active playback
am: 39ee5a4f61

Change-Id: I15de660c18d8602153cbf7896059acc98cb9a8a2
be4a3164993ba9779950ddec744e4ad954dff092 29-Aug-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "AudioFlinger: Prevent offload underrun during active playback" into nyc-dev
d19d994770a04f02c204affd29985c5aeaa58baa 29-Aug-2016 Chih-Hung Hsieh <chh@google.com> Fix google-explicit-constructor warnings in camera.

* Add explicit keyword to conversion constructors.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: I61f9b5b2b6e13e0c6561327bc8dfe69c9cfc5ba5
amera/libcameraservice/device3/Camera3BufferManager.h
amera/libcameraservice/device3/Camera3OutputStream.h
34f28cbb1d52348deb8dc868530eae2b3f22931e 29-Aug-2016 Chih-Hung Hsieh <chh@google.com> Fix google-explicit-constructor warnings in audioflinger, audiopolicy.

* Add explicit keyword to conversion constructors.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: I3b73f0cd73f47be7735cc374306c02301c20588f
udioflinger/AutoPark.h
udioflinger/LinearMap.h
udiopolicy/common/managerdefinitions/include/AudioRoute.h
udiopolicy/common/managerdefinitions/include/IOProfile.h
a7443808c13776152c433ad468955a73e0377d00 29-Aug-2016 Andy Hung <hunga@google.com> AudioFlinger: Account for frames dropped in suspend mode
am: 9ebe29bcc5

Change-Id: I5f42f724a3f121cbe7b34b09a2015ec4ec0c735c
9ebe29bcc5070e41c3e40ba16c93b5a3e2972aa5 28-Jul-2016 Andy Hung <hunga@google.com> AudioFlinger: Account for frames dropped in suspend mode

These frames must be added to the kernel position in timestamps.

Bug: 30025777
Change-Id: I30c14503c9467059c3782e5c96c01ae1cf3709f6
(cherry picked from commit 238fa3deff26d7e4d9e81bd0a88c936f16226c4e)
udioflinger/Threads.cpp
udioflinger/Threads.h
39ee5a4f613b495d1582885f71f0d9d42411d68b 27-Jul-2016 Andy Hung <hunga@google.com> AudioFlinger: Prevent offload underrun during active playback

Bug: 29897830
Change-Id: Id99d416cdaa8bf62daca8f92e3564f2895f15490
(cherry picked from commit f804475807407442d5596ab7378ed07d50664063)
udioflinger/Threads.cpp
udioflinger/Threads.h
4a3d5c23f79189eb7ab9f31c440c7da5b15947a2 15-Aug-2016 Mikhail Naganov <mnaganov@google.com> Abstract away access to audio effects HAL and factory

In this CL all direct calls to functions from EffectsFactoryApi.h
and hardware/audio_effect.h are encapsulated within two new
classes: EffectsFactoryHalLocal and EffectHalLocal. AudioFlinger
uses interface classes EffectsFactoryHalInterface and
EffectHalInterface to access these functions.

Bug: 30222631
Change-Id: Id64b9c5529319077f6f968921489a13f60daa977
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/BufferProviders.cpp
udioflinger/BufferProviders.h
udioflinger/EffectHalInterface.h
udioflinger/EffectHalLocal.cpp
udioflinger/EffectHalLocal.h
udioflinger/Effects.cpp
udioflinger/Effects.h
udioflinger/EffectsFactoryHalInterface.h
udioflinger/EffectsFactoryHalLocal.cpp
udioflinger/EffectsFactoryHalLocal.h
udioflinger/tests/Android.mk
85cda4dc026ca3ce8725202738b2deb24ce94829 27-Aug-2016 Andy Hung <hunga@google.com> Do not park the FastMixer on AudioPatch changes am: f60abceac7
am: 927fefa85b

Change-Id: I175e8ebb94c97638707480b1725cea9491ea9a98
3278996fb589ea0c3d2d5acbd0546072579fb36c 26-Aug-2016 Andy Hung <hunga@google.com> Do not park the FastMixer on AudioPatch changes

Can be turned on again by property af.patch_park.

Bug: 30952714
Change-Id: Id7f7750e28ecf950d110379309d18819e169e999
udioflinger/Threads.cpp
f60abceac70c7a30dc2f888c4b80256b4a01a6dd 26-Aug-2016 Andy Hung <hunga@google.com> Do not park the FastMixer on AudioPatch changes

Can be turned on again by property af.patch_park.

Bug: 30952714
Change-Id: Id7f7750e28ecf950d110379309d18819e169e999
udioflinger/Threads.cpp
56b0c92009e76851ed3a161804117971b4defa4b 26-Aug-2016 Alex Deymo <deymo@google.com> Merge "Mark unused parameters as UNUSED in BRILLO." am: 1567662f5a am: 002a0ffe14
am: 744c307046

Change-Id: I3c43605f4a67c24c4651fdefc0c4319cec3da76b
744c3070464e9e32de8b60c425c722be4251d2aa 25-Aug-2016 Alex Deymo <deymo@google.com> Merge "Mark unused parameters as UNUSED in BRILLO." am: 1567662f5a
am: 002a0ffe14

Change-Id: I597292095289b14e1b2e4652e78344aa193bf26e
1567662f5a709398004cf509fb3f382f0c76f5b1 25-Aug-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Mark unused parameters as UNUSED in BRILLO."
83c1a98f774cc4e4e1546aaaba2fa13820f05b40 25-Aug-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: don't let dequeueBuffer block indefinitely" am: bbf70c5122
am: 3c2423173d

Change-Id: I0f813700d620b164e3347e14427d21df322826f7
9c2a2c26c0d70de97f51063b06a5efc79b327eed 25-Aug-2016 Alex Deymo <deymo@google.com> Mark unused parameters as UNUSED in BRILLO.

Bug: 31068444
Test: `make dist` in Brillo.

Change-Id: Ib0229ad78894fc703e9c5ad7bda4ab2466641f77
amera/libcameraservice/CameraService.cpp
f81b009d77466c5b3901d2c49b0fcc618e3d1592 02-Aug-2016 Zhijun He <zhijunhe@google.com> Camera3: don't let dequeueBuffer block indefinitely

The synchronous consumers (e.g. ImageReader) may be very slow when the
clients have computational intensive image processings. When system
load is high, these processing will be even much slower. This could
starve the producer side and then cause dequeue/attach buffer block
indefinitely. If clients intends to close the capture session, right
after a capture request is submitted, the waitUntil drain could be
blocked indefinitely if the capture request dequeue buffer call is
blocked indefinitely, as the request thread will never become idle until
the last dequeue buffer is done and the request is sent.This indefinite
getBuffer() blocking could easily trigger the waitUntilDrained 5s timeout
thus put the camera device into error state although there is nothing
bad happening in the HAL.

Introducing the timeout will avoid such bad situation. When consumer is
slow, there will be no new request being sent to HAL, as there is really
no new buffer available.

Bug:30404840
Change-Id: Ibf08d2745911203bce6f31130800707f36d7f985
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.h
16d2cb857e1a87d34127d5b1f2dea3969a52a579 25-Aug-2016 Alex Deymo <deymo@google.com> Merge "Silence warning about unused variables in BRILLO." am: bcd87f5969 am: ca59abe191 am: 205a224eee
am: f5e60b1e79

Change-Id: I59597bd9c700439ca67f8a6ab9b055492a5dda29
f5e60b1e798d15fc466f5f15a4db6920e4d0c2d1 25-Aug-2016 Alex Deymo <deymo@google.com> Merge "Silence warning about unused variables in BRILLO." am: bcd87f5969 am: ca59abe191
am: 205a224eee

Change-Id: Id4e0626842a3d9f170e29a364f4d31020172f233
205a224eeee3cb41395af783755c347bb6ce7a02 25-Aug-2016 Alex Deymo <deymo@google.com> Merge "Silence warning about unused variables in BRILLO." am: bcd87f5969
am: ca59abe191

Change-Id: Ic2e37c41dad8579cdcd28e6698fce991854c7962
eb4c32d20d43bb6a36dcbef9b995cd7871c1fa4d 25-Aug-2016 Alex Deymo <deymo@google.com> Silence warning about unused variables in BRILLO.

This patch moves the call to validateClientPermissionsLocked() outside
the #if so it is executed in Brillo builds anyway, but the result is
ignored. This fixes the warning about unused parameters which was
causing the build to fail.

Bug: 31068444
Test: `make dist` in Brillo

Change-Id: I8a6648bf2221406068c9f5a1850a59ae0bde03ca
amera/libcameraservice/CameraService.cpp
5fd8de709af3fa553d46367316ea3659157e6799 25-Aug-2016 Andy Hung <hunga@google.com> LockWatch: Update to Mutex::timeLock specs am: 51a6319111 am: 7b960a5dc5 am: ffd7edc622
am: 78e800e936

Change-Id: Ide1e3fcbc0fd24457960944bd32384ed993a9aea
78e800e9369636a2a17d668a90eeaab275e83d5e 25-Aug-2016 Andy Hung <hunga@google.com> LockWatch: Update to Mutex::timeLock specs am: 51a6319111 am: 7b960a5dc5
am: ffd7edc622

Change-Id: I3113d03214a783e51ed14ab92a20ec4d80f38dc9
7b960a5dc58cfcbb3ef5ac05c93549edf954e5d0 25-Aug-2016 Andy Hung <hunga@google.com> LockWatch: Update to Mutex::timeLock specs
am: 51a6319111

Change-Id: I1c392e49cdd37df9ae313243b090fb3a69a7d811
51a6319111df875710dab25a1a99b10d002c4869 24-Aug-2016 Andy Hung <hunga@google.com> LockWatch: Update to Mutex::timeLock specs

Bug: 31008450
Change-Id: Ib86e3a385379e222f5c3eb07a36bba9e5b6f5625
udioflinger/LockWatch.cpp
05e4c8d89ce7d7c3e4ea0e1e7c09a8b3c23616b1 24-Aug-2016 Mikhail Naganov <mnaganov@google.com> Merge "Remove self-recursive includes from AudioStreamOut.h and SpdifStreamOut.h"
3e873f67f49b4fc43aca8bf993691033231dff9d 24-Aug-2016 Mikhail Naganov <mnaganov@google.com> Remove self-recursive includes from AudioStreamOut.h and SpdifStreamOut.h

These includes do not make much harm but look confusing.

Change-Id: Ied625689d9efda8fa34c1b81c3b63d7c4c6c8dcc
udioflinger/AudioStreamOut.h
udioflinger/SpdifStreamOut.h
bf7752ea6aa7fef4a75b73fed869298d59cdf580 24-Aug-2016 Glenn Kasten <gkasten@google.com> sched_getscheduler may include SCHED_RESET_ON_FORK am: 8255ba7b40 am: f4da60ebc2 am: b2544bcc98
am: 3c901299c6

Change-Id: Ibefe0567ce2e98ee089af66bfea3532cf9908348
3c901299c6c0a8a7f52b2a2895cff80886777ada 24-Aug-2016 Glenn Kasten <gkasten@google.com> sched_getscheduler may include SCHED_RESET_ON_FORK am: 8255ba7b40 am: f4da60ebc2
am: b2544bcc98

Change-Id: I8e28c76bf3936f67f4a503b0d7cf438c19c8e472
f4da60ebc2c527a3f5afca30a28b1d73801ea850 24-Aug-2016 Glenn Kasten <gkasten@google.com> sched_getscheduler may include SCHED_RESET_ON_FORK
am: 8255ba7b40

Change-Id: I525d60cb487c87c517ba1edeadaf29b5f9a6cb54
8255ba7b40774b2b8868482f1a302db3ae98e905 23-Aug-2016 Glenn Kasten <gkasten@google.com> sched_getscheduler may include SCHED_RESET_ON_FORK

The SCHED_RESET_ON_FORK flag is visible in the policy value returned by sched_getscheduler()

Bug: 31020591
Change-Id: I5243fadce2a5f629fa2dc61888d8aa9aff32d9ca
udioflinger/FastThread.cpp
7b946f1102a90dd1735b334a77243f4f8126bd70 23-Aug-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "audiopolicy: modify A2DP suspend logic"
4e6ff4151f03c6b7211136b83e71fca34bbc402c 23-Aug-2016 Mikhail Naganov <mnaganov@google.com> audioflinger: Fix battery accounting for offload tracks am: e94c27a17f am: 7cba7beec4
am: e50af19356

Change-Id: I80e26985a69800d31b0aa9331bccdc0a91caa08b
e50af19356b852781a28233d50f06b7adde7d470 23-Aug-2016 Mikhail Naganov <mnaganov@google.com> audioflinger: Fix battery accounting for offload tracks am: e94c27a17f
am: 7cba7beec4

Change-Id: Id5d5b2e5ac25a167583243d84fd060698c18930f
7cba7beec49e0509a0c7aebf0942dcf347b2a42b 23-Aug-2016 Mikhail Naganov <mnaganov@google.com> audioflinger: Fix battery accounting for offload tracks
am: e94c27a17f

Change-Id: Id9d9258a8719c5358a5fd33cb346411528f70627
beec2335c742b0f08cfc7ef8909336bea41eee0d 23-Aug-2016 Mikhail Naganov <mnaganov@google.com> Merge "audioflinger: Fix battery accounting for offload tracks" into nyc-mr1-dev
82f5b811b2767289ebb8a9e6af1919c3b72b5121 17-Aug-2016 Eric Laurent <elaurent@google.com> DO NOT MERGE ANYWHERE (nyc-dr1-dev) audioflinger: add watchdog on main mutex

Check every 10 seconds if main audioflinger mutex can be acquired and
trigger audioserver process restart if not.
This will allow to capture tombstones of locked up situations and avoid
the disruption of a system_server restart.

Bug: 30737845
Bug: 30388410
Change-Id: I8a78b8cf813982f70ea598a6d42affc0ecaa76c9
(cherry picked from commit 17a58b2560c38a8e31a38186f9ab6eb98a38e229)
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/LockWatch.cpp
udioflinger/LockWatch.h
6bb7287ab4b05b444d3dfaa7ee5e2562c70d3f2e 20-Aug-2016 Eric Laurent <elaurent@google.com> soundtrigger: add size check on sound model and recogntion data am: ef0c915184 am: 82477c0929 am: 6aa5165f7c am: c4d991b2ae am: 4f1a678f8c am: 31ab14bef7 am: 1e98e388cb am: c4a59671b7 am: 6369681d4e
am: 65e6cd1026

Change-Id: I2b4fdcc81196d5c33eb3bbec6345dc2fb4f1b987
b26e64bbcf289042cee9c0c0ceed2de200deaced 20-Aug-2016 Eric Laurent <elaurent@google.com> soundtrigger: add size check on sound model and recogntion data am: ef0c915184 am: 82477c0929 am: 6aa5165f7c am: c4d991b2ae am: 4f1a678f8c am: 31ab14bef7 am: 1e98e388cb am: c4a59671b7 am: 6369681d4e
am: bfe53d4c72

Change-Id: Icf89fa8b7a8fea0088e2c950ae00ea68571145ef
bfe53d4c728242db3d83160ed6193e3d3ba5f4af 20-Aug-2016 Eric Laurent <elaurent@google.com> soundtrigger: add size check on sound model and recogntion data am: ef0c915184 am: 82477c0929 am: 6aa5165f7c am: c4d991b2ae am: 4f1a678f8c am: 31ab14bef7 am: 1e98e388cb am: c4a59671b7
am: 6369681d4e

Change-Id: I9dd8ac8882788af20f3ce3578771775db5f4e4ea
65e6cd1026c9b797725e91bf43bf3ae3053fd959 20-Aug-2016 Eric Laurent <elaurent@google.com> soundtrigger: add size check on sound model and recogntion data am: ef0c915184 am: 82477c0929 am: 6aa5165f7c am: c4d991b2ae am: 4f1a678f8c am: 31ab14bef7 am: 1e98e388cb am: c4a59671b7
am: 6369681d4e

Change-Id: Ic67f931afa1a41c34a436251f3f616b0f07a8803
6369681d4e323287c81feb08e249554e622e3b67 20-Aug-2016 Eric Laurent <elaurent@google.com> soundtrigger: add size check on sound model and recogntion data am: ef0c915184 am: 82477c0929 am: 6aa5165f7c am: c4d991b2ae am: 4f1a678f8c am: 31ab14bef7 am: 1e98e388cb
am: c4a59671b7

Change-Id: Ibb805ec15a117d17c0644a7851f978a9bc6469fc
ce54c030579f1405fdb3f6d7e9a2d74d69fd8a4c 20-Aug-2016 Andy Hung <hunga@google.com> Add EFFECT_CMD_SET_PARAM parameter checking am: e4a1d91501 am: 19d8a61324 am: ebd9f1029e am: d37cf46848 am: ced0dd635e am: 00acbf03be am: 1ab50af9c1 am: 18e5ce6891 am: 0330f4ce2d am: 41880fe252 am: 7b2ce5639f am: 4faee5a880 am: a3e0e40218
am: 3366d79656

Change-Id: Ie911a3bbfff59c0f22505552438f62b2f25b2e1d
c4a59671b709cd154ee17e5245f38d84627d45dd 20-Aug-2016 Eric Laurent <elaurent@google.com> soundtrigger: add size check on sound model and recogntion data am: ef0c915184 am: 82477c0929 am: 6aa5165f7c am: c4d991b2ae am: 4f1a678f8c am: 31ab14bef7
am: 1e98e388cb

Change-Id: I54bbef6149da860f28edcd1f0fa135218893f82e
1e98e388cbbd32d656d96c7fb77be179b0881cf5 20-Aug-2016 Eric Laurent <elaurent@google.com> soundtrigger: add size check on sound model and recogntion data am: ef0c915184 am: 82477c0929 am: 6aa5165f7c am: c4d991b2ae am: 4f1a678f8c
am: 31ab14bef7

Change-Id: I70ab85d0764ffbd8b645e4e19c4f34a641a6ffd4
31ab14bef7462f5630d012e5c146debc896f1720 19-Aug-2016 Eric Laurent <elaurent@google.com> soundtrigger: add size check on sound model and recogntion data am: ef0c915184 am: 82477c0929 am: 6aa5165f7c am: c4d991b2ae
am: 4f1a678f8c

Change-Id: I901589896d3464b9355d8d5efdc07addb23f7e0a
4f1a678f8cda902dd21be399dbeab25e72c2c924 19-Aug-2016 Eric Laurent <elaurent@google.com> soundtrigger: add size check on sound model and recogntion data am: ef0c915184 am: 82477c0929 am: 6aa5165f7c
am: c4d991b2ae

Change-Id: I3aa665734e6aae7ae4e7f8f32578d8d5bd4937d5
c4d991b2ae27d1db63341ebdbf44b79564b48344 19-Aug-2016 Eric Laurent <elaurent@google.com> soundtrigger: add size check on sound model and recogntion data am: ef0c915184 am: 82477c0929
am: 6aa5165f7c

Change-Id: I24c5a9cf190033a0042ce8edda2d52ba0105ed7a
82477c0929f688d5cc0ab0cb69ed7d418130692c 19-Aug-2016 Eric Laurent <elaurent@google.com> soundtrigger: add size check on sound model and recogntion data
am: ef0c915184

Change-Id: I5453811eb579dddd599be15108bb114095e07a58
36e11a4c23d045a63b24b1ad09fc535737d4c8a1 19-Aug-2016 Andy Hung <hunga@google.com> Merge "soundtrigger: add size check on sound model and recogntion data" into lmp-dev
e06cbd252582be4350c65dc691b070ef821e92d5 19-Aug-2016 Andy Hung <hunga@google.com> Add EFFECT_CMD_SET_PARAM parameter checking am: e4a1d91501 am: 19d8a61324 am: ebd9f1029e am: d37cf46848 am: ced0dd635e am: 00acbf03be am: 1ab50af9c1 am: 18e5ce6891 am: 0330f4ce2d am: 41880fe252 am: 7b2ce5639f am: 4faee5a880
am: 183d012ea9

Change-Id: I7d0cfb09d8274e8c24dc8011ddddb90551ee5fc2
3366d7965645c1f9694493fa2caff361158a90f2 19-Aug-2016 Andy Hung <hunga@google.com> Add EFFECT_CMD_SET_PARAM parameter checking am: e4a1d91501 am: 19d8a61324 am: ebd9f1029e am: d37cf46848 am: ced0dd635e am: 00acbf03be am: 1ab50af9c1 am: 18e5ce6891 am: 0330f4ce2d am: 41880fe252 am: 7b2ce5639f am: 4faee5a880
am: a3e0e40218

Change-Id: I56558cd3dff5fcafafd6fe5cd542b57bf836f544
183d012ea9e1d2bea2f46fb4c784b824075ce841 19-Aug-2016 Andy Hung <hunga@google.com> Add EFFECT_CMD_SET_PARAM parameter checking am: e4a1d91501 am: 19d8a61324 am: ebd9f1029e am: d37cf46848 am: ced0dd635e am: 00acbf03be am: 1ab50af9c1 am: 18e5ce6891 am: 0330f4ce2d am: 41880fe252 am: 7b2ce5639f
am: 4faee5a880

Change-Id: Id866cf06e00f0ca2de3229d868ef1d945def4d45
a3e0e40218a3f1dafa7b9084615a6e80d2812d87 19-Aug-2016 Andy Hung <hunga@google.com> Add EFFECT_CMD_SET_PARAM parameter checking am: e4a1d91501 am: 19d8a61324 am: ebd9f1029e am: d37cf46848 am: ced0dd635e am: 00acbf03be am: 1ab50af9c1 am: 18e5ce6891 am: 0330f4ce2d am: 41880fe252 am: 7b2ce5639f
am: 4faee5a880

Change-Id: I238d8ce2ab24f15b9d10e01974804cfa0c647f00
4faee5a880c5c5363c64dd8b1d5c8f42bf85e424 19-Aug-2016 Andy Hung <hunga@google.com> Add EFFECT_CMD_SET_PARAM parameter checking am: e4a1d91501 am: 19d8a61324 am: ebd9f1029e am: d37cf46848 am: ced0dd635e am: 00acbf03be am: 1ab50af9c1 am: 18e5ce6891 am: 0330f4ce2d am: 41880fe252
am: 7b2ce5639f

Change-Id: Ic7468a587b3c709949f57bbb177cacafd9c72db0
7b2ce5639f8388e31c9b0783f4a8d3584b08c59f 19-Aug-2016 Andy Hung <hunga@google.com> Add EFFECT_CMD_SET_PARAM parameter checking am: e4a1d91501 am: 19d8a61324 am: ebd9f1029e am: d37cf46848 am: ced0dd635e am: 00acbf03be am: 1ab50af9c1 am: 18e5ce6891 am: 0330f4ce2d
am: 41880fe252

Change-Id: I7b1912ff1fa4e7bc3e873684cae5c91a66703712
41880fe252c517274f6fac8a33ab4b1ef05854c6 19-Aug-2016 Andy Hung <hunga@google.com> Add EFFECT_CMD_SET_PARAM parameter checking am: e4a1d91501 am: 19d8a61324 am: ebd9f1029e am: d37cf46848 am: ced0dd635e am: 00acbf03be am: 1ab50af9c1 am: 18e5ce6891
am: 0330f4ce2d

Change-Id: I7d44f5a744389bf86647c111e23fce565705c010
0330f4ce2da04ff8c83c289b2271777546bfce9c 19-Aug-2016 Andy Hung <hunga@google.com> Add EFFECT_CMD_SET_PARAM parameter checking am: e4a1d91501 am: 19d8a61324 am: ebd9f1029e am: d37cf46848 am: ced0dd635e am: 00acbf03be am: 1ab50af9c1
am: 18e5ce6891

Change-Id: Ib4f1c1efb6680febadb2766843e57f0734a00052
18e5ce689152760c29dbe83e68371b116a8f0605 19-Aug-2016 Andy Hung <hunga@google.com> Add EFFECT_CMD_SET_PARAM parameter checking am: e4a1d91501 am: 19d8a61324 am: ebd9f1029e am: d37cf46848 am: ced0dd635e am: 00acbf03be
am: 1ab50af9c1

Change-Id: I5be11eba820ccb3f6c3bb97b3fa417504306bb3f
1ab50af9c1c1617a3d25dfc0458b428db69630c0 19-Aug-2016 Andy Hung <hunga@google.com> Add EFFECT_CMD_SET_PARAM parameter checking am: e4a1d91501 am: 19d8a61324 am: ebd9f1029e am: d37cf46848 am: ced0dd635e
am: 00acbf03be

Change-Id: I34a722f8440d79dd539a170ea28344d79df6e8c9
ced0dd635e77d0d120d36fad2ba037882ffecb8b 19-Aug-2016 Andy Hung <hunga@google.com> Add EFFECT_CMD_SET_PARAM parameter checking am: e4a1d91501 am: 19d8a61324 am: ebd9f1029e
am: d37cf46848

Change-Id: Ibe08f642742e6db44b16d9827dceeb984e6419f3
d37cf46848ff1eeedcf2c05bf00c18582941a412 19-Aug-2016 Andy Hung <hunga@google.com> Add EFFECT_CMD_SET_PARAM parameter checking am: e4a1d91501 am: 19d8a61324
am: ebd9f1029e

Change-Id: Ic2fa5bba22d9ffc7b69ea97e2e4bc44d8a0fa42d
ebd9f1029e5e317e0fcf37163b741a0e48a39fa1 19-Aug-2016 Andy Hung <hunga@google.com> Add EFFECT_CMD_SET_PARAM parameter checking am: e4a1d91501
am: 19d8a61324

Change-Id: I002990dc446d8a713f41b77671d17dbb11a914f9
e94c27a17fd56fd5ac63fc2de9df08cfcc80b1e3 19-Aug-2016 Mikhail Naganov <mnaganov@google.com> audioflinger: Fix battery accounting for offload tracks

Ensure that the list of wakelock UIDs is only cleared if
the offload playback wakelock is released during async completion
wait.

Bug: 30830106
Change-Id: Icf18b9e88e55c27bc03d8a904cc91f593cc95815
udioflinger/Threads.cpp
0878ecfc07712e0caa83642fba55af928b173363 19-Aug-2016 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Wait for empty in-flight map when waiting for idle am: e4df8abe28
am: e890fa14d6

Change-Id: I9ed6eb856a29a512b0ae1ca04011e122108ab999
e890fa14d6ba103132b2faac60726fb0dd217962 19-Aug-2016 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Wait for empty in-flight map when waiting for idle
am: e4df8abe28

Change-Id: Ia0095a20f128fff93f1adda905f2a8d71369915d
e4a1d91501d47931dbae19c47815952378787ab6 17-Aug-2016 Andy Hung <hunga@google.com> Add EFFECT_CMD_SET_PARAM parameter checking

Bug: 30204301
Change-Id: Ib9c3ee1c2f23c96f8f7092dd9e146bc453d7a290
udioflinger/Effects.cpp
d17567dcae35bef4635766c408c23e6fa4abf33a 19-Aug-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3Device: Wait for empty in-flight map when waiting for idle" into nyc-mr1-dev
73d3e738c0ed5db8c65b24f7b70cc3f86b30ad42 19-Aug-2016 Andy Hung <hunga@google.com> Fix timestretch AV sync am: 3da7f05ae1
am: f1bc7f9c7e

Change-Id: Iac530f03197fd4743776f862d9b5735b499559df
f1bc7f9c7effdf3a07e288531e944a0db7945efb 19-Aug-2016 Andy Hung <hunga@google.com> Fix timestretch AV sync
am: 3da7f05ae1

Change-Id: I77bc91b812c67ecbdb5d301b4d3928797d80649c
d44ade926e137941596a51d5005f9deabde0ca9c 19-Aug-2016 Andy Hung <hunga@google.com> Merge "Fix timestretch AV sync" into nyc-mr1-dev
5470d10c022541e6cbf5bc959ee38aef6e6ce9ae 18-Aug-2016 Eric Laurent <elaurent@google.com> audioflinger: add watchdog on main mutex am: 17a58b2560 am: ed31582734
am: 85d5dffa0a

Change-Id: I14d043dd2f35681cda88491a050c7c9da7ad33d9
85d5dffa0a8f523bd577296c3759479f7db2ddec 18-Aug-2016 Eric Laurent <elaurent@google.com> audioflinger: add watchdog on main mutex am: 17a58b2560
am: ed31582734

Change-Id: I9d5d0573220ba5811d06f2aa2217919a68d8529b
ed315827348ea496e2a8d280f743302337550fc4 18-Aug-2016 Eric Laurent <elaurent@google.com> audioflinger: add watchdog on main mutex
am: 17a58b2560

Change-Id: I66d39a45bab27dd866869ce48a514836bac60725
6da0f8d15b38d7979caf22cf5865a959358f9c58 18-Aug-2016 Eric Laurent <elaurent@google.com> Merge "audioflinger: add watchdog on main mutex" into nyc-mr1-dev
ef0c91518446e65533ca8bab6726a845f27c73fd 17-Aug-2016 Eric Laurent <elaurent@google.com> soundtrigger: add size check on sound model and recogntion data

Bug: 30148546

Change-Id: I082f535a853c96571887eeea37c6d41ecee7d8c0
(cherry picked from commit bb00d8f139ff51336ab3c810d35685003949bcf8)
oundtrigger/SoundTriggerHwService.cpp
f86c853ed3e6d4e7b01ac564ac4a3d994f5d96ed 17-Aug-2016 Eric Laurent <elaurent@google.com> Merge "soundtrigger: add size check on sound model and recogntion data"
0ddc1ddb41eafa8d2bcbbfe77e99f3e4a58b228c 17-Aug-2016 Zhijun He <zhijunhe@google.com> Camera3Device: add prop to disable sched fifo am: 90f7c37361 am: 601f677b6d
am: e3fd0d0c51

Change-Id: I95fe0665eb2e124759d46b71fe47670c1f653e72
e3fd0d0c51d81fdc3f7b6892f8f3f2f821065009 17-Aug-2016 Zhijun He <zhijunhe@google.com> Camera3Device: add prop to disable sched fifo am: 90f7c37361
am: 601f677b6d

Change-Id: I86b6da77822a5c2b71ea9c2b75349c3c1e4a5482
bb00d8f139ff51336ab3c810d35685003949bcf8 17-Aug-2016 Eric Laurent <elaurent@google.com> soundtrigger: add size check on sound model and recogntion data

Bug: 30148546

Change-Id: I082f535a853c96571887eeea37c6d41ecee7d8c0
oundtrigger/SoundTriggerHwService.cpp
17a58b2560c38a8e31a38186f9ab6eb98a38e229 17-Aug-2016 Eric Laurent <elaurent@google.com> audioflinger: add watchdog on main mutex

Check every 10 seconds if main audioflinger mutex can be acquired and
trigger audioserver process restart if not.
This will allow to capture tombstones of locked up situations and avoid
the disruption of a system_server restart.

Bug: 30737845
Bug: 30388410
Change-Id: I8a78b8cf813982f70ea598a6d42affc0ecaa76c9
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/LockWatch.cpp
udioflinger/LockWatch.h
90f7c37361c22f86bd3d63d22c27fbea34c188e1 17-Aug-2016 Zhijun He <zhijunhe@google.com> Camera3Device: add prop to disable sched fifo

to disable sched fifo:
adb root
adb shell setprop camera.fifo.disable 1

Bug: 30898724

Change-Id: Ic3d1d15f9deb36b49e7d710d60fac969a98a1730
amera/libcameraservice/device3/Camera3Device.cpp
30cb20a4d2c7e7bdb04d56e82dc5ddbcd66b6755 13-Aug-2016 Andy Hung <hunga@google.com> Merge "Fix timestretch AV sync"
8bbf58f3246088971ba082e330cd68c07b8cecb9 12-Aug-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of 7bc559a to master

Change-Id: I28b0ad637a8a992db16442131501a2715f2cf9a2
7bc559a13c14acb3e74ffc08fd0d898b4d494d4d 12-Aug-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of 70066d9 to stage-aosp-master am: 311f99eade
am: f671d5bbf8

Change-Id: I80d1494c33d33a5ebe784dd894148d90747ae726
f671d5bbf8bdba4076be34b254e9e5f7d3f4b874 12-Aug-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of 70066d9 to stage-aosp-master
am: 311f99eade

Change-Id: I8264ed7436d6ffce3106085efad14a58da2f50b5
311f99eade1222575bc65a2fcbd9f9a5a40d2024 12-Aug-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of 70066d9 to stage-aosp-master

Change-Id: I9af1ace904388c91e6ce885e8a6d3540eb57bb4a
70066d92606c66dedd27c974a7ee6f84e36ef015 12-Aug-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Fix clang-tidy warnings in camera."
ca3a48d00f8452d05763d122387f9e7bf422836d 12-Aug-2016 Chih-hung Hsieh <chh@google.com> Merge "Fix clang-tidy warnings in camera."
cf8d2c8e72dd624fbe1d1d2179b28b658dd76360 11-Aug-2016 Andy Hung <hunga@google.com> Fix timestretch AV sync

Allow sonic library to do input/output data management otherwise
it appears to accumulate audio in its buffers.

Bug: 28409398
Change-Id: Ic25915bc844d8416ec8125b58795d09e838f901e
udioflinger/BufferProviders.cpp
44f13b94ec6cc55923dc350561db96b194c9bd0f 11-Aug-2016 Eric Laurent <elaurent@google.com> Merge "audiopolicy: fix very verbose logging build"
3da7f05ae1931e44b5918fc91b583335b355769b 11-Aug-2016 Andy Hung <hunga@google.com> Fix timestretch AV sync

Allow sonic library to do input/output data management otherwise
it appears to accumulate audio in its buffers.

Bug: 28409398
Change-Id: Ic25915bc844d8416ec8125b58795d09e838f901e
udioflinger/BufferProviders.cpp
5ca8f32280377dd923e72c3c6bd3994217461b8b 11-Aug-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of fd923e7 to stage-aosp-master am: df5d9246f9
am: 63ef5a38f8

Change-Id: I516a43c5e56323e99ad7a8ca2e4811b77c9704f4
63ef5a38f82d22c1f97922fe490a1fd336566d5c 11-Aug-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of fd923e7 to stage-aosp-master
am: df5d9246f9

Change-Id: I20767244fef48ad42334c5131e2d402f75bb7327
37ddbb43721947d6cb5246ec2cf2a6bd8fc28bcb 11-Aug-2016 Eric Laurent <elaurent@google.com> audiopolicy: fix very verbose logging build

Change-Id: I3a90ba55f85e11c9c2b986479c1dd0fda9059f81
udiopolicy/managerdefault/AudioPolicyManager.cpp
df5d9246f9607b1c2f8b134c46a05af06e206da3 11-Aug-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of fd923e7 to stage-aosp-master

Change-Id: I75b44b89bae41197a1fd68362d20b8ba2b4dd192
fd923e7fe2779bcd69d79471b8c30c8b98918f62 11-Aug-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Fix clang-tidy warnings in audio and playerservice."
e964d4e421e2d1ca937227a580c0c837091a11e3 09-Aug-2016 Chih-Hung Hsieh <chh@google.com> Fix clang-tidy warnings in audio and playerservice.

* Add explicit keyword to conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters.
Bug: 30407689
Test: build with WITH_TIDY=1

Change-Id: I265f3b094e08d5705b506b3fbba51439c134af84
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioWatchdog.h
udioflinger/Effects.cpp
udioflinger/Effects.h
udioflinger/PatchPanel.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udiopolicy/AudioPolicyInterface.h
udiopolicy/common/managerdefinitions/include/AudioInputDescriptor.h
udiopolicy/common/managerdefinitions/include/AudioOutputDescriptor.h
udiopolicy/common/managerdefinitions/include/AudioPolicyMix.h
udiopolicy/common/managerdefinitions/include/AudioPort.h
udiopolicy/common/managerdefinitions/include/DeviceDescriptor.h
udiopolicy/common/managerdefinitions/include/HwModule.h
udiopolicy/common/managerdefinitions/include/IOProfile.h
udiopolicy/common/managerdefinitions/include/SessionRoute.h
udiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioPolicyMix.cpp
udiopolicy/common/managerdefinitions/src/AudioPort.cpp
udiopolicy/common/managerdefinitions/src/DeviceDescriptor.cpp
udiopolicy/common/managerdefinitions/src/HwModule.cpp
udiopolicy/common/managerdefinitions/src/IOProfile.cpp
udiopolicy/common/managerdefinitions/src/SessionRoute.cpp
udiopolicy/enginedefault/src/Engine.h
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
udiopolicy/service/AudioPolicyEffects.h
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
udiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/service/AudioPolicyService.cpp
udiopolicy/service/AudioPolicyService.h
7aeb8c8d4437eb8f45be3ad3828764795e14ad4c 10-Aug-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of 1c10de5 to stage-aosp-master am: 7ad2854adc
am: b8750e114b

Change-Id: I0425db9834a47bc889b739a5e9ca58deb5416742
b8750e114b6fd99768c45233d4b2ffb2b198f5d1 10-Aug-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of 1c10de5 to stage-aosp-master
am: 7ad2854adc

Change-Id: I3779e9173a0d81e1e1be55dd069b520cdf854c14
36d0ca16024820df9a12903d2ac443fabcc180bc 09-Aug-2016 Chih-Hung Hsieh <chh@google.com> Fix clang-tidy warnings in audio and playerservice.

* Add explicit keyword to conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters.
Bug: 30407689
Test: build with WITH_TIDY=1

Change-Id: I265f3b094e08d5705b506b3fbba51439c134af84
Merged-In: I265f3b094e08d5705b506b3fbba51439c134af84
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioWatchdog.h
udioflinger/Effects.cpp
udioflinger/Effects.h
udioflinger/PatchPanel.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udiopolicy/AudioPolicyInterface.h
udiopolicy/common/managerdefinitions/include/AudioInputDescriptor.h
udiopolicy/common/managerdefinitions/include/AudioOutputDescriptor.h
udiopolicy/common/managerdefinitions/include/AudioPolicyMix.h
udiopolicy/common/managerdefinitions/include/AudioPort.h
udiopolicy/common/managerdefinitions/include/DeviceDescriptor.h
udiopolicy/common/managerdefinitions/include/HwModule.h
udiopolicy/common/managerdefinitions/include/IOProfile.h
udiopolicy/common/managerdefinitions/include/SessionRoute.h
udiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioPolicyMix.cpp
udiopolicy/common/managerdefinitions/src/AudioPort.cpp
udiopolicy/common/managerdefinitions/src/DeviceDescriptor.cpp
udiopolicy/common/managerdefinitions/src/HwModule.cpp
udiopolicy/common/managerdefinitions/src/IOProfile.cpp
udiopolicy/common/managerdefinitions/src/SessionRoute.cpp
udiopolicy/enginedefault/src/Engine.h
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
udiopolicy/service/AudioPolicyEffects.h
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
udiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/service/AudioPolicyService.cpp
udiopolicy/service/AudioPolicyService.h
5404ee174dd6b5e312d3a97bc63c2bc8d142012b 09-Aug-2016 Chih-Hung Hsieh <chh@google.com> Fix clang-tidy warnings in camera.

* Add explicit keyword to conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters.
Bug: 30407689
* Use const reference type to avoid unnecessary copy.
Bug: 30413862
Test: build with WITH_TIDY=1

Change-Id: I71d3008da843ba5f1df1a73a320fb2af6ceffa16
Merged-In: I71d3008da843ba5f1df1a73a320fb2af6ceffa16
amera/libcameraservice/CameraDeviceFactory.cpp
amera/libcameraservice/CameraDeviceFactory.h
amera/libcameraservice/CameraFlashlight.cpp
amera/libcameraservice/CameraFlashlight.h
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/Camera2Client.h
amera/libcameraservice/api1/client2/CallbackProcessor.cpp
amera/libcameraservice/api1/client2/CallbackProcessor.h
amera/libcameraservice/api1/client2/Camera2Heap.h
amera/libcameraservice/api1/client2/CaptureSequencer.cpp
amera/libcameraservice/api1/client2/CaptureSequencer.h
amera/libcameraservice/api1/client2/FrameProcessor.cpp
amera/libcameraservice/api1/client2/FrameProcessor.h
amera/libcameraservice/api1/client2/JpegCompressor.cpp
amera/libcameraservice/api1/client2/JpegCompressor.h
amera/libcameraservice/api1/client2/Parameters.h
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
amera/libcameraservice/api1/client2/StreamingProcessor.h
amera/libcameraservice/common/Camera2ClientBase.h
amera/libcameraservice/common/CameraModule.h
amera/libcameraservice/common/FrameProcessorBase.cpp
amera/libcameraservice/common/FrameProcessorBase.h
amera/libcameraservice/device1/CameraHardwareInterface.h
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device2/Camera2Device.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3DummyStream.h
amera/libcameraservice/device3/StatusTracker.h
amera/libcameraservice/utils/AutoConditionLock.h
amera/libcameraservice/utils/ClientManager.h
7ad2854adc0abe8dd7909a6ed401107ad09bc3d2 10-Aug-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of 1c10de5 to stage-aosp-master

Change-Id: I1e395ecb96524c18348b9f65c96d60c9eae9be45
1c10de5b7bafaa7886bf6c9f61d435aeb2b1e7f4 10-Aug-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Fix clang-tidy warnings in mediaresourcemanager."
5a3b6ca5ac9afd58532b474d229a34d25ff90c94 09-Aug-2016 Chih-Hung Hsieh <chh@google.com> Fix clang-tidy warnings in mediaresourcemanager.

* Add explicit keyword to conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters.
Bug: 30407689
Test: build with WITH_TIDY=1

Change-Id: I9aac64b379ddb77a9abb4b03a6648f38e2a756ab
Merged-In: I9aac64b379ddb77a9abb4b03a6648f38e2a756ab
ediaresourcemanager/ResourceManagerService.cpp
ediaresourcemanager/ResourceManagerService.h
ediaresourcemanager/ServiceLog.h
ediaresourcemanager/test/ResourceManagerService_test.cpp
f732e0726c5e0c4a1460e2dfa8c39e7a9a697ae9 04-Aug-2016 Eric Laurent <elaurent@google.com> audiopolicy: modify A2DP suspend logic

Do not suspend A2DP output if no SCO device is connected.
This allows playing ringtones on devices with A2DP profile only.

Bug: 29913018
Change-Id: I93bf2d3491c634a5fb2b8ac8283ef26faaf1ab53
udiopolicy/managerdefault/AudioPolicyManager.cpp
f6d5a13c3a7a84e35e28b9840dde0f29728b6849 10-Aug-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix clang-tidy warnings in mediaresourcemanager."
77e19d9fee44b11f0f7ed492b14655ca4a7633f0 10-Aug-2016 Chih-Hung Hsieh <chh@google.com> Merge "Fix clang-tidy warnings in soundtrigger." am: 3ba2cb78bf am: df76b96050 am: e298399890
am: 4fd3791006

Change-Id: Ia6c762a7390317fa53fdd20e0fcd8037e4b255c5
8a9a639d53d56d9a923b7dcf9f5069b9463a568a 10-Aug-2016 Chih-Hung Hsieh <chh@google.com> Merge "Fix google-explict-constructor warnings in radio." am: f53c1d182d am: dd25bc5143 am: 540360d114
am: 0e5c72c19d

Change-Id: Ia57575d73f9fcef5dbf63c9a7b1be0a3d7f810e4
4fd3791006c5099cf14f477f61a74a9a63a0a42c 10-Aug-2016 Chih-Hung Hsieh <chh@google.com> Merge "Fix clang-tidy warnings in soundtrigger." am: 3ba2cb78bf am: df76b96050
am: e298399890

Change-Id: I4a99588b14166eff428fdd8a3152e8e60244bd7d
0e5c72c19dcdd9f1475a858ec3a5451c437bd5dc 10-Aug-2016 Chih-Hung Hsieh <chh@google.com> Merge "Fix google-explict-constructor warnings in radio." am: f53c1d182d am: dd25bc5143
am: 540360d114

Change-Id: I649d27141668be8dcb5ce55ae5497a3d208e645c
e298399890890961495c7d97be2f447d3a4b4c65 10-Aug-2016 Chih-Hung Hsieh <chh@google.com> Merge "Fix clang-tidy warnings in soundtrigger." am: 3ba2cb78bf
am: df76b96050

Change-Id: I8cdf2c40445b5ec21eb0d1e90032a80287ffbd3d
540360d114feeee962d32ad92f35dd0a8c620f09 10-Aug-2016 Chih-Hung Hsieh <chh@google.com> Merge "Fix google-explict-constructor warnings in radio." am: f53c1d182d
am: dd25bc5143

Change-Id: Ib52041987d42da26749d78019347f971dd75602e
df76b9605008434bb1fd520c8affe4fa3955e981 10-Aug-2016 Chih-Hung Hsieh <chh@google.com> Merge "Fix clang-tidy warnings in soundtrigger."
am: 3ba2cb78bf

Change-Id: Ib9481a6bb666c75b8c0c1db5fc8f480cc85a266a
dd25bc5143da1db9081e7d95b66928b0ddf873c1 10-Aug-2016 Chih-Hung Hsieh <chh@google.com> Merge "Fix google-explict-constructor warnings in radio."
am: f53c1d182d

Change-Id: I5973845ffdd43d318ba1058c4c03432d78dbf733
3ba2cb78bfe38cfb9a44a183bb66c82a5f2d4daa 10-Aug-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Fix clang-tidy warnings in soundtrigger."
8b0b971b1416738f22488a80be726d1ec12552a8 09-Aug-2016 Chih-Hung Hsieh <chh@google.com> Fix clang-tidy warnings in camera.

* Add explicit keyword to conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters.
Bug: 30407689
* Use const reference type to avoid unnecessary copy.
Bug: 30413862
Test: build with WITH_TIDY=1

Change-Id: I71d3008da843ba5f1df1a73a320fb2af6ceffa16
amera/libcameraservice/CameraFlashlight.cpp
amera/libcameraservice/CameraFlashlight.h
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/Camera2Client.h
amera/libcameraservice/api1/client2/CallbackProcessor.cpp
amera/libcameraservice/api1/client2/CallbackProcessor.h
amera/libcameraservice/api1/client2/Camera2Heap.h
amera/libcameraservice/api1/client2/CaptureSequencer.cpp
amera/libcameraservice/api1/client2/CaptureSequencer.h
amera/libcameraservice/api1/client2/FrameProcessor.cpp
amera/libcameraservice/api1/client2/FrameProcessor.h
amera/libcameraservice/api1/client2/JpegCompressor.cpp
amera/libcameraservice/api1/client2/JpegCompressor.h
amera/libcameraservice/api1/client2/Parameters.h
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
amera/libcameraservice/api1/client2/StreamingProcessor.h
amera/libcameraservice/common/Camera2ClientBase.h
amera/libcameraservice/common/CameraModule.h
amera/libcameraservice/common/FrameProcessorBase.cpp
amera/libcameraservice/common/FrameProcessorBase.h
amera/libcameraservice/device1/CameraHardwareInterface.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3DummyStream.h
amera/libcameraservice/device3/StatusTracker.h
amera/libcameraservice/utils/AutoConditionLock.h
amera/libcameraservice/utils/ClientManager.h
51873d8ccad9b4466f4f7898612b08213782fedb 09-Aug-2016 Chih-Hung Hsieh <chh@google.com> Fix clang-tidy warnings in mediaresourcemanager.

* Add explicit keyword to conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters.
Bug: 30407689
Test: build with WITH_TIDY=1

Change-Id: I9aac64b379ddb77a9abb4b03a6648f38e2a756ab
ediaresourcemanager/ResourceManagerService.cpp
ediaresourcemanager/ResourceManagerService.h
ediaresourcemanager/ServiceLog.h
ediaresourcemanager/test/ResourceManagerService_test.cpp
62503ee0031d51532b4780df77a053435c983f58 09-Aug-2016 Chih-Hung Hsieh <chh@google.com> Fix google-explict-constructor warnings in radio.

* Add explicit keyword to conversion constructors.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: I15359f74d6587d691a8cb35445732aff44188268
adio/RadioService.h
85f8a73d29ae4aa4ed7a6445a88ded802077a58b 09-Aug-2016 Chih-Hung Hsieh <chh@google.com> Fix clang-tidy warnings in soundtrigger.

* Add explicit keyword to conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters.
Bug: 30407689
Test: build with WITH_TIDY=1

Change-Id: I28b251c99c78286a2da1e039df470a3f0bd8abe2
oundtrigger/SoundTriggerHwService.cpp
oundtrigger/SoundTriggerHwService.h
5a4af2945ab7557883a8b052915cd7dcf7825edc 09-Aug-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: use wp for NotificationListener am: e1c8063521 am: ece9e36367
am: 04a0551e44

Change-Id: I2b2afca9cc6ff3bdbd98c1d2c325bdfa0b47627f
04a0551e4488c267422e87faa416e37e28c61c73 09-Aug-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: use wp for NotificationListener am: e1c8063521
am: ece9e36367

Change-Id: Ib04667dd002186aa5b4f401f58209a48b436cc81
e1c8063521b0645b091b080d896106b2e6fd8670 08-Aug-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: use wp for NotificationListener

Bug: 30737827
Change-Id: I01b8bee39fe329bf250b9179a84a8928d209a357
amera/libcameraservice/common/Camera2ClientBase.cpp
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
d47d36bd32e75bec011e5682ee44a4ce617e8546 05-Aug-2016 Chien-Yu Chen <cychen@google.com> CameraService: Notify flashlight about device close am: e4fe21bb7c am: 0406286002
am: 203d7b2d37

Change-Id: I363aede4ecb0a91a04bcd44bf4866811faed5a87
203d7b2d37828dfa2a34f1848170e1022f27d7de 05-Aug-2016 Chien-Yu Chen <cychen@google.com> CameraService: Notify flashlight about device close am: e4fe21bb7c
am: 0406286002

Change-Id: Ie4d5274f0847e4bfd2a8a1d26fede1a3827fe1bc
04062860026937238e20c675e29c2c6e11366431 05-Aug-2016 Chien-Yu Chen <cychen@google.com> CameraService: Notify flashlight about device close
am: e4fe21bb7c

Change-Id: Ieeb6a6170fab4c55a515e685f5e6555b22444200
bb8526358b9bf09ffc79b8f54dd57140df4fb2d6 05-Aug-2016 Chien-Yu Chen <cychen@google.com> Merge "CameraService: Notify flashlight about device close" into nyc-mr1-dev
f8194ffb1c4b1fa1b94294191aee8ba12a3633d4 05-Aug-2016 Eric Laurent <elaurent@google.com> audio policy: fix call volume over USB am: 5f5fca540c am: 8c3c46b795
am: 9d838d70e1

Change-Id: I205db77eafdccc69c345e048a87e093c2af4f220
9d838d70e129eee4eb66202731c436152f9de304 05-Aug-2016 Eric Laurent <elaurent@google.com> audio policy: fix call volume over USB am: 5f5fca540c
am: 8c3c46b795

Change-Id: I4d2f4aac4328831730d38699dc540cef15e8b32f
8c3c46b79524ee9eb096e458f1713c4def04a3f0 05-Aug-2016 Eric Laurent <elaurent@google.com> audio policy: fix call volume over USB
am: 5f5fca540c

Change-Id: I5be42e32f48cadcd2c635fe65506928ea757a4da
065d4e648df62386895059a03209a02b99e028a2 04-Aug-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix call volume over USB" into nyc-mr1-dev
e4fe21bb7cef893cd38bd194ea880333389aea38 04-Aug-2016 Chien-Yu Chen <cychen@google.com> CameraService: Notify flashlight about device close

Always notify flashlight about device close when device is
disconnected.

Bug: 30485086
Change-Id: Id537c32413f4df9d12c405538ceab2974d3ab319
amera/libcameraservice/CameraService.cpp
5f5fca540ce22d2f9caff1c823b2d5b637904729 04-Aug-2016 Eric Laurent <elaurent@google.com> audio policy: fix call volume over USB

Make sure the cache of output device selection per strategy is updated
also when an input device is connected or disconnected as the list of
input devices sometimes impacts the output device selection in
getDeviceForStrategy().

Bug: 30659619
Change-Id: Ie9f7bafda0074afcc803f309379c35b538f50170
udiopolicy/managerdefault/AudioPolicyManager.cpp
d8f72540a4a792718cd7a46a9348c3face19baf6 04-Aug-2016 Eric Laurent <elaurent@google.com> audioflinger: fix effect volume set on start. am: e7449bf60c am: c23aecc0b2
am: 631a40a343

Change-Id: I1f6b3e9a042a1c66ae2d2b91247432ecb61f7162
631a40a343fb4bf21414fd5b62ef59590e6cdcdc 04-Aug-2016 Eric Laurent <elaurent@google.com> audioflinger: fix effect volume set on start. am: e7449bf60c
am: c23aecc0b2

Change-Id: I764c5ef445b595d73e8efb12b3e240d7f214e486
e7449bf60c861f1dea7510f706004dfdb5efb2a7 04-Aug-2016 Eric Laurent <elaurent@google.com> audioflinger: fix effect volume set on start.

commit fa1e123f forced effect volume to be re applied when
an effect is enabled regardless of the fact that the volume was
already set or not on the effect chain. This caused a systematic
volume command to be send with an invalid value immediately
followed by the correct value.

Bug: 30458082
Change-Id: Ida4b5d7e96c2d4da298589c37c2ce98541a9396a
udioflinger/Effects.cpp
d713abb42498a299fd88a05fc7095df8cb890062 03-Aug-2016 Eric Laurent <elaurent@google.com> audioflinger: fix effect volume control delay am: fa1e123f3f am: 3f4c98bdfa
am: 38ee5ebf5f

Change-Id: I5d7826e606336f71443fa312d94668cf22168144
38ee5ebf5f55cc4c143e817702b5a758d09a9bc8 03-Aug-2016 Eric Laurent <elaurent@google.com> audioflinger: fix effect volume control delay am: fa1e123f3f
am: 3f4c98bdfa

Change-Id: I31bbe81e472ae3f9ab00ceb625e7d0627e57983e
fa1e123f3fffe1eb3d6c284e19014815835e22d6 03-Aug-2016 Eric Laurent <elaurent@google.com> audioflinger: fix effect volume control delay

Fix delay between effect enable and forced volume update on
offload threads.

Bug: 30458082
Change-Id: I4222ccde8c6d0bb834c525d3746bd668654f50f3
udioflinger/Effects.cpp
udioflinger/Effects.h
2f5f8bd49e8c2a4dc1698624ca81f162351cbeb6 02-Aug-2016 Zhijun He <zhijunhe@google.com> Camera3: don't let dequeueBuffer block indefinitely am: f0645c19a8 am: 1e8e893f8e
am: 4f370c878c

Change-Id: I7ece7f7b45f2a4f240cc89f7b3fbcc1d71945a26
4f370c878cd8e21f5926d089b7a3cd73045f8433 02-Aug-2016 Zhijun He <zhijunhe@google.com> Camera3: don't let dequeueBuffer block indefinitely am: f0645c19a8
am: 1e8e893f8e

Change-Id: If07a6286dc670e03be6ac2a65d7db650c8d2f8f5
f0645c19a8c8433766f4cb6edff7fca5db8017bf 02-Aug-2016 Zhijun He <zhijunhe@google.com> Camera3: don't let dequeueBuffer block indefinitely

The synchronous consumers (e.g. ImageReader) may be very slow when the
clients have computational intensive image processings. When system
load is high, these processing will be even much slower. This could
starve the producer side and then cause dequeue/attach buffer block
indefinitely. If clients intends to close the capture session, right
after a capture request is submitted, the waitUntil drain could be
blocked indefinitely if the capture request dequeue buffer call is
blocked indefinitely, as the request thread will never become idle until
the last dequeue buffer is done and the request is sent.This indefinite
getBuffer() blocking could easily trigger the waitUntilDrained 5s timeout
thus put the camera device into error state although there is nothing
bad happening in the HAL.

Introducing the timeout will avoid such bad situation. When consumer is
slow, there will be no new request being sent to HAL, as there is really
no new buffer available.

Bug:30404840
Change-Id: Ibf08d2745911203bce6f31130800707f36d7f985
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.h
b7809a709886c5dc58e737cd3c356579a088dc65 02-Aug-2016 Eric Laurent <elaurent@google.com> audioflinger: fix OutputTrack initial check am: af3ec7c9a0 am: 5271857554
am: 54efaa90a1

Change-Id: I7c4f4db022099abbcd20cdfb0971efa2d46998f6
54efaa90a110e50b1b9a5e4badaf30d494be56a0 02-Aug-2016 Eric Laurent <elaurent@google.com> audioflinger: fix OutputTrack initial check am: af3ec7c9a0
am: 5271857554

Change-Id: Icf61ce31fb83cc5796be5122c65b483437b17365
af3ec7c9a0cfc483017d4457e0e3d77de4b1a33a 01-Aug-2016 Eric Laurent <elaurent@google.com> audioflinger: fix OutputTrack initial check

Call initCheck() on newly created OutputTrack in
DuplicatingThread::addOutputTrack() to make sure that
the track is successfully attached to the AudioMixer.

Also make invalid track name always fatal in AudioMixer::deleteTrackName().

Bug: 29953737
Change-Id: I47f2517bd53de940e125391de99c40611ad0fc9d
udioflinger/AudioMixer.cpp
udioflinger/Threads.cpp
57ef37350cd88ded7b83a2f4362fcbaab36f9372 29-Jul-2016 Andy Hung <hunga@google.com> Merge "Flush FastCapture PipeReader when starting after stop"
f2c7f0043f13a0317e343082d3dc2913d3699f70 29-Jul-2016 Andy Hung <hunga@google.com> Merge \\\"AudioFlinger: Account for frames dropped in suspend mode\\\" into nyc-mr1-dev am: f769ab76d1 am: 4166015417
am: 648bc951b8

Change-Id: I23516b04456b3d8f49c44ca42f4e62bd8dc134e4
6d988186ffa998a1e28251b3e655cfcbccca9db5 29-Jul-2016 Andy Hung <hunga@google.com> AudioFlinger: Account for frames dropped in suspend mode am: 238fa3deff am: ef0eed3d26
am: 5c42082da7

Change-Id: I9c51ed42c901c054fd25e7629725655d763ff390
648bc951b86860dd11463340029eaef4b4d90003 29-Jul-2016 Andy Hung <hunga@google.com> Merge \\"AudioFlinger: Account for frames dropped in suspend mode\\" into nyc-mr1-dev am: f769ab76d1
am: 4166015417

Change-Id: Ied8c294777ddf380876197fe620c8931e681deb5
5c42082da799fa6469321e621216922444678900 29-Jul-2016 Andy Hung <hunga@google.com> AudioFlinger: Account for frames dropped in suspend mode am: 238fa3deff
am: ef0eed3d26

Change-Id: I0790c3ac10654142856c9e252277fc3c7880b7c4
416601541797b132ee8abe1e1d15d773ad975ce5 29-Jul-2016 Andy Hung <hunga@google.com> AudioFlinger: Prevent offload underrun during active playback
am: f804475807

Change-Id: Iefc9c73590b5aede7ef3ee1a2eaf728bdd01113e
ef0eed3d26e54c176b813fb7656c1cfb2c473062 29-Jul-2016 Andy Hung <hunga@google.com> AudioFlinger: Account for frames dropped in suspend mode
am: 238fa3deff

Change-Id: I7a4ca332e3f75cdd4002821f29ed3b7334d5d193
f929f9b203ef4787d45f8b24aab053aaab993be9 29-Jul-2016 Andy Hung <hunga@google.com> Merge "AudioFlinger: Prevent offload underrun during active playback" into nyc-mr1-dev
f769ab76d185a63e6da12f58fe902e977f1ad0fd 29-Jul-2016 Andy Hung <hunga@google.com> Merge "AudioFlinger: Account for frames dropped in suspend mode" into nyc-mr1-dev
238fa3deff26d7e4d9e81bd0a88c936f16226c4e 28-Jul-2016 Andy Hung <hunga@google.com> AudioFlinger: Account for frames dropped in suspend mode

These frames must be added to the kernel position in timestamps.

Bug: 30025777
Change-Id: I30c14503c9467059c3782e5c96c01ae1cf3709f6
udioflinger/Threads.cpp
udioflinger/Threads.h
bcb918b955a36a79aa908f392fb8a7b1cdd405f8 28-Jul-2016 Eric Laurent <elaurent@google.com> audio policy: fixed delayed voice volume commands am: baf35feefc am: 63fb42a81d
am: b7e9c3b4d8

Change-Id: I751778ef048e6820ce1e71762aa83e00c1022271
b7e9c3b4d88582f040857d8733e6b0b43c2d774f 28-Jul-2016 Eric Laurent <elaurent@google.com> audio policy: fixed delayed voice volume commands am: baf35feefc
am: 63fb42a81d

Change-Id: Ia38547c4465e8a2a29a025490054d0b9e67b3ecd
f804475807407442d5596ab7378ed07d50664063 27-Jul-2016 Andy Hung <hunga@google.com> AudioFlinger: Prevent offload underrun during active playback

Bug: 29897830
Change-Id: Id99d416cdaa8bf62daca8f92e3564f2895f15490
udioflinger/Threads.cpp
udioflinger/Threads.h
baf35feefcd14c13a6bf5ff5b651d9f22c2c3de0 28-Jul-2016 Eric Laurent <elaurent@google.com> audio policy: fixed delayed voice volume commands

Apply same rule as for stream volume in case of delayed voice volume
command: this prevents a delayed command to cancel a non delayed
command sent after.

Bug: 30421096
Change-Id: I576db5eba9498c811c3a6493b3c17e1f02b1b1a1
udiopolicy/service/AudioPolicyService.cpp
58dc062f2a9e029a1ffceb98f109f44127533db9 27-Jul-2016 Zhijun He <zhijunhe@google.com> Camera3Device: make request thread SCHED_FIFO for all cases am: 7ee4c0778c
am: d22e96cc12

Change-Id: Ib511566ea5c63385cbafbe2d010e0a0a24c1a768
d22e96cc1250d74b2c869ccd0baf788976caa305 27-Jul-2016 Zhijun He <zhijunhe@google.com> Camera3Device: make request thread SCHED_FIFO for all cases
am: 7ee4c0778c

Change-Id: Ib4b1fd28e74b88c94b6727112e2a9397f015d812
ca8cc535cd308cd4e7095037b3b3e327e66581be 27-Jul-2016 Zhijun He <zhijunhe@google.com> Merge "Camera3Device: make request thread SCHED_FIFO for all cases" into nyc-mr1-dev
7ee4c0778c75a54cccf5ce82bd296e0dadcccb24 25-Jul-2016 Zhijun He <zhijunhe@google.com> Camera3Device: make request thread SCHED_FIFO for all cases

To mitigate the request thread CPU starvation for system highly loaded
situation.

Bug: 30357698
Bug: 28313712
Change-Id: Ied30103ce7245e139580219cce99d743b657307e
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
f484d53675efb09b72fdf0d543b4e35dceceb2cf 27-Jul-2016 Eric Laurent <elaurent@google.com> audio policy: reduce audio routing commands trafic. am: 77305a6730
am: e45b4d49d3

Change-Id: I65cea7e3fee974c76d0afc13c4498eda7621016e
e45b4d49d3fe299d6975f6b943858f46992bee8b 27-Jul-2016 Eric Laurent <elaurent@google.com> audio policy: reduce audio routing commands trafic.
am: 77305a6730

Change-Id: I786ba21caef6d2c3c1142701337295de5565260c
77305a67301c74438ee09fdb8f80b89a43712951 26-Jul-2016 Eric Laurent <elaurent@google.com> audio policy: reduce audio routing commands trafic.

Restrict conditions under which we force a routing change
when an output becomes active to reduce the number of useless
binder calls, context switches and pausing of fast mixer thread.

Bug: 29345846
Change-Id: I492412f0475d6f3d1882af0b85ee0efcfac2b5e5
udiopolicy/managerdefault/AudioPolicyManager.cpp
14bb98ab2e64e1eeee59430605844bf6a61ecfb4 25-Jul-2016 Eric Laurent <elaurent@google.com> audioflinger: keep wakelock during offload drain am: de0613d0ad
am: 1c1fb278be

Change-Id: I0784669e9539d6251fc29ef328cd73280cb93e55
1c1fb278beee64ed090c2257e7fd2c7406730751 25-Jul-2016 Eric Laurent <elaurent@google.com> audioflinger: keep wakelock during offload drain
am: de0613d0ad

Change-Id: Id20b661196f44ae093308e988f3aec9505732343
de0613d0ad8b8fb9d19a27185ae4d307a5b7fb9d 23-Jul-2016 Eric Laurent <elaurent@google.com> audioflinger: keep wakelock during offload drain

Even if ro.audio.offload_wakelock property is false we must
keep wakelock during offload drain seuqnce due to some driver
implementations risking to let the system enter suspend.

This restores functionality in commit 078538cfc6.

Bug: 30151948
Change-Id: Ib3a3e5c7e173ad7b1776817b81427932bfd16bf0
udioflinger/Threads.h
24b366ecd2d66af4fd6147c910460f2d68785b0f 21-Jul-2016 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Wait for empty in-flight map when waiting for idle

Currently we only wait for the request queue to be idle, and for
all outstanding buffers to be returned to their queues and their
fences triggered.

But we also need to wait for result metadata to arrive for all
in-flight requests. This is simplest to check for by monitoring
entries in the in-flight map and signaling idle/active to the
status tracker when the map becomes empty/nonempty.

Bug: 30282459
Change-Id: I34275b0fdb4f279783291d300707ac21a6aa5249
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
e4df8abe28ca2da39dcacc4f3396ba9aea7cfdb3 21-Jul-2016 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Wait for empty in-flight map when waiting for idle

Currently we only wait for the request queue to be idle, and for
all outstanding buffers to be returned to their queues and their
fences triggered.

But we also need to wait for result metadata to arrive for all
in-flight requests. This is simplest to check for by monitoring
entries in the in-flight map and signaling idle/active to the
status tracker when the map becomes empty/nonempty.

Bug: 30282459
Change-Id: I34275b0fdb4f279783291d300707ac21a6aa5249
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
a4c20889fee2290539ef1f8318f50abf62c52dfc 21-Jul-2016 Eric Laurent <elaurent@google.com> Merge \\"audio policy: workaround for truncated touch sounds\\" into nyc-mr1-dev am: 0493cca1ba
am: afaf9cd17b

Change-Id: Ie88e2b2fa5150d6768ec41c1d872e3d417b1c2e4
afaf9cd17b01b6dd0d19dee96aa6cab03f4acf69 21-Jul-2016 Eric Laurent <elaurent@google.com> Merge \"audio policy: workaround for truncated touch sounds\" into nyc-mr1-dev
am: 0493cca1ba

Change-Id: Ifc7988fe9bf93ce9dd3197ce6f841e133abbada4
0493cca1ba6c59a2da08555fbc1aa67860bdcb3f 21-Jul-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: workaround for truncated touch sounds" into nyc-mr1-dev
dc46286bf57fefc9f08ece3018b91acec7687f85 19-Jul-2016 Eric Laurent <elaurent@google.com> audio policy: workaround for truncated touch sounds

Implement workaround to avoid touch sound truncation when
audio path or volume changes are triggered by user actions.

Also:
- Fix regression introduced by commit c75307b7 causing failure
to honor playback start delay in case of path change.
- Fix failure to report path switch delay in updateCallRouting().
- Make sure we delay temporary mute according to requested device
switch delay in checkDeviceMuteStrategies().

Bug: 29528161
Bug: 27535199
Change-Id: Id729579b6623ee67a767055b9aca7d2e2dde8491
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
ad6d52d38917069e3d8e68cec1625855b9d96200 18-Jul-2016 Andy Hung <hunga@google.com> Flush FastCapture PipeReader when starting after stop

Discards stale frames.

Bug: 30199985
Change-Id: Ie93a3784bf052aba6989d2ff1be92b1980b0c207
udioflinger/Threads.cpp
b566e2ed097985da01d4218a3216b45049b25767 20-Jul-2016 Andy Hung <hunga@google.com> Merge \\"Only read timestamps from HAL if not FastCapture\\" into nyc-mr1-dev am: b5aac433cd
am: cbbb9a50d3

Change-Id: Ic983502e4b1802208deb3bd85cd537caa45314c9
cbbb9a50d30360794724a0eecc10fff726706cec 20-Jul-2016 Andy Hung <hunga@google.com> Merge \"Only read timestamps from HAL if not FastCapture\" into nyc-mr1-dev
am: b5aac433cd

Change-Id: I35220717ab32936421a8dc906c4af2cac979a5f5
b5aac433cda041c1fde2fcfadf1835f3f8d19eeb 20-Jul-2016 Andy Hung <hunga@google.com> Merge "Only read timestamps from HAL if not FastCapture" into nyc-mr1-dev
322e96e420d6ea4adc1f312f23b88dc4b205dfb9 19-Jul-2016 Glenn Kasten <gkasten@google.com> Merge \\"Fix build error in tee sink\\" into nyc-mr1-dev am: 542cb3f429
am: b78d2df84c

Change-Id: Id4dc7cf19e5dc19b73cd49d976deacf8aba898e3
b78d2df84cfc926142ad95ba35e8ec6ab2f74eb3 19-Jul-2016 Glenn Kasten <gkasten@google.com> Merge \"Fix build error in tee sink\" into nyc-mr1-dev
am: 542cb3f429

Change-Id: Ib37734943602043786c9674e9ff5bf802864aa39
542cb3f42970275b9d6828d409ba697dab202861 19-Jul-2016 Glenn Kasten <gkasten@google.com> Merge "Fix build error in tee sink" into nyc-mr1-dev
fbd87e8b685d1b1511bc40e232f9e7674271d57b 19-Jul-2016 Glenn Kasten <gkasten@google.com> Fix build error in tee sink

Bug: 30203029
Change-Id: I4b595c81f570fd12f7a1c7deb6db7e3139276481
udioflinger/AudioFlinger.cpp
383dabeee2fce89cd8ac90f28f614b8e465e2a09 18-Jul-2016 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Add dumpsys monitoring of request/result metadata am: 4d453830b6
am: b4115063f4

Change-Id: Icba367ecea8d67e1c5753346e430facfd560e850
b4115063f468216510cb9265962b7fb942212e28 18-Jul-2016 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Add dumpsys monitoring of request/result metadata
am: 4d453830b6

Change-Id: Iefb0f526d0d6d8d667fd1c3c3e4637db6624c276
69ce44d164c7b9963c06cb96ea9d25cf99e069c9 18-Jul-2016 Andy Hung <hunga@google.com> Only read timestamps from HAL if not FastCapture

Prevents blocking FastCapture from the RecordThread

Bug: 29392543
Change-Id: Icd00534677be121bc4f4e9a7a6bd5b44f6f14f50
udioflinger/Threads.cpp
4d453830b6a8fb7571a88a9a241eabd50a483c44 15-Jul-2016 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Add dumpsys monitoring of request/result metadata

Add new -m dumpsys option to cameraservice dump for monitoring
changes in selected metadata values in requests and results.

This option takes a comma-separated list of metadata keys, or the
shortcut value "3a", which expands to all the "android.control" tags.

In subsequent dumpsys calls, the last 100 changes to the tags being
monitored are listed.

The monitoring must be turned on once the camera device is running.

Bug:
Change-Id: If8938b30611ccafa86c2c4a06e57fc72680f827b
amera/libcameraservice/Android.mk
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/utils/TagMonitor.cpp
amera/libcameraservice/utils/TagMonitor.h
d7e04b3fe9f61fdba21116dd7c50b86979fe2497 18-Jul-2016 Eric Laurent <elaurent@google.com> Merge \\"AudioFlinger: fix offload volume on resume\\" into nyc-mr1-dev am: cecb30a22f
am: 97a480927d

Change-Id: I00f8643d420ab63ce63658aebb98794c7517958c
97a480927d83e4d79ec915a86262ac3489377bff 18-Jul-2016 Eric Laurent <elaurent@google.com> Merge \"AudioFlinger: fix offload volume on resume\" into nyc-mr1-dev
am: cecb30a22f

Change-Id: I7c4165affd590a4f43d631006e02f92bc4fd0a9e
cecb30a22f3657483f07f259231b81b02b2a7305 18-Jul-2016 Eric Laurent <elaurent@google.com> Merge "AudioFlinger: fix offload volume on resume" into nyc-mr1-dev
3df841a10b4d553949c518ad52f1af8dcb365058 16-Jul-2016 Eric Laurent <elaurent@google.com> AudioFlinger: fix offload volume on resume

Make sure that new volume is sent to audio effects and HAL
immediately upon resuming playback on direct and offload threads.

Also make sure that only the latest active track on thread controls
volume.

Bug: 30057465
Change-Id: I846958b4aae5abd3740b8a2545b57bd8f3614031
udioflinger/Threads.cpp
8221d9e855909c8e097f5f0e986755baca4dd1b7 15-Jul-2016 Glenn Kasten <gkasten@google.com> Distinguish systrace timelines for playback and capture am: f9715e43ea
am: 78f9c3ad66

Change-Id: If66bafab6f0cd2aa1f5478b963faec0632f297ca
78f9c3ad666d832d423550ded32f3626abbe6e28 15-Jul-2016 Glenn Kasten <gkasten@google.com> Distinguish systrace timelines for playback and capture
am: f9715e43ea

Change-Id: I67d7f23998c10a554d53cea37ad443ca1fad3f6f
f9715e43ea73361321663514c44129c939c5db2f 13-Jul-2016 Glenn Kasten <gkasten@google.com> Distinguish systrace timelines for playback and capture

Bug: 30120068
Change-Id: If416540f0785e83e7b1e8ba986ee55b5b9298a2a
udioflinger/FastCapture.cpp
udioflinger/FastMixer.cpp
udioflinger/FastThread.cpp
udioflinger/FastThread.h
udioflinger/Threads.cpp
8da2d981fb78fd75f9d0d2cab9c23fb651be334d 14-Jul-2016 Eric Laurent <elaurent@google.com> Merge \\"AudioFlinger: fix capture stop sequence\\" into nyc-mr1-dev am: a5bcf56619
am: d7fdb3b5c3

Change-Id: Icd9355083c77ae2e0b7fb2ed12d675105483d3dd
d7fdb3b5c3f8eca33b7462cc46093752d47203c1 14-Jul-2016 Eric Laurent <elaurent@google.com> Merge \"AudioFlinger: fix capture stop sequence\" into nyc-mr1-dev
am: a5bcf56619

Change-Id: I17cde8f3113d5371e24ce1d4adafa2413752b0e3
a5bcf56619a70b0b46c737a29d873bbff8fb77a4 14-Jul-2016 Eric Laurent <elaurent@google.com> Merge "AudioFlinger: fix capture stop sequence" into nyc-mr1-dev
5c25d5637ef3406883e0fc97a713f9d5cdca426f 14-Jul-2016 Eric Laurent <elaurent@google.com> AudioFlinger: fix capture stop sequence

Make sure that the HAL input stream is actually in standby when audio policy
is notified by stopInput().
There was a race condition where it was possible for a new capture stream to be started
in the interval between stopInput() notification and input stream going into
standby because of the state update and sleep sequence in the record thread loop.

Also make sure we interrupt the sleep period if a command is pending.

Bug: 29865791
Change-Id: Ife720fbd2e5d0df8792669dc724b1fd70f63ab8a
udioflinger/Threads.cpp
2eae53c0128428f936ea1dc6b75e583c30ef1e25 12-Jul-2016 Chris Larsen <chris.larsen@imgtec.com> Use symbolic name for return value in legacy audio policy client

Change-Id: Id27628afcbc4eb2c9bf1313c8376802a47a9596c
udiopolicy/service/AudioPolicyClientImplLegacy.cpp
d91a420f234e2ec0ccc4d156a56297832e21d4a6 13-Jul-2016 Glenn Kasten <gkasten@google.com> Merge commit \'885dd7136a999d21219a4cc9034f20ef688c0625\' into manual_merge_885dd71
am: edab4257fa

Change-Id: I04abc72767b31fbdfd6ee82c239fbc4a94421a82
edab4257fa821c91c6e5a64cda78c9c38ea905c0 13-Jul-2016 Glenn Kasten <gkasten@google.com> Merge commit '885dd7136a999d21219a4cc9034f20ef688c0625' into manual_merge_885dd71

Change-Id: I871b103643cabab183bc24c1ce40930c7a083c79
885dd7136a999d21219a4cc9034f20ef688c0625 13-Jul-2016 Glenn Kasten <gkasten@google.com> Merge "Enable strict warning checks and fix" into nyc-mr1-dev
aca4545ddc6e83d66dda67b1c4894fef6ce451cf 13-Jul-2016 Ricardo Garcia <rago@google.com> Merge \\"Fix to usage of upper bound value in volume curve\\" into nyc-mr1-dev am: e37b911fbf
am: dc14a4d146

Change-Id: Iab9da655cae8055278d76f3853dab903e0efe058
dc14a4d146ff4cf1a00b1d2b02646134a31412e6 13-Jul-2016 rago <rago@google.com> Merge \"Fix to usage of upper bound value in volume curve\" into nyc-mr1-dev
am: e37b911fbf

Change-Id: Ibd302c8ef01a6f4ad81b4d9da226b9cdee8d6a9c
e37b911fbf70c15c652db8585bca2a5f035d9def 13-Jul-2016 Ricardo Garcia <rago@google.com> Merge "Fix to usage of upper bound value in volume curve" into nyc-mr1-dev
d362a52b836ebc2a12620b6f1932ae042a81d2e7 12-Jul-2016 rago <rago@google.com> Fix to usage of upper bound value in volume curve

Bug: 29627411
Change-Id: Iffe3bf69bf4b49cd76ffe00b16ebce1ab81c4631
udiopolicy/common/managerdefinitions/src/VolumeCurve.cpp
4099f1a290c4b7980681afa7ba562e6c2450380e 12-Jul-2016 Eric Laurent <elaurent@google.com> Merge \\"audioflinger: async callback error handling\\" into nyc-mr1-dev am: 93540a6b59
am: 6a7f864490

Change-Id: I289e192efe71c599229a10771a08d8685a75dd57
6a7f864490766020ef791d6c803364fdb7e79cbb 12-Jul-2016 Haynes Mathew George <hgeorge@codeaurora.org> Merge \"audioflinger: async callback error handling\" into nyc-mr1-dev
am: 93540a6b59

Change-Id: Ifa8e386c0da9e30b90884e0a787e581ace151c64
93540a6b596b1660a453d344573571462a7e6587 12-Jul-2016 Eric Laurent <elaurent@google.com> Merge "audioflinger: async callback error handling" into nyc-mr1-dev
bbe0cfb249f872fe68215fd1baa7d6426aef2d16 12-Jul-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge \\"Fix non-offloadable effect creation on offload threads\\" into nyc-mr1-dev am: b28d6117a5
am: 8611d5135b

Change-Id: I038d377d8489b95f6eb119f27fd968e97bd83b14
8611d5135b6a62cc4bbf89404090c9f6ac3245f5 12-Jul-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge \"Fix non-offloadable effect creation on offload threads\" into nyc-mr1-dev
am: b28d6117a5

Change-Id: I273585d967945cadddcd70d10514dabb64b1f2e3
1229ae8317797917ebd14c9f46debcb9d5f44c6a 12-Jul-2016 Eric Laurent <elaurent@google.com> Merge \\"Add Dolby TrueHD audio format\\" into nyc-mr1-dev am: 5cc2e814ac
am: f517d276a8

Change-Id: I9e210b1d143b01301c798dfe705a7493cc828be5
4527b9ebc6a37b861f5a3bba68bcc63dc8d69ada 08-Jul-2016 Haynes Mathew George <hgeorge@codeaurora.org> audioflinger: async callback error handling

Invalidate all tracks on receiving an async error
callback from the output stream.

Change-Id: I92f441ed7fd904b85f464a041847880faac5b383
udioflinger/Threads.cpp
udioflinger/Threads.h
773ee957aadbe86ee53ac96a108ce47f8e02b961 12-Jul-2016 Jean-Michel Trivi <jmtrivi@google.com> Fix non-offloadable effect creation on offload threads

Do not prevent the creation of non-offloadable effects on
offload threads.

Bug 29229872

Change-Id: I1deebb5c0973f67a9e925ef1278d22ef7f62c779
udioflinger/Threads.cpp
fcddb0b73931d207b21bd281a7df3ba2f230a607 09-Jul-2016 Glenn Kasten <gkasten@google.com> Enable strict warning checks and fix

Change-Id: Id401a937911eb418e93314812f2f7c2b5ecff8d6
udioflinger/Android.mk
udiopolicy/Android.mk
udiopolicy/common/managerdefinitions/Android.mk
udiopolicy/common/managerdefinitions/include/TypeConverter.h
udiopolicy/common/managerdefinitions/src/DeviceDescriptor.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/service/AudioPolicyService.cpp
oundtrigger/Android.mk
f517d276a8bfe4034106abf8009fcd6cc28a0838 09-Jul-2016 Eric Laurent <elaurent@google.com> Merge \"Add Dolby TrueHD audio format\" into nyc-mr1-dev
am: 5cc2e814ac

Change-Id: Ib3561d806b00c949789f463c4609844399bb7095
5cc2e814acac142c77eed4e9b8d954623be8965c 09-Jul-2016 Eric Laurent <elaurent@google.com> Merge "Add Dolby TrueHD audio format" into nyc-mr1-dev
fa6c8ebc60da3d704237606b7764a3be24393c21 08-Jul-2016 Eino-Ville Talvala <etalvala@google.com> Merge \\"Camera service: Trust telephony service to forward client UIDs.\\" into nyc-mr1-dev am: 24edc3b919
am: 55943ae68e

Change-Id: I73d487c6b29cf07759cb775548b1dd5a3567af46
55943ae68e72b362ba701f9e39e3dd50167a9e9c 08-Jul-2016 Eino-Ville Talvala <etalvala@google.com> Merge \"Camera service: Trust telephony service to forward client UIDs.\" into nyc-mr1-dev
am: 24edc3b919

Change-Id: Iabe7af8fc708ee10a4aa36b5bf9fa13903601777
24edc3b919777167c7f5c2a356c972d0ecbfd9b7 08-Jul-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera service: Trust telephony service to forward client UIDs." into nyc-mr1-dev
39dddbca2e467432677410c0271947a97a5f55eb 08-Jul-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "64 bit mediaextractor"
af9d030e075e659e9f50fdd143aa83459a7795e2 29-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Camera service: Trust telephony service to forward client UIDs.

For video telephony use cases, trust callers from the telephony
service to forward the true client UID in the connect calls, so
that it can be verified for access.

Bug: 27616192
Change-Id: Icd3ff4f7c8686f74a0677f54d49579b95c69037e
amera/libcameraservice/CameraService.cpp
22236c8755042147986c9d8a377a9e1fc8343b8e 08-Jul-2016 Eino-Ville Talvala <etalvala@google.com> Merge \\"Camera1: JpegProcessor: Do not lock until we have to\\" into nyc-mr1-dev am: a1cad728da
am: 54a4d67ae5

Change-Id: I7e0f0e9efee9ad1ac50a6ac219b98f152df01c1d
54a4d67ae524eee37c1a2b2220d8e3d36b0c87e4 08-Jul-2016 Eino-Ville Talvala <etalvala@google.com> Merge \"Camera1: JpegProcessor: Do not lock until we have to\" into nyc-mr1-dev
am: a1cad728da

Change-Id: I20fda033f58fdfeeebf983bb7b2f60d7533d8df3
a1cad728da6462444bac316844e3cc0b3ddb2db5 08-Jul-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera1: JpegProcessor: Do not lock until we have to" into nyc-mr1-dev
998ab5218bfef34f9c5e23c750199aaa7c9e29ef 08-Jul-2016 Eric Laurent <elaurent@google.com> Merge \\"AudioPolicyManager: fix music volume following alarm\\" into nyc-mr1-dev am: f81362f6cd
am: b44eb7edc8

Change-Id: I53f868ed86819a2e1cff52e69547c384569a50fd
b44eb7edc85ad6e5305a6f582ea28e6988556744 08-Jul-2016 Eric Laurent <elaurent@google.com> Merge \"AudioPolicyManager: fix music volume following alarm\" into nyc-mr1-dev
am: f81362f6cd

Change-Id: If23dda76fd11bc25ee1adf7b069df732cfce87f4
f81362f6cd1bb22f988c30e6b552e6a2d95c4de7 08-Jul-2016 Eric Laurent <elaurent@google.com> Merge "AudioPolicyManager: fix music volume following alarm" into nyc-mr1-dev
e30f20963751c07860bfbc92b5ff8948fc55797f 08-Jul-2016 Eric Laurent <elaurent@google.com> Add Dolby TrueHD audio format

Also add missing formats in AudioFlinger string conversion
utility.

Bug: 30024357
Change-Id: I75bdb54daeb786543f545ec3a772121055e01cdb
udioflinger/AudioFlinger.cpp
udiopolicy/common/managerdefinitions/src/TypeConverter.cpp
8e73af9bcea96bc90afa7451c6014333fc51b655 08-Jul-2016 Eino-Ville Talvala <etalvala@google.com> Camera1: JpegProcessor: Do not lock until we have to

JpegProcessor::onBufferReleased is fired for both successful and failed
Jpeg captures, but only cares about the failures.

In success cases, onBufferReleased is always fired some time after
onFrameAvailable, and sometimes the thread scheduling pushes
onBufferReleased to be so late that preview restart has started, which
can cause a deadlock with onBufferReleased acquiring locks in the
opposite order that preview startup will.

To fix, move the JpegProcessor mutex acquire to only happen in the error
cases, in which case onFrameAVailable will not have fired, and the
camera state will still be STILL_CAPTURE, not STOPPED or mid-preview
startup.

Bug: 29524651
Change-Id: I3f103e070c3b39c38117b91824cd79c5dfc757ac
amera/libcameraservice/api1/client2/JpegProcessor.cpp
447a87bbfe11cc85123ddd94551c3a5ede54ea20 08-Jul-2016 Eric Laurent <elaurent@google.com> AudioPolicyManager: fix music volume following alarm

Using stale device selection for accessibility strategy
from cache was causing the wrong device to be returned
by getDevicesForStream() for music stream.
This caused speaker volume to be changed while playing
music over headset after playing an alarm over headset + speaker.

Bug: 29518506.
Change-Id: I06617976e209f6483ea0df1d0a6acb05de7c5cba
udiopolicy/managerdefault/AudioPolicyManager.cpp
d82bd98d0dd8bfa792d7e5223eb3a266d132f2b0 07-Jul-2016 Andy Hung <hunga@google.com> Merge \\"Attribute throttle time to previous loops write time\\" into nyc-mr1-dev am: bf6dc1af5b
am: 4b06aec0d4

Change-Id: I2c1362d5544c73934bc5b1b7c402d4371a09ba6f
4b06aec0d4ce89859c0376096fdffeec50c65c2f 07-Jul-2016 Andy Hung <hunga@google.com> Merge \"Attribute throttle time to previous loops write time\" into nyc-mr1-dev
am: bf6dc1af5b

Change-Id: I4bc857144d49760097f7344c1d58ad7444b66548
bf6dc1af5bd88135f47c2489c03cdb9f95d57927 07-Jul-2016 Andy Hung <hunga@google.com> Merge "Attribute throttle time to previous loops write time" into nyc-mr1-dev
f53eeea422a7be68c540698d4d1940a80d7942b0 07-Jul-2016 Jeff Vander Stoep <jeffv@google.com> 64 bit mediaextractor

On 64 bit devices run the extractor process in 64 bit mode.

Define a 64 bit seccomp filter for arm64.

Tests (angler): CtsMediaTestCases, youtube, play movies, play music.

Bug: 27785687
Change-Id: Icb4ea2d7ce8ac55d3f3f4852b0e011d9c4402d54
ediaextractor/Android.mk
ediaextractor/minijail/Android.mk
ediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-arm64.policy
0a31dddf67e739684f60aecc85311ff446fb68f9 07-Jul-2016 Andy Hung <hunga@google.com> Attribute throttle time to previous loops write time

Bug: 29991292
Change-Id: Ie3ecc9631e1dfa83fafc7b003495f59e981a0b6b
udioflinger/Threads.cpp
e086bdba217bc013b7a1b5ebe181ccd5fc08ce29 02-Jul-2016 Eino-Ville Talvala <etalvala@google.com> Merge \\"Camera: API1: Improve ZSL mode activation heuristics\\" into nyc-mr1-dev am: 879234b240
am: c4c56c41cf

Change-Id: Ice8cdced14bb42eaab198dc7901936d9046aef42
c4c56c41cf0962ccbf70dbbedf5130e1e98d5218 02-Jul-2016 Eino-Ville Talvala <etalvala@google.com> Merge \"Camera: API1: Improve ZSL mode activation heuristics\" into nyc-mr1-dev
am: 879234b240

Change-Id: I26efe76186d552ea92f0d98d1f2ae7ddf3e03822
c451d0f8098c9efd21d796e32f739af1915f9aba 01-Jul-2016 Eino-Ville Talvala <etalvala@google.com> Camera: API1: Improve ZSL mode activation heuristics

- Don't engage ZSL if picture size is too small
- Don't engage ZSL if picture size matches preview size
- Include ZSL choice in dumpsys

Bug: 29620318
Change-Id: Ie8e0c5a9e1ed9f177d701f22996c4c1f4b81a71e
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/client2/CaptureSequencer.cpp
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
6217c5233ad77f8e8f22f2b54edf8b6271275f09 30-Jun-2016 Eric Laurent <elaurent@google.com> Merge \\"audioflinger: fix logcat\\" into nyc-mr1-dev am: bb3bee86d5
am: bde5acd3a3

Change-Id: Ie443e96b8231b3fff5773253e7886fe7f5c42150
bde5acd3a31b19a73e6877309ce3de27b211855a 30-Jun-2016 Eric Laurent <elaurent@google.com> Merge \"audioflinger: fix logcat\" into nyc-mr1-dev
am: bb3bee86d5

Change-Id: I1b5e4c626d686379c570316181c020c5e16aa378
bb3bee86d56930752cfef5197cd67c4495a946e6 30-Jun-2016 Eric Laurent <elaurent@google.com> Merge "audioflinger: fix logcat" into nyc-mr1-dev
122f7e793fe6fb8904634cc6d2e35ac4b014ea72 29-Jun-2016 Eric Laurent <elaurent@google.com> audioflinger: fix logcat

Fix build when verbose logging is enabled in Threads.cpp.
Remove log spam for timestamp errors.

Change-Id: I704527c60e48012c5dcc00cb0be08d14ec2ab2a6
udioflinger/Threads.cpp
be450f99cab0371750fcca8deed8bcaaf05ca5d4 29-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Merge \\\"Camera3Device: Correctly shut down abandoned streams\\\" into nyc-dev am: b889242aff am: fe82275a06
am: acd69cc456

Change-Id: I05f4a6dcb216a2d79692b649e629729aa95f2809
acd69cc45687d283f0f47c68485eacbe5d774de7 29-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Merge \\"Camera3Device: Correctly shut down abandoned streams\\" into nyc-dev am: b889242aff
am: fe82275a06

Change-Id: Id93546464b95e04c5024525e66544f2bb5cb9e35
b461a998a5e5f69790748e50d8e75d25301dd32a 29-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Merge \"Camera3Device: Correctly shut down abandoned streams\" into nyc-dev
am: b889242aff

Change-Id: I18f7dc2b363856e7709782da4ec2fdd431bde52e
fe82275a06f0ace675482b23ee2cb685d2628af1 29-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Merge \"Camera3Device: Correctly shut down abandoned streams\" into nyc-dev
am: b889242aff

Change-Id: I50fd0619dec5488dbeadb903b95e5bd4e5980f61
ff51b47dae1c236291a0508b29e8f4e7d0780761 29-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Correctly shut down abandoned streams

If a stream was abandoned (consumer died), the stream teardown would
terminate early. Update teardown conditions to complete even for the
abandoned state.

One consequence of this is that the buffer manager never received an
unregister call for the stream, leading it to error out when trying to
remove buffers from it.

Also switch to STATE_ABANDONED in case of an error detaching a buffer,
instead of the error state.

Bug: 29778464
Change-Id: I44de69773e8bbf9ebe83207498d6ee0674ed91bf
amera/libcameraservice/device3/Camera3IOStreamBase.cpp
amera/libcameraservice/device3/Camera3OutputStream.cpp
9ab9f6219a0274bed6a8d64169ab695ef77d29de 06-May-2016 Andy Hung <hunga@google.com> Remove throttle logcat for bluetooth

Due to reduced buffer sizes for bluetooth it is possible to throttle
regularly, do not logcat throttle for bluetooth to avoid spamming.

Bug: 28286313
Change-Id: I9a572077a58c8e5cce3d5ac4de3cc6d97d94d7a0
udioflinger/Threads.cpp
e8bbdbb73e3e7a1f97e30a8625ca7bda53e9d819 25-Jun-2016 Zhijun He <zhijunhe@google.com> Camera3: log a warning when frame drop occurs am: 7b171a9e7b
am: 4abfb3ba06

Change-Id: Ie99133e1b9869c98e7f6fe298173fb4b38d0dc52
4abfb3ba062fdb402e6b04c26a79ecd8f0e8ac25 25-Jun-2016 Zhijun He <zhijunhe@google.com> Camera3: log a warning when frame drop occurs
am: 7b171a9e7b

Change-Id: I96c84451ce70eff2d2aeeea03e9a3ede6b90d178
7b171a9e7be64e9881ed03baad1422d75ca768a4 25-Jun-2016 Zhijun He <zhijunhe@google.com> Camera3: log a warning when frame drop occurs

Bug: 28311997
Change-Id: I7253fb040c1f08c18fc7a01042503e9457163a1e
amera/libcameraservice/device3/Camera3OutputStream.cpp
03a298348baac8b1bb0bf6b4ad3549f76e3c4db1 22-Jun-2016 Andy Hung <hunga@google.com> Merge \\\"Limit cached timestamp use if HW fails to provide them\\\" into nyc-dev am: 0256917c88 am: aeffd19df0
am: b18af48e3c

Change-Id: I628b8869bb7dd183270a6309c6e70072786e00b5
b18af48e3c1e64aa99954eaf04ed857b61a135aa 22-Jun-2016 Andy Hung <hunga@google.com> Merge \\"Limit cached timestamp use if HW fails to provide them\\" into nyc-dev am: 0256917c88
am: aeffd19df0

Change-Id: I6f4c59ef161ef67395adecba15592868acc1b545
aeffd19df0a23cfcd09ef81ba136ce02ec76a37a 22-Jun-2016 Andy Hung <hunga@google.com> Merge \"Limit cached timestamp use if HW fails to provide them\" into nyc-dev
am: 0256917c88

Change-Id: I1186034edf91d3b136b2571fa0acadc9b21de891
ed61ffb179f0f5154ae9c7fa8b76fba28f686b71 22-Jun-2016 Andy Hung <hunga@google.com> Merge \"Limit cached timestamp use if HW fails to provide them\" into nyc-dev
am: 0256917c88

Change-Id: Ia0c7b61ec235f277f0266dac3320d25cdfeba4f0
0256917c88690e07604f725872321cbe2870ed8b 22-Jun-2016 Andy Hung <hunga@google.com> Merge "Limit cached timestamp use if HW fails to provide them" into nyc-dev
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
udioflinger/FastMixer.cpp
7eebfad940afe9c6254626f13999793ad000023e 22-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Merge \\\"DO NOT MERGE: Camera: Adjust pointers to ANW buffers to avoid infoleak\\\" into mnc-dev am: f0dc08a910 am: 6a2589182d
am: 94763125c7

Change-Id: Ie3fe053c51741c4e80c42b03bd09ee017d4ffbac
94763125c781f59fa774015abce0954368f19d08 22-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Merge \\"DO NOT MERGE: Camera: Adjust pointers to ANW buffers to avoid infoleak\\" into mnc-dev am: f0dc08a910
am: 6a2589182d

Change-Id: Id1e326911bebf1d9ef732eb45faa4119cd83d541
5c1f01675ca0f4f231f206fc7fe64d353592f726 22-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Merge \\"DO NOT MERGE: Camera: Adjust pointers to ANW buffers to avoid infoleak\\" into klp-dev am: 22d6575710
am: 4bec033ded

Change-Id: I68dd7d3ea94b10104c235007fd03230ef5ae0146
6a2589182db02a101a43c0ebcab5b5b9d7d5e082 22-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Merge \"DO NOT MERGE: Camera: Adjust pointers to ANW buffers to avoid infoleak\" into mnc-dev
am: f0dc08a910

Change-Id: I1ce29159fdfc1fe343e91df11d804902720bdcbf
22d65757103e46bef8c6902ea08c84a775b62a0b 21-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Merge "DO NOT MERGE: Camera: Adjust pointers to ANW buffers to avoid infoleak" into klp-dev
f0dc08a910e4e50d1b3b98d1195509a05798dcaf 21-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Merge "DO NOT MERGE: Camera: Adjust pointers to ANW buffers to avoid infoleak" into mnc-dev
f832feb17bd70f84417dc468f573792caf99a127 21-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Merge "DO NOT MERGE: Camera: Adjust pointers to ANW buffers to avoid infoleak" into lmp-dev
2824a195bbcea17876bdae4b3f17eeb856278d95 21-Jun-2016 Glenn Kasten <gkasten@google.com> Merge \\"getPrimary APIs now examine all non-duplicating output threads\\" into nyc-mr1-dev am: 3f69461e78
am: 6a013ba332

Change-Id: I04a6b6a3eba7d25be23720798e3743945ec1d39a
6a013ba332a00b684d48e77db2fce5802170e580 21-Jun-2016 Glenn Kasten <gkasten@google.com> Merge \"getPrimary APIs now examine all non-duplicating output threads\" into nyc-mr1-dev
am: 3f69461e78

Change-Id: I76898dd3427d8e8b3a9d64bd01b60f137c7cb91f
3f69461e78fb74211847c3bab161bcad7ae81398 21-Jun-2016 Glenn Kasten <gkasten@google.com> Merge "getPrimary APIs now examine all non-duplicating output threads" into nyc-mr1-dev
e86a58f1e91631afee4f82701b5af666c4bd46b4 21-Jun-2016 Andy Hung <hunga@google.com> Check effect command reply size in AudioFlinger am: 110bc9547a am: 075c8f7713 am: c971a59f4c am: 195f7c6125 am: 1e1b7e4c3d am: d34a9dfc5e am: 4d942ffdf7 am: 97dc689080 am: 96727e67fa am: 2072f925af am: 807b325704 am: c0da993332 am: f3c87704fc
am: 7d2acf81af

Change-Id: I5fb9e26bacde0d3671996608d52abce0eb7cb55f
a24e646c669122dc01df3349ce9e48f23f08ebb4 21-Jun-2016 Andy Hung <hunga@google.com> Check effect command reply size in AudioFlinger am: 110bc9547a am: 075c8f7713 am: c971a59f4c am: 195f7c6125 am: 1e1b7e4c3d am: d34a9dfc5e am: 4d942ffdf7 am: 97dc689080 am: 96727e67fa am: 2072f925af am: 807b325704
am: c0da993332

Change-Id: I94ca4fe78c621b8599a317daaad3ec64643fd591
7d2acf81afcd7395d4faa2d51fb0fc9fd6c08090 21-Jun-2016 Andy Hung <hunga@google.com> Check effect command reply size in AudioFlinger am: 110bc9547a am: 075c8f7713 am: c971a59f4c am: 195f7c6125 am: 1e1b7e4c3d am: d34a9dfc5e am: 4d942ffdf7 am: 97dc689080 am: 96727e67fa am: 2072f925af am: 807b325704 am: c0da993332
am: f3c87704fc

Change-Id: Ica0cbd06f11ea3d20f63ec6d83fa6895dc8f8011
f3c87704fcd7f2556948d3174083cb3b3784bc4c 21-Jun-2016 Andy Hung <hunga@google.com> Check effect command reply size in AudioFlinger am: 110bc9547a am: 075c8f7713 am: c971a59f4c am: 195f7c6125 am: 1e1b7e4c3d am: d34a9dfc5e am: 4d942ffdf7 am: 97dc689080 am: 96727e67fa am: 2072f925af am: 807b325704
am: c0da993332

Change-Id: Icd6b91a252aa1095229052c5d042de0af06dc2f1
c0da99333228e88c311f6e4d52bb282b11d0d068 21-Jun-2016 Andy Hung <hunga@google.com> Check effect command reply size in AudioFlinger am: 110bc9547a am: 075c8f7713 am: c971a59f4c am: 195f7c6125 am: 1e1b7e4c3d am: d34a9dfc5e am: 4d942ffdf7 am: 97dc689080 am: 96727e67fa am: 2072f925af
am: 807b325704

Change-Id: If0a3ddbf84c520434f88ad5f6f02fd854cf8c4aa
248ca13b47f0ea1165f649447fd5ddaa85f9d867 21-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Merge \\\\"Add support for streams with vendor specific formats\\\\" am: cfbaedf009 am: d1a38eb18b am: 5e74f61213
am: 650dc2a72d

Change-Id: I5b1a8008ca39be22101134e4f2c8cd1220b68755
807b325704b3361cb9846450e8d3bbea96a0fa1c 21-Jun-2016 Andy Hung <hunga@google.com> Check effect command reply size in AudioFlinger am: 110bc9547a am: 075c8f7713 am: c971a59f4c am: 195f7c6125 am: 1e1b7e4c3d am: d34a9dfc5e am: 4d942ffdf7 am: 97dc689080 am: 96727e67fa
am: 2072f925af

Change-Id: I4497f5457ad3cb895c524aa162e50034f7a59f72
650dc2a72d80ab57c42172bc423614686d22e89d 21-Jun-2016 Eman Copty <eman.copty@intel.com> Merge \\\"Add support for streams with vendor specific formats\\\" am: cfbaedf009 am: d1a38eb18b
am: 5e74f61213

Change-Id: Id0839ae6988e38f5785c097eebb6646d1b06dd40
2072f925af83c6c518408ac45772271773810705 21-Jun-2016 Andy Hung <hunga@google.com> Check effect command reply size in AudioFlinger am: 110bc9547a am: 075c8f7713 am: c971a59f4c am: 195f7c6125 am: 1e1b7e4c3d am: d34a9dfc5e am: 4d942ffdf7 am: 97dc689080
am: 96727e67fa

Change-Id: I28078827c6ade96224f2bed9e624ad064a04bafd
96727e67fa1e4cfaf633d43fb4a898f7484cb48b 21-Jun-2016 Andy Hung <hunga@google.com> Check effect command reply size in AudioFlinger am: 110bc9547a am: 075c8f7713 am: c971a59f4c am: 195f7c6125 am: 1e1b7e4c3d am: d34a9dfc5e am: 4d942ffdf7
am: 97dc689080

Change-Id: Ia7902852b6d04cd06d3b56ac2c6ac9f7e9df29a6
97dc6890807d2cf861bac781acad375173906e62 21-Jun-2016 Andy Hung <hunga@google.com> Check effect command reply size in AudioFlinger am: 110bc9547a am: 075c8f7713 am: c971a59f4c am: 195f7c6125 am: 1e1b7e4c3d am: d34a9dfc5e
am: 4d942ffdf7

Change-Id: I5d59510f7bd7c8b72deef4de177193028af1f4c7
5e74f612137995bcbd65c0eab169179ca609aba1 21-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Merge \\"Add support for streams with vendor specific formats\\" am: cfbaedf009
am: d1a38eb18b

Change-Id: Ia8aa3064b66cc0d8817d39b1031dcc1c28296b14
4d942ffdf7cfbfe43133bf1c87eda4e4569f3507 21-Jun-2016 Andy Hung <hunga@google.com> Check effect command reply size in AudioFlinger am: 110bc9547a am: 075c8f7713 am: c971a59f4c am: 195f7c6125 am: 1e1b7e4c3d
am: d34a9dfc5e

Change-Id: I2705198deaaeb485503135fe97bc0d6f5ba8cf70
d1a38eb18ba523ba9e4b149f4d1a3f9626164ff7 21-Jun-2016 Eman Copty <eman.copty@intel.com> Merge \"Add support for streams with vendor specific formats\"
am: cfbaedf009

Change-Id: Iab6e0c2a0220d8614e1aa64845beb1a01026f423
1e1b7e4c3d513ea947b79fe9d0d4cf9a8e1242a3 21-Jun-2016 Andy Hung <hunga@google.com> Check effect command reply size in AudioFlinger am: 110bc9547a am: 075c8f7713 am: c971a59f4c
am: 195f7c6125

Change-Id: I8da29433f8dabffc94a82617e325a314c4ae84d0
195f7c6125d7c0a48c9f7f0aeb0311ba076a8df7 21-Jun-2016 Andy Hung <hunga@google.com> Check effect command reply size in AudioFlinger am: 110bc9547a am: 075c8f7713
am: c971a59f4c

Change-Id: I86d971f1a537a34e90e4f0697c9c9a43e509cfc4
c971a59f4c2491a2e5143f7118debd7c92fa3333 21-Jun-2016 Andy Hung <hunga@google.com> Check effect command reply size in AudioFlinger am: 110bc9547a
am: 075c8f7713

Change-Id: I7b70873d12dc258b362c88c8a9ea47ca0e0578ca
79c139a492bdf2977cf07d6faaf1b0268c1026da 21-Jun-2016 Eino-Ville Talvala <etalvala@google.com> DO NOT MERGE: Camera: Adjust pointers to ANW buffers to avoid infoleak

Subtract address of a random static object from pointers being routed
through app process.

Bug: 28466701
Change-Id: Idcbfe81e9507433769672f3dc6d67db5eeed4e04
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
54fc49c9f5ac06ea3c21cfe05a00f36c7df91b3f 21-Jun-2016 Eino-Ville Talvala <etalvala@google.com> DO NOT MERGE: Camera: Adjust pointers to ANW buffers to avoid infoleak

Subtract address of a random static object from pointers being routed
through app process.

Bug: 28466701
Change-Id: Idcbfe81e9507433769672f3dc6d67db5eeed4e04
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
7a3de84808f700615816397acc7c7927987bab6e 21-Jun-2016 Eino-Ville Talvala <etalvala@google.com> DO NOT MERGE: Camera: Adjust pointers to ANW buffers to avoid infoleak

Subtract address of a random static object from pointers being routed
through app process.

Bug: 28466701
Change-Id: Idcbfe81e9507433769672f3dc6d67db5eeed4e04
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
516b743f3c19f38816ecdead90ae74bc1b3c84e4 21-Jun-2016 Eric Laurent <elaurent@google.com> audioflinger: add check for effect vs thread compatibility am: 4c415062ad
am: ad67b138fc

Change-Id: I38015a85b7df2d620daa2c9e5d7435de510a8fbe
110bc9547a0c851ff1f20f5d7579b34f942947b8 21-Jun-2016 Andy Hung <hunga@google.com> Check effect command reply size in AudioFlinger

Bug: 29251553
Change-Id: I1bcc1281f1f0542bb645f6358ce31631f2a8ffbf
udioflinger/Effects.cpp
ad67b138fcec25ba99254e826c559778adf0e7f3 21-Jun-2016 Eric Laurent <elaurent@google.com> audioflinger: add check for effect vs thread compatibility
am: 4c415062ad

Change-Id: Idbdb7591b291c09ced94d4eabae0edc3581e1bcd
4c415062ad1bb53e9af8f644d8215837262b79bb 18-Jun-2016 Eric Laurent <elaurent@google.com> audioflinger: add check for effect vs thread compatibility

Make sure that only HW accelerated effects are added on FAST
playback or record threads and no effect is added on threads with
RAW flag.

Make sure that tracks with RAW and FAST flags are compatible with exiting
effects on a playback or record threads and clear flags accordingly.

Bug: 4999001

Change-Id: I0c060f1ee4dfb9f1e206633536e67f7c3b7b3788
udioflinger/AudioFlinger.cpp
udioflinger/Effects.cpp
udioflinger/Effects.h
udioflinger/Threads.cpp
udioflinger/Threads.h
a73356393315ad3ad7cd9196640823d1a9a620dd 10-Jun-2016 Glenn Kasten <gkasten@google.com> getPrimary APIs now examine all non-duplicating output threads

and return the value corresponding to the thread with minimum frame count,
with a preference for a thread with fast mixer if there are multiple
output threads with the same minimum frame count.
This is in keeping with the expectation by apps that the getPrimary APIs
will return a value for the lowest available latency path.

Bug: 29164107
Change-Id: I8ae9bcad2d48185d7717ccf96085834c0ce00e37
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
6d7af0e93c8442f98b3f3683a3e03d9b4b9856db 18-Jun-2016 Eman Copty <eman.copty@intel.com> Add support for streams with vendor specific formats

The function createStream() validates the format of
the created stream is published by the HAL in the
StreamConfigurationMap, however the vendor formats
cannot be added to StreamConfigurationMap and hence
shouldn't be checked.

Change-Id: Ie93422aa8813a313db6d2d3b4fdfc457fede0a0d
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
162d33432ba7a370cfb65400157039bb978d34b7 18-Jun-2016 Eino-Ville Talvala <etalvala@google.com> resolve merge conflicts of 3fce3ef to nyc-mr1-dev-plus-aosp
am: d58445d917

Change-Id: I31450379e39d80a109c7b682c400729101f49c90
d58445d917538a71f1519be7a3e7b9101fd9c0ca 18-Jun-2016 Eino-Ville Talvala <etalvala@google.com> resolve merge conflicts of 3fce3ef to nyc-mr1-dev-plus-aosp

Change-Id: If319afe3976bedd64226e128164457f461eb7042
e8a984e43504890e0f676256a0445b9917a2af91 18-Jun-2016 Eino-Ville Talvala <etalvala@google.com> resolve merge conflicts of 77c1a35 to nyc-mr1-dev

Change-Id: I18c301c55904c06b3f6f5d8eaa2df47ff87ddb4f
3fce3ef7df0393bdbca33cfb05f084a510155cd2 18-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Camera: BufferManager: Don\'t attach/detach on every frame
am: 77c1a35542

Change-Id: I5d3a7ebd557e6330cfb9ba6b4f2a54fb211ddbcb
77c1a3554275a51ac8eb9fbe86f476afc8983192 13-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Camera: BufferManager: Don't attach/detach on every frame

- Maintain separate count of attached buffers
- Only attach when new buffers need to be allocated
- Only detach when a buffer needs to be freed
- Fix missing notification initializations
- Remove warning that's always logged

Bug: 28695173
Change-Id: I38e997fa1e69c2b8743e43eed31a6a08a6f9cd7a
amera/libcameraservice/device3/Camera3BufferManager.cpp
amera/libcameraservice/device3/Camera3BufferManager.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3DummyStream.cpp
amera/libcameraservice/device3/Camera3DummyStream.h
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.h
amera/libcameraservice/device3/Camera3OutputStreamInterface.h
29c2b315d4a3cda1fd6c34715a618e646fb0e6c9 14-Jun-2016 Pawin Vongmasa <pawin@google.com> Merge \\\"Increase the memory limit of media.extractor to 20%.\\\" into nyc-dev am: af54d1a6f9 am: 4bf7e1727f
am: ab8f37511e

Change-Id: Ia784335c9cce7299c83afc4e3cd64489eeca9fcc
ab8f37511e46d4a1b619c774806a1c2ca01bd0a3 14-Jun-2016 Pawin Vongmasa <pawin@google.com> Merge \\"Increase the memory limit of media.extractor to 20%.\\" into nyc-dev am: af54d1a6f9
am: 4bf7e1727f

Change-Id: I9f1de47d05779ab81ca321439ac122be241c0713
4bf7e1727fb28e038bc57b2035ed8c3c847c011a 14-Jun-2016 Pawin Vongmasa <pawin@google.com> Merge \"Increase the memory limit of media.extractor to 20%.\" into nyc-dev
am: af54d1a6f9

Change-Id: I93133431f102d05458237fc55f7901bda590bd99
331d46c3f71e2a1e9bb315c4a428cbf399882597 14-Jun-2016 Pawin Vongmasa <pawin@google.com> Merge \"Increase the memory limit of media.extractor to 20%.\" into nyc-dev
am: af54d1a6f9

Change-Id: I9f7aacdd376e5c54eb318d680e6ae3f8a7717808
af54d1a6f96639b9a42ef25e78093e63af29048d 14-Jun-2016 Pawin Vongmasa <pawin@google.com> Merge "Increase the memory limit of media.extractor to 20%." into nyc-dev
ddb50a0d099910cddfe2b342d3abcc21e281e3d5 14-Jun-2016 Pawin Vongmasa <pawin@google.com> Increase the memory limit of media.extractor to 20%.

Bug: 29185862
Change-Id: I130ef8504dc93738a413554ae1a340864ae395c6
ediaextractor/main_extractorservice.cpp
6f8a48c18c1d0b673547c9fb530301ad2f291fd9 14-Jun-2016 Chien-Yu Chen <cychen@google.com> Merge \\\"CameraDevice3: Fail stream configuration more gracefully\\\" into nyc-dev am: 642c0275dc am: dbcce36298
am: 134b747f85

Change-Id: Icf3574ec7c9506e8d3b9b0470d893ac3815eb6b6
134b747f85a434cb0a35ee87207981f1dfaa0b6a 14-Jun-2016 Chien-Yu Chen <cychen@google.com> Merge \\"CameraDevice3: Fail stream configuration more gracefully\\" into nyc-dev am: 642c0275dc
am: dbcce36298

Change-Id: If5c88ac699556873b547ee59b3e3414876778cbe
dbcce36298345b3e40034e44f2ba706e3c544f1e 14-Jun-2016 Chien-Yu Chen <cychen@google.com> Merge \"CameraDevice3: Fail stream configuration more gracefully\" into nyc-dev
am: 642c0275dc

Change-Id: I703452bc4fc9172bddda93b1e71706065def3053
2591f8308729b8f7b5d669d774cdac5636731535 14-Jun-2016 Chien-Yu Chen <cychen@google.com> Merge \"CameraDevice3: Fail stream configuration more gracefully\" into nyc-dev
am: 642c0275dc

Change-Id: I5a6eee36000d2f4f0666abb0189369ba20d8e44d
9b5860bd84adb5c7d497f188b5e6ade7f066ba3c 10-Jun-2016 Chien-Yu Chen <cychen@google.com> CameraDevice3: Fail stream configuration more gracefully

If stream configuration fails, do not set the device status to
STATUS_ERROR except when HAL returns a fatal error. This allows
the application to try another configuration after one fails.

Bug: 29248970
Change-Id: Iffa4b734c13b79a7da95be994a6317002627d771
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
9d7f05a263a5633ef13b161aaaa778000878ddf8 09-Jun-2016 Eric Laurent <elaurent@google.com> Merge \\"audioflinger: fix reused audio patch resource release\\" into nyc-mr1-dev am: 1e44780584
am: 0b334d634a

Change-Id: I6cabb25b848354c0e222b1b4c9e9739c6f45df37
0b334d634acabcc6a2033e0a3ec664d40e210229 09-Jun-2016 Eric Laurent <elaurent@google.com> Merge \"audioflinger: fix reused audio patch resource release\" into nyc-mr1-dev
am: 1e44780584

Change-Id: I6cd982765af11bc5e6ac3431bc2fef23eadb6a19
b997d3a3d61a86dc9525860e863c7b690356d405 08-Jun-2016 Eric Laurent <elaurent@google.com> audioflinger: fix reused audio patch resource release

Add missing explicit release of audio HAL patch
when a patch is created reusing the same patch handle but
the source or sink devices are not on the same HW module.

Bug: 28953359

Change-Id: Ib751a4b5b2badd745f3b43e69734dd6a3e60eabe
udioflinger/PatchPanel.cpp
udioflinger/PatchPanel.h
4cfa355eedae56e047b63b1b02fc6d789e21980d 04-Jun-2016 Eric Laurent <elaurent@google.com> Merge "Add AudioTrack and AudioRecord flag checks" into nyc-mr1-dev am: 2f8e63b5be
am: b70868bb33

* commit 'b70868bb337f0b12f993494f4d110979a33ddd24':
Add AudioTrack and AudioRecord flag checks

Change-Id: Ia6ab9998dcaa065d18fc048ae5ea6bb3e087ba62
b70868bb337f0b12f993494f4d110979a33ddd24 04-Jun-2016 Eric Laurent <elaurent@google.com> Merge "Add AudioTrack and AudioRecord flag checks" into nyc-mr1-dev
am: 2f8e63b5be

* commit '2f8e63b5be5b0160302cffe1f1f18e560d31d3e7':
Add AudioTrack and AudioRecord flag checks

Change-Id: If9043721f4763ce0f4db96c63595f92c5ba22556
2f8e63b5be5b0160302cffe1f1f18e560d31d3e7 04-Jun-2016 Eric Laurent <elaurent@google.com> Merge "Add AudioTrack and AudioRecord flag checks" into nyc-mr1-dev
20c73e7d997b50a43b2fd0bae27c044ea0ecc872 04-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix misc-macro-parentheses warnings in Tracks.cpp."
050677873c10d4da308ac222f8533c96cca3207e 02-Jun-2016 Eric Laurent <elaurent@google.com> Add AudioTrack and AudioRecord flag checks

Verify that the requested flags are compatible with the input
or output flags when creating and AudioRecord or AudioTrack

Get rid of IAudioFlinger::track_flags_t which was redundant
with audio_input_flags_t and audio_output_flags_t.

Change-Id: I0dd9232f857b2737e99a8c668806e45bce09cdbd
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/PatchPanel.cpp
udioflinger/PlaybackTracks.h
udioflinger/RecordTracks.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/TrackBase.h
udioflinger/Tracks.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
9a3fbd9f84656ca25acdfd202ef7d4461a640f74 04-Jun-2016 Chih-Hung Hsieh <chh@google.com> Fix misc-macro-parentheses warnings in Tracks.cpp.

Bug: 28705665
Change-Id: Ifa59d95b0242bef71762d862e3437fa1e914c552
udioflinger/Tracks.cpp
54f38d61895d6fc8f8b86c99d333aa03cee6134e 03-Jun-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Prepare video stream for high speed" into nyc-dev am: 86823e4d1f am: aedd66764b
am: 863ec0e3dc

* commit '863ec0e3dcf5f09406e2b1f789fd7333a7ce652a':
Camera3Device: Prepare video stream for high speed

Change-Id: I1251401ab6ddf9a3bf8857217772ed6a3d621dee
863ec0e3dcf5f09406e2b1f789fd7333a7ce652a 03-Jun-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Prepare video stream for high speed" into nyc-dev am: 86823e4d1f
am: aedd66764b

* commit 'aedd66764b713c5e56e911f45a43a1a44d3dee70':
Camera3Device: Prepare video stream for high speed

Change-Id: Ib65b905a7179c47569013c15b37c21eae14df555
e71fb5f89915aab9a5f288d48b27786c8a35a903 03-Jun-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Prepare video stream for high speed" into nyc-dev
am: 86823e4d1f

* commit '86823e4d1fc81fabdf4baf95d7635768bb9677ba':
Camera3Device: Prepare video stream for high speed

Change-Id: I4072fc088da23c3bd6ff2a952f2303e596f319e0
aedd66764b713c5e56e911f45a43a1a44d3dee70 03-Jun-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Prepare video stream for high speed" into nyc-dev
am: 86823e4d1f

* commit '86823e4d1fc81fabdf4baf95d7635768bb9677ba':
Camera3Device: Prepare video stream for high speed

Change-Id: Ia81057ad033d89a3e705c1d9ee661bd365853f19
86823e4d1fc81fabdf4baf95d7635768bb9677ba 03-Jun-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Prepare video stream for high speed" into nyc-dev
6f293d93d203832e64283b9d2a887f2214d920a6 03-Jun-2016 Marco Nelissen <marcone@google.com> Merge "limit mediaextractor memory" into nyc-dev am: 559b01b20a am: d5ce35aed9
am: 92505843f7

* commit '92505843f73008730a79388b7e8a646571f91e56':
limit mediaextractor memory

Change-Id: I6248cd92242d0ca21e34aa155ff7d32e67e8bb9e
92505843f73008730a79388b7e8a646571f91e56 03-Jun-2016 Marco Nelissen <marcone@google.com> Merge "limit mediaextractor memory" into nyc-dev am: 559b01b20a
am: d5ce35aed9

* commit 'd5ce35aed9ae96ee7f791b67f2d81fcc1ab81295':
limit mediaextractor memory

Change-Id: Id3c558172c8a4963c6c4fb76bb0f16e548b05ef6
5cbcf4de38d0892342bd28571203f5795875ceba 03-Jun-2016 Marco Nelissen <marcone@google.com> Merge "limit mediaextractor memory" into nyc-dev
am: 559b01b20a

* commit '559b01b20a18bce9017a199b93241690860fa0b7':
limit mediaextractor memory

Change-Id: I18da2326cb71ab4049f08c89ca5129b06a50fb98
d5ce35aed9ae96ee7f791b67f2d81fcc1ab81295 03-Jun-2016 Marco Nelissen <marcone@google.com> Merge "limit mediaextractor memory" into nyc-dev
am: 559b01b20a

* commit '559b01b20a18bce9017a199b93241690860fa0b7':
limit mediaextractor memory

Change-Id: I3921d30dcf8dd7449ddc3b4fd76fa186294ed8da
559b01b20a18bce9017a199b93241690860fa0b7 03-Jun-2016 Marco Nelissen <marcone@google.com> Merge "limit mediaextractor memory" into nyc-dev
8ef7cf50165c0f763a7d958682e7196a18e01537 03-Jun-2016 Zhijun He <zhijunhe@google.com> Merge "Camera3: add deferred surface support" into nyc-mr1-dev am: d2958597bc
am: 405debd8aa

* commit '405debd8aa344c4f8ab5fe45c525ed400851f877':
Camera3: add deferred surface support

Change-Id: I564eec8c447c569eb298a2c992847b68c73576ad
405debd8aa344c4f8ab5fe45c525ed400851f877 03-Jun-2016 Zhijun He <zhijunhe@google.com> Merge "Camera3: add deferred surface support" into nyc-mr1-dev
am: d2958597bc

* commit 'd2958597bc86d7eab85f007997d8986e1542f7a4':
Camera3: add deferred surface support

Change-Id: I6d37d0ad9bcb25b13a45f3af3f4adeb7cb00dcf7
d2958597bc86d7eab85f007997d8986e1542f7a4 03-Jun-2016 Zhijun He <zhijunhe@google.com> Merge "Camera3: add deferred surface support" into nyc-mr1-dev
c66969beb346b878701c4adccf83a1475c3a0687 20-May-2016 Chien-Yu Chen <cychen@google.com> Camera3Device: Prepare video stream for high speed

Prepare video stream for high speed recording on the first video
request to avoid buffer allocation after video recording starts.

Bug: 28246165
Change-Id: Iaf41c6b779e5b689f568453d99a9058c8aec3881
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
5d677d1f0879d5101e38df480a38228a64d63959 30-May-2016 Zhijun He <zhijunhe@google.com> Camera3: add deferred surface support

Initial native implementation and aidl changes for surfaceless support.

Bug: 28323863
Change-Id: Id6634c3ef2ecc84422a88f63de0a19a0cb496e96
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3DummyStream.cpp
amera/libcameraservice/device3/Camera3DummyStream.h
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.h
amera/libcameraservice/device3/Camera3OutputStreamInterface.h
amera/libcameraservice/device3/Camera3Stream.cpp
amera/libcameraservice/device3/Camera3Stream.h
35eff24909d3fb2629b4768e2973077131eb4e37 02-Jun-2016 Di Folco, Neil <neil.di.folco@intel.com> engine configurable: AUDIO_SOURCE_UNPROCESSED aligment with legacy am: c51e05b671 am: 921ba4e6eb
am: 09206c1842

* commit '09206c1842e1faf54f633e0064496f1b89b15479':
engine configurable: AUDIO_SOURCE_UNPROCESSED aligment with legacy

Change-Id: Idb778011c35f11f526f5eeedb011269a2dfcf78f
09206c1842e1faf54f633e0064496f1b89b15479 02-Jun-2016 Di Folco, Neil <neil.di.folco@intel.com> engine configurable: AUDIO_SOURCE_UNPROCESSED aligment with legacy am: c51e05b671
am: 921ba4e6eb

* commit '921ba4e6ebe906cd6173348c07533ade3b67554c':
engine configurable: AUDIO_SOURCE_UNPROCESSED aligment with legacy

Change-Id: Iff9ba871e1003cc623c1cb5408133db0597833e3
921ba4e6ebe906cd6173348c07533ade3b67554c 02-Jun-2016 Di Folco, Neil <neil.di.folco@intel.com> engine configurable: AUDIO_SOURCE_UNPROCESSED aligment with legacy
am: c51e05b671

* commit 'c51e05b671ecb639fae5845541fe632bbf1bd8b7':
engine configurable: AUDIO_SOURCE_UNPROCESSED aligment with legacy

Change-Id: I4d671b3627cfb6e8332a31c3a83bec47c4a75425
f217613acfe6cb9e97b05f5ff33ba9cc72600069 02-Jun-2016 Di Folco, Neil <neil.di.folco@intel.com> engine configurable: AUDIO_SOURCE_UNPROCESSED aligment with legacy
am: c51e05b671

* commit 'c51e05b671ecb639fae5845541fe632bbf1bd8b7':
engine configurable: AUDIO_SOURCE_UNPROCESSED aligment with legacy

Change-Id: I34dc8a992953d33d1c1ca67b9235bfe1dfd3a9a1
c51e05b671ecb639fae5845541fe632bbf1bd8b7 02-Jun-2016 Di Folco, Neil <neil.di.folco@intel.com> engine configurable: AUDIO_SOURCE_UNPROCESSED aligment with legacy

This patch realigns the configurable version of the engine
with the legacy one with regards the new AUDIO_SOURCE_UNPROCESSED.

This is required to pass the Audio Frequency Line CTS test.

Bug: 29096641

Change-Id: I88abf91807bf66671ad3da6030d6aa6487cf4c54
Signed-off-by: Di Folco, Neil <neil.di.folco@intel.com>
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/device_for_input_source.pfw
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
ediaextractor/Android.mk
ediaextractor/main_extractorservice.cpp
d1a3ab2af2f01e9ab2114952def2dbfd5894eae1 27-May-2016 François Gaffie <francois.gaffie@intel.com> Merge "engine configurable: add conf for product without devices" into nyc-dev am: b4eea9fa62 am: 22045c6ea4
am: 9d5812e060

* commit '9d5812e06054c875b9d08e83a75c6d43dfd0f47c':
engine configurable: add conf for product without devices

Change-Id: Ic677462b0f680ebcbc92e6dd1314641ea3211128
9d5812e06054c875b9d08e83a75c6d43dfd0f47c 27-May-2016 Eric Laurent <elaurent@google.com> Merge "engine configurable: add conf for product without devices" into nyc-dev am: b4eea9fa62
am: 22045c6ea4

* commit '22045c6ea4737606113102b85bcfd6040118081d':
engine configurable: add conf for product without devices

Change-Id: If9b50e2947ea88043b25c1d5024d863a60ce18de
22045c6ea4737606113102b85bcfd6040118081d 27-May-2016 François Gaffie <francois.gaffie@intel.com> Merge "engine configurable: add conf for product without devices" into nyc-dev
am: b4eea9fa62

* commit 'b4eea9fa629f44ba17731a6152c1a083a559e851':
engine configurable: add conf for product without devices

Change-Id: Ie25876e351caf5c63db43a9f00bec0c7e8682932
0c50aab192c72a5bc8424e718c16a27bb32030dd 27-May-2016 François Gaffie <francois.gaffie@intel.com> Merge "engine configurable: add conf for product without devices" into nyc-dev
am: b4eea9fa62

* commit 'b4eea9fa629f44ba17731a6152c1a083a559e851':
engine configurable: add conf for product without devices

Change-Id: I28ec2ac995b263e1bce00709b3498fde9e2e3765
b4eea9fa629f44ba17731a6152c1a083a559e851 27-May-2016 Eric Laurent <elaurent@google.com> Merge "engine configurable: add conf for product without devices" into nyc-dev
c7ce9a2ee61ecabdedc87ae8635eb80a5fbce17c 09-May-2016 François Gaffie <francois.gaffie@intel.com> engine configurable: add conf for product without devices

this patch provides an example of configuration of policy engine
for platforms:
-without output devices
-without input devices.

Change-Id: I5e8a159de085e35fb245f2efb54f609d8e89ce16
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/engineconfigurable/parameter-framework/examples/Android.mk
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/PolicyConfigurableDomains.xml
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/device_for_input_source.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/device_for_strategy_accessibility.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/device_for_strategy_dtmf.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/device_for_strategy_enforced_audible.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/device_for_strategy_media.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/device_for_strategy_phone.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/device_for_strategy_rerouting.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/device_for_strategy_sonification.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/device_for_strategy_sonification_respectful.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/device_for_strategy_transmitted_through_speaker.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/SettingsNoInput/device_for_input_source.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/SettingsNoOutput/device_for_strategies.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Structure/PolicySubsystem-CommonTypes.xml
udiopolicy/engineconfigurable/parameter-framework/examples/policy_criteria.txt
udiopolicy/engineconfigurable/parameter-framework/plugin/InputSource.cpp
udiopolicy/engineconfigurable/src/InputSource.cpp
udiopolicy/engineconfigurable/src/Strategy.cpp
06d169a0495ec26edb8daa46b7b7fbfa8a7852ce 26-May-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Audio policy: volume computation improvement on A2DP for notifications" into nyc-dev am: 5d364cac29 am: 7ef5bb92f7
am: 58d8f01b7d

* commit '58d8f01b7dcec13cbb2db574b73de7483796202e':
Audio policy: volume computation improvement on A2DP for notifications

Change-Id: I7cebf025dfec1e2c1c970590e75f0af7d84646b4
58d8f01b7dcec13cbb2db574b73de7483796202e 26-May-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Audio policy: volume computation improvement on A2DP for notifications" into nyc-dev am: 5d364cac29
am: 7ef5bb92f7

* commit '7ef5bb92f7169b5fa385c16d905265f99879cfae':
Audio policy: volume computation improvement on A2DP for notifications

Change-Id: I0cbc1533393a2eaa5cd19a55f43af1054ab9bb5a
7ef5bb92f7169b5fa385c16d905265f99879cfae 26-May-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Audio policy: volume computation improvement on A2DP for notifications" into nyc-dev
am: 5d364cac29

* commit '5d364cac2911bf7d479af0d508576d4078d04961':
Audio policy: volume computation improvement on A2DP for notifications

Change-Id: I8cd7b9b2ee536eb10fd2c5001acc6cb2d86affe6
de3c46b84849c83c0cac890f0c668d74ab4f9800 26-May-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Audio policy: volume computation improvement on A2DP for notifications" into nyc-dev
am: 5d364cac29

* commit '5d364cac2911bf7d479af0d508576d4078d04961':
Audio policy: volume computation improvement on A2DP for notifications

Change-Id: Ibbefead821d690ad6dfc9ba806178bc8c27cd500
5d364cac2911bf7d479af0d508576d4078d04961 26-May-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Audio policy: volume computation improvement on A2DP for notifications" into nyc-dev
00a2096f3bd6f938216b3691c0b581d64df52999 26-May-2016 Jean-Michel Trivi <jmtrivi@google.com> Audio policy: volume computation improvement on A2DP for notifications

When playing STRATEGY_SONIFICATION* streams, or system sounds or
enforced sounds on A2DP during media playback, ensure the
difference between the media volume and the notification
is no more than 12dB

Bug 28288132

Change-Id: If5cb7979dd76a0d624e8aeff9126ff56bfd7366b
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
9676bbc6a6e61f5af17befdbcee776b14c25618a 26-May-2016 Franois Gaffie <francois.gaffie@intel.com> Audio Policy: engine configurable: remove sign bit from conf files am: f489ff8998 am: 336e999bb2
am: dd87e89eab

* commit 'dd87e89eab3249b88ae93ef56d328756110f8928':
Audio Policy: engine configurable: remove sign bit from conf files

Change-Id: I908c8a4d1ccfbd1f8fb0a0da8d2ce7e90eefb0c7
6c6816e5dc4330e88c6c5d751ef3ea1c0d1375b6 26-May-2016 François Gaffie <francois.gaffie@intel.com> Merge "audio policy: engine configurable: aligment with legacy" into nyc-dev am: 54e01ea654 am: 778e074eeb
am: 5b7dc8d90c

* commit '5b7dc8d90c312c9cd2368640f78114596f0d7ffd':
audio policy: engine configurable: aligment with legacy

Change-Id: Ie74606612108ced2420ee22c27f917851b281874
50eb92c4d79b4cc17eeca351e5d16544cc63f63d 26-May-2016 Eric Laurent <elaurent@google.com> Merge "Fix warning in audio policy service" into nyc-dev am: ec71c9ee92 am: d9514b39e1
am: 7f938bf972

* commit '7f938bf972549e7b79aa99f88bc661f16f0dba40':
Fix warning in audio policy service

Change-Id: I628cdc674506e6dbe6f228b978fed5b0e0b6ff49
dd87e89eab3249b88ae93ef56d328756110f8928 26-May-2016 François Gaffie <francois.gaffie@intel.com> Audio Policy: engine configurable: remove sign bit from conf files am: f489ff8998
am: 336e999bb2

* commit '336e999bb2efbf571bc605dc40d34040dde90f62':
Audio Policy: engine configurable: remove sign bit from conf files

Change-Id: I16bae06f36d9da9f9a596f46372b7e40aca7ae2f
5b7dc8d90c312c9cd2368640f78114596f0d7ffd 26-May-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: engine configurable: aligment with legacy" into nyc-dev am: 54e01ea654
am: 778e074eeb

* commit '778e074eeba630a23d316487c4c5f8daa30d7e67':
audio policy: engine configurable: aligment with legacy

Change-Id: I5ceb50bf75205253a9de396d86a4effcc10bbbc8
7f938bf972549e7b79aa99f88bc661f16f0dba40 26-May-2016 Eric Laurent <elaurent@google.com> Merge "Fix warning in audio policy service" into nyc-dev am: ec71c9ee92
am: d9514b39e1

* commit 'd9514b39e188b56eb8e779820eeaf799a1b25f41':
Fix warning in audio policy service

Change-Id: Ic1cf84684700641619c9d2ed480e481337534d89
336e999bb2efbf571bc605dc40d34040dde90f62 26-May-2016 Franois Gaffie <francois.gaffie@intel.com> Audio Policy: engine configurable: remove sign bit from conf files
am: f489ff8998

* commit 'f489ff899861a385c36b548bd51d0c6e17f8e67f':
Audio Policy: engine configurable: remove sign bit from conf files

Change-Id: I3a2de850568e3d43925ec0aba9a94afed212052c
de84b0e1c7c2a92b989169b985ecf1fc841960ab 26-May-2016 Franois Gaffie <francois.gaffie@intel.com> Audio Policy: engine configurable: remove sign bit from conf files
am: f489ff8998

* commit 'f489ff899861a385c36b548bd51d0c6e17f8e67f':
Audio Policy: engine configurable: remove sign bit from conf files

Change-Id: I5eae223aac27687ef92946445b525b9b9bf4dfad
778e074eeba630a23d316487c4c5f8daa30d7e67 26-May-2016 François Gaffie <francois.gaffie@intel.com> Merge "audio policy: engine configurable: aligment with legacy" into nyc-dev
am: 54e01ea654

* commit '54e01ea654f9851292cff5059ba0fe95cd1fb6a8':
audio policy: engine configurable: aligment with legacy

Change-Id: Ief74e8b20915cd162989163b2f783b9ded56745a
36455ed559f2d4bc37e7856534f13ba6ce1a4f42 26-May-2016 François Gaffie <francois.gaffie@intel.com> Merge "audio policy: engine configurable: aligment with legacy" into nyc-dev
am: 54e01ea654

* commit '54e01ea654f9851292cff5059ba0fe95cd1fb6a8':
audio policy: engine configurable: aligment with legacy

Change-Id: I02552e844c11d42ac1863816e699662e7563f125
d9514b39e188b56eb8e779820eeaf799a1b25f41 26-May-2016 Eric Laurent <elaurent@google.com> Merge "Fix warning in audio policy service" into nyc-dev
am: ec71c9ee92

* commit 'ec71c9ee9250b8e13b1680e24ba6c66beb2fc33e':
Fix warning in audio policy service

Change-Id: I61ac4df22343e66b64072dbda7c3fe56aa67982d
96866e9c17df51af3095978c65db4c8675cc50d8 26-May-2016 Eric Laurent <elaurent@google.com> Merge "Fix warning in audio policy service" into nyc-dev
am: ec71c9ee92

* commit 'ec71c9ee9250b8e13b1680e24ba6c66beb2fc33e':
Fix warning in audio policy service

Change-Id: I7e2fdc56995d4d31e9d157a758d180b34d735edf
f489ff899861a385c36b548bd51d0c6e17f8e67f 09-May-2016 François Gaffie <francois.gaffie@intel.com> Audio Policy: engine configurable: remove sign bit from conf files

In order to avoid mistake or extra configuration, this patch removes
from xml/pfw configuration files the sign bit for input device and adds
it programmaticaly within the Parameter Framework policy plugin

Bug: 25075342

Change-Id: I571e8ae882cb338330d6a10da309b1249ce0417e
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/PolicyConfigurableDomains.xml
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/device_for_input_source.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Structure/PolicySubsystem-CommonTypes.xml
udiopolicy/engineconfigurable/parameter-framework/plugin/InputSource.cpp
d86071d55540c3a5c40afe2122bff6a5c4296bf1 09-May-2016 François Gaffie <francois.gaffie@intel.com> audio policy: engine configurable: aligment with legacy

This patch realigns the configurable version of the engine
with the legacy one.

Bug: 25075342

Change-Id: Ic73cee9176d6593e8fbf6d92e571d76cdba42c6b
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/engineconfigurable/parameter-framework/example/Android.mk
udiopolicy/engineconfigurable/parameter-framework/example/ParameterFrameworkConfigurationPolicy.xml.in
udiopolicy/engineconfigurable/parameter-framework/example/README.md
udiopolicy/engineconfigurable/parameter-framework/example/Settings/PolicyConfigurableDomains.xml
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_input_source.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_accessibility.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_dtmf.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_enforced_audible.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_media.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_phone.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_rerouting.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_sonification.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_sonification_respectful.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_transmitted_through_speaker.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/strategy_for_stream.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/strategy_for_usage.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/volumes.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Structure/PolicyClass.xml
udiopolicy/engineconfigurable/parameter-framework/example/Structure/PolicySubsystem-CommonTypes.xml
udiopolicy/engineconfigurable/parameter-framework/example/Structure/PolicySubsystem.xml
udiopolicy/engineconfigurable/parameter-framework/example/policy_criteria.txt
udiopolicy/engineconfigurable/parameter-framework/examples/Android.mk
udiopolicy/engineconfigurable/parameter-framework/examples/ParameterFrameworkConfigurationPolicy.xml.in
udiopolicy/engineconfigurable/parameter-framework/examples/README.md
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/PolicyConfigurableDomains.xml
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/device_for_input_source.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/device_for_strategy_accessibility.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/device_for_strategy_dtmf.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/device_for_strategy_enforced_audible.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/device_for_strategy_media.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/device_for_strategy_phone.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/device_for_strategy_rerouting.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/device_for_strategy_sonification.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/device_for_strategy_sonification_respectful.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/device_for_strategy_transmitted_through_speaker.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/strategy_for_stream.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/strategy_for_usage.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Settings/volumes.pfw
udiopolicy/engineconfigurable/parameter-framework/examples/Structure/PolicyClass.xml
udiopolicy/engineconfigurable/parameter-framework/examples/Structure/PolicySubsystem-CommonTypes.xml
udiopolicy/engineconfigurable/parameter-framework/examples/Structure/PolicySubsystem.xml
udiopolicy/engineconfigurable/parameter-framework/examples/policy_criteria.txt
9f39f8d6cc1445c338d8cb635fdbc167c4200971 25-May-2016 Eric Laurent <elaurent@google.com> Fix warning in audio policy service

Change-Id: I33b20b7007e19e8b2514ffdf2232e9c1d7314d9f
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
8a4348bb7a598eab9b692d782595689112df367a 25-May-2016 Andy Hung <hunga@google.com> resolve merge conflicts of 5d8e380 to nyc-mr1-dev am: b09a6d0832
am: 6b0a8693e1

* commit '6b0a8693e169a97f5fd92260bcbd437b514d7691':
AudioTrack: Fix timestamp startup condition

Change-Id: Ie11abf463d4ca8b065fffc66bfb1c4db37a3ca4c
6b0a8693e169a97f5fd92260bcbd437b514d7691 25-May-2016 Andy Hung <hunga@google.com> resolve merge conflicts of 5d8e380 to nyc-mr1-dev
am: b09a6d0832

* commit 'b09a6d08321b9484d80a2a9dc11ed52623942c8d':
AudioTrack: Fix timestamp startup condition

Change-Id: Id2c883949a47daac936266310ebe4d69a5965eb3
72df39e838c0f989133dba8d618cc6e5ce41bad5 25-May-2016 Eric Laurent <elaurent@google.com> Merge "audio flinger: fix audio patch release" into nyc-dev am: 5290766537 am: a1bcbfec34
am: 5b44aab4aa

* commit '5b44aab4aa81a22812f75bc67c98b8474263a845':
audio flinger: fix audio patch release

Change-Id: Ice42668f81e0dada8908a46f17ecff4e4e12b397
b09a6d08321b9484d80a2a9dc11ed52623942c8d 25-May-2016 Andy Hung <hunga@google.com> resolve merge conflicts of 5d8e380 to nyc-mr1-dev

Change-Id: Ic3aacd191cae0749bb33fe9ccfdac743ff82a21f
5b44aab4aa81a22812f75bc67c98b8474263a845 25-May-2016 Eric Laurent <elaurent@google.com> Merge "audio flinger: fix audio patch release" into nyc-dev am: 5290766537
am: a1bcbfec34

* commit 'a1bcbfec34380c5993ed39680ec6b418f63c7021':
audio flinger: fix audio patch release

Change-Id: I27760953dbfbd7f478bfadbf2515296e33d679ad
8572ee135c9af5aacf74f02dd3ce8e9eb3956ec4 25-May-2016 Andy Hung <hunga@google.com> Merge "AudioTrack: Fix timestamp startup condition" into nyc-dev
am: 5d8e3808b4

* commit '5d8e3808b4012fa72bedf5898803682831f88e84':
AudioTrack: Fix timestamp startup condition

Change-Id: Ibc54738fb4beee0db7559e5b9f76910d639e966f
2e75c84b7a95eceefbc00f9533e31eef983ec014 25-May-2016 Eric Laurent <elaurent@google.com> Merge "audio flinger: fix audio patch release" into nyc-dev
am: 5290766537

* commit '5290766537a6075b9f11564e14b3f1be51a35373':
audio flinger: fix audio patch release

Change-Id: I81ee603009438e24399af8fe1b5118b90b045c48
a1bcbfec34380c5993ed39680ec6b418f63c7021 25-May-2016 Eric Laurent <elaurent@google.com> Merge "audio flinger: fix audio patch release" into nyc-dev
am: 5290766537

* commit '5290766537a6075b9f11564e14b3f1be51a35373':
audio flinger: fix audio patch release

Change-Id: I9b4337641c22f29d8bd498851c211451a99eb92a
5d8e3808b4012fa72bedf5898803682831f88e84 25-May-2016 Andy Hung <hunga@google.com> Merge "AudioTrack: Fix timestamp startup condition" into nyc-dev
5290766537a6075b9f11564e14b3f1be51a35373 25-May-2016 Eric Laurent <elaurent@google.com> Merge "audio flinger: fix audio patch release" into nyc-dev
0666cc5b6b430cc5a815dab0bcba3dd73da8061a 15-Dec-2015 Eric Laurent <elaurent@google.com> audio flinger: fix audio patch release

Release playback and capture threads associated to a softwware
audio patch when the patch handle is reused.

Bug: 25638953.
Change-Id: Ie832513043525dda9089f8e83018810add2a4d6e
udioflinger/PatchPanel.cpp
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
udioflinger/Threads.cpp
f797c3a3de15563ed1a66f067689b8717f724831 24-May-2016 Andy Hung <hunga@google.com> Merge "Add memory heap checks for mediaserver and audioserver" into nyc-dev am: f3d9908a88 am: ce2b51c91f
am: e34a44ff6c

* commit 'e34a44ff6cb12e65736c09e1baab1823de190e03':
Add memory heap checks for mediaserver and audioserver

Change-Id: I7176f6a4d3d27343e7ac5bb22a476e4e3076ed17
e34a44ff6cb12e65736c09e1baab1823de190e03 24-May-2016 Andy Hung <hunga@google.com> Merge "Add memory heap checks for mediaserver and audioserver" into nyc-dev am: f3d9908a88
am: ce2b51c91f

* commit 'ce2b51c91f431be6a62b2fed746650d18499cb83':
Add memory heap checks for mediaserver and audioserver

Change-Id: If5a9216ef18a9af22154d1510f835e0b3fafa651
5cb96b83e6bff91a5ab006ff542dc32031be9087 24-May-2016 Andy Hung <hunga@google.com> Merge "Add memory heap checks for mediaserver and audioserver" into nyc-dev
am: f3d9908a88

* commit 'f3d9908a888203e7e70b8c2d43ee741a95e154ed':
Add memory heap checks for mediaserver and audioserver

Change-Id: I8b5dda2e29da8651cbd9dbc77fa9ca6211b1a47d
ce2b51c91f431be6a62b2fed746650d18499cb83 24-May-2016 Andy Hung <hunga@google.com> Merge "Add memory heap checks for mediaserver and audioserver" into nyc-dev
am: f3d9908a88

* commit 'f3d9908a888203e7e70b8c2d43ee741a95e154ed':
Add memory heap checks for mediaserver and audioserver

Change-Id: I796467f1b5ef9b295f5ba738d3ac013349d0946b
f3d9908a888203e7e70b8c2d43ee741a95e154ed 24-May-2016 Andy Hung <hunga@google.com> Merge "Add memory heap checks for mediaserver and audioserver" into nyc-dev
791fce20ee88597ea7cd64cc728010088a2e7a8f 24-May-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of 53529cf to nyc-dev-plus-aosp am: 4d1522bdc7
am: a15b56e484

* commit 'a15b56e48406d8242e91629e748a1b90d5977381':
Fix misc-macro-parentheses warnings.

Change-Id: I5fcae0f83f1f6820ec8da61c46e778e30353195f
a15b56e48406d8242e91629e748a1b90d5977381 24-May-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of 53529cf to nyc-dev-plus-aosp
am: 4d1522bdc7

* commit '4d1522bdc7efaa9677ac92b620cea9e9110ec2a4':
Fix misc-macro-parentheses warnings.

Change-Id: Id828c632b701e19de541fab868484ae3d4bfab45
4d1522bdc7efaa9677ac92b620cea9e9110ec2a4 24-May-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of 53529cf to nyc-dev-plus-aosp

Change-Id: Iae19c31b9ce2d9c604040e54d6fbf125a3d3d362
7118308943d64f8d9e4c63b0e6d49da376be1966 24-May-2016 Eric Laurent <elaurent@google.com> Fix android.permission.CAPTURE_AUDIO_OUTPUT permission check am: b2379ba0a3 am: cc516cdd02
am: e52cab1f56

* commit 'e52cab1f56c39b72090f53ef3b2a187191d13143':
Fix android.permission.CAPTURE_AUDIO_OUTPUT permission check

Change-Id: Ia663aa8d975108cda5f0f2592d4bbf490bf776da
d9bb4b4e2ecc8fd0002249b73a23973208d74786 24-May-2016 Haynes Mathew George <hgeorge@codeaurora.org> Merge "audioflinger: Pass pid of process creating track or opening record" into nyc-dev am: a0e10ff02b am: 8b269a1708
am: a76c33e1bf

* commit 'a76c33e1bfc73baa190627cb9862b7789ddf8232':
audioflinger: Pass pid of process creating track or opening record

Change-Id: I6b9bf80afa039c16862c2979ff58a1592c1a02ff
53529cf975f5247bfa8dfd8bcbaaeb8ceebda3f0 24-May-2016 Chih-Hung Hsieh <chh@google.com> Merge "Fix misc-macro-parentheses warnings."
am: 7c05a8e156

* commit '7c05a8e1561b36585cb6a97c1d0d7adbd3cd5520':
Fix misc-macro-parentheses warnings.

Change-Id: I383a744a932fa74f5169584456f8354102e7be44
add074cfd746d050da929df3a2a94d382ed6022b 24-May-2016 Eric Laurent <elaurent@google.com> Fix android.permission.CAPTURE_AUDIO_OUTPUT permission check
am: b2379ba0a3

* commit 'b2379ba0a32638bae2ea0460644f68cf5a0967ce':
Fix android.permission.CAPTURE_AUDIO_OUTPUT permission check

Change-Id: I17450cb2f7ee24649c6d0c425a2cb9ead2e149b4
e52cab1f56c39b72090f53ef3b2a187191d13143 24-May-2016 Eric Laurent <elaurent@google.com> Fix android.permission.CAPTURE_AUDIO_OUTPUT permission check am: b2379ba0a3
am: cc516cdd02

* commit 'cc516cdd0293fead98ed33fa0334c79a940c8653':
Fix android.permission.CAPTURE_AUDIO_OUTPUT permission check

Change-Id: I3256bedf1732ac22eb534b04fb072a16370349a3
e2f42cb105f861379cc74b7a9a4d26692aa6fd9f 24-May-2016 Haynes Mathew George <hgeorge@codeaurora.org> Merge "audioflinger: Pass pid of process creating track or opening record" into nyc-dev
am: a0e10ff02b

* commit 'a0e10ff02b156738c0e5441104821b220eea3d68':
audioflinger: Pass pid of process creating track or opening record

Change-Id: I4992d73ff1bb90364362dfb7f1917dfc18d83eec
a76c33e1bfc73baa190627cb9862b7789ddf8232 24-May-2016 Eric Laurent <elaurent@google.com> Merge "audioflinger: Pass pid of process creating track or opening record" into nyc-dev am: a0e10ff02b
am: 8b269a1708

* commit '8b269a1708b95d5f31ea59afb36bb42c26f91961':
audioflinger: Pass pid of process creating track or opening record

Change-Id: I6df9a7e7641c51ef9da0a8ddee5ab796c794c035
cc516cdd0293fead98ed33fa0334c79a940c8653 24-May-2016 Eric Laurent <elaurent@google.com> Fix android.permission.CAPTURE_AUDIO_OUTPUT permission check
am: b2379ba0a3

* commit 'b2379ba0a32638bae2ea0460644f68cf5a0967ce':
Fix android.permission.CAPTURE_AUDIO_OUTPUT permission check

Change-Id: Iff08e0b44c71b63d101ca26c6ed9972fa030bfb1
8b269a1708b95d5f31ea59afb36bb42c26f91961 24-May-2016 Haynes Mathew George <hgeorge@codeaurora.org> Merge "audioflinger: Pass pid of process creating track or opening record" into nyc-dev
am: a0e10ff02b

* commit 'a0e10ff02b156738c0e5441104821b220eea3d68':
audioflinger: Pass pid of process creating track or opening record

Change-Id: I728ffba8938a82f8b8f7b773febafd5e466c8e4d
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
udioflinger/ServiceUtilities.cpp
udioflinger/ServiceUtilities.h
udiopolicy/service/AudioPolicyClientImplLegacy.cpp
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
udiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/service/AudioPolicyService.h
a0e10ff02b156738c0e5441104821b220eea3d68 24-May-2016 Eric Laurent <elaurent@google.com> Merge "audioflinger: Pass pid of process creating track or opening record" into nyc-dev
ce5493f97fe688303d79690901ea656b7a2429c4 24-May-2016 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: fix deadlock" into nyc-dev am: 7dd4ae63fe am: 92a692a4aa
am: 3481a59287

* commit '3481a5928711cdce8646f18855c5027f916937cf':
Camera: fix deadlock

Change-Id: I76c1b6e8da008c8ebd9fc99cd259e8b20e2734e6
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
3481a5928711cdce8646f18855c5027f916937cf 24-May-2016 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: fix deadlock" into nyc-dev am: 7dd4ae63fe
am: 92a692a4aa

* commit '92a692a4aaae03797b2e85915a144a0b724f6229':
Camera: fix deadlock

Change-Id: Idf81eb750d83ffbf116bbab5bef90c435a77adb0
92a692a4aaae03797b2e85915a144a0b724f6229 24-May-2016 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: fix deadlock" into nyc-dev
am: 7dd4ae63fe

* commit '7dd4ae63fe163287f06d00cc7756a9b7dd34bc25':
Camera: fix deadlock

Change-Id: I932cc6566c6305716fdb3dc2d3f6119f35fa8774
3e0d258a9679048349ba4a6d6184e844d3428e5f 24-May-2016 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: fix deadlock" into nyc-dev
am: 7dd4ae63fe

* commit '7dd4ae63fe163287f06d00cc7756a9b7dd34bc25':
Camera: fix deadlock

Change-Id: I4010f27b76dda670e7096aea722c73133e42685b
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
udioflinger/AudioFlinger.cpp
473fad9a5767e86ee9dbbffe0dfee10c7ad45a45 24-May-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix deadlock

Do not hold request lock while executing client callback.

Bug: 28821274
Change-Id: Ibbdae7f892a54abd0b6d87d2295e9863983e1cf7
amera/libcameraservice/device3/Camera3Device.cpp
bf29173d6d63536ae9f8cfd1d02153237ee23612 18-May-2016 Chih-Hung Hsieh <chh@google.com> Fix misc-macro-parentheses warnings.

Bug: 28705665
Change-Id: I97d1dec9a4397fd7a3cab5180a833066b8abe0ab
udioflinger/AudioMixer.cpp
udioflinger/Threads.cpp
udiopolicy/common/managerdefinitions/include/ConfigParsingUtils.h
amera/libcameraservice/device1/CameraHardwareInterface.h
2ffd63e2b6762e9cbd0eff2c0fdd8297ba9e5393 17-May-2016 Eric Laurent <elaurent@google.com> audioflinger: fix invalidateTracks() on offload thread am: 1308462107 am: 514d8c512d
am: a043ba313b

* commit 'a043ba313b68a7e6694b17faaca7f10dd4e5f1d2':
audioflinger: fix invalidateTracks() on offload thread

Change-Id: Ica11f6f42cdfbadc63ffd665410f483da0b1b2da
a043ba313b68a7e6694b17faaca7f10dd4e5f1d2 17-May-2016 Eric Laurent <elaurent@google.com> audioflinger: fix invalidateTracks() on offload thread am: 1308462107
am: 514d8c512d

* commit '514d8c512d08824b288fa1784b33a294b0f7e81d':
audioflinger: fix invalidateTracks() on offload thread

Change-Id: I659f616463f5df569b958e8c6178a1f1da006839
514d8c512d08824b288fa1784b33a294b0f7e81d 17-May-2016 Eric Laurent <elaurent@google.com> audioflinger: fix invalidateTracks() on offload thread
am: 1308462107

* commit '13084621072ea2e4c34e2a9d79793c621d9bf005':
audioflinger: fix invalidateTracks() on offload thread

Change-Id: I086758b71e476468f7b75ad185b6532fc277e165
57fc788e8c924823c9026f1239282d39433da821 17-May-2016 Eric Laurent <elaurent@google.com> audioflinger: fix invalidateTracks() on offload thread
am: 1308462107

* commit '13084621072ea2e4c34e2a9d79793c621d9bf005':
audioflinger: fix invalidateTracks() on offload thread

Change-Id: Ib4f9306ababd292b71d4a5026bc157ef40e61120
13084621072ea2e4c34e2a9d79793c621d9bf005 17-May-2016 Eric Laurent <elaurent@google.com> audioflinger: fix invalidateTracks() on offload thread

Commit 05317d29 introduced a regression causing a systematic flush
on offload output thread when invalidateTracks() is called even if
no track is using the stream type specified.

Bug: 28786996
Change-Id: Iee393ee8b1093c40647235bd35f4a6fa9b62937a
udioflinger/Threads.cpp
udioflinger/Threads.h
ea2bf087bc6d1f9e9e0e5242f0d29d1498845879 12-May-2016 Haynes Mathew George <hgeorge@codeaurora.org> Merge "audioflinger: update multiplier logic to calculate frameCount" into nyc-mr1-dev am: 64a253562a
am: b7bcb3c46f

* commit 'b7bcb3c46f0501a214329509d912908a85646d49':
audioflinger: update multiplier logic to calculate frameCount

Change-Id: I60f4d2b2493cf6f93e70624c35a29f07c82b660b
c77ce274f1f8355ccddb6d8b1c5f589922573f7b 12-May-2016 Haynes Mathew George <hgeorge@codeaurora.org> Merge "audioflinger: Update throttling logic in MixerThread" into nyc-mr1-dev am: 86c54273d0
am: 1e6323fa09

* commit '1e6323fa092f51fad8ee5f563780dba1d62a1f5a':
audioflinger: Update throttling logic in MixerThread

Change-Id: I85cab0203af31bd8de1f645293fc3b182d88023d
ca8e6805991c0c058c3d6315556c7612d663edab 12-May-2016 Eric Laurent <elaurent@google.com> Merge "audioflinger: various offload playback fixes" into nyc-dev am: 8b43838c48 am: d9e1a02f39
am: 9d0956cf44

* commit '9d0956cf445b6839ebba3b81d33c8e8289dd086f':
audioflinger: various offload playback fixes

Change-Id: I3455daba5e1d154bab7cbf4a44e64388212ae07b
b7bcb3c46f0501a214329509d912908a85646d49 12-May-2016 Haynes Mathew George <hgeorge@codeaurora.org> Merge "audioflinger: update multiplier logic to calculate frameCount" into nyc-mr1-dev
am: 64a253562a

* commit '64a253562a0521f5f0b3205dae98367102ebe532':
audioflinger: update multiplier logic to calculate frameCount

Change-Id: I76bf6b21388426979d36d8d9abe3010b915ed396
1e6323fa092f51fad8ee5f563780dba1d62a1f5a 12-May-2016 Haynes Mathew George <hgeorge@codeaurora.org> Merge "audioflinger: Update throttling logic in MixerThread" into nyc-mr1-dev
am: 86c54273d0

* commit '86c54273d035ff1ee6efab1a56766f883e1c98f7':
audioflinger: Update throttling logic in MixerThread

Change-Id: I9fb312b012b5f1446247428ce306fb83e7f8c141
64a253562a0521f5f0b3205dae98367102ebe532 12-May-2016 Glenn Kasten <gkasten@google.com> Merge "audioflinger: update multiplier logic to calculate frameCount" into nyc-mr1-dev
86c54273d035ff1ee6efab1a56766f883e1c98f7 12-May-2016 Glenn Kasten <gkasten@google.com> Merge "audioflinger: Update throttling logic in MixerThread" into nyc-mr1-dev
9d0956cf445b6839ebba3b81d33c8e8289dd086f 12-May-2016 Eric Laurent <elaurent@google.com> Merge "audioflinger: various offload playback fixes" into nyc-dev am: 8b43838c48
am: d9e1a02f39

* commit 'd9e1a02f39a9c7cd477bc382dcab2114a9cbceea':
audioflinger: various offload playback fixes

Change-Id: I436bfd09034f5db12c459d4d7f731fab33f31747
b9987ad06d8298cde7b28bb214ac10777bcf8102 12-May-2016 Eric Laurent <elaurent@google.com> Merge "audioflinger: various offload playback fixes" into nyc-dev
am: 8b43838c48

* commit '8b43838c4872af3e9f47846e2618461af2d8d346':
audioflinger: various offload playback fixes

Change-Id: I1954e445630309c039ade92e545479245de095be
8b43838c4872af3e9f47846e2618461af2d8d346 12-May-2016 Eric Laurent <elaurent@google.com> Merge "audioflinger: various offload playback fixes" into nyc-dev
e93cc03da360a1a0d2ad937c745ce8c8e8be81c2 05-May-2016 Eric Laurent <elaurent@google.com> audioflinger: various offload playback fixes

Revert underrun sleep time optimization added for
offload by commit 51716185 which can cause music to pause for a few
seconds in some corner cases.

Allow underruns in STOPPING_1 state to avoid dropping last buffer
received by the AudioTrack callback after stop() is called by the
client.

Allow interruption of thread loop sleep if a command is pending to
speed up track start sequence.

Do not wait for a full AudioTrack buffer before writing to audio HAL
when resuming playback or transitioning to next track.

Also moved log level for underruns in AudioSink from I to D to reduce
spam on user builds.

Bug: 28545177
Bug: 27682362
Bug: 28347796

Change-Id: I05b651b7878a2d2eedcac43cd669e32add171d40
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
227a14be87e8c63eb7a464b857a1d29c86c90e7c 09-May-2016 Haynes Mathew George <hgeorge@codeaurora.org> audioflinger: update multiplier logic to calculate frameCount

If the value of the multiplier used in calculating
mNormalFrameCount is odd, it is rounded off to a higher even value.

This results in an increase of mNormalFrameCount and thereby
the latency which is not expected.

Do not prefer an even multiplier and let the value remain as is
even if it is odd.

Bug: 25740205

authored-by: Satya Krishna Pindiproli<satyak@codeaurora.org>

Change-Id: Ia60d87d01caef6f45998bffeafc3d6a24f7c7fb4
udioflinger/Threads.cpp
f92b2175cd4a8d0fa9aca6e660ed4e85f6b7078b 09-May-2016 Haynes Mathew George <hgeorge@codeaurora.org> audioflinger: Update throttling logic in MixerThread

The throttling logic in MixerThread only keeps track of
time spent during sink write. However, on low tier
APs and with high sample rate tracks, it is possible
that time spent in mixing the tracks is significant.
This inturn leads to sink writes returning earlier than
expected kicking in (incorrectly) the throttling logic.

To fix this, update throttling logic to include
the time spent in mixing buffers along with the time
spent in sink write.

authored-by: Dhananjay Kumar <dhakumar@codeaurora.org>

Bug: 28672515
Change-Id: Iac4994c3084850bb93640c978b4a519db8d7951d
udioflinger/Threads.cpp
5d8c88f79501b88bcc560000fd297d66f581006f 11-May-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix recording stream update logic am: 855c20283d am: 1740e42df8
am: ac7991f94e

* commit 'ac7991f94e639eef369f4f651294518070c42001':
Camera: fix recording stream update logic

Change-Id: I2b944d9f443d5e77d63d90792fc508834c06767d
1740e42df83a4a063a1044a2fe39f2305a325921 11-May-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix recording stream update logic
am: 855c20283d

* commit '855c20283de5eab6798c76ffd4ea86bd6754a7fb':
Camera: fix recording stream update logic

Change-Id: I25a037f3c4e763717b23fd3412ce8d65ed6a4379
7fed0d95953a195c38b94e043f8e4418f90b846e 10-May-2016 Yin-Chia Yeh <yinchiayeh@google.com> DO NOT MERGE:Camera: fix recording stream update logic

Will be merged internally.

Bug: 28695248
Change-Id: I3008a0cb76fe1c43b305d635519d60d92a3adedb
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
855c20283de5eab6798c76ffd4ea86bd6754a7fb 10-May-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix recording stream update logic

Bug: 28695248
Change-Id: I43d2d456cab84b378507979bad89c8c1f5b86b58
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
c3afc78811e976a2aa8204a9b8147e9fee5868c7 10-May-2016 Andy Hung <hunga@google.com> Merge "Improve timestamp jitter fix" into nyc-dev am: 5adc73643f am: 2815769b9f
am: bd46093e09

* commit 'bd46093e09879ef207105d53d8221c24bfce5da0':
Improve timestamp jitter fix

Change-Id: I8672b654c0649429871aae697c168308a7fce0bc
bd46093e09879ef207105d53d8221c24bfce5da0 10-May-2016 Andy Hung <hunga@google.com> Merge "Improve timestamp jitter fix" into nyc-dev am: 5adc73643f
am: 2815769b9f

* commit '2815769b9fa899f76e608155d319a45d66816836':
Improve timestamp jitter fix

Change-Id: Iaae996e39e9daae1e48088915e436a20120448bb
e2e3b6846d856da79ad067b3b7bf559cc69af5ab 10-May-2016 Andy Hung <hunga@google.com> Merge "Improve timestamp jitter fix" into nyc-dev
am: 5adc73643f

* commit '5adc73643fbccb4d7a768ab669e6c6eb434c4c98':
Improve timestamp jitter fix

Change-Id: Ia604305fa7208b938fa182cffb55f77be6c885a1
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
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
b687e3b96fcaa4774f76a4c78e0ef1a87549f552 06-May-2016 Marco Nelissen <marcone@google.com> Merge "Dump local source, not remote" into nyc-dev am: 0b667e2f6f am: 2a09d92718
am: db95fe5b0d

* commit 'db95fe5b0da0f2b714cdf9214bae59f25450f792':
Dump local source, not remote

Change-Id: I0ff6965763bbb5a6688563b3297ea35b4bac4215
db95fe5b0da0f2b714cdf9214bae59f25450f792 06-May-2016 Marco Nelissen <marcone@google.com> Merge "Dump local source, not remote" into nyc-dev am: 0b667e2f6f
am: 2a09d92718

* commit '2a09d9271894ef7d3e77b3fa43c86ce1b8529c88':
Dump local source, not remote

Change-Id: Ib38cb5a94c54ca22e5f3ea94b455a1208807cda3
1d6e10705362b9643aff0b6279a4e592c1856871 06-May-2016 Marco Nelissen <marcone@google.com> Merge "Dump local source, not remote" into nyc-dev
am: 0b667e2f6f

* commit '0b667e2f6f9e871e2fdc89100b8ef4cc623adec2':
Dump local source, not remote

Change-Id: I760f88f313abb9c17c858ef24c9bdc113fc2d548
0b667e2f6f9e871e2fdc89100b8ef4cc623adec2 06-May-2016 Marco Nelissen <marcone@google.com> Merge "Dump local source, not remote" into nyc-dev
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
ediaextractor/MediaExtractorService.cpp
39a2092473f6bbcc6dea5f382c24c952132de90e 06-May-2016 vivek mehta <mvivek@codeaurora.org> Merge "audioflinger: extend max i/p channel to 8 channels" into nyc-dev am: a605dafc27 am: da43e4d4d3
am: 5eafdc21b8

* commit '5eafdc21b82fc534e1812371d1b66c2e44dd3fba':
audioflinger: extend max i/p channel to 8 channels

Change-Id: Ia6959b6def446d7a09397da63444efe6cfecb5ab
eb7fc0bd619064d334d1a87a4c9cd07c862499b5 06-May-2016 vivek mehta <mvivek@codeaurora.org> Merge "audioflinger: extend max i/p channel to 8 channels" into nyc-dev
am: a605dafc27

* commit 'a605dafc27f69b37eca60579b34e97145f3caca3':
audioflinger: extend max i/p channel to 8 channels

Change-Id: Iefd24213da12d8635d2672454c2cd40fb6ba96a4
5eafdc21b82fc534e1812371d1b66c2e44dd3fba 06-May-2016 Eric Laurent <elaurent@google.com> Merge "audioflinger: extend max i/p channel to 8 channels" into nyc-dev am: a605dafc27
am: da43e4d4d3

* commit 'da43e4d4d379dbd93c9bf9be04ad15e886c87847':
audioflinger: extend max i/p channel to 8 channels

Change-Id: If8d763adb2c62f49ea9d5902d6b34a9a6310699a
a605dafc27f69b37eca60579b34e97145f3caca3 06-May-2016 Eric Laurent <elaurent@google.com> Merge "audioflinger: extend max i/p channel to 8 channels" into nyc-dev
753466603a88f1ea3d966d17ab79256519553759 05-May-2016 vivek mehta <mvivek@codeaurora.org> audioflinger: extend max i/p channel to 8 channels

- on open_input stream max channel check is for 2 (FCC_2),
extend this to 8 (FCC_8)

Bug: 27348418

Change-Id: I0d7e5a101dee0a2effabc3637a1fb73e7ea78ffd
udioflinger/AudioFlinger.cpp
d36e5779ca922925e96a544bbb5ae790e8a5d2fe 06-May-2016 Andy Hung <hunga@google.com> Merge "Remove throttle logcat for bluetooth" into nyc-dev am: 823b18ef45 am: f6ef1a972d
am: 43c8a40899

* commit '43c8a4089937865b6cdebf25eeb8551a10f23026':
Remove throttle logcat for bluetooth

Change-Id: I5be66bc7c9dc8ac609745487ad7ba9a74e556d04
43c8a4089937865b6cdebf25eeb8551a10f23026 06-May-2016 Andy Hung <hunga@google.com> Merge "Remove throttle logcat for bluetooth" into nyc-dev am: 823b18ef45
am: f6ef1a972d

* commit 'f6ef1a972d6937f79b1cae03251a4cf0b117f14a':
Remove throttle logcat for bluetooth

Change-Id: I6423524310f7fd056d4fe52bbd4c6de7cde33b98
dde6ac2a60c589a8cd6455a307edd5c47dd3b2b4 06-May-2016 Andy Hung <hunga@google.com> Merge "Remove throttle logcat for bluetooth" into nyc-dev
am: 823b18ef45

* commit '823b18ef45f0593386d9d5d20fbf9a0379ad0ebb':
Remove throttle logcat for bluetooth

Change-Id: I03a92e904572f32410332737667115958b5f4cf2
823b18ef45f0593386d9d5d20fbf9a0379ad0ebb 06-May-2016 Andy Hung <hunga@google.com> Merge "Remove throttle logcat for bluetooth" into nyc-dev
3ea004dd80c06c5b366e1a2547ea9b28fffc1865 06-May-2016 Andy Hung <hunga@google.com> Remove throttle logcat for bluetooth

Due to reduced buffer sizes for bluetooth it is possible to throttle
regularly, do not logcat throttle for bluetooth to avoid spamming.

Bug: 28286313
Change-Id: I9a572077a58c8e5cce3d5ac4de3cc6d97d94d7a0
udioflinger/Threads.cpp
1752ecb20c199cc8f8da7b4cfe24dfcc68c27772 05-May-2016 Zhijun He <zhijunhe@google.com> Merge "Merge "Camera: update service to support HAL3.4" into nyc-dev am: f15d88daa7 am: 76fa63ccef" into nyc-mr1-dev-plus-aosp
am: ee9b8b3033

* commit 'ee9b8b303309751bc9f2704ea5345b1fafa011cd':
Camera: update service to support HAL3.4

Change-Id: I1822a1778e4917a639d601c77f6b50b27b46b81e
be3d5d5671fd2c38baa5d66bfc0775c54af06740 05-May-2016 Haynes Mathew George <hgeorge@codeaurora.org> Merge "audioflinger: set flush pending on invalidating offload track" into nyc-dev am: 0c43cb3a98 am: 08686471b0
am: 9ec791f42a

* commit '9ec791f42a68887114a67a880ba1c73e6497ae1a':
audioflinger: set flush pending on invalidating offload track

Change-Id: I671e9facbdf952a6b854a7f8c311802f8246f04b
9ec791f42a68887114a67a880ba1c73e6497ae1a 05-May-2016 Eric Laurent <elaurent@google.com> Merge "audioflinger: set flush pending on invalidating offload track" into nyc-dev am: 0c43cb3a98
am: 08686471b0

* commit '08686471b02b70d47524bdea85b9b182b42bea88':
audioflinger: set flush pending on invalidating offload track

Change-Id: I534bd6dd5eb96d17a340b3b2bdc7db9050833445
5bef4378b010e1000290939a9bc68ae3d8f4ea69 05-May-2016 Zhijun He <zhijunhe@google.com> Merge "Camera: update service to support HAL3.4" into nyc-dev am: f15d88daa7
am: 76fa63ccef

* commit '76fa63ccefbac3ca3e722bc9ba016101858c3cdd':
Camera: update service to support HAL3.4

Change-Id: I15a6542ce38e160498c68a19c851447d50add2ee
1ac5a450420767378c44476eeff735402f017c48 05-May-2016 Zhijun He <zhijunhe@google.com> Merge "Camera: update service to support HAL3.4" into nyc-dev
am: f15d88daa7

* commit 'f15d88daa721d53921bfb7798dd12f7c74b44ac1':
Camera: update service to support HAL3.4

Change-Id: I2e29f46977befaf13478d3132bb2a68bb39ea003
236e8ffc45c43dccecd95447d1092f7cc697ad25 05-May-2016 Haynes Mathew George <hgeorge@codeaurora.org> Merge "audioflinger: set flush pending on invalidating offload track" into nyc-dev
am: 0c43cb3a98

* commit '0c43cb3a987351395badada9ee9384afb09d1c78':
audioflinger: set flush pending on invalidating offload track

Change-Id: If1f63ccd2b4de7b7de3979d28626e9f45b23ce15
f15d88daa721d53921bfb7798dd12f7c74b44ac1 05-May-2016 Zhijun He <zhijunhe@google.com> Merge "Camera: update service to support HAL3.4" into nyc-dev
0c43cb3a987351395badada9ee9384afb09d1c78 05-May-2016 Eric Laurent <elaurent@google.com> Merge "audioflinger: set flush pending on invalidating offload track" into nyc-dev
4afbdecf8c6dc5ad04f6fa6c8712ce2c56a00c47 05-May-2016 Zhijun He <zhijunhe@google.com> Camera: update service to support HAL3.4

We need support HAL3.4 device in cameraservice.

Bug:28599474
Change-Id: Ibad0249349335d78557820429439e71eceba259e
amera/libcameraservice/CameraService.cpp
05317d29b27e5fda654bea21b80d4423a03f49b3 04-May-2016 Haynes Mathew George <hgeorge@codeaurora.org> audioflinger: set flush pending on invalidating offload track

On invalidating an offload track, the IAudioTrack instance is
destroyed and the offload output is released. If it so happens
that APM::getOutputForAttr for the new IAudioTrack is called before
OffloadThread::prepareTracks_l checks and removes an invalid track,
the same output can get reused.

The side effect of this is data present in HAL and below from before the
invalidate will be rendered before data from the new seek position
is rendered. This is unexpected.

To fix this, set hint to issue flush when an offload track is invalidated.

Bug: 28566885
Change-Id: Ib6c38a3abb600598b87591bac90d03b7150d5216
udioflinger/Threads.cpp
udioflinger/Threads.h
49ac2a724c82f5670a811ae74551a5e9c529bb69 02-May-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of 98a9b2a to nyc-dev-plus-aosp am: 47734c9509
am: 7e34612e2b

* commit '7e34612e2b5db65ecff13ff65b3816fffb7a0974':
Fix google-explicit-constructor warnings.

Change-Id: I5b1e3eae1348800c288e30845c6eb6d1bf69e72f
47734c9509ecb472c2844cae46e2d916b9358321 02-May-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of 98a9b2a to nyc-dev-plus-aosp

Change-Id: Iae0a5cb698807d74ba28878d7ce1f69b6ba5219a
98a9b2a491360c762e2ed46a9126f576693645a5 02-May-2016 Chih-Hung Hsieh <chh@google.com> Merge "Fix google-explicit-constructor warnings."
am: e7d3c72f23

* commit 'e7d3c72f23384774407248edcbfc9c9d78bfe304':
Fix google-explicit-constructor warnings.

Change-Id: I7ff1a09d757b71252db243b6527f6c131d11c4a6
97b2c330950d7b01352933fbab2ac9123728f9a1 02-May-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera: Fix passing video native handle for 64-bit app" into nyc-dev am: 9e23567ed0 am: e7adbfb233
am: e6eff1af18

* commit 'e6eff1af18bf6410a1afa062f3503f00c88d1cbc':
Camera: Fix passing video native handle for 64-bit app

Change-Id: Ic67211603f3d260520e2aed2069f15a21ab70695
e6eff1af18bf6410a1afa062f3503f00c88d1cbc 02-May-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera: Fix passing video native handle for 64-bit app" into nyc-dev am: 9e23567ed0
am: e7adbfb233

* commit 'e7adbfb233b4784dad0dbe0f873297895e8330c5':
Camera: Fix passing video native handle for 64-bit app

Change-Id: If940696a1ebd4c2b3294151627a63d2daecd581f
20be7bf5ba6f3d4db36686d5af4316006cf9bb27 02-May-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera: Fix passing video native handle for 64-bit app" into nyc-dev
am: 9e23567ed0

* commit '9e23567ed02c30bb390ffe56b25f59b626cd9eab':
Camera: Fix passing video native handle for 64-bit app

Change-Id: I1bc16ac12f98f969ab9d54b43fdda90fc462c300
9e23567ed02c30bb390ffe56b25f59b626cd9eab 02-May-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera: Fix passing video native handle for 64-bit app" into nyc-dev
2d13b1d3eeaba31d8c15acc6037fd68b150a9a66 28-Apr-2016 Chien-Yu Chen <cychen@google.com> Camera: Fix passing video native handle for 64-bit app

Add new binder calls to pass video native handle so the video native
handle can be passed between 32-bit and 64-bit processes.

Remove problematic code that used IMemory to pass video native
handle because the sizes of VideoNativeMetadata are different in
32-bit and 64-bit processes.

Bug: 28403412
Change-Id: I3341b1812ecc41d61846bb72ca926ecb1674c9ec
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/Camera2Client.h
amera/libcameraservice/api1/CameraClient.cpp
amera/libcameraservice/api1/CameraClient.h
9d9138534bb1736b662b31025b0e412273269684 29-Apr-2016 Glenn Kasten <gkasten@google.com> Merge "Can now indicate the desired number of notifications (sub-buffers)" into nyc-dev am: d0389b874d am: c03ab34de0
am: aba26a54a8

* commit 'aba26a54a8b007fafca3772082c0db5e43e16aec':
Can now indicate the desired number of notifications (sub-buffers)

Change-Id: I5650eb7f47e4daccdd068950146601c98e44ea39
c03ab34de017c1330632f4d1c37983bb493bf93b 29-Apr-2016 Glenn Kasten <gkasten@google.com> Merge "Can now indicate the desired number of notifications (sub-buffers)" into nyc-dev
am: d0389b874d

* commit 'd0389b874d592b960bdc456c2514a36b082c2c94':
Can now indicate the desired number of notifications (sub-buffers)

Change-Id: I56e20dbd5f386b53af87acc9a5fe111f60147a5b
d0389b874d592b960bdc456c2514a36b082c2c94 29-Apr-2016 Glenn Kasten <gkasten@google.com> Merge "Can now indicate the desired number of notifications (sub-buffers)" into nyc-dev
c7285abd573c046250c3bf03b5720d3a2bf55eb0 29-Apr-2016 Glenn Kasten <gkasten@google.com> Make max fast tracks configurable using a property am: dc2c50bad4 am: 3b2d92e2ec
am: 3b5f5f51b5

* commit '3b5f5f51b51439b60ac46ec07bb6bb03525a908e':
Make max fast tracks configurable using a property

Change-Id: Ie3a015ffd5638cf4ea353ad14863ff1a09858daf
3b5f5f51b51439b60ac46ec07bb6bb03525a908e 29-Apr-2016 Glenn Kasten <gkasten@google.com> Make max fast tracks configurable using a property am: dc2c50bad4
am: 3b2d92e2ec

* commit '3b2d92e2ec37ac8ab0ea3f234739338cd417ef42':
Make max fast tracks configurable using a property

Change-Id: I5ef6541a879f4700c92b095d82dcb79fe0ef474b
03f191f556d021cfcefa260ceeba2c87283febc6 29-Apr-2016 Glenn Kasten <gkasten@google.com> Make max fast tracks configurable using a property
am: dc2c50bad4

* commit 'dc2c50bad491d2c0c8a2efc0e24491076701c63c':
Make max fast tracks configurable using a property

Change-Id: Icc2a6a36ecbb9f92df7141fbafff3af03823beaf
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
udioflinger/Threads.cpp
dc2c50bad491d2c0c8a2efc0e24491076701c63c 21-Apr-2016 Glenn Kasten <gkasten@google.com> Make max fast tracks configurable using a property

ro.audio.max_fast_tracks

Rename the currently configured maximum number of fast tracks
from FastMixerState::kMaxFastTracks to FastMixerState::sMaxFastTracks.

There is no guarantee that the CPU will be able to handle
the configured number of fast tracks.

Bug: 27564141
Change-Id: If9af226d839b226503488c3cb20a4bb8950b429d
udioflinger/FastMixer.cpp
udioflinger/FastMixerDumpState.cpp
udioflinger/FastMixerState.cpp
udioflinger/FastMixerState.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
9b5f010ed72dab56b1276b13a4ff90966fa09679 28-Apr-2016 Martijn Coenen <maco@google.com> Merge "Move system services into correct cpusets." into nyc-dev am: ecd0a41 am: 4c0d6da
am: 2d7ca24

* commit '2d7ca248622a598002e16dc289a650910da39a81':
Move system services into correct cpusets.

Change-Id: Idd17f4ba7bf8a2510d608cc6576a53857fa03d14
4c0d6da0073e33d1c88ed52481f430ad68bd73ea 28-Apr-2016 Martijn Coenen <maco@google.com> Merge "Move system services into correct cpusets." into nyc-dev
am: ecd0a41

* commit 'ecd0a41d9a2cc9efbc4ad6d4c91d417461772933':
Move system services into correct cpusets.

Change-Id: I752b8b857ca94be20160ddebfb041aab0cca5fca
ecd0a41d9a2cc9efbc4ad6d4c91d417461772933 28-Apr-2016 Martijn Coenen <maco@google.com> Merge "Move system services into correct cpusets." into nyc-dev
090ef604f81447eab4aa0a5b45d6307482573560 27-Apr-2016 Chih-Hung Hsieh <chh@google.com> Fix google-explicit-constructor warnings.

Bug: 28341362
Change-Id: I625fbab25f16282c2ea929cd16283d9d146fa17b
amera/libcameraservice/device3/Camera3ZslStream.cpp
0edcda6522a59bc6aece6c3fc5372d4d164c40db 27-Apr-2016 Jeff Tinker <jtinker@google.com> Merge "Remove MediaDrm stack from mediaserver" into nyc-dev am: 4060196 am: 51ab952
am: c46b6b8

* commit 'c46b6b8e4d69815bdd9e3f1645ec47a61b19ead2':
Remove MediaDrm stack from mediaserver

Change-Id: I10840affd5e4e907d9cb88c45093731c6e76bafc
51ab9527d7427589e527d0dc8118d663926a8b68 27-Apr-2016 Jeff Tinker <jtinker@google.com> Merge "Remove MediaDrm stack from mediaserver" into nyc-dev
am: 4060196

* commit '40601964e1f8966d90c31b0c389dfab6a515bd50':
Remove MediaDrm stack from mediaserver

Change-Id: I8d9fca7ed5d7bc2d9338dd9919ceef6631abd781
40601964e1f8966d90c31b0c389dfab6a515bd50 27-Apr-2016 Jeff Tinker <jtinker@google.com> Merge "Remove MediaDrm stack from mediaserver" into nyc-dev
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
ediadrm/Android.mk
ediadrm/DrmSessionClientInterface.h
ediadrm/MediaDrmService.cpp
d5eeb6e9d262c7ca87d52167768020c20f04345c 27-Apr-2016 Shuzhen Wang <shuzhenwang@google.com> Merge "Camera: Use separate lock for mStreamingRequestId" into nyc-dev am: c1e0154 am: ad17c39
am: 2fe4e23

* commit '2fe4e238282dc22b7f8e087eebf8a0c2d59baf84':
Camera: Use separate lock for mStreamingRequestId

Change-Id: I2831a0645a07b03991c82b379118f60b6f023231
cc52f382be76413f0fccb456a8c25c4029c88a54 27-Apr-2016 Shuzhen Wang <shuzhenwang@google.com> Merge "Camera: Do not signal AutoConditionLock if acquisition times out" into nyc-dev am: bb6ac18 am: f8e8389
am: 79aa45c

* commit '79aa45cc5171b5f26d68edd8d05aadbfb09ee7c4':
Camera: Do not signal AutoConditionLock if acquisition times out

Change-Id: I9075d8307c1eb193c0bd3e22cdb749cdd25d52cf
ad17c39aef184144299aeb3662d07d23f191e46b 27-Apr-2016 Shuzhen Wang <shuzhenwang@google.com> Merge "Camera: Use separate lock for mStreamingRequestId" into nyc-dev
am: c1e0154

* commit 'c1e0154940f84014967f9f611d22ad85a01be7cb':
Camera: Use separate lock for mStreamingRequestId

Change-Id: If4ccee3141c8e0927c796b06962b5f5219f3d00f
c1e0154940f84014967f9f611d22ad85a01be7cb 27-Apr-2016 Shuzhen Wang <shuzhenwang@google.com> Merge "Camera: Use separate lock for mStreamingRequestId" into nyc-dev
f8e8389fba55bee961ec8a3e872f9af1dc28d704 27-Apr-2016 Shuzhen Wang <shuzhenwang@google.com> Merge "Camera: Do not signal AutoConditionLock if acquisition times out" into nyc-dev
am: bb6ac18

* commit 'bb6ac1823f7a3d74fbfac841dc74da556f05d2e7':
Camera: Do not signal AutoConditionLock if acquisition times out

Change-Id: I7941baad7d9af0f77bd1a68b87d787f986b80d71
bb6ac1823f7a3d74fbfac841dc74da556f05d2e7 27-Apr-2016 Shuzhen Wang <shuzhenwang@google.com> Merge "Camera: Do not signal AutoConditionLock if acquisition times out" into nyc-dev
3092571cdfedc6988d35e28824ebe0c02bd42462 27-Apr-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: For HFR, make priority elevation request synchronous" into nyc-dev am: 89b3068 am: 33cd256
am: 4719650

* commit '4719650be6489f43f911671a5d6721f1272feecb':
Camera3: For HFR, make priority elevation request synchronous

Change-Id: I16b478ff5d776365497c6a18b9a25cd0385f64a6
33cd2560498bcf2ac77901b853235dbb0aeca1c7 26-Apr-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: For HFR, make priority elevation request synchronous" into nyc-dev
am: 89b3068

* commit '89b3068ff2819c37db5a3af280f927183fe56849':
Camera3: For HFR, make priority elevation request synchronous

Change-Id: I609a02706e8707247b1392295e276c77f1c82e8c
89b3068ff2819c37db5a3af280f927183fe56849 26-Apr-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: For HFR, make priority elevation request synchronous" into nyc-dev
c9ca6788c65ed3f578d1a1ed0ba7c268254dcb4b 26-Apr-2016 Shuzhen Wang <shuzhenwang@google.com> Camera: Use separate lock for mStreamingRequestId

There are cases where evictClientIdByRemote holds
mBinderSerializationLock and waits for mRequestLock, and at the same
time checkAndStopRepeatingRequest holds mRequestLock and waits for
mBinderSerializationLock, causing deadlock.

Solution is to use separate lock to protect mStreamingRequestId.

Bug: 28295136
Change-Id: I40f8e1ded29abde86bc12b20dd119f9f3371ebb2
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
34713c04b5e1a897b0fd905a89622059a787f7a7 26-Apr-2016 Shuzhen Wang <shuzhenwang@google.com> Camera: Do not signal AutoConditionLock if acquisition times out

It's possible for AutoConditionLock to time out in waitAndAcquire
while waiting for the condition. In this case, we don't want to
reset the state because others may be holding the condition without
lock.

Bug: 28295136
Change-Id: Ife90232daef8fd0d31acf9e52cfbcf542987e3fa
amera/libcameraservice/utils/AutoConditionLock.cpp
amera/libcameraservice/utils/AutoConditionLock.h
dfd76b90b574d29256608216c82fe258b681de0d 26-Apr-2016 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: override external facing for API1 client" into nyc-dev am: c3c06c4 am: f873178
am: 3755a45

* commit '3755a452863a0552fac825d95f18507cf8c9baa9':
Camera: override external facing for API1 client

Change-Id: Ib525f5abcf4bb9150b4adce1aacc8561951fa166
3755a452863a0552fac825d95f18507cf8c9baa9 26-Apr-2016 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: override external facing for API1 client" into nyc-dev am: c3c06c4
am: f873178

* commit 'f8731788486508c4085aafe205188e0b4fecdc59':
Camera: override external facing for API1 client

Change-Id: I19fed9a6a92cd65e0f57b3bda79b5e2dba64471f
0f695ebaefdafb10f30e612db017e64a2bcd8d90 26-Apr-2016 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: override external facing for API1 client" into nyc-dev
am: c3c06c4

* commit 'c3c06c4fe329d07bd7d442206bc9eb63e92bf5bd':
Camera: override external facing for API1 client

Change-Id: Ia4a4f84bb712392a7f63e3470a87028dfb7d3fea
c3c06c4fe329d07bd7d442206bc9eb63e92bf5bd 26-Apr-2016 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: override external facing for API1 client" into nyc-dev
58f3e5541361cb04d64b8ad6a676ad0d77a4ee57 15-Apr-2016 Martijn Coenen <maco@google.com> Move system services into correct cpusets.

To foreground:
- cameraserver
- mediaserver
- audioserver
- mediacodec
- drmserver
- mediadrmserver
- mediaextractor

Bug: 24949295
Change-Id: I182e5cf6fa4b33d87a0a2f77b0b03fa8d76b8e27
ediacodec/mediacodec.rc
ediadrm/mediadrmserver.rc
ediaextractor/mediaextractor.rc
0f6778e333a0ee3750135e02c259f49382a6896a 26-Apr-2016 Eino-Ville Talvala <etalvala@google.com> Camera3: For HFR, make priority elevation request synchronous

Since we only do this once per session, it has trivial overhead,
and it's important that any permission denials are actually properly
detected.

Bug: 28246165
Change-Id: Id4c23db6e3b7ab5f7755b3f55ddd589cbdbde8af
amera/libcameraservice/device3/Camera3Device.cpp
88a04e02e405ad5557f59d60843c7fda79e84444 26-Apr-2016 Jim Kaye <jameskaye@google.com> Merge changes I4588e7da,Ic4a70a1b into nyc-dev am: 56f949b am: 99893ca
am: d6114b7

* commit 'd6114b7a62b18cc7a692e1f65c8e4445bfa15f52':
Fix Emulator CTS tests for Camera, Location, Sensors, Telephony
Camera: Disconnect camera after checking flash unit

Change-Id: Iae08214e11873a8b3b3ecfc619ff47ea8c50401a
d6114b7a62b18cc7a692e1f65c8e4445bfa15f52 26-Apr-2016 Chien-Yu Chen <cychen@google.com> Merge changes I4588e7da,Ic4a70a1b into nyc-dev am: 56f949b
am: 99893ca

* commit '99893ca9db6472bf81d0d7fc42bb1df6ccc5617b':
Fix Emulator CTS tests for Camera, Location, Sensors, Telephony
Camera: Disconnect camera after checking flash unit

Change-Id: Icc1d54b074dbbbcaf6edb5aae91bceac18a7b835
26492c0e67ef3f79ea98eddf128658383aecfdd2 26-Apr-2016 Jim Kaye <jameskaye@google.com> Merge changes I4588e7da,Ic4a70a1b into nyc-dev
am: 56f949b

* commit '56f949b44a4c8d287c7f3028695eceb07ae41f54':
Fix Emulator CTS tests for Camera, Location, Sensors, Telephony
Camera: Disconnect camera after checking flash unit

Change-Id: I2487e119869ad5b513a2d29891e8db48e2336232
56f949b44a4c8d287c7f3028695eceb07ae41f54 25-Apr-2016 Chien-Yu Chen <cychen@google.com> Merge changes I4588e7da,Ic4a70a1b into nyc-dev

* changes:
Fix Emulator CTS tests for Camera, Location, Sensors, Telephony
Camera: Disconnect camera after checking flash unit
3d1c478fc34824db4e68d50c12f283d6b55c272e 13-Apr-2016 Jim Kaye <jameskaye@google.com> Fix Emulator CTS tests for Camera, Location, Sensors, Telephony

This gets all the android.app.cts.SystemFeaturesTest tests to pass.

In addition to these changes, the AVD's config.ini must indicate
an emulated front camera and no back camera.

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

Bug: 28170202

Change-Id: I4588e7daeea034847912e9044c44edf629336c35
amera/libcameraservice/CameraFlashlight.cpp
0b094277076286d100cf1da6860b7038be662ce9 22-Apr-2016 Yin-Chia Yeh <yinchiayeh@google.com> DO NOT MERGE: Camera: override external facing for API1 client

Bug: 28322515
Change-Id: I6ecb4f27c98b2c5d509756e27259fa8afdd27631
amera/libcameraservice/CameraService.cpp
9b5a6e9a667f85adeddea787a9f609d9cde84ef4 22-Apr-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: override external facing for API1 client

Bug: 28322515
Change-Id: I6ecb4f27c98b2c5d509756e27259fa8afdd27631
amera/libcameraservice/CameraService.cpp
6dcc706b3b06eedcc8d24a3001543c3f49999d94 18-Apr-2016 Chien-Yu Chen <cychen@google.com> Camera: Disconnect camera after checking flash unit

Disconnect camera device after opening it just to check if
it has a flash unit. Leave it open if torch is being turned on.

Bug: 28170202

Change-Id: Ic4a70a1b4be28625449ed52cbf6c5d214089adb7
amera/libcameraservice/CameraFlashlight.cpp
amera/libcameraservice/CameraFlashlight.h
7b5ee5765f5632c36932d4630891936efd255270 21-Apr-2016 Eric Laurent <elaurent@google.com> Merge "Merge "audio policy: fix regression in getDeviceConnectionState()." into nyc-dev am: f3aaf48fe2 am: 19665dc930" into nyc-mr1-dev-plus-aosp
am: 6b6f366cb1

* commit '6b6f366cb1daacbce97b865515e839a0fcc9da53':
audio policy: fix regression in getDeviceConnectionState().

Change-Id: I8f0318371882609d0da69c64de2a4e053177a9b3
6b15377f5cdcfe5f8e2eee6ddf56a34b8282a2b6 21-Apr-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Add dumpsys --unreachable support" into nyc-dev am: 7e52fc604b am: 2362982a1d
am: 0e0b811cfe

* commit '0e0b811cfe8383cf7d9d9f57c91b2bc1d63b8605':
Camera: Add dumpsys --unreachable support

Change-Id: Id4a6486078083e3e06e4b6ed12c66d2b4ae31e3a
19665dc9307e9b18f188dea4001fe24adbda4500 21-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix regression in getDeviceConnectionState()." into nyc-dev
am: f3aaf48fe2

* commit 'f3aaf48fe2ca7f9886f1e4d00db16c575e9a97c9':
audio policy: fix regression in getDeviceConnectionState().

Change-Id: I8274672487d9f627277edd379b7f4b04d94749a5
2362982a1d5ec938a296d7ec2c247490f0db5dc3 21-Apr-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Add dumpsys --unreachable support" into nyc-dev
am: 7e52fc604b

* commit '7e52fc604bab7e401aa6a3473d94aa891d3808c8':
Camera: Add dumpsys --unreachable support

Change-Id: I6c8aeada750544610fd03320965521021051896d
f3aaf48fe2ca7f9886f1e4d00db16c575e9a97c9 21-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix regression in getDeviceConnectionState()." into nyc-dev
7e52fc604bab7e401aa6a3473d94aa891d3808c8 21-Apr-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Add dumpsys --unreachable support" into nyc-dev
5aed1cccd6776e7d6cf18b86f97ec2bd6893c272 21-Apr-2016 Mikhail Naganov <mnaganov@google.com> Merge "Symbolize flags of IOProfile in dumps"
6163904559247601e9a0834a3c09341862bcff95 21-Apr-2016 Mikhail Naganov <mnaganov@google.com> Symbolize flags of IOProfile in dumps

Sample symbolization:

- flags: 0x0006 (AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_FAST)
- flags: 0x0008 (AUDIO_OUTPUT_FLAG_DEEP_BUFFER)
- flags: 0x0031 (AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING)
- flags: 0x0104 (AUDIO_OUTPUT_FLAG_FAST|AUDIO_OUTPUT_FLAG_RAW)

Change-Id: Id155cffea4e1defb1e0c2c1d24b869d4151b14e3
udiopolicy/common/managerdefinitions/include/TypeConverter.h
udiopolicy/common/managerdefinitions/src/IOProfile.cpp
udiopolicy/common/managerdefinitions/src/TypeConverter.cpp
634b71478742310960f3fdb4241e70a0735712c4 20-Apr-2016 Eric Laurent <elaurent@google.com> audio policy: fix regression in getDeviceConnectionState().

Fix problem in DeviceVector() device search logic causing
failure to report connection of devices when no address is provided
(e.g when called from AudioManager.isBluetoothA2dpOn()).

Bug: 28286051
Change-Id: I7ca732e195d2ddcdc1a93b78aed21523b3461aa9
udiopolicy/common/managerdefinitions/include/DeviceDescriptor.h
udiopolicy/common/managerdefinitions/include/HwModule.h
udiopolicy/common/managerdefinitions/src/DeviceDescriptor.cpp
udiopolicy/common/managerdefinitions/src/HwModule.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
fc5826376a3e770fbc23ceff7e2e20168938668b 21-Apr-2016 Eric Laurent <elaurent@google.com> resolve merge conflicts of 06c38ca to nyc-dev-plus-aosp am: dcddb00
am: f4393e4

* commit 'f4393e4b88bbb2f8910d59ed64a4ececf23b29d2':
audio policy: broadcast device connect event before refreshing profiles

Change-Id: I2ff190d3764e8406b20fb0ab3459e9397bd1fc4f
dcddb00907ee226796163cd91901139f8532c8d7 20-Apr-2016 Eric Laurent <elaurent@google.com> resolve merge conflicts of 06c38ca to nyc-dev-plus-aosp

Change-Id: Ic4f2cc36449e70ae4feef72238b9e16b3ae88b65
eb03cbae99cc907b26fe95ec2c6562d7daef53cc 20-Apr-2016 Mikhail Naganov <mnaganov@google.com> Merge "Small improvements in audio_policy dump"
d89821ec5481e0640d84bfe3e29a1254a52ca683 20-Apr-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Add dumpsys --unreachable support

Use libmemunreachable to instrument camera service to detect
native memory leaks.

Will detect any memory allocated through jemalloc; does not track
gralloc or other special allocations.

It can be triggered with
dumpsys media.camera --unreachable

Bug: 28295283
Change-Id: Ib4e73e9d1a168b3cee4c56a9bf1aeb438591c799
amera/libcameraservice/Android.mk
amera/libcameraservice/CameraService.cpp
44481e7a0d0a3dd2c0ec3195a693f5b373659dc6 20-Apr-2016 François Gaffie <francois.gaffie@intel.com> audio policy: broadcast device connect event before refreshing profiles

This patch broadcasts the connect device event before checking and reloading
capabilities of profiles.
It allows the HAL implementor to use connect / disconnect event to respectively
load / reset capabilities of devices that has dynamic capabilities (e.g. HDMI).

Change-Id: Ie0533da25fed89cb9e5bbfc5b1fc886b3176837d

Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
0d6a03301d77724c00c7a9ce7b8c123092d07a19 20-Apr-2016 Mikhail Naganov <mnaganov@google.com> Small improvements in audio_policy dump

1. Introduce a formatting helper for audio_mode_t, use it.
2. Get rid of mSize in TypeConverter.
3. Convert to a string unknown enum values.

Change-Id: I8fc222225c2dd48dea715bb3fe4ecb3f1eaecc46
udiopolicy/common/managerdefinitions/include/TypeConverter.h
udiopolicy/common/managerdefinitions/src/TypeConverter.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
6a3b25f04f04ec9bb4133042af431a810dc70868 20-Apr-2016 Glenn Kasten <gkasten@google.com> Merge "Add AudioSystem::getFrameCountHAL()" into nyc-dev am: eb7f394004 am: 5fb71f6247
am: b137e82406

* commit 'b137e8240624e363951bcd3a42cb5d68b7622513':
Add AudioSystem::getFrameCountHAL()

Change-Id: Iab15db51b03e80e39d6711d46967995fb796a2f3
5fb71f62474c92206dd068b725dab0572c9ede95 20-Apr-2016 Glenn Kasten <gkasten@google.com> Merge "Add AudioSystem::getFrameCountHAL()" into nyc-dev
am: eb7f394004

* commit 'eb7f3940044effc6a8b313a73134b5cc2156068c':
Add AudioSystem::getFrameCountHAL()

Change-Id: Ib82d6e8fb760a90e47a374cd1d10f5a956ea1a9c
eb7f3940044effc6a8b313a73134b5cc2156068c 20-Apr-2016 Glenn Kasten <gkasten@google.com> Merge "Add AudioSystem::getFrameCountHAL()" into nyc-dev
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
udioflinger/Threads.h
54840ea273edb58259cb592992d95eb718327b23 19-Apr-2016 Eric Laurent <elaurent@google.com> fix the build am: 0631aee am: 9ce4e24
am: 7ffe507

* commit '7ffe507c702f2968075038a195f338ea4d2e646a':
fix the build

Change-Id: I45b1ce57e6036d19b578619d1be450173720a344
9ce4e2408a809fdfa63d56c92581ba3aed22e5cb 19-Apr-2016 Eric Laurent <elaurent@google.com> fix the build
am: 0631aee

* commit '0631aee95c5a98fb2dc0a45f093f9bd0cfbe463f':
fix the build

Change-Id: Iea66707492737a300f8905604bde4d1a629dd92c
0631aee95c5a98fb2dc0a45f093f9bd0cfbe463f 19-Apr-2016 Eric Laurent <elaurent@google.com> fix the build

Fix the build for platforms using legacy audio_policy.conf file
broken by commit 5a2b6298.

Change-Id: Icb9c8027b1a8163d19162f311ec1364da7383a2c
udiopolicy/common/managerdefinitions/src/StreamDescriptor.cpp
cc607b16f0178fd1aeb0da680d21fd7eb1d91b1c 19-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: support platforms with no audio devices" into nyc-dev am: 8111860 am: 21c4ffc
am: 010b235

* commit '010b235b26dea3913374b688939120f2542c0225':
audio policy: support platforms with no audio devices

Change-Id: I949c911c89f8171aabe6f550628cf6c3d1329400
010b235b26dea3913374b688939120f2542c0225 19-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: support platforms with no audio devices" into nyc-dev am: 8111860
am: 21c4ffc

* commit '21c4ffc9af1b6c8663a075bc5cf4d447288be7ef':
audio policy: support platforms with no audio devices

Change-Id: I2bef297f529f40e7b900f659c9b56b6898d6e027
8731a0a7b991470156db4dfa021be38f6b73eb8c 19-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: support platforms with no audio devices" into nyc-dev
am: 8111860

* commit '8111860ba116d84034b2aa21445feec71c65a9d4':
audio policy: support platforms with no audio devices

Change-Id: Iae933bddfccc3955c1cc93a1418accb0c0ca12e7
8111860ba116d84034b2aa21445feec71c65a9d4 19-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: support platforms with no audio devices" into nyc-dev
ceeb34df46f4e3f330fab8893d489fee6124ac46 19-Apr-2016 Glenn Kasten <gkasten@google.com> Merge "Reduce rollovers of unique ID generator" into nyc-dev am: 88bd61e am: eb05911
am: a73741a

* commit 'a73741a2df3420d84a0c78833f9fbf6586c0cbed':
Reduce rollovers of unique ID generator

Change-Id: I5b33c3d90bd357778f7d27d6a48392f6cc2b56ff
eb059113754c54b178d6de6feec13daadd244672 19-Apr-2016 Glenn Kasten <gkasten@google.com> Merge "Reduce rollovers of unique ID generator" into nyc-dev
am: 88bd61e

* commit '88bd61e31184a72e34e5a8c2ae11d034e01845aa':
Reduce rollovers of unique ID generator

Change-Id: I424811996d1dd9f6ee71ceda4fff515c7698334f
88bd61e31184a72e34e5a8c2ae11d034e01845aa 19-Apr-2016 Glenn Kasten <gkasten@google.com> Merge "Reduce rollovers of unique ID generator" into nyc-dev
5a2b62984c7cecd1761fe272c078dd814c167942 15-Apr-2016 Eric Laurent <elaurent@google.com> audio policy: support platforms with no audio devices

Remove requirement to declare an AUDIO_DEVICE_OUT_SPEAKER device
for platforms without audio output.

By convention:
- platforms without audio output should declare a single output
device of type AUDIO_DEVICE_OUT_STUB also declared as default
output device
- platforms without audio input should declare a single input
device of type AUDIO_DEVICE_IN_STUB

Platforms with no audio at all can use stub audio policy configuration
file and audio HAL with the following instructions in device.mk file:

USE_XML_AUDIO_POLICY_CONF := 1
PRODUCT_PACKAGES += \
audio.stub.default
PRODUCT_COPY_FILES += \
frameworks/av/services/audiopolicy/config/audio_policy_configuration_stub.xml:system/etc/audio_policy_configuration.xml

Bug: 25075342
Change-Id: Id700978559427edd3c7cc38d98f2fd52928367ed
udiopolicy/AudioPolicyInterface.h
udiopolicy/common/include/policy.h
udiopolicy/common/managerdefinitions/include/VolumeCurve.h
udiopolicy/common/managerdefinitions/src/AudioPatch.cpp
udiopolicy/common/managerdefinitions/src/StreamDescriptor.cpp
udiopolicy/common/managerdefinitions/src/TypeConverter.cpp
udiopolicy/config/audio_policy_configuration_stub.xml
udiopolicy/enginedefault/src/Engine.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
ec4c575a65382c87f1a35f3a3996115ef478da95 19-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: modify ringone volume attenuation over headset." into nyc-dev am: 3f5eba4 am: bb4c624
am: 375cbd3f2b

* commit '375cbd3f2b46c20bd0de0c0209dfe0ffd900590a':
audio policy: modify ringone volume attenuation over headset.

Change-Id: I347e65e73ebe7dbe622ffae36d1c874ddc7cd588
bb4c624a6e68cc1926987b71f7d100a9d7e36cc3 19-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: modify ringone volume attenuation over headset." into nyc-dev
am: 3f5eba4

* commit '3f5eba440fa87637211f1d3b3f0061fc37065636':
audio policy: modify ringone volume attenuation over headset.

Change-Id: I480c278de88873ffc250b74fc4d02cf5e8ac5ac0
3f5eba440fa87637211f1d3b3f0061fc37065636 19-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: modify ringone volume attenuation over headset." into nyc-dev
d2e67e1ef59921101fd7b047e2acf84e5d16d66e 11-Apr-2016 Glenn Kasten <gkasten@google.com> Reduce rollovers of unique ID generator

Bug: 28119934
Change-Id: I6c57d5555f6c5ddc4d4eee1e6f27fc4aaeb31c83
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
dd7bae67c2edb18df6249f8ba14ff4d187a2cb20 16-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix call volume regression" into nyc-dev am: 5391b91
am: 78c3177

* commit '78c317708f21ebf514beda9757926815e621e9bf':
audio policy: fix call volume regression

Change-Id: Ib251c3629bd9ff6540b8db72f907ddd73439a222
78c317708f21ebf514beda9757926815e621e9bf 16-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix call volume regression" into nyc-dev
am: 5391b91

* commit '5391b916bc5c55dbac80fe0963ea00e11faaac90':
audio policy: fix call volume regression

Change-Id: I3ae8edbdb9ed8853507673f608f4b4de441f0300
5391b916bc5c55dbac80fe0963ea00e11faaac90 16-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix call volume regression" into nyc-dev
d3926fe68ffd8d156e7c019277bbeb32ca786d8e 16-Apr-2016 Eric Laurent <elaurent@google.com> audio policy: fix call volume regression

Commit 1fd372e4 caused a regression preventing to
change in call volume.

Bug: 28223472
Change-Id: I31bd220ebdde1175c2f0a5ef1e874e86c6615ff8
udiopolicy/managerdefault/AudioPolicyManager.cpp
7c8c4f40498e1e10826dbfed1668b9b61b126e3d 16-Apr-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera: Stop repeating request if its output is abandoned" into nyc-dev am: 1c39c2b
am: 06d4790

* commit '06d47907bed5594198cfe7a5c7a89d5877625b58':
Camera: Stop repeating request if its output is abandoned

Change-Id: I6a1df5918e098a47200f36175c6ec639412d1bcb
06d47907bed5594198cfe7a5c7a89d5877625b58 16-Apr-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera: Stop repeating request if its output is abandoned" into nyc-dev
am: 1c39c2b

* commit '1c39c2bd6780e858e0f36cfc58eac84ce88ef3ce':
Camera: Stop repeating request if its output is abandoned

Change-Id: I9bdd7a3ee21988a8e9ddf598603151e47220d51c
e8c535e833ed135895e99ca81aa3b85d80d7cf3c 14-Apr-2016 Chien-Yu Chen <cychen@google.com> Camera: Stop repeating request if its output is abandoned

Stop repeating request if any of its output stream is abandoned.
Add a callback to notify the repeating request has been stopped
with frame number of the last frame.

Update NDK with the new callback and behavior.

Bug: 21270879

Change-Id: I3553775c7807a77104aa1650609480ca3321310c
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
amera/libcameraservice/common/Camera2ClientBase.cpp
amera/libcameraservice/common/Camera2ClientBase.h
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3Stream.cpp
amera/libcameraservice/device3/Camera3Stream.h
amera/libcameraservice/device3/Camera3StreamInterface.h
fc9445caebaa30a68f761b51e41da7c66b851015 14-Apr-2016 Christopher Wiley <wiley@google.com> Merge "Export libbinder headers as part of libcameraservice" am: 1068fed am: 11dae86
am: 321a0f3

* commit '321a0f3d95efcbccb6cfab4f47b96d06c4239213':
Export libbinder headers as part of libcameraservice

Change-Id: I7a8eaefd54fdbd37337ae762ef219a15908c171d
6af1c1dc8954a555c6c6ef07d4f93e243d7f08cf 14-Apr-2016 Eric Laurent <elaurent@google.com> audio policy: modify ringone volume attenuation over headset.

Do not limit ringtone volume over headseet when combined with speaker and
no music is playing.

bug: 26769982

Change-Id: I5309bf0d672cca67c69a15b73ee2ef34a220d42a
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
321a0f3d95efcbccb6cfab4f47b96d06c4239213 14-Apr-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Export libbinder headers as part of libcameraservice" am: 1068fed
am: 11dae86

* commit '11dae86f6f5b909d738b47956f63815e3160b27f':
Export libbinder headers as part of libcameraservice

Change-Id: I420f4bf0868b125e4d08557875fc1601b4ebc9c8
ea95c62496ad1c38af4f0bfc6b83e098a7744f66 14-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix dynamic audio policy device address forwarding" into nyc-dev am: 8c808a2
am: 0773e92

* commit '0773e92bc6c139aa156b242d3b3e9044440b9523':
audio policy: fix dynamic audio policy device address forwarding

Change-Id: I3838e05641329a70c8e5acc58058b5dc1ec3140d
0773e92bc6c139aa156b242d3b3e9044440b9523 14-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix dynamic audio policy device address forwarding" into nyc-dev
am: 8c808a2

* commit '8c808a220fc155cc7bbe94e43125f2a25a4441a5':
audio policy: fix dynamic audio policy device address forwarding

Change-Id: I8480cc70dec2d88863c0611a46117d5c971e2382
e0c317973c14f5898c881c48d44adadd6f64fb77 14-Apr-2016 Christopher Wiley <wiley@google.com> Export libbinder headers as part of libcameraservice

libcameraservice's headers include headers from libbinder. libbinder's
header include path must be included as part of libcameraservice's
include path.

Bug: 27804373
Test: This library compiles with a slightly modified libbinder include
path.

Change-Id: I7540aec33d432f1ff3673d4fecadb88b707551dd
amera/libcameraservice/Android.mk
8c808a220fc155cc7bbe94e43125f2a25a4441a5 14-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix dynamic audio policy device address forwarding" into nyc-dev
c40d96943ddebd31578f30517457f88e6e894eb1 14-Apr-2016 Eric Laurent <elaurent@google.com> audio policy: fix dynamic audio policy device address forwarding

Make sure the device address is passed to audio HAL when opening
the output stream or changing device selection.

This is needed for dynamic audio policies with MIX_ROUTE_FLAG_RENDER.

Bug: 25448664
Change-Id: Iff7f733f6cad54753b0b5b0166303e97ea24e284
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
bd24f95257614b8a790b45967e2666014119dd1f 14-Apr-2016 Andy Hung <hunga@google.com> Merge "Add memory leak detection to audioserver" into nyc-dev am: 49e5375
am: 043470d

* commit '043470de221152557286d0b7aa0536ea165c268a':
Add memory leak detection to audioserver

Change-Id: Ib281a31e966a8b8e3b34a548d5a61204a3dafc32
043470de221152557286d0b7aa0536ea165c268a 14-Apr-2016 Andy Hung <hunga@google.com> Merge "Add memory leak detection to audioserver" into nyc-dev
am: 49e5375

* commit '49e5375bf3c98c825538d30b6bea9f4e84f0c36f':
Add memory leak detection to audioserver

Change-Id: I85d46b708beb575d01e51f610c87fbb35f2601a7
49e5375bf3c98c825538d30b6bea9f4e84f0c36f 14-Apr-2016 Andy Hung <hunga@google.com> Merge "Add memory leak detection to audioserver" into nyc-dev
35fec5f61393124c9e13958941637b8fe386385e 13-Apr-2016 Andy Hung <hunga@google.com> Add memory leak detection to audioserver

adb shell dumpsys media.audio_flinger --unreachable

(userdebug and eng builds)

Bug: 28049120
Change-Id: I72ac624bd5b5482aac44b9f3d8429f657f715cb4
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
b9ff7685780faca1844b09d080369d82c2651bea 13-Apr-2016 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: derive post RAW sensitivity keys for BC" into nyc-dev am: 03aa02b
am: adce0ad

* commit 'adce0ad22d6e2b56028669316ca411fd2a160660':
Camera: derive post RAW sensitivity keys for BC

Change-Id: I9148ab3aa2469cb68c1526b32266d4c9b5107d57
adce0ad22d6e2b56028669316ca411fd2a160660 13-Apr-2016 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: derive post RAW sensitivity keys for BC" into nyc-dev
am: 03aa02b

* commit '03aa02bda9bf1f38d8c6d9e6bfd8222ed18d3ff5':
Camera: derive post RAW sensitivity keys for BC

Change-Id: I9158bdd7f25ad604a66fe0306fa4f280004fb9b1
03aa02bda9bf1f38d8c6d9e6bfd8222ed18d3ff5 13-Apr-2016 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: derive post RAW sensitivity keys for BC" into nyc-dev
4c060997514cb37aec9a9a7cec02a3f257d3a74d 12-Apr-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: derive post RAW sensitivity keys for BC

Derive post RAW sensitivity keys for devices
earlier than HAL3.4.

Bug: 27950762
Change-Id: Icc2232cb722c61a5878a81706885303b15ddee3e
amera/libcameraservice/common/CameraModule.cpp
amera/libcameraservice/common/CameraModule.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
45207c0d0b57466b6c3f1205c68241bd7de0c4f0 13-Apr-2016 Christopher Wiley <wiley@google.com> Merge "resolve merge conflicts of cecb297 to nyc-dev-plus-aosp" into nyc-dev-plus-aosp
am: 6ce2b34

* commit '6ce2b341c52cf9daa01a7fc44173cb5ddeff8845':
Express libmedia dependencies in libaudiopolicycomponents

Change-Id: Id6821f83e40d54c28b2f008b6e217a30a20cf41a
b30195c378a5f299b62f3781a7ae94f7111ede6f 13-Apr-2016 Christopher Wiley <wiley@google.com> resolve merge conflicts of cecb297 to nyc-dev-plus-aosp

Change-Id: I2c5ab9e73733b4d259fe0f242087ee9ef97143f2
53a27325e775a775b552596d2274e32ea4e89c0b 13-Apr-2016 Eric Laurent <elaurent@google.com> audio policy: fix call audio over 24 bit USB device am: 8ae7312
am: dbe477a

* commit 'dbe477af33cee467480f171d2765d958ac162d6e':
audio policy: fix call audio over 24 bit USB device

Change-Id: I405aa268b7e751b55307afbb54e0ebd57cfef964
dbe477af33cee467480f171d2765d958ac162d6e 13-Apr-2016 Eric Laurent <elaurent@google.com> audio policy: fix call audio over 24 bit USB device
am: 8ae7312

* commit '8ae73129e7e79d826b293238c2f037f723d0e6e8':
audio policy: fix call audio over 24 bit USB device

Change-Id: I19dabdfb26baf13cfc42dd532935338fd7f1d091
8ae73129e7e79d826b293238c2f037f723d0e6e8 12-Apr-2016 Eric Laurent <elaurent@google.com> audio policy: fix call audio over 24 bit USB device

Take into account voice RX source device properties when
configuring the audio patch bridging the voice RX device
to the USB output device.

Bug: 25643110

Change-Id: I06f282d3cc12493f21500bf9ab35a3ceb93f14af
udioflinger/PatchPanel.cpp
udiopolicy/common/managerdefinitions/src/DeviceDescriptor.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
5b943ddceaea9bef36894608c654f648b0bf88d4 13-Apr-2016 Christopher Wiley <wiley@google.com> Express libmedia dependencies in libaudiopolicycomponents

Although this library does not itself need to be linked with libmedia,
consuming libraries need access to libmedia's headers when they consume
the public interface to this library.

Bug: 27804373
Test: Compiles.

Change-Id: I03b4404914c9930093a20e8293d9034b84d85ca9
udiopolicy/common/managerdefinitions/Android.mk
8d9286e4d75b10da715e955ba91ba6fa2a2ae030 13-Apr-2016 Andy Hung <hunga@google.com> Merge "AudioTrack: Reset position on flush for extended timestamps." into nyc-dev am: aff4e46
am: 9f0fdd1

* commit '9f0fdd1edd70ab31c3b7d9b687afb44e83b868b7':
AudioTrack: Reset position on flush for extended timestamps.

Change-Id: Id2b09b1cfd21fcf4ec7c9d040f0f199f94e35c7a
64c98fcfd24c8bb9d987412c790f80e6cc41a5ba 13-Apr-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera: Keep a list of outstanding buffers" into nyc-dev am: bb969e7
am: df2b62e

* commit 'df2b62e38b35bdb03e12d8565a9f530eb096dbf8':
Camera: Keep a list of outstanding buffers

Change-Id: I0bf55841aba7fcabcc9bab5fab1cebec137a5584
9f0fdd1edd70ab31c3b7d9b687afb44e83b868b7 13-Apr-2016 Andy Hung <hunga@google.com> Merge "AudioTrack: Reset position on flush for extended timestamps." into nyc-dev
am: aff4e46

* commit 'aff4e460d4cf278909316412c17c042d7366178f':
AudioTrack: Reset position on flush for extended timestamps.

Change-Id: I3c913b1d59aa701cb9d1777f0b45595bd78beee3
df2b62e38b35bdb03e12d8565a9f530eb096dbf8 13-Apr-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera: Keep a list of outstanding buffers" into nyc-dev
am: bb969e7

* commit 'bb969e7b2230b520a903b22fb6e89c3e14d38ad8':
Camera: Keep a list of outstanding buffers

Change-Id: Iae13cdda0b65d9867e8dc7c6082637ed01275852
aff4e460d4cf278909316412c17c042d7366178f 13-Apr-2016 Andy Hung <hunga@google.com> Merge "AudioTrack: Reset position on flush for extended timestamps." into nyc-dev
bb969e7b2230b520a903b22fb6e89c3e14d38ad8 13-Apr-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera: Keep a list of outstanding buffers" into nyc-dev
8252cd8d45221fa4271c9049a87518b40593ba8a 13-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: engine configurable: improve accessibility volume" into nyc-dev am: 812acee
am: ad748e1

* commit 'ad748e1b90a859e74912733eb48f8994c19385c3':
audio policy: engine configurable: improve accessibility volume

Change-Id: Icbbb8f02264113f290d39dba407eb71c81401d9b
69fca2c843eee39786dc32af4132fdf46083fb04 13-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: engine configurable: change default in call routing for line out device" into nyc-dev am: 8296289
am: de2009d

* commit 'de2009de06d6beddc493c13d9c003c1cc4023ce5':
audio policy: engine configurable: change default in call routing for line out device

Change-Id: Ide5dfbf914210b6caf759670dae22386d5781875
ff3997a6fcb391586e4334e3b5cef35a7bdd4ee4 13-Apr-2016 Eric Laurent <elaurent@google.com> Merge "Audio Policy: Engine Configurable: Force Encoded surround setting" into nyc-dev am: ba388ac
am: 18a0864

* commit '18a0864394a76a525f8f65fcc8400307f5a4caf5':
Audio Policy: Engine Configurable: Force Encoded surround setting

Change-Id: Ib118d6ef718cd71dc21ea62611b297276522c5f4
ad748e1b90a859e74912733eb48f8994c19385c3 13-Apr-2016 François Gaffie <francois.gaffie@intel.com> Merge "audio policy: engine configurable: improve accessibility volume" into nyc-dev
am: 812acee

* commit '812acee2729a741ba7f6086388f4a0a868fbc077':
audio policy: engine configurable: improve accessibility volume

Change-Id: I91b1333acfbe2d9368b2ef5514616d50c3c77d18
de2009de06d6beddc493c13d9c003c1cc4023ce5 13-Apr-2016 François Gaffie <francois.gaffie@intel.com> Merge "audio policy: engine configurable: change default in call routing for line out device" into nyc-dev
am: 8296289

* commit '82962895fab04ae7211074b1304ace84b280e068':
audio policy: engine configurable: change default in call routing for line out device

Change-Id: I041ceb395c8398940fa6b0f1732a9cec9f81c197
18a0864394a76a525f8f65fcc8400307f5a4caf5 13-Apr-2016 François Gaffie <francois.gaffie@intel.com> Merge "Audio Policy: Engine Configurable: Force Encoded surround setting" into nyc-dev
am: ba388ac

* commit 'ba388ac4b1b009d3cc0e98be62df672ed7817ba7':
Audio Policy: Engine Configurable: Force Encoded surround setting

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

Bug: 27940058
Change-Id: If91320669e2e84803e601137b1ce66b361b129f1
udioflinger/Tracks.cpp
e02e932d2210bd513bb8283840bbe24b58d28620 12-Apr-2016 Chien-Yu Chen <cychen@google.com> Camera: Keep a list of outstanding buffers

Keep a list of outstanding buffers in Camera3Stream so that
it won't return invalid buffers or the same buffers twice back
to the buffer queue.

Bug: 27894484
Change-Id: I9f96629b4f531778433c2e1ec32a142f2040832b
amera/libcameraservice/device3/Camera3Stream.cpp
amera/libcameraservice/device3/Camera3Stream.h
812acee2729a741ba7f6086388f4a0a868fbc077 12-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: engine configurable: improve accessibility volume" into nyc-dev
82962895fab04ae7211074b1304ace84b280e068 12-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: engine configurable: change default in call routing for line out device" into nyc-dev
ba388ac4b1b009d3cc0e98be62df672ed7817ba7 12-Apr-2016 Eric Laurent <elaurent@google.com> Merge "Audio Policy: Engine Configurable: Force Encoded surround setting" into nyc-dev
4ac9d8441da55d95a60e92725576e38d7cc6cb34 12-Apr-2016 François Gaffie <francois.gaffie@intel.com> audio policy: engine configurable: improve accessibility volume

This is the counter part patch of 28d09f06422841b4274d7fed6ad3441dc97382b2
for configurable engine verion based on the parameter framework.

It solves:
regressions caused by the introduction of accessibility stream type and strategy in M.

- change the way ACCESSIBILITY usage maps to a given strategy: always map
to strategy ACCESSIBILITY but implement a specific device selection for
strategy ACCESSIBILITY in getDeviceForStrategy(). This makes sure that
accessibility prompts always use ACCESSIBILITY stream type.

- optimize getDeviceForStrategy() to avoid reloading the list of outputs
and devices from the observer when called recursively.

- make sure that all volume APIs also take into account ACCESSIBILITY stream
when called for MUSIC stream. Generalize the concept of matching strategies
for straqegies that should be considered equivalent for volume control.

Bug: 25067903
Bug: 25616373

Change-Id: Ie674e6bfb5d1b25f71a9fd31cd2405c263b1732b
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/engineconfigurable/parameter-framework/example/Settings/PolicyConfigurableDomains.xml
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_accessibility.pfw
udiopolicy/engineconfigurable/src/Engine.cpp
e358ea3f7c1e9fbe2fca10e3b32f2e824ba4004b 12-Apr-2016 François Gaffie <francois.gaffie@intel.com> audio policy: engine configurable: change default in call routing for line out device

This patch is the counter part of a0b18ce8f737c0d6ccd728e17c3f355a250ae1dc.
It updates engine configurable conf file accordingly:

It solves:
Current strategy is to use LINE OUT for calls only when speaker phone mode
is enabled.
This creates confusion because most users don't understand why the behavior
differs between a headset and a line out.
Also the main use of a line out device for calls is when connected to a car kit
via an aux cable. In this case, you want to use the car kit by default without
having to touch your phone and select speaker phone.

Bug: Bug: 27548502

Change-Id: I07440fc882573a1ef797f35c86a2ce4ddf1389b1
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/engineconfigurable/parameter-framework/example/Settings/PolicyConfigurableDomains.xml
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_dtmf.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_phone.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_sonification.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_sonification_respectful.pfw
f4541b1d2342e08ee429b71627f1161812fc8d13 12-Apr-2016 François Gaffie <francois.gaffie@intel.com> Audio Policy: Engine Configurable: Force Encoded surround setting

This patch is the counter part of 09bc4612bdd5874d744c5da1183d96fbd2ad0235.
It solves Bug: 26373761 for configurable policy engine, i.e. Parameter-framework
based policy.

Bug: 26373761

Change-Id: I5f01732238375c1fa08a8f2116698d4362840ba6
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/engineconfigurable/parameter-framework/example/policy_criteria.txt
udiopolicy/engineconfigurable/wrapper/audio_policy_criteria_conf.h
udiopolicy/engineconfigurable/wrapper/config/audio_policy_criteria.conf
06efa75880dbb8a5d74835c738dd9eb2f81d62eb 12-Apr-2016 Ryan Bavetta <bavetta@google.com> Merge "Return error instead of unloading existing model" into nyc-dev am: c57616f
am: f012135

* commit 'f0121355eb5b6942945b49a8c4df5db6195e3ee9':
Return error instead of unloading existing model

Change-Id: I4bdad416b6c3682c7f62721b59482f4422b2b265
f0121355eb5b6942945b49a8c4df5db6195e3ee9 12-Apr-2016 Ryan Bavetta <bavetta@google.com> Merge "Return error instead of unloading existing model" into nyc-dev
am: c57616f

* commit 'c57616f59884cfff1af7e7e7f882f1ebf5ffbe88':
Return error instead of unloading existing model

Change-Id: If7e6b208df885e0e4522972cc2a40123ba6d0580
c57616f59884cfff1af7e7e7f882f1ebf5ffbe88 12-Apr-2016 Ryan Bavetta <bavetta@google.com> Merge "Return error instead of unloading existing model" into nyc-dev
8c797481a10ada8b678fd831feebcf68c787dacc 12-Apr-2016 Glenn Kasten <gkasten@google.com> Fix audio tee sink debugging tool am: fc302fd
am: aaf2475

* commit 'aaf2475680709d665a194832f2713ced15ac7cd3':
Fix audio tee sink debugging tool

Change-Id: I844ff35140bf17567192fddb03a11250fd69d545
aaf2475680709d665a194832f2713ced15ac7cd3 12-Apr-2016 Glenn Kasten <gkasten@google.com> Fix audio tee sink debugging tool
am: fc302fd

* commit 'fc302fd9e2d2cbafef771de77c47799488e1c044':
Fix audio tee sink debugging tool

Change-Id: I0279e751c785362982af3486d335eb54453a6b0b
ad65899e5f7d46e30a4dcca07aa0503fc014a3b9 11-Apr-2016 Ryan Bavetta <bavetta@google.com> Return error instead of unloading existing model

We were previously favoring KeyphraseSoundModels at this layer.
We now have better state handling in SoundTriggerHelper, and
will defer the loading problem to SoundTriggerHelper and above
to sort out.

BUG:28119841
Change-Id: I438a620d6f6e6c593216a8a39bec6d969d6a5311
oundtrigger/SoundTriggerHwService.cpp
fc302fd9e2d2cbafef771de77c47799488e1c044 11-Apr-2016 Glenn Kasten <gkasten@google.com> Fix audio tee sink debugging tool

Bug: 28119692
Change-Id: Ieb7b41754fab0111602dd29b63b0fd8c9c4b4d2d
udioflinger/Threads.cpp
6820e1c04fb0a7734663b8f44f09c69fdcf36ab6 09-Apr-2016 Andy Hung <hunga@google.com> Merge "AudioPolicyManager: Tally max effects memory usage" into nyc-dev am: da65b5a
am: 85f9913

* commit '85f9913f4a9f89ad23970139141e4dd4d4a63d4f':
AudioPolicyManager: Tally max effects memory usage

Change-Id: Iec7365fa0552edd82feeb41b4072140e838e178f
bb7db7bf6c482e223e1f7eab79e22e18a1548e7a 09-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix volume burst on user switch." into nyc-dev am: 0fd0d0c
am: 4cc293f

* commit '4cc293f24f37f6fc60a208956cf9c48f5d3cc978':
audio policy: fix volume burst on user switch.

Change-Id: I3a4d410ce9e995070ddd5849be27bccbd4f35fb4
85f9913f4a9f89ad23970139141e4dd4d4a63d4f 09-Apr-2016 Andy Hung <hunga@google.com> Merge "AudioPolicyManager: Tally max effects memory usage" into nyc-dev
am: da65b5a

* commit 'da65b5a3502ae06a65f09d9983c89b7fd9369316':
AudioPolicyManager: Tally max effects memory usage

Change-Id: Ib6c60240a3d71a6ce48bc1e2055a60ee760e57c4
da65b5a3502ae06a65f09d9983c89b7fd9369316 09-Apr-2016 Andy Hung <hunga@google.com> Merge "AudioPolicyManager: Tally max effects memory usage" into nyc-dev
4cc293f24f37f6fc60a208956cf9c48f5d3cc978 09-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix volume burst on user switch." into nyc-dev
am: 0fd0d0c

* commit '0fd0d0c1e33303d2a2cbce23dabc13f7036d108e':
audio policy: fix volume burst on user switch.

Change-Id: I9b74ac103ce89beeae94f896558a97a89adeb9c2
0fd0d0c1e33303d2a2cbce23dabc13f7036d108e 08-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix volume burst on user switch." into nyc-dev
5f1fa3053c87dd8e9dc528fb8c101907ff747746 06-Apr-2016 Andy Hung <hunga@google.com> AudioPolicyManager: Tally max effects memory usage

Bug: 27925014
Change-Id: I6d2596ed1b10ff193babeba7e6cbec36ee4fe074
udiopolicy/common/managerdefinitions/include/EffectDescriptor.h
udiopolicy/common/managerdefinitions/src/EffectDescriptor.cpp
dfc74e192e73ac455fbe40263feab6b2e2b22e6f 08-Apr-2016 Phil Burk <philburk@google.com> Merge "AudioProfile: reject profile if not exact match" into nyc-dev am: 600793b
am: 8a3bdef

* commit '8a3bdef5ba9e2d2d584ec899b34e87485ba3f3d2':
AudioProfile: reject profile if not exact match

Change-Id: Ia19d213215d59c48499dbd83c556e98a1048c38f
8a3bdef5ba9e2d2d584ec899b34e87485ba3f3d2 08-Apr-2016 Phil Burk <philburk@google.com> Merge "AudioProfile: reject profile if not exact match" into nyc-dev
am: 600793b

* commit '600793bab04cb0e7c59b2c974c362c79893c2199':
AudioProfile: reject profile if not exact match

Change-Id: I5b7cf5cbc780d1f610a44cf6f738f21917689c9b
600793bab04cb0e7c59b2c974c362c79893c2199 08-Apr-2016 Phil Burk <philburk@google.com> Merge "AudioProfile: reject profile if not exact match" into nyc-dev
1fd372e40ef40643fa9d036a0c9db043475b1b02 06-Apr-2016 Eric Laurent <elaurent@google.com> audio policy: fix volume burst on user switch.

Fix two main problems in setStreamVolumeIndex():

1) the conventional initialization or user switch behavior consisting in first
applying volume for AUDIO_DEVICE_OUT_DEFAULT device which resets all volumes
and then apply device specific volumes is problematic: if this is done while
a stream is active, it will temporarily reset the volume to its default
(usually loud) and then back causing an audible glitch.

2) The logic consisting in applying the requested volume to all outputs with a
device selected by the routing strategy corresponding to the requested stream
is problematic: it will cause device specific volumes for other devices than
current one to be applied to active streams.
Restrict the logic to cases of multiple device selections including the
requested device.

Bug: 27557733

Change-Id: Ia14cd51766a7516c42221abff76843d47699105f
udiopolicy/common/managerdefinitions/include/IVolumeCurvesCollection.h
udiopolicy/common/managerdefinitions/include/StreamDescriptor.h
udiopolicy/common/managerdefinitions/include/VolumeCurve.h
udiopolicy/managerdefault/AudioPolicyManager.cpp
e3230df9add3752e20224c23a27422c59815e2c2 07-Apr-2016 Marco Nelissen <marcone@google.com> Merge "Expand mediaextractor dumpsys" into nyc-dev am: b7b06be
am: 89a2919

* commit '89a29193cbb89c2120b32bb79640befeaa92b8c2':
Expand mediaextractor dumpsys

Change-Id: I5a98267fbea6feb00216bd088dc7889dd695217e
89a29193cbb89c2120b32bb79640befeaa92b8c2 07-Apr-2016 Marco Nelissen <marcone@google.com> Merge "Expand mediaextractor dumpsys" into nyc-dev
am: b7b06be

* commit 'b7b06be6ff2e6034a18986f94c76940b13ef4183':
Expand mediaextractor dumpsys

Change-Id: If6ecdcf4d51da03f7704f5fbe97c85154a18d35d
b7b06be6ff2e6034a18986f94c76940b13ef4183 07-Apr-2016 Marco Nelissen <marcone@google.com> Merge "Expand mediaextractor dumpsys" into nyc-dev
2cc2a03319144bcebac5a9693319776afc471307 07-Apr-2016 Phil Burk <philburk@google.com> AudioProfile: reject profile if not exact match

In AudioProfile.cpp, the checkExact() function was treating dynamic_channels as a wildcard.
So 5.1 would match even if there were no channel masks listed as supported.

Bug: 25144047
Change-Id: I3036dca7e0ed92579b1ac7a3cf8504b0e47b7ed5
Signed-off-by: Phil Burk <philburk@google.com>
udiopolicy/common/managerdefinitions/src/AudioProfile.cpp
4df326c54d39ac03facf66a2c5758c7703df4cdd 07-Apr-2016 Glenn Kasten <gkasten@google.com> Merge "Check newAudioUniqueId() parameter \'use\'" into nyc-dev am: dd3e7a1
am: 8bcb9c5

* commit '8bcb9c56784bc9abf44ded0c4fb55b24739d700f':
Check newAudioUniqueId() parameter 'use'

Change-Id: I0b9ccd73e0f16789db2969b0380d80dd8db4066c
8bcb9c56784bc9abf44ded0c4fb55b24739d700f 07-Apr-2016 Glenn Kasten <gkasten@google.com> Merge "Check newAudioUniqueId() parameter \'use\'" into nyc-dev
am: dd3e7a1

* commit 'dd3e7a1be829243c6db6ad82e41e6a3a8dce174b':
Check newAudioUniqueId() parameter 'use'

Change-Id: Ib64400d1198a40f8fcfbe188e6514107ab87b0f1
dd3e7a1be829243c6db6ad82e41e6a3a8dce174b 07-Apr-2016 Glenn Kasten <gkasten@google.com> Merge "Check newAudioUniqueId() parameter 'use'" into nyc-dev
9d003131329450081c8129b3fddd85cf20d2d9d9 06-Apr-2016 Glenn Kasten <gkasten@google.com> Check newAudioUniqueId() parameter 'use'

Bug: 28025366
Change-Id: Ice81e47cb919aa2aa6c78ccadebe9a1f19668f9c
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
69d3d8a9540b0da787ea0beccad2517f057dd54d 07-Mar-2016 Marco Nelissen <marcone@google.com> Expand mediaextractor dumpsys

Bug: 22775369
Change-Id: I3366a52ba7a00d1685a2211465f2f18f143d0efc
ediaextractor/MediaExtractorService.cpp
aae4aefc845c9c8ff9b5d5d2eeb3fa99ca7f3a2b 06-Apr-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Ensure correct error message for disconnected devices" into nyc-dev am: 7f688ed
am: d27a77e

* commit 'd27a77e4bbc2db90c0dce1e8e6ca32cd244c1e45':
Camera: Ensure correct error message for disconnected devices

Change-Id: Id88ad1d2f7e1f4e229f285ab50b233969d99f64c
d27a77e4bbc2db90c0dce1e8e6ca32cd244c1e45 06-Apr-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Ensure correct error message for disconnected devices" into nyc-dev
am: 7f688ed

* commit '7f688edcace6c7abc9ef566669c4511849ad2493':
Camera: Ensure correct error message for disconnected devices

Change-Id: I9e462cca01ff78b65e73cb9f83f42d92b4066cfa
7f688edcace6c7abc9ef566669c4511849ad2493 06-Apr-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Ensure correct error message for disconnected devices" into nyc-dev
6192b89257c5ae8834faa25b801d561043675d3b 04-Apr-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Ensure correct error message for disconnected devices

After a device has been disconnected, should return consistent errors
to the caller if they invoke further device methods.

For API1, that's INVALID_OPERATION, and for API2, that's
ERROR_DISCONNECTED.

Change-Id: I0f3d889906a9818c0e03852702b146fd33c9e42a
Fixes: 27591189
amera/libcameraservice/api1/CameraClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.cpp
adc4827a835087a2a7edd934967bc059aa0ee743 04-Apr-2016 Andy Hung <hunga@google.com> Merge "Implement client playback timestamps with 64 bit accuracy" into nyc-dev am: f3bcfeb
am: ba27fff

* commit 'ba27fff473a122a9d2ad3ac852eceb61002de3c6':
Implement client playback timestamps with 64 bit accuracy

Change-Id: I55f278982c03360a7c2e06f1e3810548afdda647
ba27fff473a122a9d2ad3ac852eceb61002de3c6 04-Apr-2016 Andy Hung <hunga@google.com> Merge "Implement client playback timestamps with 64 bit accuracy" into nyc-dev
am: f3bcfeb

* commit 'f3bcfebc7183e2a44a86060861f8446b8163906b':
Implement client playback timestamps with 64 bit accuracy

Change-Id: I77ef69988b0eb0cb5b24626c2984498304b42f68
f3bcfebc7183e2a44a86060861f8446b8163906b 04-Apr-2016 Andy Hung <hunga@google.com> Merge "Implement client playback timestamps with 64 bit accuracy" into nyc-dev
0df20cfb9fdbf756c9339c2fad610a179754e021 02-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audioflinger: fix offload underrun sleep logic" into nyc-dev am: eebc3ad
am: 707e11c

* commit '707e11cfd5aed5b035ba6ba0954de1c2b4a820c2':
audioflinger: fix offload underrun sleep logic

Change-Id: I713eb483d25a0ce0c46ca9bdf78217294473f589
707e11cfd5aed5b035ba6ba0954de1c2b4a820c2 02-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audioflinger: fix offload underrun sleep logic" into nyc-dev
am: eebc3ad

* commit 'eebc3ad457d5b9a1acc0fe0393b770004016a014':
audioflinger: fix offload underrun sleep logic

Change-Id: I85a5ec92178cf7edbbcea47459833af95e338b3f
eebc3ad457d5b9a1acc0fe0393b770004016a014 02-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audioflinger: fix offload underrun sleep logic" into nyc-dev
3eaf66b860f9a0d8af0dd4d5ac6adb5b67d7b73a 01-Apr-2016 Eric Laurent <elaurent@google.com> audioflinger: fix offload underrun sleep logic

Do not sleep in case of underrun if not enough data has been
sent to the audio HAL since last flush or standby.

Bug: 27898813
Change-Id: Ic44bed97c7397ec1156d4fe9026c4fa9f00d651c
udioflinger/Threads.cpp
6f5c336b25e6622eaa302e492fd671f5dfff9b5f 01-Apr-2016 Phil Burk <philburk@google.com> Merge "AudioPolicyManager: remove 5.1 channels for Surround Settings NEVER" into nyc-dev am: 7c6a162
am: 79bd69f

* commit '79bd69f6954caec1e1f14e6fd2b58863d058219f':
AudioPolicyManager: remove 5.1 channels for Surround Settings NEVER

Change-Id: I846667a8d9a21db66ba648bf2f2902eb2c9f50c3
79bd69f6954caec1e1f14e6fd2b58863d058219f 01-Apr-2016 Phil Burk <philburk@google.com> Merge "AudioPolicyManager: remove 5.1 channels for Surround Settings NEVER" into nyc-dev
am: 7c6a162

* commit '7c6a1621ef253989ab44cf68904531b35ae8b0b1':
AudioPolicyManager: remove 5.1 channels for Surround Settings NEVER

Change-Id: I187c7dd1c59b8d1eb5963541994e65a1019c72e2
7c6a1621ef253989ab44cf68904531b35ae8b0b1 01-Apr-2016 Phil Burk <philburk@google.com> Merge "AudioPolicyManager: remove 5.1 channels for Surround Settings NEVER" into nyc-dev
0709b0aba2adb719d347341ff58441347a1c1582 31-Mar-2016 Phil Burk <philburk@google.com> AudioPolicyManager: remove 5.1 channels for Surround Settings NEVER

This allows people with TOSLINK to hear the correct stereo PCM
when listening to movies.

Bug: 25144047
Change-Id: I88401c016dd5a3a469becb019540c04befe78bba
Signed-off-by: Phil Burk <philburk@google.com>
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
356e0b99303c04b43e609755b683e1a03225078c 01-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audioflinger: keep wakelock during offload playback" into nyc-dev am: c526e1e
am: 1719e8f

* commit '1719e8ffa0b44e72b3d44a98f0340613949bc04a':
audioflinger: keep wakelock during offload playback

Change-Id: I4bfe4dff0cf363d48ead2335bff1cfd3a677447b
1719e8ffa0b44e72b3d44a98f0340613949bc04a 01-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audioflinger: keep wakelock during offload playback" into nyc-dev
am: c526e1e

* commit 'c526e1ef36f8f0520a059c6cf304e12e86170c26':
audioflinger: keep wakelock during offload playback

Change-Id: Ifcffaf0708fafc457f8b18db3b840771e1fda87a
c526e1ef36f8f0520a059c6cf304e12e86170c26 01-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audioflinger: keep wakelock during offload playback" into nyc-dev
3a5ea10722790d961237a68f1704b33845664c10 01-Apr-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Ignore ro.audio.silent property when playing on REMOTE_SUBMIX" into nyc-dev am: 601b5a5
am: 1a15a10

* commit '1a15a1048c8a99ae812bc2d0bd617ead8d924387':
Ignore ro.audio.silent property when playing on REMOTE_SUBMIX

Change-Id: Ic5ab1ea7923ebef344a72098db7329f9be24a0f0
1a15a1048c8a99ae812bc2d0bd617ead8d924387 01-Apr-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Ignore ro.audio.silent property when playing on REMOTE_SUBMIX" into nyc-dev
am: 601b5a5

* commit '601b5a5f34d480d562d33526b4d87f7f704ab569':
Ignore ro.audio.silent property when playing on REMOTE_SUBMIX

Change-Id: I39b2146bf7e2f130f2b4f35689c5f92de5ac45ff
601b5a5f34d480d562d33526b4d87f7f704ab569 01-Apr-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Ignore ro.audio.silent property when playing on REMOTE_SUBMIX" into nyc-dev
32f37c22f60b7a1a6ccfa351700f80c03918d4fe 01-Apr-2016 Jean-Michel Trivi <jmtrivi@google.com> Ignore ro.audio.silent property when playing on REMOTE_SUBMIX

Ignore the effect of the ro.audio.silent property for playback
threads playing on AUDIO_DEVICE_OUT_REMOTE_SUBMIX as playing
in those mixes doesn't make a sound.

Bug 27336527

Change-Id: I933cfed29cd72636fd33282e5f2ad05693688b83
udioflinger/Threads.cpp
502d82464dc9c56e60697293651133fb607e6878 01-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix in call volume over USB" into nyc-dev am: e85b9da
am: 4d35a77

* commit '4d35a77fa0ea8c91ca638262664a0a06d54bbf1f':
audio policy: fix in call volume over USB

Change-Id: Ie6a564ef0577871dd0e1d7612962e49ffd7c5579
4d35a77fa0ea8c91ca638262664a0a06d54bbf1f 01-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix in call volume over USB" into nyc-dev
am: e85b9da

* commit 'e85b9da2b3b8461724067cb927d20666ab09e3fd':
audio policy: fix in call volume over USB

Change-Id: Iaa25f00fdd9553757bbd418a34967176fc58f618
6340b16e4e2615b53b68eedf765ea21cc4afacf1 01-Apr-2016 Phil Burk <philburk@google.com> Merge "AudioPolicyManager: only modify surround formats for HDMI devices" into nyc-dev am: 88c3cda
am: d6a6a1a

* commit 'd6a6a1aaa00ce488eeb0536e409ab2a4efe20d31':
AudioPolicyManager: only modify surround formats for HDMI devices

Change-Id: I4b95f2ee67c25ed3e4f66af920093ea961fd8e6b
d6a6a1aaa00ce488eeb0536e409ab2a4efe20d31 01-Apr-2016 Phil Burk <philburk@google.com> Merge "AudioPolicyManager: only modify surround formats for HDMI devices" into nyc-dev
am: 88c3cda

* commit '88c3cda7016b6062901d4fb49479c030f0751701':
AudioPolicyManager: only modify surround formats for HDMI devices

Change-Id: Iae0e8829c6b4abcf5ee5231a00953c5dc4243ac0
e85b9da2b3b8461724067cb927d20666ab09e3fd 01-Apr-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix in call volume over USB" into nyc-dev
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
udioflinger/Tracks.cpp
18fba84019d778b3c20875d93f9f36c2410ecf33 31-Mar-2016 Eric Laurent <elaurent@google.com> audio policy: fix in call volume over USB

Do not consider only primary output for voice volume control as
sometimes the output device selected for a call can be connected to
another output stream (e.g USB)

Bug: 27108587
Change-Id: I8ec3db272f87d49f57044a771019672050f63d32
udiopolicy/managerdefault/AudioPolicyManager.cpp
00eeb32846df81288f12fe4c83e61d7db2842226 31-Mar-2016 Phil Burk <philburk@google.com> AudioPolicyManager: only modify surround formats for HDMI devices

USB devices were getting modified by mistake.

Bug: 27938796
Change-Id: Ib62f6df804f8e578a702aba93439ff7cbfe3347a
Signed-off-by: Phil Burk <philburk@google.com>
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
646679779a8f952980a5d4219ad9c6f93efc4b92 31-Mar-2016 Eric Laurent <elaurent@google.com> audioflinger: keep wakelock during offload playback

Add a system property ro.audio.offload_wakelock to select
if a wakelock should be kept during offload playback while waiting for
write completion callback.
The default is yes, keep the wakelock.

On some platforms, the cost of entering or exiting suspend is so high
that is it better to not release a wakelock at all rather than releasing
it periodically.

Bug: 26208297
Change-Id: Ib41c7e4ed9c8c0c063363eb9fe99a2ecc81b521b
udioflinger/Threads.cpp
udioflinger/Threads.h
3947806a0edd7926b8090fbf8f1d189252597a96 31-Mar-2016 Jeff Vander Stoep <jeffv@google.com> minijail: allow a syscalls to permit logging am: e446c8e
am: 24df8e5

* commit '24df8e5695780d969bfd9773512fc35de9c5f5c7':
minijail: allow a syscalls to permit logging

Change-Id: I543ec859d317d3de862d850b778d4ad7ee614126
24df8e5695780d969bfd9773512fc35de9c5f5c7 31-Mar-2016 Jeff Vander Stoep <jeffv@google.com> minijail: allow a syscalls to permit logging
am: e446c8e

* commit 'e446c8e0ab808f567cf6ba1f35fa98b3cf7cb629':
minijail: allow a syscalls to permit logging

Change-Id: I7469b712cc5f39e135449f05d6b6b1358ca6cd2b
e446c8e0ab808f567cf6ba1f35fa98b3cf7cb629 31-Mar-2016 Jeff Vander Stoep <jeffv@google.com> minijail: allow a syscalls to permit logging

Allowed geteuid32, getgid32, getegid32 and getgroups32.

Bug: 27925431
Change-Id: I8f4cd86f6a4cee12d3654b4a4ad6e5bcb12049eb
ediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-x86.policy
628fdefb5fb750809966f1a199bbff3d5b07aa5e 31-Mar-2016 Wonsik Kim <wonsik@google.com> Merge "minijail: allow a few syscalls to permit logging" into nyc-dev am: 8e90fec
am: f42888c

* commit 'f42888c25082cadfb24fa78ae3dce56a0f1d1222':
minijail: allow a few syscalls to permit logging

Change-Id: Idf1515642d8d79ded40fc835d271c44f71950ca6
f42888c25082cadfb24fa78ae3dce56a0f1d1222 31-Mar-2016 Wonsik Kim <wonsik@google.com> Merge "minijail: allow a few syscalls to permit logging" into nyc-dev
am: 8e90fec

* commit '8e90fecfe6c7d1005e51e0a0d68b09548856224d':
minijail: allow a few syscalls to permit logging

Change-Id: Ifca5f22e10b60e85d6a732433c0089ef5711d5dc
8e90fecfe6c7d1005e51e0a0d68b09548856224d 31-Mar-2016 Wonsik Kim <wonsik@google.com> Merge "minijail: allow a few syscalls to permit logging" into nyc-dev
a785ddfe41628cc7ea05aed174c59d816e7b395e 30-Mar-2016 Wonsik Kim <wonsik@google.com> minijail: allow a few syscalls to permit logging

Allowed geteuid32, getgid32, getegid32 and getgroups32.

Bug: 27925431
Bug: 27909016
Change-Id: Ic75522714c8b5eb482b64079de042011ae23cfed
ediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-arm.policy
2bdaa2e3820beb7c59278e905faea88569122de8 30-Mar-2016 Chris Thornton <thorntonc@google.com> Merge "Use new stop_all_recogntions when changing sound trigger state." into nyc-dev am: 1b9e52c
am: 9fb40e5

* commit '9fb40e5fa0f0c8ad03e8258fb96960e84971ecae':
Use new stop_all_recogntions when changing sound trigger state.

Change-Id: Id013709ea5a381aab2e03ef8c5d0a9566aff98dc
9fb40e5fa0f0c8ad03e8258fb96960e84971ecae 30-Mar-2016 Chris Thornton <thorntonc@google.com> Merge "Use new stop_all_recogntions when changing sound trigger state." into nyc-dev
am: 1b9e52c

* commit '1b9e52cd6553e60f02663c02e7b75f05ec2ef351':
Use new stop_all_recogntions when changing sound trigger state.

Change-Id: I9dab5490674dadf26b34722662424128318f6213
1b9e52cd6553e60f02663c02e7b75f05ec2ef351 30-Mar-2016 Chris Thornton <thorntonc@google.com> Merge "Use new stop_all_recogntions when changing sound trigger state." into nyc-dev
5776b6b19dbfcc13adcc7245ad58ef4b27ec8087 30-Mar-2016 Dongwon Kang <dwkang@google.com> Merge "ResourceManagerService: Send usage only when monitor service is running" into nyc-dev am: 029aaa6
am: 6abdcca

* commit '6abdcca3beb93d250e0af5a2f4f0b28be9fa2bdf':
ResourceManagerService: Send usage only when monitor service is running

Change-Id: I9f356b9b51e983fdab6997713229af84583e137f
6abdcca3beb93d250e0af5a2f4f0b28be9fa2bdf 30-Mar-2016 Dongwon Kang <dwkang@google.com> Merge "ResourceManagerService: Send usage only when monitor service is running" into nyc-dev
am: 029aaa6

* commit '029aaa6887a86185c451b615fadcfd97b008e9b5':
ResourceManagerService: Send usage only when monitor service is running

Change-Id: Ieb8b778fa3a4bd7738d4b2f6a550d54da3530f4e
029aaa6887a86185c451b615fadcfd97b008e9b5 30-Mar-2016 Dongwon Kang <dwkang@google.com> Merge "ResourceManagerService: Send usage only when monitor service is running" into nyc-dev
efcf16c9fd2a2f0d865a2bcca98527d3804f83d6 28-Mar-2016 Chris Thornton <thorntonc@google.com> Use new stop_all_recogntions when changing sound trigger state.

If no implementation is provided to the hal or uses an earlier version,
will fallback to using the single stop_recognition on all running
models.

Change-Id: Ifc1bd3f2887ad9397499bfd291241fd907b55421
oundtrigger/SoundTriggerHwService.cpp
fc732a63bd8c8c62ce75f36f03088ca6727caece 30-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Use audio_module_handle_t and audio_patch_handle_t consistently" into nyc-dev am: 54b48c3
am: b9b9fa3

* commit 'b9b9fa3d28a0436bb5e267d8fc3626ebd820fe78':
Use audio_module_handle_t and audio_patch_handle_t consistently

Change-Id: I100c4795ec6d0d9e9c23d6e850303a23f3bfb603
b9b9fa3d28a0436bb5e267d8fc3626ebd820fe78 30-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Use audio_module_handle_t and audio_patch_handle_t consistently" into nyc-dev
am: 54b48c3

* commit '54b48c31fba71534ea56e32609f7ea770519fb2e':
Use audio_module_handle_t and audio_patch_handle_t consistently

Change-Id: Icbe23830212ccdbf49ee6e7978642aeb3d2de6c6
54b48c31fba71534ea56e32609f7ea770519fb2e 30-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Use audio_module_handle_t and audio_patch_handle_t consistently" into nyc-dev
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
udioflinger/AudioFlinger.cpp
udioflinger/PatchPanel.cpp
udiopolicy/common/managerdefinitions/include/AudioSourceDescriptor.h
udiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioPatch.cpp
udiopolicy/common/managerdefinitions/src/AudioPort.cpp
udiopolicy/common/managerdefinitions/src/DeviceDescriptor.cpp
udiopolicy/common/managerdefinitions/src/HwModule.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/service/AudioPolicyClientImpl.cpp
udiopolicy/service/AudioPolicyClientImplLegacy.cpp
2123a4d041fb86a37fcc9f4eed50e9327b8bc670 29-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Camera3InputStream: Stop after finding buffer to return" into nyc-dev am: 9611679
am: 626c2ab

* commit '626c2abd8e048d08e78c44013513898c4acfecd2':
Camera: Camera3InputStream: Stop after finding buffer to return

Change-Id: I7176ede2a5c9deec9ce7b66f925f8f88f141275d
626c2abd8e048d08e78c44013513898c4acfecd2 29-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Camera3InputStream: Stop after finding buffer to return" into nyc-dev
am: 9611679

* commit '96116791e9f4d74d2f941a22b6d3ec99e6b6ed6e':
Camera: Camera3InputStream: Stop after finding buffer to return

Change-Id: Ia06e9c6f1216c1eb49382864127be881addf31ac
96116791e9f4d74d2f941a22b6d3ec99e6b6ed6e 29-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Camera3InputStream: Stop after finding buffer to return" into nyc-dev
7a82eba64dc73756e18711171eda9ae6fea7049b 29-Mar-2016 Andy Hung <hunga@google.com> Merge "Clear internal resampler state when receiving empty buffer"
0e8d86c5a0eb6ded973649795d3b0e0c75870db5 29-Mar-2016 Andy Hung <hunga@google.com> Merge "Fix FastTrack creation buffer count irregularity" into nyc-dev am: 0be3be0
am: 994ea26

* commit '994ea268043e476c1f4e5dbd57d55d6114f59eb8':
Fix FastTrack creation buffer count irregularity
994ea268043e476c1f4e5dbd57d55d6114f59eb8 29-Mar-2016 Andy Hung <hunga@google.com> Merge "Fix FastTrack creation buffer count irregularity" into nyc-dev
am: 0be3be0

* commit '0be3be0cf5530d6faf655c325ec9d94a2bd53564':
Fix FastTrack creation buffer count irregularity
bd179d1adb974f86b60240acceb70d86fdf58d1c 28-Mar-2016 Hochi Huang <Hochi.Huang@mediatek.com> Clear internal resampler state when receiving empty buffer

Bug: 27876700
Change-Id: I2a7d7a79c17b1a15def67f65c0c7fec668888177
udioflinger/AudioResamplerDyn.cpp
udioflinger/AudioResamplerDyn.h
0be3be0cf5530d6faf655c325ec9d94a2bd53564 29-Mar-2016 Andy Hung <hunga@google.com> Merge "Fix FastTrack creation buffer count irregularity" into nyc-dev
97888335274b7741d2ff8948a96c43035e31252d 29-Mar-2016 Phil Burk <philburk@google.com> Merge "AudioPolicyManager: always force AC3 on for TVs" into nyc-dev am: fd7dc4c
am: 1eca9c4

* commit '1eca9c4ca0bd536230a447fa1e7b14acc138bd36':
AudioPolicyManager: always force AC3 on for TVs
2642c846c428e2175337c53e392ad861ce975630 24-Mar-2016 Dongwon Kang <dwkang@google.com> ResourceManagerService: Send usage only when monitor service is running

Background) getService() has internal 5 seconds of waiting logic when
service does not exist. So, changed with checkService().

Bug:26564748
Change-Id: I0d124b3b277401713c0f3e0b99da08b3affce1e0
ediaresourcemanager/ResourceManagerService.cpp
1eca9c4ca0bd536230a447fa1e7b14acc138bd36 29-Mar-2016 Phil Burk <philburk@google.com> Merge "AudioPolicyManager: always force AC3 on for TVs" into nyc-dev
am: fd7dc4c

* commit 'fd7dc4c764e6ec1136439188f75839094ff01917':
AudioPolicyManager: always force AC3 on for TVs
fd7dc4c764e6ec1136439188f75839094ff01917 28-Mar-2016 Phil Burk <philburk@google.com> Merge "AudioPolicyManager: always force AC3 on for TVs" into nyc-dev
05a8cf58ce8095752999e0efc7b2713cfeb5309e 28-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Camera3InputStream: Stop after finding buffer to return

Erasing iterator invalidates it, so it's not safe to continue using it.
Besides, there should only be one buffer to erase anyway.

Bug: 27878949
Change-Id: I00e9845fa953c26e117e40112b9f35fc781c5dcf
amera/libcameraservice/device3/Camera3InputStream.cpp
07ac114c3965e16fe523f88c913e701602604589 25-Mar-2016 Phil Burk <philburk@google.com> AudioPolicyManager: always force AC3 on for TVs

Most TVs support AC3 but they do not report it in their EDID.
This changes forces support for AC3 unless turned off by Settings.
This change allows broadcast TV to work by default.

Bug: 24541671
Change-Id: I9e8cf194198db3811f91149014ef29e46972ad2c
Signed-off-by: Phil Burk <philburk@google.com>
udiopolicy/managerdefault/AudioPolicyManager.cpp
2ade58f6485ba7eddc89cccaeaacbcc8849c3446 25-Mar-2016 Jeff Vander Stoep <jeffv@google.com> Merge "minijail: allow rt_tgsigqueueinfo syscall" into nyc-dev am: 5027871
am: 0ec00ad

* commit '0ec00ad54ddddf3eb0de5f7b1dc8ea7b84edffb3':
minijail: allow rt_tgsigqueueinfo syscall
92ae4e6e8f4f3a95eaa187e41cea3a34358f79a9 25-Mar-2016 Christopher Tate <ctate@google.com> Merge "mediacodec/mediaextractor: allow ugetrlimit" into nyc-dev am: 02e424d
am: 67eecb8

* commit '67eecb8a7711374f438bae32731a3e3fbdae8e73':
mediacodec/mediaextractor: allow ugetrlimit
0ec00ad54ddddf3eb0de5f7b1dc8ea7b84edffb3 25-Mar-2016 Jeff Vander Stoep <jeffv@google.com> Merge "minijail: allow rt_tgsigqueueinfo syscall" into nyc-dev
am: 5027871

* commit '5027871f4ff04786ad42654c480eb36f553df3a6':
minijail: allow rt_tgsigqueueinfo syscall
67eecb8a7711374f438bae32731a3e3fbdae8e73 25-Mar-2016 Christopher Tate <ctate@google.com> Merge "mediacodec/mediaextractor: allow ugetrlimit" into nyc-dev
am: 02e424d

* commit '02e424d9c91975a25e8d8c5110bc78da62b7841e':
mediacodec/mediaextractor: allow ugetrlimit
5027871f4ff04786ad42654c480eb36f553df3a6 25-Mar-2016 Jeffrey Vander Stoep <jeffv@google.com> Merge "minijail: allow rt_tgsigqueueinfo syscall" into nyc-dev
02e424d9c91975a25e8d8c5110bc78da62b7841e 25-Mar-2016 Chris Tate <ctate@android.com> Merge "mediacodec/mediaextractor: allow ugetrlimit" into nyc-dev
2d573837551693eac6f8164552c5dd084f8fd931 25-Mar-2016 Jeff Vander Stoep <jeffv@google.com> minijail: allow rt_tgsigqueueinfo syscall

Used by bionic to resend every signal back to the process for
debuggerd to catch.

Bug: 27853687
Change-Id: If7181b89fcfe0d698df0ce83f773eb974ccd567a
ediacodec/minijail/seccomp_policy/mediacodec-seccomp-arm.policy
ediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-arm.policy
ediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-x86.policy
6b9c0749a632e1404cc9b442c1704b200835957b 25-Mar-2016 Christopher Tate <ctate@google.com> mediacodec/mediaextractor: allow ugetrlimit

Parcel validation will call getrlimit() approximately
once per process that uses Parcels.

Bug 26696080

Change-Id: I59c5d6d648976d9d8618f161b4164c959f191a7e
ediacodec/minijail/seccomp_policy/mediacodec-seccomp-arm.policy
ediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-arm.policy
ediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-x86.policy
fda6504ae3ee3ebbe1b85c7e249dd771d5962a7c 25-Mar-2016 Haynes Mathew George <hgeorge@codeaurora.org> Park FastCapture in HOT_IDLE while processing new parameters am: 9ce67b5
am: 9f9d824

* commit '9f9d8241f72ff01072561ead51b2b0e3d5ce6475':
Park FastCapture in HOT_IDLE while processing new parameters
9f9d8241f72ff01072561ead51b2b0e3d5ce6475 25-Mar-2016 Haynes Mathew George <hgeorge@codeaurora.org> Park FastCapture in HOT_IDLE while processing new parameters
am: 9ce67b5

* commit '9ce67b524236db52eadf558e7765775acad89f1f':
Park FastCapture in HOT_IDLE while processing new parameters
9ce67b524236db52eadf558e7765775acad89f1f 30-Sep-2015 Haynes Mathew George <hgeorge@codeaurora.org> Park FastCapture in HOT_IDLE while processing new parameters

Without this, FastCapture can starve RecordThread delaying
handling of new parameters.

Bug: 24667895
Change-Id: Idb7113b7b0f96f2c35c655b6fdb3279f119ad1a3
udioflinger/Threads.cpp
f00f15315312da70c7cad64aeaaa25fe3de92cea 25-Mar-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "RENDER dynamic policies: fix address check" into nyc-dev am: fdb90f3
am: 389afff

* commit '389afff15358113511f6ab8b93729d4117e96ab3':
RENDER dynamic policies: fix address check
389afff15358113511f6ab8b93729d4117e96ab3 25-Mar-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "RENDER dynamic policies: fix address check" into nyc-dev
am: fdb90f3

* commit 'fdb90f355b269737fe48a2da0593b37d5c2b83c1':
RENDER dynamic policies: fix address check
fdb90f355b269737fe48a2da0593b37d5c2b83c1 25-Mar-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "RENDER dynamic policies: fix address check" into nyc-dev
9745c5510a0dca9efc4aadcd0cf5c88ec1093d32 25-Mar-2016 Shuzhen Wang <shuzhenwang@google.com> Merge "Camera: Retry JPEG capture if buffer is dropped." into nyc-dev am: 6fbc20c
am: ad5caad

* commit 'ad5caad62fdb67193dcce91442456382a5129408':
Camera: Retry JPEG capture if buffer is dropped.
ac4dacc0ba7384f86ccfa2feb8f0d78d96d42dc8 25-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Add AutoPark template class and use to control FastMixer" into nyc-dev am: c1c545a
am: d210059

* commit 'd2100593a01b4a36745b394b649e027a125513cc':
Add AutoPark template class and use to control FastMixer
ad5caad62fdb67193dcce91442456382a5129408 25-Mar-2016 Shuzhen Wang <shuzhenwang@google.com> Merge "Camera: Retry JPEG capture if buffer is dropped." into nyc-dev
am: 6fbc20c

* commit '6fbc20c958c0c770261ca4d32a3748ea4ecd64d9':
Camera: Retry JPEG capture if buffer is dropped.
d2100593a01b4a36745b394b649e027a125513cc 25-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Add AutoPark template class and use to control FastMixer" into nyc-dev
am: c1c545a

* commit 'c1c545a2eedb68c5af2d4f817654081cd1ac2481':
Add AutoPark template class and use to control FastMixer
5ac8cd425e1a0c4287c0bb84f922fef4fa106411 25-Mar-2016 Jean-Michel Trivi <jmtrivi@google.com> RENDER dynamic policies: fix address check

Fix mix / output address comparison when registering dynamic
policy mixes with a MIX_ROUTE_FLAG_RENDER flag.
Fix mix registration code path where the matching output is
not found, but no error is reported.
Improve logs.

Bug 25448664

Change-Id: I3679aead00304b38f7cc42dd9083644450771a15
udiopolicy/common/managerdefinitions/src/AudioPolicyMix.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
6fbc20c958c0c770261ca4d32a3748ea4ecd64d9 25-Mar-2016 Shuzhen Wang <shuzhenwang@google.com> Merge "Camera: Retry JPEG capture if buffer is dropped." into nyc-dev
c1c545a2eedb68c5af2d4f817654081cd1ac2481 25-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Add AutoPark template class and use to control FastMixer" into nyc-dev
b0fdc1ed2182fe851ef7ca98a1b4a552b53b3033 21-Mar-2016 Shuzhen Wang <shuzhenwang@google.com> Camera: Retry JPEG capture if buffer is dropped.

Camera api1 doesn't have error notification if JPEG buffer is dropped.
Add retry logic to try again if such error happens.

Bug: 27074407
Change-Id: I646566c6ee5a064896b5a433d8e1797140f0d257
amera/libcameraservice/api1/client2/CaptureSequencer.cpp
amera/libcameraservice/api1/client2/CaptureSequencer.h
amera/libcameraservice/api1/client2/JpegProcessor.cpp
amera/libcameraservice/api1/client2/JpegProcessor.h
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3Stream.cpp
amera/libcameraservice/device3/Camera3StreamBufferListener.h
c05b8d7df46619d3474356241d47655478b8bc82 24-Mar-2016 Glenn Kasten <gkasten@google.com> Add AutoPark template class and use to control FastMixer

Bug: 24667895
Change-Id: Id739a109aca13664b9390d2f9d9616fa2f88d188
udioflinger/AutoPark.h
udioflinger/Threads.cpp
71e64f2c7451953df54fc9f76ebda3b977e67800 24-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "CameraService: Fix client PID" into nyc-dev-plus-aosp
am: f36f862

* commit 'f36f8622586796adf3cc6326025fbb02ce50b335':
CameraService: Fix client PID
f36f8622586796adf3cc6326025fbb02ce50b335 24-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "CameraService: Fix client PID" into nyc-dev-plus-aosp
4f3d6203c71f9e76fbd2964ad54a81b7036f7e17 22-Mar-2016 Chien-Yu Chen <cychen@google.com> CameraService: Fix client PID

Client PID is the PID of the client that connects to camera service
directly. Without this, mediaserver won't be able to lock camera when
standalone MediaRecorder is in use.

Bug: 25091611
Change-Id: I6afa9409b6337439bb7186c0ec3f9a412fa9950f
amera/libcameraservice/CameraService.cpp
e0a269a5f75956efdf78a9cacaefc428b352730c 23-Mar-2016 Andy Hung <hunga@google.com> Fix FastTrack creation buffer count irregularity

For small values of buffer framecount, AudioFlinger may create a
normal track.

Bug: 27817933
Change-Id: I7c69491fc1f2b204e14286fb4c2210c5983afb8b
udioflinger/Threads.cpp
7f84d66fed96ac143f1b5061563dad7b1a2b9de3 23-Mar-2016 Dongwon Kang <dwkang@google.com> Merge "MediaResourceMonitor: Change argument type from string to int" into nyc-dev am: bf57c8a
am: 71d430e

* commit '71d430e292b0b2f572a948cfc8ec567e9d1c35fb':
MediaResourceMonitor: Change argument type from string to int
71d430e292b0b2f572a948cfc8ec567e9d1c35fb 23-Mar-2016 Dongwon Kang <dwkang@google.com> Merge "MediaResourceMonitor: Change argument type from string to int" into nyc-dev
am: bf57c8a

* commit 'bf57c8adde015a2e46f012e865bdb9082eca1eaa':
MediaResourceMonitor: Change argument type from string to int
bf57c8adde015a2e46f012e865bdb9082eca1eaa 23-Mar-2016 Dongwon Kang <dwkang@google.com> Merge "MediaResourceMonitor: Change argument type from string to int" into nyc-dev
69c23dd9273e10f56a743313cc1741f968940f9e 22-Mar-2016 Dongwon Kang <dwkang@google.com> MediaResourceMonitor: Change argument type from string to int

Bug: 27529962
Change-Id: I66225fffd0f95e5ed5255d316980416c5e131342
ediaresourcemanager/ResourceManagerService.cpp
6350aa288161fbd370bbd0be4888f68f3b15dd92 22-Mar-2016 Chien-Yu Chen <cychen@google.com> resolve merge conflicts of d384306 to nyc-dev-plus-aosp
am: 7939aee

* commit '7939aee8c1688bc8647c5bceb0d47a4e790ff27d':
Camera: Use original client PID for eviction
7939aee8c1688bc8647c5bceb0d47a4e790ff27d 22-Mar-2016 Chien-Yu Chen <cychen@google.com> resolve merge conflicts of d384306 to nyc-dev-plus-aosp

Change-Id: I288ea4c7b2f750460e8fb0fbcf8ecaebec3f2d53
d384306b8a5c2f106a02574c356d78a08e7894ac 22-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera: Use original client PID for eviction" into nyc-dev
59a0e17e6f1a58015fa5544b1ecf0fa65f3dc69f 22-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Make build warnings be errors" into nyc-dev am: 6b33051
am: 9b8e05d

* commit '9b8e05d33167864a3dd46df13988e1ae57afb249':
Make build warnings be errors
9b8e05d33167864a3dd46df13988e1ae57afb249 22-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Make build warnings be errors" into nyc-dev
am: 6b33051

* commit '6b3305184ca24ac7561e245638250e04399a4401':
Make build warnings be errors
6b3305184ca24ac7561e245638250e04399a4401 22-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Make build warnings be errors" into nyc-dev
7bbb5057e699394ecdeae0b43b2731471759d3bf 22-Mar-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix getDeviceForStrategy()" into nyc-dev am: 03e015d
am: 9088fda

* commit '9088fdabc555053306169fc30f5f0418ff5e6b96':
audio policy: fix getDeviceForStrategy()
9088fdabc555053306169fc30f5f0418ff5e6b96 22-Mar-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix getDeviceForStrategy()" into nyc-dev
am: 03e015d

* commit '03e015d2e6d38de6e7041766b37fe03746e9c940':
audio policy: fix getDeviceForStrategy()
03e015d2e6d38de6e7041766b37fe03746e9c940 22-Mar-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix getDeviceForStrategy()" into nyc-dev
0f928fab9963f15c524f4416b3d52d2df4a93eec 21-Mar-2016 Eric Laurent <elaurent@google.com> audio policy: fix getDeviceForStrategy()

Modification of getDEviceForStrategy by commit 28d09f064 made
wrong use of available output devices vector passed by reference
and caused an update of the actual list of connected devices instead
of the local list.

Bug: 27586202

Change-Id: I805b9cf27e1fb28494e6e23b2b874e0e5c3487e6
udiopolicy/enginedefault/src/Engine.cpp
udiopolicy/enginedefault/src/Engine.h
c711d461294869a7d69765bff14e7a53b79030b1 21-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Fix openLegacy error codes" into nyc-dev am: 8708e14
am: 1c0e480

* commit '1c0e48076f569d5d5d732cb0c4fe8efa3334a741':
Camera: Fix openLegacy error codes
1c0e48076f569d5d5d732cb0c4fe8efa3334a741 21-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Fix openLegacy error codes" into nyc-dev
am: 8708e14

* commit '8708e14eba0c9f533c274f7067d744386e45b385':
Camera: Fix openLegacy error codes
8708e14eba0c9f533c274f7067d744386e45b385 21-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Fix openLegacy error codes" into nyc-dev
59aa43931103cebb833cb9316c5b7e9011191d33 21-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Fix build warnings" into nyc-dev am: 311fab5
am: 7b81b7e

* commit '7b81b7e026053615f93af1efc130205eef547e57':
Fix build warnings
7b81b7e026053615f93af1efc130205eef547e57 21-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Fix build warnings" into nyc-dev
am: 311fab5

* commit '311fab5291be07fe33ec65240825b4f4bc118fe7':
Fix build warnings
3525dd92724e4942c9259f19581d63b93f18e14b 21-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Fix openLegacy error codes

Fix error handling regressions from the Binder interface refactor

- Error codes from openLegacy became incorrect
- Client initialize() call error codes were not discriminated between

Bug: 27657269
Change-Id: I2379d45d5fe5c2ad43c78bcfd18ea4c833adc987
amera/libcameraservice/CameraService.h
c42e9b462661673dff480ee71757a58b0f806370 21-Mar-2016 Glenn Kasten <gkasten@google.com> Fix build warnings

Change-Id: Idfdaff3a7a8f60cd8817bd306bfba28020a391c8
udioflinger/AudioFlinger.cpp
udioflinger/Effects.cpp
udioflinger/FastMixer.cpp
udioflinger/PatchPanel.cpp
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
2830b014b6d85ecea28d095983d77f12f1f34131 21-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Validate template ID" into klp-dev am: ac5ef62 am: e57ada1 am: d6e3220 am: e2049c7 am: edcd8f9 am: a4996d9 am: 30302ea am: f8fc3b7
am: a7706ab

* commit 'a7706ab4449bf6fd3391eb2bda76257afa64bc71':
Camera3Device: Validate template ID
a7706ab4449bf6fd3391eb2bda76257afa64bc71 21-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Validate template ID" into klp-dev am: ac5ef62 am: e57ada1 am: d6e3220 am: e2049c7 am: edcd8f9 am: a4996d9 am: 30302ea
am: f8fc3b7

* commit 'f8fc3b7ca596e102d1bcd13622a248ab6cea2389':
Camera3Device: Validate template ID
f8fc3b7ca596e102d1bcd13622a248ab6cea2389 21-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Validate template ID" into klp-dev am: ac5ef62 am: e57ada1 am: d6e3220 am: e2049c7 am: edcd8f9 am: a4996d9
am: 30302ea

* commit '30302ea600604ea30bae4652cd8d18fb16ee84fa':
Camera3Device: Validate template ID
30302ea600604ea30bae4652cd8d18fb16ee84fa 21-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Validate template ID" into klp-dev am: ac5ef62 am: e57ada1 am: d6e3220 am: e2049c7 am: edcd8f9
am: a4996d9

* commit 'a4996d9f0edece83bcb7ea85a8dae0e90a9221d1':
Camera3Device: Validate template ID
a4996d9f0edece83bcb7ea85a8dae0e90a9221d1 21-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Validate template ID" into klp-dev am: ac5ef62 am: e57ada1 am: d6e3220 am: e2049c7
am: edcd8f9

* commit 'edcd8f90cd5513b4992dc12955bca3163b763c6d':
Camera3Device: Validate template ID
e2049c7cc08737ba1fc8847b343d1d82987f3d1d 21-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Validate template ID" into klp-dev am: ac5ef62 am: e57ada1
am: d6e3220

* commit 'd6e32200aa134c0fc058bc830ccce7eb4c830026':
Camera3Device: Validate template ID
d6e32200aa134c0fc058bc830ccce7eb4c830026 21-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Validate template ID" into klp-dev am: ac5ef62
am: e57ada1

* commit 'e57ada1277564469704810aa0ceb353787475c68':
Camera3Device: Validate template ID
e57ada1277564469704810aa0ceb353787475c68 21-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Validate template ID" into klp-dev
am: ac5ef62

* commit 'ac5ef6284656864eca089da83edfd062ea8139b7':
Camera3Device: Validate template ID
18df60e094edbaa08cbecd25b0398643b8a0f29a 19-Mar-2016 Chien-Yu Chen <cychen@google.com> Camera: Use original client PID for eviction

Use the original client PID to evaluate priorities for eviction. The
original client PID may be different from the calling PID when the
application uses MediaRecorder to open camera.

Bug: 26493273
Change-Id: I8f56194f1ca2151701efb8cb380ff4abf6c8d6c4
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
2e99ff6de8b206b1561efa73b73b281808b0a73d 21-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Fix typos in use of %#" into nyc-dev am: 02c4f1c
am: cad4141

* commit 'cad41411ffe66af71ad7ffeb8383a03e03fcb38c':
Fix typos in use of %#
cad41411ffe66af71ad7ffeb8383a03e03fcb38c 21-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Fix typos in use of %#" into nyc-dev
am: 02c4f1c

* commit '02c4f1c02b832868bbae2bf2c62039e54dc0b6d4':
Fix typos in use of %#
02c4f1c02b832868bbae2bf2c62039e54dc0b6d4 21-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Fix typos in use of %#" into nyc-dev
638d4c21fa86e6e525eee1e7cc14eca018658f8b 19-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Fix build warnings" into nyc-dev am: 7be6866
am: da631f5

* commit 'da631f5894b2cfb77e47179a0f401c266b5eedb1':
Fix build warnings
6b1255bdd3d8d941f4952a98eadf3b454f36a2a9 11-Mar-2016 Glenn Kasten <gkasten@google.com> Fix typos in use of %#

Change-Id: I5e49f89dc0e49bc3f5f2d3922d390982a3773384
udiopolicy/managerdefault/AudioPolicyManager.cpp
da631f5894b2cfb77e47179a0f401c266b5eedb1 19-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Fix build warnings" into nyc-dev
am: 7be6866

* commit '7be6866af78a86a89113e9b680f1a6416ae1f711':
Fix build warnings
7be6866af78a86a89113e9b680f1a6416ae1f711 19-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Fix build warnings" into nyc-dev
57c4e6f7464d458eb52d209c2a63524913d6406d 18-Mar-2016 Glenn Kasten <gkasten@google.com> Fix build warnings

Change-Id: I33178dbe0bfc087d6599579ca0529ad853c669ed
udioflinger/AudioFlinger.cpp
udioflinger/AudioResamplerCubic.cpp
udioflinger/AudioResamplerDyn.cpp
udioflinger/AudioResamplerSinc.cpp
udioflinger/Effects.cpp
udioflinger/FastCapture.cpp
udioflinger/FastMixer.cpp
udioflinger/FastMixer.h
udioflinger/PatchPanel.cpp
udioflinger/Threads.cpp
b3341577d32aafba7f66fa715e614c12762a63e1 19-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Fix copy and paste error" into nyc-dev am: 76f2713
am: 066ba12

* commit '066ba128e3641ddfb74adc3095e357d8b6f8452a':
Fix copy and paste error
584be6ac37276544809eb9369b0ee9b1614e76d4 19-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Add systrace for normal read()" into nyc-dev am: 1c65a1d
am: 07fc599

* commit '07fc5995732aa62bfb1a4e76a5e2fe45abb4ab53':
Add systrace for normal read()
fb384fea1d96794976fe50e8afbb0fdf96ee5d09 19-Mar-2016 Mohan Kumar <mkumard@nvidia.com> Merge "audioflinger: clear mMixerBuffer if frame is not ready" into nyc-dev am: c3418d0
am: a875637

* commit 'a87563739f37872a3bbd95babb73ba64bcef0204':
audioflinger: clear mMixerBuffer if frame is not ready
066ba128e3641ddfb74adc3095e357d8b6f8452a 19-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Fix copy and paste error" into nyc-dev
am: 76f2713

* commit '76f27134fb546340154216212d84243d56a8928a':
Fix copy and paste error
07fc5995732aa62bfb1a4e76a5e2fe45abb4ab53 19-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Add systrace for normal read()" into nyc-dev
am: 1c65a1d

* commit '1c65a1d6e4a4a7c7a534aa6b178f4bb6e0967fb9':
Add systrace for normal read()
a87563739f37872a3bbd95babb73ba64bcef0204 19-Mar-2016 Mohan Kumar <mkumard@nvidia.com> Merge "audioflinger: clear mMixerBuffer if frame is not ready" into nyc-dev
am: c3418d0

* commit 'c3418d0c742ecf6ee9719512325db974f4b743f3':
audioflinger: clear mMixerBuffer if frame is not ready
76f27134fb546340154216212d84243d56a8928a 19-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Fix copy and paste error" into nyc-dev
1c65a1d6e4a4a7c7a534aa6b178f4bb6e0967fb9 19-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Add systrace for normal read()" into nyc-dev
c3418d0c742ecf6ee9719512325db974f4b743f3 19-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "audioflinger: clear mMixerBuffer if frame is not ready" into nyc-dev
947ffa37beced7cca943477b4d748b0f6b279b0b 12-Dec-2014 Mohan Kumar <mkumard@nvidia.com> audioflinger: clear mMixerBuffer if frame is not ready

Clear the mMixerBuffer if frame is not ready before the FastMixer
starts processing. Otherwise it might result in large glitches on
output device due to junk data present in the mixbuffer.

Change-Id: I9f025234d4ac100f85d2ec67c06a8df4195bea98
udioflinger/FastMixer.cpp
c73c64a699df828bc02f556bd0bf1724532aac36 19-Mar-2016 Glenn Kasten <gkasten@android.com> Merge "audioflinger: clear mMixerBuffer if frame is not ready"
04dec0ea88c86761d765d6b9054ab20be18657ff 19-Mar-2016 vivek mehta <mvivek@codeaurora.org> Merge "audio: allow standby for direct track" into nyc-dev am: 1606b3f
am: 929290f

* commit '929290fa589824833a7eef4e80f9a934c2246f4d':
audio: allow standby for direct track
929290fa589824833a7eef4e80f9a934c2246f4d 19-Mar-2016 vivek mehta <mvivek@codeaurora.org> Merge "audio: allow standby for direct track" into nyc-dev
am: 1606b3f

* commit '1606b3f943aef3803f0ff53a6bba736a653a2896':
audio: allow standby for direct track
1606b3f943aef3803f0ff53a6bba736a653a2896 19-Mar-2016 Eric Laurent <elaurent@google.com> Merge "audio: allow standby for direct track" into nyc-dev
9cd7ad101315e0bff4c5f171706c6f80c7e22644 17-Mar-2016 vivek mehta <mvivek@codeaurora.org> audio: allow standby for direct track

Delay standby for offload track use case is not suitable for direct
track in PCM format, because player torn down doesn't necessarily happen.

To avoid AP looping infinitely, allow standby right after direct track
in PCM format is paused.

Bug: 27746493

Change-Id: Id0026ac9891a12acc4affa446b2bc841559fcc28
udioflinger/Threads.cpp
d3ee6a79173833747a24756bd89fa296d773c1ba 18-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Send ILLEGAL_ARGUMENT error for a bad stream configuration" into nyc-dev am: 32dc5a9
am: cfc3293

* commit 'cfc32935147dd31bdbff9bd5ef602ede748eb17c':
Camera2: Send ILLEGAL_ARGUMENT error for a bad stream configuration
cfc32935147dd31bdbff9bd5ef602ede748eb17c 18-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Send ILLEGAL_ARGUMENT error for a bad stream configuration" into nyc-dev
am: 32dc5a9

* commit '32dc5a990b6180dcb919220dcbefcec92afd8cc2':
Camera2: Send ILLEGAL_ARGUMENT error for a bad stream configuration
32dc5a990b6180dcb919220dcbefcec92afd8cc2 18-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Send ILLEGAL_ARGUMENT error for a bad stream configuration" into nyc-dev
e875c8016198b4d84225fcf45d905fc424e53553 18-Mar-2016 Glenn Kasten <gkasten@google.com> Make build warnings be errors

Change-Id: Ia9e32a36f5c0268c8e85ebf25168821d8ad0162d
udioflinger/Android.mk
udioflinger/audio-resampler/Android.mk
udioflinger/tests/Android.mk
edialog/Android.mk
8379b72b3c7febc5268bc8f9c152fd433a1e6c70 18-Mar-2016 Glenn Kasten <gkasten@google.com> Fix copy and paste error

Change-Id: I0976f5651e0004948108ef43eed3f89e21ecb38b
udioflinger/Threads.cpp
ec6a70345fc99cd9f8461749a7656b8240874a62 14-Mar-2016 Glenn Kasten <gkasten@google.com> Add systrace for normal read()

Change-Id: Icba9c9fa648909604556305da7e2d9548f5b4b0c
udioflinger/Threads.cpp
3c49d6789ec34569118652df4293eb0de033259f 18-Mar-2016 Eric Laurent <elaurent@google.com> Merge "audioflinger: use sp<> for track proxy"
ace805805313827c7edde3bc6eb6624ab9f62dcb 18-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Camera2: Send ILLEGAL_ARGUMENT error for a bad stream configuration

Bug: 24168122
Change-Id: Icd9ce14fcdd2f88c5bde01a9652bb8cb66875560
amera/libcameraservice/api2/CameraDeviceClient.cpp
116a18940e30859ac04a95ffe4d4fefb313d7ab2 09-Mar-2016 Chien-Yu Chen <cychen@google.com> Camera3Device: Validate template ID

Validate template ID before creating a default request.

Bug: 26866110
Bug: 27568958
Change-Id: Ifda457024f1d5c2b1382f189c1a8d5fda852d30d
amera/libcameraservice/device3/Camera3Device.cpp
8598e8fdb28c664905ec646b68e4af1452a0e438 18-Mar-2016 Andy Hung <hunga@google.com> Merge "Update audio services for 64 bit compilation" into nyc-dev am: 560a198
am: 73ea429

* commit '73ea4299306f18ae7e8ee1deff00933522abccbf':
Update audio services for 64 bit compilation
73ea4299306f18ae7e8ee1deff00933522abccbf 18-Mar-2016 Andy Hung <hunga@google.com> Merge "Update audio services for 64 bit compilation" into nyc-dev
am: 560a198

* commit '560a198f1f95a085e24944b20df536e75e21cedb':
Update audio services for 64 bit compilation
560a198f1f95a085e24944b20df536e75e21cedb 18-Mar-2016 Andy Hung <hunga@google.com> Merge "Update audio services for 64 bit compilation" into nyc-dev
5bba2f6916dbe00aea7c0521faa0c6ed42114a75 18-Mar-2016 Eric Laurent <elaurent@google.com> audioflinger: use sp<> for track proxy

AudioTrack and AudioRecord shared memory proxy (Proxy class) is
RefBase so should not be refenced by raw pointer.

Change-Id: Ic63e31cef97503b8e262d5dafd8ce8f1d72d5eb8
udioflinger/PlaybackTracks.h
udioflinger/Threads.cpp
udioflinger/TrackBase.h
udioflinger/Tracks.cpp
2622c5e0b4abe3849ba4cb3b70e6032a04eb8c4a 18-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera: validate input in releaseRecordingFrame" into nyc-dev am: c40fcb0
am: b363544

* commit 'b363544cc78b94517081dc3eb8647f39fbd0a7bb':
Camera: validate input in releaseRecordingFrame
b363544cc78b94517081dc3eb8647f39fbd0a7bb 18-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera: validate input in releaseRecordingFrame" into nyc-dev
am: c40fcb0

* commit 'c40fcb01669240e9c1a6af74bcb0fcd85147fa87':
Camera: validate input in releaseRecordingFrame
c40fcb01669240e9c1a6af74bcb0fcd85147fa87 18-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera: validate input in releaseRecordingFrame" into nyc-dev
a2d8d858b33dc640d1191de60a8566916661bf1d 18-Mar-2016 Phil Burk <philburk@google.com> Merge "AudioTrack: fix stall if setBufferSizeInFrames() called before play()" into nyc-dev am: fc1337d
am: e9310ba

* commit 'e9310ba4cefc07b28e2e99d9213e57879069920a':
AudioTrack: fix stall if setBufferSizeInFrames() called before play()
e9310ba4cefc07b28e2e99d9213e57879069920a 18-Mar-2016 Phil Burk <philburk@google.com> Merge "AudioTrack: fix stall if setBufferSizeInFrames() called before play()" into nyc-dev
am: fc1337d

* commit 'fc1337d079ba7e6ffd7ce07706cfeeeb355c0200':
AudioTrack: fix stall if setBufferSizeInFrames() called before play()
fc1337d079ba7e6ffd7ce07706cfeeeb355c0200 18-Mar-2016 Phil Burk <philburk@google.com> Merge "AudioTrack: fix stall if setBufferSizeInFrames() called before play()" into nyc-dev
8fa2697e21c61998f78c346251d2c08f77d720ea 03-Mar-2016 Andy Hung <hunga@google.com> Update audio services for 64 bit compilation

audioserver still runs in 32 bits

Bug: 27479136
Change-Id: I99ac607e4ce006a87abc2a3f838023e00ef78647
udioflinger/Android.mk
udiopolicy/Android.mk
udiopolicy/common/managerdefinitions/Android.mk
udiopolicy/engineconfigurable/Android.mk
udiopolicy/engineconfigurable/parameter-framework/plugin/Android.mk
udiopolicy/engineconfigurable/wrapper/Android.mk
udiopolicy/enginedefault/Android.mk
edialog/Android.mk
adio/Android.mk
oundtrigger/Android.mk
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>
udioflinger/Tracks.cpp
eb6421d78c15b8a15455473150ff0deff50b483a 17-Mar-2016 Jean-Michel Trivi <jmtrivi@google.com> Fix AudioPolicyManager merge

Fix incompatible differences between upstream branch changes for
dynamic policies and master code for concurrent capture

Change-Id: I3d049cd2348348ade999868580354e57c5b8a93b
udiopolicy/managerdefault/AudioPolicyManager.cpp
dd465ca823a3f29d1cc526a15fd0d939d5bad8cd 17-Mar-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix HW A/V sync rerouting" into nyc-dev am: a8d309d
am: 5ab60be

* commit '5ab60beffcd2d1a835d0b09dcc7ee59eb084c59e':
audio policy: fix HW A/V sync rerouting
06320b55ceae3778645997fbb8ff5d0010228215 17-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Use audio_session_t consistently" into nyc-dev am: 9a57e34
am: 20f18ef

* commit '20f18efb29b8fea661dd4119a764d3f8d4dfe7a2':
Use audio_session_t consistently
4851174ff75cf835c5ee198efd08be068219de8f 17-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Update dataspace to new spec, convert for older HALs" into nyc-dev am: 68a91b9
am: d1cb162

* commit 'd1cb1629ace4a9c327b6d148df2e93148d7c35cc':
Camera: Update dataspace to new spec, convert for older HALs
dd9c82ae89985ca87a087e86c7f632a29f86601b 17-Mar-2016 Jean-Michel Trivi <jmtrivi@google.com> resolve merge conflicts of 9462ca1 to master

Change-Id: I7643b8dd1a4ec40b6e8fd8c824bf03afbbeac170
42f2707bb2d9698765d1180787ffc890c41ddb3a 12-Jan-2016 Chien-Yu Chen <cychen@google.com> Camera: validate input in releaseRecordingFrame

Check mem isn't null before using it in releaseRecordingFrame.

Bug: 26164272
Change-Id: I384d4aa2798b6121ae548a6bb618fc0189f96633
amera/libcameraservice/api1/CameraClient.cpp
5ab60beffcd2d1a835d0b09dcc7ee59eb084c59e 17-Mar-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix HW A/V sync rerouting" into nyc-dev
am: a8d309d

* commit 'a8d309df2f603767c0f0ad9248aef47a5b6ed5b8':
audio policy: fix HW A/V sync rerouting
20f18efb29b8fea661dd4119a764d3f8d4dfe7a2 17-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Use audio_session_t consistently" into nyc-dev
am: 9a57e34

* commit '9a57e34f476d5d2400e6e8ffac303c6190e641f0':
Use audio_session_t consistently
d1cb1629ace4a9c327b6d148df2e93148d7c35cc 17-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Update dataspace to new spec, convert for older HALs" into nyc-dev
am: 68a91b9

* commit '68a91b9dbe8d70c5542df4f3eb5f9a4f803ba10a':
Camera: Update dataspace to new spec, convert for older HALs
9462ca1f5a54b9dc40ad0cddb56696dd7180020f 17-Mar-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Dynamic policies: support for device selection" into nyc-dev
am: 53ce1e0

* commit '53ce1e03efa1a12b3acc7d76dd0c273487ca3746':
Dynamic policies: support for device selection
a8d309df2f603767c0f0ad9248aef47a5b6ed5b8 17-Mar-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix HW A/V sync rerouting" into nyc-dev
14cbfcae68582eca97f1a8168c584254515879ee 17-Mar-2016 Eric Laurent <elaurent@google.com> audio policy: fix HW A/V sync rerouting

Do not allow HW A/V sync tracks to be attached
to a PCM mixer as those tracks carry time stamps in band.

Cherry pick of c576f6a0 from lmp-mr1-tv-dev.

Bug: 25293500.

Change-Id: I1f080232e439a410ded25ca8e461113a96687a3b
udiopolicy/managerdefault/AudioPolicyManager.cpp
9a57e34f476d5d2400e6e8ffac303c6190e641f0 17-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Use audio_session_t consistently" into nyc-dev
68a91b9dbe8d70c5542df4f3eb5f9a4f803ba10a 16-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Update dataspace to new spec, convert for older HALs" 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/common/include/policy.h
udiopolicy/common/managerdefinitions/include/AudioPolicyMix.h
udiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioPolicyMix.cpp
udiopolicy/common/managerdefinitions/src/AudioSession.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
d848eb48c121c119e8ba7583efc75415fe102570 08-Mar-2016 Glenn Kasten <gkasten@google.com> Use audio_session_t consistently

Bug: 27562099
Change-Id: I328d8226191386b163f2ace41233607294c50dcd
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Effects.cpp
udioflinger/Effects.h
udioflinger/PatchPanel.cpp
udioflinger/PlaybackTracks.h
udioflinger/RecordTracks.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/TrackBase.h
udioflinger/Tracks.cpp
udiopolicy/AudioPolicyInterface.h
udiopolicy/service/AudioPolicyClientImpl.cpp
udiopolicy/service/AudioPolicyClientImplLegacy.cpp
udiopolicy/service/AudioPolicyEffects.cpp
udiopolicy/service/AudioPolicyEffects.h
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
udiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/service/AudioPolicyService.cpp
udiopolicy/service/AudioPolicyService.h
60bdfc50ab52590269253ae102e362411f982365 15-Mar-2016 Eric Laurent <elaurent@google.com> Merge "media log: do not lock mutex in dump()" into nyc-dev am: cd7f592481
am: 4917e98b53

* commit '4917e98b53c9a79b9c1d35052470e09b389ac089':
media log: do not lock mutex in dump()
4917e98b53c9a79b9c1d35052470e09b389ac089 15-Mar-2016 Eric Laurent <elaurent@google.com> Merge "media log: do not lock mutex in dump()" into nyc-dev
am: cd7f592481

* commit 'cd7f592481e44b2c419d2d3399b82fbc91f8cf36':
media log: do not lock mutex in dump()
2cbf6cea23539bfe99e36d1d221de62255452e86 14-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Update dataspace to new spec, convert for older HALs

- Switch clients of camera devices to use new dataspace values
- For older HALs, map to legacy dataspace values

Bug: 27344373
Change-Id: Icabc345025383f987ef4472cd26182a580dc8b3c
amera/libcameraservice/api1/client2/CallbackProcessor.cpp
amera/libcameraservice/api1/client2/JpegProcessor.cpp
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
cd7f592481e44b2c419d2d3399b82fbc91f8cf36 15-Mar-2016 Eric Laurent <elaurent@google.com> Merge "media log: do not lock mutex in dump()" into nyc-dev
8349a91d0dd017404800dec638298caebab6677e 15-Mar-2016 Eric Laurent <elaurent@google.com> media log: do not lock mutex in dump()

Just try locking the mutex when dumping media.log service
and continue in case of failure.

Bug: 27408518
Change-Id: Ib24e5fcd6b7365ab04fb145f704cecfa0f6b70e5
edialog/MediaLogService.cpp
edialog/MediaLogService.h
ecfa850432c893ee2e885c4d8f364928456b0c8c 15-Mar-2016 Greg Kaiser <gkaiser@google.com> Merge "PatchPanel: Avoid null pointer dereferences." into nyc-dev am: 4e42d3ea2c
am: e96b28f05b

* commit 'e96b28f05bbe01d78793803566166f1480f9f058':
PatchPanel: Avoid null pointer dereferences.
e96b28f05bbe01d78793803566166f1480f9f058 15-Mar-2016 Greg Kaiser <gkaiser@google.com> Merge "PatchPanel: Avoid null pointer dereferences." into nyc-dev
am: 4e42d3ea2c

* commit '4e42d3ea2c33a2f6556299d9c54824ba32236bd0':
PatchPanel: Avoid null pointer dereferences.
4e42d3ea2c33a2f6556299d9c54824ba32236bd0 15-Mar-2016 Greg Kaiser <gkaiser@google.com> Merge "PatchPanel: Avoid null pointer dereferences." into nyc-dev
2821913ec5ab7c2d273d85934c44b299a708f83d 15-Mar-2016 Eric Laurent <elaurent@google.com> Merge "audio: Fix race condition in AudioTrack underrun." into nyc-dev am: 6ae0468269
am: b5ea717866

* commit 'b5ea717866ea8ddd9233371925024659769ce41c':
audio: Fix race condition in AudioTrack underrun.
b5ea717866ea8ddd9233371925024659769ce41c 15-Mar-2016 Eric Laurent <elaurent@google.com> Merge "audio: Fix race condition in AudioTrack underrun." into nyc-dev
am: 6ae0468269

* commit '6ae0468269dfd30fb22a1eb99417261c6c06d665':
audio: Fix race condition in AudioTrack underrun.
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
udioflinger/PlaybackTracks.h
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
f27ce4051c81a90f8f937a1b381e9e6ffa2bfa6b 14-Mar-2016 Greg Kaiser <gkaiser@google.com> PatchPanel: Avoid null pointer dereferences.

We wait until after checking 'handle' and 'patch' for NULL before
dereferencing those pointers for logging.

Change-Id: I5b90b87536f83c8f809b390951471d40cd8c27a4
udioflinger/PatchPanel.cpp
9eab2a8fed4f63af9bf8f95be11542ccc0a0ea8c 11-Mar-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix volume control regression" into nyc-dev am: c8e72cb140
am: 1ae9017889

* commit '1ae901788998027fbaa6d82cde16fa407c6ca3aa':
audio policy: fix volume control regression
1ae901788998027fbaa6d82cde16fa407c6ca3aa 11-Mar-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix volume control regression" into nyc-dev
am: c8e72cb140

* commit 'c8e72cb140217b5ada2ef4d66480c2b13adbd014':
audio policy: fix volume control regression
c8e72cb140217b5ada2ef4d66480c2b13adbd014 11-Mar-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix volume control regression" into nyc-dev
789470a7967d087d4cea8deda8b4d76e11d98cc2 11-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Add error stream ID for buffer drop errors" into nyc-dev am: 97a330964b
am: b95abe5251

* commit 'b95abe525127767dbf2c6b7f2055fbdc40f66f05':
Camera3: Add error stream ID for buffer drop errors
b95abe525127767dbf2c6b7f2055fbdc40f66f05 11-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Add error stream ID for buffer drop errors" into nyc-dev
am: 97a330964b

* commit '97a330964b0548238d75602c74b290bea77a6b55':
Camera3: Add error stream ID for buffer drop errors
97a330964b0548238d75602c74b290bea77a6b55 11-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Add error stream ID for buffer drop errors" into nyc-dev
794fde269478b50be873d9d93574b8aa2b6afc42 11-Mar-2016 Eric Laurent <elaurent@google.com> audio policy: fix volume control regression

commit 28d09f064 introduced regressions in volume control resulting
in changing some device/stream volumes unexpectedly.

The problem was in the logic consisting in considering streams equivalent for
volume control based on their associated strategy: The rule is wrong because it
causes a volume change on a given stream to cause the same change on all streams
sharing the same strategy. For instance stream SYSTEM and MUSIC share the same
strategy and changing SYSTEM stream volume would change MUSIC volume.

The new rule just considers the stream type when deciding if two stream share the
same volume control.

Also fixed possible calls to getStrategy() with stream PATCH causing asserts.

Bug: 27586382

Author: Eric Laurent <elaurent@google.com>
Date: Tue Mar 8 10:43:05 2016 -0800

audio policy: improve accessibility volume

Change-Id: I3fe2a25767319800b0db5fd1ed7c1bd751b04732
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
841920db8206cc6428ab460e5fa5b7a50edd06d0 15-Feb-2016 Henrik Smiding <henrik.smiding@intel.com> Add SSE optimization of FIR float filter

Adds x86 SSE optimization of the FIR filter, float version only.
Used ARM implementation as template. Improves performance by a
factor of 2-2.5 on Silvermont architecture.

Change-Id: I503ce2bf4cbf10355f5eec3e9d73b364fa701241
Signed-off-by: Henrik Smiding <henrik.smiding@intel.com>
udioflinger/AudioResamplerDyn.cpp
udioflinger/AudioResamplerFirOps.h
udioflinger/AudioResamplerFirProcessSSE.h
35ad19fdc7134be0e65ac7e2be4c1ad0ea47d37d 11-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Send partial results seperately" into nyc-dev am: 37964cbbcf
am: 288f5e0986

* commit '288f5e0986f68728e33633127459f7fceed20346':
Camera3Device: Send partial results seperately
288f5e0986f68728e33633127459f7fceed20346 11-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Send partial results seperately" into nyc-dev
am: 37964cbbcf

* commit '37964cbbcf994350d989b482c201ee9571ea1b38':
Camera3Device: Send partial results seperately
37964cbbcf994350d989b482c201ee9571ea1b38 11-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Send partial results seperately" into nyc-dev
5cd8d64b36e0bc87115a5221b06e2fe3c5f9879b 08-Mar-2016 Chien-Yu Chen <cychen@google.com> Camera3Device: Send partial results seperately

Change Camera3Device to send partial results as soon as a
partial result is received from HAL so that 3A partial results
are not bundled.

Change FrameProcess to wait until all 3A states are received before
notify the client about 3A changes.

Bug: 17320166
Change-Id: I31a3e42081430ff4f7a482c4b2f1db272b8b2e4a
amera/libcameraservice/api1/client2/FrameProcessor.cpp
amera/libcameraservice/api1/client2/FrameProcessor.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
c4e63c0dde2f35389776ed95d1a8a06f2a35c881 10-Mar-2016 Ronghua Wu <ronghuawu@google.com> Merge "media: changed resource type from String8 to enum." into nyc-dev am: 98783a370f
am: 38fadcbfe5

* commit '38fadcbfe51d75f3f835c7427899894f52a5c33b':
media: changed resource type from String8 to enum.
38fadcbfe51d75f3f835c7427899894f52a5c33b 10-Mar-2016 Ronghua Wu <ronghuawu@google.com> Merge "media: changed resource type from String8 to enum." into nyc-dev
am: 98783a370f

* commit '98783a370f3f35058b42534d7d1d05e0fb7e9f5a':
media: changed resource type from String8 to enum.
98783a370f3f35058b42534d7d1d05e0fb7e9f5a 10-Mar-2016 Ronghua Wu <ronghuawu@google.com> Merge "media: changed resource type from String8 to enum." into nyc-dev
27e029a37f6de7bf6ae5eb5a78656d35b0a13f5b 10-Mar-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "AudioPolicy: tighter match for device descriptor query" into nyc-dev am: 905d50834d
am: 0cc8544c86

* commit '0cc8544c869e379a90e8107f44b0595b74aaec77':
AudioPolicy: tighter match for device descriptor query
0cc8544c869e379a90e8107f44b0595b74aaec77 10-Mar-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "AudioPolicy: tighter match for device descriptor query" into nyc-dev
am: 905d50834d

* commit '905d50834def592740d666b4c49549137bdf5899':
AudioPolicy: tighter match for device descriptor query
905d50834def592740d666b4c49549137bdf5899 10-Mar-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "AudioPolicy: tighter match for device descriptor query" into nyc-dev
f7f85438503e6964aba3ddabd6228e7fefb36735 10-Mar-2016 Jean-Michel Trivi <jmtrivi@google.com> AudioPolicy: tighter match for device descriptor query

When querying a module for a device descriptor, the matching was
too "loose": if a device type and address was not found, a
match was returned for just the device. While this works for device
types where only one is connected to the system (e.g. wired headphones),
this is an improper behavior for devices such as REMOTE_SUBMIX where
multiple are "connected" to the DUT, but with different addresses.

Bug 27337358
Bug 27336527

Change-Id: I9b6464485da2bedde2d14b624133e02b5a3fa357
udiopolicy/common/managerdefinitions/src/DeviceDescriptor.cpp
udiopolicy/common/managerdefinitions/src/HwModule.cpp
ea15fd29af81490311af9e12949b43524c39400e 03-Mar-2016 Ronghua Wu <ronghuawu@google.com> media: changed resource type from String8 to enum.

Bug: 27338692
Change-Id: I0161de084682e2317cba81dc5f55c17d5d478570
ediaresourcemanager/ResourceManagerService.cpp
ediaresourcemanager/ResourceManagerService.h
ediaresourcemanager/test/ResourceManagerService_test.cpp
abf516fa506c4a0354daff5484706b74f0766160 10-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Validate template ID" into nyc-dev am: 3c8aa2fded
am: a069be3143

* commit 'a069be3143313583b2212824ebf34586ab80223d':
Camera3Device: Validate template ID
a069be3143313583b2212824ebf34586ab80223d 10-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Validate template ID" into nyc-dev
am: 3c8aa2fded

* commit '3c8aa2fded9e5c5daf8a3e6ac8acbe3d329d8e65':
Camera3Device: Validate template ID
3c8aa2fded9e5c5daf8a3e6ac8acbe3d329d8e65 09-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Validate template ID" into nyc-dev
9cd140240c84789d00349c33e9c0b7a74d1543ed 09-Mar-2016 Chien-Yu Chen <cychen@google.com> Camera3Device: Validate template ID

Validate template ID before creating a default request.

Bug: 26866110
Change-Id: Ifda457024f1d5c2b1382f189c1a8d5fda852d30d
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/device3/Camera3Device.cpp
db9bf9d2216396da55268055ef821fa5d4a740aa 09-Mar-2016 Zhijun He <zhijunhe@google.com> Merge "Camera3Device: fix dereferencing null pointer crash" into nyc-dev am: 14fd3a1e2a
am: ac55412469

* commit 'ac554124699adbef4d24981a90591b19b4e6573f':
Camera3Device: fix dereferencing null pointer crash
ac554124699adbef4d24981a90591b19b4e6573f 09-Mar-2016 Zhijun He <zhijunhe@google.com> Merge "Camera3Device: fix dereferencing null pointer crash" into nyc-dev
am: 14fd3a1e2a

* commit '14fd3a1e2a7b048be2f3a4638e8b30b596eb080e':
Camera3Device: fix dereferencing null pointer crash
14fd3a1e2a7b048be2f3a4638e8b30b596eb080e 09-Mar-2016 Zhijun He <zhijunhe@google.com> Merge "Camera3Device: fix dereferencing null pointer crash" into nyc-dev
ae3e39aa8c517e97624e69b225a3b2e86572a2b5 09-Mar-2016 Jeff Vander Stoep <jeffv@google.com> Merge "mediacodec: allow fstatat64 syscall" into nyc-dev am: 6f8975ddb9
am: 82824cc6c4

* commit '82824cc6c40b8de2764cc89231803113a690e720':
mediacodec: allow fstatat64 syscall
849c6e1563574ddcac47588e6159abeb00417339 09-Mar-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: improve accessibility volume" into nyc-dev am: a8b282504d
am: 506ab3a8b1

* commit '506ab3a8b1563cc21677e5b532c84067acb918c3':
audio policy: improve accessibility volume
82824cc6c40b8de2764cc89231803113a690e720 09-Mar-2016 Jeff Vander Stoep <jeffv@google.com> Merge "mediacodec: allow fstatat64 syscall" into nyc-dev
am: 6f8975ddb9

* commit '6f8975ddb9535b10d5aacdacb442cec571130ef6':
mediacodec: allow fstatat64 syscall
506ab3a8b1563cc21677e5b532c84067acb918c3 09-Mar-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: improve accessibility volume" into nyc-dev
am: a8b282504d

* commit 'a8b282504d103f1156e7d4e14104e5e91317e374':
audio policy: improve accessibility volume
6f8975ddb9535b10d5aacdacb442cec571130ef6 09-Mar-2016 Jeffrey Vander Stoep <jeffv@google.com> Merge "mediacodec: allow fstatat64 syscall" into nyc-dev
a8b282504d103f1156e7d4e14104e5e91317e374 08-Mar-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: improve accessibility volume" into nyc-dev
28d09f06422841b4274d7fed6ad3441dc97382b2 08-Mar-2016 Eric Laurent <elaurent@google.com> audio policy: improve accessibility volume

Fix some regressions caused by the introduction of accessibility
stream type and strategy in M.

- change the way ACCESSIBILITY usage maps to a given strategy: always map
to strategy ACCESSIBILITY but implement a specific device selection for
strategy ACCESSIBILITY in getDeviceForStrategy(). This makes sure that
accessibility prompts always use ACCESSIBILITY stream type.

- optimize getDeviceForStrategy() to avoid reloading the list of outputs
and devices from the observer when called recursively.

- make sure that all volume APIs also take into account ACCESSIBILITY stream
when called for MUSIC stream. Generalize the concept of matching strategies
for straqegies that should be considered equivalent for volume control.
Modifications in:
- initStreamVolume()
- setStreamVolumeIndex()
- isStreamActive()
- getDevicesForStream()

Bug: 25067903
Bug: 25616373
Change-Id: Id8c7dd3231f79572b278407bc73186fc42dcc028
udiopolicy/engineconfigurable/src/Engine.cpp
udiopolicy/enginedefault/src/Engine.cpp
udiopolicy/enginedefault/src/Engine.h
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
e9aa81897a573dc8499333d950db528b9992bc2c 08-Mar-2016 Jeff Vander Stoep <jeffv@google.com> mediacodec: allow fstatat64 syscall

Bug: 27530325
Change-Id: I8db30ff8a319e40b93f9b145808932868d99493b
ediacodec/minijail/seccomp_policy/mediacodec-seccomp-arm.policy
dd93b40f6bef021f6b066fa0c880c934b58269dc 08-Mar-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: change default in call routing for line out device" into nyc-dev am: 0c07db6e89
am: d10f1be6b0

* commit 'd10f1be6b036522742f99ee4da97b6be6a970201':
audio policy: change default in call routing for line out device
d10f1be6b036522742f99ee4da97b6be6a970201 08-Mar-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: change default in call routing for line out device" into nyc-dev
am: 0c07db6e89

* commit '0c07db6e89ec1daec156b6aff9bb05027d79b32a':
audio policy: change default in call routing for line out device
a0b18ce8f737c0d6ccd728e17c3f355a250ae1dc 08-Mar-2016 Eric Laurent <elaurent@google.com> audio policy: change default in call routing for line out device

Current strategy is to use LINE OUT for calls only when speaker phone mode
is enabled.
This creates confusion because most users don't understand why the behavior
differs between a headset and a line out.
Also the main use of a line out device for calls is when connected to a car kit
via an aux cable. In this case, you want to use the car kit by default without
having to touch your phone and select speaker phone.

Bug: 27548502

Change-Id: I3e8a540b91dc80516439a97dabc9641b95ce23a7
udiopolicy/enginedefault/src/Engine.cpp
9bed69a0749290b564f8c73103afc7641ffe0e5c 08-Mar-2016 Sumit Bhattacharya <sumitb@nvidia.com> Merge "AudioFlinger: Get shared heap size from property" am: 844fab9b2b am: c29470f61a
am: 06fd24f5a3

* commit '06fd24f5a3a17ee5ac3069c3e009238fcb6aab39':
AudioFlinger: Get shared heap size from property
06fd24f5a3a17ee5ac3069c3e009238fcb6aab39 08-Mar-2016 Sumit Bhattacharya <sumitb@nvidia.com> Merge "AudioFlinger: Get shared heap size from property" am: 844fab9b2b
am: c29470f61a

* commit 'c29470f61a5f35f23c8f52851e778b6613ace6f8':
AudioFlinger: Get shared heap size from property
431503c11ca9e069584f70b0eef8b858a4a43546 08-Mar-2016 Zhijun He <zhijunhe@google.com> Camera3Device: fix dereferencing null pointer crash

It's possible that the dump is called during the device shutdown
process, where the buffer manager could be already torn down. Add
null check before calling the dump function.

Bug: 27500853
Change-Id: I179eb7ac1e81be2c196833b2c88488cd59fe2cc5
amera/libcameraservice/device3/Camera3Device.cpp
ae9a5f1f1c15b894a762f66ff248fc840b7e72a5 12-Dec-2014 Mohan Kumar <mkumard@nvidia.com> audioflinger: clear mMixerBuffer if frame is not ready

Clear the mMixerBuffer if frame is not ready before the FastMixer
starts processing. Otherwise it might result in large glitches on
output device due to junk data present in the mixbuffer.

Change-Id: I9f025234d4ac100f85d2ec67c06a8df4195bea98
udioflinger/FastMixer.cpp
c29470f61a5f35f23c8f52851e778b6613ace6f8 07-Mar-2016 Sumit Bhattacharya <sumitb@nvidia.com> Merge "AudioFlinger: Get shared heap size from property"
am: 844fab9b2b

* commit '844fab9b2b751fe7af8be64e55b912bec12e7c0b':
AudioFlinger: Get shared heap size from property
844fab9b2b751fe7af8be64e55b912bec12e7c0b 07-Mar-2016 Glenn Kasten <gkasten@android.com> Merge "AudioFlinger: Get shared heap size from property"
e95bb6312b972117a0ee70eabf78fcd118018f61 07-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Camera3: Add error stream ID for buffer drop errors

To enable passing buffer drop errors to API users

Bug: 24168122
Change-Id: I2769d0ba1fbd9a09494d5904eac511cecea3e6a8
amera/libcameraservice/device3/Camera3Device.cpp
9d60f385ec089303aa030591727e84c70d27a56d 05-Mar-2016 François Gaffie <francois.gaffie@intel.com> Merge "audio policy: engine configurable: upgrade to PFW 3.2.4" into nyc-dev am: 9322ba85a0
am: 573d46528e

* commit '573d46528e358fd549cf1662ec60f9d3de9e3b61':
audio policy: engine configurable: upgrade to PFW 3.2.4
573d46528e358fd549cf1662ec60f9d3de9e3b61 05-Mar-2016 François Gaffie <francois.gaffie@intel.com> Merge "audio policy: engine configurable: upgrade to PFW 3.2.4" into nyc-dev
am: 9322ba85a0

* commit '9322ba85a06ae149575ab102dc9bcffb4388cc7e':
audio policy: engine configurable: upgrade to PFW 3.2.4
9322ba85a06ae149575ab102dc9bcffb4388cc7e 05-Mar-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: engine configurable: upgrade to PFW 3.2.4" into nyc-dev
c1391f91c4f85f5f2f08b072486455b990817710 10-Dec-2015 François Gaffie <francois.gaffie@intel.com> audio policy: engine configurable: upgrade to PFW 3.2.4

This patch updates the policy plugin to PFW 3.2.4.

Bug: 22887211

Change-Id: Ic9f54c3108adeaec7031a1fd4f8e3b7cfb1c5abf
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/engineconfigurable/parameter-framework/example/Android.mk
udiopolicy/engineconfigurable/parameter-framework/example/ParameterFrameworkConfigurationPolicy.xml
udiopolicy/engineconfigurable/parameter-framework/example/ParameterFrameworkConfigurationPolicy.xml.in
udiopolicy/engineconfigurable/parameter-framework/example/Settings/PolicyConfigurableDomains.xml
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_input_source.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_dtmf.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_enforced_audible.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Structure/PolicySubsystem.xml
udiopolicy/engineconfigurable/parameter-framework/plugin/Android.mk
udiopolicy/engineconfigurable/parameter-framework/plugin/InputSource.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/InputSource.h
udiopolicy/engineconfigurable/parameter-framework/plugin/PolicySubsystem.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/PolicySubsystem.h
udiopolicy/engineconfigurable/parameter-framework/plugin/PolicySubsystemBuilder.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/Strategy.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/Strategy.h
udiopolicy/engineconfigurable/parameter-framework/plugin/Stream.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/Stream.h
udiopolicy/engineconfigurable/parameter-framework/plugin/Usage.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/Usage.h
udiopolicy/engineconfigurable/wrapper/ParameterManagerWrapper.cpp
5cc424756c0fbb203213bfc87593e965cdfe47cc 05-Mar-2016 Zhijun He <zhijunhe@google.com> Merge "Camera2: protect the device access" into nyc-dev am: e7d45e3ff9
am: 599b62b06e

* commit '599b62b06e008241ea39090aa63e930f7adbc8a6':
Camera2: protect the device access
599b62b06e008241ea39090aa63e930f7adbc8a6 05-Mar-2016 Zhijun He <zhijunhe@google.com> Merge "Camera2: protect the device access" into nyc-dev
am: e7d45e3ff9

* commit 'e7d45e3ff9358293f27ce1add94af34908a6a263':
Camera2: protect the device access
e7d45e3ff9358293f27ce1add94af34908a6a263 05-Mar-2016 Zhijun He <zhijunhe@google.com> Merge "Camera2: protect the device access" into nyc-dev
6ab11072b3de93ebe3fe4538c78f6e09e4fed2e4 05-Mar-2016 Jeff Vander Stoep <jeffv@google.com> Merge "mediacodec: allow sched_setscheduler syscall" into nyc-dev am: 2a4e5abd23
am: 144242c4b4

* commit '144242c4b4d7c7c90a8a9345981b7dbbf8503d74':
mediacodec: allow sched_setscheduler syscall
144242c4b4d7c7c90a8a9345981b7dbbf8503d74 05-Mar-2016 Jeff Vander Stoep <jeffv@google.com> Merge "mediacodec: allow sched_setscheduler syscall" into nyc-dev
am: 2a4e5abd23

* commit '2a4e5abd23d79fbb1dee51421fd27ecfdc110c3c':
mediacodec: allow sched_setscheduler syscall
2a4e5abd23d79fbb1dee51421fd27ecfdc110c3c 04-Mar-2016 Jeffrey Vander Stoep <jeffv@google.com> Merge "mediacodec: allow sched_setscheduler syscall" into nyc-dev
22c571bc4e9ad662580cc477087e50deab64c075 04-Mar-2016 Jeff Vander Stoep <jeffv@google.com> mediacodec: allow sched_setscheduler syscall

Addresses:
libminijail: blocked syscall: sched_setschedule

Bug: 27411239
Change-Id: I765da92f1bbc133576f2d18ddc0c1bac89294189
ediacodec/minijail/seccomp_policy/mediacodec-seccomp-arm.policy
0effd5277058b1fa6067875ca86d74452c4491c3 04-Mar-2016 Zhijun He <zhijunhe@google.com> Camera2: protect the device access

The Camera3Device could be detached during the static metadata access,
which could cause some nstive crash or even DoS.

Bug: 26696230
Change-Id: I081a119f6687fdbfcba845c4d317d043390c3a84
amera/libcameraservice/api2/CameraDeviceClient.cpp
cd64e0ed477fcaadd2ad03c5ef79d43ae98d7e44 10-Feb-2016 Sumit Bhattacharya <sumitb@nvidia.com> AudioFlinger: Get shared heap size from property

For consecutive 24bit, 192kHz, 7.1 content 4MB heap is not enough.
So exposing a propery ro.af.client_heap_size_kbyte to set platform
specific shared client heap size.

Change-Id: I2fb257c5fecc0245aa3a07998c2bfd6864a7d64f
udioflinger/AudioFlinger.cpp
90ebcb093f1c4caf464f76823b78e460e7119c6d 03-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Don\'t crash when the device has no vendor tags." into nyc-dev am: b026bb1d9c
am: 1bbe0a4c47

* commit '1bbe0a4c47997d33ad02192df612ad9f2ef25fed':
Camera: Don't crash when the device has no vendor tags.
b2dd2232a30b5b0cbcb6020e5fbf13d26154ae10 03-Mar-2016 Phil Burk <philburk@google.com> Merge "AudioPolicyManager: remove unnecessary device reconnection" into nyc-dev am: 0494ebbeda
am: 2798f49bb4

* commit '2798f49bb4924960fe2e60ad7bb88e00d0695638':
AudioPolicyManager: remove unnecessary device reconnection
1bbe0a4c47997d33ad02192df612ad9f2ef25fed 03-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Don\'t crash when the device has no vendor tags." into nyc-dev
am: b026bb1d9c

* commit 'b026bb1d9ca239af6f241a3c2c84130767a76564':
Camera: Don't crash when the device has no vendor tags.
2798f49bb4924960fe2e60ad7bb88e00d0695638 03-Mar-2016 Phil Burk <philburk@google.com> Merge "AudioPolicyManager: remove unnecessary device reconnection" into nyc-dev
am: 0494ebbeda

* commit '0494ebbeda158681dbe0c7cf68abfd475a19d139':
AudioPolicyManager: remove unnecessary device reconnection
b026bb1d9ca239af6f241a3c2c84130767a76564 03-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Don't crash when the device has no vendor tags." into nyc-dev
0494ebbeda158681dbe0c7cf68abfd475a19d139 03-Mar-2016 Phil Burk <philburk@google.com> Merge "AudioPolicyManager: remove unnecessary device reconnection" into nyc-dev
1e74e241f5a4e0e763e27c888561405d013c9ca0 03-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Don't crash when the device has no vendor tags.

Turns out copying from null pointers crashes things.

Bug: 27466842
Change-Id: I294f03614eec8c488c016469549464065821a7e7
amera/libcameraservice/CameraService.cpp
1d3563aad0e2227f780ebe6ec952196a51fbad09 03-Mar-2016 Marco Nelissen <marcone@google.com> Merge "Fix crash in mediaextractor" into nyc-dev am: ce2d9b4646
am: 50b3eb9b63

* commit '50b3eb9b63b1964246dea9510b052d1ab0ddb170':
Fix crash in mediaextractor
50b3eb9b63b1964246dea9510b052d1ab0ddb170 03-Mar-2016 Marco Nelissen <marcone@google.com> Merge "Fix crash in mediaextractor" into nyc-dev
am: ce2d9b4646

* commit 'ce2d9b4646ec840369a4d3434458c0390f3bc7c4':
Fix crash in mediaextractor
ce2d9b4646ec840369a4d3434458c0390f3bc7c4 03-Mar-2016 Marco Nelissen <marcone@google.com> Merge "Fix crash in mediaextractor" into nyc-dev
04f549f5e44676e8eb08f87e3bb6100b8fe296cd 03-Mar-2016 Marco Nelissen <marcone@google.com> Fix crash in mediaextractor

Allow sched_setscheduler

Bug: 27374300

Change-Id: I3d88e2904981a1dc392d47728178798be91ec294
ediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-x86.policy
bf65d8fdc6f38159951b62013421ad42744d92b3 03-Mar-2016 Eric Laurent <elaurent@google.com> Merge "audio flinger: fix offload track underrun" into nyc-dev am: 62b5c0c28b
am: 92af70b8ed

* commit '92af70b8ed1c60ff6208ebdfb2cd414a739c42db':
audio flinger: fix offload track underrun
551fa9102bb1e9190bcb5853121a94fbad417e21 03-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "AudioPolicy: capture sample rate 0 is route-specific default" into nyc-dev am: 1e3acb84fc
am: e4ddfc582a

* commit 'e4ddfc582a2a86ff0017dbcca6b5e766b4404ad5':
AudioPolicy: capture sample rate 0 is route-specific default
e21a7fc98912cd984fc168bd2a469128dd4ddf42 03-Mar-2016 Phil Burk <philburk@google.com> Merge "AudioPolicyManager: fix device enumeration" into nyc-dev am: 973074eb84
am: 8b763427ec

* commit '8b763427ec1bddc01343d458e40468052421bc61':
AudioPolicyManager: fix device enumeration
6663f228d795c2a7d23ca314abf6869fd38e486e 03-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Sample rate 0 means a route-dependent rate" into nyc-dev am: db52e5e3dc
am: ae2f5ba425

* commit 'ae2f5ba4255df0a6afbf0e4e9f6f266ef277eed2':
Sample rate 0 means a route-dependent rate
92af70b8ed1c60ff6208ebdfb2cd414a739c42db 03-Mar-2016 Eric Laurent <elaurent@google.com> Merge "audio flinger: fix offload track underrun" into nyc-dev
am: 62b5c0c28b

* commit '62b5c0c28becab95727739889ee762f727c2a462':
audio flinger: fix offload track underrun
e4ddfc582a2a86ff0017dbcca6b5e766b4404ad5 03-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "AudioPolicy: capture sample rate 0 is route-specific default" into nyc-dev
am: 1e3acb84fc

* commit '1e3acb84fcab8f00dba0a78ad4badaef4ba3869e':
AudioPolicy: capture sample rate 0 is route-specific default
62b5c0c28becab95727739889ee762f727c2a462 03-Mar-2016 Eric Laurent <elaurent@google.com> Merge "audio flinger: fix offload track underrun" into nyc-dev
1e3acb84fcab8f00dba0a78ad4badaef4ba3869e 03-Mar-2016 Eric Laurent <elaurent@google.com> Merge "AudioPolicy: capture sample rate 0 is route-specific default" into nyc-dev
8b763427ec1bddc01343d458e40468052421bc61 03-Mar-2016 Phil Burk <philburk@google.com> Merge "AudioPolicyManager: fix device enumeration" into nyc-dev
am: 973074eb84

* commit '973074eb8471496c882dc7372d729b23e03bba7c':
AudioPolicyManager: fix device enumeration
517161856d74f5fe39cce131f29b977bc1745991 01-Mar-2016 Eric Laurent <elaurent@google.com> audio flinger: fix offload track underrun

Fix offload track underrun detection causing early disabling
of offloaded audio tracks.

Optimize sleep time in case of underrun to avoid spinning while
waiting for new data.

Re-enable offload when streaming

Bug: 26668110

Change-Id: I874728c69647ac05e1effb84c48700a6d0ac7435
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
ae2f5ba4255df0a6afbf0e4e9f6f266ef277eed2 03-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Sample rate 0 means a route-dependent rate" into nyc-dev
am: db52e5e3dc

* commit 'db52e5e3dc15f7233ccd9c128fe43f2b2f58b29b':
Sample rate 0 means a route-dependent rate
2b79658dd13cb988771e45263b0ea4929e974a1d 03-Mar-2016 Eino-Ville Talvala <etalvala@google.com> resolve merge conflicts of 6e0c00ba53 to nyc-dev-plus-aosp
am: 0492686c47

* commit '0492686c4703b3ddbff52d047ef226b973a3388a':
Camera: Clean up warnings and set -Werror
Camera: Switch camera2 to auto-gen C++ binder interfaces
878e32d7cefc19d86cd0602eda6101961edad6fa 03-Mar-2016 Phil Burk <philburk@google.com> AudioPolicyManager: remove unnecessary device reconnection

This is now handled by a device reconnection in the AudioService.

Bug: 27434478
Change-Id: I2182b205c2b72cebff657a7bbee95df97f97eb55
Signed-off-by: Phil Burk <philburk@google.com>
udiopolicy/managerdefault/AudioPolicyManager.cpp
973074eb8471496c882dc7372d729b23e03bba7c 03-Mar-2016 Phil Burk <philburk@google.com> Merge "AudioPolicyManager: fix device enumeration" into nyc-dev
702b105b290d9a3c8b23f3c809a79086d784c9be 03-Mar-2016 Phil Burk <philburk@google.com> AudioPolicyManager: fix device enumeration

The AudioDeviceInfo only had PCM_FLOAT because the device enumeration was
stopping because of an error. The error was detected by new code
in the AudioFlinger.

The root error was not clearing a variable after a close.

Bug: 27457547
Change-Id: I529a26c8c0a688863bcf316ad365feddc303fe43
Signed-off-by: Phil Burk <philburk@google.com>
udiopolicy/managerdefault/AudioPolicyManager.cpp
0492686c4703b3ddbff52d047ef226b973a3388a 03-Mar-2016 Eino-Ville Talvala <etalvala@google.com> resolve merge conflicts of 6e0c00ba53 to nyc-dev-plus-aosp

Change-Id: I123a42e8cd1439177ea75a3c0aba7dca0b2f31fe
05ddca504ce8e0e61b41e5c1aebea72086eea57b 11-Feb-2016 Glenn Kasten <gkasten@google.com> AudioPolicy: capture sample rate 0 is route-specific default

Bug: 25641253
Bug: 21019153
Change-Id: I7d193640572c08ab5e5f1ecfc8ad6d31635967dd
udiopolicy/common/include/policy.h
udiopolicy/common/managerdefinitions/include/IOProfile.h
udiopolicy/common/managerdefinitions/src/AudioPort.cpp
udiopolicy/common/managerdefinitions/src/AudioProfile.cpp
udiopolicy/common/managerdefinitions/src/IOProfile.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
927f654496a2c729647bef294d3f70c667a52799 03-Mar-2016 Jeff Vander Stoep <jeffv@google.com> Fix crash in mediacodec am: 890536f22d
am: fb4a8ad900

* commit 'fb4a8ad9003ce26ba3c870818f53001d2eeeded4':
Fix crash in mediacodec
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
fb4a8ad9003ce26ba3c870818f53001d2eeeded4 02-Mar-2016 Jeff Vander Stoep <jeffv@google.com> Fix crash in mediacodec
am: 890536f22d

* commit '890536f22d88b86ed8d65f17bc9cf3ad84da6b73':
Fix crash in mediacodec
890536f22d88b86ed8d65f17bc9cf3ad84da6b73 02-Mar-2016 Jeff Vander Stoep <jeffv@google.com> Fix crash in mediacodec

Allow statfs64 and sched_get_priority_min syscalls.

Bug: 27326762
Change-Id: I707036ed5dd7735b01753c54f1fa518c367e147d
ediacodec/minijail/seccomp_policy/mediacodec-seccomp-arm.policy
02bf03287652923b5bb5316667b065423565d6b4 18-Feb-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Clean up warnings and set -Werror

- Also fix error logging template inconsistency
- Also add a few error handling cases into camera2 NDK
to deal with previously-ignored error codes

Bug: 27149500
Change-Id: I8f1f4c72252dd48d652f24b595b642199f20c327
amera/libcameraservice/Android.mk
amera/libcameraservice/api1/client2/JpegCompressor.h
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3DummyStream.cpp
amera/libcameraservice/device3/Camera3Stream.cpp
amera/libcameraservice/device3/Camera3Stream.h
amera/libcameraservice/gui/RingBufferConsumer.cpp
amera/libcameraservice/utils/CameraTraces.h
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
amera/libcameraservice/Android.mk
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/Camera2Client.h
amera/libcameraservice/api1/CameraClient.cpp
amera/libcameraservice/api1/CameraClient.h
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
amera/libcameraservice/common/Camera2ClientBase.cpp
amera/libcameraservice/common/Camera2ClientBase.h
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/device1/CameraHardwareInterface.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
88b79848634d3cf379e87e5565f8fb4331875b53 02-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "AudioSystem::getSamplingRate and getFrameCount now work for input" into nyc-dev am: 24b02edc16
am: 10647a9f3d

* commit '10647a9f3df98e3572a816db8b227b4b290e3dc0':
AudioSystem::getSamplingRate and getFrameCount now work for input
b6a5a996700b047aa9265d528a69ec8aa713a3db 02-Mar-2016 Jeff Vander Stoep <jeffv@google.com> Merge "mediacodec: add seccomp filter for arm/arm64" into nyc-dev am: cf7913e238
am: 679eb8f609

* commit '679eb8f60986e806f046ad29a34b1eabd6b54c90':
mediacodec: add seccomp filter for arm/arm64
10647a9f3df98e3572a816db8b227b4b290e3dc0 02-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "AudioSystem::getSamplingRate and getFrameCount now work for input" into nyc-dev
am: 24b02edc16

* commit '24b02edc16fd4d41367bc0acc42760bbe7d70f21':
AudioSystem::getSamplingRate and getFrameCount now work for input
24b02edc16fd4d41367bc0acc42760bbe7d70f21 02-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "AudioSystem::getSamplingRate and getFrameCount now work for input" into nyc-dev
f0c6d7d940314dbec47c9b53cb99da79eb022787 26-Feb-2016 Glenn Kasten <gkasten@google.com> Add use for audio_unique_id_t

Bug: 25641253
Bug: 21019153
Change-Id: I65dc128e760c245f3d90559635a8981b186c87d7
(cherry picked from commit eeecb980ff4c202d0a3c4b0bfe040dce2f73336d)
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/PatchPanel.cpp
udioflinger/Threads.cpp
udiopolicy/AudioPolicyInterface.h
udiopolicy/common/managerdefinitions/include/AudioPort.h
udiopolicy/common/managerdefinitions/src/AudioPort.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/service/AudioPolicyClientImpl.cpp
udiopolicy/service/AudioPolicyService.h
679eb8f60986e806f046ad29a34b1eabd6b54c90 02-Mar-2016 Jeff Vander Stoep <jeffv@google.com> Merge "mediacodec: add seccomp filter for arm/arm64" into nyc-dev
am: cf7913e238

* commit 'cf7913e2389a5e850e01aa6f905d252ee54c9891':
mediacodec: add seccomp filter for arm/arm64
cf7913e2389a5e850e01aa6f905d252ee54c9891 02-Mar-2016 Jeffrey Vander Stoep <jeffv@google.com> Merge "mediacodec: add seccomp filter for arm/arm64" into nyc-dev
3a91db1ba96dba470ae003a7c2145be741ca9017 02-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Add use for audio_unique_id_t" into nyc-dev
am: e8158ffea2

* commit 'e8158ffea27c9526547a7340dc5a085b8582033e':
Add use for audio_unique_id_t
e8158ffea27c9526547a7340dc5a085b8582033e 01-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Add use for audio_unique_id_t" into nyc-dev
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
udioflinger/AudioFlinger.h
udioflinger/Threads.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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
eeecb980ff4c202d0a3c4b0bfe040dce2f73336d 26-Feb-2016 Glenn Kasten <gkasten@google.com> Add use for audio_unique_id_t

Bug: 25641253
Bug: 21019153
Change-Id: I65dc128e760c245f3d90559635a8981b186c87d7
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/PatchPanel.cpp
udioflinger/Threads.cpp
udiopolicy/AudioPolicyInterface.h
udiopolicy/common/managerdefinitions/include/AudioPort.h
udiopolicy/common/managerdefinitions/src/AudioPort.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/service/AudioPolicyClientImpl.cpp
udiopolicy/service/AudioPolicyService.h
c9ea2114a26470e0f3b010392132b5394d358031 17-Feb-2016 Jeff Vander Stoep <jeffv@google.com> mediacodec: add seccomp filter for arm/arm64

mediacodec always runs in 32 bit mode so the arm seccomp filter is also
used on arm64 devices.

Tests: mediaserver CTS for bullhead, volantis and shamu

Add policy to log blocked syscalls to syslog and allow debuggerd attach
on mediacodec crash.

Bug: 27066802, 27064966
Change-Id: I4bdbba25b8847afa98d89b4b4ca863829fa19754
ediacodec/Android.mk
ediacodec/main_codecservice.cpp
ediacodec/minijail/Android.mk
ediacodec/minijail/minijail.cpp
ediacodec/minijail/minijail.h
ediacodec/minijail/seccomp_policy/mediacodec-seccomp-arm.policy
9dafe3d139df9e87c2389bb7db9df4c2ca3ec1f2 01-Mar-2016 Phil Burk <philburk@google.com> Merge "AudioPolicyManager: force encoded surround setting" into nyc-dev am: 65e74d0b8b
am: a3b8c24661

* commit 'a3b8c24661eb8d7bab718029dbbfe35b4cfc57ac':
AudioPolicyManager: force encoded surround setting
a3b8c24661eb8d7bab718029dbbfe35b4cfc57ac 01-Mar-2016 Phil Burk <philburk@google.com> Merge "AudioPolicyManager: force encoded surround setting" into nyc-dev
am: 65e74d0b8b

* commit '65e74d0b8b60fddc9543c5e954628feb5941dd3c':
AudioPolicyManager: force encoded surround setting
65e74d0b8b60fddc9543c5e954628feb5941dd3c 01-Mar-2016 Phil Burk <philburk@google.com> Merge "AudioPolicyManager: force encoded surround setting" into nyc-dev
592915af1e398e8d7a9d4632e59a8377420c9b58 29-Feb-2016 Marco Nelissen <marcone@google.com> Merge "media.extractor dumpsys to show recent extractors" into nyc-dev am: e385a78e97
am: 0cfae5863b

* commit '0cfae5863be38dec0247b3f8b88e6c5914dcb6bb':
media.extractor dumpsys to show recent extractors
0cfae5863be38dec0247b3f8b88e6c5914dcb6bb 29-Feb-2016 Marco Nelissen <marcone@google.com> Merge "media.extractor dumpsys to show recent extractors" into nyc-dev
am: e385a78e97

* commit 'e385a78e97c55d2298c867335264736c8ef366ed':
media.extractor dumpsys to show recent extractors
e385a78e97c55d2298c867335264736c8ef366ed 29-Feb-2016 Marco Nelissen <marcone@google.com> Merge "media.extractor dumpsys to show recent extractors" into nyc-dev
a48a51c056198a778755cbed52884dc30b74ac0a 25-Feb-2016 Marco Nelissen <marcone@google.com> media.extractor dumpsys to show recent extractors

Bug: 22775369
Change-Id: Ie68484985567896a00d5c193d1853a8f2e3b3964
ediaextractor/MediaExtractorService.cpp
ediaextractor/MediaExtractorService.h
09bc4612bdd5874d744c5da1183d96fbd2ad0235 25-Feb-2016 Phil Burk <philburk@google.com> AudioPolicyManager: force encoded surround setting

Bug: 26373761
Change-Id: I0f7a486bf1aa7a27f15cf220e2c75ef23f8f8536
Signed-off-by: Phil Burk <philburk@google.com>
udiopolicy/enginedefault/src/Engine.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
c8c62fb368d0ad40a6fd97da03cb60f65df99dc1 27-Feb-2016 Jeff Tinker <jtinker@google.com> Merge "Adjust mediadrmserver uid" into nyc-dev am: 1ba1eeca71
am: d40a5b55b8

* commit 'd40a5b55b87b9e350daaaf6b7b19014f2dfecc94':
Adjust mediadrmserver uid
d40a5b55b87b9e350daaaf6b7b19014f2dfecc94 27-Feb-2016 Jeff Tinker <jtinker@google.com> Merge "Adjust mediadrmserver uid" into nyc-dev
am: 1ba1eeca71

* commit '1ba1eeca713c118ce12c97ac8bbdadbdd0cc5ff1':
Adjust mediadrmserver uid
1ba1eeca713c118ce12c97ac8bbdadbdd0cc5ff1 27-Feb-2016 Jeff Tinker <jtinker@google.com> Merge "Adjust mediadrmserver uid" into nyc-dev
1dba0c3213d6338112b279a1b05d73ab1ea484db 27-Feb-2016 Jeff Tinker <jtinker@google.com> Adjust mediadrmserver uid

mediadrmserver needs to run as uid media
or it is unable to access media files such
as offline licenses and drm certificates
that were created when mediadrm ran in the
mediaserver process.

bug: 26782004
Change-Id: Ifa82db078349c3f9d5dd95c1332c5eca41d66b0e
ediadrm/mediadrmserver.rc
f4d98ed31f2150cc8ad707c6a2cfae8ecf26975e 27-Feb-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "AudioPolicy: AudioOutputDescriptor set/get for patch handle" into nyc-dev am: b3e06a7592
am: 51f453aac3

* commit '51f453aac3ebcb0de4036acc9b829f58d27c3ff5':
AudioPolicy: AudioOutputDescriptor set/get for patch handle
d51b1b247b120c7e49851d923f3c5aa0aa19a787 27-Feb-2016 Jean-Michel Trivi <jmtrivi@google.com> resolve merge conflicts of 1e9a65df13 to master

Change-Id: I7c255d7813805b5ffb0d8e5ecd6fc11ee0b80c8a
51f453aac3ebcb0de4036acc9b829f58d27c3ff5 26-Feb-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "AudioPolicy: AudioOutputDescriptor set/get for patch handle" into nyc-dev
am: b3e06a7592

* commit 'b3e06a7592fc189315a90a88cbea66e31c2e6b41':
AudioPolicy: AudioOutputDescriptor set/get for patch handle
1e9a65df13859b44b91610ef4cc721155ab5eaa8 26-Feb-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Send audio patch in recording callback" into nyc-dev
am: 0d035b6057

* commit '0d035b6057cef680a3755c6a8fc914c483648903':
Send audio patch in recording callback
b3e06a7592fc189315a90a88cbea66e31c2e6b41 26-Feb-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "AudioPolicy: AudioOutputDescriptor set/get for patch handle" into nyc-dev
0d035b6057cef680a3755c6a8fc914c483648903 26-Feb-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Send audio patch in recording callback" into nyc-dev
ff155c642fe7d342a3110444c6103f788230af53 26-Feb-2016 Jean-Michel Trivi <jmtrivi@google.com> AudioPolicy: AudioOutputDescriptor set/get for patch handle

For symmetry with AudioInputDescriptor: no direct access to the
field for the patch handle.

Change-Id: I5bffecf7a157ec042d749064208bc6c279008542
udiopolicy/common/managerdefinitions/include/AudioOutputDescriptor.h
udiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp
udiopolicy/managerdefault/AudioPolicyManager.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
udiopolicy/AudioPolicyInterface.h
udiopolicy/common/managerdefinitions/include/AudioInputDescriptor.h
udiopolicy/common/managerdefinitions/include/AudioSession.h
udiopolicy/common/managerdefinitions/include/AudioSessionInfoProvider.h
udiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioSession.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/service/AudioPolicyClientImpl.cpp
udiopolicy/service/AudioPolicyService.cpp
udiopolicy/service/AudioPolicyService.h
95f09c4212be2193296631fce5d08cd5440e0fb1 26-Feb-2016 François Gaffie <francois.gaffie@intel.com> Merge "audio policy: engine configurable: allow to use custom PFW and plugins" into nyc-dev am: 78229d8867
am: 21efb7fe5c

* commit '21efb7fe5ca4bdb69a1f0649f51b76ed9441e362':
audio policy: engine configurable: allow to use custom PFW and plugins
21efb7fe5ca4bdb69a1f0649f51b76ed9441e362 26-Feb-2016 François Gaffie <francois.gaffie@intel.com> Merge "audio policy: engine configurable: allow to use custom PFW and plugins" into nyc-dev
am: 78229d8867

* commit '78229d88678932244f7cbb6e52ad43c0d986a780':
audio policy: engine configurable: allow to use custom PFW and plugins
78229d88678932244f7cbb6e52ad43c0d986a780 26-Feb-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: engine configurable: allow to use custom PFW and plugins" into nyc-dev
a2b6c4b54cd3ae3db7f2a7f1df6d6f889af1e743 25-Feb-2016 François Gaffie <francois.gaffie@intel.com> audio policy: engine configurable: allow to use custom PFW and plugins

Android build system prevents from having the same module
target refered in more than one makefile. Some platform may need to use
a custom parameter manager version than the aosp version of the PFW.
It also concerns with associated plugins.

This patch inhibits the AOSP Policy PFW plugin if USE_CUSTOM_PARAMETER_MANAGER is
set to true.

Bug; 22887211

Change-Id: I71147b3e7c8a9296af3182f8a1401bc37191a276
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/engineconfigurable/parameter-framework/plugin/Android.mk
89106d6faf32881a5f8f4fcda9acc4742e4df2cb 25-Feb-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: add device for audio bus" into nyc-dev am: e736431c69
am: 462dd3b94a

* commit '462dd3b94adb359ea4e0d95f2d3d84bd5caa92b4':
audio policy: add device for audio bus
6d5899c00f1b175f7dee3bdf7327d0d23c9c6a93 25-Feb-2016 Bin Chen <chen_bin@projectara.com> Merge "CameraService: Fix cameraId type of onDeviceStatusChanged" am: 2dab1fe48b am: 103177fd33
am: e7afc1a8af

* commit 'e7afc1a8af5d8bd9124bf9b4e47d4ae8e1fac5ae':
CameraService: Fix cameraId type of onDeviceStatusChanged
462dd3b94adb359ea4e0d95f2d3d84bd5caa92b4 25-Feb-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: add device for audio bus" into nyc-dev
am: e736431c69

* commit 'e736431c69e2a00468d140d2af97b63e0e5aa83a':
audio policy: add device for audio bus
e736431c69e2a00468d140d2af97b63e0e5aa83a 25-Feb-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: add device for audio bus" into nyc-dev
e7afc1a8af5d8bd9124bf9b4e47d4ae8e1fac5ae 25-Feb-2016 Bin Chen <chen_bin@projectara.com> Merge "CameraService: Fix cameraId type of onDeviceStatusChanged" am: 2dab1fe48b
am: 103177fd33

* commit '103177fd3326a9aac9cb64d2ab4efcb193571ed5':
CameraService: Fix cameraId type of onDeviceStatusChanged
103177fd3326a9aac9cb64d2ab4efcb193571ed5 25-Feb-2016 Bin Chen <chen_bin@projectara.com> Merge "CameraService: Fix cameraId type of onDeviceStatusChanged"
am: 2dab1fe48b

* commit '2dab1fe48bdf75e1e510ea12e7b5a55ed2692d3f':
CameraService: Fix cameraId type of onDeviceStatusChanged
e16d1165c5dccfb44753610f39b120938269cd3a 22-Feb-2016 Bin Chen <chen_bin@projectara.com> CameraService: Fix cameraId type of onDeviceStatusChanged

The cameraId should be of type int, instead of camera_device_status_t.

Change-Id: I26d587bb74f7100028f09928984c2e8dad6eebef
Signed-off-by: Bin Chen <chen_bin@projectara.com>
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
815b31cc0e52c32e56b501b6bbf16d9057276212 25-Feb-2016 Glenn Kasten <gkasten@google.com> Merge "Restore media.log service" into nyc-dev am: fc958a0888
am: 947a6d6f4d

* commit '947a6d6f4d61486c7575d82f96178aa4995136b6':
Restore media.log service
947a6d6f4d61486c7575d82f96178aa4995136b6 25-Feb-2016 Glenn Kasten <gkasten@google.com> Merge "Restore media.log service" into nyc-dev
am: fc958a0888

* commit 'fc958a0888d47b5d34847afab3b33d877d9ca007':
Restore media.log service
fc958a0888d47b5d34847afab3b33d877d9ca007 25-Feb-2016 Glenn Kasten <gkasten@google.com> Merge "Restore media.log service" into nyc-dev
ae0cff1d48b2cd10aeff9627398faf684894eece 24-Feb-2016 Glenn Kasten <gkasten@google.com> Restore media.log service

Bug: 26306954
Change-Id: I00319f4869f46941e4c814a29b2f69a62e572743
udioflinger/AudioFlinger.cpp
edialog/MediaLogService.cpp
303852ba88ad2ae9c9056c9090f1c2cfc9e95102 25-Feb-2016 Jeffrey Vander Stoep <jeffv@google.com> Merge "mediaex x86: allow debuggerd to collect stacktrace" into nyc-dev am: 9e5591203e
am: d583e41fc2

* commit 'd583e41fc28ff58fe2254dc015ad7a036eadc2d4':
mediaex x86: allow debuggerd to collect stacktrace
d583e41fc28ff58fe2254dc015ad7a036eadc2d4 24-Feb-2016 Jeffrey Vander Stoep <jeffv@google.com> Merge "mediaex x86: allow debuggerd to collect stacktrace" into nyc-dev
am: 9e5591203e

* commit '9e5591203e585a5b2cb783f7e2e8e90482838af4':
mediaex x86: allow debuggerd to collect stacktrace
9e5591203e585a5b2cb783f7e2e8e90482838af4 24-Feb-2016 Jeffrey Vander Stoep <jeffv@google.com> Merge "mediaex x86: allow debuggerd to collect stacktrace" into nyc-dev
7cbcebc1e6c6f659f2706b1957c82a9791cb0a04 24-Feb-2016 Jeff Vander Stoep <jeffv@google.com> mediaex x86: allow debuggerd to collect stacktrace

Currently blocked on x86 platforms by seccomp. Allow the necessary
syscalls.

Bug: 26580739
Change-Id: I20686fd845956b1398d66ceb749d56a47d93cd3b
ediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-x86.policy
c8d25af1c3c32b7671dbeb967fb86f24fa5fa313 24-Feb-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Send client / device format in recording callback" into nyc-dev am: f70077e435
am: bce5dfdac0

* commit 'bce5dfdac0e90701f53e4f8a2c0f5a3c44a0a4ac':
Send client / device format in recording callback
bce5dfdac0e90701f53e4f8a2c0f5a3c44a0a4ac 24-Feb-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Send client / device format in recording callback" into nyc-dev
am: f70077e435

* commit 'f70077e43576f876bac08f3cf1f702b3c19b8184':
Send client / device format in recording callback
f70077e43576f876bac08f3cf1f702b3c19b8184 24-Feb-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Send client / device format in recording callback" into nyc-dev
fa4cd335a9bae18c852cff8198155a0e6fd3f26e 24-Feb-2016 Glenn Kasten <gkasten@google.com> Merge "Restore audio tee sink" into nyc-dev am: 1bf4df7d69
am: 00d1d92474

* commit '00d1d9247488864deea46e09f121e79ae96ba82c':
Restore audio tee sink
00d1d9247488864deea46e09f121e79ae96ba82c 24-Feb-2016 Glenn Kasten <gkasten@google.com> Merge "Restore audio tee sink" into nyc-dev
am: 1bf4df7d69

* commit '1bf4df7d69a639e38fecf962e533244f98878e3f':
Restore audio tee sink
1bf4df7d69a639e38fecf962e533244f98878e3f 24-Feb-2016 Glenn Kasten <gkasten@google.com> Merge "Restore audio tee sink" into nyc-dev
b5ee8bb93b0e33888fabf291ad50680ab104e0a1 24-Feb-2016 Andy Hung <hunga@google.com> Merge "Fix AudioTrack presentationComplete regression" into nyc-dev am: 0b43502e02
am: 1bc25a1f31

* commit '1bc25a1f31c495ef04cbfe3eb354d78995e0202d':
Fix AudioTrack presentationComplete regression
1bc25a1f31c495ef04cbfe3eb354d78995e0202d 24-Feb-2016 Andy Hung <hunga@google.com> Merge "Fix AudioTrack presentationComplete regression" into nyc-dev
am: 0b43502e02

* commit '0b43502e026a31976fa2d316b72eea0508a9ae40':
Fix AudioTrack presentationComplete regression
0b43502e026a31976fa2d316b72eea0508a9ae40 24-Feb-2016 Andy Hung <hunga@google.com> Merge "Fix AudioTrack presentationComplete regression" into nyc-dev
c54b1ffc92b8ad27608a8af21033d7cab33cb3a0 23-Feb-2016 Andy Hung <hunga@google.com> Fix AudioTrack presentationComplete regression

Bug: 27310929
Change-Id: Id52299660d90b07220a4fd9996da53fe755a41f1
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
9a00399340c7c129714dff96f1ab59045fe43056 24-Feb-2016 Glenn Kasten <gkasten@google.com> Restore audio tee sink

And fix a bug in error logging

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

Bug 26798796

Change-Id: Ib4f64159c8371d87da49a8f0cad9317a87d843c4
udiopolicy/AudioPolicyInterface.h
udiopolicy/common/managerdefinitions/include/AudioSession.h
udiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioSession.cpp
udiopolicy/service/AudioPolicyClientImpl.cpp
udiopolicy/service/AudioPolicyService.cpp
udiopolicy/service/AudioPolicyService.h
987d80fc3db1125ed99c79c46ab4342842e8a87f 23-Feb-2016 Ronghua Wu <ronghuawu@google.com> Merge "mediaresourcemanager: verify the input calling pid" into nyc-dev am: eafe1f9734
am: d7a0d6f15a

* commit 'd7a0d6f15aa459e858b181ea26d011b92a827f66':
mediaresourcemanager: verify the input calling pid
d7a0d6f15aa459e858b181ea26d011b92a827f66 23-Feb-2016 Ronghua Wu <ronghuawu@google.com> Merge "mediaresourcemanager: verify the input calling pid" into nyc-dev
am: eafe1f9734

* commit 'eafe1f9734af31730790b0abaf8c6aae01bfee77':
mediaresourcemanager: verify the input calling pid
eafe1f9734af31730790b0abaf8c6aae01bfee77 23-Feb-2016 Ronghua Wu <ronghuawu@google.com> Merge "mediaresourcemanager: verify the input calling pid" into nyc-dev
58545be2ce4e701c8c37401edcc126a8b683890d 23-Feb-2016 Eric Laurent <elaurent@google.com> audio policy: add device for audio bus

Add audio device category representing a bus in the
audio subsystem. E.g a set of channels in MOST automotive bus.

Bug: 25448664
Change-Id: Id00da57dc45037d4d8062e9a747c423940611539
udioflinger/Threads.cpp
udiopolicy/common/managerdefinitions/src/TypeConverter.cpp
4880148e803eca5a11f43df32a5528b7986afa06 23-Feb-2016 Andy Hung <hunga@google.com> Merge "Implement server side playback timestamps with 64 bit accuracy" into nyc-dev am: c085a757a2
am: 8b13532f53

* commit '8b13532f533854d237b05aed94ecee6670621c95':
Implement server side playback timestamps with 64 bit accuracy
8b13532f533854d237b05aed94ecee6670621c95 23-Feb-2016 Andy Hung <hunga@google.com> Merge "Implement server side playback timestamps with 64 bit accuracy" into nyc-dev
am: c085a757a2

* commit 'c085a757a28f36bdefeee1775fdbdce869c4c1f5':
Implement server side playback timestamps with 64 bit accuracy
c085a757a28f36bdefeee1775fdbdce869c4c1f5 23-Feb-2016 Andy Hung <hunga@google.com> Merge "Implement server side playback timestamps with 64 bit accuracy" into nyc-dev
0a5392e88aca4b9a587910d42227c5db10846286 22-Feb-2016 Glenn Kasten <gkasten@google.com> Merge "Add instructions and script for resampler test and performance" into nyc-dev am: 48816c0829
am: 51495b4aaf

* commit '51495b4aaf481908c97242703b52eff7283256c5':
Add instructions and script for resampler test and performance
51495b4aaf481908c97242703b52eff7283256c5 22-Feb-2016 Glenn Kasten <gkasten@google.com> Merge "Add instructions and script for resampler test and performance" into nyc-dev
am: 48816c0829

* commit '48816c0829d752dde7362ef86c857dbaa8e5c6c8':
Add instructions and script for resampler test and performance
48816c0829d752dde7362ef86c857dbaa8e5c6c8 22-Feb-2016 Glenn Kasten <gkasten@google.com> Merge "Add instructions and script for resampler test and performance" into nyc-dev
23f0e033722b1ddee7a43eaa154f36d1919a14ae 22-Feb-2016 Aurimas Liutikas <aurimas@google.com> Merge "Fix the last warnings in frameworks/av/ drm code." into nyc-dev am: 1deb248c05
am: 717cf8be49

* commit '717cf8be49d4f163ec3d902f98d047b3a18525c8':
Fix the last warnings in frameworks/av/ drm code.
717cf8be49d4f163ec3d902f98d047b3a18525c8 22-Feb-2016 Aurimas Liutikas <aurimas@google.com> Merge "Fix the last warnings in frameworks/av/ drm code." into nyc-dev
am: 1deb248c05

* commit '1deb248c059cb79d4e4f3d0e4a1ca59533a8046e':
Fix the last warnings in frameworks/av/ drm code.
1deb248c059cb79d4e4f3d0e4a1ca59533a8046e 22-Feb-2016 Aurimas Liutikas <aurimas@google.com> Merge "Fix the last warnings in frameworks/av/ drm code." into nyc-dev
c04a80ad7ecd8084372fe61b8a93e2f9c58c153e 22-Feb-2016 Eric Laurent <elaurent@google.com> Merge "audiopolicy: Synchronize calls to Effects state" into nyc-dev am: c8fc480370
am: d88c1c0044

* commit 'd88c1c0044cf1db95418ebbc474677d35fec269a':
audiopolicy: Synchronize calls to Effects state
d88c1c0044cf1db95418ebbc474677d35fec269a 22-Feb-2016 Eric Laurent <elaurent@google.com> Merge "audiopolicy: Synchronize calls to Effects state" into nyc-dev
am: c8fc480370

* commit 'c8fc4803705da79aaaeff909538a976bf0e45852':
audiopolicy: Synchronize calls to Effects state
c8fc4803705da79aaaeff909538a976bf0e45852 22-Feb-2016 Eric Laurent <elaurent@google.com> Merge "audiopolicy: Synchronize calls to Effects state" into nyc-dev
d11c43a12917e017d715db88c13e4e7550eb9151 28-Jan-2016 Ronghua Wu <ronghuawu@google.com> mediaresourcemanager: verify the input calling pid

Bug: 26830615
Change-Id: I2e9c579b3bdd86a90b08fa161206d32527390bb5
ediaresourcemanager/ResourceManagerService.cpp
ediaresourcemanager/test/ResourceManagerService_test.cpp
ff0cdeb52e0678e756b268946f0b31def4663a82 22-Feb-2016 Glenn Kasten <gkasten@google.com> Merge "Clean up USE_NEON to make it easier to disable NEON for benchmarking" into nyc-dev am: f214d6936f
am: f989068f4f

* commit 'f989068f4fcfd6021e8f7ffaafc6c4d896bdfbcd':
Clean up USE_NEON to make it easier to disable NEON for benchmarking
f989068f4fcfd6021e8f7ffaafc6c4d896bdfbcd 22-Feb-2016 Glenn Kasten <gkasten@google.com> Merge "Clean up USE_NEON to make it easier to disable NEON for benchmarking" into nyc-dev
am: f214d6936f

* commit 'f214d6936f66052bfabc51e3355f800e41b511f2':
Clean up USE_NEON to make it easier to disable NEON for benchmarking
f214d6936f66052bfabc51e3355f800e41b511f2 22-Feb-2016 Glenn Kasten <gkasten@google.com> Merge "Clean up USE_NEON to make it easier to disable NEON for benchmarking" into nyc-dev
bab7bf46e15f7e2e304081c5cc56f8d58f5f09f3 31-Oct-2015 Haynes Mathew George <hgeorge@codeaurora.org> audiopolicy: Synchronize calls to Effects state

Synchronize calls that might access Effects state (alternate approach)

Bug: 26516500

Change-Id: Ie03de9c67232e0ac7f5db5cbfe87ec058acbfc8e
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
udiopolicy/service/AudioPolicyService.h
e533aed101039843365a4285b78e26854e1890ec 20-Feb-2016 Ryan Bavetta <bavetta@google.com> Merge "Prevent dumping sound models when max reached" into nyc-dev am: 46c1af6074
am: ba27858cd1

* commit 'ba27858cd1e7ccf9e6738a2c702f10076584b66c':
Prevent dumping sound models when max reached
ba27858cd1e7ccf9e6738a2c702f10076584b66c 20-Feb-2016 Ryan Bavetta <bavetta@google.com> Merge "Prevent dumping sound models when max reached" into nyc-dev
am: 46c1af6074

* commit '46c1af60749a9d0ff9551998f2648cb7cc2b1124':
Prevent dumping sound models when max reached
46c1af60749a9d0ff9551998f2648cb7cc2b1124 20-Feb-2016 Ryan Bavetta <bavetta@google.com> Merge "Prevent dumping sound models when max reached" into nyc-dev
2c561209f00320f7ca2b75998bbe72ecec527210 16-Feb-2016 Ryan Bavetta <bavetta@google.com> Prevent dumping sound models when max reached

There are currently cases when SoundTriggerHelper may get out of sync
with SoundTriggerHwService, specifically which and how many sound models
are loaded.

If SoundTriggerHelper attempts to load a sound model and it would be
exceeding the maximum allowable number of sound models:

1) If the new sound model is not a KeyphraseSoundModel:
Throw an error
2) If the new sound model is a KeyphraseSoundModel:
See if there is an existing KeyphraseSoundModel to unload
Failing that, unload the first SoundModel in the index


BUG: 27225762
BUG: 22860713

Change-Id: I74db1be36bbc5887f5bf4751c3138de102976722
oundtrigger/SoundTriggerHwService.cpp
c903684e9a8af5450bab61b0883fc81c5a466844 19-Feb-2016 Aurimas Liutikas <aurimas@google.com> Fix the last warnings in frameworks/av/ drm code.

- index is always positive so no need to check > 0
- args parameters are unused.

Bug: 27151704
Change-Id: Ia4c23e1fc4eaef47f38526574b35ccfea9c92177
ediadrm/Android.mk
ediadrm/main_mediadrmserver.cpp
7c17f28e5f80b72ef06eaf2821306b234352c292 19-Feb-2016 Christopher Wiley <wiley@google.com> Merge "brillo: Don\'t even try contacting the camera proxy" am: 15ca784102 am: cf34799f70
am: 2e2cfd6158

* commit '2e2cfd6158d8aded0effc3a1395c2731e2750841':
brillo: Don't even try contacting the camera proxy
2e2cfd6158d8aded0effc3a1395c2731e2750841 19-Feb-2016 Christopher Wiley <wiley@google.com> Merge "brillo: Don\'t even try contacting the camera proxy" am: 15ca784102
am: cf34799f70

* commit 'cf34799f702fca5cb6fabd185650c265c08c8b2e':
brillo: Don't even try contacting the camera proxy
cf34799f702fca5cb6fabd185650c265c08c8b2e 19-Feb-2016 Christopher Wiley <wiley@google.com> Merge "brillo: Don\'t even try contacting the camera proxy"
am: 15ca784102

* commit '15ca784102df7fc8259509b564d8085273d2a340':
brillo: Don't even try contacting the camera proxy
15ca784102df7fc8259509b564d8085273d2a340 19-Feb-2016 Christopher Wiley <wiley@google.com> Merge "brillo: Don't even try contacting the camera proxy"
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
udioflinger/FastMixer.cpp
udioflinger/FastMixer.h
udioflinger/PlaybackTracks.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
dd24e2d5db289b4012f88d2aa9acc22d58ec15f4 19-Feb-2016 Andy Hung <hunga@google.com> Merge "Enable FastTrack timestamps" into nyc-dev am: cf1bbf3a12
am: cfeaf775fe

* commit 'cfeaf775fe6da367a982dbc4db902f5803553c09':
Enable FastTrack timestamps
cfeaf775fe6da367a982dbc4db902f5803553c09 19-Feb-2016 Andy Hung <hunga@google.com> Merge "Enable FastTrack timestamps" into nyc-dev
am: cf1bbf3a12

* commit 'cf1bbf3a12be653b825e230fd2785c14cd9b0192':
Enable FastTrack timestamps
cf1bbf3a12be653b825e230fd2785c14cd9b0192 19-Feb-2016 Andy Hung <hunga@google.com> Merge "Enable FastTrack timestamps" into nyc-dev
6ae5843c281301a9ffd1059d185620a9337e15a2 17-Feb-2016 Andy Hung <hunga@google.com> Enable FastTrack timestamps

Bug: 26413951
Change-Id: Id54c32cb0f0be83d443f6cf1007181ebc461c586
udioflinger/PlaybackTracks.h
udioflinger/RecordTracks.h
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
107f4fec11b106c1353efc3efe42ffced0b38eea 19-Feb-2016 Eric Laurent <elaurent@google.com> Merge "DO NOT MERGE - audio policy: disable concurrent capture" into nyc-dev
am: 408d0b67c6

* commit '408d0b67c6e384052fd114fbe969a558f990d7a1':
DO NOT MERGE - audio policy: disable concurrent capture
408d0b67c6e384052fd114fbe969a558f990d7a1 19-Feb-2016 Eric Laurent <elaurent@google.com> Merge "DO NOT MERGE - audio policy: disable concurrent capture" into nyc-dev
ab8c640c6e8fcd8051bb2f1eb8c9ff5123100246 18-Feb-2016 Aurimas Liutikas <aurimas@google.com> Merge "Fix warnigns in frameworks/av/services/radio." into nyc-dev
am: 1d1c15285e

* commit '1d1c15285e46201b9b1a16cb8dbb1b8048b150bd':
Fix warnigns in frameworks/av/services/radio.
1d1c15285e46201b9b1a16cb8dbb1b8048b150bd 18-Feb-2016 Aurimas Liutikas <aurimas@google.com> Merge "Fix warnigns in frameworks/av/services/radio." into nyc-dev
1395874b91ddcd29e36d2bb6b86567f6f2319efc 18-Feb-2016 Aurimas Liutikas <aurimas@google.com> Fix warnigns in frameworks/av/services/radio.

- Fixes a number of "suggest braces around initialization of subobject"
warnings. [-Wmissing-braces]
- Fixes assignment operation.

Bug: 27151636
Change-Id: Id468ff7be4914c04224fd4430ccd128e7f3a89c8
adio/Android.mk
adio/RadioRegions.h
adio/RadioService.cpp
232f26f8b673973ffa463f80b08b731ffacc8785 18-Feb-2016 Eric Laurent <elaurent@google.com> DO NOT MERGE - audio policy: disable concurrent capture

This reverts commit 4342335fb84bfa4ec5b99e3ef82f186820c2275f.
This reverts commit 56afc7a5cc0f0bfc8021f6413b2e2267050bdc8a.
This reverts commit 313d1e7dfb4bf8e0a2f09a9adb287062dd64410c.
This reverts commit fb66dd9f95a1168698f072c4e5c2a2cf8c49a80f.

Bug: 22702906

Change-Id: I9085918f1f7b12e28430958cceb768bb29c12bdb
udiopolicy/AudioPolicyInterface.h
udiopolicy/common/include/policy.h
udiopolicy/common/managerdefinitions/include/AudioInputDescriptor.h
udiopolicy/common/managerdefinitions/include/AudioPort.h
udiopolicy/common/managerdefinitions/include/AudioSession.h
udiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioSession.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
udiopolicy/service/AudioPolicyEffects.cpp
udiopolicy/service/AudioPolicyEffects.h
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
udiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp
5bb6e3b653b1ace70801928e5d21118e582675d8 18-Feb-2016 Jeffrey Vander Stoep <jeffv@google.com> Merge "seccomp-arm: allow sched_yield syscall" into nyc-dev
am: a8c00f6007

* commit 'a8c00f600717dcdc8b6b7be613923d6bbaab887a':
seccomp-arm: allow sched_yield syscall
071f1f72fb1da1739ef5ab1d79e0237a3d07cf94 18-Feb-2016 Glenn Kasten <gkasten@google.com> Disable ARM assembly optimization of legacy linear resampler
am: 505fd30258

* commit '505fd3025855f424353ae084495e1855522cf65b':
Disable ARM assembly optimization of legacy linear resampler
a8c00f600717dcdc8b6b7be613923d6bbaab887a 18-Feb-2016 Jeffrey Vander Stoep <jeffv@google.com> Merge "seccomp-arm: allow sched_yield syscall" into nyc-dev
1f94014ff5e057b77acc1f270e63126ee39d799c 18-Feb-2016 Jeff Vander Stoep <jeffv@google.com> seccomp-arm: allow sched_yield syscall

Addresses:
media.extractor: libminijail: blocked syscall: sched_yield

Bug: 27243022
Change-Id: I027534fe86f18adf7cf951fa0bf8fb96713c8bfd
ediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-arm.policy
0b3b4093f99d10b4770fe28cc7d242a8e8eaa5be 16-Feb-2016 Glenn Kasten <gkasten@google.com> Add instructions and script for resampler test and performance

Bug: 27242871
Change-Id: I2238ddbe4861a85b28590a66d1c182afbb54b629
udioflinger/tests/README
udioflinger/tests/run_all_unit_tests.sh
4699a6a4c1fa62cd72dfda7b08573678eabbcfa3 16-Feb-2016 Glenn Kasten <gkasten@google.com> Clean up USE_NEON to make it easier to disable NEON for benchmarking

Bug: 27242871
Change-Id: I30ba8bfe55885cde531706c760ec27e593d7f8b3
udioflinger/Android.mk
udioflinger/AudioResamplerFirOps.h
udioflinger/AudioResamplerSinc.cpp
505fd3025855f424353ae084495e1855522cf65b 17-Feb-2016 Glenn Kasten <gkasten@google.com> Disable ARM assembly optimization of legacy linear resampler

It has magic numbers in the asm() that no longer work,
isn't used any more and not really much faster than the C version.

Bug: 13102576
Change-Id: I56398a749ee0a45f31de9317e0a57e38d7b68a69
udioflinger/AudioResampler.cpp
994d49d96171ea2138b79d60b650150d2eff2973 18-Feb-2016 Wei Jia <wjia@google.com> Merge "AudioPolicyManager: add comment for disabling offload when streaming." into nyc-dev
am: b74dc56b2f

* commit 'b74dc56b2fd3ec872383544d4b6d4950c206259b':
AudioPolicyManager: add comment for disabling offload when streaming.
b74dc56b2fd3ec872383544d4b6d4950c206259b 18-Feb-2016 Wei Jia <wjia@google.com> Merge "AudioPolicyManager: add comment for disabling offload when streaming." into nyc-dev
4ca44d77ede74eda712fbae80700dc92d5922e02 18-Feb-2016 Wei Jia <wjia@google.com> AudioPolicyManager: add comment for disabling offload when streaming.

Bug: 23499384
Change-Id: I74214c9cb444b10a6f50ffe499938945c063afca
udiopolicy/managerdefault/AudioPolicyManager.cpp
c59de9ba394887e748190e223165e6f15f9a1b5f 18-Feb-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: select output with best sample format match" into nyc-dev
am: de223b40b8

* commit 'de223b40b81450703980667ffffc766a16c3447c':
audio policy: select output with best sample format match
de223b40b81450703980667ffffc766a16c3447c 18-Feb-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: select output with best sample format match" into nyc-dev
e693002b0fb25099540588245892ed98103749ba 11-Feb-2016 Eric Laurent <elaurent@google.com> audio policy: select output with best sample format match

Add rules allowing selection of the output stream with the sample
format offering the best match to the client track sample format
when more than one output is compatible with a request.

Bug: 27210844

Change-Id: I31981940be5d1c06d713d52187cfb0a7bf355773
udiopolicy/common/include/policy.h
udiopolicy/common/managerdefinitions/include/AudioPort.h
udiopolicy/common/managerdefinitions/src/AudioPort.cpp
udiopolicy/common/managerdefinitions/src/AudioProfile.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
37205a1b77b4f06af819e7d61418c86a0083d2d2 17-Feb-2016 Wei Jia <wjia@google.com> Merge "AudioPolicyManager: disable offload mode when streaming." into nyc-dev
am: f25f8410c0

* commit 'f25f8410c01922c58d78ec35da420c3b4fed7e38':
AudioPolicyManager: disable offload mode when streaming.
f25f8410c01922c58d78ec35da420c3b4fed7e38 17-Feb-2016 Wei Jia <wjia@google.com> Merge "AudioPolicyManager: disable offload mode when streaming." into nyc-dev
7b8d434379e486ff32d43875676f423ce9ee1c05 17-Feb-2016 Wei Jia <wjia@google.com> AudioPolicyManager: disable offload mode when streaming.

This is a temporary work around until the root cause is fixed in offload
playback path.

Bug: 23499384
Change-Id: I1ee8197ba8995084287ef9385a0f6a30e4bb9351
udiopolicy/managerdefault/AudioPolicyManager.cpp
55363176be0ad1fe75d97276547929b4ca971f56 17-Feb-2016 Bill Yi <byi@google.com> Merge commit '813ac23bee5b3519c2b7f410a2b24b3a94075b22' into HEAD
13b5caf8cbb6b62d411472c6e831aeee77393adb 16-Feb-2016 Christopher Wiley <wiley@google.com> Merge "resolve merge conflicts of c25621f0e5 to nyc-dev-plus-aosp" into nyc-dev-plus-aosp
0e468faad559bb2edc7b0646943e54e84d9de312 16-Feb-2016 Eric Laurent <elaurent@google.com> Merge "Revert "Enable FastTrack timestamps"" into nyc-dev
am: d25c45526d

* commit 'd25c45526d9598218433b0fa59e1f5accbd5b639':
Revert "Enable FastTrack timestamps"
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
udioflinger/PlaybackTracks.h
udioflinger/Tracks.cpp
7807268e00f69c7ee06e3ddb3ea3bde37ae43115 16-Feb-2016 Aurimas Liutikas <aurimas@google.com> Fix compiler warnings in Camera3 service code.
am: bc57b12030

* commit 'bc57b12030cbd4885d9231e721bbfed1b6522212':
Fix compiler warnings in Camera3 service code.
ce761d1fef4da2a4dec3eb538d103fcde1971dba 16-Feb-2016 Christopher Wiley <wiley@google.com> resolve merge conflicts of c25621f0e5 to nyc-dev-plus-aosp

Change-Id: I36983f261e91f9fc1b41ff54ba604fa616ada0ff
bc57b12030cbd4885d9231e721bbfed1b6522212 16-Feb-2016 Aurimas Liutikas <aurimas@google.com> Fix compiler warnings in Camera3 service code.

- Removes unsed mDepth variable
- Fixes the type of count in getRawOpaqueBufferSize

Bug: 27149500
Change-Id: I7d5010cb513f9163c8bb6bf4ab427e54ee9d4963
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3ZslStream.cpp
amera/libcameraservice/device3/Camera3ZslStream.h
c25621f0e52dbf78159b5aa28b8c19ed6a7a053b 16-Feb-2016 Christopher Wiley <wiley@google.com> Merge "brillo: Rely on static SELinux policy for camera"
689a3917b406dd65e2783f08f2238a3d56a4ec29 13-Feb-2016 Jeff Tinker <jtinker@google.com> Add mediadrm service
am: a69729dc76

* commit 'a69729dc76b97c44387088d351480d5d0701517e':
Add mediadrm service
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
ediadrm/Android.mk
ediadrm/DrmSessionClientInterface.h
ediadrm/MediaDrmService.cpp
ediadrm/MediaDrmService.h
ediadrm/main_mediadrmserver.cpp
ediadrm/mediadrmserver.rc
ediadrm/tests/Android.mk
ediadrm/tests/DrmSessionManager_test.cpp
4b10421d8f8abb11907a4c54e4e225b6d9330ece 13-Feb-2016 Dimitry Ivanov <dimitry@google.com> Merge "Add missing liblog dependency"
am: 11c3022b6e

* commit '11c3022b6e5fcf48c8ba7c13bba899ff1b00a9e9':
Add missing liblog dependency
11c3022b6e5fcf48c8ba7c13bba899ff1b00a9e9 13-Feb-2016 Dimitry Ivanov <dimitry@google.com> Merge "Add missing liblog dependency"
d1a9f491e7850136c203ba118a5f045933cd5d29 13-Feb-2016 Dimitry Ivanov <dimitry@google.com> Add missing liblog dependency

Bug: http://b/27171986
Change-Id: I5f62e39b54b7dfc0aa03992a20373a0a6daf1e2f
udiopolicy/enginedefault/Android.mk
92c06fceabfa47906aaa7c747dcdd6376ccec358 12-Feb-2016 Christopher Wiley <wiley@google.com> brillo: Don't even try contacting the camera proxy

This service isn't running, and every time we try, we spend
five seconds retrying to get a reference to a binder that
will never be registered with the service manager.

Bug: 26936651
Test: With this patch, 5 second pauses with logs disappear.

Change-Id: I9cc6b1b616f1b786c3bb4e687b1c742d31424684
amera/libcameraservice/CameraService.cpp
0039bcf0c4f10b92917c26df70c7847f1ab0b51e 05-Feb-2016 Christopher Wiley <wiley@google.com> brillo: Rely on static SELinux policy for camera

In Brillo, there are no applications, and SELinux policy can be
configured statically (at build time). In this model, we control
access to the camera binder, and thus to the camera stack.

Bug: 26936651
Test: Brillo test camera client can connect to camera

Change-Id: I5207c2f78e4f36778b90aac29bf4317b62cbd3dd
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
161c953eae05a71309ae5ed03213dec23c907cf6 12-Feb-2016 Dimitry Ivanov <dimitry@google.com> Fix warning: list conflicting ids (not cameraId)

Change-Id: Iad75866ab4edd500a32c5ca7e7c89d8af246f5d2
amera/libcameraservice/CameraService.cpp
b0a144d705a021994628d136a170a6d2bd4282e7 12-Feb-2016 Phil Burk <philburk@google.com> Merge "AudioTrack: support ENCODING_IEC61937" into nyc-dev
e58f3c5a8b51dfe9153e39bada55dd3ede98f693 12-Feb-2016 Shuzhen Wang <shuzhenwang@google.com> Merge "Camera3: Use proper timestamp clock domain for different streams" into nyc-dev
c28dcccb9bc0a94950a7475f9bd8a6a38be34419 12-Feb-2016 Shuzhen Wang <shuzhenwang@google.com> Camera3: Use proper timestamp clock domain for different streams

If buffer consumers assume different clock domain compared to the camera
output, camera3 device uses the offset between the clock domains to convert
the timestamp.

Bug: 27153476
Change-Id: Iaae33281411cb27b639e87b0dad957d640182898
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.h
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>
udioflinger/AudioFlinger.cpp
udioflinger/AudioHwDevice.cpp
udioflinger/AudioStreamOut.cpp
udioflinger/AudioStreamOut.h
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
udiopolicy/common/managerdefinitions/src/TypeConverter.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
e99556b85081778027653bd3e716a529ab518b35 12-Feb-2016 Andy Hung <hunga@google.com> Merge "Fix audio timestamp computation for pause, stop, and dynamic speed changes" into nyc-dev
dea9cbc6badae6a03a16fa49a02215f18e3ed93a 12-Feb-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix issues in effect parameters parsing" into nyc-dev
b3a486fecddc9e9264fe63d356eca0812493db27 05-Aug-2015 Andy Hung <hunga@google.com> Enable FastTrack timestamps

Bug: 26413951
Change-Id: I99a69241a0bcd69f6bfebf785cac6d9ee1e2cd5f
udioflinger/PlaybackTracks.h
udioflinger/Tracks.cpp
e10393e72454bfd8298017dc193faf424f4e9a8f 12-Jun-2015 Andy Hung <hunga@google.com> Fix audio timestamp computation for pause, stop, and dynamic speed changes

Timestamp on pause and underrun (stop) do not reflect actual position.
Timestamps do not account for dynamic changes to track speed / sample rate.

Bug: 11085154
Bug: 17552775
Change-Id: I0e5e40ab3eaee82f0c91b9f399089698a0b1947e
udioflinger/AudioFlinger.h
udioflinger/LinearMap.h
udioflinger/PlaybackTracks.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.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/common/managerdefinitions/include/AudioPolicyMix.h
udiopolicy/common/managerdefinitions/src/AudioPolicyMix.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
138ed1796f8c8edd318488911a9b056877191778 10-Feb-2016 Eric Laurent <elaurent@google.com> audio policy: fix issues in effect parameters parsing

Fix several issues in AudioPolicyEffects.cpp
- Fix old bug in growParamSize() that should take a pointer
to the address of the parameter structure because it can
modify it by calling realloc()
- Fix warnings reported by clang static analyzer
- Add checks on memory allocations

Bug: 26938281

Change-Id: Id0bfa64371d95356d9fc308c6ea9c74e10ab1be0
udiopolicy/service/AudioPolicyEffects.cpp
udiopolicy/service/AudioPolicyEffects.h
3f0c902beb53a245c9db35e871607dba05b8d391 16-Jan-2016 Andy Hung <hunga@google.com> Add AudioRecord timestamps

Bug: 13569372
Bug: 22886739
Change-Id: Ibc81afefb733d23676a632a0f2da31163fdbe05f
udioflinger/RecordTracks.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
4329981317b6102cbbbf92504af300ca7115b039 10-Feb-2016 Marco Nelissen <marcone@google.com> Merge "Run codecs in a separate process" into nyc-dev
52785f3df24fe817af4f1c3c2cddfb30ab5450ee 10-Feb-2016 Chris Thornton <thorntonc@google.com> Call SoundTrigger::setCaptureState in AudioPoilcyManager::closeAllInputs

closeAllInputs wasn't informing the sound trigger service that all
inputs were closed. This meant that the service could get stuck in a
state where it was disabled because it thought there was some active
capture, even though there was nothing listening. (This was particularly
common when a bluetooth device disconnected).

BUG: 26970013,26450651
Change-Id: I613434ecacce3ef03a657008fd94c314948ba2b8
udiopolicy/managerdefault/AudioPolicyManager.cpp
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
ediacodec/Android.mk
ediacodec/MODULE_LICENSE_APACHE2
ediacodec/MediaCodecService.cpp
ediacodec/MediaCodecService.h
ediacodec/NOTICE
ediacodec/main_codecservice.cpp
ediacodec/mediacodec.rc
b30f2636bc36d56b94dc5d35e20a68b2e403aac2 09-Feb-2016 Eino-Ville Talvala <etalvala@google.com> Merge "CameraHardwareInterface: Reconnect preview in HAL set_buffer_count" into nyc-dev
f73511756147a685267f208784921fea40decc64 09-Feb-2016 Eino-Ville Talvala <etalvala@google.com> CameraHardwareInterface: Reconnect preview in HAL set_buffer_count

Workaround for b/27039775

Some camera device HAL v1 implementations expect that calling
preview_stream_ops->set_buffer_count resets the preview stream's flag
for whether any buffers have been queued up by the camera HAL, allowing
the HAL to dequeue all buffers in the stream again (instead of just its
own buffer count limit, which is lower).

The underlying buffer queue behavior has now changed, and that flag is
no longer reset on a change of buffer count, to support dynamic buffer
queue buffer count features.

To maintain backwards compatibility with HALv1 implementations that rely
on this implicit HAL interface behavior, add a disconnect/connect pair
to the set_buffer_count call, which will reset the dequeue flag, along
with all other preview stream parameters.

To maintain other parameters, cache them when they are originall
set (either by the HAL or by the higher-level camera client), and apply
them again after reconnecting.

Bug: 27039775
Change-Id: I9fa220b356715e7f8e48adc7acdffbfa598c329c
amera/libcameraservice/api1/CameraClient.cpp
amera/libcameraservice/device1/CameraHardwareInterface.h
814ce809867326e6ba46583444476e9f63ad01f7 18-Jan-2016 François Gaffie <francois.gaffie@intel.com> audio policy: engine configurable: support fail safe

When the parameter manager could not be launched, the engine will abort if
LOG_NDEBUG is defined, unless a segmentation fault will happen later.
This patch allows fail safe feature when LOG_NDEBUG is not defined.

Change-Id: Ie78575bddad6d19beed61673979e1b8ef1c70b0e
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/engineconfigurable/src/Engine.cpp
udiopolicy/engineconfigurable/wrapper/ParameterManagerWrapper.cpp
9792ec3735dc56ca2bd97d7e6524deb8c46f5186 26-Jan-2016 François Gaffie <francois.gaffie@intel.com> audio policy: engine configurable: update example PFW files

This patch updates the PFW files given as example.
-it adapts to N-definition
-fixes some bugs

Change-Id: I9537982b33bf772056a3bf94c775ce28d9069ef2
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/engineconfigurable/parameter-framework/example/Settings/PolicyConfigurableDomains.xml
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_input_source.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_media.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_phone.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/volumes.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Structure/PolicySubsystem-CommonTypes.xml
udiopolicy/engineconfigurable/parameter-framework/example/Structure/PolicySubsystem.xml
62e4bc53be19e96f8e37e850b9c8a9e15b9e2ba6 03-Feb-2016 Eric Laurent <elaurent@google.com> audio policy: strengthen dynamic audio profile intialization

Add some robustness to getParameters() reply parsing
in AudioPolicyManager::updateAudioProfiles().
Some audio HALs may respond with more than just the parameters requested.

Change-Id: Id9327604f521f9fb5636ff93cb6a7c3c23c86778
udiopolicy/managerdefault/AudioPolicyManager.cpp
80fa61994c8bcc21e5150c1a6bf447f6423239c4 08-Feb-2016 Zhijun He <zhijunhe@google.com> Camera3: increase the buffer manager water mark by one

This reduces the chance of allocation during stream steady state.
It helps the cases where one stream is active, and other streams may
randomly request some buffers.

Change-Id: I3f29001a45e223dd2e7929452c4a2ac81a1213f2
amera/libcameraservice/device3/Camera3BufferManager.cpp
0baa212e45892655bbaeef303dce54f5b6458515 05-Feb-2016 Dan Willemsen <dwillemsen@google.com> Merge "mediaex: Fix build rule under Make"
88b27b560cc46ffa52f4211df3821d146ae34427 05-Feb-2016 Dan Willemsen <dwillemsen@google.com> mediaex: Fix build rule under Make

Ninja automatically creates the output directory for a rule, but make
does not. Add mkdir -p so that make builds work.

Change-Id: I123226b2b1b641d268ad0a4922172d43506741cf
ediaextractor/minijail/Android.mk
156260319a15174a86676fa3de8819976199ccac 05-Feb-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix capture concurrency mode checks"
4342335fb84bfa4ec5b99e3ef82f186820c2275f 05-Feb-2016 Eric Laurent <elaurent@google.com> audio policy: fix capture concurrency mode checks

Capture concurrency mode indicated by policy manager
after startInput() is a bit field and should be handled as
such by startInput() in AudioPolicyInterfaceImpl.

Bug: 26994864
Change-Id: Iff093a82b8b68262abab50bc84060cf023450783
udiopolicy/AudioPolicyInterface.h
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
6e63ee89d0acd39d20c4aa48ef9eb717d0a89a0b 05-Feb-2016 Eric Laurent <elaurent@google.com> Merge "audio flinger: add check in getInputBufferSize()"
cdf924a32579e92ea456e8e7d5c14ed5920b620f 05-Feb-2016 Eric Laurent <elaurent@google.com> audio flinger: add check in getInputBufferSize()

Make sure that the sample rate passed to getInputBufferSize()
is not 0 to avoid divide by 0 in destinationFramesPossible()

Also check the channel mask parameter for validity.

bug: 26866012
Change-Id: Ifabbf56cadb0db104f99230cacdba30e0c6a0a3a
udioflinger/AudioFlinger.cpp
edd41ae47b99b98249e819ac72fb94264326a4eb 03-Feb-2016 Zhijun He <zhijunhe@google.com> Camera3: buffer manager doesn't support HAL3.2 devices

Not all HAL3.2 devices implemented dynamic buffer registeration.
This CL excludes the HAL3.2 devices from the buffer manager
supported devices.

Bug: 26955436
Change-Id: I5bc2eec0a4db2f5ab85f7677ed7b367c13ce67aa
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3OutputStream.cpp
6bd34cc33c65634cf76787b17a79959716faf596 04-Feb-2016 Jeffrey Vander Stoep <jeffv@google.com> Merge "mediaex: arm: add syscalls for debuggerd attach"
bfdefc5be80920781f421ab82e026c7dc626b466 04-Feb-2016 Jeff Vander Stoep <jeffv@google.com> mediaex: arm: add syscalls for debuggerd attach

Silent crashes and empty bug reports are not useful.

Bug: 26580739
Change-Id: I436d9b4af488158d75b277c228598335acd7a5b3
ediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-arm.policy
9aee54d4456c86ab389c798d2efccaa1ae6bf7a0 04-Feb-2016 Glenn Kasten <gkasten@google.com> Merge "Add limiter for mono blend"
19bd5498a78936436e982ff074cd9d460494c066 03-Feb-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Fix connection of OUT_REMOTE_SUBMIX device on APM startInput"
56afc7a5cc0f0bfc8021f6413b2e2267050bdc8a 03-Feb-2016 Jean-Michel Trivi <jmtrivi@google.com> Fix connection of OUT_REMOTE_SUBMIX device on APM startInput

Fix a regression in AudioPolicyManager::startInput() where
the OUT_REMOTE_SUBMIX audio device was never made available
due to the test on the input descriptor, which was already
active by the time it is tested, as the activity on the
session has already been updated.

Add methods to AudioInputDescriptor and AudioSessionCollection
to query the number of active sessions. Use the new method
to optimize AudioSessionCollection::hasActiveSession()

Bug 26798796

Change-Id: I2de4e47970505e64c4c78a148a80a9f0ec19e821
udiopolicy/common/managerdefinitions/include/AudioInputDescriptor.h
udiopolicy/common/managerdefinitions/include/AudioSession.h
udiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioSession.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
e1c37946c27024acd80b1af8724ad5d309ddcf92 03-Feb-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix overflow in condition wait timeout"
d7eda8d0127fabf2d63b0890043da40e2a9e366c 03-Feb-2016 Eric Laurent <elaurent@google.com> audio policy: fix overflow in condition wait timeout

Do not pass a large value to Condition::waitRelative() as this
can cause an overflow in pthread_cond_timedwait_relative_np() when
converting to absolute time.

Bug: 26891803
Change-Id: Ie2a00bca52d469aa08b2718089dc19cfb1f3475f
udiopolicy/service/AudioPolicyService.cpp
36672af51e20268e4649075858943f7545ddd15b 03-Feb-2016 Zhijun He <zhijunhe@google.com> Merge "Camera3: add dynamic buffer count water mark support"
8d1a154cc6239096edda698ea638e6ab6fe53c4e 30-Jan-2016 Zhijun He <zhijunhe@google.com> Camera3: add dynamic buffer count water mark support

The dynamic buffer count water mark starts from zero, and grows when the max of
hand-out buffer counts grow, until reach to the max allowed total buffer count.
For the case where the clients almost always uses less number of buffers than
the max allowed total buffer count, the dynamic buffer count water mark will
remain low, and the memory footprint will be smaller.

Change-Id: I305f40232f4740d3e9bedf14ee9b76a81e29e244
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/device3/Camera3BufferManager.cpp
amera/libcameraservice/device3/Camera3BufferManager.h
9609a91f8560622735f6725f7f597be47a8e2f5f 29-Jan-2016 Ryan Bavetta <bavetta@google.com> Restore Abort Event for Unknown Sound Models

Restore abort event when setting capture state
from active to inactive for Unknown Sound Models
This was taken out mistakenly in change 853028
Also fix/improve log messages

Change-Id: I58771de47ea357bb99a4ba3cfeea412490746443
oundtrigger/SoundTriggerHwService.cpp
2e5408ac3e51cb459160b9cd392f1809b0758316 01-Feb-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix set volume with explicit audio patch"
706de969169a8f651726ab7de7302a3d35b39768 01-Feb-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix loss of audio patch client UID"
e04e62bc05316d9682688f87053be5cf47e9c707 30-Jan-2016 Eric Laurent <elaurent@google.com> audio policy: fix set volume with explicit audio patch

setStreamVolumeIndex() receives both a stream and a device as inputs.
When an explicit audio patch is requested on an output mix, it
is possible that the active device does not match the strategy
derived from the stream, in which case the function would not update
current volume.
This patch makes sure that the device explicitly passed to
setStreamVolumeIndex() is always taken into acount.

Change-Id: Ie496ff70f059166af6c81c8f8445a9a9c7548a72
udiopolicy/managerdefault/AudioPolicyManager.cpp
03c48d5afcb3dfc1e43df93e1f3b3b3e9292e148 28-Jan-2016 Glenn Kasten <gkasten@google.com> Add limiter for mono blend

Bug: 26904791
Change-Id: I76b16e70871cd9fc0a9b8badc66f27069fabe1cb
udioflinger/FastMixer.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
bacd9d7ae33d831f9b8b3a0bc7ba8d367164a1d0 30-Jan-2016 Eric Laurent <elaurent@google.com> audio policy: fix loss of audio patch client UID

If an explicit audio patch is present on an output mix,
its client UID should not be reset by default when the device is updated
on this output mix.

Bug: 26423115
Change-Id: I87973e62d6eeb6f8fef3780bd67f58ae52d07812
udiopolicy/managerdefault/AudioPolicyManager.cpp
52d49a8a1f48c2d59769b9257e2eed988014aa03 28-Jan-2016 Eric Laurent <elaurent@google.com> audio policy: fix connected device address.

Also update the audio device address with the one passed by
setDeviceConnectionState() if the device is in the list of
declared devices but does not have an address set.

Change-Id: Ibe9008b0c96fc336a90646b98703ed238a6cf4a9
udiopolicy/common/managerdefinitions/src/HwModule.cpp
313d1e7dfb4bf8e0a2f09a9adb287062dd64410c 29-Jan-2016 Eric Laurent <elaurent@google.com> audio policy: fix input device selection

Make sure session activity count is incremented before
selecting device in startInput().

Bug: 26841909
Change-Id: I0b4867b9ad4c7a98e5eddb4f1f23c4cf075f074e
udiopolicy/managerdefault/AudioPolicyManager.cpp
6186b0f418e6efd0bf2463397f4c783cde75ecff 29-Jan-2016 Eric Laurent <elaurent@google.com> Merge "Revert "Revert "audio policy for concurrent capture."""
fb66dd9f95a1168698f072c4e5c2a2cf8c49a80f 29-Jan-2016 Eric Laurent <elaurent@google.com> Revert "Revert "audio policy for concurrent capture.""

This reverts commit 84332aaa807037baca05340875f2d94fcc519ac4.

Bug:26841909
udiopolicy/AudioPolicyInterface.h
udiopolicy/common/include/policy.h
udiopolicy/common/managerdefinitions/include/AudioInputDescriptor.h
udiopolicy/common/managerdefinitions/include/AudioPort.h
udiopolicy/common/managerdefinitions/include/AudioSession.h
udiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioSession.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
udiopolicy/service/AudioPolicyEffects.cpp
udiopolicy/service/AudioPolicyEffects.h
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
udiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp
f7a186efd4dc399de2c07adee68cee93e47c1feb 29-Jan-2016 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: derive post RAW sensitivity boost range"
f1d124eff4ce99adb8ea34912ef899863e7b76e3 29-Jan-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: derive post RAW sensitivity boost range

Bug: 26625646
Change-Id: Ifbc49d744ac0dca201028aa414dae56febf28e4b
amera/libcameraservice/common/CameraModule.cpp
b3e5bbedff47b33baab6389b173e854e36e82bdb 29-Jan-2016 Glenn Kasten <gkasten@google.com> Merge "Remove TimedAudioTrack and associated code"
35cb56342e80dbbba3a9cbf5c1398976f1f1befd 28-Jan-2016 Eric Laurent <elaurent@google.com> Merge "Revert "audio policy for concurrent capture.""
84332aaa807037baca05340875f2d94fcc519ac4 28-Jan-2016 Eric Laurent <elaurent@google.com> Revert "audio policy for concurrent capture."

This reverts commit 4b2fcd8abf90b1bd95539f9f4ef2ac39ce9e2df1.

Bug:26841909

Change-Id: Ifc74b195394b9fb3f73d33455ad061bd896d5331
udiopolicy/AudioPolicyInterface.h
udiopolicy/common/include/policy.h
udiopolicy/common/managerdefinitions/include/AudioInputDescriptor.h
udiopolicy/common/managerdefinitions/include/AudioPort.h
udiopolicy/common/managerdefinitions/include/AudioSession.h
udiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioSession.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
udiopolicy/service/AudioPolicyEffects.cpp
udiopolicy/service/AudioPolicyEffects.h
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
udiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp
157bd8a8a69c15cba8276652a15dbb7e5fd5cffb 28-Jan-2016 Zhijun He <zhijunhe@google.com> Merge "Camera3: return cancelled buffers to buffer manager"
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
ediacodec/Android.mk
ediacodec/MODULE_LICENSE_APACHE2
ediacodec/MediaCodecService.cpp
ediacodec/MediaCodecService.h
ediacodec/NOTICE
ediacodec/main_codecservice.cpp
ediacodec/mediacodec.rc
1ff811b024c690e53510113d19042b7cd2d2637a 26-Jan-2016 Zhijun He <zhijunhe@google.com> Camera3: return cancelled buffers to buffer manager

When a buffer is cancelled, it is considered as a free buffer and need to be
returned to buffer manamager for buffer reuse. This will also make the prepare
work.

Also fix the buffer removal bug.

Bug: 25088440
Change-Id: I0e3da44c76008406ee19541366da7a962c355949
amera/libcameraservice/device3/Camera3BufferManager.cpp
amera/libcameraservice/device3/Camera3OutputStream.cpp
2961a35354218904bf190c10a9e52350298c4385 28-Jan-2016 Ryan Bavetta <bavetta@google.com> Merge "Add SoundTrigger GenericSoundModel type"
00a727c430c474f77f8835675a9d773f0314fb68 27-Jan-2016 Ryan Bavetta <bavetta@google.com> Add SoundTrigger GenericSoundModel type

BUG: 22860713
Change-Id: I462ba039577511674a08aee42e3f1941ff7005ce
oundtrigger/SoundTriggerHwService.cpp
feb76cc0340f3eb4c9ae91cbfab4dcea449422f5 28-Jan-2016 Chien-Yu Chen <cychen@google.com> Merge changes from topic 'camera-hardening'

* changes:
camera: Add support to pass native handles across binders
Camera: Fix client permission check
Add cameraserver process
d98985b9f9257d4da8be9c4789c1035099c1f564 28-Jan-2016 Shuzhen Wang <shuzhenwang@google.com> Merge "Camera3: Selectively set buffer timestamp depends on consumer"
13a69633108f40f56aa47f1bcbb406cd5173c245 26-Jan-2016 Shuzhen Wang <shuzhenwang@google.com> Camera3: Selectively set buffer timestamp depends on consumer

Certain consumers such as Hardware Composer and AudioSource
use MONOTONIC timestamp, which causes time misalignment if
camera timestamp is in BOOTTIME.

Do not set buffer time stamp for such streams and let
BufferQueue handle it.

Bug: 22214409
Bug: 26762232
Change-Id: Id1c4b85a181e39827e8f27949a199165bbd445f9
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.h
19219b44e05555b29e00ce56ce273d168fa83888 25-Jan-2016 François Gaffie <francois.gaffie@intel.com> audio policy: use reference for all default volume table

This patch migrates all default volume tables as reference
volume tables.
No implicit volume tables is allowed any more, the reference
must be given for all stream type and device category.
It allows removing the WA that was introduce to use the stream CNT
to host the default volume tables.

Change-Id: I19f5e9d2a62d448f0f8447f93acbbd2e1a723958
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/common/managerdefinitions/include/AudioPolicyConfig.h
udiopolicy/common/managerdefinitions/include/VolumeCurve.h
udiopolicy/common/managerdefinitions/src/Serializer.cpp
udiopolicy/common/managerdefinitions/src/TypeConverter.cpp
udiopolicy/config/audio_policy_volumes.xml
udiopolicy/config/default_volume_tables.xml
udiopolicy/managerdefault/AudioPolicyManager.h
c9d7c4e35afd48ac8a315f53666943b6210dafa1 22-Jan-2016 François Gaffie <francois.gaffie@intel.com> audio policy: allows to use reference for volume table

This patch allows to definie reference attribute within XML
Volume Element and define a reference volume curve.
It allows to factorize efficiently and avoid too much XML
duplication.

Change-Id: I462808ea38d7a39e1e20fe7090a6ebee0cb3c39b
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/common/managerdefinitions/include/Serializer.h
udiopolicy/common/managerdefinitions/src/Serializer.cpp
udiopolicy/config/audio_policy_configuration.xml
udiopolicy/config/audio_policy_volumes.xml
26736fd21faada79c4fb91cb6ef91582c113e9eb 27-Jan-2016 Marco Nelissen <marcone@google.com> Merge "Run codecs in a separate process"
4b2fcd8abf90b1bd95539f9f4ef2ac39ce9e2df1 16-Jan-2016 Eric Laurent <elaurent@google.com> audio policy for concurrent capture.

First implementation of concurrent capture policy:
Initially, only capture for HOTWORD or FM TUNER sources or
re-route submix is allowed at the same time as any other capture.
Several capture clients can share the same input stream. In this case
active clients are sorted by audio source priority level and the input
path configuration and routing is driven by the highest priority
active source.

Bug: 22702906

Change-Id: Icbedfe001c6243ecad7a7b57ab78d893b2b97402
udiopolicy/AudioPolicyInterface.h
udiopolicy/common/include/policy.h
udiopolicy/common/managerdefinitions/include/AudioInputDescriptor.h
udiopolicy/common/managerdefinitions/include/AudioPort.h
udiopolicy/common/managerdefinitions/include/AudioSession.h
udiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioSession.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
udiopolicy/service/AudioPolicyEffects.cpp
udiopolicy/service/AudioPolicyEffects.h
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
udiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp
a03910b23a31058eea178e8d3f5e84fcf852d5c2 27-Jan-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: fix merging error for commit 112b0af8."
20eb3a4340a1f1f6e978a23527daff080140db1a 27-Jan-2016 Eric Laurent <elaurent@google.com> audio policy: fix merging error for commit 112b0af8.

Wrong patch set was merged from partner gerrit.

Change-Id: I850d61b1cc8682e0a82ee64bc8cb022b7512de1c
udiopolicy/common/managerdefinitions/include/AudioPort.h
udiopolicy/common/managerdefinitions/include/AudioProfile.h
udiopolicy/managerdefault/AudioPolicyManager.cpp
832e43305f25f9f71d3cf0e6ae49853569b31b90 26-Jan-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: move volume table to XML file"
98a668f6ea51e4d894d2ebb61a0e18287fb14008 18-Dec-2015 Chien-Yu Chen <cychen@google.com> Camera: Fix client permission check

Modify StageFright's CameraSource to forward calling PID as
client PID when connecting to CameraService so CameraService
can check if the client PID has permission to use camera.

Change CameraService to check calling UID is trusted before
using the passed in client PID and client UID to verify permission.

Bug: 24511454
Change-Id: I4906ab73510e2c75714690bed675e3c13aca3ccf
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/CameraClient.cpp
8aa17d0c577594e1240d21fd823d9f4c5cc14fa0 26-Jan-2016 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera NDK library: first draft"
0dea57fd9fc4b2ccaab97d9477359fbd5a626f5c 10-Dec-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera NDK library: first draft

Bug: 23012001

Change-Id: I06d834421289d4dead1c87301a6ee94487ccf023
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
d79072e9dff59f767cce2cda1caab80ce5a0815b 06-Jan-2016 Glenn Kasten <gkasten@google.com> Remove TimedAudioTrack and associated code

Bug: 8278435
Change-Id: I095c1a4888e645e14d93b0b15fbef4524a831ca1
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/AudioResampler.cpp
udioflinger/AudioResampler.h
udioflinger/AudioResamplerCubic.cpp
udioflinger/AudioResamplerDyn.cpp
udioflinger/AudioResamplerSinc.cpp
udioflinger/BufferProviders.cpp
udioflinger/BufferProviders.h
udioflinger/FastCapture.cpp
udioflinger/FastMixer.cpp
udioflinger/PlaybackTracks.h
udioflinger/RecordTracks.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/TrackBase.h
udioflinger/Tracks.cpp
udioflinger/test-resample.cpp
udioflinger/tests/Android.mk
udioflinger/tests/test-mixer.cpp
udioflinger/tests/test_utils.h
cc97730e142c21a0af67bd2f18d9938a4ef96a39 25-Jan-2016 Zhijun He <zhijunhe@google.com> Camera3: hook up stream set Id

Hook up the stream set Id with native implementation.

Bug: 25088440
Change-Id: Iaed9f02d6638ea259d18f7ea75fbd2c87073c3e4
amera/libcameraservice/api2/CameraDeviceClient.cpp
125684aba1a11b7adbf5f9d607ee2bcc9449081c 27-Dec-2015 Zhijun He <zhijunhe@google.com> Camera3: add camera3 buffer manager support

* Add camera buffer manager for buffer allocation and sharing management across
multiple streams. Only gralloc v0 implementation is done, v1 implementation is
pending. With this, the max mem footprint for multiple streams in the same
stream set will be the max buffer count x max buffer size.
* API1 client will still use the old bufferQueue code path, buffer manager
is only targeting at API2 clients.
* Prepare and teardown should work with buffer manager.
* Some existing code typo fix and cleanup (to fix the compiling warnings).

Bug: 25088440
Change-Id: I68b246faa43080302acd02a8e976384bd3e26a23
amera/libcameraservice/Android.mk
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/device3/Camera3BufferManager.cpp
amera/libcameraservice/device3/Camera3BufferManager.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3DummyStream.cpp
amera/libcameraservice/device3/Camera3IOStreamBase.cpp
amera/libcameraservice/device3/Camera3IOStreamBase.h
amera/libcameraservice/device3/Camera3InputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.h
amera/libcameraservice/device3/Camera3Stream.cpp
amera/libcameraservice/device3/Camera3Stream.h
amera/libcameraservice/device3/Camera3StreamInterface.h
amera/libcameraservice/gui/RingBufferConsumer.h
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
ediacodec/Android.mk
ediacodec/MODULE_LICENSE_APACHE2
ediacodec/MediaCodecService.cpp
ediacodec/MediaCodecService.h
ediacodec/NOTICE
ediacodec/main_codecservice.cpp
ediacodec/mediacodec.rc
d1ab2bd4f1ea166a7e9e81cfd7f3e5dd47135d4d 02-Dec-2015 François Gaffie <francois.gaffie@intel.com> audio policy: move volume table to XML file

This patch allows to store in XML file volume tables.
The compatibility is maintained for legacy conf file.
Configurable Engine is only compatible with new XML conf.
This patch removes from configurable engine Structure / Settings the volume
table but keep the configurabllity of switching volume profiles from
one another according to criteria like phone state...
(ex: DTMF stream type is following Voice Profile in call)

Change-Id: I78c91bc3378b6c47202abe7b5c1c1e011ff62eed
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/Android.mk
udiopolicy/common/managerdefinitions/Android.mk
udiopolicy/common/managerdefinitions/include/AudioPolicyConfig.h
udiopolicy/common/managerdefinitions/include/Gains.h
udiopolicy/common/managerdefinitions/include/IVolumeCurvesCollection.h
udiopolicy/common/managerdefinitions/include/Serializer.h
udiopolicy/common/managerdefinitions/include/StreamDescriptor.h
udiopolicy/common/managerdefinitions/include/VolumeCurve.h
udiopolicy/common/managerdefinitions/src/AudioGain.cpp
udiopolicy/common/managerdefinitions/src/Gains.cpp
udiopolicy/common/managerdefinitions/src/Serializer.cpp
udiopolicy/common/managerdefinitions/src/StreamDescriptor.cpp
udiopolicy/common/managerdefinitions/src/TypeConverter.cpp
udiopolicy/common/managerdefinitions/src/VolumeCurve.cpp
udiopolicy/config/audio_policy_configuration.xml
udiopolicy/config/audio_policy_volumes.xml
udiopolicy/config/default_volume_tables.xml
udiopolicy/engine/interface/AudioPolicyManagerInterface.h
udiopolicy/engine/interface/AudioPolicyManagerObserver.h
udiopolicy/engineconfigurable/Android.mk
udiopolicy/engineconfigurable/interface/AudioPolicyPluginInterface.h
udiopolicy/engineconfigurable/parameter-framework/example/Android.mk
udiopolicy/engineconfigurable/parameter-framework/example/Settings/PolicyConfigurableDomains.xml
udiopolicy/engineconfigurable/parameter-framework/example/Settings/volumes.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Structure/PolicySubsystem-CommonTypes.xml
udiopolicy/engineconfigurable/parameter-framework/example/Structure/PolicySubsystem-Volume.xml
udiopolicy/engineconfigurable/parameter-framework/example/Structure/PolicySubsystem.xml
udiopolicy/engineconfigurable/parameter-framework/plugin/Android.mk
udiopolicy/engineconfigurable/parameter-framework/plugin/PolicySubsystem.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/PolicySubsystem.h
udiopolicy/engineconfigurable/parameter-framework/plugin/Stream.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/Stream.h
udiopolicy/engineconfigurable/parameter-framework/plugin/VolumeProfile.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/VolumeProfile.h
udiopolicy/engineconfigurable/src/Engine.cpp
udiopolicy/engineconfigurable/src/Engine.h
udiopolicy/engineconfigurable/src/Stream.cpp
udiopolicy/engineconfigurable/src/Stream.h
udiopolicy/enginedefault/Android.mk
udiopolicy/enginedefault/src/Engine.cpp
udiopolicy/enginedefault/src/Engine.h
udiopolicy/enginedefault/src/Gains.cpp
udiopolicy/enginedefault/src/Gains.h
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
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>
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
e0db30868d9734f95a02df516dd0dc6a7226474b 16-Jan-2016 Eric Laurent <elaurent@google.com> audio policy: fix combo device parsing

When parsing a device type entry in audio_policy.conf, do not
load device combos (e.g AUDIO_DEVICE_OUT_ALL_A2DP) in a single
DeviceDescriptor but create one descriptor for each device type
in the combo.

Bug: 24113912.
Change-Id: I3a7f43c7fc9cf516506bb3255dd2ed86564b7cd6
udiopolicy/common/managerdefinitions/src/ConfigParsingUtils.cpp
3583c435f773ceef3f340d14c06c62579866f2aa 15-Jan-2016 Eric Laurent <elaurent@google.com> Merge "Audio policy: implement configuration file in XML"
f8e187c67b951b3382d224b395f5bfcf5e469c53 15-Jan-2016 Jeff Vander Stoep <jeffv@google.com> mediaextractor: allow rt_sigprocmask syscall

Change-Id: I551b34565305bb72a105789a29f9793cbd653ad1
ediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-arm.policy
f4ad6e5637b6deccdac4b60615383f290b3806cf 19-Nov-2015 François Gaffie <francois.gaffie@intel.com> Audio policy: implement configuration file in XML

This patch introduces configuration file of the policy in XML.
Legacy configuration file is used by default and
compilation flag USE_XML_AUDIO_POLICY_CONF must be defined to
use XML file format.

Change-Id: I352b788b5829d42ed82c851a4faef0e526be582e
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/Android.mk
udiopolicy/common/managerdefinitions/Android.mk
udiopolicy/common/managerdefinitions/include/AudioCollections.h
udiopolicy/common/managerdefinitions/include/AudioPolicyConfig.h
udiopolicy/common/managerdefinitions/include/AudioPort.h
udiopolicy/common/managerdefinitions/include/ConfigParsingUtils.h
udiopolicy/common/managerdefinitions/include/Serializer.h
udiopolicy/common/managerdefinitions/include/TypeConverter.h
udiopolicy/common/managerdefinitions/include/VolumeCurve.h
udiopolicy/common/managerdefinitions/src/AudioCollections.cpp
udiopolicy/common/managerdefinitions/src/AudioPort.cpp
udiopolicy/common/managerdefinitions/src/ConfigParsingUtils.cpp
udiopolicy/common/managerdefinitions/src/DeviceDescriptor.cpp
udiopolicy/common/managerdefinitions/src/HwModule.cpp
udiopolicy/common/managerdefinitions/src/IOProfile.cpp
udiopolicy/common/managerdefinitions/src/Serializer.cpp
udiopolicy/config/a2dp_audio_policy_configuration.xml
udiopolicy/config/audio_policy_configuration.xml
udiopolicy/config/r_submix_audio_policy_configuration.xml
udiopolicy/config/usb_audio_policy_configuration.xml
udiopolicy/engineconfigurable/Android.mk
udiopolicy/enginedefault/Android.mk
udiopolicy/managerdefault/AudioPolicyManager.cpp
c73e0410c6b931fe598061b2f348834da0a21707 15-Jan-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Disallow dumping clients directly am: c400396525 am: 795243686f am: fb5043a703 am: 3a0d1df37d am: f0b0a7c7bb
am: 715e5cdec7

* commit '715e5cdec771abb372d46813a8b0ab57d47afd99':
Camera: Disallow dumping clients directly
6313e262f90683d46e4bdbe7b59df47c432b5772 15-Jan-2016 Eino-Ville Talvala <etalvala@google.com> resolve merge conflicts of 88b736a198 to lmp-dev. am: 899823966e am: 0fefc974ff am: 295a488e49
am: 1ab7985b88

* commit '1ab7985b88febde58352c7410c26dcca35b7043a':
Camera: Disallow dumping clients directly
295a488e49007fc0493135d5003ec206ecf308b2 15-Jan-2016 Eino-Ville Talvala <etalvala@google.com> resolve merge conflicts of 88b736a198 to lmp-dev. am: 899823966e
am: 0fefc974ff

* commit '0fefc974ff78acd66429b750b7131b0425b1ede3':
Camera: Disallow dumping clients directly
0fefc974ff78acd66429b750b7131b0425b1ede3 15-Jan-2016 Eino-Ville Talvala <etalvala@google.com> resolve merge conflicts of 88b736a198 to lmp-dev.
am: 899823966e

* commit '899823966e78552bb6dfd7772403a4f91471d2b0':
Camera: Disallow dumping clients directly
899823966e78552bb6dfd7772403a4f91471d2b0 14-Jan-2016 Eino-Ville Talvala <etalvala@google.com> resolve merge conflicts of 88b736a198 to lmp-dev.

Change-Id: Iec3cf4fb4bf75be853a1249ee1439eb4c5b38b50
715e5cdec771abb372d46813a8b0ab57d47afd99 14-Jan-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Disallow dumping clients directly am: c400396525 am: 795243686f am: fb5043a703 am: 3a0d1df37d
am: f0b0a7c7bb

* commit 'f0b0a7c7bb61d6ea9f8f89c55368529711d18e1a':
Camera: Disallow dumping clients directly
3a0d1df37df09b0fbbc7b9768c6f7d530fd7a024 14-Jan-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Disallow dumping clients directly am: c400396525 am: 795243686f
am: fb5043a703

* commit 'fb5043a703f596b7393c1e24ca4b321b0f697293':
Camera: Disallow dumping clients directly
fb5043a703f596b7393c1e24ca4b321b0f697293 14-Jan-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Disallow dumping clients directly am: c400396525
am: 795243686f

* commit '795243686fe2e1c352732b47bcdb6ea9e9e7e39e':
Camera: Disallow dumping clients directly
88b736a198fb29ffa946b10d0ed993bf15e77a98 14-Jan-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Disallow dumping clients directly
am: c9ab2b0bb0

* commit 'c9ab2b0bb05a7e19fb057e79b36e232809d70122':
Camera: Disallow dumping clients directly
795243686fe2e1c352732b47bcdb6ea9e9e7e39e 14-Jan-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Disallow dumping clients directly
am: c400396525

* commit 'c4003965258404a19b99280ac0f475e2f290bf27':
Camera: Disallow dumping clients directly
5a94f6f199e261c235a05f6b066aa53078962e93 14-Jan-2016 Eino-Ville Talvala <etalvala@google.com> Merge "CameraService: Further fixes to default camera counts"
74a930b2bb7c61c25232c4f06b67abdbeaca8116 14-Jan-2016 Jeffrey Vander Stoep <jeffv@google.com> Merge "mediaex: add seccomp filter for x86"
e1c8f4e3c1b181a658f0bd69ee0b5a6de8309dc6 14-Jan-2016 Jeffrey Vander Stoep <jeffv@google.com> Merge "mediaex: reorder and reduce seccomp filter"
c4003965258404a19b99280ac0f475e2f290bf27 13-Jan-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Disallow dumping clients directly

Camera service dumps should only be initiated through
ICameraService::dump.

Bug: 26265403
Change-Id: If3ca4718ed74bf33ad8a416192689203029e2803
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/Camera2Client.h
amera/libcameraservice/api1/CameraClient.cpp
amera/libcameraservice/api1/CameraClient.h
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
amera/libcameraservice/common/Camera2ClientBase.cpp
amera/libcameraservice/common/Camera2ClientBase.h
c9ab2b0bb05a7e19fb057e79b36e232809d70122 13-Jan-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Disallow dumping clients directly

Camera service dumps should only be initiated through
ICameraService::dump.

Bug: 26265403
Change-Id: If3ca4718ed74bf33ad8a416192689203029e2803
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/Camera2Client.h
amera/libcameraservice/api1/CameraClient.cpp
amera/libcameraservice/api1/CameraClient.h
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
amera/libcameraservice/api_pro/ProCamera2Client.cpp
amera/libcameraservice/api_pro/ProCamera2Client.h
amera/libcameraservice/common/Camera2ClientBase.cpp
amera/libcameraservice/common/Camera2ClientBase.h
aacf27a10488604ce755a79cd7744cca32725f80 13-Jan-2016 Jeff Vander Stoep <jeffv@google.com> mediaex: reorder and reduce seccomp filter

Remove syscalls that are only used before seccomp filter is applied.

Reorder filter based on syscall frequency using a much longer strace
of mediaextractor and its children.

Change-Id: I7e74e9dcbd0c197b0fe4a935f915feb14036b721
ediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-arm.policy
95bab28c0e6d63c262131663184ea05ef4f5251b 08-Jan-2016 Jeff Vander Stoep <jeffv@google.com> mediaex: add seccomp filter for x86

Filter organized by frequency of syscall for optimal performance.

Change-Id: Ib774cd8e2cca9f2de50caefca7d7f09eeaa371f6
ediaextractor/Android.mk
ediaextractor/minijail/Android.mk
ediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-x86.policy
b1501e2917d94ec0fff6959cbdcf2db84b97f4b0 13-Jan-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: set mNumberOfNormalCameras correctly am: 6dd6c54651 am: 72bc40dc51
am: 6258d848c5

* commit '6258d848c52d36e804977c3007a968ad823b9244':
Camera: set mNumberOfNormalCameras correctly
72bc40dc51911c2f3860b67c8aea57082a4c0bb2 13-Jan-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: set mNumberOfNormalCameras correctly
am: 6dd6c54651

* commit '6dd6c546513aa18dc1d7fba0f72d670edce34f77':
Camera: set mNumberOfNormalCameras correctly
b51b4a650df14daae2e9fbf14643185da19db9bc 13-Jan-2016 Jeff Vander Stoep <jeffv@google.com> mediaextractor: allow gettid call

Addresses:
media.extractor: libminijail: blocked syscall: gettid

Change-Id: I4da1835308012fe87c989ec75f3537ba12763b3c
ediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-arm.policy
954225da1347cde407b899c94069d032a72662f4 13-Jan-2016 Dongwon Kang <dwkang@google.com> Merge "Add a way for SystemUI to receive media resource (e.g. A/V codec) usage"
6dd6c546513aa18dc1d7fba0f72d670edce34f77 07-Dec-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: set mNumberOfNormalCameras correctly

Need to set the number correctly when a camera HAL is not present.

Bug: 25951590
Change-Id: I666acf7a2a523c51f2c2ae88ff690ca9dccda08c
amera/libcameraservice/CameraService.cpp
d55d0bee625d4bb02d72fcd91d40fc30e1f87b86 13-Jan-2016 Eino-Ville Talvala <etalvala@google.com> Merge "libcameraservice: Allow media server to disconnect camera even unlocked" am: a68b10a49b
am: f615179ee4

* commit 'f615179ee48bb11a27426d60f76845764cf00f75':
libcameraservice: Allow media server to disconnect camera even unlocked
3432236e09331ae4c6e94d9850e679f3c1d8ae01 13-Jan-2016 Eric Laurent <elaurent@google.com> Merge "audioflinger: fix standby delay on A2DP output" into mnc-dr1.5-dev am: eb65c5f77b
am: 1571b63e1f

* commit '1571b63e1f1749004d51e9b8dda339a769c7ef39':
audioflinger: fix standby delay on A2DP output
c16bf1d9e8ccdd27327e988d50f5b9640e5406f8 13-Jan-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "AudioPolicy: callback for recording configuration change"
49c9705a7987b94bd53fddd4834f5f534cf946f7 12-Jan-2016 Eino-Ville Talvala <etalvala@google.com> CameraService: Further fixes to default camera counts

At least one section of code still doesn't clear the camera
counts correctly on error, so ensure that they always start at 0.

Also include normal camera count in dumpsys, and remove unnecessary
initializers in the constructor.

Change-Id: Ib891bd37ab5f74b43d5d31b24ac23fa0b11434b3
amera/libcameraservice/CameraService.cpp
f615179ee48bb11a27426d60f76845764cf00f75 12-Jan-2016 Eino-Ville Talvala <etalvala@google.com> Merge "libcameraservice: Allow media server to disconnect camera even unlocked"
am: a68b10a49b

* commit 'a68b10a49b4aba786bdee692e48783acdb25ff60':
libcameraservice: Allow media server to disconnect camera even unlocked
113efbb3ac8e7306ea8645cb53a96d1e81c2d041 09-Jan-2016 Eric Laurent <elaurent@google.com> audioflinger: fix standby delay on A2DP output

Make sure that standby delay is never less than the audio flinger
default on A2DP output.
Due to variable latency and amount of buffering in A2DP sinks,
an agressive standby delay could lead to truncated audio.

Bug: 25830539.
Change-Id: I38be37ad346f5f4bf8303d3db4e3e911bf637968
(cherry picked from commit 42537be61479e59c4718e1304364551c1454f63c)
udioflinger/Threads.cpp
fe508d3a7a151c20fd2942dae2328f02fc1c1464 15-Dec-2015 Dongwon Kang <dwkang@google.com> Add a way for SystemUI to receive media resource (e.g. A/V codec) usage

Bug: 26175834
Change-Id: I45385763b355297d8bfed2d3be7e4e70db86a7fc
ediaresourcemanager/ResourceManagerService.cpp
418f4d1350da8931853a616d4da180978c6bb971 27-May-2014 Wang, Jianfeng XA <jianfeng.xa.wang@sonymobile.com> libcameraservice: Allow media server to disconnect camera even unlocked

The camera service may fail to release the camera hardware instance
in some use cases.
When an application unlocked the camera before disconnect, disconnect
from the application will not be accepted. And disconnect from media
server will not be accepted also. Then, the camera hardware instance
will not be released and a resource leak will be caused.

Allow media server to disconnect the camera at all times even if
the camera is unlocked.

Change-Id: Icd5ed81bed242fa5947aa40ca85e4ca7fa7286e7
amera/libcameraservice/api1/CameraClient.cpp
197f766a0e3c37efe4fe941553511c6022cf10b1 12-Jan-2016 Eric Laurent <elaurent@google.com> Merge "audioflinger: fix standby delay on A2DP output"
42537be61479e59c4718e1304364551c1454f63c 09-Jan-2016 Eric Laurent <elaurent@google.com> audioflinger: fix standby delay on A2DP output

Make sure that standby delay is never less than the audio flinger
default on A2DP output.
Due to variable latency and amount of buffering in A2DP sinks,
an agressive standby delay could lead to truncated audio.

Bug: 25830539.
Change-Id: I38be37ad346f5f4bf8303d3db4e3e911bf637968
udioflinger/Threads.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
udiopolicy/AudioPolicyInterface.h
udiopolicy/common/managerdefinitions/include/AudioInputDescriptor.h
udiopolicy/common/managerdefinitions/include/AudioSession.h
udiopolicy/common/managerdefinitions/src/AudioSession.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/service/AudioPolicyClientImpl.cpp
udiopolicy/service/AudioPolicyService.cpp
udiopolicy/service/AudioPolicyService.h
6f6376b996fa46e5a853faeaf22e45d28d305192 11-Jan-2016 Jeffrey Vander Stoep <jeffv@google.com> Merge "Revert "disable seccomp""
88e25bfbf22f781225ba6284889194dac498fa4d 11-Jan-2016 Jeffrey Vander Stoep <jeffv@google.com> Revert "disable seccomp"

Confirmed that libminijail checks for seccomp support in
kernel before attempting to apply a filter.

This reverts commit 1ab2f2d0a6208ec9b6bb7e8b130efa9b70737f98.

Change-Id: I33a412bf9c836ca56669bb83506a8774f6607188
ediaextractor/main_extractorservice.cpp
4a9fc960b75e0718193d0df91936b6c6bd4195ae 09-Jan-2016 Dan Willemsen <dwillemsen@google.com> Merge "Don't continuously rebuild mediaextractor"
1a6f80163747fdb5a30c97996a4de7c2b71f9396 09-Jan-2016 Dan Willemsen <dwillemsen@google.com> Don't continuously rebuild mediaextractor

Use LOCAL_REQUIRED_MODULES instead of LOCAL_ADDITIONAL_DEPENDENCIES to
remove the dependency on a phony module. LOCAL_ADDITIONAL_DEPENDENCIES
also rebuilds the objects when the dependency is dirty, instead of just
making sure mediaextractor-seccomp.policy is installed.

Change-Id: I0d21d4e874b55eadaf5dfb395a85c987392250b3
ediaextractor/Android.mk
ediaextractor/minijail/Android.mk
1ab2f2d0a6208ec9b6bb7e8b130efa9b70737f98 09-Jan-2016 Jeff Vander Stoep <jeffv@google.com> disable seccomp

Temporarily disable seccomp filtering.

Change-Id: Ibf7d01f33359be7f15eddefd5cc4ca685cc8971e
ediaextractor/main_extractorservice.cpp
64f1901bdddf464c8f29bed34e3449762873b3e9 09-Jan-2016 Andy Hung <hunga@google.com> Merge "Add setMasterMono and getMasterMono"
38b85c29b5be56e660b162da8a13129ac20f8daf 08-Jan-2016 Jeff Vander Stoep <jeffv@google.com> mediaextractor: allow sched_setscheduler syscall

Addresses:
01-01 00:00:16.942 1583 1621 W media.extractor: libminijail: blocked syscall: sched_setscheduler

Bug: 26465420
Change-Id: Ia00d8484cd0253de203ca62437b1189847d0321d
ediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-arm.policy
2ddee19245641e86bca436dda23a0f5089bf2ab5 19-Dec-2015 Andy Hung <hunga@google.com> Add setMasterMono and getMasterMono

Bug: 15283594
Bug: 22700363
Change-Id: I32dc1fcecf285967a61bd508af3bb299595db57d
udioflinger/FastMixer.cpp
udioflinger/FastMixer.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udiopolicy/AudioPolicyInterface.h
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
udiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/service/AudioPolicyService.h
a3e696da3872250bca66a62d93a3b6114e20c27d 18-Dec-2015 François Gaffie <francois.gaffie@intel.com> audio policy: engine configurable: fix support of multiple devices of same type

The configurable policy is using criteria for the available devices based on
the type. If multiple devices of the same type (as remote submix) are removed
and added, the bit associated to this type within the criterion shall be set
as far as at least one device of this type is connected.
It was not the case, this patch is fixing this issue.

Change-Id: Id6a83b753907a9b0f07bf8552e50ee28e990a83e
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/engineconfigurable/src/Engine.cpp
udiopolicy/engineconfigurable/src/Engine.h
udiopolicy/engineconfigurable/wrapper/ParameterManagerWrapper.cpp
udiopolicy/engineconfigurable/wrapper/include/ParameterManagerWrapper.h
fdb17f649c7480ddd83de9fd99ff48a4166a6acf 16-Dec-2015 François Gaffie <francois.gaffie@intel.com> audio policy: configurable engine: remove unecessary function

The policy plugin does not connect with any HW and does not need to
perform a backward synchronisation at startup. This patch removes
uncessary function linked with this functionality.

Change-Id: Ie0d729f0eb4ea10d9a8450902dabba1fbbf199ef
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/common/managerdefinitions/src/AudioCollections.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/InputSource.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/InputSource.h
udiopolicy/engineconfigurable/parameter-framework/plugin/Strategy.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/Strategy.h
udiopolicy/engineconfigurable/parameter-framework/plugin/Usage.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/Usage.h
754cabcfef43f894a73bb3f7581b6cd4f48fcc95 08-Jan-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: introduce audio route concept"
fe9f9ca670844219b6819de1a7cd51fe245bdbbc 08-Jan-2016 Ricardo Garcia <rago@google.com> Merge "Adding UNPROCESSED to the available audio_sources"
cbb3044d6bfa9ab30c83b67874f40344e29805e1 19-Nov-2015 François Gaffie <francois.gaffie@intel.com> audio policy: introduce audio route concept

As a preambule of introduction of topology concept within
audio policy configuration file, this patch introduces the notion
of audio route, i.e. a link between one sink and one or more sources.
This link may be shareable (mix) or mutual exclusive (mux).

From this route concept, and in order to keep backward compatibility,
the supported device of ioprofile (what will become AudioMixPort) must
be updated.

Change-Id: If078830dbe74b003be4a64c584521df481101294
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/common/managerdefinitions/Android.mk
udiopolicy/common/managerdefinitions/include/AudioCollections.h
udiopolicy/common/managerdefinitions/include/AudioPort.h
udiopolicy/common/managerdefinitions/include/AudioRoute.h
udiopolicy/common/managerdefinitions/include/DeviceDescriptor.h
udiopolicy/common/managerdefinitions/include/HwModule.h
udiopolicy/common/managerdefinitions/include/IOProfile.h
udiopolicy/common/managerdefinitions/src/AudioCollections.cpp
udiopolicy/common/managerdefinitions/src/AudioRoute.cpp
udiopolicy/common/managerdefinitions/src/DeviceDescriptor.cpp
udiopolicy/common/managerdefinitions/src/HwModule.cpp
udiopolicy/common/managerdefinitions/src/IOProfile.cpp
c9132a8606b136b7af47923dea951515c4484605 07-Jan-2016 Glenn Kasten <gkasten@google.com> Merge "Use FCC_2 and FCC_8 to highlight channel count assumptions"
454cb283bb01ba5748a2660d983985ee08418fc8 06-Jan-2016 Jeffrey Vander Stoep <jeffv@google.com> Merge "mediaex: apply seccomp filter"
879db19219c120d424f7d7ad7164c3cfe56124e4 06-Jan-2016 Andy Hung <hunga@google.com> Fix compile warning

Change-Id: I7d88292cbb07b9894ec4c7d60e71f547d93b3c89
udioflinger/AudioFlinger.cpp
cb4432af8dc3abc8dc4cc8e5d6080cc68a862ea1 16-Dec-2015 Glenn Kasten <gkasten@google.com> Use FCC_2 and FCC_8 to highlight channel count assumptions

Bug: 21656069
Change-Id: I7678adaac2c4cb429465e2eef03c1c711e550e99
udioflinger/AudioFlinger.h
udioflinger/FastMixer.cpp
8a397d583a4f4cf24ad88facaf2fd33990cfb811 02-Dec-2015 rago <rago@google.com> Adding UNPROCESSED to the available audio_sources

bug: 25564291
Change-Id: I86d8feda4d687352f98b640819211207a06d6b50
udioflinger/Threads.cpp
udiopolicy/enginedefault/src/Engine.cpp
udiopolicy/service/AudioPolicyEffects.cpp
54cac516ef3d844777fa1023a9a095d3ca382842 22-Dec-2015 Andy Hung <hunga@google.com> Merge "Disable media.log until service is ready"
ce7176868977b0d44b245735bd8d3d8e54e61035 22-Dec-2015 Andy Hung <hunga@google.com> Disable media.log until service is ready

Bug: 26235256
Change-Id: I99dd980d2b6d789347023a19737b7d65b0608267
udioflinger/AudioFlinger.cpp
125c04575a480044e51de97889a2cb844bcab84c 12-Dec-2015 Jeff Vander Stoep <jeffv@google.com> mediaex: apply seccomp filter

We can safely reduce the number of accessible system calls from ~250
down to ~30.

This commit adds a seccomp filter for arm/arm64 devices. Mediaextractor
runs as a 32 bit process so the same filter is used for both arm and
arm64 devices. The filter is arranged by frequency of the systemcall to
provide the best performance.

Most system calls are whitelisted without argument inspection. The
exception is the socket syscall where the first argument is checked to
ensure only domain=AF_LOCAL sockets are allowed - used for logging.

Vendor additions may be appended to the default filter by creating
mediaextractor-seccomp.policy file and pointing BOARD_SECCOMP_POLICY
to the directory where it resides. For example:

create: device/<oem>/<target>/seccomp/mediaextractor-seccomp.policy

with the necessary syscalls. set:
BOARD_SECCOMP_POLICY=device/<oem>/<target>/seccomp
in the device's BoardConfig.mk

Change-Id: I384a43beaa18f10081c15320a795d9d9d0180de4
ediaextractor/Android.mk
ediaextractor/main_extractorservice.cpp
ediaextractor/minijail/Android.mk
ediaextractor/minijail/minijail.cpp
ediaextractor/minijail/minijail.h
ediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-arm.policy
112b0af826aeca45855690b9c105b2cdf9938bbe 19-Nov-2015 François Gaffie <francois.gaffie@intel.com> audio policy: introduction of AudioProfile

In order to be able to declare the possible sample
specifications for an Audio Port (a given format, a list of
sample rates, a list of channels), a new object AudioProfile is
introduced.

Change-Id: Ie3ca3400f05984e7b4132fc7ba90020eb4d998c7
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/common/include/policy.h
udiopolicy/common/managerdefinitions/Android.mk
udiopolicy/common/managerdefinitions/include/AudioPolicyConfig.h
udiopolicy/common/managerdefinitions/include/AudioPort.h
udiopolicy/common/managerdefinitions/include/AudioProfile.h
udiopolicy/common/managerdefinitions/include/ConfigParsingUtils.h
udiopolicy/common/managerdefinitions/include/DeviceDescriptor.h
udiopolicy/common/managerdefinitions/include/TypeConverter.h
udiopolicy/common/managerdefinitions/include/audio_policy_conf.h
udiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioPort.cpp
udiopolicy/common/managerdefinitions/src/AudioProfile.cpp
udiopolicy/common/managerdefinitions/src/ConfigParsingUtils.cpp
udiopolicy/common/managerdefinitions/src/DeviceDescriptor.cpp
udiopolicy/common/managerdefinitions/src/HwModule.cpp
udiopolicy/common/managerdefinitions/src/IOProfile.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
599c758b258cc5da0dba9b530425381facc37d77 08-Dec-2015 Eric Laurent <elaurent@google.com> audio policy: audio sessions on input descriptors

In preparation for concurrent capture, add support for multiple
audio sessions per input stream.

Each session keeps its own properties, open and active reference
counting.

No functional change for now: still one session per input and one active
input at a time.

Bug: 18815985.
Bug: 22702906.

Change-Id: I915a65989a7fd0d3cbe2fcf5a0aee2ea0df5f4f5
udiopolicy/common/managerdefinitions/Android.mk
udiopolicy/common/managerdefinitions/include/AudioInputDescriptor.h
udiopolicy/common/managerdefinitions/include/AudioSession.h
udiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioSession.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
438e7572c83674f4b9e6184f32f3dc94cd50524e 15-Dec-2015 Andy Hung <hunga@google.com> AudioFlinger: change logcat error to warning

Change wakelock token error to warning if AudioServer.java
hasn't issued systemReady() yet (from boot or audioserver died).

Bug: 26069693
Change-Id: I8ab1ec06a30a476e058bf0dde50bfbbc60243570
udioflinger/Threads.cpp
7b279bbc24139ee1e01b58055ca94926ec18e2e9 14-Dec-2015 Eric Laurent <elaurent@google.com> audio policy: remove compilation warnings

Change-Id: I4d41ca903dfbe37066ef20a13ebabaff1e5b7326
udiopolicy/common/managerdefinitions/src/HwModule.cpp
udiopolicy/common/managerdefinitions/src/TypeConverter.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
fd9445e97609756e7ec2e95f66440d76f32068e5 11-Dec-2015 Andy Hung <hunga@google.com> Merge "Run audio services in audioserver instead of mediaserver"
d0ef20e9e91afa734078bc229a5ded8e7e3ab944 09-Dec-2015 Chien-Yu Chen <cychen@google.com> Merge "Camera: Support BufferQueue between Camera and StageFright"
6152b8ce798f3cbb6a737a2b834edf0a33feee6f 09-Dec-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: engine configurable: do not compile example makefile"
b5959c7391ddcede07f0a1c65ae3aaaef02cd45f 03-Dec-2015 François Gaffie <francois.gaffie@intel.com> audio policy: engine configurable: do not compile example makefile

This patch avoids compiling the example makefile of the engine
configurable settings and structure files. It is up to the oem
to have its own makefile with its own structure and settings files.

Change-Id: I735290bff08ca6183da7ea4266ced9206f2bb6a1
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/engineconfigurable/parameter-framework/example/Android.mk
e9154ced1216ceb06a82140ed65051c0397e8abc 07-Dec-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: plumbing for RAW OPAQUE

Bug: 25596619
Change-Id: I0867a36962084bc508aebc89cb910473402a5e09
amera/libcameraservice/common/CameraModule.cpp
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3IOStreamBase.cpp
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3Stream.cpp
654b4bf34361b0166a564d178c11ce98cf561cfa 08-Dec-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix HAL1.0 support

Bug: 26050582
Change-Id: Ic64fb005d7c804dc2b8b9c22fdbe44408646b406
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/common/CameraModule.cpp
8cca0750a84c2d97224c0cfef7cf255308ee80b3 14-Nov-2015 Chien-Yu Chen <cychen@google.com> Camera: Support BufferQueue between Camera and StageFright

Use a BufferQueue between Camera and StageFright to pass video
buffers for Camera HALv3 devices.

CameraSource in StageFright will try to use "buffer queue" mode
if it is supported by the camera device. In "buffer queue" mode,
CameraSource creates a buffer queue and a listener thread to recieve
video buffers from camera device. CameraSource then wraps the
ANWBuffer in MediaBuffer. If the camera device doesn't support
"buffer queue" mode, it falls back to "metadata in video buffer"
mode or "real YUV data" mode.

"Metadata in video buffer" mode is removed from Camera2Client and
only "buffer queue" mode is supported.

Bug: 24511454

Change-Id: Ice833b57bcd8d91852d6415402013f56f3e3970a
amera/libcameraservice/CameraService.h
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/Camera2Client.h
amera/libcameraservice/api1/CameraClient.cpp
amera/libcameraservice/api1/CameraClient.h
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
amera/libcameraservice/api1/client2/StreamingProcessor.h
dcb346b7dc5b88c3e85db8a70bbd6a2fee8192b9 09-Sep-2015 Marco Nelissen <marcone@google.com> Run audio services in audioserver instead of mediaserver

audioflinger, audiopolicy, (fm) radio, soundtrigger moved to audioserver.
medialog is removed from mediaserver.
audioserver has same permissions and rights as mediaserver.

mediaserver is allowed to specify client uid to audioserver.

Subsequent CL will add medialog to audioserver.

TBD: Pare down permissions.

Bug: 24511453
Change-Id: Iccaa08b874a502710d142e72f8abbb3d97c44cfa
udioflinger/AudioFlinger.cpp
udioflinger/ServiceUtilities.cpp
udioflinger/ServiceUtilities.h
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
a6b3ed1b8ee37fe244dfbcbe3dbeda66b55c846d 07-Dec-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: set mNumberOfNormalCameras correctly"
169e8ebba23f461cdb57f10985e044e235457b0a 07-Dec-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: set mNumberOfNormalCameras correctly

Need to set the number correctly when a camera HAL is not present.

Bug: 25951590
Change-Id: I666acf7a2a523c51f2c2ae88ff690ca9dccda08c
amera/libcameraservice/CameraService.cpp
ec1efa072e68a7970c6bca8da0a5d436c30b6196 07-Dec-2015 Jean-Michel Trivi <jmtrivi@google.com> Merge "AudioPolicyManager: AudioInputDescriptor open ref count cleanup"
8fa2458708fa775c2562d836d8f87ac30d5970f4 05-Dec-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: configurable engine: fix dead lock issue"
65bfe916ca972b95f41d7f6cc2566c2e12a3eada 05-Dec-2015 Jean-Michel Trivi <jmtrivi@google.com> AudioPolicyManager: AudioInputDescriptor open ref count cleanup

Always initialize the mOpenRefCount field.
Add functions for management for open ref count.

Change-Id: I0bbd021283047abfebbc108ced68c79e29297f25
udiopolicy/common/managerdefinitions/include/AudioInputDescriptor.h
udiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
8649a34c282954ccb64a507b1085313e3ceafc38 03-Dec-2015 François Gaffie <francois.gaffie@intel.com> audio policy: configurable engine: fix dead lock issue

This patch fixes a dead lock issue within configurable engine
of the audio policy. A clear was calling itself in loop instead
of calling clear on its base class.

Change-Id: I9f7c5f6425fbba36e029664ac130cbeafeca4ddf
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/engineconfigurable/src/Collection.h
udiopolicy/engineconfigurable/src/Stream.cpp
ebdddf82b07fa2c4134c3c00dbbbaa1ad3286726 04-Dec-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: enhancing type conversion helper"
cf52591e7441fcea757ca9090a66dbcdff0a73e3 04-Dec-2015 Eino-Ville Talvala <etalvala@google.com> Merge "CameraService: Remove device HALv2 support, other cleanup"
f8ad572ea6259534dd2a9ef160e59976f5514951 04-Dec-2015 Eric Laurent <elaurent@google.com> Merge "Volume should take VOLUME_MIN_DB value when audio is muted." am: 2e12b68fad am: e04b1e747e
am: a4d6e82d47

* commit 'a4d6e82d474fd8c18d27f879bd8643b918b7af91':
Volume should take VOLUME_MIN_DB value when audio is muted.
a4d6e82d474fd8c18d27f879bd8643b918b7af91 03-Dec-2015 Eric Laurent <elaurent@google.com> Merge "Volume should take VOLUME_MIN_DB value when audio is muted." am: 2e12b68fad
am: e04b1e747e

* commit 'e04b1e747e0c1680836dab71357cb6bd216aa575':
Volume should take VOLUME_MIN_DB value when audio is muted.
e04b1e747e0c1680836dab71357cb6bd216aa575 03-Dec-2015 Eric Laurent <elaurent@google.com> Merge "Volume should take VOLUME_MIN_DB value when audio is muted."
am: 2e12b68fad

* commit '2e12b68fad486445f230fb0435e6d5483047c85c':
Volume should take VOLUME_MIN_DB value when audio is muted.
8cf5cf7c49e6c7cff160149727b17e1ab6015409 10-Nov-2015 Safa Boumaiza <Safax.boumaiza@intel.com> Volume should take VOLUME_MIN_DB value when audio is muted.

Audio can be heard when muting volume as the minimum volume
value takes 0.0f instead of VOLUME_MIN_DB (-758).

This patch fixes the minimum volume value which should be
VOLUME_MIN_DB instead of 0.0f.

Change-Id: I4cb8093b6d9f18e5330ba5f770b9133baa77542f
Signed-off-by: Safa Boumaiza <Safax.boumaiza@intel.com>
Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
udiopolicy/engineconfigurable/src/Stream.cpp
2a4e18da8ee0521a48285643586159946298caef 03-Dec-2015 Glenn Kasten <gkasten@google.com> Merge "Add logging to help diagnose a rare bug"
74721e5cf4b007cfcb644224df1f50a64891a412 03-Dec-2015 Glenn Kasten <gkasten@google.com> Merge "Fix build warnings"
cf6c76583acbac014ba40079ddd3dfa341162e87 03-Dec-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: move device_category type outside volume class"
818da521b6a487518f54614b9eba68957a8d8aeb 02-Dec-2015 Glenn Kasten <gkasten@google.com> Fix build warnings

Change-Id: Ic329a9852589247ed797b6a6cfed735ff3af184a
udioflinger/Threads.cpp
f7d65ee34f64e8fad9c5af3f11da783193caf5f9 02-Dec-2015 Glenn Kasten <gkasten@google.com> Add logging to help diagnose a rare bug

Bug: 25911696
Change-Id: Idca44ed873f0a9fa911e9cb1c3a09b4e7e4f23eb
udioflinger/Threads.cpp
2f90c51d42efa881a9e54e4f4efadf99398304f9 02-Dec-2015 Glenn Kasten <gkasten@google.com> Don't place large objects on the stack

Bug: 25020816
Change-Id: Ife4da9fc3000e645f654f2eb28b37ad3a89d61f9
(cherry picked from commit fc39dd9f653754315df3ff7f76b8a193829a76e8)
udioflinger/Threads.cpp
5fcd6f99944d8722c57d2b2963814a1964ecfedd 27-Nov-2015 François Gaffie <francois.gaffie@intel.com> audio policy: enhancing type conversion helper

This patch updates the conversion helper class (string to/from policy
common types) by adding direction agnostic helper for channels and
formats.
It also adds the support of device category and stream type parsing.

Change-Id: I75d5a77d78bc3aeb2389b424bfb41febbf020f1a
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/common/include/policy.h
udiopolicy/common/managerdefinitions/include/TypeConverter.h
udiopolicy/common/managerdefinitions/src/TypeConverter.cpp
d0609ad390ff8bb1cafebdf363bf1d15e63b949f 01-Dec-2015 François Gaffie <francois.gaffie@intel.com> audio policy: move device_category type outside volume class

This patch prepares the removal of hard coded volume tables by
moving outside volume class the device_category enumeration.

Change-Id: Ic712377898276a39bb782ac0bc7f793cdd7fa8bd
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/common/include/Volume.h
udiopolicy/common/managerdefinitions/include/StreamDescriptor.h
udiopolicy/common/managerdefinitions/src/StreamDescriptor.cpp
udiopolicy/engine/interface/AudioPolicyManagerInterface.h
udiopolicy/engineconfigurable/interface/AudioPolicyPluginInterface.h
udiopolicy/engineconfigurable/parameter-framework/plugin/VolumeProfile.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/VolumeProfile.h
udiopolicy/engineconfigurable/src/Engine.cpp
udiopolicy/engineconfigurable/src/Engine.h
udiopolicy/engineconfigurable/src/Stream.cpp
udiopolicy/engineconfigurable/src/Stream.h
udiopolicy/enginedefault/src/Engine.cpp
udiopolicy/enginedefault/src/Engine.h
udiopolicy/enginedefault/src/Gains.cpp
udiopolicy/enginedefault/src/Gains.h
3f273d10817ddb2f792ae043de692efcdf1988ae 24-Nov-2015 Wei Jia <wjia@google.com> Uses AudioFlinger to signal battery stats for audio.

Bug: 18177221
Change-Id: I704010c037cb99bb74b98798ee8e494fa8bdc875
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
d309fb9c8a2c4564d88fffba19c4e3688e4b862b 25-Nov-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Remove device HALv2 support, other cleanup

HALv2 only ever shipped with Nexus 10, and has been fully superceded by
HALv3. Remove it to allow for various code simplifications and cleanup.

- Remove Camera2Device
- Remove various special-case codepaths for supporting Camera2Device
- Remove CameraDeviceFactory, since it only creates Camera3Devices now
- Remove BurstCapture and associated CaptureSequence/Parameters code
- Remove old ZslProcessor and simplify ZslProcessor hierarchy to be
just ZslProcessor3, which is renamed to just ZslProcessor
- Add service-init-time check for unsupported device versions
- Fix assorted compiler warnings, some old, some new
- Remove references to HALv2 when possible

Bug: 25866588
Change-Id: Ia1063264d315f9b742ec5cdd0483539310894f5e
amera/libcameraservice/Android.mk
amera/libcameraservice/CameraDeviceFactory.cpp
amera/libcameraservice/CameraDeviceFactory.h
amera/libcameraservice/CameraFlashlight.cpp
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/Camera2Client.h
amera/libcameraservice/api1/client2/BurstCapture.cpp
amera/libcameraservice/api1/client2/BurstCapture.h
amera/libcameraservice/api1/client2/CallbackProcessor.h
amera/libcameraservice/api1/client2/CaptureSequencer.cpp
amera/libcameraservice/api1/client2/CaptureSequencer.h
amera/libcameraservice/api1/client2/FrameProcessor.cpp
amera/libcameraservice/api1/client2/JpegProcessor.cpp
amera/libcameraservice/api1/client2/JpegProcessor.h
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
amera/libcameraservice/api1/client2/StreamingProcessor.h
amera/libcameraservice/api1/client2/ZslProcessor.cpp
amera/libcameraservice/api1/client2/ZslProcessor.h
amera/libcameraservice/api1/client2/ZslProcessor3.cpp
amera/libcameraservice/api1/client2/ZslProcessor3.h
amera/libcameraservice/api1/client2/ZslProcessorInterface.cpp
amera/libcameraservice/api1/client2/ZslProcessorInterface.h
amera/libcameraservice/common/Camera2ClientBase.cpp
amera/libcameraservice/common/Camera2ClientBase.h
amera/libcameraservice/common/CameraModule.cpp
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device2/Camera2Device.h
amera/libcameraservice/device3/Camera3Device.cpp
1d4481fb9cb1ea149f79f2a5d22110af84fbc90b 19-Nov-2015 François Gaffie <francois.gaffie@intel.com> audio policy: clarify tag and name for device description

In preparation to introduction of topology within policy configuration
file, this patch clarifies the meaning of tag and name attributes of a
device.

Change-Id: I8db58be939823e87aa05b991e2afe0762eb741ca
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/common/managerdefinitions/include/AudioPolicyConfig.h
udiopolicy/common/managerdefinitions/include/AudioPort.h
udiopolicy/common/managerdefinitions/include/DeviceDescriptor.h
udiopolicy/common/managerdefinitions/src/ConfigParsingUtils.cpp
udiopolicy/common/managerdefinitions/src/DeviceDescriptor.cpp
udiopolicy/common/managerdefinitions/src/HwModule.cpp
a8ecc2c72ca26389bd6b0162181d60aaeaca8149 09-Nov-2015 François Gaffie <francois.gaffie@intel.com> audio policy: remove deserialization from policy objects

This patch removes the responsability of the deserialization of all
objects managed by the policy by:
-adding required accessors
-moving deserialization function to Config parser helper
-adds a TypeConverter to associate string to / from values of all
audio enumeration shared between HALs and policy.

Change-Id: I1ce798848f4657b37e47446c9fbdc63f7ed0390e
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/Android.mk
udiopolicy/common/managerdefinitions/Android.mk
udiopolicy/common/managerdefinitions/include/AudioGain.h
udiopolicy/common/managerdefinitions/include/AudioPolicyConfig.h
udiopolicy/common/managerdefinitions/include/AudioPort.h
udiopolicy/common/managerdefinitions/include/ConfigParsingUtils.h
udiopolicy/common/managerdefinitions/include/DeviceDescriptor.h
udiopolicy/common/managerdefinitions/include/HwModule.h
udiopolicy/common/managerdefinitions/include/IOProfile.h
udiopolicy/common/managerdefinitions/include/TypeConverter.h
udiopolicy/common/managerdefinitions/include/audio_policy_conf.h
udiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioPatch.cpp
udiopolicy/common/managerdefinitions/src/AudioPort.cpp
udiopolicy/common/managerdefinitions/src/ConfigParsingUtils.cpp
udiopolicy/common/managerdefinitions/src/DeviceDescriptor.cpp
udiopolicy/common/managerdefinitions/src/HwModule.cpp
udiopolicy/common/managerdefinitions/src/IOProfile.cpp
udiopolicy/common/managerdefinitions/src/TypeConverter.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
a1f03967caf8036b6b928155dbc4a9696c465353 05-Nov-2015 Sanket Agarwal <sanketa@google.com> Merge "Add features for Automotive usecases."
7a564a0e201d8ddc7cc7b7a7202adf017b4e4836 05-Nov-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: add support for external audio sources"
f639ba1fdd4fd51d7ab97d2d8891a510615645f3 12-Oct-2015 Sanket Agarwal <sanketa@google.com> Add features for Automotive usecases.

1. Add support for emergency announcements - If the CAR wants to make an
emergency announcements.

Change-Id: Id4394e9ebce09d08ea4a4922032393bf2c2cddf4
(cherry picked from commit b0e3867fc5bdb09d18aeb0f111998852aeaf7f86)
adio/RadioService.cpp
7e7a62dc6c20b5ff761b87d99379797aa3fd7d9d 04-Nov-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Add option to dump templates to HALv3 devices

Add -t to dumpsys media.camera to dump the request templates of any open
HALv3 camera devices.

Change-Id: Ib2746d5ca4a25e7f8eab842e6a99daa03f15acb8
amera/libcameraservice/device3/Camera3Device.cpp
ebab3587f58316cdb488d44b9c17c35382fc8473 04-Nov-2015 Marco Nelissen <marcone@google.com> Remove unused method

Change-Id: I1732bf5a011b052588b5fa4f41d4723a1af8d320
ediaextractor/MediaExtractorService.cpp
ediaextractor/MediaExtractorService.h
74e0f3a620bd0cdfb153728e99a17a96ca3db0de 03-Nov-2015 Bill Yi <byi@google.com> Merge commit 'f71d2618532e73db5c01e3c00595d7d2ab2cff3e' into HEAD
e9932d5bf2c1b1a8758f5f79c43e04c6c7dbe932 02-Nov-2015 Makoto Onuki <omakoto@google.com> Merge "Remove "sys.secpolicy.camera.off_" system property check"
57f2cc1fa8165974df15bcdcaf215cc2c0c11216 02-Nov-2015 Gaurav Shah <gauravsh@google.com> Merge "audio: Change the default init value for StreamDescriptor" am: 2e5591958b am: 1d1449297e
am: bbed3af44a

* commit 'bbed3af44a9ac40a15f3c0759cef33d06d1f93b4':
audio: Change the default init value for StreamDescriptor
8aacfffa600d86e721142b04caa39c0b951530ea 02-Nov-2015 Ronghua Wu <ronghuawu@google.com> Merge "Reduce lock time for dump to make sure not locked when calling back to IResourceManagerClient." into mnc-dr-dev am: 83a22c5c81 am: 5c52a558bd
am: b0f5b51f3d

* commit 'b0f5b51f3d80229a985456f520936d20e64598ce':
Reduce lock time for dump to make sure not locked when calling back to IResourceManagerClient.
bbed3af44a9ac40a15f3c0759cef33d06d1f93b4 02-Nov-2015 Gaurav Shah <gauravsh@google.com> Merge "audio: Change the default init value for StreamDescriptor" am: 2e5591958b
am: 1d1449297e

* commit '1d1449297e6ea4cd76119e284807f5e2b9187743':
audio: Change the default init value for StreamDescriptor
1d1449297e6ea4cd76119e284807f5e2b9187743 02-Nov-2015 Gaurav Shah <gauravsh@google.com> Merge "audio: Change the default init value for StreamDescriptor"
am: 2e5591958b

* commit '2e5591958b5fe897f37715145e86bf8afbde0911':
audio: Change the default init value for StreamDescriptor
b0f5b51f3d80229a985456f520936d20e64598ce 02-Nov-2015 Ronghua Wu <ronghuawu@google.com> Merge "Reduce lock time for dump to make sure not locked when calling back to IResourceManagerClient." into mnc-dr-dev am: 83a22c5c81
am: 5c52a558bd

* commit '5c52a558bd76396431846340970bc516c9ed9c2a':
Reduce lock time for dump to make sure not locked when calling back to IResourceManagerClient.
83a22c5c818ebf4f9c80a2dd3fee49258e0c33a6 02-Nov-2015 Ronghua Wu <ronghuawu@google.com> Merge "Reduce lock time for dump to make sure not locked when calling back to IResourceManagerClient." into mnc-dr-dev
5664139e0ae16bb180a8eaae917f35f7c99d2a0a 09-Oct-2015 Ralph Nathan <ralphnathan@google.com> audio: Change the default init value for StreamDescriptor

Currently, audio doesn't play on Brillo because the policy manager's
default value for all streams is set to 0. In Android, this value is
changed by calls from AudioService.java. If we set the default value to
1 in Brillo, then even if there are no calls, we will have audio.

BUG=none
TEST=manual

Change-Id: I1418c9ecfb4f1c81c9c0946eee11deed3c65b358
udiopolicy/common/managerdefinitions/src/StreamDescriptor.cpp
11fe1acb608d4dcd86b06c9ccd876864beebf4d4 30-Oct-2015 Wonsik Kim <wonsik@google.com> Merge "APM: Don't copy invalid gain value"
60d156247a7189d59af0a3643e2a786dacef734d 29-Oct-2015 Wonsik Kim <wonsik@google.com> APM: Don't copy invalid gain value

Bug: 24775316
Change-Id: I0c439a78909c03ca2b0340c67bfb969de2283166
udiopolicy/common/managerdefinitions/src/AudioPort.cpp
d60560af7cb559762593161c8202459cc01fb0f5 10-Apr-2015 Eric Laurent <elaurent@google.com> audio policy: add support for external audio sources

Add support for activity on external audio sources.
An external source reflects activity on an input audio device
that must be controlled (both routing and volume) by the
audio policy manager.
First, the input device must be connected with setDeviceConnectionState().
Then, the source activity is indicated with startAudioSource() and
stopAudioSource() APIs.
startAudioSource() indicates the source device with an audio port configuration
and the use case by the audio attributes.

Once a source is active, its routing and volume are controlled by the policy manager
as it would for a software source (AudioTrack).

Change-Id: If5805d58a4356b2f681f1aabf54375f62b55b98a
udioflinger/PatchPanel.cpp
udioflinger/Threads.cpp
udiopolicy/AudioPolicyInterface.h
udiopolicy/common/managerdefinitions/Android.mk
udiopolicy/common/managerdefinitions/include/AudioOutputDescriptor.h
udiopolicy/common/managerdefinitions/include/AudioSourceDescriptor.h
udiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioSourceDescriptor.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
e9ccb98fc7259cbd876f02381b0eec4d5a5ff4ff 29-Oct-2015 Makoto Onuki <omakoto@google.com> Remove "sys.secpolicy.camera.off_" system property check

With I421690f14ee57fa818d2b233fe48a90a0a575a9e, now the device policy camera
restrictions will be propagated with a user restriction via appops, so the
system property check is no longer needed.

Bug 24538855

Change-Id: I7b034c0d49b834e570c758315df6a0163f64af4e
amera/libcameraservice/CameraService.cpp
0443ba44a1ebda31bc3642cd91a0570694f29ec1 29-Oct-2015 Eric Laurent <elaurent@google.com> Merge "AudioPolicyService: Synchronize access to AudioPolicyManager" am: 60cf8e8925 am: 62ac714617
am: f71d261853

* commit 'f71d2618532e73db5c01e3c00595d7d2ab2cff3e':
AudioPolicyService: Synchronize access to AudioPolicyManager
f71d2618532e73db5c01e3c00595d7d2ab2cff3e 29-Oct-2015 Eric Laurent <elaurent@google.com> Merge "AudioPolicyService: Synchronize access to AudioPolicyManager" am: 60cf8e8925
am: 62ac714617

* commit '62ac714617c3c994619afdc0666ac3359d8084e7':
AudioPolicyService: Synchronize access to AudioPolicyManager
62ac714617c3c994619afdc0666ac3359d8084e7 29-Oct-2015 Eric Laurent <elaurent@google.com> Merge "AudioPolicyService: Synchronize access to AudioPolicyManager"
am: 60cf8e8925

* commit '60cf8e892519b84bd5aa2c7ef8027304382ac4b0':
AudioPolicyService: Synchronize access to AudioPolicyManager
60cf8e892519b84bd5aa2c7ef8027304382ac4b0 29-Oct-2015 Eric Laurent <elaurent@google.com> Merge "AudioPolicyService: Synchronize access to AudioPolicyManager"
518bcf5f68e56467cfc693be0fd58170c62e6ba0 04-Sep-2015 Eino-Ville Talvala <etalvala@google.com> DO NOT MERGE: CameraService: Link to client binder death at end of connect

If, within a binder Looper thread, a Binder object death notifier is
registered, and then a nested Binder transaction is begun, that
transaction may process a death notification callback for the
just-registered object, if it was dead at the time of registration.

This can lead to an unexpected nested call into the service, and cause
deadlock.

To avoid this, move the death notifier registration to the end of
handling the connect transaction.

Also remove one extra bit of disconnect logging.

Bug: 23525545
Change-Id: If01cbaf42704f55134118afefc9a8f7bdb014e09
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
dfb9f3b053fa8ff7e622783a2040953442c44700 27-Oct-2015 Haynes Mathew George <hgeorge@codeaurora.org> AudioPolicyService: Synchronize access to AudioPolicyManager

Synchronize access to APM when getDevicesForStream is called
on APM.

Change-Id: I2ba6922341f035375270b02000ef5a7e078f6b5a
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
a2ce3c173951845c1305099314451a2f99123b05 23-Sep-2015 Eric Laurent <elaurent@google.com> AudioPolicyService: fix race in AudioCommandThread

Fixe race condition in AudioCommandThread::threadLoop() where a
command can be inserted in first position in the queue after the sleep
time has been calculated causing a longer delay than expected.

Also fix a failure to hold a wake lock while commands are still in the queue.

Bug: 22707905.
Change-Id: I813626986677bf00106acb37ee20d3dd75d5cf33
udiopolicy/service/AudioPolicyService.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
ediaextractor/Android.mk
ediaextractor/MODULE_LICENSE_APACHE2
ediaextractor/MediaExtractorService.cpp
ediaextractor/MediaExtractorService.h
ediaextractor/NOTICE
ediaextractor/main_extractorservice.cpp
ediaextractor/mediaextractor.rc
f8e21a06c1b559757f1c6846b1a1abd29874cbeb 27-Oct-2015 Zach Jang <zachjang@google.com> Merge "Revert "Revert "audio policy: bind setMode() and setPhoneState() operations""" into mnc-dev am: 681bc45d25 am: f6224dece5 am: 5f2a15a617
am: 6360955a0b

* commit '6360955a0b34e7c48d9471c766ba6d5ca0051d97':
Revert "Revert "audio policy: bind setMode() and setPhoneState() operations""
57a34a5163fa995b5d4827d60d9ebdb1881b11df 27-Oct-2015 Zach Jang <zachjang@google.com> Merge "Revert "Revert "AudioPolicyService: fix race in AudioCommandThread""" into mnc-dev am: 6919fbe40d am: 8c5b71ce47 am: 2fb59515d4
am: 77249c550f

* commit '77249c550ffc97b5f92150d544e661e17d530332':
Revert "Revert "AudioPolicyService: fix race in AudioCommandThread""
6360955a0b34e7c48d9471c766ba6d5ca0051d97 27-Oct-2015 Zach Jang <zachjang@google.com> Merge "Revert "Revert "audio policy: bind setMode() and setPhoneState() operations""" into mnc-dev am: 681bc45d25 am: f6224dece5
am: 5f2a15a617

* commit '5f2a15a617a41a300fa2b3d3c2abb77ec7381ee1':
Revert "Revert "audio policy: bind setMode() and setPhoneState() operations""
77249c550ffc97b5f92150d544e661e17d530332 27-Oct-2015 Zach Jang <zachjang@google.com> Merge "Revert "Revert "AudioPolicyService: fix race in AudioCommandThread""" into mnc-dev am: 6919fbe40d am: 8c5b71ce47
am: 2fb59515d4

* commit '2fb59515d44d2ce68db29b5d88476ee6a3282b2f':
Revert "Revert "AudioPolicyService: fix race in AudioCommandThread""
f6224dece52c569e27322580407c3f5898fa042b 27-Oct-2015 Zach Jang <zachjang@google.com> Merge "Revert "Revert "audio policy: bind setMode() and setPhoneState() operations""" into mnc-dev
am: 681bc45d25

* commit '681bc45d2592ed447f70d1dd14e92ad584499c9d':
Revert "Revert "audio policy: bind setMode() and setPhoneState() operations""
8c5b71ce473517ea1270f6467fa518274bd54b35 27-Oct-2015 Zach Jang <zachjang@google.com> Merge "Revert "Revert "AudioPolicyService: fix race in AudioCommandThread""" into mnc-dev
am: 6919fbe40d

* commit '6919fbe40d92af432d3b72ad36e0697654f8146c':
Revert "Revert "AudioPolicyService: fix race in AudioCommandThread""
7f5d179babc1dbd4a9859da92fa43a89f14ce853 27-Oct-2015 Zach Jang <zachjang@google.com> Merge "Revert "AudioPolicyService: fix race in AudioCommandThread"" into mnc-dev am: cda4871486 am: 1fcbd9b0e9 am: dee38ac0da
am: e44a9c0666

* commit 'e44a9c0666b3861eb2676ddf91cbeb5ecd5b23a5':
Revert "AudioPolicyService: fix race in AudioCommandThread"
0e15f1f817cad0623a719fd8871067ad1f5b8eb9 27-Oct-2015 Zach Jang <zachjang@google.com> Merge "Revert "audio policy: bind setMode() and setPhoneState() operations"" into mnc-dev am: be6f10c049 am: fd16414d34 am: d53f955a4f
am: 14c54bbf9c

* commit '14c54bbf9c739c8d611e5dc8990a5d220d135956':
Revert "audio policy: bind setMode() and setPhoneState() operations"
e44a9c0666b3861eb2676ddf91cbeb5ecd5b23a5 27-Oct-2015 Zach Jang <zachjang@google.com> Merge "Revert "AudioPolicyService: fix race in AudioCommandThread"" into mnc-dev am: cda4871486 am: 1fcbd9b0e9
am: dee38ac0da

* commit 'dee38ac0da6716903f039166d621184d67c8afd3':
Revert "AudioPolicyService: fix race in AudioCommandThread"
14c54bbf9c739c8d611e5dc8990a5d220d135956 27-Oct-2015 Zach Jang <zachjang@google.com> Merge "Revert "audio policy: bind setMode() and setPhoneState() operations"" into mnc-dev am: be6f10c049 am: fd16414d34
am: d53f955a4f

* commit 'd53f955a4f8dcc47057c3542542f6da5804fdaf0':
Revert "audio policy: bind setMode() and setPhoneState() operations"
1fcbd9b0e973d662ed566967af71c8f5b2383320 27-Oct-2015 Zach Jang <zachjang@google.com> Merge "Revert "AudioPolicyService: fix race in AudioCommandThread"" into mnc-dev
am: cda4871486

* commit 'cda487148602325701ffd7f595ca096a182f380c':
Revert "AudioPolicyService: fix race in AudioCommandThread"
fd16414d341b1c104068c489103aeb2ddb8995e6 27-Oct-2015 Zach Jang <zachjang@google.com> Merge "Revert "audio policy: bind setMode() and setPhoneState() operations"" into mnc-dev
am: be6f10c049

* commit 'be6f10c049086453cc53b8e50c5d497bb5b3ae05':
Revert "audio policy: bind setMode() and setPhoneState() operations"
3994ffdd2c280aa5fad9f3c41255371cd545c7cf 27-Oct-2015 Zach Jang <zachjang@google.com> Revert "Revert "audio policy: bind setMode() and setPhoneState() operations""

This reverts commit 26ce11a1dd2a9b70865aec1b42c365dd19172511.

Change-Id: I0affb97e7f2eb541ebd6f26c33e8f32261e9e221
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
a754b4fa874f97a51ed2bee9257f2a870effe619 27-Oct-2015 Zach Jang <zachjang@google.com> Revert "Revert "AudioPolicyService: fix race in AudioCommandThread""

This reverts commit 75c82b50951b21190f710a638c6a26ff7ee6d86d.

Change-Id: I1b1f147bedf205636ec20b84faf6ef597a781c0d
udiopolicy/service/AudioPolicyService.cpp
26ce11a1dd2a9b70865aec1b42c365dd19172511 27-Oct-2015 Zach Jang <zachjang@google.com> Revert "audio policy: bind setMode() and setPhoneState() operations"

This reverts commit 9ddf1c76121caef55a05c537d6a9a1d76c1d17be.

Change-Id: I860ecc288a1798605dff46f39107f4450ca5cd56
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
75c82b50951b21190f710a638c6a26ff7ee6d86d 27-Oct-2015 Zach Jang <zachjang@google.com> Revert "AudioPolicyService: fix race in AudioCommandThread"

This reverts commit 74ce88ff0f24a8c08fdab3a1140212183089c2b5.

Change-Id: I39114c8cdd3021951ba93716aaa0c1c03e68538d
udiopolicy/service/AudioPolicyService.cpp
76d4c7ffa9cdeed39c93d685c9c03b0915262a8b 24-Oct-2015 Ronghua Wu <ronghuawu@google.com> Reduce lock time for dump to make sure not locked when calling back to IResourceManagerClient.

Bug: 25166048
Change-Id: I35f9917079c4b783a7cf4cef94b3c7112760c0b8
ediaresourcemanager/ResourceManagerService.cpp
55a4d0bdf185b0cf7e37ca0446e4e5046cef5534 22-Oct-2015 Ian Pedowitz <ijpedowitz@google.com> Merge "DO NOT MERGE: libcameraservice: Fix nullptr crash when no client." into mnc-dr-dev am: c0d8c35a2d
am: 80ad49403e

* commit '80ad49403ede54092e128ddf9f1fe2ef7bc53944':
DO NOT MERGE: libcameraservice: Fix nullptr crash when no client.
5adc76c49a525993f3362cf648864fb21f4547f0 08-Oct-2015 Tom Keel <thomas.keel@intel.com> DO NOT MERGE: libcameraservice: Fix nullptr crash when no client.

This change prevents a crash in the camera service when the camera
HAL notifies the service about the absence of a removable camera and
there happens to be no client connected to the service. It checks
that the pointer returned from clientToDisconnect.get() is non-null
before trying to dereference it (as is done in existing code
immediately below this change).

Bug: 25165323
Change-Id: I8055654bac980542e63ea7f52bf897eaafbc09bc
Signed-off-by: Tom Keel <thomas.keel@intel.com>
amera/libcameraservice/CameraService.cpp
a1293bb4bc9c838df9452c6034c99fac0180dff8 21-Oct-2015 Eino-Ville Talvala <etalvala@google.com> Merge "libcameraservice: Fix nullptr crash when no client."
am: 4fbcb985a1

* commit '4fbcb985a1804ca407f5f68267942c037a919a2a':
libcameraservice: Fix nullptr crash when no client.
056c93eb51a8cacace5b515a3046e8e5fc0a5824 08-Oct-2015 Tom Keel <thomas.keel@intel.com> libcameraservice: Fix nullptr crash when no client.

This change prevents a crash in the camera service when the camera
HAL notifies the service about the absence of a removable camera and
there happens to be no client connected to the service. It checks
that the pointer returned from clientToDisconnect.get() is non-null
before trying to dereference it (as is done in existing code
immediately below this change).

Change-Id: I8055654bac980542e63ea7f52bf897eaafbc09bc
Signed-off-by: Tom Keel <thomas.keel@intel.com>
amera/libcameraservice/CameraService.cpp
2d3e2892f1640ad9fa18f70e2152cf10fa43f933 19-Oct-2015 Ranjith Kagathi Ananda <ranjith@codeaurora.org> am fc7b5a4a: am a04159ac: libcameraservice: Fix ALOG prints in FlashLight. am: 32ab9fdab5

* commit 'fc7b5a4a10fe8cf02f1a9fd330d06319fcabdb05':
libcameraservice: Fix ALOG prints in FlashLight.
7f03a03a62bb10b99fd194ba864f17e61a73dda7 19-Oct-2015 Ranjith Kagathi Ananda <ranjith@codeaurora.org> am 1d288267: am b4a3c6dd: Camera: frameworks: Add NULL check for callback am: 3e60089468

* commit '1d288267c357e90dd68a1eb43f35db00309cab5a':
Camera: frameworks: Add NULL check for callback
fc7b5a4a10fe8cf02f1a9fd330d06319fcabdb05 19-Oct-2015 Ranjith Kagathi Ananda <ranjith@codeaurora.org> am a04159ac: libcameraservice: Fix ALOG prints in FlashLight. am: 32ab9fdab5

* commit 'a04159acc4c49f13fbfa5b5bee5e5b622eb2d659':
libcameraservice: Fix ALOG prints in FlashLight.
1d288267c357e90dd68a1eb43f35db00309cab5a 19-Oct-2015 Ranjith Kagathi Ananda <ranjith@codeaurora.org> am b4a3c6dd: Camera: frameworks: Add NULL check for callback am: 3e60089468

* commit 'b4a3c6dd7e48bc9d3f68c609b2b28abec67d1eeb':
Camera: frameworks: Add NULL check for callback
32ab9fdab562127ccd37a8cdb15421ebdf82a458 09-Oct-2015 Ranjith Kagathi Ananda <ranjith@codeaurora.org> libcameraservice: Fix ALOG prints in FlashLight.

Add missing __FUNCTION__ arguments into log statements.

Ack by: Dilip Gopalakrishna

Bug: 25023187
Change-Id: I0256bad626d490fb9360a73c104afaad7a012a97
amera/libcameraservice/CameraFlashlight.cpp
3e600894685b994849d59307721c6862ae0c45b7 09-Oct-2015 Ranjith Kagathi Ananda <ranjith@codeaurora.org> Camera: frameworks: Add NULL check for callback

--Added NULL check for mRemoteCallback

Ack by: Susmitha Gummalla

Bug: 25023187
Change-Id: Ib88a128a52e81b8ec1052e3222b6d8b9e494afcc
amera/libcameraservice/CameraService.cpp
9ddf1c76121caef55a05c537d6a9a1d76c1d17be 17-Sep-2015 Eric Laurent <elaurent@google.com> audio policy: bind setMode() and setPhoneState() operations

No routing operation should be allowed between setMode() and setPhoneState()
when starting a call as the audio HAL relies on a precise sequence of mode change
and routing change to select the initial audio device for the call.

Bug: 24083591.

Change-Id: I2d5ef62c11cf7aedc2ec7ca5e5fadd7ac875afbc
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
74ce88ff0f24a8c08fdab3a1140212183089c2b5 23-Sep-2015 Eric Laurent <elaurent@google.com> AudioPolicyService: fix race in AudioCommandThread

Fixe race condition in AudioCommandThread::threadLoop() where a
command can be inserted in first position in the queue after the sleep
time has been calculated causing a longer delay than expected.

Also fix a failure to hold a wake lock while commands are still in the queue.

Bug: 22707905.
Change-Id: I813626986677bf00106acb37ee20d3dd75d5cf33
udiopolicy/service/AudioPolicyService.cpp
ce497dabca19d34d46a87598315be885e906871e 17-Oct-2015 Eino-Ville Talvala <etalvala@google.com> am 176a017f: am 25add6d4: am 43c39be5: Merge "ALOGE does not match triggering condition."

* commit '176a017fabaf753db36ffe4a3069447d9df4cf3b':
ALOGE does not match triggering condition.
176a017fabaf753db36ffe4a3069447d9df4cf3b 17-Oct-2015 Eino-Ville Talvala <etalvala@google.com> am 25add6d4: am 43c39be5: Merge "ALOGE does not match triggering condition."

* commit '25add6d481bba37552f0f8b6ed225bed98594034':
ALOGE does not match triggering condition.
25add6d481bba37552f0f8b6ed225bed98594034 17-Oct-2015 Eino-Ville Talvala <etalvala@google.com> am 43c39be5: Merge "ALOGE does not match triggering condition."

* commit '43c39be58651745a55e5d66568f92c03d695b461':
ALOGE does not match triggering condition.
43c39be58651745a55e5d66568f92c03d695b461 17-Oct-2015 Eino-Ville Talvala <etalvala@google.com> Merge "ALOGE does not match triggering condition."
d90d042269d174104cbcddb078f835296571cf87 16-Oct-2015 Eric Laurent <elaurent@google.com> am adf760b9: am fba67941: am 0eb5a270: Merge "audio policy: fix transition from VoIP to voice call on USB" into mnc-dr-dev

* commit 'adf760b98f22597bd0133c67af40d983a3e014c6':
audio policy: fix transition from VoIP to voice call on USB
0eb5a2706de25728f7ad2fd8febf960ca3c5e42d 16-Oct-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: fix transition from VoIP to voice call on USB" into mnc-dr-dev
86803a9be4dbe0c544aff4c44b186433b9efed26 15-Oct-2015 Yin-Chia Yeh <yinchiayeh@google.com> am bb19b792: am abe90449: am ceb10ea7: Merge "Camera: setup vendor tags before get_camera_info" into mnc-dr-dev

* commit 'bb19b792cf51934fd5f4fe989e66255cc8e132a4':
Camera: setup vendor tags before get_camera_info
ceb10ea795d92d889201cd40f5ac6290edf4ded7 15-Oct-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: setup vendor tags before get_camera_info" into mnc-dr-dev
9690bf3690c9b720656cebf6da390800e7395213 15-Oct-2015 Eric Laurent <elaurent@google.com> am 27d07a9a: am 26639898: am 0926aab4: Merge "audio policy: fix USB mic selection for VoIP" into mnc-dr-dev

* commit '27d07a9a0366bab299a4b08c24e9bc4e94d14ac0':
audio policy: fix USB mic selection for VoIP
c0a889f766953b657a5e997bc1362661806d3a19 14-Oct-2015 Eric Laurent <elaurent@google.com> audio policy: fix transition from VoIP to voice call on USB

Make sure no active capture takes place while in call and the
capture device is the same as the call TX device.

Bug: 23977713.

Change-Id: Ia379d5e626c150ea49f0cdd581c881dbf0b8399d
udiopolicy/managerdefault/AudioPolicyManager.cpp
0926aab4b8d5d307c95788086090e8d2b2763f1f 15-Oct-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: fix USB mic selection for VoIP" into mnc-dr-dev
c171c7c47d099a52ade95c3c8d8907bf09bb88fa 25-Sep-2015 Eric Laurent <elaurent@google.com> audio policy: fix USB mic selection for VoIP

When transitioning from speaker phone to normal mode and a USB
headset is connected, we must force a teardown of active input
as the new input device cannot be reached via current input stream.

Bug: 24406915.
Change-Id: I9f7c1d3f3cba285c25a6da1d54a3d15a5c1f378a
udiopolicy/managerdefault/AudioPolicyManager.cpp
454b6785c759a9bcfa33fce1ed27b04a381f9799 15-Oct-2015 Chien-Yu Chen <cychen@google.com> am 2aeef2fd: am 50652c7e: am 5f54de48: Merge "Camera: Add video recording stop sound" into mnc-dr-dev

* commit '2aeef2fdb34575d7981f62bd06936e6e9cee628a':
Camera: Add video recording stop sound
5f54de483624a5731d82060bd3e1aab74b32b15e 15-Oct-2015 Chien-Yu Chen <cychen@google.com> Merge "Camera: Add video recording stop sound" into mnc-dr-dev
77ab176ae7c9158be47c993bc5d7a54b997a15e9 14-Oct-2015 Glenn Kasten <gkasten@google.com> am 149fc59e: am 1f42a6cc: am c57ad1ed: am 55d1ea47: Merge "DO NOT MERGE - AudioFlinger: Clear record buffers when starting RecordThread" into lmp-dev

* commit '149fc59ee66ee84c02e3c705e6264213ab4401a7':
DO NOT MERGE - AudioFlinger: Clear record buffers when starting RecordThread
1f42a6cc1edd96030478a8bc1e05a0ff7710e539 14-Oct-2015 Glenn Kasten <gkasten@google.com> am c57ad1ed: am 55d1ea47: Merge "DO NOT MERGE - AudioFlinger: Clear record buffers when starting RecordThread" into lmp-dev

* commit 'c57ad1ed177ab58ae759a5054d8a14a306715f85':
DO NOT MERGE - AudioFlinger: Clear record buffers when starting RecordThread
5a018d15da438933c30de4b25bcff527331cf8df 14-Oct-2015 Glenn Kasten <gkasten@google.com> am 0f21a688: Merge "DO NOT MERGE - AudioFlinger: Clear record buffers when starting RecordThread" into klp-dev

* commit '0f21a6880e74b56834940a131df912a49b70e82d':
DO NOT MERGE - AudioFlinger: Clear record buffers when starting RecordThread
c57ad1ed177ab58ae759a5054d8a14a306715f85 14-Oct-2015 Glenn Kasten <gkasten@google.com> am 55d1ea47: Merge "DO NOT MERGE - AudioFlinger: Clear record buffers when starting RecordThread" into lmp-dev

* commit '55d1ea47c8aac1d5c6e887e06e8c36bf40eca7d7':
DO NOT MERGE - AudioFlinger: Clear record buffers when starting RecordThread
55d1ea47c8aac1d5c6e887e06e8c36bf40eca7d7 14-Oct-2015 Glenn Kasten <gkasten@google.com> Merge "DO NOT MERGE - AudioFlinger: Clear record buffers when starting RecordThread" into lmp-dev
c7a46eb1538a3ef8d53575084d80f2f3eacd77ba 14-Oct-2015 Chien-Yu Chen <cychen@google.com> Merge "DO NOT MERGE: Fix setTorchMode support for the old HAL version" into mnc-dr-dev
82104ebbb2cc04277ab07b355f38f73045a11770 14-Oct-2015 Chien-Yu Chen <cychen@google.com> Camera: Add video recording stop sound

Add video recording stop sound to match MediaActionSound.

Bug: 24745252
Change-Id: I84b69757c7e0a98abfaafcce5f41dd45fd41cf74
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/CameraClient.cpp
d4a653a15767d4de37dbfdee22c2170951c93299 14-Oct-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: setup vendor tags before get_camera_info

So HAL can use vendor tags on first get_camera_info call.

Bug: 24913201
Change-Id: I73f17de87e3712a27f9cee366995df27a740f5cb
amera/libcameraservice/CameraService.cpp
8a4a0ac6545f53a9ec4af6074caf0e935b08ffbe 14-Sep-2015 Oleksiy Avramchenko <oleksiy.avramchenko@sonymobile.com> DO NOT MERGE: Fix setTorchMode support for the old HAL version

CameraHardwareInterfaceFlashControl class calls disconnectCameraDevice
when torch is disabled. This closes connection to the camera module,
but mDevice instance is kept and variable is non-NULL which will
prevent connection next time torch is going to be enabled.

Bug: 24909924
Change-Id: Icb1ffb07f05256afd92821f0f4908cda5332c05b
amera/libcameraservice/CameraFlashlight.cpp
ea6a3dc069809ec071290eb2c8cacef3582ead98 14-Oct-2015 Eric Laurent <elaurent@google.com> Merge "audioflinger: increase shared memory heap size" into mnc-dr-dev
a578772d9697726dce439d0a00c6814bc9859f75 14-Oct-2015 Chien-Yu Chen <cychen@google.com> am f8b12805: am f339beaf: am 2e1683c4: Merge "Fix setTorchMode support for the old HAL version"

* commit 'f8b1280535a6e3ebcf864d434a01d6c672cadd9a':
Fix setTorchMode support for the old HAL version
f8b1280535a6e3ebcf864d434a01d6c672cadd9a 14-Oct-2015 Chien-Yu Chen <cychen@google.com> am f339beaf: am 2e1683c4: Merge "Fix setTorchMode support for the old HAL version"

* commit 'f339beaf97f4112684c01e40d5ed9f4bfe3270fa':
Fix setTorchMode support for the old HAL version
f339beaf97f4112684c01e40d5ed9f4bfe3270fa 14-Oct-2015 Chien-Yu Chen <cychen@google.com> am 2e1683c4: Merge "Fix setTorchMode support for the old HAL version"

* commit '2e1683c4871faccea74f181194e193cb28016cf3':
Fix setTorchMode support for the old HAL version
aba407f1a6378ac2518d0d76d0d18419b7722a81 21-Aug-2015 Eric Laurent <elaurent@google.com> audioflinger: increase shared memory heap size

Bug: 21093153.
Change-Id: I389af11451b01ce49fdb8957e2f322ba1925a62e
(cherry picked from commit da73b6c7474aaa5616f0214e238776f12717f32b)
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
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
udioflinger/Tracks.cpp
403bff76dbde57fdcfce84292a5e42fa33c37842 13-Oct-2015 Andy Hung <hunga@google.com> am 4c6e77ff: AudioFlinger: Clear record buffers when starting RecordThread

* commit '4c6e77ff8e18a1551320a6b42f6a45e19dcce748':
AudioFlinger: Clear record buffers when starting RecordThread
4c6e77ff8e18a1551320a6b42f6a45e19dcce748 21-Sep-2015 Andy Hung <hunga@google.com> AudioFlinger: Clear record buffers when starting RecordThread

Bug: 24211743
Bug: 24267152
Change-Id: I58c55e56b85067b71e4e300f947b4dfc159637ba
udioflinger/FastCapture.cpp
udioflinger/Threads.cpp
4beea2778db2b9c236761676d105e38d60c675a6 13-Oct-2015 Andy Hung <hunga@google.com> am e5326d96: Merge "DO NOT MERGE - audio policy: fix commit dea1541f" into lmp-dev

* commit 'e5326d965afc8941f85c866ae8dcdc8884c9709c':
DO NOT MERGE - audio policy: fix commit dea1541f
19fdbfcf8af3ca689c3c62b88059ac5d3c6907d1 13-Oct-2015 Hubert Rzezniczak <hubert.rzezniczak@gmail.com> ALOGE does not match triggering condition.

Meeting the condition
if (sceneModeOverrides.count !=
availableSceneModes.count * kModesPerSceneMode) {
results with ALOGE which describes the missmatch.
The description does not match the condition.

Signed-off-by: Hubert Rzezniczak <hubert.rzezniczak@gmail.com>
amera/libcameraservice/api1/client2/Parameters.cpp
741fd4d9070c1dbe9ff297a8a3fc6317c3808482 14-Sep-2015 Oleksiy Avramchenko <oleksiy.avramchenko@sonymobile.com> Fix setTorchMode support for the old HAL version

CameraHardwareInterfaceFlashControl class calls disconnectCameraDevice
when torch is disabled. This closes connection to the camera module,
but mDevice instance is kept and variable is non-NULL which will
prevent connection next time torch is going to be enabled.

Change-Id: Icb1ffb07f05256afd92821f0f4908cda5332c05b
amera/libcameraservice/CameraFlashlight.cpp
29d56072745c91933c416a149900e7d431dd5a84 03-Oct-2015 Chien-Yu Chen <cychen@google.com> am 463e71c6: am fc07d1e6: am 4a8f4a3f: Camera3Device: Change HFR request thread priority to 1

* commit '463e71c6766e68bc042b89c53751095053950c4c':
Camera3Device: Change HFR request thread priority to 1
4a8f4a3f567d8b3134b1c7ab21ca774f279ab9c2 02-Oct-2015 Chien-Yu Chen <cychen@google.com> Camera3Device: Change HFR request thread priority to 1

Based on periods of the request thread and audio threads with
SCHED_FIFO policy, 1 is a more reasonable priority for HFR
request thread.

Bug: 24427480
Change-Id: I91f0066a0e114fc83abcc6a604ecbaa72c6a34e8
amera/libcameraservice/device3/Camera3Device.h
921c7dffbd7f594b13688abae363d562eaefa8a0 01-Oct-2015 Chien-Yu Chen <cychen@google.com> am 27dbbd1d: am d270804d: am a24a1a63: Merge "Camera3Device: Bookkeeping reprocess shutters separately" into mnc-dr-dev

* commit '27dbbd1d26d71edab353fbfc1f741a9abee3590f':
Camera3Device: Bookkeeping reprocess shutters separately
3df11ce7240d0ce5d957c626be467832c1c7fde9 30-Sep-2015 Chien-Yu Chen <cychen@google.com> Camera3Device: Bookkeeping reprocess shutters separately

Bookkeeping reprocess shutters separately so regular and reprocess
shutters together don't need to come in order.

Bug: 24497512
Change-Id: I4aaf22045131e9e2e26bf163f7df9ff4c5cd6259
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
10cfc14fadae08cd5806c4834e28aa9f743f550e 28-Sep-2015 Glenn Kasten <gkasten@google.com> Merge "Add missing entries for input and output flags"
937c34741e476f26ddd0ff28a2af5e1bcd96895c 28-Sep-2015 Glenn Kasten <gkasten@google.com> Add missing entries for input and output flags

Bug: 24141510
Change-Id: Ia151bc7d25d72864992888c33547a34adf460a9b
udioflinger/Threads.cpp
060b582b37f55b758a41b0cc26dc1ff6d112814f 27-Sep-2015 Eino-Ville Talvala <etalvala@google.com> am b171ba8c: am ffce26c0: am f99498ee: CameraService: Use SCHED_FIFO for request queue thread in HFR

* commit 'b171ba8ce83ebb5abc2de9a171a15dc974756d3d':
CameraService: Use SCHED_FIFO for request queue thread in HFR
f99498ee4de7123e2fd71778c6877be44fbd1506 26-Sep-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Use SCHED_FIFO for request queue thread in HFR

- Move SchedulingPolicyService from audioservice to mediautils

- When starting up a high speed stream config, set request queue thread
to SCHED_FIFO using SchedulingPolicyService

Bug: 24227252
Change-Id: I224b59142bd111caf563779f55cddd62385b9bac
udioflinger/Android.mk
udioflinger/ISchedulingPolicyService.cpp
udioflinger/ISchedulingPolicyService.h
udioflinger/SchedulingPolicyService.cpp
udioflinger/SchedulingPolicyService.h
udioflinger/Threads.cpp
amera/libcameraservice/Android.mk
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
ab0ea0fe9a1e4afad5b39e094f6640318aefdd33 25-Sep-2015 Andy Hung <hunga@google.com> DO NOT MERGE - AudioFlinger: Clear record buffers when starting RecordThread

Bug: 24211743
Bug: 24267152
Change-Id: I58c55e56b85067b71e4e300f947b4dfc159637ba
udioflinger/Threads.cpp
8c987fa71326eb0cc504959a5ebb440410d73180 25-Sep-2015 Andy Hung <hunga@google.com> DO NOT MERGE - AudioFlinger: Clear record buffers when starting RecordThread

Bug: 24211743
Bug: 24267152
Change-Id: I58c55e56b85067b71e4e300f947b4dfc159637ba
udioflinger/FastCapture.cpp
udioflinger/Threads.cpp
f63ae125ca8fc9e430694413b701d3667f3fd63a 24-Sep-2015 Eric Laurent <elaurent@google.com> am 3d036a8f: am 8c8d9779: am 45fd99a3: Merge "audio policy: fix preemtible capture race" into mnc-dr-dev

* commit '3d036a8f4ce9ba2a07593b21ef63d83c8a43816e':
audio policy: fix preemtible capture race
45fd99a31d09f247c72f456a9d569d7326a95894 24-Sep-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: fix preemtible capture race" into mnc-dr-dev
0a712e0c7f292821ac7a997a75dbe2388378bed4 24-Sep-2015 Eric Laurent <elaurent@google.com> am 1723a587: am 3d25b023: am 047d97b2: AudioPolicyService: fix race in AudioCommandThread

* commit '1723a5879ff1295e6553730e2916e54a88b6222e':
AudioPolicyService: fix race in AudioCommandThread
047d97b2d046374e2a25c81a984d9cde23f5d781 23-Sep-2015 Eric Laurent <elaurent@google.com> AudioPolicyService: fix race in AudioCommandThread

Fixe race condition in AudioCommandThread::threadLoop() where a
command can be inserted in first position in the queue after the sleep
time has been calculated causing a longer delay than expected.

Also fix a failure to hold a wake lock while commands are still in the queue.

Bug: 22707905.
Change-Id: I813626986677bf00106acb37ee20d3dd75d5cf33
udiopolicy/service/AudioPolicyService.cpp
0a01c2fb68e6f35905de8dfaf938d099cd48587d 21-Sep-2015 Andy Hung <hunga@google.com> AudioFlinger: Clear record buffers when starting RecordThread

Bug: 24267152
Change-Id: I58c55e56b85067b71e4e300f947b4dfc159637ba
udioflinger/FastCapture.cpp
udioflinger/Threads.cpp
64265b2fb8f5be63b6c2ad4fcbec9acf74705bc4 19-Sep-2015 Eric Laurent <elaurent@google.com> audio policy: fix preemtible capture race

Because a preemtible capture session can preempt another one,
we end up in an endless loop situation were each session is allowed to restart
after being preempted, thus preempting the other one which restarts and so on.

To avoid this situation, we store which audio session was preempted when
a particular input started and prevent preemption of this active input by this session.
We also inherit sessions from the preempted input to avoid a 3 way preemption loop etc...

Bug: 24007220.
Change-Id: I0eab5299440ef3ab9e987635dc9a300cf42f2c79
udiopolicy/common/managerdefinitions/include/AudioInputDescriptor.h
udiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
fc2c73edef7b0a118634f75cf0ab2f3769ab0462 17-Sep-2015 Eric Laurent <elaurent@google.com> am f150772c: am da132d84: am 4296d7df: Merge "audio policy: bind setMode() and setPhoneState() operations" into mnc-dr-dev

* commit 'f150772c994efa5bd80a0def10182c9c2bb2195a':
audio policy: bind setMode() and setPhoneState() operations
beb07febdc0cae2f43a2008d3bd06b7bb933b19a 17-Sep-2015 Eric Laurent <elaurent@google.com> audio policy: bind setMode() and setPhoneState() operations

No routing operation should be allowed between setMode() and setPhoneState()
when starting a call as the audio HAL relies on a precise sequence of mode change
and routing change to select the initial audio device for the call.

Bug: 24083591.

Change-Id: I2d5ef62c11cf7aedc2ec7ca5e5fadd7ac875afbc
udiopolicy/service/AudioPolicyInterfaceImpl.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
udioflinger/Tracks.cpp
06871b42f3280391825532c1a24657877852bc05 30-Oct-2014 Eric Laurent <elaurent@google.com> DO NOT MERGE - audio policy: fix commit dea1541f

Fix return types in early returns added by
commit dea1541f in AudioPolicy binder call methods.

Also fix former similar mistakes found nearby.

Bug: 18001784.
Bug: 18002005.

Change-Id: I088c6029ca04e2c2c2f78e560c9cb6b9576dd88f
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyInterfaceImplLegacy.cpp
8ce05c7682767b0866e9d22fec5b42e31be8bd0f 28-Oct-2014 Eric Laurent <elaurent@google.com> DO NOT MERGE - audio policy: validate stream type received from binder calls.

Bug: 18001784.
Bug: 18002005.
Change-Id: I8efa674dceff5a6e10251b1c7a55e9bb2d532395
(cherry picked from commit dea1541fc0042abf05674b19c2f94ca086945dfd)
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyInterfaceImplLegacy.cpp
4137d521e2be255ee109a6c59a1cd273b9029a4c 16-Sep-2015 Jean-Michel Trivi <jmtrivi@google.com> am 373c7621: am d3fa3c14: am 20baac2a: Merge "AudioPolicy: don\'t always change ACCESSIBILITY volume" into mnc-dr-dev

* commit '373c7621e21f8f15b4514e719030eb9ca7ebcfe6':
AudioPolicy: don't always change ACCESSIBILITY volume
20baac2a934e9d968832a44809eecc8c46c17fe2 16-Sep-2015 Jean-Michel Trivi <jmtrivi@google.com> Merge "AudioPolicy: don't always change ACCESSIBILITY volume" into mnc-dr-dev
3145ccfef7adc84a99eb88b8ac6840fd38756e31 15-Sep-2015 Yin-Chia Yeh <yinchiayeh@google.com> am 686008a0: am 08879050: am 3818c696: Merge "Camera: API1 shim: select better default FPS range" into mnc-dr-dev

* commit '686008a0b91242314abfc5c861c74249f6328d90':
Camera: API1 shim: select better default FPS range
3818c6964a000bcac34176afa2bae5e247f5d223 15-Sep-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: API1 shim: select better default FPS range" into mnc-dr-dev
af20bc26704458eac0ddc23f12b637939b0df7a4 15-Sep-2015 Jean-Michel Trivi <jmtrivi@google.com> AudioPolicy: don't always change ACCESSIBILITY volume

Only change the volume for AUDIO_STREAM_ACCESSIBILITY when
changing the media volume.

Bug 23366575

Change-Id: Ic42c726ec4d47615c20500c20e4d43cef159b3c6
udiopolicy/managerdefault/AudioPolicyManager.cpp
f86a441cb5b0dccd3106019e578c3535498e5315 11-Sep-2015 dcashman <dcashman@google.com> Add DUMP permission check to ResourceManagerService.

Bug: 23999740
Change-Id: I3165404add455528b22951ba47b682a075b50087
(cherry picked from commit 014e91e471edba3f9b2c71ff6025274716b0f587)
ediaresourcemanager/ResourceManagerService.cpp
69c24d3c6e42472f3e4e155559be100dd6f7121a 14-Sep-2015 Pablo Ceballos <pceballos@google.com> Merge changes from topic 'Bug 19769719'

* changes:
stagefright: Rename mBuf to mSlot
camera: Rename mBuf to mSlot
c5aa679da8a249246562afe2b0df0aedd921d2a0 14-Sep-2015 Eric Laurent <elaurent@google.com> am 4df558eb: am c0bdf755: am f00b70e0: Merge "Force fixed volume for TTS stream" into mnc-dr-dev

* commit '4df558eb60e0b70dc2f89cfed2cc2359275b890b':
Force fixed volume for TTS stream
f00b70e082c14f789c948f623daca9be7a0e36e8 14-Sep-2015 Eric Laurent <elaurent@google.com> Merge "Force fixed volume for TTS stream" into mnc-dr-dev
9e13e6b0c5fc4105638a0d53d7a1715bc696fe8d 12-Sep-2015 Chien-Yu Chen <cychen@google.com> am 2614190c: am 8f742203: am 99c90657: Merge "Camera3Device: Signal buffer returned after it failed" into mnc-dr-dev

* commit '2614190c166f70ee242c0b12c46e1d8e357b081a':
Camera3Device: Signal buffer returned after it failed
99c906570b8663da8709fd986323470984f9c57e 12-Sep-2015 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Signal buffer returned after it failed" into mnc-dr-dev
f99d57eec148eb0c9f9cf43fbf5f6bf382d7ec4b 12-Sep-2015 Andy Hung <hunga@google.com> am a23408f7: am 24a9cb4e: am 5c0adc3e: Merge "Workaround static fast track start-after-stop issue" into mnc-dr-dev

* commit 'a23408f74a4dd9502ca23a824acb280bdcf07738':
Workaround static fast track start-after-stop issue
83aaa0fb5e8859cfb26de71298dcc42e9622dc03 12-Sep-2015 dcashman <dcashman@google.com> am f3bd13d9: am 56cb7c4f: am 014e91e4: Add DUMP permission check to ResourceManagerService.

* commit 'f3bd13d94eb3971d3c280ddfa1c70b6d8db112c8':
Add DUMP permission check to ResourceManagerService.
2594a52b3e6a93e21f084ecdbca172dbf1c1310e 12-Sep-2015 dcashman <dcashman@google.com> am 4d6ed30c: am c6b1a54b: am fefa614f: Reduce DUMP permission denial output to one line.

* commit '4d6ed30cb9fbcb63e29d347908a79de856dae7cd':
Reduce DUMP permission denial output to one line.
5c0adc3e632fbb2929cb20e32a8a9f2864c01490 12-Sep-2015 Andy Hung <hunga@google.com> Merge "Workaround static fast track start-after-stop issue" into mnc-dr-dev
a542782d0045588e55e075a763cedcd2d504ad22 12-Sep-2015 Andy Hung <hunga@google.com> Workaround static fast track start-after-stop issue

Bug: 23291988
Bug: 23614327
Bug: 23924081
Change-Id: Id1a519ed4bb2a6f4cb197da8450f7069b55c0d48
udioflinger/Tracks.cpp
014e91e471edba3f9b2c71ff6025274716b0f587 11-Sep-2015 dcashman <dcashman@google.com> Add DUMP permission check to ResourceManagerService.

Bug: 23999740
Change-Id: I3165404add455528b22951ba47b682a075b50087
ediaresourcemanager/ResourceManagerService.cpp
b9017af21e097ef12867e0d4b72c432579f29674 11-Sep-2015 Eric Laurent <elaurent@google.com> Force fixed volume for TTS stream

Always play Transmitted Through Speaker stream at max volume instead
of tracking media stream volume.

Bug: 23729461.
Change-Id: I61021f59617bb851a4cd7da80924e587029e96a3
udiopolicy/enginedefault/src/Gains.cpp
b83c1fe4e793da269b9340c64f7032a9cc27809c 11-Sep-2015 Chien-Yu Chen <cychen@google.com> Camera3Device: Signal buffer returned after it failed

Signal buffer returned even after it failed so the thread waiting
for it can wake up sooner.

Bug: 23981045
Change-Id: Iccbcc7ece2e0f6204da9c54f2bdd96ff6843a8f5
amera/libcameraservice/device3/Camera3Stream.cpp
652f7d7ebd9a8cec067588c2a232e49710d5cd83 11-Sep-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: API1 shim: select better default FPS range

Bug: 23992350
Change-Id: Ie86b24d9e5ea753c6dfc2e5526d371b339be96a1
amera/libcameraservice/api1/client2/Parameters.cpp
fefa614f92346e929921bfd47e3643861850bc2a 09-Sep-2015 dcashman <dcashman@google.com> Reduce DUMP permission denial output to one line.

Bug: 23940813
Change-Id: I0060dbaff5cd0c3d028ac5cd7aba7da3f0371150
amera/libcameraservice/CameraService.cpp
c06f0ef67f02f88e01e2b2679e83c87628dbfc1a 11-Sep-2015 Eric Laurent <elaurent@google.com> am b7b97b9d: am 48e879db: am a2ab4505: audio flinger: force audio path start from normal mixer

* commit 'b7b97b9d897581b30f4bba78ec360474646c230a':
audio flinger: force audio path start from normal mixer
a2ab4505c807f42afe34809409c4e85d91618a8c 09-Sep-2015 Eric Laurent <elaurent@google.com> audio flinger: force audio path start from normal mixer

The audio HAL wakes up and configures the audio path when receiving
the first write() in standby state. This causes a certain amount of
process to take place in the mixer threads which is problematic for
fast mixer running at FIFO priority.

We now force a fake write() of 0 bytes from normal mixer to trigger
the audio path configuration before starting the fast mixer.

Bug: 23791972.

Change-Id: I54311b337fda956444846f5d2f53a3263d54e04b
udioflinger/Threads.cpp
38a1bf53f244617fdf7cc9c0c378966248651405 09-Sep-2015 Eric Laurent <elaurent@google.com> am 891cf088: am f30fd800: Merge "Revert "Do not acknowledge flush() on start() for static tracks"" into mnc-dr-dev

* commit '891cf088572de78ff8696d0aee5eb13d502ae665':
Revert "Do not acknowledge flush() on start() for static tracks"
f30fd8000153d7320f9c45b7d116d26d7f029d01 09-Sep-2015 Eric Laurent <elaurent@google.com> Merge "Revert "Do not acknowledge flush() on start() for static tracks"" into mnc-dr-dev
564d144fc28917d42e3a67718ac51d61bfc36315 09-Sep-2015 Eric Laurent <elaurent@google.com> Revert "Do not acknowledge flush() on start() for static tracks"

This reverts commit cafe86a9cb6625bb1ec6383e16e28e4c9e455f87.

Bug: 23924093.
Change-Id: I186d1013b06a286eca93c30bb9b3545dc36695ff
udioflinger/Tracks.cpp
1f7886d495246431d0d520adeefc903c694a2c18 09-Sep-2015 Eino-Ville Talvala <etalvala@google.com> am 37f4f718: am a84bbe6b: CameraService: Add more systracing, fix module init order

* commit '37f4f7182df96da3a396b8947d0707209a20016b':
CameraService: Add more systracing, fix module init order
a84bbe6b59721b1b963d65d270aa98d6513bbb78 09-Sep-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Add more systracing, fix module init order

Improve debugging of performance of concurrent calls to the service.

- Add ATRACE calls to camera service entry points
- Add ATRACE calls for camera HAL module calls
- Ensure that camera module init method is called before all others

Bug: 23718257
Bug: 23933447
Change-Id: I2a025866ab39eda3962877120cab13a063c7727e
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/common/CameraModule.cpp
e4be7999d8cc689260ee54514cee0da67d9cf7e3 09-Sep-2015 Andy Hung <hunga@google.com> Merge "Do not acknowledge flush() on start() for static tracks" into mnc-dr-dev
f87c2f5eb4e37f0950962e31b9ca49e32f5b0864 21-Aug-2015 Glenn Kasten <gkasten@google.com> dumpsys was missing "processing" for format and frame size

Change-Id: I6931b18a6a85bf0638d659e31bca5aa6c8cf62bf
udioflinger/Threads.cpp
ba7690ca8e4aa4cc492b245a2e0c3f5bc66930b6 07-Sep-2015 Eino-Ville Talvala <etalvala@google.com> am e619a2c4: am c85dc054: Merge "CameraService: Link to client binder death at end of connect" into mnc-dr-dev

* commit 'e619a2c4db6ea85a35bb22b79c35002ea08b298c':
CameraService: Link to client binder death at end of connect
becf7e2c04317c5165d4924a7d09f09ea6d74c49 07-Sep-2015 Chien-Yu Chen <cychen@google.com> am 36389246: am 4abef9bf: Merge "Camera3Device: Clean up next request batch variable" into mnc-dr-dev

* commit '3638924676a5228a1fa07ee626fbac27f65ac72c':
Camera3Device: Clean up next request batch variable
c85dc0548dcc59aebc39251aa66b8c5df956c76f 05-Sep-2015 Eino-Ville Talvala <etalvala@google.com> Merge "CameraService: Link to client binder death at end of connect" into mnc-dr-dev
4abef9bf7cfb98930044c75354f5200b811d099f 05-Sep-2015 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Clean up next request batch variable" into mnc-dr-dev
24901c86e10a0923fe10f5e9bce5e6dba061a289 04-Sep-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Link to client binder death at end of connect

If, within a binder Looper thread, a Binder object death notifier is
registered, and then a nested Binder transaction is begun, that
transaction may process a death notification callback for the
just-registered object, if it was dead at the time of registration.

This can lead to an unexpected nested call into the service, and cause
deadlock.

To avoid this, move the death notifier registration to the end of
handling the connect transaction.

Also remove one extra bit of disconnect logging.

Bug: 23525545
Change-Id: If01cbaf42704f55134118afefc9a8f7bdb014e09
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
57ea29251d93c9423030de387573142064366a30 04-Sep-2015 Chien-Yu Chen <cychen@google.com> Camera3Device: Clean up next request batch variable

Make the Vector of next requests a RequestThread member variable
to avoid memory allocation in every threadloop.

Bug: 23360060
Change-Id: I4f33e5c49f0f4deb1f9f45bada0909da748849e4
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
cc75adb4bd6685e64c73772eb9ab3c7c242ac381 04-Sep-2015 Chien-Yu Chen <cychen@google.com> am f6c05e4b: am 50d12164: Merge "Camera3Device: Support batch requests" into mnc-dr-dev

* commit 'f6c05e4b6becdffd6cd53747c01f545dfc6fee47':
Camera3Device: Support batch requests
30760f0d077b0e43e58c5711112b8635aff1d6f5 04-Sep-2015 Eino-Ville Talvala <etalvala@google.com> am 1f7c2457: am 52aad856: CameraService: Treat TOP_SLEEPING same as TOP for priority.

* commit '1f7c24575b5f8f8633af2c69d7f5c1c36241d7ad':
CameraService: Treat TOP_SLEEPING same as TOP for priority.
50d12164efe3e4df9a1d994afdeb4779ce0f63c9 04-Sep-2015 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Support batch requests" into mnc-dr-dev
85a6455f269d79adf9bf48d757a4b1b3c81cf760 29-Aug-2015 Chien-Yu Chen <cychen@google.com> Camera3Device: Support batch requests

Refactor request threadLoop to three parts: waiting for next
batch of requests, preparing HAL requests and output buffers for
next batch of requests, and submitting the batch of requests to
HAL.

Set the batch size to the size of the request list if it's a video
recording request in a high speed video configuration.

Add a flush lock so that HAL's flush() won't be called while
submitting a batch of requests.

Bug: 23360060
Change-Id: Icd395b1f955a9b336eec6fa5aff6b17741ce08c7
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3DummyStream.cpp
amera/libcameraservice/device3/Camera3DummyStream.h
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.h
amera/libcameraservice/device3/Camera3OutputStreamInterface.h
amera/libcameraservice/device3/Camera3Stream.cpp
52aad85627f5216e7a3d9db425d2cc409f998a01 03-Sep-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Treat TOP_SLEEPING same as TOP for priority.

When arbitrating between camera clients, treat processes in the
TOP_SLEEPING state with the same high priority as processes in the
TOP state.

This resolves race conditions during lock screen handoffs between
clients such as face unlock (a bound foreground process) and a
secure camera app (the topmost activity, but transitioning from
TOP_SLEEPING to TOP asynchronously from the activity lifecycle
callbacks).

Bug: 23731720
Change-Id: I92c3f8f561c7725627826c0ba3dc926e99af746c
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
d7bd827f063501e9e7d38780e1306251fa49c1a8 03-Sep-2015 Chien-Yu Chen <cychen@google.com> am ac847aa6: am ef782669: am fe751bea: Camera: Fix flashlight deadlock

* commit 'ac847aa69ce9f6821d7f2a01030a6a675f9ff0b4':
Camera: Fix flashlight deadlock
ef7826692df89514701d12dfbfc31bec3814cf95 02-Sep-2015 Chien-Yu Chen <cychen@google.com> am fe751bea: Camera: Fix flashlight deadlock

* commit 'fe751bea0d3eedd6e817aebf4e457425b82e7117':
Camera: Fix flashlight deadlock
b367f5b2de343bfd9040028b00acb96567f30bea 25-Aug-2015 Ravi Kumar Alamanda <ralama@codeaurora.org> audiopolicy: do not update channelMask for voice input source

It's not needed to update the channel mask based on source because
the source is sent to audio HAL through set_parameters() and if source
equal to VOICE_CALL does not mean that two channels need to capture.
If recorder app selects AMR as encoding format but source as RX+TX means
both RX and TX are captured in ONE channel. So use channels set by the app
and use source for the type of capture (RX only, TX only, or RX+TX).

Bug: 23484531

Change-Id: Iedf23318356480ba939fc06df4ae4f12906322b3
udiopolicy/managerdefault/AudioPolicyManager.cpp
fe751bea0d3eedd6e817aebf4e457425b82e7117 01-Sep-2015 Chien-Yu Chen <cychen@google.com> Camera: Fix flashlight deadlock

Use a dedicated mutex for torch UID map so it won't cause a deadlock
after flashlight app gets killed while the torch is on.

Bug: 23722318
Change-Id: I228377aa0412052d56b6b948361d9abaecbbc686
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
3493c12cdbc529125e638fcf70f955c912188e43 30-Aug-2015 Eino-Ville Talvala <etalvala@google.com> am aaed3cea: am 5dc3d992: Merge "Camera3Device: Don\'t hold mutex during HAL device close." into mnc-dr-dev

* commit 'aaed3ceac553f552c98bb00571544334240a0159':
Camera3Device: Don't hold mutex during HAL device close.
efff1c4ba2bf195d97de2fd5718b708e4b942901 29-Aug-2015 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Don't hold mutex during HAL device close.

The HAL device shutdown will likely need to wait on various events and
queues to drain, and holding the mutex will prevent, for example, error
notifications from being processed. This can lead to deadlocks.

Bug: 23501571
Change-Id: I873ac23ef30545adf533e7839445448573ab5048
amera/libcameraservice/device3/Camera3Device.cpp
7458afe1c4e536ff035d5fc37ac9e43e15231040 25-Aug-2015 Eino-Ville Talvala <etalvala@google.com> am 61261d76: am 9684cc15: Merge "CameraService: Notify camera service proxy of device status" into mnc-dr-dev

* commit '61261d760b7604353ed8062c6ec11edeaf3b855a':
CameraService: Notify camera service proxy of device status
cafe86a9cb6625bb1ec6383e16e28e4c9e455f87 14-Aug-2015 Andy Hung <hunga@google.com> Do not acknowledge flush() on start() for static tracks

Bug: 22938515
Change-Id: I1de653de169a3fbbaa693da6057897ea57772447
udioflinger/Tracks.cpp
7989c6e1d4c132ad1863a20338c29fea5b1579cc 14-Aug-2015 Andy Hung <hunga@google.com> Do not acknowledge flush() on start() for static tracks

Bug: 22938515
Change-Id: I1de653de169a3fbbaa693da6057897ea57772447
udioflinger/Tracks.cpp
ed926597544b0bb945fe6965d49b7612c09abc1e 24-Aug-2015 Eric Laurent <elaurent@google.com> Merge "audioflinger: increase shared memory heap size"
d0d4fa0f0f62a8f860d99e906e5294f487d8cbf1 24-Aug-2015 Eric Laurent <elaurent@google.com> Merge "audio policy service: check registerClient() input parameter"
125902529aed131abc00210c36dc9ff03d9e8120 22-Aug-2015 Eric Laurent <elaurent@google.com> audio policy service: check registerClient() input parameter

Bug: 21523339.
Change-Id: I1d1ebd54fa7b20ae01d914bb216bf3dd24fc32cd
udiopolicy/service/AudioPolicyService.cpp
412fe56cd7cf7d73bc5d2bcc3f635bc650d18de9 21-Aug-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Notify camera service proxy of device status

Send the camera proxy service in system server updates to
camera device state: opened/closed/active/idle.

Bug: 23393557
Change-Id: Id7c70f134821efa34af8f6e7b4caa4c2ab128ebc
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/CameraClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
amera/libcameraservice/common/Camera2ClientBase.cpp
amera/libcameraservice/common/Camera2ClientBase.h
da73b6c7474aaa5616f0214e238776f12717f32b 21-Aug-2015 Eric Laurent <elaurent@google.com> audioflinger: increase shared memory heap size

Bug: 21093153.
Change-Id: I389af11451b01ce49fdb8957e2f322ba1925a62e
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
37ea1d0de9b7c9ffbfa7cb1895dcbf4a4f92803a 22-Aug-2015 Andy Hung <hunga@google.com> am e857d28d: Merge "TimestretchBufferProvider: getNextBuffer should follow API" into mnc-dev

* commit 'e857d28d48e6088d4cf5fcbed7f411c73622b388':
TimestretchBufferProvider: getNextBuffer should follow API
e857d28d48e6088d4cf5fcbed7f411c73622b388 22-Aug-2015 Andy Hung <hunga@google.com> Merge "TimestretchBufferProvider: getNextBuffer should follow API" into mnc-dev
6d62669e2796df93135e58388f75e6780f6a207e 21-Aug-2015 Andy Hung <hunga@google.com> TimestretchBufferProvider: getNextBuffer should follow API

If no data, should return 0 frame count and NULL ptr.

Bug: 23293002
Change-Id: Ib5364e5bceb15c2dddc4a16e85299b409cf4e137
udioflinger/BufferProviders.cpp
899ad39be5466d341f648e4a1584db64d99555ca 20-Aug-2015 Eric Laurent <elaurent@google.com> am ba20a086: am bc167f83: resolved conflicts for merge of 84fb58bd to lmp-mr1-dev

* commit 'ba20a08670dfb3bb0ab58b0e1e48fe1178c7cfcb':
DO NOT MERGE - audio flinger: fix fuzz test crash
bc167f832db091e490b552a147ec73412241e1e5 19-Aug-2015 Eric Laurent <elaurent@google.com> resolved conflicts for merge of 84fb58bd to lmp-mr1-dev

Change-Id: I9b2b1ff690d35e0da644bdb52c8c42a72e5fd4f6
84fb58bdf6bfb5bf362c0e1cc6a5bad41e8554f5 18-Aug-2015 Eric Laurent <elaurent@google.com> am bdb5e497: Merge "DO NOT MERGE - audio flinger: fix fuzz test crash" into lmp-dev

* commit 'bdb5e49787dcb56fec68a2410a0985bfe388cd14':
DO NOT MERGE - audio flinger: fix fuzz test crash
6b52d191f96c611b768318eec74d25908da76d03 18-Aug-2015 Eric Laurent <elaurent@google.com> am 916a9684: Merge "DO NOT MERGE - audio flinger: fix fuzz test crash" into klp-dev

* commit '916a9684295fb578f4b3c6c16b621ef201a49964':
DO NOT MERGE - audio flinger: fix fuzz test crash
b97ee930e4f7ed1587b869c92b4aa1dc90b641cc 08-May-2015 Eric Laurent <elaurent@google.com> DO NOT MERGE - audio flinger: fix fuzz test crash

Clear output stream pointer in duplicating thread
when the main output to which it is attached is closed.

Also do not forward master mute and volume commands to
duplicating threads as this is not applicable.

Also fix logic in AudioFlinger::primaryPlaybackThread_l()
that could accidentally return a duplicating thread.
This never happens because the primary thread is always
first in the list.

Bug: 20731946.
Change-Id: Ic8869699836920351b23d09544c50a258d3fb585
(cherry picked from commit f6870aefc5e31d4220f3778c4e79ff34a61f48ad)
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
22ac20eff5b67f33b9d04ca54abeaa22ce201039 08-May-2015 Eric Laurent <elaurent@google.com> DO NOT MERGE - audio flinger: fix fuzz test crash

Clear output stream pointer in duplicating thread
when the main output to which it is attached is closed.

Also do not forward master mute and volume commands to
duplicating threads as this is not applicable.

Also fix logic in AudioFlinger::primaryPlaybackThread_l()
that could accidentally return a duplicating thread.
This never happens because the primary thread is always
first in the list.

Bug: 20731946.
Change-Id: Ic8869699836920351b23d09544c50a258d3fb585
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
5d1103e5a229401a4c4e0cb7dd91b2742881ff92 17-Aug-2015 Ruben Brunk <rubenbrunk@google.com> Merge "Add experimental camera session prepare API." into mnc-dr-dev
e4dfac0e130fe95bfe445ea47ce3ed8ac590447f 16-Aug-2015 Eino-Ville Talvala <etalvala@google.com> am bad4358c: Camera: Add camera type to ICameraService.getNumberOfCameras.

* commit 'bad4358c83c7daaf9eeb8542c15eea4f473c884c':
Camera: Add camera type to ICameraService.getNumberOfCameras.
c78ac26e3a65328fc0118f16ee76a800d0687eb7 14-Aug-2015 Ruben Brunk <rubenbrunk@google.com> Add experimental camera session prepare API.

Bug: 18949148
Change-Id: I8f73e68ea2e3acc60d98954106f364d13f439a82
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device2/Camera2Device.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3Stream.cpp
amera/libcameraservice/device3/Camera3Stream.h
amera/libcameraservice/device3/Camera3StreamInterface.h
bad4358c83c7daaf9eeb8542c15eea4f473c884c 14-Aug-2015 Eino-Ville Talvala <etalvala@google.com> Camera: Add camera type to ICameraService.getNumberOfCameras.

Also determine the number of 'normal' cameras present on
camera service startup, and ensure that all normal cameras have
IDs lower than the 'strange' cameras.

Bug: 23194168
Change-Id: I1f7b14825cb52707de698a955f85da1eaa932663
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
b65ce67e4083b2026c9f31cb762abe4be39f1560 14-Aug-2015 Ruben Brunk <rubenbrunk@google.com> am 3ba0c6ec: Merge "Fix deadlock conditions in Camera3Device." into mnc-dev

* commit '3ba0c6ec009aa675d3433cd6c12af173874787bd':
Fix deadlock conditions in Camera3Device.
3ba0c6ec009aa675d3433cd6c12af173874787bd 14-Aug-2015 Ruben Brunk <rubenbrunk@google.com> Merge "Fix deadlock conditions in Camera3Device." into mnc-dev
a09f8cf8c76fa946c4b91be059b420941abcdc3b 14-Aug-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: refine TTS stream mute management" into mnc-dr-dev
9459fb087c97c3cad66221821eb32755fdb9c9f5 13-Aug-2015 Eric Laurent <elaurent@google.com> audio policy: refine TTS stream mute management

Do not mute the TTS stream if a dedicated output for
TTS is available.

Bug: 22100304.
Change-Id: Ic126100ce1144f765bc0ae42c8ea87fa47cfb822
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
5732386666aa2265d658e9fc861a1dfe22033861 13-Aug-2015 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Relax InFlightMap size check" into mnc-dev
c96ac8dfcae66a45b7ae67b82dabdf19f60f859d 13-Aug-2015 Chien-Yu Chen <cychen@google.com> Camera3Device: Relax InFlightMap size check

Relax InFlightMap size check for high speed configurations to
allow more pending capture requests.

Bug: 23162274
Change-Id: I955fe9a0754f0daed001f4a2b34ccb50f2465a11
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
183f056393423b344e73f388f21d30379a38e519 12-Aug-2015 Ruben Brunk <rubenbrunk@google.com> Fix deadlock conditions in Camera3Device.

Potential deadlock conditions this addresses, include:
- Not waking up waiting threads for several situations where
the status had been updated.
- Not waking up all waiting thread when status had been updated
(only one thread was awoken due to use of signal).
- Threads clear status transitions before other waiting threads
have a chance to examine them.

Bug: 22448586
Change-Id: I53ba669d333a83d2bfa1ca3170d34acc6d8fe6e3
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
4327df2af078894c38a8eb69f4873bef92cc0f83 12-Aug-2015 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Allocate correctly-sized buffers for DEPTH_POINT_CLOUD" into mnc-dev
95a1d0f2fb1ea85c549ef8b869ab9ab52601d1db 12-Aug-2015 Eino-Ville Talvala <etalvala@google.com> Camera: Allocate correctly-sized buffers for DEPTH_POINT_CLOUD

Bug: 20537722
Change-Id: I9fa2fcdcfd41cd3370732c70414914993d3dc94e
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
82db269d4797cb9909988b723d91fa2094a74b38 07-Aug-2015 Eric Laurent <elaurent@google.com> audio policy: protect capture from telephony RX path.

Add permission check if the capture device selected is telephony
RX path.

Bug: 23017158.
Change-Id: Iaa34d836e6cf46b7cbbf2483fcd4306dcd27ce90
udiopolicy/AudioPolicyInterface.h
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
e361bc024ee7e34b7d53223aa2b209ef120ee78a 08-Aug-2015 Pablo Ceballos <pceballos@google.com> camera: Rename mBuf to mSlot

Bug: 19769719
Change-Id: I9eef512f2a2185b7e0298113d2503b62ec2e5942
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
amera/libcameraservice/gui/RingBufferConsumer.cpp
amera/libcameraservice/gui/RingBufferConsumer.h
45aabc3578f2362b82f5a425d44e75d4266b1c8c 06-Aug-2015 Eric Laurent <elaurent@google.com> audio policy: populate attributes for attached capture devices

Populate supported sampling rates, channel masks and formats when enumerating
attached build in capture devices.

Having this information for build-in mic is important for some applications.

Bug: 22729461.
Change-Id: I93f03296447a87c10f2615fa1b1c45e9879b4aa7
udiopolicy/managerdefault/AudioPolicyManager.cpp
41ae1d663d896a9ec22299d95c01940313a9b276 04-Aug-2015 Phil Burk <philburk@google.com> AudioFlinger: tell HAL the PCM is non-audio

Add a bit to tell the HAL that the PCM data is really encoded audio
wrapped in a data burst.
Otherwise the device may try to play the encoded data directly
which will sound like modulated white noise.

Bug: 22576112
Change-Id: Ib140da96876e849023858fe2510612310501d1ee
Signed-off-by: Phil Burk <philburk@google.com>
udioflinger/SpdifStreamOut.cpp
5ce059661dcbab8924edab400681fc408ee76123 24-Jul-2015 Glenn Kasten <gkasten@google.com> Merge "Fix capture overruns at non-primary sample rate" into mnc-dev
240577a43ff8d312fa4b464db887916580473396 23-Jul-2015 Andy Hung <hunga@google.com> Merge "Fix record memory buffer allocation for legacy upmix/downmix" into mnc-dev
a97630bda8815958587ca31adb2d37090022af25 23-Jul-2015 Andy Hung <hunga@google.com> Fix record memory buffer allocation for legacy upmix/downmix

Bug: 22173057
Change-Id: I8f5056ff5a1252c71a3d3b354440551bcd9fd466
udioflinger/Threads.cpp
eb9487e10294a4e73977f460f30eeaff503acd21 22-Jul-2015 Glenn Kasten <gkasten@google.com> Fix capture overruns at non-primary sample rate

and small buffer size. Also:
Pull out the magic number "12 ms" to a named constant.
Remove obsolete AudioFlinger::mPrimaryOutputSampleRate.

Bug: 22662814
Change-Id: I261f75a222c4505a84aad2493d251bd2dea59f68
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
5de234b29141334c1bb5e40bc19c11836848841b 21-Jul-2015 Jean-Michel Trivi <jmtrivi@google.com> Prevent notifications from muting accessibility prompts

When evaluating on which device a sound is to be played, the policy
must consider which current routing strategy, if any, has priority
for overriding the choice. Here the playback of notifications,
when duplicated over speaker and headphones, was causing the
accessibility prompt to be muted because the it was of a higher
priority, and incompatible with the accessibility routing.
The fix consists in assigning a higher priority to the accessbility
routing strategy over the notification routing strategy.

Bug 18834451

Change-Id: I8228b30a7d80bd61d1c223afb030d9421d4f33cf
udiopolicy/managerdefault/AudioPolicyManager.cpp
51390b48d311d1164a6638d3fe0b4a48aaa9028f 18-Jul-2015 Ronghua Wu <ronghuawu@google.com> Merge "mediaresourcemanager: add pid to removeResource method" into mnc-dev
f6d07bc61fd7fefe9d2b2cbdaf637f2fdb1bd21e 18-Jul-2015 Ruben Brunk <rubenbrunk@google.com> Merge "Fix UAF error in CameraModule." into mnc-dev
eff134a61a5dd081ee578628704a66dca24e0cf7 18-Jul-2015 Ruben Brunk <rubenbrunk@google.com> Fix UAF error in CameraModule.

Bug: 22542551
Change-Id: I2fe5791a6554a8e2f7fd94593d552d8af18257db
amera/libcameraservice/common/CameraModule.cpp
b9f72ab0b0b7582e021d369e7179022f7be5b37d 17-Jul-2015 Phil Burk <philburk@google.com> Merge "AudioFlinger: fix repeated underruns for compressed audio" into mnc-dev
51d0b1d84dc1c095e68126257213f24f64ab3aa0 17-Jul-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera2Client: handle slower jpeg stream sensor" into mnc-dev
ca5e6143740299c877d69e97f7968cd04476d32c 14-Jul-2015 Phil Burk <philburk@google.com> AudioFlinger: fix repeated underruns for compressed audio

The AudioFlinger kept pausing the audio when playing compressed AC3 or DTS.
This caused pause/resume loops that were hard to break out of.

The AudioFlinger was thinking that the compressed audio was PCM
because the HAL was in PCM mode playing SPDIF data bursts.
It also thought that EAC3 was at 192000 Hz instead of 48000
Hz because the data bursts are played at a higher rate.

This CL adds more calls to the shim that separates the AudioFlinger.
Now the AudioFlinger gets information about the HAL sample rate,
channel masks and format from the shim instead of calling the HAL directly.

The AudioFlinger now uses a different threshold for detecting
underruns when the audio is compressed.

Bug: 19938315
Bug: 20891646
Change-Id: Ib16f539346d1c7a273ea4feb3d3afcc3dc60237d
Signed-off-by: Phil Burk <philburk@google.com>
udioflinger/AudioStreamOut.cpp
udioflinger/AudioStreamOut.h
udioflinger/SpdifStreamOut.cpp
udioflinger/SpdifStreamOut.h
udioflinger/Threads.cpp
37c8924c508a7c9b8bd3c8ce80fc005070531902 15-Jul-2015 Ronghua Wu <ronghuawu@google.com> mediaresourcemanager: add pid to removeResource method

Bug: 22496209
Change-Id: I73311573e8d1ac15fec668a9ef6e6af7a07a1d30
ediaresourcemanager/ResourceManagerService.cpp
ediaresourcemanager/ResourceManagerService.h
ediaresourcemanager/test/ResourceManagerService_test.cpp
48e5df72f8a7fdcf6278fc395376fbaf98444a43 17-Jul-2015 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Add hidden experimental tearDown method." into mnc-dev
355d9c6b74cd22a88fc7d1c9ba2e928ba566c69e 25-Feb-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera2Client: handle slower jpeg stream sensor

If largest jpeg stream cannot sustain 30 FPS, don't
create jpeg stream until takePicture is called and remove
it after still capture is done.
Also, disable video snapshot for such sensors so video snapshot
won't slow down video recording.

Bug: 22231605
Change-Id: I2b34d2537c224694ae10f2006b5a46be45a1b1a6
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/Camera2Client.h
amera/libcameraservice/api1/client2/CaptureSequencer.cpp
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
b25e3c87724b6147ed1da7c1d6617c39bfce2fbf 16-Jul-2015 Eino-Ville Talvala <etalvala@google.com> Camera: Add hidden experimental tearDown method.

Bug: 18949148
Change-Id: Ie86ec7d1ec3db54e1154563b2339a208a935f849
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device2/Camera2Device.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3Stream.cpp
amera/libcameraservice/device3/Camera3Stream.h
amera/libcameraservice/device3/Camera3StreamInterface.h
0489aa0a7a9930a155022cac97242eb7ec610cdc 24-Jun-2015 François Gaffie <francois.gaffie@intel.com> Update Policy PFW plugin makefile for PFW release 2.6.0

This patch updates the Policy PFW plugin with latest change within
PFW. It makes use of the dynamic xmlserializer library and does not
need anymore to link against xmlserializer library dependencies.

Change-Id: Ic7b912929a69d3906a34999c1ae25ddb9ac800e5
Signed-off-by: François Gaffie <francois.gaffie@intel.com>

Bug 246391
udiopolicy/engineconfigurable/parameter-framework/plugin/Android.mk
51d12c26628ab37b0fd58e08b6905652f8763225 14-Jul-2015 Ronghua Wu <ronghuawu@google.com> Merge "mediaresourcemanager: handle the case when there's no client holding resource with the same type" into mnc-dev
05d89f1c6452b2fce0b9f1315240f8cace69a88d 08-Jul-2015 Ronghua Wu <ronghuawu@google.com> mediaresourcemanager: handle the case when there's no client holding resource with the same type

Bug: 21171205
Change-Id: Id4aa6ccc7ee7daba25fd295399235c5b463ccd83
ediaresourcemanager/ResourceManagerService.cpp
ediaresourcemanager/ResourceManagerService.h
ediaresourcemanager/test/ResourceManagerService_test.cpp
4b33e0838fdb1b5e545449add02005916b512c99 13-Jul-2015 Eric Laurent <elaurent@google.com> Merge "audioflinger: flush HAL when transitioning to next direct track" into mnc-dev
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udiopolicy/common/include/policy.h
udiopolicy/managerdefault/AudioPolicyManager.cpp
54c0659b9efa72d11997c590c4d377c44789c7fd 08-Jul-2015 François Gaffie <francois.gaffie@intel.com> audio policy: session route: move SessionRoute to common

Move the SessionRoute and SessionRouteMap inner class from policy
manager to common policy pillars as initiated by the refactor.

This code was added at teh wrong place by commit aa981194.

Bug: 22376521.

Change-Id: I29aca21614e409c59aae4b7b14163552fb0bffb1
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/common/managerdefinitions/Android.mk
udiopolicy/common/managerdefinitions/include/SessionRoute.h
udiopolicy/common/managerdefinitions/src/SessionRoute.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
672d9ca1f0a35f3bda02ddfe81e0e10cebba99c3 09-Jul-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: add support for device combo with speaker safe" into mnc-dev
47f986637d7b4d63abe0ab9e1cf6eb23766c6669 08-Jul-2015 Phil Burk <philburk@google.com> Merge "AudioFlinger: reset frame position on standby" into mnc-dev
0f0631eb55b1f0a7f4b62212b78a3faa0b49919b 07-Jul-2015 Eric Laurent <elaurent@google.com> audioflinger: flush HAL when transitioning to next direct track

Send flush command to the audio HAL when transtioning to
next track on direct output thread, even if both tracks are in the
same audio session.

Commit 43b4dcc to fix issue 21145353 did only flush the HAL if the
audio session was different for the new track because the logic was
copied from the offload thread.

Bug: 22019044.
Change-Id: I89b217580023ed7449a58e9bf3dc068ce7a84487
udioflinger/Threads.cpp
90eea7631b07117e46ae8b84889a2baa3eee7aea 07-Jul-2015 Phil Burk <philburk@google.com> AudioFlinger: reset frame position on standby

The HAL does not reset the frame position on standby().
But applications expect the frame position to be reset.
So we subtract the position at standby from the current position.

Bug: 21724210
Bug: 21930805
Change-Id: I0c4520ba1c6c06a580f45f6bafc8cf1d56969f07
Signed-off-by: Phil Burk <philburk@google.com>
udioflinger/AudioStreamOut.cpp
udioflinger/AudioStreamOut.h
udioflinger/SpdifStreamOut.cpp
udioflinger/SpdifStreamOut.h
9a7d922796c61353e30cea5878f41b921adc79b0 03-Jul-2015 Eric Laurent <elaurent@google.com> audio policy: add support for device combo with speaker safe

combo devices with AUDIO_DEVICE_OUT_SPEAKER_SAFE were not
supported by audio policy manager causing selection
of speaker+headphone when spekaer_safe+headphone would be
the right selection.

Bug: 21537010.
Change-Id: I9865352559c9d32c6754ad3d2b84bddfe2dc8aac
udiopolicy/common/include/Volume.h
udiopolicy/enginedefault/src/Engine.cpp
878b8f1a0128cf63617782e3073dffb212d0c8f1 07-Jul-2015 Ruben Brunk <rubenbrunk@google.com> Merge "camera2: Fix native binder interface and add tests." into mnc-dev
637709460ea75e927a5802899d6547bca3b5e7be 07-Jul-2015 Chien-Yu Chen <cychen@google.com> Merge "CameraModule: fix getCameraInfo()" into mnc-dev
a0169a073d88efefbfb35fa0ea8e94f7b31d7469 07-Jul-2015 Eric Laurent <elaurent@google.com> audio: Do not delete PatchRecord before Peer is stopped

PatchPanel::clearPatchConnections deletes PatchRecord before
the peer PatchTrack is stopped. This can cause an access to already
free'ed memory leading to a crash in PatchTrack::getNextBuffer.

Fix is to delete PatchRecord and PatchTrack only after removing
both of them from active tracks list

Bug: 22304526.
Change-Id: I7003756d3d2dd8912ce5e3b2fc31f5e82f455888
udioflinger/PatchPanel.cpp
3450ba7879be6522ea46a56c5e66e5382f5dd5ba 16-Jun-2015 Ruben Brunk <rubenbrunk@google.com> camera2: Fix native binder interface and add tests.

- Add CameraBinderTests for limited coverage of native
camera2 binder interfaces for the camera service.
- Fix several bugs in the native binder interfaces.

Bug: 18468810
Change-Id: Iab2d81a5cacd20daf7454aeeed033cc13d88452c
amera/libcameraservice/CameraService.cpp
944f843015c440837abb029356108a81b4095e53 02-Jul-2015 Chien-Yu Chen <cychen@google.com> CameraModule: fix getCameraInfo()

Remove mCameraCharacteristicsMap.

CameraModule kept a CameraMetadata in mCameraCharacteristicsMap
and kept its camera_metadata in mCameraInfoMap. When CameraMetadata
gets moved in mCameraCharacteristicsMap, it may clone a new
camera_metadata and free the old one. So the original
camera_metadata stored in mCameraCharacteristicsMap becomes invalid.

Bug: 22171288
Change-Id: Ia8e99fe42989946bc952ad23abb296aeac60da83
amera/libcameraservice/common/CameraModule.cpp
amera/libcameraservice/common/CameraModule.h
e59c6a33e724579f4b8ac76586e6f667fa0b8572 07-Jul-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: fix regression in incall notification management" into mnc-dev
75bd29fde03953952804215d1f24d8dffaeda763 06-Jul-2015 Eric Laurent <elaurent@google.com> Merge "audio: add definitions for devices connected over IP" into mnc-dev
b9d73333cce3f9da3a7a0b33589f6bbe0f992a92 01-Jul-2015 Eric Laurent <elaurent@google.com> audio: add definitions for devices connected over IP

Bug: 22068684.
Change-Id: Idde0eaf7121d2e43f32eee3e6b10e99d8cff4912
udioflinger/Threads.cpp
udiopolicy/common/managerdefinitions/include/ConfigParsingUtils.h
f60b6b6c776a762827874f6f635c0577359a7ee4 06-Jul-2015 Glenn Kasten <gkasten@google.com> Fix build warning

Change-Id: I876edc37fb2093ee13c876c2af5c46512763154d
udiopolicy/service/AudioPolicyService.cpp
16f0c6b8146b2a993d9fe9c9076c73d39aaee81c 06-Jul-2015 Glenn Kasten <gkasten@google.com> Merge "audiopolicy: Update flag enum tables for the new flags" into mnc-dev
63dea1d5334acf3baa9448086dd504ead57d814b 03-Jul-2015 Eric Laurent <elaurent@google.com> audio policy: fix regression in incall notification management

Commit 2110e04c introduced a regression preventing ongoing alarms to
be restored when exiting a call and leaving the replacement tone
playing for ever.

Also add missing management of accessibility prompts when entering a
call.

Bug: 21857005.
Change-Id: I4295c791c003db42c0fba9f618e51f60438158d1
udiopolicy/managerdefault/AudioPolicyManager.cpp
6631424f66253c4bad94618fa078c97715a65fbc 02-Jul-2015 Ravi Kumar Alamanda <ralama@codeaurora.org> audiopolicy: Update flag enum tables for the new flags

Without an entry in sOutputFlagNameToEnumTable or sInputFlagNameToEnumTable,
a profile with specific output/input flag in the audio_policy.conf will
not be detected by AudioPolicyManager.

Bug: 19230391

Change-Id: I94bb3594e2eb8b57747b474a253da3551263c59a
udiopolicy/common/managerdefinitions/include/ConfigParsingUtils.h
ab5135b254c6f9aaac8edb816596f8823dbdb3d5 30-Jun-2015 Chien-Yu Chen <cychen@google.com> Camera3-Device: Fix AE lock available

Pass whether AE lock is available when creating the request thread
because when the request thread was created, its parent's info
was not set yet.

Bug: 20494782
Change-Id: I11ed3f99c473955c437e81f3e1d704c15a9ca1a4
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
6705edd4e58c4fcff0cbbff30bacffa561759ba8 27-Jun-2015 Eric Laurent <elaurent@google.com> Merge "reduce number of binder calls from mediaserver" into mnc-dev
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
udioflinger/Threads.cpp
udioflinger/Threads.h
udiopolicy/service/AudioPolicyService.cpp
udiopolicy/service/AudioPolicyService.h
cc750d3604b33a92374253b12dd739dc06440aad 25-Jun-2015 Eric Laurent <elaurent@google.com> audio policy: fix several device descriptor issues.

- checkOutputsForDevice() should only clear device descriptor attributes
if the device is digital.
- checkInputsForDevice() did not clear device descriptor attributes at all.
- AudioPort::clearCapabilities() and importAudioPort() should not
manage gains as these are device specific.
- importAudioPort() should load a default port config.

Bug: 21990937.
Change-Id: Ida762ed8f9baaabae392cb4291eff1a8d3009751
udiopolicy/common/managerdefinitions/include/AudioPort.h
udiopolicy/common/managerdefinitions/include/DeviceDescriptor.h
udiopolicy/common/managerdefinitions/src/AudioPort.cpp
udiopolicy/common/managerdefinitions/src/DeviceDescriptor.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
ed8505836c0b2fba0ab4be0c1eff31d4f241bc1d 25-Jun-2015 Chien-Yu Chen <cychen@google.com> Merge "Camera3: Support AE precapture trigger CANCEL" into mnc-dev
d196d6165aa1ac0dd7c0ad6cc5ada3a2f8e4b49d 23-Jun-2015 Chien-Yu Chen <cychen@google.com> Camera3: Support AE precapture trigger CANCEL

Support AE precapture trigger CANCEL for devices <= API
version 3.2.

Bug: 20494782
Change-Id: I6003ba8057ca4ec9e8dfda47b8411ae6be913d22
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
ec5d6f84d4d91602920e606e7683dee6d9d433f1 24-Jun-2015 Ruben Brunk <rubenbrunk@google.com> Merge "Add default for pre-distortion active array." into mnc-dev
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
udioflinger/AudioMixer.cpp
udioflinger/BufferProviders.cpp
udioflinger/BufferProviders.h
a3b3caaae3fc23b99c5c455ee429f79c270cfbae 22-Jun-2015 Ruben Brunk <rubenbrunk@google.com> Add default for pre-distortion active array.

Bug: 20491394
Change-Id: I53b0539b37cc7a042e6765c97775b8c2bbba7159
amera/libcameraservice/common/CameraModule.cpp
42193b96b22782fce14c55314dfc269fb4a4ed22 22-Jun-2015 Andy Hung <hunga@google.com> Merge "Fix FastMixer high bit depth Hal support" into mnc-dev
ecf7bdb0c5a9914564f8a8c91ffc4bd24ebfb0ac 20-Jun-2015 Phil Burk <philburk@google.com> Merge "AudioFlinger: reset SPDIF encoder on flush" into mnc-dev
60c545dfc4160a6d46febb9aa6684f6d300ec74d 20-Jun-2015 Andy Hung <hunga@google.com> Fix FastMixer high bit depth Hal support

Bug: 21959591
Change-Id: Ia3351ea5644b36852a1f0dad1314beac97d840e1
udioflinger/FastMixer.cpp
48e6ea95dc23e1c84911f1f907403ac1729c6b78 19-Jun-2015 Phil Burk <philburk@google.com> AudioFlinger: reset SPDIF encoder on flush

This may prevent corrupt data from reaching the AVR.

Bug: 19604395
Change-Id: I3dbdd002326917b9f14dda46a3e5170e1ec799bb
Signed-off-by: Phil Burk <philburk@google.com>
udioflinger/SpdifStreamOut.cpp
eee9697a910c664d2721ef3fcf4e1fad4263466d 19-Jun-2015 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Fix high speed configuration" into mnc-dev
c764de34b37abb05f7ff25fa5f8d540505bb8645 19-Jun-2015 Paul McLean <pmclean@google.com> Merge "Fixing no rates, chans & encodings on input devices for device enum API. Filtering digital attributes for non-digital audio devices." into mnc-dev
9080a4cd8c4e22ddae0350c0c51a20cea1a41016 18-Jun-2015 Paul McLean <pmclean@google.com> Fixing no rates, chans & encodings on input devices for device enum API.
Filtering digital attributes for non-digital audio devices.

Bug: 21876072
21903975

Change-Id: Ia5c81a8160f4b4ebf5941dd0c5dfb68d01699ca6
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
ee140da3422212153f88357725f3fc614de5eb44 19-Jun-2015 Andy Hung <hunga@google.com> Merge "Fix clamp issue with AudioMixer with float input and int16 output" into mnc-dev
83ffcfb53b62489de9d2bd0b0277e879c3e57ab6 19-Jun-2015 Andy Hung <hunga@google.com> Fix clamp issue with AudioMixer with float input and int16 output

Bug: 20706338
Change-Id: I7e3ab0da96901870cc57fbe2e79163bc81157465
udioflinger/AudioMixerOps.h
17338fca4a51dfb32c1291f94b65d4b4f30b682d 19-Jun-2015 Chien-Yu Chen <cychen@google.com> Camera3Device: Fix high speed configuration

If high speed mode changed, HAL needs to reconfigure the streams
even when the stream configurations don't change.

Bug: 21900311
Change-Id: I76aee456b3b6d8c8f599a1638dcd38d75553a235
amera/libcameraservice/device3/Camera3Device.cpp
b36bc776545d9758f3bc9a853a5a0fd51280e9fb 19-Jun-2015 Andy Hung <hunga@google.com> Merge "Reduce log messages on AudioFlinger throttle" into mnc-dev
91b0018d658a509aacceddf9cde84afca591d014 19-Jun-2015 Eric Laurent <elaurent@google.com> Merge "Bug fix on Engine Configurable" into mnc-dev
46d8eb1aa167c8811554cded6640cb6f153b5021 19-Jun-2015 Eric Laurent <elaurent@google.com> Merge "Add a configurable version of the policy engine based on PFW" into mnc-dev
40eb1a1f8871909c272e72afaf7d5af84fea2412 18-Jun-2015 Andy Hung <hunga@google.com> Reduce log messages on AudioFlinger throttle

Bug: 21858740
Change-Id: I8f291b64c1033867bb57ffceaa3b7d94aa998715
udioflinger/Threads.cpp
udioflinger/Threads.h
fa907d4ee326c7bb9cbb4882ab7c0ec42bbceee3 18-Jun-2015 Eric Laurent <elaurent@google.com> Merge "audiopolicy: Add AUDIO_OUTPUT_FLAG_TTS to flags enum table" into mnc-dev
0f17ab7f9fac4327a8772e9199f411af7df912a4 13-May-2015 François Gaffie <francois.gaffie@intel.com> Bug fix on Engine Configurable

This patch fixes a couple of issue within audio policy engine configurable
-valgrind error detected within the parsing of the configuration file
-configuration file typos
-start of the PFW delayed to the init in order to wait the full construction
of the engine object
-wrong specialization of template functions.
-broadcast volume min / max init to stream collection of manager & PFW

Change-Id: I08823ab4040c92b719747c60cc3fa5c8b5f172ac
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/engineconfigurable/parameter-framework/plugin/PolicySubsystem.cpp
udiopolicy/engineconfigurable/src/Engine.cpp
udiopolicy/engineconfigurable/wrapper/ParameterManagerWrapper.cpp
udiopolicy/engineconfigurable/wrapper/config/audio_policy_criteria.conf
20f06f996337c9bf79d0b112083f6427a122ebab 24-Mar-2015 François Gaffie <francois.gaffie@intel.com> Add a configurable version of the policy engine based on PFW

This patch adds a configurable version of the policy engine
based on the parameter framework.
This configurable engine shall be activated with a flag
USE_CONFIGURABLE_AUDIO_POLICY within BoardConfig.mk

This patch provides the generic configuration as an example.
This configuration provides the same user experience as the default
policy engine.

- Fix M Issue on configurable policy engine version.

- Remove the "empty static lib include trick" hack

The code was using a hack to import headers only through an empty lib.
This trick was used not only by the PFW and its plugin but also internally
with policy.

This patch removes this hack and either links againts the real libraries if exist
or point on the path of the header.
However, since header directories are not recursively detected on Andoid, we need to manually
add all necessary libraries. (for example libicuuc needed by libxml2)

- let the build system decide which compiler and which stl is to be used

- Disable by default Audio Policy Settings XML file generation at compilation time

In order not to depend on python tool for the configurable policy example,
this patch adds the generated Settings XML file and disables the generation
from .pfw files at compile time.
If the user wishes to regenerate it, he may use the pfw_rebuild_settings
option.

- Fix Clang issues within Configurable Audio Policy

Fix compilation issues revealed when switching to CLANG compiler
within the configurable version of policy engine.

Change-Id: I3edc26db94c0bf8a76430ab8081bae52e9193705
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/Android.mk
udiopolicy/engine/interface/AudioPolicyManagerInterface.h
udiopolicy/engineconfigurable/Android.mk
udiopolicy/engineconfigurable/include/AudioPolicyEngineInstance.h
udiopolicy/engineconfigurable/include/EngineDefinition.h
udiopolicy/engineconfigurable/interface/AudioPolicyPluginInterface.h
udiopolicy/engineconfigurable/parameter-framework/Android.mk
udiopolicy/engineconfigurable/parameter-framework/example/Android.mk
udiopolicy/engineconfigurable/parameter-framework/example/ParameterFrameworkConfigurationPolicy.xml
udiopolicy/engineconfigurable/parameter-framework/example/README.md
udiopolicy/engineconfigurable/parameter-framework/example/Settings/PolicyConfigurableDomains.xml
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_input_source.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_accessibility.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_dtmf.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_enforced_audible.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_media.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_phone.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_rerouting.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_sonification.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_sonification_respectful.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_transmitted_through_speaker.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/strategy_for_stream.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/strategy_for_usage.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/volumes.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Structure/PolicyClass.xml
udiopolicy/engineconfigurable/parameter-framework/example/Structure/PolicySubsystem-CommonTypes.xml
udiopolicy/engineconfigurable/parameter-framework/example/Structure/PolicySubsystem-Volume.xml
udiopolicy/engineconfigurable/parameter-framework/example/Structure/PolicySubsystem.xml
udiopolicy/engineconfigurable/parameter-framework/example/policy_criteria.txt
udiopolicy/engineconfigurable/parameter-framework/plugin/Android.mk
udiopolicy/engineconfigurable/parameter-framework/plugin/InputSource.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/InputSource.h
udiopolicy/engineconfigurable/parameter-framework/plugin/PolicyMappingKeys.h
udiopolicy/engineconfigurable/parameter-framework/plugin/PolicySubsystem.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/PolicySubsystem.h
udiopolicy/engineconfigurable/parameter-framework/plugin/PolicySubsystemBuilder.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/Strategy.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/Strategy.h
udiopolicy/engineconfigurable/parameter-framework/plugin/Stream.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/Stream.h
udiopolicy/engineconfigurable/parameter-framework/plugin/Usage.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/Usage.h
udiopolicy/engineconfigurable/parameter-framework/plugin/VolumeProfile.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/VolumeProfile.h
udiopolicy/engineconfigurable/src/Collection.h
udiopolicy/engineconfigurable/src/Element.h
udiopolicy/engineconfigurable/src/Engine.cpp
udiopolicy/engineconfigurable/src/Engine.h
udiopolicy/engineconfigurable/src/EngineInstance.cpp
udiopolicy/engineconfigurable/src/InputSource.cpp
udiopolicy/engineconfigurable/src/InputSource.h
udiopolicy/engineconfigurable/src/Strategy.cpp
udiopolicy/engineconfigurable/src/Strategy.h
udiopolicy/engineconfigurable/src/Stream.cpp
udiopolicy/engineconfigurable/src/Stream.h
udiopolicy/engineconfigurable/src/Usage.cpp
udiopolicy/engineconfigurable/src/Usage.h
udiopolicy/engineconfigurable/wrapper/Android.mk
udiopolicy/engineconfigurable/wrapper/ParameterManagerWrapper.cpp
udiopolicy/engineconfigurable/wrapper/audio_policy_criteria_conf.h
udiopolicy/engineconfigurable/wrapper/config/audio_policy_criteria.conf
udiopolicy/engineconfigurable/wrapper/include/ParameterManagerWrapper.h
udiopolicy/utilities/convert/convert.h
e8d55a5d1f6b08cfdabea7628e956063a47fa160 18-Jun-2015 Ravi Kumar Alamanda <ralama@codeaurora.org> audiopolicy: Add AUDIO_OUTPUT_FLAG_TTS to flags enum table

Without an entry in sOutputFlagNameToEnumTable, a profile with
specific output flag in the audio_policy.conf will not be
detected by AudioPolicyManager.

Change-Id: Id242e6819aab1a67d72c564f3cc39af3de8e1ef7
udiopolicy/common/managerdefinitions/include/ConfigParsingUtils.h
3fc792fe36b0b9100f74185665221b37f650ff65 18-Jun-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: fix explicit routing and accessibility" into mnc-dev
0907d87dca62cd5bc12d26892c411b7140d148b0 13-Jun-2015 Andy Hung <hunga@google.com> Merge "Fix AudioRecord cleanup if construction fails" into mnc-dev
4c6afaf1053ecbfda6d95098e0f49772ecbcf2e1 13-Jun-2015 Andy Hung <hunga@google.com> Fix AudioRecord cleanup if construction fails

Bug: 11671194
Change-Id: Id48350264f8b5ce53bf7ce2b308bf4ba21e59241
udioflinger/Tracks.cpp
f8f2f137cceebe3bee4ff3219bc75189a4eccc65 13-Jun-2015 Ruben Brunk <rubenbrunk@google.com> Merge "Fix rounding width." into mnc-dev
77a77f6ef6f04dba8caa54bda937cb276cace9ad 13-Jun-2015 Ruben Brunk <rubenbrunk@google.com> Fix rounding width.

Bug: 19930700
Change-Id: I9d5685bd98a049fcb01f6ecc649f15f3b4498e6d
amera/libcameraservice/api2/CameraDeviceClient.h
bd1c3e36767d08813b912028e69a8b7fed315ea2 12-Jun-2015 Andy Hung <hunga@google.com> Merge "audiopolicy: use deep buffer output by default for music streams" into mnc-dev
439e4ed408c21bd65711d279bd5251cef7e83440 03-Apr-2015 Ravi Kumar Alamanda <ralama@codeaurora.org> audiopolicy: use deep buffer output by default for music streams

Default disabled. This is enabled by

adb shell setprop audio.deep_buffer.media 1

Applications that use AudioTrack java interface for audio rendering
defaults to primary output as flags indicated as FLAG_NONE. If the
primary output is low latency output, it results higher power
consumption than deep-buffer path if used.
Make the deep buffer output as default option for music streams if
flags are not specified.

It may also be used for testing audio glitches from heavy CPU
or DRM which may cause issues with the FastMixer.

Bug: 21198655
Bug: 21785618
Change-Id: I909c296ddcf4484b9a877ef1c0230ea58537e06a
udiopolicy/managerdefault/AudioPolicyManager.cpp
093a20cbe70d0033c085ef7be90b9f1bbacb3335 11-Jun-2015 Eric Laurent <elaurent@google.com> audio policy: fix explicit routing and accessibility

If a session has an active explicit routing request, this routing
must also be applied to accessibility prompts if accessibility
usage is currrently remapped to the strategy used by this session.

Bug: 20873151.
Change-Id: I97c6ece98cf1af9c64c2d2eb1fe382c7c0d657b4
udiopolicy/managerdefault/AudioPolicyManager.cpp
ad9ef61e770c0751a9983aa5c9844dfeb9ed665b 11-Jun-2015 Phil Burk <philburk@google.com> Merge "AudioFlinger: flush stream when switching tracks" into mnc-dev
43b4dcc660e6da96285e4672ae371070ab845401 10-Jun-2015 Phil Burk <philburk@google.com> AudioFlinger: flush stream when switching tracks

For direct threads, when recycling a stream, perform a flush so
that the frame position is reset.

Bug: 21145353
Change-Id: I08611cd64bb249a9659c44f9e4c47e7455f4838f
Signed-off-by: Phil Burk <philburk@google.com>
udioflinger/Threads.cpp
udioflinger/Threads.h
e1c3cf01a58e45ec3784a1e877e16ce9ef7f6d1c 10-Jun-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: route media to BT SCO in call" into mnc-dev
6021de00076de9e358b3d557b58f79d7bb067ecd 09-Jun-2015 Eino-Ville Talvala <etalvala@google.com> Merge "CameraService: Add consumer name to output stream dumpsys" into mnc-dev
727d172137b4f32681c098de8e2623c0b65a6406 09-Jun-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Add consumer name to output stream dumpsys

Also switch use of ANativeWindow to Surface, to get to the
getConsumerName() method where necessary.

Surface can always be cast to ANativeWindow, but not the other way
around, so it's a better option anyway.

Change-Id: Ie5c2d30821c1a754f9e382699ff50b4b328288b3
amera/libcameraservice/CameraFlashlight.cpp
amera/libcameraservice/CameraFlashlight.h
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/Camera2Client.h
amera/libcameraservice/api1/client2/CallbackProcessor.cpp
amera/libcameraservice/api1/client2/CallbackProcessor.h
amera/libcameraservice/api1/client2/JpegProcessor.cpp
amera/libcameraservice/api1/client2/JpegProcessor.h
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
amera/libcameraservice/api1/client2/StreamingProcessor.h
amera/libcameraservice/api1/client2/ZslProcessor.cpp
amera/libcameraservice/api1/client2/ZslProcessor.h
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device2/Camera2Device.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.h
amera/libcameraservice/device3/Camera3ZslStream.cpp
984591672a6f4096ee92c4a582d4c54ee6023c43 09-Jun-2015 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3Device: Default-initialize operating mode." into mnc-dev
9a17941fa70e43119d2c3464bc00a3cd30b2bd14 09-Jun-2015 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Default-initialize operating mode.

Since configureStreams is only called by CameraDeviceClient,
the operation mode could default-initialize to CONSTRAINED_HIGH_SPEED
for API1 operation.

Change-Id: Ide71af07ca3925db8e450d00def1daeb44d8046a
amera/libcameraservice/device3/Camera3Device.cpp
4492b55354e3fa18330d389ced1daf1635fdde33 09-Jun-2015 Glenn Kasten <gkasten@google.com> Merge "Take advantage of audio_channel_in_mask_from_count" into mnc-dev
e1635ec096d1110c33a5aa46847af59c261fb7fa 09-Jun-2015 Glenn Kasten <gkasten@google.com> Take advantage of audio_channel_in_mask_from_count

Bug: 21375533
Bug: 21721483
Change-Id: I1ccd5d1d68a25f415dc4a62bf7a44d9db12a256b
udioflinger/Threads.cpp
d46a6b9fd8b2a4f9098757384711e2cd03a91651 15-May-2015 Eino-Ville Talvala <etalvala@google.com> Camera1 API: Support SW encoders for new camera HALs

- Support new set video format/dataspace command in camera service
- HALv3: Select gralloc usage flags based on format
- HALv1: Pass format command directly to HAL layer
- Use format/dataspace command in CameraSource
- Switch all API1 recording to use metadata mode
- Switch all >= HALv2 API1 recording to use kMetadataBufferTypeANWBuffer

Bug: 13222807
Change-Id: I2e609b92c65792611bb1dab09e0c41c363ebbc42
amera/libcameraservice/Android.mk
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/Camera2Client.h
amera/libcameraservice/api1/client2/CallbackProcessor.cpp
amera/libcameraservice/api1/client2/JpegProcessor.cpp
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
amera/libcameraservice/api1/client2/StreamingProcessor.h
amera/libcameraservice/api1/client2/ZslProcessor.cpp
amera/libcameraservice/api1/client2/ZslProcessor3.cpp
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device2/Camera2Device.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3StreamInterface.h
72249d5b2f9f42a96c0e0825431e8f3f49b82644 08-Jun-2015 Eric Laurent <elaurent@google.com> audio policy: fix very verbose log build.

Change-Id: I94a69207059d8010ded14bce5d6e39c3f3074649
udiopolicy/managerdefault/AudioPolicyManager.cpp
a20d4fa431d1091abf66f9d426ef0cf441db6623 05-Jun-2015 Eric Laurent <elaurent@google.com> audio policy: route media to BT SCO in call

Allow media (and Navigation instructions) to be routed
to BT SCO in call.

Bug: 18986190.

Change-Id: I1fa4decfbf035623fdcc8681b53cbd61e1d5f933
udiopolicy/enginedefault/src/Engine.cpp
e3afb2cc438b76ae433c8c40ceabf0457ad7a678 04-Jun-2015 Eino-Ville Talvala <etalvala@google.com> Camera: Change error for app ops reject, propagate binder errors

INVALID_OPERATION surfaces as an non-specific device-level error to
applications in the onError callback. This is not a condition apps
targeting camera2 in L will generally have to deal with.

Instead, return -EACCESS which maps to throwing
CameraAccessException.CAMERA_DISABLED, same as disabling camera access
with DevicePolicyManager.

The old camera API converts any error code to -EACCESS at the JNI layer,
so this doesn't change anything for the older API.

Also update the various native ICameraService binder connect calls to
check for the transact error code, and return it if it is not OK.
Without this, PERMISSION_DENIED transact errors from the camera
service cannot be distinguished from CAMERA_DISABLED errors in
some codepaths.

Bug: 21604925
Change-Id: Ifccc8989b8c20653429e2d3e51dba7abb2be9c35
amera/libcameraservice/CameraService.cpp
1fa8999c91d5df81949aa723000058380cd3faa2 02-Jun-2015 Zhijun He <zhijunhe@google.com> Camera2: implement high speed video APIs

Bug: 21442271
Change-Id: Ia0ae5bbd3e8c81bad293c29987301a2457817d12
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/common/CameraModule.cpp
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device2/Camera2Device.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
9cf332ca156132931da397bae94b89debb40de10 03-Jun-2015 Andy Hung <hunga@google.com> Merge "Throttle MixerThread data pull to no more than twice expected rate" into mnc-dev
08fb1743f80437c38b4094070d851ea7f6d485e5 01-Jun-2015 Andy Hung <hunga@google.com> Throttle MixerThread data pull to no more than twice expected rate

This helps prevent underruns with NuPlayer and other applications
which set up buffers that are close to minimum size or use deep
buffers, and rely on a double-buffering sleep strategy to fill.

Enabled by default. Disabled by setting af.thread.throttle 0

Bug: 19062223
Bug: 21198655
Change-Id: Ia52b48e0c99588af5db53c43fede2afd775b8899
udioflinger/Threads.cpp
udioflinger/Threads.h
40b26470dd29e44f1601ceb6e60948586a4d9f88 02-Jun-2015 Glenn Kasten <gkasten@google.com> Fix build

Change-Id: I4d1e396d812b6a22087d35156633451d5c1c36bc
udioflinger/ServiceUtilities.cpp
de07e3743ef9c3dfe45864bf941b918147126500 02-Jun-2015 Glenn Kasten <gkasten@google.com> Allow capture by root for command-line native testing

Change-Id: I3cafd70b7770c7e4b578d39a8d570572829f2c59
udioflinger/ServiceUtilities.cpp
20d09f3d9a82dc4ce51824025ef7a465f62086d0 02-Jun-2015 Andy Hung <hunga@google.com> Merge "Add property to control audio offload with video content" into mnc-dev
cb18ec05b7097a63262b81afe1e866105d400f4a 02-Jun-2015 Ruben Brunk <rubenbrunk@google.com> Merge "Track camera and flashlight usage in battery stats." into mnc-dev
08945c44a97d3749cc48f860eb4e01e57183ad90 01-Jun-2015 Andy Hung <hunga@google.com> Add property to control audio offload with video content

Property audio.offload.video normally disabled (set to 1 to enable)

Bug: 21198655
Change-Id: Ib1c457b1e3950f18d91b855424aa80bd23c723b0
udiopolicy/managerdefault/AudioPolicyManager.cpp
99e69716215cd0665379bc90d708f2ea8689831d 27-May-2015 Ruben Brunk <rubenbrunk@google.com> Track camera and flashlight usage in battery stats.

Bug: 15986092

Change-Id: I9dc6828332e4091fd93bf2d82839e8e3862a2fc2
amera/libcameraservice/Android.mk
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/utils/ClientManager.h
f9a3dce5d44b1ba598cc6f6a2e80da36e44618f7 01-Jun-2015 Chien-Yu Chen <cychen@google.com> Merge "Camera3: fix aborting reprocess requests" into mnc-dev
c2adf48e2dfae0b2b5ddd9de9e7d79ca471bfd37 27-May-2015 Chien-Yu Chen <cychen@google.com> Camera3: fix aborting reprocess requests

Get an input buffer right after camera service takes one
reprocess capture request from the request queue to prevent
the input buffers getting out of order.

When aborting pending reprocess requests in the request queue, also
abort the same amount of input buffers.

Bug: 21028914
Change-Id: I7cfacecb4c24509f59c983abd587db5a403237bd
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
e1f939bf0e1bac806b7da1b316e70c96426dc1b6 30-May-2015 Glenn Kasten <gkasten@google.com> Merge "Add more device codes for symbolic display" into mnc-dev
76b1d55b69f0d1d36bb96ab0c206ef1eff715d82 29-May-2015 Ricardo Garcia <rago@google.com> Merge "Fix for audio effects in offload path for mono content" into mnc-dev
fb683371379606bd3f41c880d83e33f8f3e445ac 29-May-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: derive LSC characteristics keys" into mnc-dev
3e28a1a1dea11eada3a1c27b973301796032ae20 23-May-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: derive LSC characteristics keys

Also fix a typo in AWB lock available key.

Bug: 21403373
Bug: 20883751
Change-Id: I5156f4fafcf4ae86f680fb618966c7cc58900120
amera/libcameraservice/common/CameraModule.cpp
0ec23d3f89d804cc1d9dea8f0585dc6d57bfd5c2 29-May-2015 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Do not call cleanUpFailedRequest with mutex held

Double-acquiring a non-recursive mutex tends to work poorly.

Bug: 21498811
Change-Id: I1d59959fca69c97684522195808019797f7a6a7d
amera/libcameraservice/device3/Camera3Device.cpp
d11da70f0e1d06ee6c7b2f83fcfb06257a1c90f2 28-May-2015 Ricardo Garcia <rago@google.com> Fix for audio effects in offload path for mono content

Effects path is always stereo, and it should be initialized as thus even
if the source is mono. Fixed condition check before initialization.

bug: 18157592
Change-Id: Idd7241931e4ba6085fd804345128d898c8511e11
udioflinger/Effects.cpp
e74c228e83906e0e317c4eb6eac20815ff839c04 27-May-2015 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Close hole in prepare in-use stream check

There's a narrow window in which a capture request is neither in the
request queue or handed off to the HAL, which can be expanded to some
size if buffers have to be allocated. During this window, the
prepare() method will not correctly notice that a stream should be
considered in use.

Add a member to contain the current request being processed, and check
against it in prepare as well.

Change-Id: I3a198d617f5feee0a3332af4b4439f24eda28ea3
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
ad9cb8b88e4f8face23f01d8dc89fa769dacb50f 27-May-2015 Eric Laurent <elaurent@google.com> audio flinger: add suffix to time variables names

Add suffix to clarify units for the following variables:
standbyTime -> mStandbyTimeNs
standbyDelay -> mStandbyDelayNs
activeSleepTime -> mActiveSleepTimeUs
idleSleepTime -> mIdleSleepTimeUs
sleepTime -> mSleepTimeUs

Change-Id: I7f5d602c39e0ef3f6fe9ef99eaf1b351c7bd4fc3
udioflinger/Threads.cpp
udioflinger/Threads.h
3ab77c1e93f3da5da0d18ff998f1bd6db19534f3 27-May-2015 Eric Laurent <elaurent@google.com> Merge "audio flinger: pause direct output when underrunning" into mnc-dev
84d61caa6040e346df68dbe6f8e4fe339906de08 07-May-2015 Glenn Kasten <gkasten@google.com> Add more device codes for symbolic display

Change-Id: I08553f0e94d0a0931ccf98ee04f53686b96c8b03
udioflinger/Threads.cpp
5cff403679fc44c8293de81aed31c459c6129243 26-May-2015 Eric Laurent <elaurent@google.com> audio flinger: pause direct output when underrunning

If a direct output supports pause, pause the stream
instead of placing it into standby when the audio track
underruns. This will avoid resetting the presented frame count
and preserve A/V sync.

Bug: 21437855.

Change-Id: I598346edb62a1864126acdb1d9a937c82eac2191
udioflinger/Threads.cpp
6374077319a2d060eefe5f4bf425aed37f90c5d0 22-May-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: add checks on primary output" into mnc-dev
d38f10d574de43c37b494b389872c7fb7bbe8828 22-May-2015 Eric Laurent <elaurent@google.com> Merge "sound trigger: fix abort event init." into mnc-dev
7b56f2e1e9495915ad9dea9afdc13e9e5d5b7536 22-May-2015 Eric Laurent <elaurent@google.com> sound trigger: fix abort event init.

Initialize unused fields of recognition abort event
to avoid argument type check exception in JNI.

Bug: 20951546.
Change-Id: I65ed3284464bd9a32406b5305d562fa434abedce
oundtrigger/SoundTriggerHwService.cpp
87ffa39d29d1803b48237888a9fbf3d5f2c60c21 22-May-2015 Eric Laurent <elaurent@google.com> audio policy: add checks on primary output

Check if primary output has been initialized before using it.
The primary output may not be initialized either due to HAL failure or
on devices without telephony.

Bug: 19573336.
Change-Id: Id1fc3ed588268e1232b43d1e6235254d2f1a71d0
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
aa4817489d0c68449769a888ca9507bd09648b01 22-May-2015 Andy Hung <hunga@google.com> Merge "Improve volume input check for AudioMixer" into mnc-dev
e09c994e7a3e73d5dbdc73d1f2d3556ec2203b0d 09-May-2015 Andy Hung <hunga@google.com> Improve volume input check for AudioMixer

Change-Id: I5b656b123847529f2b76af2a68bd4e9b691882f4
udioflinger/AudioMixer.cpp
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
udioflinger/Threads.h
2232aee25e4df7d04446912e8ad9e9dc44d8ec16 20-May-2015 Ruben Brunk <rubenbrunk@google.com> Merge "camera: Add AIDL interface for CameraServiceProxy." into mnc-dev
2823ce0ce6f9d508a07de20912c93cce9165027f 20-May-2015 Ruben Brunk <rubenbrunk@google.com> camera: Add AIDL interface for CameraServiceProxy.

- Adds an AIDL interface to allow the proxy camera service
running in system server to accept RPCs from the camera
service running in mediaserver.
- Request an update to the valid user set from the proxy
camera service when mediaserver restarts to initialize
properly + avoid DOS after a crash.

Bug: 21267484

Change-Id: Ib821582794ddd1e3574b5dc6c79f7cb197b57f10
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
523d08709ba4a0124eb2117907d79113fbe00cfb 20-May-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: fix direct output profile selection" into mnc-dev
fb2b8eaf0c4bf980605030f3c66b44a097fa7950 20-May-2015 Eino-Ville Talvala <etalvala@google.com> Merge "CameraService: Logcat conflicting devices on rejected open" into mnc-dev
861a628adbcbe7c3baa6eab1b765b87b480ff4a2 19-May-2015 Eric Laurent <elaurent@google.com> audio policy: fix direct output profile selection

Fix logic in AudioPolicyManager::getProfileForDirectOutput()
to select the direct output with most matching flags and not just
the first compatible one.

Also fixes issue 17783395 which was fixed by commit f7bc29b02
in lmp-tv-dev branch only but in a way that caused a regression
for HW A/V sync (issue 19384172).

Also removed duplicated code lines in getOutputForDevice()

Bug: 20819715.
Bug: 17783395.
Bug: 19384172.

Change-Id: I7fc793b37f9b53fabd92cab6b884ef85cfdafee4
udiopolicy/managerdefault/AudioPolicyManager.cpp
8ef66c6662002279a606df70f41651491a349126 20-May-2015 Andy Hung <hunga@google.com> Merge "Update FastTrack channel conversion check" into mnc-dev
9f7eddb757d84640786174e8ce78a3221e829cd4 20-May-2015 Andy Hung <hunga@google.com> Merge changes Iba5ccd18,I97e578f3 into mnc-dev

* changes:
Fix channel mask dump in AudioFlinger
Allow creation of output endpoints with channel index masks
022f0cb0c6f135edde4ebe84859c685933ee895e 20-May-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Logcat conflicting devices on rejected open

Already in dumpsys log, but also put into logcat for feedback reports

Also fix a minor warning about an uninitialized variable.

Bug: 21063372
Change-Id: I04b45932e4500ac72aaa1cb724abc8a82a0e70e8
amera/libcameraservice/CameraService.cpp
9706bfe34c41c923fc1c4b39e97a8845556ca902 20-May-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: API1 shim: notify shutter correctly" into mnc-dev
1f439e1cf16a29347288ba9ddd06c0b6d086a145 19-May-2015 Andy Hung <hunga@google.com> Update FastTrack channel conversion check

Change-Id: Ia1a3124e6408859bf4d95ff9fd95dda6970a4a7f
udioflinger/Threads.cpp
f98ec8d0d42e6952c0a7cc5027935851073f7426 19-May-2015 Andy Hung <hunga@google.com> Fix channel mask dump in AudioFlinger

Change-Id: Iba5ccd1885775b14c44342c7b169a0672b93549b
udioflinger/Threads.cpp
64b6cb2cd5646a5ffcdb2cccee09a170ef2882d5 19-May-2015 Andy Hung <hunga@google.com> Allow creation of output endpoints with channel index masks

Bug: 21301523
Change-Id: I97e578f3da933f7086e4f431a199ed907f04cbc8
udioflinger/AudioFlinger.h
216db7455a19a2f1a5b29e3a9610231365b6c778 19-May-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: API1 shim: notify shutter correctly

Previous implementation only notifies the callback when we receive
full capture result. This implementation notifies the callback
once HAL sends capture start callback.

Bug: 12530628
Change-Id: Ibf71d532b5cf649514b316e35683c217021698b4
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/Camera2Client.h
amera/libcameraservice/api1/client2/CaptureSequencer.cpp
amera/libcameraservice/api1/client2/CaptureSequencer.h
88063ca54bc064fedb836fa020b699f8c61ce6ed 16-May-2015 Chih-Hung Hsieh <chh@google.com> Merge changes Ia529bf53,I10888d0b into mnc-dev

* changes:
Enable building with clang/llvm.
Enable clang compilation.
926ac73529a3b1fc614f8e7f1b2ed35564fc51e6 12-May-2015 Chih-Hung Hsieh <chh@google.com> Enable building with clang/llvm.

The llvm bug https://llvm.org/bugs/show_bug.cgi?id=21572 was fixed.

BUG: 18373866
Change-Id: Ia529bf53267f636880515ccefb4ca1cf7d731baf
(cherry picked from commit 7630881d853b130e2c1f11cb2dafebe684bcfa91)
udioflinger/Android.mk
ff2116e805a3d72cf8bdb07fb47554b93faa93fa 14-May-2015 Chih-Hung Hsieh <chh@google.com> Enable clang compilation.

Previous clang/llvm bug was fixed.

BUG: 18373866
Change-Id: I10888d0bc1cf8f621c719a705b1f77ff0d0ecca5
(cherry picked from commit 1ab4ff2355e934517751e40573e4163cb49b1676)
udioflinger/tests/Android.mk
6267b539d0d1ee7118aafd976d75cb8db397bc24 01-May-2015 Ruben Brunk <rubenbrunk@google.com> camera2: Fix work-profile eviction handling.

Bug: 20124384
Change-Id: I6fb82dbfd5f98746ed4befed81a583e3709bfee8
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
24fdd7a48ad8ef66f1e91567a9f7f4d8f89faa7f 14-May-2015 Ruben Brunk <rubenbrunk@google.com> Merge "camera2: Fix empty set handling for eviction." into mnc-dev
8050721de77a64c7b53467c5959f0ea38d80cab3 14-May-2015 Ruben Brunk <rubenbrunk@google.com> camera2: Fix empty set handling for eviction.

Bug: 20304829
Change-Id: I120ed6e41ca592c3770797a5fb1e5ce556543949
amera/libcameraservice/utils/ClientManager.h
467b6e152e3064b8da58551effb39e72acec14af 14-May-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: update CameraModule deriveKey" into mnc-dev
56d78dffbd2e88987f693edb56d8fb9e5cd1c9f8 14-May-2015 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Cleanup to prepare() implementation" into mnc-dev
261394e3edbe10f4f145f543187dcfbabf702c11 13-May-2015 Eino-Ville Talvala <etalvala@google.com> Camera: Cleanup to prepare() implementation

- Mutexes _might_ be a good idea
- Don't be surprised by behavior that's expected
- Use the existing logging macros

Bug: 20537148
Change-Id: Ie62985a786d7e6645b4e4fe019dd98b02891a1f7
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/device3/Camera3Device.cpp
dce0777a1c82557fc108dfcd9665e06d583780d1 13-May-2015 Eric Laurent <elaurent@google.com> Merge "audio flinger: fix record permission check" into mnc-dev
617575b17de9b22247eb59948f134939641bd1bd 13-May-2015 Eric Laurent <elaurent@google.com> audio flinger: fix record permission check

Bug: 21022842.
Change-Id: Iff7c2ce715fa5e7ff029dbf6a3f27c6a8bc0735d
udioflinger/ServiceUtilities.cpp
2882bb9a94bba6477552e7f696984e8e1ce052ff 13-May-2015 Ruben Brunk <rubenbrunk@google.com> Merge "camera2: Fix arbitration priority calculation." into mnc-dev
be0b6b4a3770a9dd2ff357fe3e88a6ba11a976ff 13-May-2015 Ruben Brunk <rubenbrunk@google.com> camera2: Fix arbitration priority calculation.

- Simplify priority calculation + handle constants
added for device sleep: FOREGROUND_SERVICE and
TOP_SLEEPING.

Bug: 19186859
Change-Id: Ia2a5517cd3150deaccb58a0aa1eaa583cb769add
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
d9f493ebcd1830c76d7b1782e64c7ba9ad8ab4bd 12-May-2015 Andy Hung <hunga@google.com> Merge "Update sampling rate to 192kHz for devices" into mnc-dev
69dce3343ffe33d2ba60ab4c6755953a7ec96899 12-May-2015 Marco Nelissen <marcone@google.com> Merge "Work around bug in offload driver" into mnc-dev
078538cfc6c4682889ed52de460d29c0d15bb9eb 12-May-2015 Marco Nelissen <marcone@google.com> Work around bug in offload driver

There is a bug in the offload driver that causes the last offload buffer(s)
to be dropped unless the device is on power or holding a wake lock.
To avoid truncated playback, we now hold a wake lock during the drain phase
of offloaded playback.

Bug: 19928717
Change-Id: I8df22e965ec791448aa5d9b74e743f48ef886fc4
udioflinger/Threads.cpp
d0e25a2529584b07e4fe3544f973c6b0ebda7fc3 12-May-2015 Ronghua Wu <ronghuawu@google.com> Merge "mediaresourcemanager: change resource manager service log to use ring buffer." into mnc-dev
db4c031f518ae5806af73756273ff32cd8d0e4f8 06-May-2015 Andy Hung <hunga@google.com> Update sampling rate to 192kHz for devices

Change-Id: I0a83206be51d7ae18ccf85b94b2127356307be69
udioflinger/AudioMixer.cpp
udioflinger/Threads.cpp
udiopolicy/common/include/policy.h
udiopolicy/common/managerdefinitions/src/AudioPort.cpp
28e8ef72dab287af59663b89b12507e43f760701 12-May-2015 Svetoslav <svetoslavganov@google.com> Fail gracefully when camera app op is not enabled.

Change-Id: I0c7c1dca1c0966efaf30bcfe12636953683712ab
amera/libcameraservice/CameraService.cpp
7e31a87177740d06c4a1bc81369d3cfb9e013ad9 12-May-2015 Svetoslav Ganov <svetoslavganov@google.com> Merge "Revert "Add camera app op - camera"" into mnc-dev
280405a138a0068694f3c39b4290f510173133d9 12-May-2015 Svetoslav Ganov <svetoslavganov@google.com> Revert "Add camera app op - camera"

This is not needed duplication of work

This reverts commit 32fa6d0e65dbf956e253a1006e9419dce2fe75c9.

Change-Id: I2c81b0dacb2ed99c408c79c1f9e22a4baa564494
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/common/Camera2ClientBase.cpp
fedef1384d5ff758285fb19161a0348e1e32ab3f 12-May-2015 Andy Hung <hunga@google.com> Merge "Support channel index masks for output hal" into mnc-dev
af49160aa75d4e1750f3ed56b812ec9cc448fa46 12-May-2015 Andy Hung <hunga@google.com> Merge "Allow 8 channels in RecordThread" into mnc-dev
022ed72e650f756288492ac7a10a7b41e0b14f82 12-May-2015 Ronghua Wu <ronghuawu@google.com> mediaresourcemanager: change resource manager service log to use ring buffer.

move the ring buffer implementation from libcameraservice to media include.

also add line prefix support to the service log.

Bug: 20637674
Change-Id: Ib6b32f31abe92c42644ef7012f1e3d46220ccfbd
amera/libcameraservice/CameraService.h
amera/libcameraservice/utils/RingBuffer.h
ediaresourcemanager/ResourceManagerService.cpp
ediaresourcemanager/ServiceLog.cpp
ediaresourcemanager/ServiceLog.h
ediaresourcemanager/test/ServiceLog_test.cpp
c36a8897ff877f4c5b2e0580830faef8b87dd74a 25-Apr-2015 Ravi Kumar Alamanda <ralama@codeaurora.org> audiopolicy: Use AUDIO_OUTPUT_FLAG_TTS for TTS stream

Use AUDIO_OUTPUT_FLAG_TTS by default for TTS stream to see
if the HW supports a dedicated output for the same. If not,
fallback to primary output as it is done currently.

Change-Id: Ifb2ef7066e75c61fe4c1b9783c12627386a00ea5
udiopolicy/managerdefault/AudioPolicyManager.cpp
badb2c466b9a9e84ad1cd794c52052a436b661fa 09-May-2015 Eric Laurent <elaurent@google.com> Merge "AudioMixer: fix for volume ramp in float mode" into mnc-dev
ef2c7aa096d95bbc74a75078c07f300fb2d94172 09-May-2015 Eric Laurent <elaurent@google.com> Merge "Revert "Revert "Enable full floating point path in AudioMixer""" into mnc-dev
43412fc79ceda964cf9d16e3b4c563849db57d3a 09-May-2015 Eric Laurent <elaurent@google.com> AudioMixer: fix for volume ramp in float mode

Bug: 20912450.
Bug: 19952126.
Change-Id: I1ff3c3f4c0dd673bbbc17ce8da14d446fdb7e8a8
udioflinger/AudioMixer.cpp
1924c9b12eae39d074235a3ec25770795d220157 09-May-2015 Eric Laurent <elaurent@google.com> Revert "Revert "Enable full floating point path in AudioMixer""

This reverts commit 5dcaebbea5dca62ca55d6137777caa67fc757dd6.

Change-Id: I8bfc668baf53dc03a9516c50e2a4d625ec767d0a
udioflinger/AudioMixer.cpp
70f0d62d5f9b81d53f4ca28cd5dbb39ca0a2cdc2 08-May-2015 Eric Laurent <elaurent@google.com> Merge "audio flinger: fix fuzz test crash" into mnc-dev
f6870aefc5e31d4220f3778c4e79ff34a61f48ad 08-May-2015 Eric Laurent <elaurent@google.com> audio flinger: fix fuzz test crash

Clear output stream pointer in duplicating thread
when the main output to which it is attached is closed.

Also do not forward master mute and volume commands to
duplicating threads as this is not applicable.

Also fix logic in AudioFlinger::primaryPlaybackThread_l()
that could accidentally return a duplicating thread.
This never happens because the primary thread is always
first in the list.

Bug: 20731946.
Change-Id: Ic8869699836920351b23d09544c50a258d3fb585
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
9ba21b9418d10ddcc39f08901e24fbf43d82b2bc 21-Apr-2015 Ronghua Wu <ronghuawu@google.com> libstagefright: config resource manager with secure codec co-existing policy.

Bug: 19620911
Change-Id: I0d729782c1622f23e9c37b7a9231e58e3f807470
ediaresourcemanager/ResourceManagerService.cpp
ediaresourcemanager/test/ResourceManagerService_test.cpp
7fcda0f1678b3efd2b3d965b38ba334c3e5f5329 08-May-2015 Dan Albert <danalbert@google.com> Merge "Kill a new user of stlport." into mnc-dev
cf85459e2f8cb2873fffc4e8fd05a5ba6c149972 08-May-2015 Ronghua Wu <ronghuawu@google.com> Merge "mediaresourcemanager: add ServiceLog to track the calling history for dumpsys." into mnc-dev
6ff06612638a13faa85c6219d42a9c4b645003d9 08-May-2015 Eric Laurent <elaurent@google.com> Merge "Revert "Enable full floating point path in AudioMixer"" into mnc-dev
5dcaebbea5dca62ca55d6137777caa67fc757dd6 08-May-2015 Eric Laurent <elaurent@google.com> Revert "Enable full floating point path in AudioMixer"

This reverts commit 5b8fde71e08f57478ef25d040fc5f66294011ac6.

temporary revert while we investigate.

Bug: 20912450.
udioflinger/AudioMixer.cpp
a9b84966942fc4e7ab100376a4c5c41271fede8e 07-May-2015 Dan Albert <danalbert@google.com> Kill a new user of stlport.

Bug: http://b/15193147
Change-Id: I20d21a040f0c2c6c291053fe02fdf82e33ed56a0
(cherry picked from commit 1b5a73358b72b8ff1bee05cc44d94b47b73ede44)
udiopolicy/enginedefault/Android.mk
b28c344904e9bab979ec58a1c7b42b0bf25234ba 07-May-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: update CameraModule deriveKey

To add derived keys into availableCharacteristicsKey.

Bug: 20883751
Change-Id: I49d6d1bb79e6f31825dbfdebb039acbd5d9abe68
amera/libcameraservice/common/CameraModule.cpp
a8ec8fcf6982ef158daf897faaab3e45285d0bf1 07-May-2015 Ronghua Wu <ronghuawu@google.com> mediaresourcemanager: add ServiceLog to track the calling history for dumpsys.

Bug: 20637674
Change-Id: I9d74d98f8eb729a8681877f86419aa2c979f3b7c
ediaresourcemanager/Android.mk
ediaresourcemanager/ResourceManagerService.cpp
ediaresourcemanager/ResourceManagerService.h
ediaresourcemanager/ServiceLog.cpp
ediaresourcemanager/ServiceLog.h
ediaresourcemanager/test/Android.mk
ediaresourcemanager/test/ServiceLog_test.cpp
5da9f8450c8d91ec91b79a74542f997a4bbb2f27 07-May-2015 Chien-Yu Chen <cychen@google.com> Merge "Camera2: allow mixing regular/reprocess requests" into mnc-dev
49822fe2aa38cab4a8cdf2221480181ae7a5f9d0 07-May-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: clarify use of mName field for audio devices" into mnc-dev
7288ab87a7aa730ffe97d7dc7e118123107bfcea 07-May-2015 Eric Laurent <elaurent@google.com> audio policy: clarify use of mName field for audio devices

The audio port field mName was used for two different purposes
which caused a problem when exposing this information at the SDK API.

Create a new "mTag" field storing the audio_policy.conf device tag
if needed.
Field "mName" is now used to store any additional name associated to
a given device when available (e.g Manufacturer and model name for a USB device).

Change-Id: I17fa872e4a3a2e1b7cbb807c6f72e095a8a2c9c5
udiopolicy/common/managerdefinitions/include/DeviceDescriptor.h
udiopolicy/common/managerdefinitions/src/ConfigParsingUtils.cpp
udiopolicy/common/managerdefinitions/src/DeviceDescriptor.cpp
udiopolicy/common/managerdefinitions/src/HwModule.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
5603d28707ef0f19b2b915756809424698e93d9c 05-May-2015 Chih-Hung Hsieh <chh@google.com> Make header functions "inline" to avoid warning when unused.

Change-Id: Iefac44f3c0e1c3fd4b19833d9692744100f92e00
(cherry picked from commit 5e9febef197a9852c833a0aedc6bfee179c4ae9e)
udiopolicy/common/include/policy.h
d7ab7afa57ed1fa6fb9c4ce18ea0df3ec939c067 06-May-2015 Eric Laurent <elaurent@google.com> Merge "Implement audio device callback" into mnc-dev
18aa27016a94d0fee243637a80fd0741f89e08f2 06-May-2015 Andy Hung <hunga@google.com> Support channel index masks for output hal

Change-Id: Ib3e61ff6faf91c71b85102b5d77f90f124c08220
udioflinger/BufferProviders.cpp
udiopolicy/common/managerdefinitions/src/AudioPort.cpp
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
udioflinger/Threads.cpp
udioflinger/Threads.h
d1abb8f94d7ed749ee959655db1e07d26dad074d 06-May-2015 Andy Hung <hunga@google.com> Allow 8 channels in RecordThread

Change-Id: I738d4975188695e568015e1bc64d160550e958f5
udioflinger/Threads.cpp
ed0412ed78321bf9d35537626e33115862f7c805 28-Apr-2015 Chien-Yu Chen <cychen@google.com> Camera2: allow mixing regular/reprocess requests

Allow mixing regular and reprocess requests in a capture burst. Also
call abandon() when deleting an input stream.

Bug: 20537735
Change-Id: If8c7781038173ab21c73f5ddc32f53793cf86fd9
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/device3/Camera3InputStream.cpp
a627e3df129c4a502368ee861b1e5831ecae174a 05-May-2015 Zhijun He <zhijunhe@google.com> Merge "CameraService: update android.control.availableModes" into mnc-dev
9f578d3297782be6de5373e171f3b4af49726709 05-May-2015 Jean-Michel Trivi <jmtrivi@google.com> Merge "AudioRecord keeps track of UID" into mnc-dev
9c5af614aac9d9ffeee9124ce10f0f4bc025398d 05-May-2015 Zhijun He <zhijunhe@google.com> CameraService: update android.control.availableModes

Only advertise CONTROL_MODE_OFF when manual 3A controls are supported.
Also fixed some bug regarding static metadata update.

Bug: 20734940
Change-Id: I5061f3c49ec20dc8cf5d849771c000fb82543e8f
amera/libcameraservice/common/CameraModule.cpp
4cb668392ee0433462251afbee109405c6efacc8 02-May-2015 Jean-Michel Trivi <jmtrivi@google.com> AudioRecord keeps track of UID

Bug 20832981

Change-Id: If5f3c61fae02d86b9d6fdf411711f854fd56c77d
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
32fa6d0e65dbf956e253a1006e9419dce2fe75c9 02-May-2015 Svet Ganov <svetoslavganov@google.com> Add camera app op - camera

Change-Id: I26570cc0a23fdea740b416a26838d40cac296c85
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/common/Camera2ClientBase.cpp
8ce74c3c11458faa34395591a3424e90db856bfc 02-May-2015 Phil Burk <philburk@google.com> Merge "AudioTrack: fix direct tracks not pausing" into mnc-dev
6fc2a7c81f62b1e21487ae37e11aae6241bc3ead 01-May-2015 Phil Burk <philburk@google.com> AudioTrack: fix direct tracks not pausing

When a Direct Track is paused and the HAL does not support
pause() and resume() then the HW never gets paused.
The app can just keep writing data, which gets played.

Bug: 18899620
Change-Id: Ice0f360956ff7ca425f6f24a0a2a8640d8b43fa8
Signed-off-by: Phil Burk <philburk@google.com>
udioflinger/Threads.cpp
udioflinger/Threads.h
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
udioflinger/Threads.h
0bbf8b213ad96051357e3ad6d6d2808bfa31a59a 30-Apr-2015 Ruben Brunk <rubenbrunk@google.com> camera2: Fix fuzztesting segfault in connect.

Bug: 20721655
Change-Id: I0d974cad19683a8c86a76dac7f61ac0010bd977a
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
850206ed9ebc6c663a957a656966bce2604dc170 01-May-2015 Eric Laurent <elaurent@google.com> Merge "PatchPanel: do not use setParameters() internally." into mnc-dev
a8df0b716bdfda1e10790e6f7297eeff83d2e52a 01-May-2015 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: API1 shim: Don't tightly apply crop region" into mnc-dev
d48521fc2f7c34623a745728a07dad728da49254 30-Apr-2015 Eino-Ville Talvala <etalvala@google.com> Camera: API1 shim: Don't tightly apply crop region

Due to older HAL compatibility, we have been setting a tight crop region
that just bounds the current output streams. However, this did not take
into account any possible ZSL output stream, so correct application of
our stream cropping rules to ZSL results in double-crop scenarios, if
the ZSL stream aspect ratio does not match the aspect ratio of the other
output streams.

Since all current HALs follow the correct stream cropping rules (or
at least sufficiently ignore them for ZSL), simplify the cropping
substantially - now either calculate the crop region based purely
off the active array dimensions and zoom factor, or purely off
the preview stream and zoom factor. The former is used for setting
the request crop, and the latter is used for converting coordinates
for metering regions.

Bug: 20316691

Change-Id: I5a0bc2e7c09cf60fbae4220566540ca9e674d652
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
dc0ac804721efff054ec9720d53e93ecca86cf5e 30-Apr-2015 Phil Burk <philburk@google.com> Merge "AudioTrack: fix spurious retrograde messages" into mnc-dev
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
udiopolicy/AudioPolicyInterface.h
udiopolicy/common/managerdefinitions/src/AudioPolicyMix.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
udiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/service/AudioPolicyService.cpp
udiopolicy/service/AudioPolicyService.h
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/common/managerdefinitions/src/AudioOutputDescriptor.cpp
udiopolicy/managerdefault/AudioPolicyManager.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>
udioflinger/PlaybackTracks.h
udioflinger/Tracks.cpp
be71aa29a3c86d2e01cd17839d2a72ab09a1bce5 28-Apr-2015 Svet Ganov <svetoslavganov@google.com> Respect the record audio app op - media

Change-Id: I3a97977b6e9a09355e2008f780d22d480fb7308b
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/ServiceUtilities.cpp
udioflinger/ServiceUtilities.h
udiopolicy/service/AudioPolicyEffects.cpp
054d9d3dea1390294650ac704acb4aa0a0731217 24-Apr-2015 Eric Laurent <elaurent@google.com> PatchPanel: do not use setParameters() internally.

Do not use setParameters() with AUDIO_PARAMETER_STREAM_ROUTING
when communicating the input or output device selected to playback or
record threads, even for HAL version less than 3.0.
Use createAudioPatch()/releaseAudioPatch() instead.
This allows to send more information on the output or input device being
selected.

Also fix a regression introduced in L where the output device selection
was not communicated to effects on record threads.

Change-Id: I4780ada53241d56694b005c992171e173c3bf8f5
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/PatchPanel.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
f62a067a5b21c840c915d36392679346ac0abfd7 28-Apr-2015 Eino-Ville Talvala <etalvala@google.com> Merge "DO NOT MERGE: The preview frame data is broken when sending via Binder" into mnc-dev
27b0159fa29b85b63f7bcad83bd13c70355a7bcd 22-Apr-2015 daisuke jinno <daisuke.x.jinno@sonymobile.com> DO NOT MERGE: The preview frame data is broken when sending via Binder

[Cause]
CallbackProcessor uses always same buffer to send preview data.
A buffer is written before it is read by user process.

[Solution]
Increment buffer index correctly.

Change-Id: I87a7e3dc6546448a419c96aa58ace3b7d086bf70
amera/libcameraservice/api1/client2/CallbackProcessor.cpp
466dc8ed6ca6b7f585104806c48613dd34e608c9 17-Apr-2015 Paul McLean <pmclean@google.com> Explicit routing in AudioRecord

Change-Id: I9cc5d54883a3e5c75d553fabb619fc8e49f4f9e5
udiopolicy/AudioPolicyInterface.h
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
udiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/service/AudioPolicyService.h
6fc6a64fa3b0a9e4577eb763590f531c0a50a27b 25-Apr-2015 Eric Laurent <elaurent@google.com> Revert "Add a configurable version of the policy engine based on PFW"

This reverts commit 65c3781db3443531deacecfbda5c7e7e82868a34.

Change-Id: Ib61cd70f97c4c4f4b503fb845643627d6896f4f9
udiopolicy/Android.mk
udiopolicy/engine/interface/AudioPolicyManagerInterface.h
udiopolicy/engineconfigurable/Android.mk
udiopolicy/engineconfigurable/include/AudioPolicyEngineInstance.h
udiopolicy/engineconfigurable/include/EngineDefinition.h
udiopolicy/engineconfigurable/interface/AudioPolicyPluginInterface.h
udiopolicy/engineconfigurable/parameter-framework/Android.mk
udiopolicy/engineconfigurable/parameter-framework/example/Android.mk
udiopolicy/engineconfigurable/parameter-framework/example/ParameterFrameworkConfigurationPolicy.xml
udiopolicy/engineconfigurable/parameter-framework/example/README.md
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_input_source.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_accessibility.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_dtmf.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_enforced_audible.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_media.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_phone.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_rerouting.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_sonification.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_sonification_respectful.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_transmitted_through_speaker.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/strategy_for_stream.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/strategy_for_usage.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/volumes.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Structure/PolicyClass.xml
udiopolicy/engineconfigurable/parameter-framework/example/Structure/PolicySubsystem-CommonTypes.xml
udiopolicy/engineconfigurable/parameter-framework/example/Structure/PolicySubsystem-Volume.xml
udiopolicy/engineconfigurable/parameter-framework/example/Structure/PolicySubsystem.xml
udiopolicy/engineconfigurable/parameter-framework/example/policy_criteria.txt
udiopolicy/engineconfigurable/parameter-framework/plugin/Android.mk
udiopolicy/engineconfigurable/parameter-framework/plugin/InputSource.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/InputSource.h
udiopolicy/engineconfigurable/parameter-framework/plugin/PolicyMappingKeys.h
udiopolicy/engineconfigurable/parameter-framework/plugin/PolicySubsystem.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/PolicySubsystem.h
udiopolicy/engineconfigurable/parameter-framework/plugin/PolicySubsystemBuilder.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/Strategy.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/Strategy.h
udiopolicy/engineconfigurable/parameter-framework/plugin/Stream.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/Stream.h
udiopolicy/engineconfigurable/parameter-framework/plugin/Usage.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/Usage.h
udiopolicy/engineconfigurable/parameter-framework/plugin/VolumeProfile.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/VolumeProfile.h
udiopolicy/engineconfigurable/src/Collection.h
udiopolicy/engineconfigurable/src/Element.h
udiopolicy/engineconfigurable/src/Engine.cpp
udiopolicy/engineconfigurable/src/Engine.h
udiopolicy/engineconfigurable/src/EngineInstance.cpp
udiopolicy/engineconfigurable/src/InputSource.cpp
udiopolicy/engineconfigurable/src/InputSource.h
udiopolicy/engineconfigurable/src/Strategy.cpp
udiopolicy/engineconfigurable/src/Strategy.h
udiopolicy/engineconfigurable/src/Stream.cpp
udiopolicy/engineconfigurable/src/Stream.h
udiopolicy/engineconfigurable/src/Usage.cpp
udiopolicy/engineconfigurable/src/Usage.h
udiopolicy/engineconfigurable/wrapper/Android.mk
udiopolicy/engineconfigurable/wrapper/ParameterManagerWrapper.cpp
udiopolicy/engineconfigurable/wrapper/audio_policy_criteria_conf.h
udiopolicy/engineconfigurable/wrapper/config/audio_policy_criteria.conf
udiopolicy/engineconfigurable/wrapper/include/ParameterManagerWrapper.h
udiopolicy/utilities/Android.mk
udiopolicy/utilities/convert/Android.mk
udiopolicy/utilities/convert/convert.h
65c3781db3443531deacecfbda5c7e7e82868a34 24-Mar-2015 François Gaffie <francois.gaffie@intel.com> Add a configurable version of the policy engine based on PFW

This patch adds a configurable version of the policy engine
based on the parameter framework.
This configurable engine shall be activated with a flag
USE_CONFIGURABLE_AUDIO_POLICY within BoardConfig.mk

This patch provides the generic configuration as an example.
This configuration provides the same user experience as the default
policy engine.

Change-Id: Ic8217333ae370b89bfdd2ad11320c5f14ea4da34
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/Android.mk
udiopolicy/engine/interface/AudioPolicyManagerInterface.h
udiopolicy/engineconfigurable/Android.mk
udiopolicy/engineconfigurable/include/AudioPolicyEngineInstance.h
udiopolicy/engineconfigurable/include/EngineDefinition.h
udiopolicy/engineconfigurable/interface/AudioPolicyPluginInterface.h
udiopolicy/engineconfigurable/parameter-framework/Android.mk
udiopolicy/engineconfigurable/parameter-framework/example/Android.mk
udiopolicy/engineconfigurable/parameter-framework/example/ParameterFrameworkConfigurationPolicy.xml
udiopolicy/engineconfigurable/parameter-framework/example/README.md
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_input_source.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_accessibility.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_dtmf.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_enforced_audible.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_media.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_phone.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_rerouting.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_sonification.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_sonification_respectful.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/device_for_strategy_transmitted_through_speaker.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/strategy_for_stream.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/strategy_for_usage.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Settings/volumes.pfw
udiopolicy/engineconfigurable/parameter-framework/example/Structure/PolicyClass.xml
udiopolicy/engineconfigurable/parameter-framework/example/Structure/PolicySubsystem-CommonTypes.xml
udiopolicy/engineconfigurable/parameter-framework/example/Structure/PolicySubsystem-Volume.xml
udiopolicy/engineconfigurable/parameter-framework/example/Structure/PolicySubsystem.xml
udiopolicy/engineconfigurable/parameter-framework/example/policy_criteria.txt
udiopolicy/engineconfigurable/parameter-framework/plugin/Android.mk
udiopolicy/engineconfigurable/parameter-framework/plugin/InputSource.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/InputSource.h
udiopolicy/engineconfigurable/parameter-framework/plugin/PolicyMappingKeys.h
udiopolicy/engineconfigurable/parameter-framework/plugin/PolicySubsystem.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/PolicySubsystem.h
udiopolicy/engineconfigurable/parameter-framework/plugin/PolicySubsystemBuilder.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/Strategy.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/Strategy.h
udiopolicy/engineconfigurable/parameter-framework/plugin/Stream.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/Stream.h
udiopolicy/engineconfigurable/parameter-framework/plugin/Usage.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/Usage.h
udiopolicy/engineconfigurable/parameter-framework/plugin/VolumeProfile.cpp
udiopolicy/engineconfigurable/parameter-framework/plugin/VolumeProfile.h
udiopolicy/engineconfigurable/src/Collection.h
udiopolicy/engineconfigurable/src/Element.h
udiopolicy/engineconfigurable/src/Engine.cpp
udiopolicy/engineconfigurable/src/Engine.h
udiopolicy/engineconfigurable/src/EngineInstance.cpp
udiopolicy/engineconfigurable/src/InputSource.cpp
udiopolicy/engineconfigurable/src/InputSource.h
udiopolicy/engineconfigurable/src/Strategy.cpp
udiopolicy/engineconfigurable/src/Strategy.h
udiopolicy/engineconfigurable/src/Stream.cpp
udiopolicy/engineconfigurable/src/Stream.h
udiopolicy/engineconfigurable/src/Usage.cpp
udiopolicy/engineconfigurable/src/Usage.h
udiopolicy/engineconfigurable/wrapper/Android.mk
udiopolicy/engineconfigurable/wrapper/ParameterManagerWrapper.cpp
udiopolicy/engineconfigurable/wrapper/audio_policy_criteria_conf.h
udiopolicy/engineconfigurable/wrapper/config/audio_policy_criteria.conf
udiopolicy/engineconfigurable/wrapper/include/ParameterManagerWrapper.h
udiopolicy/utilities/Android.mk
udiopolicy/utilities/convert/Android.mk
udiopolicy/utilities/convert/convert.h
21db57282da8b3daba1549f3a8e41c4fbaf80059 24-Apr-2015 Ronghua Wu <ronghuawu@google.com> Merge "mediaresourcemanager: add dumpsys support."
7d7ea036436320b03bef826d78c4c035b67edbd0 24-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> Merge "AudioPolicyManager: notification of dynamic policy mix activity (input)"
8f9dd872366f54b6260506c75c3d0cc3f9f73f81 24-Apr-2015 Ronghua Wu <ronghuawu@google.com> mediaresourcemanager: add dumpsys support.

Bug: 20233206
Change-Id: Ic253985e408b05b488e87cd5c50c0d619ac568ef
ediaresourcemanager/ResourceManagerService.cpp
ediaresourcemanager/ResourceManagerService.h
ediaresourcemanager/test/ResourceManagerService_test.cpp
3fa46d8bb636aeba420ebb2f454205d509f1af29 24-Apr-2015 Eric Laurent <elaurent@google.com> Merge "RadioService: fix error handling in attach()."
f2f79cfcdec89052f49b74f9aab48e58daf606c6 24-Apr-2015 Eric Laurent <elaurent@google.com> RadioService: fix error handling in attach().

Fix typo causing tuner open error to be ignored.

Change-Id: I10735f0cf6ae64ff9c4efa2eb4b20d94d3597ae5
adio/RadioService.cpp
138f77425a0956d867f078881f91628518ae8258 22-Apr-2015 Andy Hung <hunga@google.com> Fix format sorting order in AudioPort

Otherwise AUDIO_FORMAT_DEFAULT (used for dynamic formats)
is no longer the first entry.

Change-Id: I23869a9ca2ed138759d722e7c9838497f640921a
udiopolicy/common/managerdefinitions/include/AudioPort.h
udiopolicy/common/managerdefinitions/src/AudioPort.cpp
d330ee46022f34da76d14d0c4d2910526ecc2321 20-Apr-2015 Andy Hung <hunga@google.com> Add floating and multichannel record to AudioFlinger

Change-Id: Ia388fb012a0b6d81613ef87142a97d76836338f9
udioflinger/AudioFlinger.h
udioflinger/FastCapture.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
f27e2fbfc3284c00a60fa68edc51d436f75b1e32 20-Apr-2015 Andy Hung <hunga@google.com> Add channel index record to AudioPolicyManager

Change-Id: Ic534bee084108a68c7818600df6e1c9dc9258a0d
udiopolicy/common/managerdefinitions/include/ConfigParsingUtils.h
udiopolicy/common/managerdefinitions/src/AudioPort.cpp
04f07fd61022dac46ddda9c815d65bc3d3278b84 22-Apr-2015 Andy Hung <hunga@google.com> Merge "Make record buffer in RecordThread variable format"
20bd9bfc3ae429412c8eb98619b40fb8e3671bbc 22-Apr-2015 Andy Hung <hunga@google.com> Merge "Fix single channel playback that does not use AUDIO_CHANNEL_OUT_MONO"
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
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/BufferProviders.cpp
udioflinger/BufferProviders.h
udioflinger/Threads.cpp
udioflinger/Tracks.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
udiopolicy/common/managerdefinitions/src/DeviceDescriptor.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
5744661e85981f8a9456bf470e2761235fc026da 20-Apr-2015 Andy Hung <hunga@google.com> Make record buffer in RecordThread variable format

Change-Id: Id4bb9b973eeea16946fba3bc084c7ac270d9fa33
udioflinger/Threads.cpp
udioflinger/Threads.h
73e62e2ea12e46825958eba718bd8d5e23064ec5 20-Apr-2015 Andy Hung <hunga@google.com> Fix single channel playback that does not use AUDIO_CHANNEL_OUT_MONO

Mono channel playback without resampling and not using
AUDIO_CHANNEL_OUT_MONO can show low frequency garbling.

Bug: 20463456
Change-Id: I0c1bbf957ea439bb8d8da57b9e78938e1acb4793
udioflinger/AudioMixer.cpp
2b0c1fc0d0ad3744a32d48234f255d82a5c80ded 16-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> AudioPolicyManager: notification of dynamic policy mix activity (input)

Use ref counting on start/stop inputs to notify audio policy client
of mix activity changes.

Bug 20226914

Change-Id: Ic4f9c91301d0bcbc0ff749acebdc3b2300309c38
udiopolicy/managerdefault/AudioPolicyManager.cpp
a7401cc5e781da150b46e7ae37905ab9ca2aa758 21-Apr-2015 Eric Laurent <elaurent@google.com> audio policy: remove permission check for ports and patches getters

Remove check for MODIFY_AUDIO_ROUTING permission in
audio policy methods just getting devices or patches state.

Change-Id: Id3bafc5ad0d0bd96210822243139898e314327d8
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
f2326ac96366ec4d05f470cc4a0b407e7805bab7 16-Apr-2015 Eino-Ville Talvala <etalvala@google.com> Merge "CameraService: Add support for module init, some logging updates"
3bf628dc0f4b0ca2c5188652072d5814625f85ae 16-Apr-2015 Chien-Yu Chen <cychen@google.com> Merge "camera2: remove unnecessary flashlight error messages"
f6463fc62a09b8aad8e811a9abbe9f4d9f2688f9 08-Apr-2015 Chien-Yu Chen <cychen@google.com> camera2: remove unnecessary flashlight error messages

Bug: 20069129
Change-Id: I0e721bfad1f0218744d3554397e3ec9b8bc07a19
amera/libcameraservice/CameraService.cpp
09f02e55ec4227a29662e7f6ab07fe7d09d9eba0 16-Apr-2015 Chien-Yu Chen <cychen@google.com> Merge "Camera3: allow reconfiguring the input stream"
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
udiopolicy/AudioPolicyInterface.h
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
udiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/service/AudioPolicyService.h
1527f07eb2b2b40f6b8f53a4644e6a400bddb460 08-Apr-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Add support for module init, some logging updates

- Add support for camera HAL module init() method on v2.4
- Add logging for service errors such as failure to init
- Minor cleanup to dumping of event log

Bug: 20016050
Change-Id: I94e18b52c186f16fb096457015f7ae761e867fd8
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/common/CameraModule.cpp
amera/libcameraservice/common/CameraModule.h
cfdd52423cee9efea73023feeaa74279ebd45b7c 15-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> Merge "AudioPolicyManager: notification of dynamic policy mix activity"
90746f4203989fceb0f2131163435644040218d3 15-Apr-2015 Chien-Yu Chen <cychen@google.com> Camera3: allow reconfiguring the input stream

Change-Id: Ia9d0db1f3378264fc9173bfc8706c8f955b79182
amera/libcameraservice/device3/Camera3Stream.cpp
5e1c007038df74b389018e762d5059cacecff59e 15-Apr-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: allow non-supported template"
6a07a72588c99d01df9d2c4bcd5bdb15db8937c9 15-Apr-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: fix invalid access of static_camera_characteristics"
7768dedbce78e0bdbed014debd90faef88e9dacb 15-Apr-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix invalid access of static_camera_characteristics

Bug: 20260866
Change-Id: Ib2b9ef807d66989515ac1a2e9f623fdd226a665a
amera/libcameraservice/common/CameraModule.cpp
d6b01f26a826d10912be4b34bbd2438e97c871e4 15-Apr-2015 Ruben Brunk <rubenbrunk@google.com> Merge "camera: Actually pass device errors to client for Camera2Device."
a485dfec4ad98283b911cf983566b0ce947343b6 14-Apr-2015 Ruben Brunk <rubenbrunk@google.com> camera: Actually pass device errors to client for Camera2Device.

Bug: 19186859
Change-Id: Ib58588dfd99956b719c34e62c596ea604d97edcb
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/Camera2Client.h
c44111b22c26236cb0b32d3fbd1cc9fad3fb28ff 15-Apr-2015 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Add prepare for output streams"
4d44cad22ea925a651463f2d51d6586c14d4b787 11-Apr-2015 Eino-Ville Talvala <etalvala@google.com> Camera2: Add prepare for output streams

The prepare call asynchronously pre-allocates buffers for a given
output stream, and then fires the onPrepared callback.

Not implemented for Camera2Device or used in Camera2Client.

Change-Id: I1cccdfff846dd6985133c591dbdceed823929ade
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
amera/libcameraservice/common/Camera2ClientBase.cpp
amera/libcameraservice/common/Camera2ClientBase.h
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device2/Camera2Device.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3DummyStream.cpp
amera/libcameraservice/device3/Camera3DummyStream.h
amera/libcameraservice/device3/Camera3IOStreamBase.cpp
amera/libcameraservice/device3/Camera3IOStreamBase.h
amera/libcameraservice/device3/Camera3InputStream.cpp
amera/libcameraservice/device3/Camera3InputStream.h
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.h
amera/libcameraservice/device3/Camera3Stream.cpp
amera/libcameraservice/device3/Camera3Stream.h
amera/libcameraservice/device3/Camera3StreamInterface.h
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/AudioPolicyInterface.h
udiopolicy/common/managerdefinitions/include/AudioOutputDescriptor.h
udiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp
udiopolicy/service/AudioPolicyClientImpl.cpp
udiopolicy/service/AudioPolicyService.cpp
udiopolicy/service/AudioPolicyService.h
7233234a32d22d2ffb63ed4e92df339458047887 15-Apr-2015 Ronghua Wu <ronghuawu@google.com> Merge "media: use ResourceManagerService with MediaCodec"
67e7f543c7f1c4fe4ee1989ceb0aebe44a63b49e 13-Mar-2015 Ronghua Wu <ronghuawu@google.com> media: use ResourceManagerService with MediaCodec

Bug: 19620911
Change-Id: I235a97e5195b28645b7834dda0dd77307d93f4a8
ediaresourcemanager/ResourceManagerService.cpp
ediaresourcemanager/test/ResourceManagerService_test.cpp
0336d3649f13506a7daf425690d225beac9d214f 14-Apr-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: allow non-supported template

Bug: 19395059
Change-Id: I42bbd99fef6055173062266c1a490311105c6814
amera/libcameraservice/device3/Camera3Device.cpp
2f33dbc6ca08d45efea2df775c158e2a11e07ab6 14-Apr-2015 Chien-Yu Chen <cychen@google.com> Merge "camera2: add reprocess support"
4264bbd7af97aeae87f1907b96f62e4025c989d0 14-Apr-2015 Ruben Brunk <rubenbrunk@google.com> Merge "camera: Fix client eviction/disconnect race."
618ff8a48a0c895a78f91f5692510c2a809425c3 13-Mar-2015 Chien-Yu Chen <cychen@google.com> camera2: add reprocess support

Add support to create input stream, submit reprocess capture requests,
and receive reprocess capture results.

Change-Id: Iee2d4313f3d52616a484eaea7a28f5ef9d8a674b
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device2/Camera2Device.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3InputStream.cpp
amera/libcameraservice/device3/Camera3InputStream.h
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3Stream.cpp
amera/libcameraservice/device3/Camera3Stream.h
amera/libcameraservice/device3/Camera3StreamInterface.h
cf31941ef4cf1a882cc23743ada41e49f8e1be03 14-Apr-2015 Ricardo Garcia <rago@google.com> Merge "TimestretchBufferProvider integration with Sonic Library"
f097cae65bfce7200938c5bd89e7e9b61cba78b3 13-Apr-2015 Ricardo Garcia <rago@google.com> TimestretchBufferProvider integration with Sonic Library

Using Sonic as backbone for time stretching algorithm.
Adding libsonic to needed makefiles.

bug: 19196501
Change-Id: I1ea9221d2f56e4e79fba8746ce0ad350b5079e82
udioflinger/Android.mk
udioflinger/BufferProviders.cpp
udioflinger/BufferProviders.h
udioflinger/tests/Android.mk
4f9576bf48c5909782c12490e8a9faa974ae68d6 11-Apr-2015 Ruben Brunk <rubenbrunk@google.com> camera: Fix client eviction/disconnect race.

- Add blocking wait in camera service connect call to
prevent race when client has called disconnect while
eviction of that client is taking place, resulting
in early call of device initialization before all
HAL resources are available.

Bug: 20038135
Change-Id: I7afc5bfa23612ba7f83293fa542ff983a5991230
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/utils/ClientManager.h
221a33890fa8b3c3c43c94327305b8e7717c412f 14-Apr-2015 Eric Laurent <elaurent@google.com> Merge "audio polciy: remove FM audio capture permission."
ab300c8cbf5df98fddca39e8d1698b0307432152 13-Apr-2015 Eric Laurent <elaurent@google.com> audio polciy: remove FM audio capture permission.

Change-Id: I2607d89b0bd87cdd2f4084dfdb55135509a824d5
udioflinger/ServiceUtilities.cpp
udioflinger/ServiceUtilities.h
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
udiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp
f945d614116015361e489634737b9f70b6c39e66 11-Apr-2015 Ruben Brunk <rubenbrunk@google.com> Merge "camera: Update camera service logging and validation."
de5e5d7141e7816a006e9a890bb68fc2d6581e0e 10-Apr-2015 Phil Burk <philburk@google.com> Merge "AudioFlinger: more DTS passthrough support"
8edb8dc44b8a2f81bdb5db645b6b708548771a31 27-Mar-2015 Andy Hung <hunga@google.com> Add playback rate to AudioTrack

Bug: 19196501
Change-Id: I6411e1d3ce652b711a71a6d9df020cb5f60d4714
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
23d8997f58bb9c59fa3a1b9a6b2edbf1b2b0f4c6 07-Apr-2015 Phil Burk <philburk@google.com> AudioFlinger: more DTS passthrough support

Pass format for AC3 or DTS to SPDIF encoder.

Bug: 18292317
Change-Id: I6d80eb548cb431bac3390ebb3235146171344291
Signed-off-by: Phil Burk <philburk@google.com>
udioflinger/AudioHwDevice.cpp
udioflinger/SpdifStreamOut.cpp
udioflinger/SpdifStreamOut.h
a8ca9157d21510fbd474bd31748f4fe0d4635dd7 07-Apr-2015 Ruben Brunk <rubenbrunk@google.com> camera: Update camera service logging and validation.

- Expand the logging included by the camera service.
- Update user validation checks in connect calls so that
these can be correctly called from the camera service.

Bug: 20063426
Change-Id: I0a8cbe1ea2c0a652298e6b70c89705da174a50e1
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
c5656cc900aeb4a705e27508dd82c70030a97709 27-Mar-2015 Andy Hung <hunga@google.com> Add playback rate to AudioMixer

Bug: 19196501
Change-Id: I42d1f90e6297cf3f1304860d1691a5dfedd4c37d
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/BufferProviders.cpp
udioflinger/BufferProviders.h
857d5a20a956ef61b64ae07b018ecc2f1eb0a503 27-Mar-2015 Andy Hung <hunga@google.com> Factor out buffer provider code from AudioMixer

In preparation for playback rate support and timestretching.

Bug: 19196501
Change-Id: I435accb852d32110dd0b3a9917488522c567ba80
udioflinger/Android.mk
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/BufferProviders.cpp
udioflinger/BufferProviders.h
udioflinger/tests/Android.mk
f129b03fa583d4cc26fd9c9171b8fb3b0ed8d4f4 07-Apr-2015 Andy Hung <hunga@google.com> Enable 8 bit and float pcm record formats for AudioPolicyManager

Add capability for handling different record channel masks.

Change-Id: I63f6b029aca5cefff7adf26198a3b594a7ea2d71
udiopolicy/common/managerdefinitions/include/AudioPort.h
udiopolicy/common/managerdefinitions/include/IOProfile.h
udiopolicy/common/managerdefinitions/src/AudioPort.cpp
udiopolicy/common/managerdefinitions/src/IOProfile.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
b6347ac62b36b4d9578d181ba83bf8e6446298e8 09-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> Merge "Fix AudioPolicyManager dynamic policy initialization"
dacc06f5e8d00ace9d16a149fc41ff65323ffbb3 09-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> Fix AudioPolicyManager dynamic policy initialization

AudioPolicyManager::getInputForAttr() is initializing the AudioMix
for the new AudioInputDescriptor.
The audio policy manager refactoring introduced a regression where
the association of an existing AudioMix (registered when the
associated AudioPolicy was registered) with the input descriptor
copied a value of local scope, instead of referencing the
AudioMix in the list of mixes.

Bug 20081375

Change-Id: Iddd57fed8525880afd1d4a5493f97130aabe4816
udiopolicy/common/managerdefinitions/include/AudioPolicyMix.h
udiopolicy/common/managerdefinitions/src/AudioPolicyMix.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
17769490d499bc665ddfef83143ac1ed647fa0d4 09-Apr-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: volume in dBs"
9c7f67264d3b3ace9703b3a96bd7bc4922111b4f 09-Apr-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: volume control reorganization"
ffbc80f5908eaf67a033c6e93a343c39dd6894eb 19-Mar-2015 Eric Laurent <elaurent@google.com> audio policy: volume in dBs

Volumes are now stored and exchanged in dBs to be
consistent with the volume tables.

They are converted if needed when applied to the target
gain controller.

Change-Id: I916cbb0bbe65c916444b8c65a2bdca9645c58399
udiopolicy/common/include/Volume.h
udiopolicy/common/managerdefinitions/include/AudioOutputDescriptor.h
udiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp
udiopolicy/engine/interface/AudioPolicyManagerInterface.h
udiopolicy/enginedefault/src/Engine.cpp
udiopolicy/enginedefault/src/Engine.h
udiopolicy/enginedefault/src/Gains.cpp
udiopolicy/enginedefault/src/Gains.h
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
c75307b73d324d590d0dbc05b44bce9aa89b7145 17-Mar-2015 Eric Laurent <elaurent@google.com> audio policy: volume control reorganization

Output volume and routing control by AudioOutputDescriptor
is reorganized to prepare hardware source volume and routing
control.
AudioOutputDescriptor contains all volume, device and activity
state common to software (audio flinger mixers) and
hardware sources (tuners, A2DP, HDMI).
A new class SwAudioOutputDescriptor is derived from
AudioOutputDescriptor and is specific to software sources.

Low level routing and volume control methods receive an
AudioOutputDescriptor parameter instead of an IO handle.

mPrimaryOutput is now an AudioOutputDescriptor.

Change-Id: Ie90943ee3102cdb8adf89fdd2addd2c279b1e5bf
udiopolicy/common/managerdefinitions/Android.mk
udiopolicy/common/managerdefinitions/include/AudioOutputDescriptor.h
udiopolicy/common/managerdefinitions/include/AudioPolicyMix.h
udiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioPolicyMix.cpp
udiopolicy/engine/interface/AudioPolicyManagerObserver.h
udiopolicy/enginedefault/src/Engine.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
3277877a576b079ebce444075735f45259660e58 09-Apr-2015 Andy Hung <hunga@google.com> Merge "Enable 8 bit and float pcm record formats for AudioFlinger"
86f79e3f3bc1de7b4e4dd045de8962b8a62ab5d5 09-Apr-2015 Andy Hung <hunga@google.com> Merge "Improve ResamplerBufferProvider"
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
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
73c02e4277b399c2ec1555d32b6ad5df23bb83dc 29-Mar-2015 Andy Hung <hunga@google.com> Improve ResamplerBufferProvider

Change-Id: I3cc3af221ad5797ff219d75227350733afa180db
udioflinger/RecordTracks.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
77a44e8d1f902a100500ea69a450e22889dcff31 09-Apr-2015 Andy Hung <hunga@google.com> Merge "Add RecordBufferConverter for RecordThread data processing"
97a893eb34f8687485c88eaf15917974a203f20b 29-Mar-2015 Andy Hung <hunga@google.com> Add RecordBufferConverter for RecordThread data processing

Change-Id: Ia3aab8590cd41e8a7cba0a7345d70d2866d92045
udioflinger/RecordTracks.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
0c0acdadc9ca961acd1f3b4b85c2befef2dc7161 09-Apr-2015 Andy Hung <hunga@google.com> Merge "Return number of frames output from resample method"
6b3b7e304e0f8f167241b2c75f1eb04a9ef192ec 29-Mar-2015 Andy Hung <hunga@google.com> Return number of frames output from resample method

Change-Id: Ic297e2ed59839f1788c83e099ef1a9e4af29591f
udioflinger/AudioResampler.cpp
udioflinger/AudioResampler.h
udioflinger/AudioResamplerCubic.cpp
udioflinger/AudioResamplerCubic.h
udioflinger/AudioResamplerDyn.cpp
udioflinger/AudioResamplerDyn.h
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
udioflinger/tests/resampler_tests.cpp
3bcf8597189c592713675ec58326ecbef0ac4ae9 03-Apr-2015 Eric Laurent <elaurent@google.com> audio flinger: improve device to device audio patches

Allow creation of audio patches between input and output
devices managed by the same audio HW module.

Change-Id: I4b83268a4d5c41f3d5905d7581202cf5193efd32
udioflinger/PatchPanel.cpp
udioflinger/PlaybackTracks.h
udioflinger/Tracks.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
322b4d25387a04c9afebe998326d005bbdf17ede 04-Apr-2015 Eric Laurent <elaurent@google.com> audio policy: fix unique audio port ID.

Remove mId member from AudioPort as it was shadowed
by mId in DeviceDescriptor.

Add getters for Id, and HW module name and version to device,
output and input descriptors.

Fix DeviceDescriptor name initialization.

Change-Id: I4a69f385e40330954d9dad5f2926c521f60b2ec1
udiopolicy/common/managerdefinitions/include/AudioInputDescriptor.h
udiopolicy/common/managerdefinitions/include/AudioOutputDescriptor.h
udiopolicy/common/managerdefinitions/include/AudioPort.h
udiopolicy/common/managerdefinitions/include/ConfigParsingUtils.h
udiopolicy/common/managerdefinitions/include/DeviceDescriptor.h
udiopolicy/common/managerdefinitions/include/IOProfile.h
udiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioPatch.cpp
udiopolicy/common/managerdefinitions/src/AudioPort.cpp
udiopolicy/common/managerdefinitions/src/ConfigParsingUtils.cpp
udiopolicy/common/managerdefinitions/src/DeviceDescriptor.cpp
udiopolicy/common/managerdefinitions/src/HwModule.cpp
udiopolicy/common/managerdefinitions/src/IOProfile.cpp
udiopolicy/enginedefault/src/Engine.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
6dc4dc4ad23dc82eca9af3112292f3e6d5b17b15 08-Apr-2015 Paul McLean <pmclean@google.com> Merge "Adding explicit routing API to AudioTrack"
aa9811945f575614b3482d09e4d969792701cebb 21-Mar-2015 Paul McLean <pmclean@google.com> Adding explicit routing API to AudioTrack

Change-Id: I40c048c7644c46f4e4f7103875206c0785c4b1dc
udiopolicy/AudioPolicyInterface.h
udiopolicy/common/managerdefinitions/include/AudioOutputDescriptor.h
udiopolicy/common/managerdefinitions/include/AudioPort.h
udiopolicy/common/managerdefinitions/include/DeviceDescriptor.h
udiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioPort.cpp
udiopolicy/common/managerdefinitions/src/DeviceDescriptor.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
udiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/service/AudioPolicyService.h
afc7b857308aae3e33290f6af82ad8699cafde36 07-Apr-2015 Dan Stoza <stoza@google.com> am e849af87: Cherry-pick two BufferItem changes

* commit 'e849af8737d9302a7b24fa2f0083cde01c9cd4fc':
Cherry-pick two BufferItem changes
e849af8737d9302a7b24fa2f0083cde01c9cd4fc 12-Mar-2015 Dan Stoza <stoza@google.com> Cherry-pick two BufferItem changes

libcameraservice: Stop using IGBC::BufferItem
(cherry picked from commit 027c772ed30ddd32808df669e37a53e9b97b1f99)

libstagefright: Stop using IGBC::BufferItem
(cherry picked from commit 983e2be81f9ea767ae4d8b19669c1c080ecf58d4)
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
amera/libcameraservice/api1/client2/StreamingProcessor.h
amera/libcameraservice/api1/client2/ZslProcessor.cpp
amera/libcameraservice/api1/client2/ZslProcessor.h
amera/libcameraservice/api1/client2/ZslProcessor3.h
amera/libcameraservice/device3/Camera3InputStream.cpp
amera/libcameraservice/device3/Camera3InputStream.h
amera/libcameraservice/gui/RingBufferConsumer.cpp
amera/libcameraservice/gui/RingBufferConsumer.h
f2d1e4dfc14fd90e1256b3f6e96e69560f5d3b5e 07-Apr-2015 Zhijun He <zhijunhe@google.com> Camera2Client: support HAL version 3.3

Change-Id: Id018e3ce21b4344d09a877395eb355adba9e8fa2
amera/libcameraservice/api1/Camera2Client.cpp
7d669b3551c20109f5544455ca1555499693e1e1 31-Mar-2015 Phil Burk <philburk@google.com> audiopolicy: add support for parsing AUDIO_FORMAT_DTS

Bug: 18292317
Change-Id: Ic9a15fc09ce32021d12072fb71252d207deac30a
Signed-off-by: Phil Burk <philburk@google.com>
udiopolicy/common/managerdefinitions/include/ConfigParsingUtils.h
5c233f8b772719371475624edf1002ed80e1d0e8 03-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> AudioPolicy: remove extraneous parentheses

Change-Id: Ibcea37b90cc0aaacb3b6194745bf569edad8992a
udiopolicy/enginedefault/src/Engine.cpp
d4d55cdf31a3faa619bfa043f5b0f170f6ffd139 02-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> Merge "Updates to AudioPolicyManager refactor"
da2246b54e3eed9e9366c98688b19f997d869e79 02-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> Merge "Split ManagerDefault into manager and engine"
91b7a7b5343c5b6fccd9356449dfd393d0d66f35 02-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> Merge "Create StreamDescriptor and associated collection within common"
d0fd7e82cf051cbde11091008ab90fde20d39964 02-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> Merge "Create SoundTriggerSession and associated collection within common"
9a224caa5af20c5b08d0725d6b95880a01ee9f71 02-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> Merge "Add EffectDescriptor and associated collection to common elements"
f77236dc8560ffbdedd69163bf75a9ad7890d898 02-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> Merge "Add AudioMix and AudioMixCollection to common policy element"
53d6802799da3dbd9b040278e8fbbf9200a91a2c 02-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> Merge "Migrate helper functions from managerdefault to common"
5e600f4186207757d5b1a6bdec69c36af401ed02 02-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> Merge "Split ManagerDefault into Manager and ManagerDefinitions"
07a4422d8de776ec275215c0de645fda51bef89e 02-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> Merge "Audio Policy Refactor: reorganise headers inclusion"
887a9ed4446cb451181c392a0e51a69914e58fbf 01-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> Updates to AudioPolicyManager refactor

Use protected access in AudioPolicyManager class for
- engine field
- querying phone state
- isStrategyActive

Fix inclusion of AudioPolicyManagerInterface header.

Use "APM_" prefix in audio policy conf parsing code to avoid
naming conflicts with some HALs.

DeviceDescriptor and its collection class are good friends now.

Change-Id: I236d62a2b8a4b6bf68dd515932650b912577c145
udiopolicy/common/managerdefinitions/include/DeviceDescriptor.h
udiopolicy/common/managerdefinitions/include/audio_policy_conf.h
udiopolicy/common/managerdefinitions/src/HwModule.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
2110e04cdfbf9ad85ce154ce5f778ee5ccfc95eb 24-Mar-2015 François Gaffie <francois.gaffie@intel.com> Split ManagerDefault into manager and engine

This patch defines an interface for a new component: policy engine.
The APIs found under this interface are the one we may want to customize
and to configure easily.
This patch also split the current manager code into manager and engine to
provide a default version of the policy engine.

Change-Id: I97cf59760b53d248fe9efe466ae5e73bd7e5cc06
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/Android.mk
udiopolicy/common/include/RoutingStrategy.h
udiopolicy/common/managerdefinitions/include/AudioGain.h
udiopolicy/common/managerdefinitions/src/AudioGain.cpp
udiopolicy/engine/interface/AudioPolicyManagerInterface.h
udiopolicy/engine/interface/AudioPolicyManagerObserver.h
udiopolicy/enginedefault/Android.mk
udiopolicy/enginedefault/include/AudioPolicyEngineInstance.h
udiopolicy/enginedefault/src/Engine.cpp
udiopolicy/enginedefault/src/Engine.h
udiopolicy/enginedefault/src/EngineInstance.cpp
udiopolicy/enginedefault/src/Gains.cpp
udiopolicy/enginedefault/src/Gains.h
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
dfd7409c1b708f6c429aa43722ca8493a91d8df0 19-Mar-2015 François Gaffie <francois.gaffie@intel.com> Create StreamDescriptor and associated collection within common

Create StreamDescriptor and associated collection within common
common policy pillar elements.
It moves the code from managerdefault and creates helpers function within
the collection.
It also split the AudioGain in a common volume header and AudioGain class.

Change-Id: I1bb80e4219506f8c9042367085db328d317cb668
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/common/include/Volume.h
udiopolicy/common/managerdefinitions/Android.mk
udiopolicy/common/managerdefinitions/include/AudioGain.h
udiopolicy/common/managerdefinitions/include/StreamDescriptor.h
udiopolicy/common/managerdefinitions/src/AudioGain.cpp
udiopolicy/common/managerdefinitions/src/StreamDescriptor.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
df37269852ea92bafd939fe793209d0581c4a574 19-Mar-2015 François Gaffie <francois.gaffie@intel.com> Create SoundTriggerSession and associated collection within common

This patch creates a SoundTriggerSession and associated collection within
common policy pillar elements.
It moves the code from managerdefault and creates helpers function within
the collection.

Change-Id: I83ea230573c05e8ab99f4489c20059ed27678221
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/common/managerdefinitions/Android.mk
udiopolicy/common/managerdefinitions/include/SoundTriggerSession.h
udiopolicy/common/managerdefinitions/src/SoundTriggerSession.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
45ed3b053d9af2250f5ece9ee4e826905c3763a7 19-Mar-2015 François Gaffie <francois.gaffie@intel.com> Add EffectDescriptor and associated collection to common elements

This patch adds EffectDescriptor and associated collection to common
policy pillar elements. It moves the code from the policy manager
and creates helpers function in the collection.

It also factorize the RoutingStrategy structure within a separated header
file.

Change-Id: I29964ff77564fadedf3237c8754240b21ae77297
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/common/include/RoutingStrategy.h
udiopolicy/common/managerdefinitions/Android.mk
udiopolicy/common/managerdefinitions/include/ApmImplDefinitions.h
udiopolicy/common/managerdefinitions/include/AudioOutputDescriptor.h
udiopolicy/common/managerdefinitions/include/EffectDescriptor.h
udiopolicy/common/managerdefinitions/src/EffectDescriptor.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
036e1e9126dcd496203434aa69e52115d8e730cc 19-Mar-2015 François Gaffie <francois.gaffie@intel.com> Add AudioMix and AudioMixCollection to common policy element

This patch adds AudioMix and associated collection to the common
policy pillar elements library.
It removes the code from the manager and creates also helpers function
associated to the mix collection.

Change-Id: Ia3536fdef09da13734d2895030d736c701040237
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/common/managerdefinitions/Android.mk
udiopolicy/common/managerdefinitions/include/AudioPolicyMix.h
udiopolicy/common/managerdefinitions/src/AudioPolicyMix.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
53615e29c99c5e9d2ca77aaefd7bf5c770513120 19-Mar-2015 François Gaffie <francois.gaffie@intel.com> Migrate helper functions from managerdefault to common

This patch moves from manager to common:

-parse helper functions of the policy configuration file
-collection helper function on
-output / input descriptors
-DeviceDescriptor
-AudioPatch / Audio Port
-IO Profile
-HwModule

Change-Id: If45e53418db75af1af198f43c4ef27884499055f
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/Android.mk
udiopolicy/common/include/policy.h
udiopolicy/common/managerdefinitions/Android.mk
udiopolicy/common/managerdefinitions/include/AudioInputDescriptor.h
udiopolicy/common/managerdefinitions/include/AudioOutputDescriptor.h
udiopolicy/common/managerdefinitions/include/AudioPatch.h
udiopolicy/common/managerdefinitions/include/AudioPort.h
udiopolicy/common/managerdefinitions/include/ConfigParsingUtils.h
udiopolicy/common/managerdefinitions/include/DeviceDescriptor.h
udiopolicy/common/managerdefinitions/include/HwModule.h
udiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioPatch.cpp
udiopolicy/common/managerdefinitions/src/AudioPort.cpp
udiopolicy/common/managerdefinitions/src/ConfigParsingUtils.cpp
udiopolicy/common/managerdefinitions/src/DeviceDescriptor.cpp
udiopolicy/common/managerdefinitions/src/HwModule.cpp
udiopolicy/common/managerdefinitions/src/IOProfile.cpp
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
98cc191247388132b6fd8a4ecd07abd6e4c5a0ed 18-Mar-2015 François Gaffie <francois.gaffie@intel.com> Split ManagerDefault into Manager and ManagerDefinitions

This patch splits the managerdefault into a manager and a manager
defintion library that contains all pillar elements of a policy manager.

It renames the file with the name of the main class they contains.

It splits the AudioPort into AudioPort and AudioPatch.

Change-Id: I992cf0b8aed895805cc003ba0980d2c9e92c985b
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/Android.mk
udiopolicy/common/Android.mk
udiopolicy/common/managerdefinitions/Android.mk
udiopolicy/common/managerdefinitions/include/ApmImplDefinitions.h
udiopolicy/common/managerdefinitions/include/AudioGain.h
udiopolicy/common/managerdefinitions/include/AudioInputDescriptor.h
udiopolicy/common/managerdefinitions/include/AudioOutputDescriptor.h
udiopolicy/common/managerdefinitions/include/AudioPatch.h
udiopolicy/common/managerdefinitions/include/AudioPort.h
udiopolicy/common/managerdefinitions/include/ConfigParsingUtils.h
udiopolicy/common/managerdefinitions/include/DeviceDescriptor.h
udiopolicy/common/managerdefinitions/include/HwModule.h
udiopolicy/common/managerdefinitions/include/IOProfile.h
udiopolicy/common/managerdefinitions/include/audio_policy_conf.h
udiopolicy/common/managerdefinitions/src/AudioGain.cpp
udiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioOutputDescriptor.cpp
udiopolicy/common/managerdefinitions/src/AudioPatch.cpp
udiopolicy/common/managerdefinitions/src/AudioPort.cpp
udiopolicy/common/managerdefinitions/src/ConfigParsingUtils.cpp
udiopolicy/common/managerdefinitions/src/DeviceDescriptor.cpp
udiopolicy/common/managerdefinitions/src/HwModule.cpp
udiopolicy/common/managerdefinitions/src/IOProfile.cpp
udiopolicy/managerdefault/ApmImplDefinitions.h
udiopolicy/managerdefault/AudioInputDescriptor.cpp
udiopolicy/managerdefault/AudioInputDescriptor.h
udiopolicy/managerdefault/AudioOutputDescriptor.cpp
udiopolicy/managerdefault/AudioOutputDescriptor.h
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
udiopolicy/managerdefault/ConfigParsingUtils.cpp
udiopolicy/managerdefault/ConfigParsingUtils.h
udiopolicy/managerdefault/Devices.cpp
udiopolicy/managerdefault/Devices.h
udiopolicy/managerdefault/Gains.cpp
udiopolicy/managerdefault/Gains.h
udiopolicy/managerdefault/HwModule.cpp
udiopolicy/managerdefault/HwModule.h
udiopolicy/managerdefault/IOProfile.cpp
udiopolicy/managerdefault/IOProfile.h
udiopolicy/managerdefault/Ports.cpp
udiopolicy/managerdefault/Ports.h
udiopolicy/managerdefault/audio_policy_conf.h
ad3183e2d4cecd02f6261270a7ea1c68be0efa0f 18-Mar-2015 François Gaffie <francois.gaffie@intel.com> Audio Policy Refactor: reorganise headers inclusion

This patch reoganises the headers inclusion in order to prepare
the split of managerdefault into a manager and a separated lib
of pillar policy elements.

It also moves back the isStrategyActive to the manager to avoid
any dependancies from this pillars to the manager.

Change-Id: I1a35c45d86db7a3878a40dc7d6858dfea37c5ac9
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
udiopolicy/managerdefault/ApmImplDefinitions.h
udiopolicy/managerdefault/AudioInputDescriptor.cpp
udiopolicy/managerdefault/AudioInputDescriptor.h
udiopolicy/managerdefault/AudioOutputDescriptor.cpp
udiopolicy/managerdefault/AudioOutputDescriptor.h
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
udiopolicy/managerdefault/ConfigParsingUtils.cpp
udiopolicy/managerdefault/ConfigParsingUtils.h
udiopolicy/managerdefault/Devices.cpp
udiopolicy/managerdefault/Devices.h
udiopolicy/managerdefault/Gains.cpp
udiopolicy/managerdefault/Gains.h
udiopolicy/managerdefault/HwModule.cpp
udiopolicy/managerdefault/HwModule.h
udiopolicy/managerdefault/IOProfile.cpp
udiopolicy/managerdefault/IOProfile.h
udiopolicy/managerdefault/Ports.cpp
udiopolicy/managerdefault/Ports.h
udiopolicy/managerdefault/audio_policy_conf.h
b369cafd67beb63dd0278dba543f519956208a7f 31-Mar-2015 Eric Laurent <elaurent@google.com> audio flinger: fix standby on output with HW A/V sync

Fix a bug in audio HAL pause logic on output threads with
HW A/V sync preventing the HAL to enter standby when
the audio track is stopped and detroyed.

Bug: 19980184.

Change-Id: Ia497dad23159038b447fcbc18a67bb61b70b79cc
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
253930b927d375413a42f170fa1ef8d98b8f7cb4 01-Apr-2015 Ruben Brunk <rubenbrunk@google.com> Merge "camera2: Enforce client eviction on user switch."
36597b241c59eba7e55d5150092947a748c5e9cb 21-Mar-2015 Ruben Brunk <rubenbrunk@google.com> camera2: Enforce client eviction on user switch.

Bug: 19186859
Change-Id: I172a2ce46c8e8a131ae7e8dd99d60c5f4f0d6668
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
904edf8413039d816e5aaa0d4db51d34e08c232a 31-Mar-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: iterate through all encoders for finding max video size"
44d842a762e463f0a29e95036e97fef2def4b8ea 27-Mar-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: iterate through all encoders for finding max video size

Bug: 19712132
Change-Id: I5c1fc748fcc756f6665c31951f8af8a37ff4254d
amera/libcameraservice/api1/client2/Parameters.cpp
5132e9ceb4c8c8c7e27cabefbad52d9749184912 31-Mar-2015 Eric Laurent <elaurent@google.com> am 81e776d0: am 2a2642d8: am 42431438: DO NOT MERGE - audio policy: fix DeviceVector::getDevicesFromType()

* commit '81e776d00ddf3bfa6c5cf3368418c21bef66262e':
DO NOT MERGE - audio policy: fix DeviceVector::getDevicesFromType()
424314382b6e2064df1c7c445038a11104be84c7 31-Mar-2015 Eric Laurent <elaurent@google.com> DO NOT MERGE - audio policy: fix DeviceVector::getDevicesFromType()

Fix device type comparison in DeviceVector::getDevicesFromType():
AUDIO_DEVICE_BIT_IN bit must be excluded from type comparison
and used as an orthogonal match criterium.

Manual cherry-pick from master 4c91f90

Bug: 19957479

Change-Id: Ica9f440384bcb85e669864bd29504a4fda862ce7
udiopolicy/AudioPolicyManager.cpp
ac41a6f253a69671f6e018fcc84daf0030615ca9 30-Mar-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: fix IOProfile::isCompatibleProfile()"
f5d144f7ca773750ea7be371f14f9fc975a15862 27-Mar-2015 Eric Laurent <elaurent@google.com> audio policy: fix IOProfile::isCompatibleProfile()

Handle composite devices in IOProfile::isCompatibleProfile()
by just checking the type in this case, not the address which is relevant
only if a single device type is passed as input.

Also remove warning.

Bug: 19762960.
Change-Id: Iaecb7fcfbf7ad39b1e33cb460922f7c069a34a00
udiopolicy/managerdefault/Devices.cpp
udiopolicy/managerdefault/IOProfile.cpp
46bd6b5bb8f1dfd26977a04ee6fcf9641321ca29 30-Mar-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: fix DeviceVector::getDevicesFromType()"
4c91f90c72e74474fad7f6a99ae7926c8d1f2504 26-Mar-2015 Eric Laurent <elaurent@google.com> audio policy: fix DeviceVector::getDevicesFromType()

Fix device type comparison in DeviceVector::getDevicesFromType():
AUDIO_DEVICE_BIT_IN bit must be excluded from type comparison
and used as an orthogonal match criterium.

Change-Id: Ie7378723f5a3d613b1b045ccdda69650a9d655fc
udiopolicy/managerdefault/Devices.cpp
3e414355fbed266916b446eaabbb3f9c153635b2 25-Mar-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: fix release fence logic"
4c9736fbc82b8b76c996c966583d71ca1df17ca6 06-Mar-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix release fence logic

According to spec, HAL will set release_fence to acquire_fence
when error happened (usually during flush call). Camera service
should not refer to the acquireFence anyhow since per spec HAL
needs to set it to -1 if acquireFence has been waited on.

Change-Id: I809355d0c8c71f78f657e37d19221fd1f5bdc90b
amera/libcameraservice/device3/Camera3OutputStream.cpp
525907aa2cf2148186ed55e47e424395b9a43dca 25-Mar-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: fix metadata assertion"
54298b338cf9f782f2ac681a15e6cbbb99649350 25-Mar-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix metadata assertion

Bug: 19897963
Change-Id: I6b383c4750f31691a1c02e927bbeb0c1998a9eff
amera/libcameraservice/common/CameraModule.cpp
amera/libcameraservice/common/CameraModule.h
ae9710473b88592c557488bfcae71616d9e9b75f 24-Mar-2015 Phil Burk <philburk@google.com> Merge "AudioFlinger: call SPDIF wrapper from AudioFlinger"
40272963eb8f8d8d7a1f39e6a25ae73bc755e553 24-Mar-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "camera: update CameraModule"
1147314379fccebdb072cd0c1a246b505839a2b0 24-Mar-2015 Glenn Kasten <gkasten@google.com> Merge "AudioRecord TRANSFER_OBTAIN can be used with FAST flag"
343dad3c1ffdd780bbf247ceebb1f2fd344a5d51 24-Mar-2015 Wally Yau <wyau@google.com> Merge "Make sure waitRelative is called when waitTime != INT64_MAX"
062e67a26e0553dd142be622821f493df541f0c6 11-Feb-2015 Phil Burk <philburk@google.com> AudioFlinger: call SPDIF wrapper from AudioFlinger

Create an interface layer between the AudioFlinger and the HAL
that manages the wrapping and format conversion.

Removed unnecessary includes.
Handle rate conversion in getRenderPosition().
Try to open HAL with encoded format before wrapping with SPDIF.

Bug: 17566660
Change-Id: I00ad888ca15ff0f85b85efb8167c7f5ea761a244
Signed-off-by: Phil Burk <philburk@google.com>
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioHwDevice.cpp
udioflinger/AudioHwDevice.h
udioflinger/AudioStreamOut.cpp
udioflinger/AudioStreamOut.h
udioflinger/SpdifStreamOut.cpp
udioflinger/SpdifStreamOut.h
udioflinger/Threads.cpp
3fac40b9e80e7d27fa613afe22048872f2ff6d9e 24-Mar-2015 Phil Burk <philburk@google.com> Merge "AudioFlinger: prevent retrograde timestamps for direct mode"
676b21b30edbd74d7b9aae247961a1ffde1b8993 24-Feb-2015 Chien-Yu Chen <cychen@google.com> camera: update CameraModule

1. Add more accessor methods to CameraModule to prevent exposing
raw module pointer
2. Use KeyedVector to replace array

Bug: 19897963

Change-Id: I111cc093f09f5fb3c4b13693d5d0687e1f441058
amera/libcameraservice/CameraFlashlight.cpp
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/common/CameraModule.cpp
amera/libcameraservice/common/CameraModule.h
amera/libcameraservice/device1/CameraHardwareInterface.h
ebb80468d8e31e22b867744d86b57bd4bc3186fd 24-Mar-2015 Ronghua Wu <ronghuawu@google.com> Merge "media: add ResourceManagerService"
884de21ca32e4a47f77e541a7284d02054ff3349 24-Mar-2015 Wally Yau <wyau@google.com> Make sure waitRelative is called when waitTime != INT64_MAX

b/19870971

(cherry picked from commit c600af1459c455583e071e653f0d998032aa423e)

Change-Id: Ic6bb54067d76c96ff6fc45431dc2d72db9f0a3a8
udiopolicy/service/AudioPolicyService.cpp
231c3d169ad029689f9d688b68179af7e96b8d78 11-Mar-2015 Ronghua Wu <ronghuawu@google.com> media: add ResourceManagerService

Bug: 19620911
Change-Id: Iea173d310d31781bc50effe3d9bd6553cb5139eb
ediaresourcemanager/Android.mk
ediaresourcemanager/ResourceManagerService.cpp
ediaresourcemanager/ResourceManagerService.h
ediaresourcemanager/test/Android.mk
ediaresourcemanager/test/ResourceManagerService_test.cpp
b7fbf7ecc6b034243ec64f79f3113675b5e3c941 18-Mar-2015 Glenn Kasten <gkasten@google.com> AudioRecord TRANSFER_OBTAIN can be used with FAST flag

Change-Id: I001ba1a88150dddf79d99baf5927f31799745eef
udioflinger/Threads.cpp
6140c79c31f5dc237fba69554de5be641cedf113 19-Mar-2015 Phil Burk <philburk@google.com> AudioFlinger: prevent retrograde timestamps for direct mode

Prevent retrograde motion in the HAL or drivers from making it
up through the AudioFlinger to the app.

Bug: 19604395
Change-Id: I11d6c0f7cab69e75fd4b4a2a90f64960b4bb6d5a
Signed-off-by: Phil Burk <philburk@google.com>
udioflinger/PlaybackTracks.h
udioflinger/Tracks.cpp
ad7345c0d3c4e3562a70ad89d797f7473c7be57a 23-Mar-2015 Glenn Kasten <gkasten@google.com> Merge "Fix typos"
d198b85a163330b03e7507c9e8bfeb5f4d958a6c 16-Mar-2015 Glenn Kasten <gkasten@google.com> Fix typos

Fix typos in comments
Add formal parameter name to declaration where it was missing
Fix out of order comments

Change-Id: I1de81ae82af5ca507864e4c7b959111bac898b98
udioflinger/Threads.cpp
9efdf956cc2eef63fef609375901d6c8df6351b6 19-Mar-2015 Ruben Brunk <rubenbrunk@google.com> camera2: Remove ProCamera.

Bug: 19186859
Change-Id: I4aaadb53db65b479f92cbb3c05329d1e40317900
amera/libcameraservice/Android.mk
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api_pro/ProCamera2Client.cpp
amera/libcameraservice/api_pro/ProCamera2Client.h
amera/libcameraservice/common/Camera2ClientBase.cpp
amera/libcameraservice/common/Camera2ClientBase.h
0e4421286b92a81e952f53210227adbf05d97c25 20-Mar-2015 Andy Hung <hunga@google.com> Merge "Enable full floating point path in AudioMixer"
446ef2025374cee74ee6291b2a11bfa56017ea74 19-Mar-2015 Chih-Hung Hsieh <chh@google.com> Merge "Fix link error of PROCESS_STATE_NONEXISTENT."
54b4246bb2025a5dcfdf1611c199998448d28424 19-Mar-2015 Chih-Hung Hsieh <chh@google.com> Fix link error of PROCESS_STATE_NONEXISTENT.

* A reference to PROCESS_STATE_NONEXISTENT will cause link error with
clang or standard C++ compiler because there is no out-of-class definition,
although g++ is allowing it.
Use +PROCESS_STATE_NONEXISTENT to get the value instead of reference.

Change-Id: I62049584b94e6847b64b572f6ef6c3e9dcc573eb
amera/libcameraservice/CameraService.cpp
1c15c670928bab5eef6b1a06cf49378abb1e70bf 19-Mar-2015 Eric Laurent <elaurent@google.com> Merge "audio routing management for radio"
53810823a6613f54fc0b3c3bc0de267dc1f4e1e5 12-Mar-2015 Eric Laurent <elaurent@google.com> audio routing management for radio

Added radio tuner device connection/disconnection
indication to audio policy manager.

Added documentation and removed unused Module
class member.

Change-Id: I92438c1ff212c4d76f008149554fa89e367fee42
adio/Android.mk
adio/RadioService.cpp
adio/RadioService.h
ae21e335e392125168601dba4731c85b5c25f33f 19-Mar-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: plumbing rotation field through"
5a23aa949188fafe1d8d35966ff5a73974294dfd 19-Mar-2015 Glenn Kasten <gkasten@google.com> Merge "Initial implementation of fast capture dump"
d58b2ac7244a964caa3f4e386b8280ae2f5d2125 19-Mar-2015 Ruben Brunk <rubenbrunk@google.com> Merge "camera2: Add camera client eviction enforcement."
cc776718c0be7c31fe5ab4fc1446d377be60369f 18-Feb-2015 Ruben Brunk <rubenbrunk@google.com> camera2: Add camera client eviction enforcement.

- This updates the CameraService to implement client
eviction behavior based on process priority.

Bug: 19186859

Change-Id: I646939b1cdf1a2237c4e5044164d55a2542cf36e
amera/libcameraservice/Android.mk
amera/libcameraservice/CameraDeviceFactory.cpp
amera/libcameraservice/CameraFlashlight.cpp
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/CameraClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/utils/AutoConditionLock.cpp
amera/libcameraservice/utils/AutoConditionLock.h
amera/libcameraservice/utils/ClientManager.h
amera/libcameraservice/utils/RingBuffer.h
b97babb8c08969b55af3b6456d15f764c8873d3f 12-Mar-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: plumbing rotation field through

Change-Id: I0f4343a0bfa7bf09ba887c78a1da1c08daa35333
amera/libcameraservice/CameraFlashlight.cpp
amera/libcameraservice/api1/client2/CallbackProcessor.cpp
amera/libcameraservice/api1/client2/JpegProcessor.cpp
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
amera/libcameraservice/api1/client2/ZslProcessor.cpp
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
amera/libcameraservice/api_pro/ProCamera2Client.cpp
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device2/Camera2Device.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3DummyStream.cpp
amera/libcameraservice/device3/Camera3DummyStream.h
amera/libcameraservice/device3/Camera3IOStreamBase.cpp
amera/libcameraservice/device3/Camera3IOStreamBase.h
amera/libcameraservice/device3/Camera3InputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.h
amera/libcameraservice/device3/Camera3Stream.cpp
amera/libcameraservice/device3/Camera3Stream.h
amera/libcameraservice/device3/Camera3ZslStream.cpp
a1a847a509c5670276568d9945509677d92507ed 17-Mar-2015 Andy Hung <hunga@google.com> Merge "audioflinger: refresh fast track underrun state upon start"
74bebe401dd966308f29b0c4f42cf6946dc64582 16-Mar-2015 Glenn Kasten <gkasten@google.com> Merge "Update comments"
b89b86d48cd5a6258e24fefd0eab888062cbdfb0 16-Mar-2015 Eric Laurent <elaurent@google.com> Merge "radio service initial implementation"
240934ba80d6c6165749db7681d243c6857a092f 12-Mar-2015 Haynes Mathew George <hgeorge@codeaurora.org> audioflinger: refresh fast track underrun state upon start

False underrun is detected when starting recycled fast tracks, which
leads to continuous fatal assertion failures and even AP reboot.

Track's last mObservedUnderruns isn't updated one at previous stop()
call. Hence, when we start the same track again, we should synchronize
it to the latest state instead of relying on stale one.

authored-by: Weiyin Jiang<wjiang@codeaurora.org>
CRs-Fixed: 803389
Bug: 19635137
Signed-off-by: Andy Hung <hunga@google.com>
Change-Id: Ia003a49c6896dba965798c062c98b8c367ef8369
udioflinger/Tracks.cpp
ac48c28215798e4135396f09d583b22302636735 16-Mar-2015 Rakesh Iyer <rni@google.com> Merge "Remove mId from DeviceDescriptor."
bd321b6ed912c492331216180b8677ee58c1eebd 16-Mar-2015 Dan Stoza <stoza@google.com> Merge "libcameraservice: Stop using IGBC::BufferItem"
f59497bd3c190e087202043de5450ef06e92b27d 27-Jan-2015 Glenn Kasten <gkasten@google.com> Update comments

Change-Id: I37d3c4ce22b74fe8581a886fe5a7f9fef8266dad
udioflinger/FastMixer.cpp
udioflinger/Threads.h
6fa7083f26895ede2331eeb3897f9ae659aae9bf 13-Mar-2015 Rakesh Iyer <rni@google.com> Remove mId from DeviceDescriptor.

DeviceDescriptor inherits from AudioPort which has the correct
handle mId. The mId in DeviceDescriptor shadows this so calls
like DeviceVector::getDeviceFromId() findDeviceById fail because
they are looking at the wrong mId. The failure itself manifested
as createAudioPatch failing.

Change-Id: I8dd012d0678facaac84844b92226cc4b788abece
udiopolicy/managerdefault/Devices.h
802a568f77b9a372537e4216b2a7cbb203958a87 13-Mar-2015 Glenn Kasten <gkasten@google.com> Merge "Fix warning while building mediaserver"
549e735c2ca22d16eea32fda418ba80da32a8558 12-Mar-2015 Dan Stoza <stoza@google.com> libcameraservice: Stop using IGBC::BufferItem

Switches all uses of IGraphicBufferConsumer::BufferItem (and
BufferQueue::BufferItem) to the BufferItem in libgui. Depends on
frameworks/native I699ed0a6837076867ca756b28d1ffb2238f7a0d9.

Change-Id: I187b3a7d05196b6289596afac8fb9a9d4aebff76
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
amera/libcameraservice/api1/client2/StreamingProcessor.h
amera/libcameraservice/api1/client2/ZslProcessor.cpp
amera/libcameraservice/api1/client2/ZslProcessor.h
amera/libcameraservice/api1/client2/ZslProcessor3.h
amera/libcameraservice/device3/Camera3InputStream.cpp
amera/libcameraservice/device3/Camera3InputStream.h
amera/libcameraservice/gui/RingBufferConsumer.cpp
amera/libcameraservice/gui/RingBufferConsumer.h
4e09069a29fc18d0799808cc26f71e9b068e98ad 06-Mar-2015 Eric Laurent <elaurent@google.com> radio service initial implementation

First implementation of broadcast radio service.

This native service runs in mediaserver process and
controls broadcast radio hardware modules.
There is one ihardware module per broadcast radio class.
The service allows serveral clients to control tuners
on hardware modules and manages resource conflicts.

Change-Id: I21469a084c7ccd65042b8ac5f724d060044c45ab
adio/Android.mk
adio/RadioRegions.h
adio/RadioService.cpp
adio/RadioService.h
d4db9dcd7d29234893d580c329f23242197fe664 10-Mar-2015 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Wire up dataSpace, clean up ICameraDeviceUser"
ec8930f218fa0c1acde631543b40b5a0b28bfe1f 09-Mar-2015 Glenn Kasten <gkasten@google.com> Fix warning while building mediaserver

In file included from frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.h:31:0,
from frameworks/av/services/audiopolicy/service/AudioPolicyService.h:38,
from frameworks/av/media/mediaserver/main_mediaserver.cpp:36:
frameworks/av/services/audiopolicy/managerdefault/ConfigParsingUtils.h:29:0: warning: "ARRAY_SIZE" redefined
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
^
In file included from frameworks/av/media/libmediaplayerservice/MediaPlayerService.h:31:0,
from frameworks/av/media/mediaserver/main_mediaserver.cpp:35:
frameworks/av/include/media/stagefright/foundation/ABase.h:21:0: note: this is the location of the previous definition
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(*(a)))
^

Change-Id: I4b80f783c592a78aa88b3dad297278353740466e
udiopolicy/managerdefault/ConfigParsingUtils.h
b4f18f964cba9f124e5a264428290ada6eb4aa00 09-Mar-2015 Glenn Kasten <gkasten@google.com> Merge "Allow TRANSFER_OBTAIN to be used for fast tracks"
1dfe2f9c2d03fc8d0ed0cdfe0b9fb894bc0bcc11 09-Mar-2015 Glenn Kasten <gkasten@google.com> Allow TRANSFER_OBTAIN to be used for fast tracks

Change-Id: I8fa20c26f076567b38210af4a680fe1cb2eacee4
udioflinger/Threads.cpp
3d82c0d9ed2b3e956ad699a9ca2c8a70c9d24678 24-Feb-2015 Eino-Ville Talvala <etalvala@google.com> Camera: Wire up dataSpace, clean up ICameraDeviceUser

- Remove unused arguments from ICameraDeviceUser::createStream
- Add dataSpace as a stream parameter, plumb it through everything

Change-Id: I608cafe694785d1c512276e71b2016f8ac3b0ccb
amera/libcameraservice/CameraFlashlight.cpp
amera/libcameraservice/api1/client2/CallbackProcessor.cpp
amera/libcameraservice/api1/client2/JpegProcessor.cpp
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
amera/libcameraservice/api1/client2/ZslProcessor.cpp
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
amera/libcameraservice/api_pro/ProCamera2Client.cpp
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device2/Camera2Device.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3DummyStream.cpp
amera/libcameraservice/device3/Camera3DummyStream.h
amera/libcameraservice/device3/Camera3IOStreamBase.cpp
amera/libcameraservice/device3/Camera3IOStreamBase.h
amera/libcameraservice/device3/Camera3InputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.h
amera/libcameraservice/device3/Camera3Stream.cpp
amera/libcameraservice/device3/Camera3Stream.h
amera/libcameraservice/device3/Camera3ZslStream.cpp
17c9c998afed5ed9df7495eeed5822f3ed53ebec 03-Mar-2015 Glenn Kasten <gkasten@google.com> Initial implementation of fast capture dump

Change-Id: I898d903e539f760ef7caa80f41ca21c223f67264
udioflinger/FastCaptureDumpState.cpp
udioflinger/FastCaptureDumpState.h
udioflinger/FastMixerDumpState.cpp
udioflinger/Threads.cpp
44182c206f7c5584ef2cf504da6be98fab665dbf 06-Mar-2015 Glenn Kasten <gkasten@google.com> Dump generic information first for each thread

also mBufferSize was already being displayed as part of dumpBase

Change-Id: I17f3062fcc076c594b5fd6b8fca286b27067e07c
udioflinger/Threads.cpp
0b89bc0d285b8fd4798df1ff0ba9f93851a3bd48 06-Mar-2015 Glenn Kasten <gkasten@google.com> Display more fields in thread dumpBase

Change-Id: Ice15e999dda2f6cf9d23685ade4a87f74180322d
udioflinger/Threads.cpp
d7dca050c630bddbd73a6623271b34b4290460ee 06-Mar-2015 Glenn Kasten <gkasten@google.com> Rename mName to mThreadName and kNameLength to kThreadNameLength

Change-Id: I0adfcdcab7923a07a840ec0e04528cb8bfc41f10
udioflinger/Threads.cpp
udioflinger/Threads.h
bcb1486d052e329ae4790d93055d1c51017286c3 06-Mar-2015 Glenn Kasten <gkasten@google.com> Whitespace

switch indent

Change-Id: I652c798dd37a80634d247c4d881fb1cce92c4bd6
udioflinger/FastMixerDumpState.cpp
udioflinger/Threads.cpp
2f55e7632dfa0dafde58efd8cb2af6593217fd91 06-Mar-2015 Glenn Kasten <gkasten@google.com> Rename tee sink file name and add prefix to macros

Change-Id: If316b9e32963d9baef8f4382fcc73dc6c4ff684d
udioflinger/AudioFlinger.cpp
e7d6671c1ab1fea7ab1c4a9ebd1cd8f899c87628 05-Mar-2015 Glenn Kasten <gkasten@google.com> Rename formal parameter to match type name

Change-Id: I0761005b751f5c4a4b28729b1820961ff3077afd
udioflinger/AudioFlinger.cpp
0f5b562737d6b5457aa83a4fdce9c6fb32584d9d 18-Feb-2015 Glenn Kasten <gkasten@google.com> Add devicesToString, inputFlagsToString, and sourceToString

Change-Id: I0c09d76c204ffc5579f62d2ed1faef07922a5962
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
6ffc14ab6b43d4239f5adb4e6c642b7875d26432 06-Mar-2015 Glenn Kasten <gkasten@google.com> Merge "Fix typo in string table"
dfb0e115d827887e2f56a8877fe41b256d24360e 18-Feb-2015 Glenn Kasten <gkasten@google.com> Fix typo in string table

Change-Id: Iaf3d3c77129c62cf3dcad21fc754f390eb43b28e
udioflinger/Threads.cpp
df68f07ca7cdeb500fcf101b317c61a0f0865723 04-Mar-2015 Andy Hung <hunga@google.com> Merge "Improve resampler speed for floating point and arm64"
60d5023f92f344d1c4e72d8b1eee54a1d014f36c 04-Mar-2015 Eric Laurent <elaurent@google.com> Merge "audiopolicy: Do not route VoIP call to HDMI"
acc930d104534dff89d5e336d22d2310069ca7c2 04-Mar-2015 Eric Laurent <elaurent@google.com> audiopolicy: Do not route VoIP call to HDMI

getDeviceForStrategy is returning AUDIO_DEVICE_OUT_AUX_DIGITAL
even when setForceUse is called with FORCE_NONE(earpiece)
during VOIP call.
Actual Intention is to route audio for phone strategy to AUX
device even after setForceUse is called with FORCE_NONE when not
in voice call. It is supposed to exclude VOIP call too.

Bug: 19522164.

Change-Id: I88d515c351f066305f9eed240b1fe5f60ef34f85
udiopolicy/managerdefault/AudioPolicyManager.cpp
6d32d81f966b1e5e6e037d55a5003fea4b87e55b 04-Mar-2015 Glenn Kasten <gkasten@google.com> Merge "Remove PCM16 assumption from FastCapture"
0331cf73db5087311089e01f5d31bb4026e54e6a 04-Mar-2015 Glenn Kasten <gkasten@google.com> Merge "Pull up comment to superclass"
27697a3d51b3e6c3c6619fdb8249af5885629610 04-Mar-2015 Glenn Kasten <gkasten@google.com> Merge "Remove redundant this->"
56d517cb7a52ce8ce99afa4fdf822ff521921fe9 04-Mar-2015 Glenn Kasten <gkasten@google.com> Merge "Add "m" prefix to fields"
5115777127bb4d2d50833537e09054dcdffdfc76 03-Mar-2015 Glenn Kasten <gkasten@google.com> Remove PCM16 assumption from FastCapture

Bug: 19586911
Change-Id: I74d4ddc09a9eb9c651f874482639d39a56f8ca1f
udioflinger/FastCapture.cpp
udioflinger/FastCapture.h
8a0554c63dc40a2a7c066b03041079ec9eb220e5 03-Mar-2015 Glenn Kasten <gkasten@google.com> Pull up comment to superclass

Change-Id: I2e3632ee80744f2f8d932ac1a8597ff805883851
udioflinger/FastMixerDumpState.h
udioflinger/FastThreadDumpState.h
4dd03b5b68dcd8eb5f5ffe2cfe93d26b8f08b848 03-Mar-2015 Glenn Kasten <gkasten@google.com> Remove redundant this->

Change-Id: Iaa11bcce94dd331425197aab49065939e226a6a2
udioflinger/FastCapture.cpp
udioflinger/FastMixer.cpp
e4a7ce250cb94a00aa2f76e5edca1c4479dc5401 03-Mar-2015 Glenn Kasten <gkasten@google.com> Add "m" prefix to fields

Change-Id: Ifdb8fa886d1ff53cd7c8aff3c2f8286e6e18dec2
udioflinger/FastCapture.cpp
udioflinger/FastCapture.h
udioflinger/FastCaptureState.h
udioflinger/FastMixer.cpp
udioflinger/FastMixer.h
udioflinger/FastMixerDumpState.h
udioflinger/FastThread.cpp
udioflinger/FastThread.h
6b667dde03a5707285a2ff76ada525075d4c60ef 07-Feb-2015 Andy Hung <hunga@google.com> Improve resampler speed for floating point and arm64

Add floating point intrinsics for arm32 and arm64 devices.
Add integer intrinsics for arm64 devices.

Bug: 17366024
Change-Id: Id4240f549033deb262815c7145d69820e5fd7b92
udioflinger/AudioResamplerFirOps.h
udioflinger/AudioResamplerFirProcess.h
udioflinger/AudioResamplerFirProcessNeon.h
udioflinger/test-resample.cpp
udioflinger/tests/build_and_run_all_unit_tests.sh
udioflinger/tests/mixer_to_wav_tests.sh
1ba399206f6a99fec17331186041b55c3733c8d8 03-Mar-2015 Chien-Yu Chen <cychen@google.com> Merge "camera: implement flashlight for HAL v1 devices"
38445e493d4cab2abc29515fd3f2ce2e411a6868 03-Mar-2015 Chien-Yu Chen <cychen@google.com> Merge "camera: fix flashlight implementation for HAL v2"
d231fd61ca94441183abda9766ce6906a5b4c3cf 26-Feb-2015 Chien-Yu Chen <cychen@google.com> camera: implement flashlight for HAL v1 devices

Implement flashlight for HAL v1 devices and remove
CameraHardwareInterface's dependency on CameraService to avoid
circular dependency.

Bug: 2682206
Change-Id: Id5bbccef085b607a6189763fd7fbe2e3f26868c8
amera/libcameraservice/CameraFlashlight.cpp
amera/libcameraservice/CameraFlashlight.h
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/common/CameraModule.cpp
amera/libcameraservice/common/CameraModule.h
amera/libcameraservice/device1/CameraHardwareInterface.h
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device3/Camera3Device.cpp
88da526d97442c80731e01bfc94c6b47c4b0c3c7 17-Feb-2015 Chien-Yu Chen <cychen@google.com> camera: fix flashlight implementation for HAL v2

Update torch availability when the camera device availability changes.

For device HAL v2 and v3 implementation, notify torch unavailable for
all camera devices with a flash unit when a camera device is opened.
Notify torch available for all camera devices with flash unit when
all camera devices are closed.

Don't invoke torch status callback in camera service. Invoke torch
status callback in HAL or FlashControlBase implementations to avoid
race condition.

Clean up previous CL.

Bug: 2682206
Change-Id: I24f5478f467b2c680565fe98f112eef33e2547a1
amera/libcameraservice/CameraFlashlight.cpp
amera/libcameraservice/CameraFlashlight.h
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
d702a568cb62e5aebe048147350bb3c76f9386ba 03-Mar-2015 Glenn Kasten <gkasten@google.com> Pull out commandToString() from FastMixerDumpState.cpp

to FastThreadState.cpp, FastMixerState.cpp, and FastCaptureState.cpp

Change-Id: I872efb211e8a0335c42906367859d3674340e374
udioflinger/FastCaptureState.cpp
udioflinger/FastCaptureState.h
udioflinger/FastMixerDumpState.cpp
udioflinger/FastMixerState.cpp
udioflinger/FastMixerState.h
udioflinger/FastThreadState.cpp
udioflinger/FastThreadState.h
fbdb2aceab7317aa44bc8f301a93eb49e17b2bce 02-Mar-2015 Glenn Kasten <gkasten@google.com> Pull up increaseSamplingN and kSamplingNforLowRamDevice

from FastMixerDumpState to FastThreadDumpState, and remove unused parameter
from FastMixerDumpState constructor.

Change-Id: Ib8937b106622a8da28a6ef6043de4528ae82cb05
udioflinger/FastMixerDumpState.cpp
udioflinger/FastMixerDumpState.h
udioflinger/FastThreadDumpState.cpp
udioflinger/FastThreadDumpState.h
udioflinger/Threads.cpp
63238efb0d674758902918e3cdaac322126484b7 03-Mar-2015 Glenn Kasten <gkasten@google.com> Remove redundant semicolon from namespace closing

Change-Id: I163f9d3d216c283ae1160ce4802e5247cf44fba7
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/AudioResampler.h
udioflinger/AudioResamplerCubic.cpp
udioflinger/AudioResamplerCubic.h
udioflinger/AudioResamplerDyn.cpp
udioflinger/AudioResamplerDyn.h
udioflinger/AudioResamplerFirGen.h
udioflinger/AudioResamplerFirOps.h
udioflinger/AudioResamplerFirProcess.h
udioflinger/AudioResamplerFirProcessNeon.h
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
udioflinger/Effects.cpp
udioflinger/PatchPanel.cpp
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
13e71707522a212b192063acb0b221abbe618f60 03-Mar-2015 Glenn Kasten <gkasten@google.com> Merge "Fix compile error if FAST_THREAD_STATISTICS not defined"
785b34e6b2743e3303dcd56d269259da73c40dfb 03-Mar-2015 Glenn Kasten <gkasten@google.com> Merge "Rename FAST_MIXER_STATISTICS to FAST_THREAD_STATISTICS"
d797a9d5daad3051f9ac1d348abc2f434ea3ddcf 02-Mar-2015 Glenn Kasten <gkasten@google.com> Fix compile error if FAST_THREAD_STATISTICS not defined

Change-Id: I3a4ac558e61ad956a7a6e325534e722066e49b2f
udioflinger/Threads.cpp
214b406c813e5baca3e4b5cdc1d986de35f09bbb 02-Mar-2015 Glenn Kasten <gkasten@google.com> Rename FAST_MIXER_STATISTICS to FAST_THREAD_STATISTICS

Change-Id: Idb5f5bf0c20bffff8536cf4a46f696e12e99e81b
udioflinger/Configuration.h
udioflinger/FastMixer.cpp
udioflinger/FastMixerDumpState.cpp
udioflinger/FastMixerDumpState.h
udioflinger/FastThread.cpp
udioflinger/FastThread.h
udioflinger/FastThreadDumpState.cpp
udioflinger/FastThreadDumpState.h
a5c5ad3615613ac0f15012e9e07a34582da7fe77 02-Mar-2015 Glenn Kasten <gkasten@google.com> Re-generate sinc tables with comment and indent by 4

Change-Id: I349273969dfd7e9d7f896f8bd6d552bd6b56ba54
udioflinger/AudioResamplerSincDown.h
udioflinger/AudioResamplerSincUp.h
bf31b3301676ad86151f632e9ca186fd02445d86 02-Mar-2015 Glenn Kasten <gkasten@google.com> Merge "Line length 100"
ad3738ccfadc1b57428c28e91c5428939bbf19b1 02-Mar-2015 Glenn Kasten <gkasten@google.com> Merge "Extract resampler coefficient tables to separate files"
2f5aa01e52b8869515373b5047f00272f245883e 18-Feb-2015 Glenn Kasten <gkasten@google.com> Line length 100

Change-Id: Ic0ae92c300df221387bdd9669e4b7b995d83d28a
udioflinger/AudioResamplerSinc.cpp
675933be11f2c24f9f66011345377d2840938646 17-Feb-2015 Glenn Kasten <gkasten@google.com> Extract resampler coefficient tables to separate files

Change-Id: I2e186bd3172cecc08c436e6bf7546b913249e6c8
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSincDown.h
udioflinger/AudioResamplerSincUp.h
566729efce4035ac4fa09c2c106bcf6756451387 28-Feb-2015 Andy Hung <hunga@google.com> Merge "Fix comments in resampler assembly"
66bcde4a112de4057f80bdef1c8955597d5cca50 28-Feb-2015 Andy Hung <hunga@google.com> Merge "Add channel index mask to AudioMixer"
d4bd93b22ab9f7dfa32dfc6d48e008db3ea9c634 28-Feb-2015 Andy Hung <hunga@google.com> Merge "Change AudioTrack resampling buffers from 3 to 2"
9060199701c97b290aa4a4184d147e0311ab8897 27-Feb-2015 Glenn Kasten <gkasten@google.com> Merge "Warmup cycles must be in range and consecutive"
650ceb93e58435c3cb1fd1860393130121023c0d 29-Jan-2015 Andy Hung <hunga@google.com> Add channel index mask to AudioMixer

Change-Id: Ifbcb61cc24111b7efab5e8d119d44dab26ba1778
udioflinger/AudioMixer.cpp
7841f704fee0e5acd45fa6e47a336120c3cad42c 27-Feb-2015 Andy Hung <hunga@google.com> Merge "Do not pre-fill OutputTrack buffer for duplicating thread"
364b2600670e178931f0e88dbffb4f1f3dccc4ea 26-Feb-2015 Andy Hung <hunga@google.com> Merge "Remove unused stride-by-8 resampling code"
d031aaae9e93ef2860070eee2c191b1cf428cf46 20-Feb-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "CameraService: fix invalid access of camera metadata"
9a4fa2dfb7ce565fabfb7a7bef4f4adfea191f05 20-Feb-2015 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Remove RAW_SENSOR in favor of RAW16"
0fbad3c813cdd67dcab95f998f1982b2180dc322 20-Feb-2015 Ricardo Garcia <rago@google.com> Merge "Fix for getMicMute in AudioFlinger"
a52b8d1f4890f0a695cfbffda106579bcc3a16b5 20-Feb-2015 Glenn Kasten <gkasten@google.com> Merge "Include what you use"
6ff474ed7eefe003216a3f98992f1ece047d64a2 20-Feb-2015 Glenn Kasten <gkasten@google.com> Merge "Pull out FastCaptureDumpState and FastMixerDumpState"
a97dfeb91aae9569ff11a5a40634e2960c03915e 20-Feb-2015 Eino-Ville Talvala <etalvala@google.com> Camera: Remove RAW_SENSOR in favor of RAW16

Change-Id: I69ca24c69f58be958efdef300b127401d2b2e880
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/client2/Parameters.cpp
3e91b5d11866599e8f33e63fb3b6c1d81ce1a1d2 19-Feb-2015 Ricardo Garcia <rago@google.com> Fix for getMicMute in AudioFlinger

Previous logic will only check for mic state of Primary Hardware
Device. Current logic checks state of all devices with valid
microphone input.
This is needed for audio_output feature support.

bug: 19439530
Change-Id: Ibbb92412ac70cf2915bbe8660c04fbaf0ab74171
udioflinger/AudioFlinger.cpp
a9284a8d9e6cb27e6d428be3f70a854d978dc282 19-Feb-2015 Chien-Yu Chen <cychen@google.com> Merge "camera: implement flashlight control"
d2123e631834a887c2d8600c3ac43dda02d47cb9 29-Jan-2015 Glenn Kasten <gkasten@google.com> Warmup cycles must be in range and consecutive

Change-Id: Ie8a40ec3547bdd62a1e2e05b11fb107c25841784
udioflinger/FastCapture.cpp
udioflinger/FastMixer.cpp
udioflinger/FastThread.cpp
udioflinger/FastThread.h
ad8510a339ffab330c2c46e5c247dd1cf9e15c22 18-Feb-2015 Glenn Kasten <gkasten@google.com> Include what you use

Change-Id: I1967861f383bb5ed6743fb69e3bd439907ed7033
udioflinger/FastMixer.cpp
udioflinger/FastMixer.h
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
04333cdc8d6a3c8e4a11835371e8ad13adf3f7f0 18-Feb-2015 Glenn Kasten <gkasten@google.com> Pull out FastCaptureDumpState and FastMixerDumpState

Change-Id: I8e44dbfe02338622eb69193b234743b50f0dd79f
udioflinger/Android.mk
udioflinger/FastCapture.cpp
udioflinger/FastCapture.h
udioflinger/FastCaptureDumpState.cpp
udioflinger/FastCaptureDumpState.h
udioflinger/FastMixer.cpp
udioflinger/FastMixerDumpState.cpp
udioflinger/FastMixerDumpState.h
658fc18d8e632441cd5d83a4f74b53620cbac1fe 19-Feb-2015 Glenn Kasten <gkasten@google.com> Merge "Pull out FastThreadDumpState"
c1b3bc0ced3b7526c31223911d334961ae031995 19-Feb-2015 Jean-Michel Trivi <jmtrivi@google.com> Merge "Refactor AudioPolicyManager"
56ec4ffcbae8aeac6c5245fc7b825d02e2e6cefd 24-Jan-2015 Jean-Michel Trivi <jmtrivi@google.com> Refactor AudioPolicyManager

AudioPolicyManager implementation is now split into the
following files:

files managerdefault/Gains.*
class AudioGain
class VolumeCurvePoint
class StreamDescriptor

files managerdefault/Devices.*
class DeviceDescriptor
class DeviceVector

files managerdefault/Ports.*
class AudioPort
class AudioPortConfig
class AudioPatch

files managerdefault/IOProfile.*
class IOProfile

files managerdefault/HwModule.*
class HwModule

files managerdefault/AudioInputDescriptor.*
class AudioInputDescriptor

files managerdefault/AudioOutputDescriptor.*
class AudioOutputDescriptor

All files for libaudiopolicyservice are moved under service/

All files for libaudiopolicymanager are moved under manager/

Change-Id: I43758be1894e37d34db194b51a19ae24461e066e
udiopolicy/Android.mk
udiopolicy/AudioPolicyClientImpl.cpp
udiopolicy/AudioPolicyClientImplLegacy.cpp
udiopolicy/AudioPolicyEffects.cpp
udiopolicy/AudioPolicyEffects.h
udiopolicy/AudioPolicyFactory.cpp
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
udiopolicy/AudioPolicyService.cpp
udiopolicy/AudioPolicyService.h
udiopolicy/audio_policy_conf.h
udiopolicy/manager/AudioPolicyFactory.cpp
udiopolicy/managerdefault/ApmImplDefinitions.h
udiopolicy/managerdefault/AudioInputDescriptor.cpp
udiopolicy/managerdefault/AudioInputDescriptor.h
udiopolicy/managerdefault/AudioOutputDescriptor.cpp
udiopolicy/managerdefault/AudioOutputDescriptor.h
udiopolicy/managerdefault/AudioPolicyManager.cpp
udiopolicy/managerdefault/AudioPolicyManager.h
udiopolicy/managerdefault/ConfigParsingUtils.cpp
udiopolicy/managerdefault/ConfigParsingUtils.h
udiopolicy/managerdefault/Devices.cpp
udiopolicy/managerdefault/Devices.h
udiopolicy/managerdefault/Gains.cpp
udiopolicy/managerdefault/Gains.h
udiopolicy/managerdefault/HwModule.cpp
udiopolicy/managerdefault/HwModule.h
udiopolicy/managerdefault/IOProfile.cpp
udiopolicy/managerdefault/IOProfile.h
udiopolicy/managerdefault/Ports.cpp
udiopolicy/managerdefault/Ports.h
udiopolicy/managerdefault/audio_policy_conf.h
udiopolicy/service/AudioPolicyClientImpl.cpp
udiopolicy/service/AudioPolicyClientImplLegacy.cpp
udiopolicy/service/AudioPolicyEffects.cpp
udiopolicy/service/AudioPolicyEffects.h
udiopolicy/service/AudioPolicyInterfaceImpl.cpp
udiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/service/AudioPolicyService.cpp
udiopolicy/service/AudioPolicyService.h
b6dc0bf1ce7d54995943c3cd6885f35db77728fc 18-Feb-2015 Yin-Chia Yeh <yinchiayeh@google.com> CameraService: fix invalid access of camera metadata

static_camera_characteristics is not defined in API1.

Change-Id: I422953081b0a5581e12fc4b16052b67ca8062186
amera/libcameraservice/common/CameraModule.cpp
045ee7ea3e42b8657869d81c917feed5fb0c2b4a 18-Feb-2015 Glenn Kasten <gkasten@google.com> Pull out FastThreadDumpState

Change-Id: Ic99890bbba4f856b65535f3df0f928de9e3e9748
udioflinger/Android.mk
udioflinger/FastCapture.h
udioflinger/FastMixerDumpState.h
udioflinger/FastThread.cpp
udioflinger/FastThreadDumpState.cpp
udioflinger/FastThreadDumpState.h
udioflinger/FastThreadState.cpp
udioflinger/FastThreadState.h
228711d4d25ab434c273c92fc01662c0a6b3adbf 13-Feb-2015 Amith Yamasani <yamasani@google.com> Look up user-specific device policy for disabling camera

Camera can be disabled on a per-user basis by device admins.
Changed the system property format to be per-user so that
the policy can be applied based on calling user.

TODO: Ideally this policy information should be pulled from the
DevicePolicyManager rather than relying on system properties.
Property changes will not be applied immediately either, if
there's no listener.

Bug: 19345698
Change-Id: Ia00034726260bc9ff28ac592f20a27b5c9a77d58
amera/libcameraservice/CameraService.cpp
3068d73c6c7e1f44523b1466b903a9c82408b258 09-Feb-2015 Chien-Yu Chen <cychen@google.com> camera: implement flashlight control

Implement flashlight API for module v2.4 by calling module APIs and
by for hal v2 and v3 by using CameraDeviceBase.

Bug: 2682206
Change-Id: Ib8b77f6fd462489d672f27e14fe37801d35b7544
amera/libcameraservice/Android.mk
amera/libcameraservice/CameraFlashlight.cpp
amera/libcameraservice/CameraFlashlight.h
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
d7a77156eb13973f7fce5c9db6113bef83bc205b 06-Feb-2015 Andy Hung <hunga@google.com> Fix comments in resampler assembly

Change-Id: Iedbd14a2c6c73dd9631813bd2414bf11cee78c32
udioflinger/AudioResamplerFirProcessNeon.h
4019a1e408c12040fc13f7bd0027def630efcc18 06-Feb-2015 Andy Hung <hunga@google.com> Remove unused stride-by-8 resampling code

Change-Id: Id8b0343efd4c6fb9668524fb5fe231b05c7cf31f
udioflinger/AudioResamplerFirProcessNeon.h
e8610ba233ecdb3f6d3259412b41738a3861ee7e 06-Feb-2015 Paul McLean <pmclean@google.com> Passing device name up through getDeviceDescriptor() method (when creating)

Change-Id: Ibd85e37914333478fd038c3d2f52e214016c16b1
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
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
udioflinger/Threads.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
udiopolicy/AudioPolicyInterface.h
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
udiopolicy/AudioPolicyService.h
4db561713aae35445c2551a1c1049e7a858af197 04-Feb-2015 Eric Laurent <elaurent@google.com> am 7bc90358: am 5d46bd54: am 3ae5f313: audiopolicy: send device connect notification to HALs

* commit '7bc903581f879c86f3881a2f7563bd28c1ac29b7':
audiopolicy: send device connect notification to HALs
7bc903581f879c86f3881a2f7563bd28c1ac29b7 04-Feb-2015 Eric Laurent <elaurent@google.com> am 5d46bd54: am 3ae5f313: audiopolicy: send device connect notification to HALs

* commit '5d46bd54a279f24d0476b83947ce29e786b5c72c':
audiopolicy: send device connect notification to HALs
3ae5f31393609b7fa92f24132c66e9a8c9244a45 04-Feb-2015 Eric Laurent <elaurent@google.com> audiopolicy: send device connect notification to HALs

Device disconnect notifications are sent from audiopolicy to
the HALs. Send connect notifications as well.

Bug: 19249796.
Bug: 17785277.

Change-Id: Ia823ed154d6a0c7ceb84b0a94f0c3b78392faaf6
udiopolicy/AudioPolicyManager.cpp
e074a93046ebe5cea0b55c3a479e082a426e1e07 30-Jan-2015 Yin-Chia Yeh <yinchiayeh@google.com> CameraService: intercept Camera module

Wrap camera module returned from HAL so get_camera_info returns
static_camera_characteristics processed by framework, which
generates keys added after HAL3.2 is released.

Change-Id: Ief423a1571cf06c7ef80b98b403a33969baf95f6
amera/libcameraservice/Android.mk
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/Camera2Client.h
amera/libcameraservice/api1/CameraClient.cpp
amera/libcameraservice/api1/CameraClient.h
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
amera/libcameraservice/api_pro/ProCamera2Client.cpp
amera/libcameraservice/api_pro/ProCamera2Client.h
amera/libcameraservice/common/Camera2ClientBase.cpp
amera/libcameraservice/common/Camera2ClientBase.h
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/common/CameraModule.cpp
amera/libcameraservice/common/CameraModule.h
amera/libcameraservice/device1/CameraHardwareInterface.h
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device2/Camera2Device.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
37e5e6a53390c5086eea672d50c608f3247d33aa 30-Jan-2015 Eric Laurent <elaurent@google.com> am e33dee9e: am 14a849c2: am 1bf8a210: Merge "audio policy: add fallback for output selection" into lmp-mr1-dev

* commit 'e33dee9e041c6ad8d822f717ef141d657da96c32':
audio policy: add fallback for output selection
5c129eb387334ed17d05071dbe960ef2faa2df87 30-Jan-2015 Eric Laurent <elaurent@google.com> am cba7fe5f: am 6f4428de: am d99c6855: Merge "audio policy: match attached device to declared devices" into lmp-mr1-dev

* commit 'cba7fe5f1cb13108367d6de288428801b2d89a8e':
audio policy: match attached device to declared devices
e33dee9e041c6ad8d822f717ef141d657da96c32 30-Jan-2015 Eric Laurent <elaurent@google.com> am 14a849c2: am 1bf8a210: Merge "audio policy: add fallback for output selection" into lmp-mr1-dev

* commit '14a849c267bdcf564c30f9f2ebf0d619b36f500a':
audio policy: add fallback for output selection
cba7fe5f1cb13108367d6de288428801b2d89a8e 30-Jan-2015 Eric Laurent <elaurent@google.com> am 6f4428de: am d99c6855: Merge "audio policy: match attached device to declared devices" into lmp-mr1-dev

* commit '6f4428de2b4ab10393bbac2441586ac514c8cf53':
audio policy: match attached device to declared devices
1bf8a21018cc1d95dc3c28b5044aeda327c7b54e 30-Jan-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: add fallback for output selection" into lmp-mr1-dev
a82797faddb37adb2d441737884576684c8515cb 30-Jan-2015 Eric Laurent <elaurent@google.com> audio policy: add fallback for output selection

When getOutputForDevice() finds a matching direct output profile
but fails to open it, try to fallback to downmix on mixer output
when format is PCM and sampling rate allows it.

Bug: 19197137.
Change-Id: I197b9b202504265b6928e69740875cb7aba5c2c5
udiopolicy/AudioPolicyManager.cpp
d99c6855901e4b2625aaad3fc24cff5ecf675fa3 30-Jan-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: match attached device to declared devices" into lmp-mr1-dev
a1d525fbf2c1e0b2c61e5d29f338b0a0d8823436 29-Jan-2015 Eric Laurent <elaurent@google.com> audio policy: match attached device to declared devices

Make sure that when a new audio device is connected,
and a specific profile for this device is listed in
audio_policy.conf, this particular profile is used instead
of a default generic profile.

Bug: 19188567.
Change-Id: I5f576fcd697adc041b2cfbd2bac7a51bcc2143b9
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
aae036391b83a4509f2f480f36a1a4974b05132d 29-Jan-2015 Jean-Michel Trivi <jmtrivi@google.com> am 88873ae1: am f1121d96: am 0d84ba3f: Merge "Fix FLAG_BEACON regression" into lmp-mr1-dev

* commit '88873ae1b01208a9e70b80860274f429d08a6c64':
Fix FLAG_BEACON regression
88873ae1b01208a9e70b80860274f429d08a6c64 29-Jan-2015 Jean-Michel Trivi <jmtrivi@google.com> am f1121d96: am 0d84ba3f: Merge "Fix FLAG_BEACON regression" into lmp-mr1-dev

* commit 'f1121d963b51c798ab28c85eeff1eedc9bb2c186':
Fix FLAG_BEACON regression
0d84ba3fd82038cb721ffae234a99e6751ed7fbe 29-Jan-2015 Jean-Michel Trivi <jmtrivi@google.com> Merge "Fix FLAG_BEACON regression" into lmp-mr1-dev
79ad438ed25c59a37244a48899263bbc4bc92f5d 29-Jan-2015 Jean-Michel Trivi <jmtrivi@google.com> Fix FLAG_BEACON regression

Fix regression where FLAG_BEACON is not honored anymore in terms
of routing and muting behavior
When converting from AudioAttributes to stream types, also look
at FLAG_BEACON for mapping to STREAM_TTS

Bug 19185342

Change-Id: I5871c1b94480ae3da544aef99ea9ab4dff97443d
udiopolicy/AudioPolicyManager.cpp
342d039316563eabae80e6e42cf9b28600255e00 29-Jan-2015 Eric Laurent <elaurent@google.com> am 6dafb81d: am 8c403b22: am c84bc78d: Merge "Audio policy: fix device gain initialization" into lmp-mr1-dev

* commit '6dafb81dc699672f218915fa2895f8ee012203a9':
Audio policy: fix device gain initialization
6dafb81dc699672f218915fa2895f8ee012203a9 29-Jan-2015 Eric Laurent <elaurent@google.com> am 8c403b22: am c84bc78d: Merge "Audio policy: fix device gain initialization" into lmp-mr1-dev

* commit '8c403b2265fdef64ac4ba903e6261edd22d81909':
Audio policy: fix device gain initialization
1db89b9c2692fd70eb1cc98b7db2f9beed81e66e 28-Jan-2015 Eric Laurent <elaurent@google.com> Audio policy: fix device gain initialization

Fix initilization of default gain configuration for
audio devices loaded from audio_policy.conf.

Initialization cannot be done in constructor as the possible
gain configurations are not loaded yet.

Bug: 19120566.
Change-Id: I78f057ecfa1a121365ac3d8f317912a6f1647627
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
5bedff60b2facaa1ec5b9433647ebf1504f065ca 16-Jan-2015 Andy Hung <hunga@google.com> Do not pre-fill OutputTrack buffer for duplicating thread

It is not necessary to start the downstream MixerThread early,
rather allow stop() to flush the remaining frames.

Change-Id: Ibcf8e7f5eda09d0f915d50697ff0c24c32fd11c4
udioflinger/Tracks.cpp
7790a33241f773d8a99c6f27d3bde36da08d6238 21-Jan-2015 Yin-Chia Yeh <yinchiayeh@google.com> am 656d738c: am a789e519: am 0c4e56d0: Camera: make sure jpeg buffer size isn\'t too small

* commit '656d738cab67349f4b5a45473a0c48cf89c68fd0':
Camera: make sure jpeg buffer size isn't too small
656d738cab67349f4b5a45473a0c48cf89c68fd0 21-Jan-2015 Yin-Chia Yeh <yinchiayeh@google.com> am a789e519: am 0c4e56d0: Camera: make sure jpeg buffer size isn\'t too small

* commit 'a789e51942c7572e0c9f54326d6d9d0ff65d6941':
Camera: make sure jpeg buffer size isn't too small
3f603dadd7e34891d215cec8ba35ab838e70185a 21-Jan-2015 Eric Laurent <elaurent@google.com> am 1d6aedb3: am bf2751a5: am 7ccc6b9b: Merge "fix audio patch leak." into lmp-mr1-dev

* commit '1d6aedb3581f1ef2ce9862b1b1d03c9fd3cfff83':
fix audio patch leak.
1d6aedb3581f1ef2ce9862b1b1d03c9fd3cfff83 21-Jan-2015 Eric Laurent <elaurent@google.com> am bf2751a5: am 7ccc6b9b: Merge "fix audio patch leak." into lmp-mr1-dev

* commit 'bf2751a5ea6a306c2ba51a0658ec10aa889a81fa':
fix audio patch leak.
0c4e56d0baaa19fcf17234b38d634b7281e2ae37 10-Jan-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: make sure jpeg buffer size isn't too small

Assuming the jpeg header can take up to 256KB, make sure we always
allocate enough size for the image data.

Bug: 18962703
Change-Id: I08eb3d198d12f71f3ab7266324e80fe7410bdc89
amera/libcameraservice/device3/Camera3Device.cpp
7ccc6b9baf2f568a0a8c6e27dcd4195645a6361d 20-Jan-2015 Eric Laurent <elaurent@google.com> Merge "fix audio patch leak." into lmp-mr1-dev
dce27d0ebab31e82543bb777ed3eb04955cd18ff 17-Jan-2015 Andy Hung <hunga@google.com> Merge "Update duplicating thread to use float audio"
2d2bd6af573383bced45e2f610e11193e28fdcdb 16-Jan-2015 Andy Hung <hunga@google.com> Merge "Allow duplicating thread to use native mixing audio format"
aa79befb301bc3451a19021b3fc9e9e6a1f231e8 15-Jan-2015 Eric Laurent <elaurent@google.com> fix audio patch leak.

Always wait for status when executing a create audio patch
command in audio policy service command thread.
The returned patch handle must be passed back to audio policy manager
so that the patch can be modified later.
Failing to do so causes a leak of patch descriptors in audio flinger.

Bug: 19032387.
Change-Id: I5462d1437fac244d9c5e38f2c7b8e1a4c01d2b75
udiopolicy/AudioPolicyService.cpp
fbfc3959f4aac839445edc7075532067fef497c2 15-Jan-2015 Andy Hung <hunga@google.com> Update duplicating thread to use float audio

Previously device format was used, typically pcm 16 bit.

Change-Id: I70a8b594820e948a2caa299194807ec17348b0e9
udioflinger/Threads.cpp
c25b84abdd7ff229d0af663fbf3a37bd9512939d 15-Jan-2015 Andy Hung <hunga@google.com> Allow duplicating thread to use native mixing audio format

Update OutputTrack to take variable formats.
Previously conversion to AUDIO_FORMAT_PCM_16_BIT was required.

Change-Id: I4a96a60ddd8d8dfe651405a0bcd4f98c89bc1ade
udioflinger/PlaybackTracks.h
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
cd7382b7dcb2ba428a51264cf4e1d369884ff161 16-Jan-2015 Eric Laurent <elaurent@google.com> am c09eb2df: am 65cb339d: am 21291a42: Merge "fix leak in audio policy effect config parser" into lmp-mr1-dev

* commit 'c09eb2dfef090864e3ab827c12e724424fc8ca01':
fix leak in audio policy effect config parser
c09eb2dfef090864e3ab827c12e724424fc8ca01 16-Jan-2015 Eric Laurent <elaurent@google.com> am 65cb339d: am 21291a42: Merge "fix leak in audio policy effect config parser" into lmp-mr1-dev

* commit '65cb339de0f628c82bdd5c68d868b6f3dc83cf04':
fix leak in audio policy effect config parser
21291a420e11ccdf23e955c3dc390304230ddce3 16-Jan-2015 Eric Laurent <elaurent@google.com> Merge "fix leak in audio policy effect config parser" into lmp-mr1-dev
dda683a2ccb84ccc840b76e2ced10052f65ce43e 15-Jan-2015 Andy Hung <hunga@google.com> Merge "Allow AUDIO_FORMAT_PCM_8_BIT AudioTrack buffers"
182c2f5e48f46c11dbcb5eecb46268dff4ad4797 15-Jan-2015 Eric Laurent <elaurent@google.com> fix leak in audio policy effect config parser

Free temporary effect descriptors created in
loadAudioEffectConfig().

Bug 19021726.

Change-Id: Icd44216e25df3fe683a01763d7e8a7b84f367a1a
udiopolicy/AudioPolicyEffects.cpp
73315c1a8b39dcc7b9c8721de6653405503b3a5b 15-Jan-2015 Leo Wang <leozwang@google.com> am c9123e9a: am eed5e4bd: am 5b578bec: Merge " [FM]There is no sound output from BT earphone while BT earphone is connected" into lmp-mr1-dev

* commit 'c9123e9aec7d84b51e5e3863953bcbd05e754513':
[FM]There is no sound output from BT earphone while BT earphone is connected
c9123e9aec7d84b51e5e3863953bcbd05e754513 15-Jan-2015 Leo Wang <leozwang@google.com> am eed5e4bd: am 5b578bec: Merge " [FM]There is no sound output from BT earphone while BT earphone is connected" into lmp-mr1-dev

* commit 'eed5e4bd2b25da3e1965f4ab360f3cea1ccbcc2c':
[FM]There is no sound output from BT earphone while BT earphone is connected
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
udioflinger/AudioMixer.h
e6b8b27088f461957b4cbc51adbc8b01c41e9de2 13-Jan-2015 Hochi Huang <hochi.huang@mediatek.com> [FM]There is no sound output from BT earphone while BT earphone is connected

Bug: 18847131

Review: https://partner-android-review.git.corp.google.com/#/c/193318

Signed-off-by: Hochi Huang <hochi.huang@mediatek.com>

Change-Id: I79703ba4ceb67ca3b95fbc71444dd3b116ba4131
udiopolicy/AudioPolicyManager.h
a18eb9ea913e2cd19df9fe0f1b2a667339006581 12-Jan-2015 Glenn Kasten <gkasten@google.com> Merge "Move roundup from frameworks/av to system/media"
36d560b1f1146da34016744bb7a72b2f4f348c9d 07-Jan-2015 Chong Zhang <chz@google.com> am 27a78b56: am 78c02ddb: am cfa5bf04: Merge "make libserviceutility a shared lib" into lmp-mr1-dev

* commit '27a78b56e1cf9814971192883cb7d15c186465f7':
make libserviceutility a shared lib
audio policy: fix remote mic capture
audio policy: suppport for dynamic source
Fix overload of SoftVideoDecoderOMXComponent::updatePortDefinitions
Fix race condition in signaling completion for decode.
AnotherPacketSource: need reset some members before returning from queueDiscontinuity().
Fix looping sound playback
AnotherPacketSource.cpp: Do not queue discontinity signal buffer resulted from seek.
27a78b56e1cf9814971192883cb7d15c186465f7 07-Jan-2015 Chong Zhang <chz@google.com> am 78c02ddb: am cfa5bf04: Merge "make libserviceutility a shared lib" into lmp-mr1-dev

* commit '78c02ddb6bf0d676160244a62c11dceb68301b73':
make libserviceutility a shared lib
audio policy: fix remote mic capture
audio policy: suppport for dynamic source
Fix overload of SoftVideoDecoderOMXComponent::updatePortDefinitions
Fix race condition in signaling completion for decode.
AnotherPacketSource: need reset some members before returning from queueDiscontinuity().
Fix looping sound playback
AnotherPacketSource.cpp: Do not queue discontinity signal buffer resulted from seek.
cfa5bf04ff250a14b11a75bcfa35ee2d6dbab4e9 07-Jan-2015 Chong Zhang <chz@google.com> Merge "make libserviceutility a shared lib" into lmp-mr1-dev
5db7897ddd32e3ec3ab45ecdb6f21b6265e7e14a 07-Jan-2015 Chong Zhang <chz@google.com> make libserviceutility a shared lib

so that we have only one getpid_cached in mediaserver process

bug: 18919657

Change-Id: Iff3cd932c9110e874b3885f79705f49bf3e3f1fc
udioflinger/Android.mk
udiopolicy/Android.mk
oundtrigger/Android.mk
53dbe77b9f50cdd0de88b9d25dd643e90c8ba68b 06-Jan-2015 Glenn Kasten <gkasten@google.com> Move roundup from frameworks/av to system/media

Change-Id: I1083ab739e445e5bd3e3082fc1d3a20cc19601d5
edialog/Android.mk
81879df8dc51df4d8a3880349e9e1e6b5e3cebfb 07-Jan-2015 Eric Laurent <elaurent@google.com> am 69158e3e: am 6ab33981: am 610255e8: Merge "audioflinger: pause HW A/V sync output when AudioTrack underruns" into lmp-mr1-dev

* commit '69158e3e7b565a5ca131a2efaa9b76615ca80cbb':
audioflinger: pause HW A/V sync output when AudioTrack underruns
69158e3e7b565a5ca131a2efaa9b76615ca80cbb 07-Jan-2015 Eric Laurent <elaurent@google.com> am 6ab33981: am 610255e8: Merge "audioflinger: pause HW A/V sync output when AudioTrack underruns" into lmp-mr1-dev

* commit '6ab33981d45cd69e683a143fec6530e66bd3e371':
audioflinger: pause HW A/V sync output when AudioTrack underruns
610255e8f2d02cb3513695eacf1c37d66b3553d6 07-Jan-2015 Eric Laurent <elaurent@google.com> Merge "audioflinger: pause HW A/V sync output when AudioTrack underruns" into lmp-mr1-dev
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
7ae3dfabb40d061aa613b255cba65ee35567f323 07-Jan-2015 Eric Laurent <elaurent@google.com> Merge "fix record from default input source" into lmp-mr1-dev
aee1c89f3d1868e77208bc64f9f1b2fc5c4a3514 07-Jan-2015 Eric Laurent <elaurent@google.com> Merge "DO NOT MERGE - fix memory leak in PatchPanel" into lmp-mr1-dev
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
udiopolicy/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/AudioPolicyManager.cpp
e443ffac2a09b69470c4663ee031a527c53738d9 05-Jan-2015 soon1.choi <soon1.choi@lge.com> DO NOT MERGE - fix memory leak in PatchPanel

Before the audio patch is created, audio patch with same handle is
removed from vector for patches. At this time, Patch allocated in the
heap is not freed. This causes memory leaks in the mediaserver.

Bug: 18904322.

Change-Id: Id0d28c36a7e7fbf473753bf4ead7518f28c1b998
udioflinger/PatchPanel.cpp
b126b43fcbfe10643245396fcae462c541a94ccf 05-Jan-2015 keunyoung <keunyoung@google.com> am 4250b955: am 01310cd7: am 3190e67d: close remote submix\'s output when device is not available.

* commit '4250b955f40ec459b5aeff3129a570fb182e8819':
close remote submix's output when device is not available.
4250b955f40ec459b5aeff3129a570fb182e8819 05-Jan-2015 keunyoung <keunyoung@google.com> am 01310cd7: am 3190e67d: close remote submix\'s output when device is not available.

* commit '01310cd7adad778f8a6d0e4bc73dae068638abf2':
close remote submix's output when device is not available.
3190e67d5c80c1e39e3be91784110af1180cd182 30-Dec-2014 keunyoung <keunyoung@google.com> close remote submix's output when device is not available.

- change output close logic to find the device from IOProfile rather than
AudioPatch as AudioPatch handle can be cleared before disconnect.
- Otherwise, remote submix can be stuck as output is never closed and does not
work any more as subsequent open fails as output is already taken.

bug: 18733215

Change-Id: Iddb481c91e81070e6be18996a4c8837dabd7ebdb
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
5111fe3ea0a5ba4fd0735535ae7e08a0c563353d 05-Jan-2015 Eric Laurent <elaurent@google.com> am 645b0192: am 76758100: am 43637c2e: Merge "fix memory leak in PatchPanel"

* commit '645b0192ad5d9b46b06aa06ac5670a8390d35f6f':
fix memory leak in PatchPanel
645b0192ad5d9b46b06aa06ac5670a8390d35f6f 05-Jan-2015 Eric Laurent <elaurent@google.com> am 76758100: am 43637c2e: Merge "fix memory leak in PatchPanel"

* commit '76758100c85622c178355959e454651310ea0011':
fix memory leak in PatchPanel
76758100c85622c178355959e454651310ea0011 05-Jan-2015 Eric Laurent <elaurent@google.com> am 43637c2e: Merge "fix memory leak in PatchPanel"

* commit '43637c2e0313ed9fea4e4aceb14c166349327aea':
fix memory leak in PatchPanel
d8cd47792bac11a44096ef8233bb5268a6674bec 05-Jan-2015 soon1.choi <soon1.choi@lge.com> fix memory leak in PatchPanel

Before the audio patch is created, audio patch with same handle is
removed from vector for patches. At this time, Patch allocated in the
heap is not freed. This causes memory leaks in the mediaserver.

Change-Id: Id0d28c36a7e7fbf473753bf4ead7518f28c1b998
udioflinger/PatchPanel.cpp
b187de1ada34a9023c05d020a4592686ba761278 30-Dec-2014 Glenn Kasten <gkasten@google.com> Line length 100

Change-Id: I6c8fe626a3825fa9e139319656d682a57b887c97
udioflinger/AudioFlinger.cpp
udioflinger/AudioResamplerFirGen.h
udioflinger/AudioResamplerFirProcess.h
udioflinger/FastMixer.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
17f32a27930cec82d0eff4d5fe7932bd72c869bb 24-Dec-2014 Eric Laurent <elaurent@google.com> am b915a420: am 57221635: am 5886252a: Merge "audio policy: fix isSourceActive() for hotword" into lmp-mr1-dev

* commit 'b915a420a6a205d30c0181d3fc13078fc6d37a3c':
audio policy: fix isSourceActive() for hotword
b915a420a6a205d30c0181d3fc13078fc6d37a3c 24-Dec-2014 Eric Laurent <elaurent@google.com> am 57221635: am 5886252a: Merge "audio policy: fix isSourceActive() for hotword" into lmp-mr1-dev

* commit '572216352498c702651567b3b299a1f7ed725429':
audio policy: fix isSourceActive() for hotword
ddef616411f7f2788702f22d38c7ef3e7c347172 20-Dec-2014 Eric Laurent <elaurent@google.com> am d8be13b8: am caf17e31: am 0a0662ea: Merge "audio policy: improve accessibility routing" into lmp-mr1-dev

* commit 'd8be13b8d964b7edb02cb2ad64dee86ff247c911':
audio policy: improve accessibility routing
0f7b5f2b231caf87da9b20b74d086e5a9d6f4a9d 19-Dec-2014 Eric Laurent <elaurent@google.com> audioflinger: pause HW A/V sync output when AudioTrack underruns

Do not standby, starve or feed 0s to the audio HAL on direct
output using HW A/V sync mode.

Bug: 17883772.

Change-Id: I11e6c97ec24360d75f9b602814d40a54b60cb7a7
udioflinger/Threads.cpp
udioflinger/Threads.h
d8be13b8d964b7edb02cb2ad64dee86ff247c911 20-Dec-2014 Eric Laurent <elaurent@google.com> am caf17e31: am 0a0662ea: Merge "audio policy: improve accessibility routing" into lmp-mr1-dev

* commit 'caf17e316c7b7c22e877397f6bb3f882e4f68279':
audio policy: improve accessibility routing
a34c9ce292ea984e92d8f70d2c056e5372c4f452 19-Dec-2014 Eric Laurent <elaurent@google.com> audio policy: fix isSourceActive() for hotword

Only condider AUDIO_SOURCE_HOTWORD equivalent to
AUDIO_SOURCE_VOICE_RECOGNITION if the active capture
was triggered by a hardware hotword recognition.

Also fix activeInputsCount().

Bug: 18802896.
Change-Id: I471aafcae29a76e9c323c6c0c314ef083991476b
udiopolicy/AudioPolicyManager.cpp
2cbe89a82d4167c5d5bcf3024edc22ab6874143a 19-Dec-2014 Eric Laurent <elaurent@google.com> audio policy: improve accessibility routing

Force re-evaluating accessibility use case routing
when a condition affecting it (ringtone, alarm, call state)
is changing.

Bug: 18761698.
Change-Id: I42ac3a9fdc80bce11cf0a7fc76f680af4271abc9
udiopolicy/AudioPolicyManager.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
145cf5d885c238b690ab8240137934327b85c427 17-Dec-2014 Eric Laurent <elaurent@google.com> Merge "audioflinger: implement pause/resume for direct outputs" into lmp-mr1-dev
c30943f7485fa84a32e7d070234b3def692d9d16 17-Dec-2014 Jean-Michel Trivi <jmtrivi@google.com> am 22dfb932: am 8aadc515: am 71b52b5b: Merge "Fix routing not happening after change in output device list" into lmp-mr1-dev

* commit '22dfb93254de370d401706728aba1f032ef1b172':
Fix routing not happening after change in output device list
a268a817fb9df2a266f06b58680fa4168517c8cd 17-Dec-2014 Jean-Michel Trivi <jmtrivi@google.com> am 93118cd9: am 99429b40: am 277c7b8c: Merge "Fix permission check for audio recording" into lmp-mr1-dev

* commit '93118cd96233b682be95a3eb114d88d69c8cc416':
Fix permission check for audio recording
22dfb93254de370d401706728aba1f032ef1b172 17-Dec-2014 Jean-Michel Trivi <jmtrivi@google.com> am 8aadc515: am 71b52b5b: Merge "Fix routing not happening after change in output device list" into lmp-mr1-dev

* commit '8aadc515b57c78cbb07ae7d0cb2553148ef05947':
Fix routing not happening after change in output device list
93118cd96233b682be95a3eb114d88d69c8cc416 17-Dec-2014 Jean-Michel Trivi <jmtrivi@google.com> am 99429b40: am 277c7b8c: Merge "Fix permission check for audio recording" into lmp-mr1-dev

* commit '99429b40411790b85e19c57392bbd292a237c470':
Fix permission check for audio recording
71b52b5bb3be81bffa320241ca486fbf964d743e 17-Dec-2014 Jean-Michel Trivi <jmtrivi@google.com> Merge "Fix routing not happening after change in output device list" into lmp-mr1-dev
277c7b8c41436125742339d8c80bccf0f2b086d9 17-Dec-2014 Jean-Michel Trivi <jmtrivi@google.com> Merge "Fix permission check for audio recording" into lmp-mr1-dev
a73d8dba2785771302dde66c369dc6cbae3b170b 17-Dec-2014 Hochi Huang <hochi.huang@mediatek.com> am 3af7b729: am 7ca332ab: am 045e710f: [FM] Fix notification routing when FM enable

* commit '3af7b7291bcd9b1b30dd11a8bedbdc63cc74b5a9':
[FM] Fix notification routing when FM enable
3af7b7291bcd9b1b30dd11a8bedbdc63cc74b5a9 17-Dec-2014 Hochi Huang <hochi.huang@mediatek.com> am 7ca332ab: am 045e710f: [FM] Fix notification routing when FM enable

* commit '7ca332ab8d7329598386acc1f50c43fc59952210':
[FM] Fix notification routing when FM enable
045e710f8ce7ce1679b9b5f0adbd3290c4cc6f54 10-Dec-2014 Hochi Huang <hochi.huang@mediatek.com> [FM] Fix notification routing when FM enable

https://partner-android-review.git.corp.google.com/#/c/188454/

Bug: 18727227

Change-Id: I74856ede5999cfc8a6932a99855d468cccd6f51c
Signed-off-by: Hochi Huang <hochi.huang@mediatek.com>
udiopolicy/AudioPolicyManager.h
fe472e292ab50c121ff93dffa3b54c96feedcfef 16-Dec-2014 Jean-Michel Trivi <jmtrivi@google.com> Fix routing not happening after change in output device list

If an output stream is active while rerouting rules are installed
and recording starts, the list of outputs is not updated and
therefore the stream is not rerouted to the new virtual device.
The fix consists in also taking into account all the policy-related
outputs when evaluating the before and after list of outputs
following a connection state event.

Bug 18736417

Change-Id: I6697976b3f89e2c0995e888e9046a2273361bb97
udiopolicy/AudioPolicyManager.cpp
30e0fa0334bdf5b4a87aabc643a03ad2c6814942 16-Dec-2014 Eric Laurent <elaurent@google.com> am 70043ec5: am 679a1439: am be845fce: Merge "audiopolicy : Fix for incorrect input device selection" into lmp-mr1-dev

* commit '70043ec5e8c79803972686577a9d36431019c15f':
audiopolicy : Fix for incorrect input device selection
9b95da41f87e7308ef1e09fbd2bb919843b02be3 16-Dec-2014 Eric Laurent <elaurent@google.com> am 7f1295f5: am 9632d33e: am cd71a69d: audio: Force audio to Speaker if requested during VOIP call

* commit '7f1295f5cf27127601ea15c31b6c144ff28d2a8b':
audio: Force audio to Speaker if requested during VOIP call
70043ec5e8c79803972686577a9d36431019c15f 16-Dec-2014 Eric Laurent <elaurent@google.com> am 679a1439: am be845fce: Merge "audiopolicy : Fix for incorrect input device selection" into lmp-mr1-dev

* commit '679a14393639c70a653fe2a07f8de582d3a5de14':
audiopolicy : Fix for incorrect input device selection
7f1295f5cf27127601ea15c31b6c144ff28d2a8b 16-Dec-2014 Eric Laurent <elaurent@google.com> am 9632d33e: am cd71a69d: audio: Force audio to Speaker if requested during VOIP call

* commit '9632d33e21ec2631c75cc949e0c92c351fd6a447':
audio: Force audio to Speaker if requested during VOIP call
be845fce36a65139eb353ba7442eba951b1ebee3 16-Dec-2014 Eric Laurent <elaurent@google.com> Merge "audiopolicy : Fix for incorrect input device selection" into lmp-mr1-dev
dc136ffee31f21da3b31240f8a22d4d08a658d0d 16-Dec-2014 Eric Laurent <elaurent@google.com> audiopolicy : Fix for incorrect input device selection

Some VoIP applications do not use source as VOICE_COMM
but MIC and policy manager ignores the force usage in that
case and selects handset-mic as input device even when
BT-SCO headset is connected.
Check the force usage for the AUDIO_SOURCE_MIC as well.

Bug: 18606571

Change-Id: I5d5010ab396f85bf58573943c91fd815f39f57c1
udiopolicy/AudioPolicyManager.cpp
cd71a69d922eab2929faf8f5652fcd1b9a29cbe8 16-Dec-2014 Eric Laurent <elaurent@google.com> audio: Force audio to Speaker if requested during VOIP call

getDeviceForStrategy is returning AUDIO_DEVICE_OUT_USB even
when setForceUse is called with Speaker during VOIP call.
Actual Intention is to route audio for phone strategy to USB
device even after setForceUse is called with Speaker when not
in voice call. It is supposed to exclude VOIP call too

Added additional check for MODE_IN_COMMUNICATION so that
it returns SPEAKER when setForceUse is called with speaker

Bug: 18758599

Change-Id: I1c51128cc1c7bfce1cf6f1fde60b428d3a9379fc
udiopolicy/AudioPolicyManager.cpp
8faa3262f367f8f10ff310ac3c097b860ba9cc3e 05-Dec-2014 Eric Laurent <elaurent@google.com> DO NOT MERGE - audio policy: fix inifinite loop in clearAudioPatches()

releaseAudioPatch() does not necessarily remove the audio patch
from the list.
Scan the list from the top down to avoid adjusting the index.

Bug: 18621514.
Change-Id: I58787154680f7cb1818509017835b1693d62190f
udiopolicy/AudioPolicyManager.cpp
97bb33f58d742539f3382583d7978fca71ffa2d5 13-Dec-2014 Jean-Michel Trivi <jmtrivi@google.com> Fix permission check for audio recording

Define input types covering the different usecases for audio
recording, and check the corresponding permissions when
starting to record.
Move the permission check from audio flinger to audio policy,
as only the policy has the information to determine which
permission to enforce.
Fix missing permission when an application records audio
and the audio is injected by an external policy.

Bug 18736417

Change-Id: If7ec040502242c990ac8ea464db484339bdce573
udioflinger/AudioFlinger.cpp
udiopolicy/AudioPolicyClientImplLegacy.cpp
udiopolicy/AudioPolicyInterface.h
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
667d3ea42b3557f90d7d2a7638d2575db0b13470 16-Dec-2014 Chien-Yu Chen <cychen@google.com> am 045513fc: am 0fd52ac2: am 6eac9e2f: Merge "Camera2Client: flush requests in stopPreviewL" into lmp-mr1-dev

* commit '045513fc55cd500225071c11b06e1f4bb133681f':
Camera2Client: flush requests in stopPreviewL
045513fc55cd500225071c11b06e1f4bb133681f 16-Dec-2014 Chien-Yu Chen <cychen@google.com> am 0fd52ac2: am 6eac9e2f: Merge "Camera2Client: flush requests in stopPreviewL" into lmp-mr1-dev

* commit '0fd52ac2929f6ded984cc3a063645d65b5e2006f':
Camera2Client: flush requests in stopPreviewL
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
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
2cec0dfa9f97b87733b8b250b49729fc6bb3a60a 20-Aug-2014 Ruchit Sharma <ruchits@nvidia.com> Camera2Client: flush requests in stopPreviewL

Requests queued in the pipeline have little meaning after the app
calls stopPreview(). Flushing will help improve the switch KPI.

bug 17340914

Change-Id: I899d69aa3b0fd41f028760290a81013297712fed
amera/libcameraservice/api1/Camera2Client.cpp
b9e51a88fa1dd3eb14d428ac02a9910ec1589367 15-Dec-2014 Eric Laurent <elaurent@google.com> am f750da42: am 23085662: am c73ca6ef: audio policy: fix remote mic capture

* commit 'f750da42246d064c838904869d2d6ff9332c6158':
audio policy: fix remote mic capture
f750da42246d064c838904869d2d6ff9332c6158 13-Dec-2014 Eric Laurent <elaurent@google.com> am 23085662: am c73ca6ef: audio policy: fix remote mic capture

* commit '2308566236a3ff16197419ec226f956a295fe81a':
audio policy: fix remote mic capture
c73ca6ef04136f28306784ad35f444538f081957 12-Dec-2014 Eric Laurent <elaurent@google.com> audio policy: fix remote mic capture

commit 275e8e9de introduced a regression for platforms
overriding AudioPolicyManager::getDeviceForInputSource() method.

Fixed by defining specific non virtual methods when overiding would
break remote submix implementation.

Bug: 18736417.

Change-Id: Id4d0a6c48da987e6fb24422f2d61c7ab0fbfc921
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
5d61cc77c592d1cf56a71ac9891b210c860b2bae 12-Dec-2014 Eric Laurent <elaurent@google.com> am d7986933: am 0cbeaf83: am 8cffa91a: Merge "audio policy: suppport for dynamic source" into lmp-mr1-dev

* commit 'd7986933bcf0b327bc260312b0ff0f83431a158b':
audio policy: suppport for dynamic source
d7986933bcf0b327bc260312b0ff0f83431a158b 12-Dec-2014 Eric Laurent <elaurent@google.com> am 0cbeaf83: am 8cffa91a: Merge "audio policy: suppport for dynamic source" into lmp-mr1-dev

* commit '0cbeaf83f7f50b5bc25a8dd7a08ea4e7c364c815':
audio policy: suppport for dynamic source
105e6e0c38947e97f9e199d9f07f9be64ae3cfe1 12-Dec-2014 Chih-Hung Hsieh <chh@google.com> am 7b2b2675: am 67c93ad7: am f1b12df3: Merge "Trigger error only when a template is instantiated."

* commit '7b2b26750fb0a567f2d1b7a3547ae877d336e405':
Trigger error only when a template is instantiated.
7b2b26750fb0a567f2d1b7a3547ae877d336e405 12-Dec-2014 Chih-Hung Hsieh <chh@google.com> am 67c93ad7: am f1b12df3: Merge "Trigger error only when a template is instantiated."

* commit '67c93ad704d4418445c6d9693420f1cbaad98b0a':
Trigger error only when a template is instantiated.
650254065e7c6b5abab5e3d154f720753fe1e1cf 11-Dec-2014 Chih-Hung Hsieh <chh@google.com> Trigger error only when a template is instantiated.

Clang compiler will check defintions and trigger undefined template
error of 'android::CompileTimeAssert<false>' even when MixMul is not
instantiated. Avoid such parse time error but trigger link error when the
generic MixMul template is used.

Change-Id: I84ef60a69fbfbeefc93b5654e4bdd54f9d530867
udioflinger/AudioMixerOps.h
8cffa91a76d3fa4c96268fc40fc8722a0d33dc8d 11-Dec-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: suppport for dynamic source" into lmp-mr1-dev
65575de268f4c0d75e6c1172469001ace765fc14 11-Dec-2014 Phil Burk <philburk@google.com> am 2592184c: am 6baa8fe7: am 94a92c69: Merge "[audio][audioflinger] Consume all frames when a DirectThread is done." into lmp-mr1-dev

* commit '2592184c976ef83aa9fdad7d63bfdb408c95aa7d':
[audio][audioflinger] Consume all frames when a DirectThread is done.
2592184c976ef83aa9fdad7d63bfdb408c95aa7d 11-Dec-2014 Phil Burk <philburk@google.com> am 6baa8fe7: am 94a92c69: Merge "[audio][audioflinger] Consume all frames when a DirectThread is done." into lmp-mr1-dev

* commit '6baa8fe747621b7121ff18dcdfab15d99c349c15':
[audio][audioflinger] Consume all frames when a DirectThread is done.
c722f30eef03e77054395ae122470cf8dba93937 10-Dec-2014 Eric Laurent <elaurent@google.com> audio policy: suppport for dynamic source

Completed support for dynamic sources:
- remote submix input device is dynamically connected/disconnected
when corresponding AudioTrack starts/stops.

Also do not create a duplicated output for mixes used by dynamic policies.

Bug: 16006090.
Change-Id: Ib5b5a2159fcac9d9f410a5a2f1c64d7ebad79f72
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
94a92c69af528edf6ec17d7978a0c3bb6ab51e63 11-Dec-2014 Phil Burk <philburk@google.com> Merge "[audio][audioflinger] Consume all frames when a DirectThread is done." into lmp-mr1-dev
99adee3c3d9cde6819741a38163954808fea270a 11-Dec-2014 Phil Burk <philburk@google.com> [audio][audioflinger] Consume all frames when a DirectThread is done.

This bug was causing movies to think there was still data left to play so they never finished.

Bug: 18360054
Change-Id: If7aee81d62b7af8532abd14579677848a06fe2b1
Signed-off-by: Phil Burk <philburk@google.com>
udioflinger/Threads.cpp
c550a26ac1d43875365b123065a8de557bb9198b 10-Dec-2014 Jean-Michel Trivi <jmtrivi@google.com> am bd9df749: am 1546028a: am 1767df77: AudioPolicyManager: distinguish between mirroring and rerouting

* commit 'bd9df749bf5875fb2a1d909b0da920b8f261a419':
AudioPolicyManager: distinguish between mirroring and rerouting
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
bd9df749bf5875fb2a1d909b0da920b8f261a419 10-Dec-2014 Jean-Michel Trivi <jmtrivi@google.com> am 1546028a: am 1767df77: AudioPolicyManager: distinguish between mirroring and rerouting

* commit '1546028a2d02837f88f7ea1a4109e7649b665d2f':
AudioPolicyManager: distinguish between mirroring and rerouting
66b17e9dfe114ae968bfb2f8ad8325527e373c65 10-Dec-2014 Glenn Kasten <gkasten@google.com> Merge commit 'f5a968a0' into mm

Change-Id: Ifd30546c11def40ad483f27c9d7baa4008fcbac3
2a5b6e4c983be6ea85d41f235b2e4b250b37b2bd 10-Dec-2014 Chien-Yu Chen <cychen@google.com> am f44bdeb7: am 61697a5c: am 9cea7aa4: Merge "Camera3Device: support shutter after result" into lmp-mr1-dev

* commit 'f44bdeb7aff53309ed09fdbf48be526c58f7964b':
Camera3Device: support shutter after result
1fcae5927d4354b4e963c233bf77246631a852c5 10-Dec-2014 Ruben Brunk <rubenbrunk@google.com> am 3b46819e: Merge commit \'2340e5a8\' into manualmerge

* commit '3b46819eb0dd9ea510619c351d7ffdc244ed511d':
Camera2: Round unsupported surface sizes in configure.
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
f44bdeb7aff53309ed09fdbf48be526c58f7964b 10-Dec-2014 Chien-Yu Chen <cychen@google.com> am 61697a5c: am 9cea7aa4: Merge "Camera3Device: support shutter after result" into lmp-mr1-dev

* commit '61697a5c1ddd2ad882a889474822851187734cf4':
Camera3Device: support shutter after result
1767df778e20c1395afc63b3a0479bd903e7b9f0 10-Dec-2014 Jean-Michel Trivi <jmtrivi@google.com> AudioPolicyManager: distinguish between mirroring and rerouting

In the screen mirroring case, the notification manager queries
the policy to see if media "is playing remotely": if yes, it
will not request audio focus before playing a notification.
This is the correct behavior for screen mirroring, but doesn't
work when audio is rerouted to an external policy.
This change consists in not reporting "remote" activity when
playing to a mix of an external policy by looking at the address
of the output on which playback is active for the given stream
type.

Bug 16009464

Change-Id: Iebbf5a8c738ab36c1cf2055e921c0a3472503125
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
3b46819eb0dd9ea510619c351d7ffdc244ed511d 10-Dec-2014 Ruben Brunk <rubenbrunk@google.com> Merge commit '2340e5a8' into manualmerge

Change-Id: I0299d49b7e283072fc646de717fd7c1643241984
1487d270e86845e93a9abd1af020b45d6799b257 10-Dec-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: binder calls for dynamic audio policy mixes" into lmp-mr1-dev
2dda40d638138c426cf4a66ddd0da8794c87f5c7 10-Dec-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: add support for custom mixes" into lmp-mr1-dev
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
udiopolicy/AudioPolicyInterface.h
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/AudioPolicyService.h
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
udioflinger/Threads.cpp
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
12e7c84f6af6b91493fc37eabec2dfb70c0951a6 10-Dec-2014 Eric Laurent <elaurent@google.com> am b156888d: am 427aca5b: am 18265202: Merge "audio policy: fix inifinite loop in clearAudioPatches()" into lmp-mr1-dev

* commit 'b156888dcd2f8b3b05d724a31ec1c48da322fdc1':
audio policy: fix inifinite loop in clearAudioPatches()
dec5dcd7b8b9b21f20a96c62612faaf979e9d8df 10-Dec-2014 Eric Laurent <elaurent@google.com> am c12caed1: am a9450bbc: am cbbe1ccc: Merge "audio policy: fix AudioPort parameter checks" into lmp-mr1-dev

* commit 'c12caed177ec2d4912394be692854dc1d632b3c3':
audio policy: fix AudioPort parameter checks
9cea7aa494f6f93a473cab936af79868fc8efea6 10-Dec-2014 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: support shutter after result" into lmp-mr1-dev
6533dc1c576af241c9c1753f29d6777802d4c496 10-Dec-2014 Ruben Brunk <rubenbrunk@google.com> Merge "Camera2: Round unsupported surface sizes in configure." into lmp-mr1-dev
43e69a6792f01b86b4aaf2314534f637e11c5843 26-Nov-2014 Chien-Yu Chen <cychen@google.com> Camera3Device: support shutter after result

Move the code to remove in-flight requests from processCaptureResult
to a separate function so it can be called when the framework
receives a result or a shutter event. An in-flight request will only
be removed when both results and the shutter event arrive in the
case of a successful request.

Also send out results only after the shutter event receives.

Bug: 18135776
Change-Id: I340db1a495c711b0913784d43fd0f144871e4420
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
19ad42966fe2dae73ea8d952515c135c29a41dec 09-Dec-2014 Eino-Ville Talvala <etalvala@google.com> am f3376bdb: am 668b0550: am 597ce69a: Merge "Camera: Add support for SCENE_MODE_HDR for newer HALs" into lmp-mr1-dev

* commit 'f3376bdbcb48daad6889d28ee2c98b174f12028e':
Camera: Add support for SCENE_MODE_HDR for newer HALs
0a01770c3ab4ada3c5b0b14c1e9258053be5a83f 09-Dec-2014 Ruchit Sharma <ruchits@nvidia.com> am e9011c22: am 07e19019: am 9257000c: camera: fix logging in ZslProcessor to avoid spam

* commit 'e9011c22e000cc0c1e8080b687893fbbe3c17278':
camera: fix logging in ZslProcessor to avoid spam
f849e1984ae639112e125a91e27098cf0ebc68c1 09-Dec-2014 Andy Hung <hunga@google.com> am 900f6535: am 561f50de: am db995fe3: Merge "Fix getTimestamp if offload thread is not initialized." into lmp-mr1-dev

* commit '900f6535af232298e4a77477907a40f68e8dc61b':
Fix getTimestamp if offload thread is not initialized.
b156888dcd2f8b3b05d724a31ec1c48da322fdc1 08-Dec-2014 Eric Laurent <elaurent@google.com> am 427aca5b: am 18265202: Merge "audio policy: fix inifinite loop in clearAudioPatches()" into lmp-mr1-dev

* commit '427aca5bebaacfd5639b85661689ebd554bd0822':
audio policy: fix inifinite loop in clearAudioPatches()
c12caed177ec2d4912394be692854dc1d632b3c3 08-Dec-2014 Eric Laurent <elaurent@google.com> am a9450bbc: am cbbe1ccc: Merge "audio policy: fix AudioPort parameter checks" into lmp-mr1-dev

* commit 'a9450bbc6274451bbb4241595d74d6ce9a4160d1':
audio policy: fix AudioPort parameter checks
f3376bdbcb48daad6889d28ee2c98b174f12028e 08-Dec-2014 Eino-Ville Talvala <etalvala@google.com> am 668b0550: am 597ce69a: Merge "Camera: Add support for SCENE_MODE_HDR for newer HALs" into lmp-mr1-dev

* commit '668b055081bb9d0d61775acf67bb27ce66b214f6':
Camera: Add support for SCENE_MODE_HDR for newer HALs
e9011c22e000cc0c1e8080b687893fbbe3c17278 08-Dec-2014 Ruchit Sharma <ruchits@nvidia.com> am 07e19019: am 9257000c: camera: fix logging in ZslProcessor to avoid spam

* commit '07e190190ffddfbc32ecbf0bd9a9679817da232b':
camera: fix logging in ZslProcessor to avoid spam
900f6535af232298e4a77477907a40f68e8dc61b 08-Dec-2014 Andy Hung <hunga@google.com> am 561f50de: am db995fe3: Merge "Fix getTimestamp if offload thread is not initialized." into lmp-mr1-dev

* commit '561f50de82ce47f11ba8d4f25db1ca1d8467b2a7':
Fix getTimestamp if offload thread is not initialized.
18265202049bfa53fe5b18a95d956325acca9c7b 06-Dec-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: fix inifinite loop in clearAudioPatches()" into lmp-mr1-dev
0add0fd07401c507a77b37868f46a2ae587c30df 05-Dec-2014 Eric Laurent <elaurent@google.com> audio policy: fix inifinite loop in clearAudioPatches()

releaseAudioPatch() does not necessarily remove the audio patch
from the list.
Scan the list from the top down to avoid adjusting the index.

Bug: 18621514.
Change-Id: I58787154680f7cb1818509017835b1693d62190f
udiopolicy/AudioPolicyManager.cpp
bba75576c3bc5a90cd8e14bd053ab2d74a6c7e9d 21-Nov-2014 Ruben Brunk <rubenbrunk@google.com> Camera2: Round unsupported surface sizes in configure.

Bug: 16030677
Change-Id: Ida04e04f41983b9126609522dd12064a7bf9645f
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
cbbe1ccc41a86fbf009767bbdab43232e6c369c0 06-Dec-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: fix AudioPort parameter checks" into lmp-mr1-dev
597ce69a77636eab073fc83ded01e8af51e887e2 05-Dec-2014 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Add support for SCENE_MODE_HDR for newer HALs" into lmp-mr1-dev
af2645a679a61c8e8199d43d29b8b5ead5723b25 05-Dec-2014 Eino-Ville Talvala <etalvala@google.com> Camera: Add support for SCENE_MODE_HDR for newer HALs

Bug: 18640480
Change-Id: I7b772d10b2bd136c78395fd2816114b27bb48d00
amera/libcameraservice/api1/client2/Parameters.cpp
9257000c453c1a6f6bf073ff0bf3ba7ef9baf183 04-Nov-2014 Ruchit Sharma <ruchits@nvidia.com> camera: fix logging in ZslProcessor to avoid spam

AF state mismatch while selecting ZSL candidate should not be treated
as a warning. This results into undesriable spam in the logs.

ALso, using ALOGVV is consistent with how AE state mismatch is handled
in ZslProcessor3.cpp

Bug: 18634318
Change-Id: Ia9d7f2bb98f784990b1a6f923983c35f622c3791
amera/libcameraservice/api1/client2/ZslProcessor3.cpp
bfe1f3605c532ff2681458fe635beb8c47289205 05-Dec-2014 Hochi Huang <hochi.huang@mediatek.com> am 9f104ea6: am 94d91778: am 18f2f90c: [FM] Fix Buganizer ID: 18456930 - FM radio audio got routed to loudspeaker unexpectedly

* commit '9f104ea6d1123199f1f2e88934fae939c112a9b3':
[FM] Fix Buganizer ID: 18456930 - FM radio audio got routed to loudspeaker unexpectedly
9f104ea6d1123199f1f2e88934fae939c112a9b3 05-Dec-2014 Hochi Huang <hochi.huang@mediatek.com> am 94d91778: am 18f2f90c: [FM] Fix Buganizer ID: 18456930 - FM radio audio got routed to loudspeaker unexpectedly

* commit '94d9177849bb68434d3839a9b0886e09489de7f2':
[FM] Fix Buganizer ID: 18456930 - FM radio audio got routed to loudspeaker unexpectedly
0daea39f02fb1ba60a7b351bb5859e407f9f090b 05-Dec-2014 Eric Laurent <elaurent@google.com> audio policy: fix AudioPort parameter checks

Accept any value for sampling rate, format or channel mask
if the list of supported values is empty in the AudioPort.

Bug: 18575607.
Change-Id: I93e1942b89c630e3fee490799a8f8d79f7831ab7
udiopolicy/AudioPolicyManager.cpp
db995fe3239276be9dfd9e446b10417e07948acc 05-Dec-2014 Andy Hung <hunga@google.com> Merge "Fix getTimestamp if offload thread is not initialized." into lmp-mr1-dev
36d15776c37a6512d452628673e6286f8d9cf89c 28-Oct-2014 Eric Laurent <elaurent@google.com> audio policy: validate stream type received from binder calls.

Bug: 18001784.
Bug: 18002005.
Change-Id: I8efa674dceff5a6e10251b1c7a55e9bb2d532395
(cherry picked from commit dea1541fc0042abf05674b19c2f94ca086945dfd)
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyInterfaceImplLegacy.cpp
18f2f90cff65c384a4e8292cc3296dafafb43d52 03-Dec-2014 Hochi Huang <hochi.huang@mediatek.com> [FM] Fix Buganizer ID: 18456930 - FM radio audio got routed to loudspeaker unexpectedly

https://partner-android-review.git.corp.google.com/#/c/187894/

Change-Id: I3f9175bbc302e382155e568e66b88400ec05ffa5
Signed-off-by: Hochi Huang <hochi.huang@mediatek.com>
udiopolicy/AudioPolicyManager.h
9a1c8892f6835325db6931529dc74bf98cf0aee8 03-Dec-2014 Andy Hung <hunga@google.com> Fix getTimestamp if offload thread is not initialized.

Returns INVALID_OPERATION.

Bug: 18605649
Change-Id: I440fb687fbf9249098e049982fa83bcd1515fd80
udioflinger/Threads.cpp
1e8368d19f792ff4150a88dd6afbac7d54878ea1 03-Dec-2014 Elliott Hughes <enh@google.com> am 0ed71389: am eb05bacc: am b0eb7b0a: Merge "__ARM_HAVE_HALFWORD_MULTIPLY is always true for __arm__."

* commit '0ed7138903a85526a85d0cea8ff51b56d5aac236':
__ARM_HAVE_HALFWORD_MULTIPLY is always true for __arm__.
0ed7138903a85526a85d0cea8ff51b56d5aac236 03-Dec-2014 Elliott Hughes <enh@google.com> am eb05bacc: am b0eb7b0a: Merge "__ARM_HAVE_HALFWORD_MULTIPLY is always true for __arm__."

* commit 'eb05baccea81f125d042be33c36dcf1893d903d9':
__ARM_HAVE_HALFWORD_MULTIPLY is always true for __arm__.
8a9737ce64a53f06a2c1774b4ea025897c63bff1 03-Dec-2014 Elliott Hughes <enh@google.com> __ARM_HAVE_HALFWORD_MULTIPLY is always true for __arm__.

And this is the only user of that macro...

Bug: 18556103
Change-Id: I1b515a54ac8530b150f4dd93070db60c701a5603
udioflinger/AudioResampler.cpp
4219e34b256cc7894fa73c1155db6f69f8af470d 27-Nov-2014 Eric Laurent <elaurent@google.com> am 61280541: am 390ef843: am f20c4356: Merge "AudioRecord: use audio attributes instead of audio source." into lmp-mr1-dev

* commit '61280541836947ce0b281b240ffa4c55bbf5bd55':
AudioRecord: use audio attributes instead of audio source.
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.
059c8b62e037452ff806a0b15d693c86936d87ef 26-Nov-2014 Eric Laurent <elaurent@google.com> am 51a7a415: am 5bf757cf: am 087eb332: Merge "audio policy: do not route accessibility prompts to compressed output" into lmp-mr1-dev

* commit '51a7a41514622e68998b4f77022f8a93af530588':
audio policy: do not route accessibility prompts to compressed output
3458bb2356e711419487056fe1dd474e100466a3 26-Nov-2014 Eric Laurent <elaurent@google.com> am 121143d5: am bf14c62e: am 72bf901c: Merge "audio policy: new getOutputForAttr() prototype." into lmp-mr1-dev

* commit '121143d5242a790d0bd01fe1b9cec5d28a1ba1d7':
audio policy: new getOutputForAttr() prototype.
51a7a41514622e68998b4f77022f8a93af530588 26-Nov-2014 Eric Laurent <elaurent@google.com> am 5bf757cf: am 087eb332: Merge "audio policy: do not route accessibility prompts to compressed output" into lmp-mr1-dev

* commit '5bf757cfb8b43e5d92be95a8c700e4b7839f6730':
audio policy: do not route accessibility prompts to compressed output
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.
ad6b76e2e717bcd3784a1eb8a538414ed0a4d03e 26-Nov-2014 Zhijun He <zhijunhe@google.com> am d802d071: am ec7b26f0: am 512dd849: Merge "camera: fix frame deletion logic in mInFlightMap" into lmp-mr1-dev

* commit 'd802d0718d7639da1bef1128a840cfd05200af55':
camera: fix frame deletion logic in mInFlightMap
d802d0718d7639da1bef1128a840cfd05200af55 26-Nov-2014 Zhijun He <zhijunhe@google.com> am ec7b26f0: am 512dd849: Merge "camera: fix frame deletion logic in mInFlightMap" into lmp-mr1-dev

* commit 'ec7b26f06f7b1b6334ef1139ac33548ed0510284':
camera: fix frame deletion logic in mInFlightMap
5cad3ab9a89bfb189d028f16b316d57db7f09a69 26-Nov-2014 Eric Laurent <elaurent@google.com> am e0f44009: am fcf39e22: am 0f78eabb: fix the build.

* commit 'e0f440094345e1e7c3836fe29d3fa34d84e43aee':
fix the build.
3a3e87005fdfbfe4564605220a044b8023d0f539 26-Nov-2014 Eric Laurent <elaurent@google.com> am 72215491: am 1a475921: am 223fd5c9: audio: new routing strategies and stream types

* commit '72215491c60fbcdb9a2f0be782e24e39cca249c5':
audio: new routing strategies and stream types
e0f440094345e1e7c3836fe29d3fa34d84e43aee 26-Nov-2014 Eric Laurent <elaurent@google.com> am fcf39e22: am 0f78eabb: fix the build.

* commit 'fcf39e226ce318ae1e4bc042379aae1ecff560a6':
fix the build.
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
udiopolicy/AudioPolicyInterface.h
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
udiopolicy/AudioPolicyService.h
087eb332cdd64026de27c914194127f8fda1a846 26-Nov-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: do not route accessibility prompts to compressed output" into lmp-mr1-dev
72bf901ca905ce154fe7866f06d25a01aadcf974 26-Nov-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: new getOutputForAttr() prototype." into lmp-mr1-dev
512dd849d0ef9e9988fedfbaf951b4b82523957c 25-Nov-2014 Zhijun He <zhijunhe@google.com> Merge "camera: fix frame deletion logic in mInFlightMap" into lmp-mr1-dev
066ceecf4c6ed5ce26c5ddf00d7d9097d560b7a2 25-Nov-2014 Eric Laurent <elaurent@google.com> audio policy: do not route accessibility prompts to compressed output

When a digital output (HDMI or S/PDIF) is configured with
a non linear PCM audio format it is likely that the audio HAL
or HW will not be able to mix other sounds with the main
media stream being played.

In this case, do not condider HDMI or S/PDIF as a valid route for
accessibilty strategy so that accessibility prompts are always audible.

Bug: 18067208.
Change-Id: If20603a1dc1dc470f206f841308bed2b87daf21c
udiopolicy/AudioPolicyManager.cpp
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
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
udiopolicy/AudioPolicyInterface.h
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
udiopolicy/AudioPolicyService.cpp
udiopolicy/AudioPolicyService.h
0f78eabb733e1413d7febd00c0bad0f0add02314 25-Nov-2014 Eric Laurent <elaurent@google.com> fix the build.

Change-Id: Iab6b65327ae1adbf0b3a6da5a23b8107468f533e
udiopolicy/AudioPolicyManager.cpp
31867b30d3144decd42de0214d8b71c45a2c8cc1 14-Nov-2014 Ruchit Sharma <ruchits@nvidia.com> camera: fix frame deletion logic in mInFlightMap

For per-frame error notifications, camera3.h requirements state that all the
buffer handles for a failed frame capture must be returned via
process_capture_result() call(s). Hence, Camera3Device needs to ensure that
the frame entry is not deleted from mInFlightMap until all buffers for that
frame have been returned by HAL.

Bug: 17757940

Change-Id: I2579ca7980d2fd67d53abc530e2706538f7d3d3a
amera/libcameraservice/device3/Camera3Device.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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
udiopolicy/AudioPolicyEffects.cpp
udiopolicy/AudioPolicyEffects.h
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
e1d38aa7bb9a8c6da4ceb479303599cd54b03235 21-Nov-2014 Ruben Brunk <rubenbrunk@google.com> am ffa3e71e: am bc0f452b: Merge "Camera2: Fix CameraParameters parse segfault." into lmp-mr1-dev
automerge: 6b6d8a7

* commit '6b6d8a79ef821541a7687ed924959369f73fc977':
Camera2: Fix CameraParameters parse segfault.
6b6d8a79ef821541a7687ed924959369f73fc977 21-Nov-2014 Ruben Brunk <rubenbrunk@google.com> am ffa3e71e: am bc0f452b: Merge "Camera2: Fix CameraParameters parse segfault." into lmp-mr1-dev

* commit 'ffa3e71e47215b68fe4ae0b7a3f976db648d63d3':
Camera2: Fix CameraParameters parse segfault.
bc0f452b9a76dd8c8244e775bc9c5aa85cae3ddf 21-Nov-2014 Ruben Brunk <rubenbrunk@google.com> Merge "Camera2: Fix CameraParameters parse segfault." into lmp-mr1-dev
db1025a8c0dc80c11a77d6c332ee60dfb94a8120 21-Nov-2014 Eric Laurent <elaurent@google.com> am 58cc16ef: am 8052d933: Merge "SoundTrigger: allow sound model reloading" into lmp-mr1-dev automerge: 30dee17

* commit '58cc16ef6b3a6d0e26566203cc6c094a8c036bc7':
SoundTrigger: allow sound model reloading
994242df089e1abbd7d1d21d8183b4ad32710948 21-Nov-2014 Glenn Kasten <gkasten@google.com> am c63c0973: am f50db74f: Merge "Fix format conversion in DuplicatingThread" into lmp-mr1-dev automerge: d48f1b6

* commit 'c63c09738772133e9b20a7c8576ad116ff855ee2':
Fix format conversion in DuplicatingThread
58cc16ef6b3a6d0e26566203cc6c094a8c036bc7 21-Nov-2014 Eric Laurent <elaurent@google.com> am 8052d933: Merge "SoundTrigger: allow sound model reloading" into lmp-mr1-dev
automerge: 30dee17

* commit '30dee177d25bf75f8b3fb8a70573de2c04306759':
SoundTrigger: allow sound model reloading
c63c09738772133e9b20a7c8576ad116ff855ee2 21-Nov-2014 Glenn Kasten <gkasten@google.com> am f50db74f: Merge "Fix format conversion in DuplicatingThread" into lmp-mr1-dev
automerge: d48f1b6

* commit 'd48f1b68b2b824ffcfdbf6aa67ad4696020a8a11':
Fix format conversion in DuplicatingThread
0aee4dd6bb897ef7e23ca67e4b5019ce9524b51e 21-Nov-2014 Eric Laurent <elaurent@google.com> am 30dee177: am 8052d933: Merge "SoundTrigger: allow sound model reloading" into lmp-mr1-dev

* commit '30dee177d25bf75f8b3fb8a70573de2c04306759':
SoundTrigger: allow sound model reloading
3dd2eb810af471df146cb16a680b1b0ca7364be5 21-Nov-2014 Glenn Kasten <gkasten@google.com> am d48f1b68: am f50db74f: Merge "Fix format conversion in DuplicatingThread" into lmp-mr1-dev

* commit 'd48f1b68b2b824ffcfdbf6aa67ad4696020a8a11':
Fix format conversion in DuplicatingThread
aa1496ac8c4365b43b6504941b44903dc0f9b7e7 21-Nov-2014 Eric Laurent <elaurent@google.com> am 568689b1: am 3a2a32b5: Merge "AudioSystem: fix cross deadlock" into lmp-mr1-dev
automerge: c9769c5

* commit 'c9769c557e202df671e35196c8c735b49257be7d':
AudioSystem: fix cross deadlock
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
8eeda89ae361ccd048d7bba0fd11291e05577e2a 21-Nov-2014 Dan Albert <danalbert@google.com> am d0e12a16: am 902dc42d: am 07715ac3: Merge "C++11 compatibility."

* commit 'd0e12a161471823d1ab269cb608be3f3b0a71ed1':
C++11 compatibility.
d0e12a161471823d1ab269cb608be3f3b0a71ed1 21-Nov-2014 Dan Albert <danalbert@google.com> am 902dc42d: am 07715ac3: Merge "C++11 compatibility."

* commit '902dc42d79b075395d484ce1c71f215b199aaa2a':
C++11 compatibility.
8052d933822e51dec3b096cb5fc8a9fbdc076bdc 21-Nov-2014 Eric Laurent <elaurent@google.com> Merge "SoundTrigger: allow sound model reloading" into lmp-mr1-dev
02eb47cf18793effe9fc7ab34e1b0fe9ea6635bc 20-Nov-2014 Eric Laurent <elaurent@google.com> SoundTrigger: allow sound model reloading

Allow reloading a sound model without unloading it before.

Bug: 18308781.
Change-Id: I31c83b81a03ee1c1e80f4339ca62e6d06fb1a33b
oundtrigger/SoundTriggerHwService.cpp
oundtrigger/SoundTriggerHwService.h
5fc9d902510ccd04db80e0bc6aa679a4317a51b2 20-Nov-2014 Ruben Brunk <rubenbrunk@google.com> Camera2: Fix CameraParameters parse segfault.

Bug: 18331142
Change-Id: I41feec93f753f97b3e6bf963deb4a42b73406421
amera/libcameraservice/CameraService.cpp
ec0eeafa8a7fd882e8206e9cf8c4c7e1db81857b 20-Nov-2014 Haynes Mathew George <hgeorge@codeaurora.org> Fix format conversion in DuplicatingThread

DuplicatingThread converts PCM data from the format of the source thread
to PCM_16BIT before writing to all connected output tracks.
This needs to be done just once before writing to all tracks.

Bug: 18461844
Change-Id: If05254f87f9198e09a0fa3c4e857afbb53ae7073
udioflinger/Threads.cpp
36802bd18b7b4e8c87fa019c7e3068bee330d174 20-Nov-2014 Dan Albert <danalbert@google.com> C++11 compatibility.

* Fix string literal concatenation to not be interpreted as UD
literals.
* Add constexpr compatibility for non-integral static members.
* Use __typeof__ instead of typeof (should become decltype once this
actually becomes C++11).
* Add an appropriate cast for atomic_uintptr_t, since moving to C++11
means moving from <stdatomic.h> to <atomic>, which has better
typechecking (hooray for not macros!).

Bug: 18466763
Change-Id: I9561dcb2526578687819ff85421ba80d8e1a9694
udioflinger/AudioMixer.h
udioflinger/AudioResampler.h
udioflinger/AudioResamplerFirGen.h
udioflinger/StateQueue.cpp
amera/libcameraservice/api1/client2/Parameters.h
amera/libcameraservice/device1/CameraHardwareInterface.h
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
udiopolicy/AudioPolicyService.cpp
udiopolicy/AudioPolicyService.h
4177debc938fa9f6824850d99151a164dab0d76a 19-Nov-2014 Yin-Chia Yeh <yinchiayeh@google.com> am a848844f: am cb79b3db: am 03181012: Merge "Camera2Client: remove recording stream if necessary" into lmp-mr1-dev

* commit 'a848844f5451d8e01c00b613daccbb901372779d':
Camera2Client: remove recording stream if necessary
a848844f5451d8e01c00b613daccbb901372779d 19-Nov-2014 Yin-Chia Yeh <yinchiayeh@google.com> am cb79b3db: am 03181012: Merge "Camera2Client: remove recording stream if necessary" into lmp-mr1-dev

* commit 'cb79b3dbd377b1a3b6da2f58dfa49050400815ae':
Camera2Client: remove recording stream if necessary
03181012beab17e145ca8b9bedbcc08d117df1cb 19-Nov-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera2Client: remove recording stream if necessary" into lmp-mr1-dev
05743d8f8d3a7b7a669e7ee358dc3bf133c7d8c5 19-Nov-2014 Andy Hung <hunga@google.com> Merge "Fix AudioMixer floating interaction with downmixer"
10421a88201503235fe87f4daa057af5ed815f71 19-Nov-2014 Andy Hung <hunga@google.com> Merge "Move AudioMixer buffer provider preparation into track"
29b539abab7b0fb57d6b780f93e4860236d6192f 19-Nov-2014 Chih-Hung Hsieh <chh@google.com> am 640228b8: am 9b323821: am e4044209: Merge "Disable clang++ due to compiler error."

* commit '640228b8e0e537a527f2bb63a4f4d4b5a1ef29cd':
Disable clang++ due to compiler error.
640228b8e0e537a527f2bb63a4f4d4b5a1ef29cd 19-Nov-2014 Chih-Hung Hsieh <chh@google.com> am 9b323821: am e4044209: Merge "Disable clang++ due to compiler error."

* commit '9b3238218cf24c75f92c5174e3a4edb8aff17047':
Disable clang++ due to compiler error.
e40442092efa37619d11685451f7e8e8bde9e79a 19-Nov-2014 Chih-Hung Hsieh <chh@google.com> Merge "Disable clang++ due to compiler error."
092d49c26d77fafad5170bf709c2a716ec335855 07-Nov-2014 Yin-Chia Yeh <yinchiayeh@google.com> Camera2Client: remove recording stream if necessary

Bug: 17495165
Change-Id: I11b763fde8f9448f4bddec3fe6c81581e7699edb
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
7583c4ce92880af7b3a8532e71acccd6a6ec323d 18-Nov-2014 Eric Laurent <elaurent@google.com> am 9544a8e9: am bfa77b5c: am 8cd37d67: Merge "audio policy: do not prevent routing to A2DP when suspended." into lmp-mr1-dev

* commit '9544a8e904955f4b96ec9f2d6f4edc2a72afd270':
audio policy: do not prevent routing to A2DP when suspended.
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.
847cbecbfda35e27a73a767c93fd0150ba001882 18-Nov-2014 Andy Hung <hunga@google.com> am a248703b: am a3e2c146: am 4d0a5985: Merge "Prevent stopped audio tracks from mixing data" into lmp-mr1-dev

* commit 'a248703b0799a9a27481f0ec13df90214a661eb5':
Prevent stopped audio tracks from mixing data
8cd37d677f10a7718c9247830652a588ea4600de 18-Nov-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: do not prevent routing to A2DP when suspended." into lmp-mr1-dev
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
udiopolicy/AudioPolicyManager.cpp
a248703b0799a9a27481f0ec13df90214a661eb5 18-Nov-2014 Andy Hung <hunga@google.com> am a3e2c146: am 4d0a5985: Merge "Prevent stopped audio tracks from mixing data" into lmp-mr1-dev

* commit 'a3e2c146eda841d84faa0093d26d7414de78bbaa':
Prevent stopped audio tracks from mixing data
4d0a5985fb5e7ea5a1f9a605afea2b7534ebc16b 18-Nov-2014 Andy Hung <hunga@google.com> Merge "Prevent stopped audio tracks from mixing data" into lmp-mr1-dev
27876c02c21cd3ab7ef01bdd1fc5400c5143584a 10-Sep-2014 Andy Hung <hunga@google.com> Prevent stopped audio tracks from mixing data

Static tracks should have zero framesReady when stopping or stopped,
to prevent mixer from running potentially indefinitely with loop mode.

Bug: 16070883

Change-Id: Iab9968044d1a6f8543bbcbfb246f49f27d68cace
udioflinger/Tracks.cpp
54d07deaf52d100a9f89a796c33bca2511c6180d 17-Nov-2014 Eric Laurent <elaurent@google.com> am 22bfb336: am 2b456a16: am f89f2ff4: Merge "audiopolicy: Update input device check in checkInputsForDevice" into lmp-mr1-dev

* commit '22bfb336abb82b853a7a20232626b113ba568c1d':
audiopolicy: Update input device check in checkInputsForDevice
22bfb336abb82b853a7a20232626b113ba568c1d 17-Nov-2014 Eric Laurent <elaurent@google.com> am 2b456a16: am f89f2ff4: Merge "audiopolicy: Update input device check in checkInputsForDevice" into lmp-mr1-dev

* commit '2b456a16ceeffd3d82dca71ce29c6479b8a11bff':
audiopolicy: Update input device check in checkInputsForDevice
98d78d1579d3702d7a94dd7d582d1cd99e35f22e 17-Nov-2014 Elliott Hughes <enh@google.com> am f1b0c671: am 2716969d: resolved conflicts for merge of 3bc345f5 to stage-aosp-master

* commit 'f1b0c671e85d7ad5e1aa94d16336cda57158cd33':
libcutils no longer requires that its users configure ANDROID_SMP.
81d505fa9d2e6a8d984738d50a88801199b453b4 17-Nov-2014 Chien-Yu Chen <cychen@google.com> am bf1e36e8: am 771a362d: am 3171f4e1: Merge "CameraService: normalize face rectangles properly" into lmp-mr1-dev

* commit 'bf1e36e8b7a6e08e2f20dd0b2900dda259c23459':
CameraService: normalize face rectangles properly
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.
f89f2ff4df0855eb56d95a02ab29d856e0ffa858 17-Nov-2014 Eric Laurent <elaurent@google.com> Merge "audiopolicy: Update input device check in checkInputsForDevice" into lmp-mr1-dev
1f2f4f26073b6bf979be3a3bb66f84e3e9c4c168 17-Nov-2014 Elliott Hughes <enh@google.com> libcutils no longer requires that its users configure ANDROID_SMP.

Change-Id: Ib91ff0696ab2472c62168eb5261bbda5d22f623e
udioflinger/Android.mk
bf1e36e8b7a6e08e2f20dd0b2900dda259c23459 17-Nov-2014 Chien-Yu Chen <cychen@google.com> am 771a362d: am 3171f4e1: Merge "CameraService: normalize face rectangles properly" into lmp-mr1-dev

* commit '771a362de24be025e8283a91be4201d4d1d4b5d8':
CameraService: normalize face rectangles properly
3171f4e12e5cabb2b496be6aa660aaa83e8fe77d 17-Nov-2014 Chien-Yu Chen <cychen@google.com> Merge "CameraService: normalize face rectangles properly" into lmp-mr1-dev
77e79a509d19ab50b1867fe3903b5a8fae450591 17-Nov-2014 Marco Nelissen <marcone@google.com> resolved conflicts for merge of e78a27ca to lmp-mr1-dev-plus-aosp

Change-Id: If10a9cc17245f95d5e10b1507445abbb4020670e
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
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
udiopolicy/AudioPolicyService.cpp
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/CameraClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api_pro/ProCamera2Client.cpp
amera/libcameraservice/common/Camera2ClientBase.cpp
amera/libcameraservice/common/Camera2ClientBase.h
oundtrigger/SoundTriggerHwService.cpp
ddbc6657fa0c55166148ca597980edbaafc418bf 14-Nov-2014 Eric Laurent <elaurent@google.com> audiopolicy: Update input device check in checkInputsForDevice

- When an input device is disconnected, checkInputsForDevice clears
dynamic fields of input profiles that are supporting the disconnected
device. AUDIO_DEVICE_BIT_IN mask is missing while comparing with the
supported input devices of a profile which is resulting in clearing
wrong fields

- Fix is to include AUDIO_DEVICE_BIT_IN in this comparison

- also fix two other places where comparison with input device was not
masked with AUDIO_DEVICE_BIT_IN.

Bug: 18367045

Change-Id: Icc94b8353bc49567d8a6d6a75293c3b0dd42d83c
udiopolicy/AudioPolicyManager.cpp
011c3b5f13c1ca488971090418a85858684cf812 15-Nov-2014 Chih-Hung Hsieh <chh@google.com> am 7aa310d9: am 0ef3210f: am 14a74010: Merge "Include AudioPolicyInterface.h only when needed."

* commit '7aa310d90179d3811f7581c914e970c2461db7cf':
Include AudioPolicyInterface.h only when needed.
7aa310d90179d3811f7581c914e970c2461db7cf 15-Nov-2014 Chih-Hung Hsieh <chh@google.com> am 0ef3210f: am 14a74010: Merge "Include AudioPolicyInterface.h only when needed."

* commit '0ef3210f77799b5e0086c7a0f9244aefdf403805':
Include AudioPolicyInterface.h only when needed.
06b46062d2f8bc82ca3061a23d197734ae51918b 14-Nov-2014 Marco Nelissen <marcone@google.com> Update calls to IInterface::asBinder()

to use the new static version.

Change-Id: I89a5988a0ac694ffc04d88cf939e8455bf925d4c
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
udiopolicy/AudioPolicyService.cpp
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/CameraClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api_pro/ProCamera2Client.cpp
amera/libcameraservice/common/Camera2ClientBase.cpp
amera/libcameraservice/common/Camera2ClientBase.h
oundtrigger/SoundTriggerHwService.cpp
c84d9d235679a4d48245b316b7b2e4c0b19413e7 14-Nov-2014 Chih-Hung Hsieh <chh@google.com> Include AudioPolicyInterface.h only when needed.

Both legacy and non-legacy AudioPolicyInterface define
extern "C" functions createAudioPloicyManager and
destroyAudioPloicyManager. Standard C++ does not
allow overloading of extern C functions.
g++ did not catch this problem but clang++ does.

Change-Id: I80869cdb26e7721777e53d4eff71c5c733044abf
udiopolicy/AudioPolicyService.cpp
udiopolicy/AudioPolicyService.h
6b6393b570244a4368f2e01d813cc9c4ac4b2f47 14-Nov-2014 Glenn Kasten <gkasten@google.com> Merge "Include normal output track buffer depth in systrace"
42e5a1ebe0b224c07eb96211536a466255b12b81 14-Nov-2014 Chih-Hung Hsieh <chh@google.com> Disable clang++ due to compiler error.

Clang++ chokes on AudioMixer.cpp.
It does not know "how to split this operator."

BUG: 18373866
Change-Id: I3d588d44596c7c3b6f97e5f822545e015b074206
udioflinger/Android.mk
udioflinger/tests/Android.mk
5e15b80e801a0110bc1bad1190f02cb9c7d22e37 13-Nov-2014 Chien-Yu Chen <cychen@google.com> CameraService: normalize face rectangles properly

Use android.scaler.cropRegion reported in the capture result to
normalize face rectangles instead of using the one in current capture
request.

Bug: 11460393
Change-Id: Id21834bf6ae1f7cc106b4dffb98f9f249a75034b
amera/libcameraservice/api1/client2/FrameProcessor.cpp
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
7a84b5dd73e2aeb914cc2ee7ac730d472608f696 13-Nov-2014 Chien-Yu Chen <cychen@google.com> am 7deab61a: am 06ce4cf5: Merge "Camera2Device: fix camera metadata leaks" into lmp-mr1-dev automerge: 7c77c75

* commit '7deab61ade08ffd0971323594ded4937e2db8265':
Camera2Device: fix camera metadata leaks
7deab61ade08ffd0971323594ded4937e2db8265 13-Nov-2014 Chien-Yu Chen <cychen@google.com> am 06ce4cf5: Merge "Camera2Device: fix camera metadata leaks" into lmp-mr1-dev automerge: 7c77c75

* commit '06ce4cf5e3f8715635bc1913dcbb1d32fbd510a7':
Camera2Device: fix camera metadata leaks
7c77c75d43ac2a40f2b5ce98085ef68f8ba3b4f2 12-Nov-2014 Chien-Yu Chen <cychen@google.com> Merge "Camera2Device: fix camera metadata leaks" into lmp-mr1-dev
2ae8276201be9b2e5cd5150de6389264a578fcd9 12-Nov-2014 Dan Albert <danalbert@google.com> am 9226e7c5: am 2f702c9b: am 43e10bb7: Merge "Move to libc++."

* commit '9226e7c5eba914e6917bf59e1b26417aedf1436a':
Move to libc++.
9226e7c5eba914e6917bf59e1b26417aedf1436a 11-Nov-2014 Dan Albert <danalbert@google.com> am 2f702c9b: am 43e10bb7: Merge "Move to libc++."

* commit '2f702c9bc0d07f5d48f6f50586b1e11d9ac59381':
Move to libc++.
effaa7832a095c11acedbe488ebbeff296f35ab8 10-Nov-2014 Dan Albert <danalbert@google.com> Move to libc++.

This also cleans up some makefile cruft.

Bug: 15193147
Change-Id: Ia53ca4f6fb2153f4e77e6f696eb27dcaae73a78e
udioflinger/tests/Android.mk
390d783d535165bb12c6ebdd49c76db9588cbe3f 11-Nov-2014 Eino-Ville Talvala <etalvala@google.com> am 6e48af3d: am 7b28e4e7: am 9527a598: Merge "Camera: Guard against asBinder() calls on NULL interfaces"

* commit '6e48af3d909568ed2f07b79369d52f9415100208':
Camera: Guard against asBinder() calls on NULL interfaces
6e48af3d909568ed2f07b79369d52f9415100208 11-Nov-2014 Eino-Ville Talvala <etalvala@google.com> am 7b28e4e7: am 9527a598: Merge "Camera: Guard against asBinder() calls on NULL interfaces"

* commit '7b28e4e709fcc90f9ca5ca987e2d4e8c05d1a731':
Camera: Guard against asBinder() calls on NULL interfaces
80de5dca0b8e04f81da0d15dff957f82551eaafc 08-Nov-2014 Chien-Yu Chen <cychen@google.com> Camera2Device: fix camera metadata leaks

bug 11132653

Change-Id: I5445b020c3aeaac9a556c023568adac635834356
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device2/Camera2Device.h
e77540228e1f60b1129a1615d2e43e0bf8015d3c 31-Oct-2014 Glenn Kasten <gkasten@google.com> Include normal output track buffer depth in systrace

Also log "second chance" sleeps

Change-Id: I6e352948926c246002642a50c92af213e6b79040
udioflinger/Threads.cpp
2dca6f6826c81372e67625024bbe7fa00c02b708 10-Nov-2014 Eric Laurent <elaurent@google.com> am 995599cb: audioflinger: fix duplicating thread output buffers clear

* commit '995599cbd6ada739c257716a6d8b90eee6d61473':
audioflinger: fix duplicating thread output buffers clear
995599cbd6ada739c257716a6d8b90eee6d61473 08-Nov-2014 Eric Laurent <elaurent@google.com> audioflinger: fix duplicating thread output buffers clear

Also clear mix buffer in DuplicatingThread::threadLoop_mix()
instead of just sink buffer when output threads are not
ready.

Bug: 18262127.
Change-Id: I4c22bbeaccdcc8d7c10c5882dde3439eb73d6ede
(cherry picked from commit 02b5708776ba2a9b4ff8c09008483aef7dbe38c7)
udioflinger/Threads.cpp
4b4ceaabd739b39e0690911afd1ae8f6d5ae9fae 08-Nov-2014 Eric Laurent <elaurent@google.com> am ccfeadcd: audioflinger: fix duplicating thread output buffers clear automerge: 02b5708
automerge: 8510932

* commit '8510932d6e5a1d4628c700fbff8f836abe470713':
audioflinger: fix duplicating thread output buffers clear
8510932d6e5a1d4628c700fbff8f836abe470713 08-Nov-2014 Eric Laurent <elaurent@google.com> am ccfeadcd: audioflinger: fix duplicating thread output buffers clear automerge: 02b5708

* commit 'ccfeadcd252c1e002bfbce3ce55742d3eaac2ff6':
audioflinger: fix duplicating thread output buffers clear
02b5708776ba2a9b4ff8c09008483aef7dbe38c7 08-Nov-2014 Eric Laurent <elaurent@google.com> audioflinger: fix duplicating thread output buffers clear

Also clear mix buffer in DuplicatingThread::threadLoop_mix()
instead of just sink buffer when output threads are not
ready.

Bug: 18262127.
Change-Id: I4c22bbeaccdcc8d7c10c5882dde3439eb73d6ede
udioflinger/Threads.cpp
5b8fde71e08f57478ef25d040fc5f66294011ac6 03-Sep-2014 Andy Hung <hunga@google.com> Enable full floating point path in AudioMixer

Change-Id: I7becce859d6e8db413e6a7c3193ae0f2af273599
udioflinger/AudioMixer.cpp
e992e75053e98e3699af6e344c11b787e30411ad 08-Nov-2014 Eino-Ville Talvala <etalvala@google.com> Camera: Guard against asBinder() calls on NULL interfaces

Bug: 18207548
Change-Id: I9879c9b4c0282a6b96b77398f62beedc47f7f0a0
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/CameraClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api_pro/ProCamera2Client.cpp
amera/libcameraservice/common/Camera2ClientBase.cpp
048e913d58a59055af81dfa362db2c4ccf00f75a 07-Nov-2014 Dan Stoza <stoza@google.com> am f8d051fe: am 034d6747: am 1609e451: Merge "Add a BufferItem parameter to onFrameAvailable" into lmp-mr1-dev

* commit 'f8d051fee37b1a0734e4142072d3053fed8df161':
Add a BufferItem parameter to onFrameAvailable
f8d051fee37b1a0734e4142072d3053fed8df161 07-Nov-2014 Dan Stoza <stoza@google.com> am 034d6747: am 1609e451: Merge "Add a BufferItem parameter to onFrameAvailable" into lmp-mr1-dev

* commit '034d674721029e3b7e34fe30ee31814c521b62bf':
Add a BufferItem parameter to onFrameAvailable
1609e451cf6101efe6aeaaa2da61db2cb095c9e8 07-Nov-2014 Dan Stoza <stoza@google.com> Merge "Add a BufferItem parameter to onFrameAvailable" into lmp-mr1-dev
7f47549516ae5938759b5c834c8423378a60b3d8 26-Aug-2014 Andy Hung <hunga@google.com> Fix AudioMixer floating interaction with downmixer

Previously _if_ the full floating point mixer is enabled, a downmixer
would force the mixer input for a session submix to integer, breaking
other mixer inputs to the same submix that were in float.

Use another ReformatBufferProvider after the downmixer to solve
this issue.

Update the test-mixer app and the mixer_to_wave_tests shell
script to detect this issue.

Bug: 17363939
Change-Id: I74a56333f9ee75ddde39a75392c021c5eebddbef
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/tests/mixer_to_wav_tests.sh
udioflinger/tests/test-mixer.cpp
0f451e92f09e089e588f303f729425a54fcd804b 05-Aug-2014 Andy Hung <hunga@google.com> Move AudioMixer buffer provider preparation into track

Bug: 17363939
Change-Id: I1f0f597b008f7369df87ba369fabaa93dec08ea1
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
d1cf83209c3c4fbc454d0f638cb0feec8e2e74ec 07-Nov-2014 Glenn Kasten <gkasten@google.com> Merge "Improve dumpsys for output threads"
04f101c35eaa90b1f95939afac30674ec1611e6f 04-Nov-2014 Dan Stoza <stoza@google.com> Add a BufferItem parameter to onFrameAvailable

Passes the BufferItem for the queued buffer to the onFrameAvailable
callback so the consumer can track the BufferQueue's contents.

Bug: 18111837
Change-Id: If9d07229c9b586c668e5f99074e9b63b0468feb0
amera/libcameraservice/api1/client2/BurstCapture.cpp
amera/libcameraservice/api1/client2/BurstCapture.h
amera/libcameraservice/api1/client2/CallbackProcessor.cpp
amera/libcameraservice/api1/client2/CallbackProcessor.h
amera/libcameraservice/api1/client2/JpegProcessor.cpp
amera/libcameraservice/api1/client2/JpegProcessor.h
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
amera/libcameraservice/api1/client2/StreamingProcessor.h
amera/libcameraservice/api1/client2/ZslProcessor.cpp
amera/libcameraservice/api1/client2/ZslProcessor.h
amera/libcameraservice/gui/RingBufferConsumer.cpp
amera/libcameraservice/gui/RingBufferConsumer.h
298c4dc7e90cae4873d89098b777d1068a4e35ea 04-Nov-2014 Eric Laurent <elaurent@google.com> am d202ac37: am b7092547: Merge "remove some restrictions on effect output channels" into lmp-mr1-dev automerge: ed1e55c

* commit 'd202ac37fc1f5f31e180af55cebd22810a80251b':
remove some restrictions on effect output channels
d202ac37fc1f5f31e180af55cebd22810a80251b 04-Nov-2014 Eric Laurent <elaurent@google.com> am b7092547: Merge "remove some restrictions on effect output channels" into lmp-mr1-dev automerge: ed1e55c

* commit 'b7092547d94a25d5a012fe983b48460ca38be7c8':
remove some restrictions on effect output channels
ed1e55c5276a1c031e9b2f016387c7d2fe7bc47f 04-Nov-2014 Eric Laurent <elaurent@google.com> Merge "remove some restrictions on effect output channels" into lmp-mr1-dev
c6c1a3f54fb6282737fd4630de89b774ebc10277 04-Nov-2014 Chien-Yu Chen <cychen@google.com> am fbee43b1: Merge "CameraService: API1: fix picture FOV" into lmp-mr1-dev automerge: 3736dbc automerge: ea210e2

* commit 'fbee43b19506f97f35ead6c0ce19dc11d5ccdc3a':
CameraService: API1: fix picture FOV
b10352f4bc11ae6f3d93e464074709555ecf9e06 04-Nov-2014 Eric Laurent <elaurent@google.com> remove some restrictions on effect output channels

Do not prevent from attaching effects to a non stereo
output thread, unless the output thread is a mixer thread.

Bug: 18157592.
Change-Id: I6ac3187187a1b8aade7db04ea6dfbc47dacc25c3
udioflinger/AudioFlinger.cpp
fbee43b19506f97f35ead6c0ce19dc11d5ccdc3a 04-Nov-2014 Chien-Yu Chen <cychen@google.com> Merge "CameraService: API1: fix picture FOV" into lmp-mr1-dev automerge: 3736dbc
automerge: ea210e2

* commit 'ea210e2581e088ff7e892d8e07bc9b95da94df3c':
CameraService: API1: fix picture FOV
3736dbc5c4ef7c0e0cf81ff3fc73579527cad50a 03-Nov-2014 Chien-Yu Chen <cychen@google.com> Merge "CameraService: API1: fix picture FOV" into lmp-mr1-dev
30340c1ad88d64a0b23a124aa4b2c8322e1e3ac6 01-Nov-2014 Jean-Michel Trivi <jmtrivi@google.com> am 16ef7c82: am 7957cf09: am d9cfeb44: Support speaker routing for FLAG_BEACON

* commit '16ef7c8241925b898d842decc023c73d4790c8cd':
Support speaker routing for FLAG_BEACON
16ef7c8241925b898d842decc023c73d4790c8cd 01-Nov-2014 Jean-Michel Trivi <jmtrivi@google.com> am 7957cf09: am d9cfeb44: Support speaker routing for FLAG_BEACON

* commit '7957cf094ae4d6c88f535a8f9c4833fb9eaf449f':
Support speaker routing for FLAG_BEACON
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
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
d68d7c7482f694954233804d1cdb6de75aa79514 31-Oct-2014 Eric Laurent <elaurent@google.com> am c8d24f70: am 2d1f309c: am b1322c78: audio policy: fix commit dea1541f

* commit 'c8d24f709f919319cf82cc155151deff6d958c47':
audio policy: fix commit dea1541f
c8d24f709f919319cf82cc155151deff6d958c47 31-Oct-2014 Eric Laurent <elaurent@google.com> am 2d1f309c: am b1322c78: audio policy: fix commit dea1541f

* commit '2d1f309c9d0db35f392a2c290ecbe54e0367e7cc':
audio policy: fix commit dea1541f
ca83dd27f6c662bcbb0cea204c4df7ca77a479fd 31-Oct-2014 Eric Laurent <elaurent@google.com> am 42f785c5: am 4fbe49a8: am 96016c2d: am 9944ff09: am 70c3507d: am 450b10c9: am d0f9dc71: am e0a65f30: am f5af3a72: am 6d80b687: audio policy: validate stream type received from binder calls.

* commit '42f785c5d5ae596d781171327c98c541f0517feb':
audio policy: validate stream type received from binder calls.
ec6bd72ccb60b98355038750e62b3f123316f7e5 31-Oct-2014 Eric Laurent <elaurent@google.com> am 179f6a5a: am 05808603: am 8e05b5f5: Merge "audio policy: validate stream type received from binder calls." into lmp-mr1-dev

* commit '179f6a5a5eb51761c2664fa4bb2948e38033a2ad':
audio policy: validate stream type received from binder calls.
42f785c5d5ae596d781171327c98c541f0517feb 31-Oct-2014 Eric Laurent <elaurent@google.com> am 4fbe49a8: am 96016c2d: am 9944ff09: am 70c3507d: am 450b10c9: am d0f9dc71: am e0a65f30: am f5af3a72: am 6d80b687: audio policy: validate stream type received from binder calls.

* commit '4fbe49a83d41a64d44e363ccd691e7bfc41bb6af':
audio policy: validate stream type received from binder calls.
179f6a5a5eb51761c2664fa4bb2948e38033a2ad 31-Oct-2014 Eric Laurent <elaurent@google.com> am 05808603: am 8e05b5f5: Merge "audio policy: validate stream type received from binder calls." into lmp-mr1-dev

* commit '05808603bc2306f038c050cc6dedaff4f6fae756':
audio policy: validate stream type received from binder calls.
4fbe49a83d41a64d44e363ccd691e7bfc41bb6af 31-Oct-2014 Eric Laurent <elaurent@google.com> am 96016c2d: am 9944ff09: am 70c3507d: am 450b10c9: am d0f9dc71: am e0a65f30: am f5af3a72: am 6d80b687: audio policy: validate stream type received from binder calls.

* commit '96016c2d583ccca9fffd6974cb9473f7effd6cf5':
audio policy: validate stream type received from binder calls.
96016c2d583ccca9fffd6974cb9473f7effd6cf5 31-Oct-2014 Eric Laurent <elaurent@google.com> am 9944ff09: am 70c3507d: am 450b10c9: am d0f9dc71: am e0a65f30: am f5af3a72: am 6d80b687: audio policy: validate stream type received from binder calls.

* commit '9944ff09ac4eb076cab994ef245b0103f60836ba':
audio policy: validate stream type received from binder calls.
70c3507d915baaa5a0ab163eeb0a445030f4f492 31-Oct-2014 Eric Laurent <elaurent@google.com> am 450b10c9: am d0f9dc71: am e0a65f30: am f5af3a72: am 6d80b687: audio policy: validate stream type received from binder calls.

* commit '450b10c97514411ef1d0d887d4e18851fd286f0b':
audio policy: validate stream type received from binder calls.
d0f9dc7156e531d5cd0615f6e682d2449e08e9a7 31-Oct-2014 Eric Laurent <elaurent@google.com> am e0a65f30: am f5af3a72: am 6d80b687: audio policy: validate stream type received from binder calls.

* commit 'e0a65f3008ac5874106b21d03e19296c8015da41':
audio policy: validate stream type received from binder calls.
e0a65f3008ac5874106b21d03e19296c8015da41 30-Oct-2014 Eric Laurent <elaurent@google.com> am f5af3a72: am 6d80b687: audio policy: validate stream type received from binder calls.

* commit 'f5af3a72f308cd4dff7859e62922ee5a13bd4c15':
audio policy: validate stream type received from binder calls.
f5af3a72f308cd4dff7859e62922ee5a13bd4c15 30-Oct-2014 Eric Laurent <elaurent@google.com> am 6d80b687: audio policy: validate stream type received from binder calls.

* commit '6d80b687c3b8d9c8da7cdad7d9813aa51c1cf15e':
audio policy: validate stream type received from binder calls.
6d80b687c3b8d9c8da7cdad7d9813aa51c1cf15e 30-Oct-2014 Eric Laurent <elaurent@google.com> audio policy: validate stream type received from binder calls.

Bug: 18001784.
Bug: 18002005.
Change-Id: If08866a3c21bcbfd8cdbbf8336bcf1faad66f321
udioflinger/AudioPolicyService.cpp
b1322c78b035c9f47ebe57a39799d7a0e13bf57f 30-Oct-2014 Eric Laurent <elaurent@google.com> audio policy: fix commit dea1541f

Fix return types in early returns added by
commit dea1541f in AudioPolicy binder call methods.

Also fix former similar mistakes found nearby.

Bug: 18001784.
Bug: 18002005.

Change-Id: I088c6029ca04e2c2c2f78e560c9cb6b9576dd88f
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyInterfaceImplLegacy.cpp
8e05b5f5f45b8d6931ff830969125a42428c6830 30-Oct-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: validate stream type received from binder calls." into lmp-mr1-dev
2384b55ab31c49fb5babce058237c27ed28ed53e 30-Oct-2014 Jean-Michel Trivi <jmtrivi@google.com> am 1f4b82a2: am b14e6dc8: Merge "Always use an address for remote submix" into lmp-mr1-dev automerge: 6e8212b

* commit '1f4b82a20d75b5aa8d7801d342ac3a9b48fa0863':
Always use an address for remote submix
1f4b82a20d75b5aa8d7801d342ac3a9b48fa0863 30-Oct-2014 Jean-Michel Trivi <jmtrivi@google.com> am b14e6dc8: Merge "Always use an address for remote submix" into lmp-mr1-dev automerge: 6e8212b

* commit 'b14e6dc871e6cb5c7beea9049a778f342c177a83':
Always use an address for remote submix
dea1541fc0042abf05674b19c2f94ca086945dfd 28-Oct-2014 Eric Laurent <elaurent@google.com> audio policy: validate stream type received from binder calls.

Bug: 18001784.
Bug: 18002005.
Change-Id: I8efa674dceff5a6e10251b1c7a55e9bb2d532395
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyInterfaceImplLegacy.cpp
6e8212b2a02685e50d0c093a6f44d9af636261d9 28-Oct-2014 Jean-Michel Trivi <jmtrivi@google.com> Merge "Always use an address for remote submix" into lmp-mr1-dev
1bbc1c93b5db545e503dc27c262eef38685d0726 24-Oct-2014 Chien-Yu Chen <cychen@google.com> CameraService: API1: fix picture FOV

Fix the wrong assumption that active array size equals to pixel array
size.

bug 17918247

Change-Id: Ic308f281fb677332a74e95abb473c5b13063eeca
amera/libcameraservice/api1/client2/Parameters.cpp
e6dcc43853dc5b52175474bd9b69ffc2bdc02a32 28-Oct-2014 Eric Laurent <elaurent@google.com> am 8fc2d37f: audio policy: fix output device command after clearing audio patch automerge: b80a2a8 automerge: 0571bad

* commit '8fc2d37f8f87d8b51b0eaff7d5adc4d20bee642c':
audio policy: fix output device command after clearing audio patch
8fc2d37f8f87d8b51b0eaff7d5adc4d20bee642c 28-Oct-2014 Eric Laurent <elaurent@google.com> audio policy: fix output device command after clearing audio patch automerge: b80a2a8
automerge: 0571bad

* commit '0571baded4cdad2a896ca007a211427f755cc4f6':
audio policy: fix output device command after clearing audio patch
b80a2a8871d3af8619bf774a0c9ddbac8d598bf9 28-Oct-2014 Eric Laurent <elaurent@google.com> audio policy: fix output device command after clearing audio patch

Make sure that a valid audio patch is created again on an output stream
following the disconneciton and reconnection of the same output device.

Bug: 18144611.
Change-Id: I72387ad8e93f8fb2571da2a6c58a6e167ac7fc4d
udiopolicy/AudioPolicyManager.cpp
f3f3fe6db6dc99c13dc6b7fd0fc93ba77b7031b4 28-Oct-2014 Eric Laurent <elaurent@google.com> am 80f35a97: audio policy: fix multiple device volume automerge: 31551f8 automerge: 4a9e7a0

* commit '80f35a97dd633f74475cf1ec5730a3f881c06cc2':
audio policy: fix multiple device volume
80f35a97dd633f74475cf1ec5730a3f881c06cc2 28-Oct-2014 Eric Laurent <elaurent@google.com> audio policy: fix multiple device volume automerge: 31551f8
automerge: 4a9e7a0

* commit '4a9e7a0e92f0d1cda5873fc47e93ee91cc043c4c':
audio policy: fix multiple device volume
fd4c14883b268a0bc5514da135fe6b7d1ce2071b 07-Aug-2014 Jean-Michel Trivi <jmtrivi@google.com> Always use an address for remote submix

Usage of remote submix device for audio rerouting (e.g. wifi display)
didn't mandate the use of addresses. Use "0" as the default address
when none is specificed.
In logs, only use hex format for audio devices

Bug 16009464

Change-Id: Ibfb1ce6881eba8b7e34420293b8a7077a6e659e6
udioflinger/AudioFlinger.cpp
udiopolicy/AudioPolicyManager.cpp
31551f8dd625b8d40961e141d2913b0073f852ab 11-Oct-2014 Eric Laurent <elaurent@google.com> audio policy: fix multiple device volume

Whem multiple devices are selected by a strategy,
apply volume to all these devices when one of them is changed by
setStreamVolumeIndex() API.

Also only consider devices supported by current output profile
in checkDeviceMuteStrategies() to avoid muting a stream because of
devices connected to another output stream.

Bug: 17507571.

Change-Id: I83ef9fb7f294214d30f7f890db44c64ece3be387
udiopolicy/AudioPolicyManager.cpp
1aeed4eb22fce82ceff5509055488de12a403c87 24-Oct-2014 Eino-Ville Talvala <etalvala@google.com> am 48157cf8: am 24881574: am ee946754: am 4d8ae211: am 661c21da: CameraService: Disconnect: Release mutex while waiting for joins.

* commit '48157cf865ece0d5d197274045384f0ab9605775':
CameraService: Disconnect: Release mutex while waiting for joins.
48157cf865ece0d5d197274045384f0ab9605775 24-Oct-2014 Eino-Ville Talvala <etalvala@google.com> am 24881574: am ee946754: am 4d8ae211: am 661c21da: CameraService: Disconnect: Release mutex while waiting for joins.

* commit '2488157416a5d08c530852404f72bb91db8fbf22':
CameraService: Disconnect: Release mutex while waiting for joins.
ee94675469f67c3fe25428b87fc9a2d468f908c6 24-Oct-2014 Eino-Ville Talvala <etalvala@google.com> am 4d8ae211: am 661c21da: CameraService: Disconnect: Release mutex while waiting for joins.

* commit '4d8ae211ae2e2a5ae464931ce41ec5b1d6e6d51f':
CameraService: Disconnect: Release mutex while waiting for joins.
4d8ae211ae2e2a5ae464931ce41ec5b1d6e6d51f 23-Oct-2014 Eino-Ville Talvala <etalvala@google.com> am 661c21da: CameraService: Disconnect: Release mutex while waiting for joins.

* commit '661c21da5592ca48256747ec220efb2e599eeb72':
CameraService: Disconnect: Release mutex while waiting for joins.
661c21da5592ca48256747ec220efb2e599eeb72 22-Oct-2014 Eino-Ville Talvala <etalvala@google.com> CameraService: Disconnect: Release mutex while waiting for joins.

The threads shutting down may have callpaths that require taking the
binder interface mutex, so waiting to join them with that mutex held
can lead to deadlocks.

A specific instance is StreamingProcessor calling dataCallbackTimestamp,
which can immediately lead to a Camera2Client::releaseRecordingFrame call,
which requires the binder interface mutex. If this call happens right when
shutdown is occurring, and Camera2Client::disconnect is holding the mutex,
deadlock ensues.

Bug: 17997578
Change-Id: I71253cd5542b5920ad205976d315110ca0043d94
amera/libcameraservice/api1/Camera2Client.cpp
152f59b8cff44f74e6416cf309bfd85e0bb7e1db 22-Oct-2014 Eric Laurent <elaurent@google.com> am 6efbadac: am b6a89512: am 9d0d5958: Merge "audioflinger: new HW A/V sync ID allocation flow" into lmp-mr1-dev

* commit '6efbadac3ff5c3ddc194faaba44f1fe63e452c7f':
audioflinger: new HW A/V sync ID allocation flow
6efbadac3ff5c3ddc194faaba44f1fe63e452c7f 22-Oct-2014 Eric Laurent <elaurent@google.com> am b6a89512: am 9d0d5958: Merge "audioflinger: new HW A/V sync ID allocation flow" into lmp-mr1-dev

* commit 'b6a895127095dceaed8fec2ea0d291aa1722d08c':
audioflinger: new HW A/V sync ID allocation flow
9d0d5958969cffae5d4305025bc20d05f32e6ff2 22-Oct-2014 Eric Laurent <elaurent@google.com> Merge "audioflinger: new HW A/V sync ID allocation flow" into lmp-mr1-dev
fa90e84ed0cb2abdc0e0873a06d10ccf2b3c34f6 18-Oct-2014 Eric Laurent <elaurent@google.com> audioflinger: new HW A/V sync ID allocation flow

The HW A/V sync ID is now allocated by the audio HAL before the
output stream is created by a call to global get_parameters() with
key AUDIO_PARAMETER_HW_AV_SYNC.

When the AudioTrack is created, the HW A/V sync ID is communicated
to the output stream by stream set_parameters() with key
AUDIO_PARAMETER_STREAM_HW_AV_SYNC.

Bug: 17112525.
Change-Id: Ia8bc6f3bf9f358aa89f3f56ac554e893a19811ad
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
97b7b75b6a31330e213bdb96ccc60916218ad903 28-Sep-2014 Glenn Kasten <gkasten@google.com> Improve dumpsys for output threads

Display output thread type and flags.
Also add units and use consistent spelling.

Change-Id: I19eb627f41c4887b6ad0543024a8477a99890798
udioflinger/Threads.cpp
udioflinger/Threads.h
7140a24c53dac18b7382723e2f89ab4caed220c6 22-Oct-2014 Eric Laurent <elaurent@google.com> am d858f734: am b0d0fb16: am 1f58bb15: am 964b7312: am 7de5ac1f: audio policy: fix effect handle leak

* commit 'd858f734f9677b560dc31da9d929bab717e438e1':
audio policy: fix effect handle leak
d858f734f9677b560dc31da9d929bab717e438e1 22-Oct-2014 Eric Laurent <elaurent@google.com> am b0d0fb16: am 1f58bb15: am 964b7312: am 7de5ac1f: audio policy: fix effect handle leak

* commit 'b0d0fb16358d84084a443f1bc3905d635922f7d2':
audio policy: fix effect handle leak
964b73121a634921f000ef3f877a7546f65bb700 21-Oct-2014 Eric Laurent <elaurent@google.com> am 7de5ac1f: audio policy: fix effect handle leak

* commit '7de5ac1f067ec61f7ea424d5534cfd40987b11fa':
audio policy: fix effect handle leak
7de5ac1f067ec61f7ea424d5534cfd40987b11fa 21-Oct-2014 Eric Laurent <elaurent@google.com> audio policy: fix effect handle leak

Fix ref counting error in AudioPolicyEffect::addInputEffects()
and addOutputSessionEffects()

Bug: 17675112.
Change-Id: I5267d1024a585919f66ead83662e57b78ba53540
udiopolicy/AudioPolicyEffects.cpp
97502a19165de566eaf7525b6967f84adc8aabce 20-Oct-2014 Marco Nelissen <marcone@google.com> am 9f38361f: am 5cc72274: am d61ba0aa: am 36d9256f: am ac302143: Fix the fix

* commit '9f38361fa0ba8fe04b9ba7e21bf25abe20620800':
Fix the fix
9f38361fa0ba8fe04b9ba7e21bf25abe20620800 20-Oct-2014 Marco Nelissen <marcone@google.com> am 5cc72274: am d61ba0aa: am 36d9256f: am ac302143: Fix the fix

* commit '5cc72274aa3545ac4a6ec471864c87e4c36befb9':
Fix the fix
36d9256f956b2ed4d7a221d84ad05bf4ba482958 20-Oct-2014 Marco Nelissen <marcone@google.com> am ac302143: Fix the fix

* commit 'ac302143551a8b964f026385a524dda9ff8ea5ba':
Fix the fix
9cf809cc909e31e53c5a9ac22481e2481817a01c 20-Oct-2014 Marco Nelissen <marcone@google.com> am ac302143: Fix the fix

* commit 'ac302143551a8b964f026385a524dda9ff8ea5ba':
Fix the fix
ac302143551a8b964f026385a524dda9ff8ea5ba 20-Oct-2014 Marco Nelissen <marcone@google.com> Fix the fix

We need to clear the buffer a little more often.

Bug: 18023017
Change-Id: If8a522b9133a4269e2435af8958f6ced322e71e9
udioflinger/Threads.cpp
791854d962d8fd53dc267f73bfbd474a8887a1d1 20-Oct-2014 Marco Nelissen <marcone@google.com> am 412b8e71: am 0c2c1619: am 0cfc8f25: am 145a4c67: am 22bc10a3: Merge "Clear effect buffer before sending to chain" into lmp-dev

* commit '412b8e719e77e6e3284b87fd8ae1499d6ae76e06':
Clear effect buffer before sending to chain
412b8e719e77e6e3284b87fd8ae1499d6ae76e06 20-Oct-2014 Marco Nelissen <marcone@google.com> am 0c2c1619: am 0cfc8f25: am 145a4c67: am 22bc10a3: Merge "Clear effect buffer before sending to chain" into lmp-dev

* commit '0c2c161957023ee5c288c167c067f3a803922165':
Clear effect buffer before sending to chain
145a4c679a9ab27aceaa1d386ea9aca1c0cd4d33 20-Oct-2014 Marco Nelissen <marcone@google.com> am 22bc10a3: Merge "Clear effect buffer before sending to chain" into lmp-dev

* commit '22bc10a347569a0ab2980c24783e31aba4d7414d':
Clear effect buffer before sending to chain
7ae605a56b9b1fd7a2cb75d4b742f5673e3fd5dc 20-Oct-2014 Marco Nelissen <marcone@google.com> am 22bc10a3: Merge "Clear effect buffer before sending to chain" into lmp-dev

* commit '22bc10a347569a0ab2980c24783e31aba4d7414d':
Clear effect buffer before sending to chain
22bc10a347569a0ab2980c24783e31aba4d7414d 20-Oct-2014 Marco Nelissen <marcone@google.com> Merge "Clear effect buffer before sending to chain" into lmp-dev
57088b5c8e76855b99b3e6b3e410de5b6382670e 18-Oct-2014 Marco Nelissen <marcone@google.com> Clear effect buffer before sending to chain

otherwise the effect might get a buffer with previous data instead
of silence.

Bug: 18023017
Change-Id: Ic6be5ce0e74552aac2a0cce9c660893f9ad27f5c
udioflinger/Threads.cpp
42af986481f4b509780810f9c0b9ad202b4dd44f 16-Oct-2014 Haynes Mathew George <hgeorge@codeaurora.org> am 4d8b834e: am f7998766: am f4c58707: am a2d4a6da: audio policy: Fix for voice call audio loss

* commit '4d8b834eafbb29f1a81881cca5885a58a66c8734':
audio policy: Fix for voice call audio loss
4d8b834eafbb29f1a81881cca5885a58a66c8734 16-Oct-2014 Haynes Mathew George <hgeorge@codeaurora.org> am f7998766: am f4c58707: am a2d4a6da: audio policy: Fix for voice call audio loss

* commit 'f79987663f050fee8b4739ebc9c7916242361595':
audio policy: Fix for voice call audio loss
e9bf7a5d944bf3375da4a6da1b0c0059443b58f7 16-Oct-2014 Haynes Mathew George <hgeorge@codeaurora.org> am a2d4a6da: audio policy: Fix for voice call audio loss

* commit 'a2d4a6dac432f0c4f543d79b9a63c55ae91f81d6':
audio policy: Fix for voice call audio loss
f4c58707b511af4c9f55c25781304172964107cb 16-Oct-2014 Haynes Mathew George <hgeorge@codeaurora.org> am a2d4a6da: audio policy: Fix for voice call audio loss

* commit 'a2d4a6dac432f0c4f543d79b9a63c55ae91f81d6':
audio policy: Fix for voice call audio loss
a2d4a6dac432f0c4f543d79b9a63c55ae91f81d6 13-Oct-2014 Haynes Mathew George <hgeorge@codeaurora.org> audio policy: Fix for voice call audio loss

Audio Policy service filters out one of the create patch
commands when it finds two pending commands with the same
patch handles. Due to this routing command is not received
to audio HAL and the voice call set up fails.
Fix this by filtering create patch commands only when
they are issued on the same output.

authored-by: Karthik Reddy Katta <a_katta@codeaurora.org>

Bug: 17787282
Change-Id: If36f0ab71e9b72d6a8eb61d31f762bc5e1683b89
udiopolicy/AudioPolicyService.cpp
29bf59d20b1654f0da60e5b1ffc0db15c3b93975 15-Oct-2014 Zhijun He <zhijunhe@google.com> am 4e70e887: am fc1d3da5: am 62c456f0: am 9d2189ff: Merge "Camera2Client: avoid two consecutive sets of configure_streams calls" into lmp-dev

* commit '4e70e887386e87d97c406638f2735f90558238f5':
Camera2Client: avoid two consecutive sets of configure_streams calls
b02d20b3e24a5801a48b5d12079d557d91ed89ae 15-Oct-2014 Hochi Huang <hochi.huang@mediatek.com> am 45dabe92: am 30fa3068: am f53eaf49: fix FM no sound issue

* commit '45dabe92022c24da53ce47efcdbef14d59ce28f2':
fix FM no sound issue
4e70e887386e87d97c406638f2735f90558238f5 15-Oct-2014 Zhijun He <zhijunhe@google.com> am fc1d3da5: am 62c456f0: am 9d2189ff: Merge "Camera2Client: avoid two consecutive sets of configure_streams calls" into lmp-dev

* commit 'fc1d3da510310ce72aee8a68f103ed7096f4e9d4':
Camera2Client: avoid two consecutive sets of configure_streams calls
45dabe92022c24da53ce47efcdbef14d59ce28f2 15-Oct-2014 Hochi Huang <hochi.huang@mediatek.com> am 30fa3068: am f53eaf49: fix FM no sound issue

* commit '30fa3068b8664043f26108e4f0cb88de21c425c4':
fix FM no sound issue
eb018cefe7a3d2c061b53a77aab2d327cad8e9f4 15-Oct-2014 Zhijun He <zhijunhe@google.com> am 9d2189ff: Merge "Camera2Client: avoid two consecutive sets of configure_streams calls" into lmp-dev

* commit '9d2189ffcf1142b2948ce3065c32521ed7d966c4':
Camera2Client: avoid two consecutive sets of configure_streams calls
62c456f02d3f1071d18644fb3a1de354d6e4ee7f 15-Oct-2014 Zhijun He <zhijunhe@google.com> am 9d2189ff: Merge "Camera2Client: avoid two consecutive sets of configure_streams calls" into lmp-dev

* commit '9d2189ffcf1142b2948ce3065c32521ed7d966c4':
Camera2Client: avoid two consecutive sets of configure_streams calls
96ff5c48a81f3f45c384113480bf5e28620a72ae 14-Oct-2014 Zhijun He <zhijunhe@google.com> Camera2Client: avoid two consecutive sets of configure_streams calls

When mediaRecorder starts without an active preview stream, Camera2Client
starts preview then immediately start recording, which could cause the second
configure_streams to call into HAL before any preview request is sent. This
could cause HAL to run into bad state. This change work around this issue
by making sure the first preview request is submitted to the HAL before
start recording.

Bug: 17915062
Change-Id: I94ae64ee76487603695a469240da601ddcb29a66
amera/libcameraservice/api1/Camera2Client.cpp
f53eaf49df1e1e1c01708919e9e0a046543de9b6 09-Oct-2014 Hochi Huang <hochi.huang@mediatek.com> fix FM no sound issue

Review: https://partner-android-review.git.corp.google.com/#/c/184276

Signed-off-by: Carson Liao <carson.liao@mediatek.com>

Change-Id: I0847c8a6e6d054a9258b52402c914105d902c573
udioflinger/ServiceUtilities.cpp
udioflinger/ServiceUtilities.h
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyInterfaceImplLegacy.cpp
6e6ff83b86eaba98af23f3e65ea463c70d7f34f4 12-Oct-2014 Dave Burke <daveburke@google.com> am c9792887: am 4d8cd7fe: am fa845267: am 9286354c: Merge "Revert "audio policy: add support for ro.audio.media_deep_buffer"" into lmp-dev

* commit 'c979288717f707521926b267ceb37f1c07bd4a4b':
Revert "audio policy: add support for ro.audio.media_deep_buffer"
c979288717f707521926b267ceb37f1c07bd4a4b 12-Oct-2014 Dave Burke <daveburke@google.com> am 4d8cd7fe: am fa845267: am 9286354c: Merge "Revert "audio policy: add support for ro.audio.media_deep_buffer"" into lmp-dev

* commit '4d8cd7fee6fb6b30c3ef5679c1983cb0b3865097':
Revert "audio policy: add support for ro.audio.media_deep_buffer"
fa845267f7cb5aede69ff1f62db99e8478db170d 12-Oct-2014 Dave Burke <daveburke@google.com> am 9286354c: Merge "Revert "audio policy: add support for ro.audio.media_deep_buffer"" into lmp-dev

* commit '9286354c0a864ce2348cc7dfc6ca81e84a15f8e2':
Revert "audio policy: add support for ro.audio.media_deep_buffer"
013f7ee35b6183fc797ce1a23090a5df43d1c3ff 12-Oct-2014 Dave Burke <daveburke@google.com> am 9286354c: Merge "Revert "audio policy: add support for ro.audio.media_deep_buffer"" into lmp-dev

* commit '9286354c0a864ce2348cc7dfc6ca81e84a15f8e2':
Revert "audio policy: add support for ro.audio.media_deep_buffer"
f2ab2191387ce7902c730cc68314ea5fdc4a9237 11-Oct-2014 Vineeta Srivastava <vsrivastava@google.com> Revert "audio policy: add support for ro.audio.media_deep_buffer"

This reverts commit 95511add8ad4d440c67272503559f5042c4e6f1f.

Change-Id: I76a8b86790b06b08d8ca0f8d374e585f964ffba8
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
f18d90d3a63bf33616564147e34cfe4a39933b76 11-Oct-2014 Eric Laurent <elaurent@google.com> am 4969bd6e: am d5b9260d: am 6337f603: am ffd5cdbd: Merge "audio policy: add support for ro.audio.media_deep_buffer" into lmp-dev

* commit '4969bd6ee81d9624c5fa3c5be8daa571c7cc2ece':
audio policy: add support for ro.audio.media_deep_buffer
4969bd6ee81d9624c5fa3c5be8daa571c7cc2ece 11-Oct-2014 Eric Laurent <elaurent@google.com> am d5b9260d: am 6337f603: am ffd5cdbd: Merge "audio policy: add support for ro.audio.media_deep_buffer" into lmp-dev

* commit 'd5b9260d4878b126e8226e94beb91250076588a9':
audio policy: add support for ro.audio.media_deep_buffer
6337f6032e7bdbf0b4654fb07512a00bd33ef696 11-Oct-2014 Eric Laurent <elaurent@google.com> am ffd5cdbd: Merge "audio policy: add support for ro.audio.media_deep_buffer" into lmp-dev

* commit 'ffd5cdbd3e3faa203539e26adc755f860c8cac80':
audio policy: add support for ro.audio.media_deep_buffer
4c4035355b7fdd123740605c74c06df3c35e7a85 11-Oct-2014 Eric Laurent <elaurent@google.com> am ffd5cdbd: Merge "audio policy: add support for ro.audio.media_deep_buffer" into lmp-dev

* commit 'ffd5cdbd3e3faa203539e26adc755f860c8cac80':
audio policy: add support for ro.audio.media_deep_buffer
4aa7cb5cf4b314a32362583256c951d56b510629 11-Oct-2014 Eric Laurent <elaurent@google.com> am ae9aec99: am 32c7e2e9: am 733ee8aa: am f5ada6ed: audio policy: move intializations to onFirstRef()

* commit 'ae9aec9991b19c592fb5feb35821c9745a213126':
audio policy: move intializations to onFirstRef()
ae9aec9991b19c592fb5feb35821c9745a213126 11-Oct-2014 Eric Laurent <elaurent@google.com> am 32c7e2e9: am 733ee8aa: am f5ada6ed: audio policy: move intializations to onFirstRef()

* commit '32c7e2e9412eeb866b5b1af175ff9b05f79729be':
audio policy: move intializations to onFirstRef()
95511add8ad4d440c67272503559f5042c4e6f1f 11-Oct-2014 Eric Laurent <elaurent@google.com> audio policy: add support for ro.audio.media_deep_buffer

Bug: 17931716.
Change-Id: Ife170f20f5d02b71059fbd384bd29759fafee826
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
733ee8aaf2a91ac98cc7cfae5b98164d3aefab2a 10-Oct-2014 Eric Laurent <elaurent@google.com> am f5ada6ed: audio policy: move intializations to onFirstRef()

* commit 'f5ada6edcc83bb1b313abcd4c4fbdc4f7724f04d':
audio policy: move intializations to onFirstRef()
e20685f5322f4bb1194dab5db5e237d1e069c57b 10-Oct-2014 Eric Laurent <elaurent@google.com> am f5ada6ed: audio policy: move intializations to onFirstRef()

* commit 'f5ada6edcc83bb1b313abcd4c4fbdc4f7724f04d':
audio policy: move intializations to onFirstRef()
f5ada6edcc83bb1b313abcd4c4fbdc4f7724f04d 10-Oct-2014 Eric Laurent <elaurent@google.com> audio policy: move intializations to onFirstRef()

Bug: 17896324.

Change-Id: I3bb74f5397142ac354bd815eb362e5ddacdcb463
udiopolicy/AudioPolicyService.cpp
udiopolicy/AudioPolicyService.h
d89eaddd1544dc9f6665e2578583e8083cac00da 07-Oct-2014 Marco Nelissen <marcone@google.com> Check for duplicate uuids when parsing audio_effects.conf

uuids need to be unique, and things don't work properly when they're
not.
Also fix/enhance/extend the dumpEffectDescriptor() method, and
include a list of effects in audioflinger dumpsys.

Change-Id: I3dfbc5ed0f7272c7809e337f2929212ece047ee4
udioflinger/AudioFlinger.cpp
3a138ea2ba8265776096684527a991925134b2f8 07-Oct-2014 Eric Laurent <elaurent@google.com> am 8e12cdf9: am 7c6977c4: am 07811789: Merge "audio policy: fix build with USE_LEGACY_AUDIO_POLICY" into lmp-dev

* commit '8e12cdf97f01b5774be555ad657f7290c0da18cd':
audio policy: fix build with USE_LEGACY_AUDIO_POLICY
f46bd1e76c553b04cc963afa27e36c6d8931ace0 07-Oct-2014 Eric Laurent <elaurent@google.com> am ddb78caa: am 8610f49c: am 5bee844f: Merge "audio policy: fix lockup during mediaserver restart" into lmp-dev

* commit 'ddb78caa65cfff51433e6fda2230376bb681e611':
audio policy: fix lockup during mediaserver restart
8e12cdf97f01b5774be555ad657f7290c0da18cd 07-Oct-2014 Eric Laurent <elaurent@google.com> am 7c6977c4: am 07811789: Merge "audio policy: fix build with USE_LEGACY_AUDIO_POLICY" into lmp-dev

* commit '7c6977c42da29bf47e44aab55d3b2044bf9b442d':
audio policy: fix build with USE_LEGACY_AUDIO_POLICY
ddb78caa65cfff51433e6fda2230376bb681e611 07-Oct-2014 Eric Laurent <elaurent@google.com> am 8610f49c: am 5bee844f: Merge "audio policy: fix lockup during mediaserver restart" into lmp-dev

* commit '8610f49c1a14c91550c8abde27bda59ac6526b23':
audio policy: fix lockup during mediaserver restart
5bed74771daa5f0f8907aeb529d2ab0f388140b2 07-Oct-2014 Eric Laurent <elaurent@google.com> am 07811789: Merge "audio policy: fix build with USE_LEGACY_AUDIO_POLICY" into lmp-dev

* commit '07811789ebf31f5317403356f624d04282e666aa':
audio policy: fix build with USE_LEGACY_AUDIO_POLICY
95222a17cb00503539fa6d9884ca8c51d9a23a15 07-Oct-2014 Eric Laurent <elaurent@google.com> am 5bee844f: Merge "audio policy: fix lockup during mediaserver restart" into lmp-dev

* commit '5bee844fd8c2f6d9fa78ed5e063a8e3df9f2f7b6':
audio policy: fix lockup during mediaserver restart
7c6977c42da29bf47e44aab55d3b2044bf9b442d 07-Oct-2014 Eric Laurent <elaurent@google.com> am 07811789: Merge "audio policy: fix build with USE_LEGACY_AUDIO_POLICY" into lmp-dev

* commit '07811789ebf31f5317403356f624d04282e666aa':
audio policy: fix build with USE_LEGACY_AUDIO_POLICY
8610f49c1a14c91550c8abde27bda59ac6526b23 07-Oct-2014 Eric Laurent <elaurent@google.com> am 5bee844f: Merge "audio policy: fix lockup during mediaserver restart" into lmp-dev

* commit '5bee844fd8c2f6d9fa78ed5e063a8e3df9f2f7b6':
audio policy: fix lockup during mediaserver restart
f380677f21240ffb78bcdf7c804fe0a7807fb08d 07-Oct-2014 Eric Laurent <elaurent@google.com> audio policy: fix build with USE_LEGACY_AUDIO_POLICY

Bug: 17894512.
Change-Id: I6431c0b03ba02cf561413c34848a334caa0261fa
udiopolicy/AudioPolicyClientImplLegacy.cpp
udiopolicy/AudioPolicyInterfaceImplLegacy.cpp
8b1e80bf1e9f214feea219cfe981ba533b806003 07-Oct-2014 Eric Laurent <elaurent@google.com> audio policy: fix lockup during mediaserver restart

When pre or post processing effects are applied by audio policy service
automatically there is a potential lockup if the first call into
AudioPolicyService is made while creating one of those effects.
This is because effects are created with AudioPolicyService mutex held and
effect creation calls into methods (e.g registerClient()) which also acquire
the mutex.

The fix consists in adding a new mutex to AudioPolicyEffects class and not
hold the AudioPolicyService mutex when calling methods in of class.

Bug: 17830596.
Change-Id: Ie61c3671d3147f46e99ba208f39c1a3bf180779f
udiopolicy/AudioPolicyEffects.cpp
udiopolicy/AudioPolicyEffects.h
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/AudioPolicyService.cpp
c0b02d0eed99e31fa160c4843fc016e9dfd00dc3 04-Oct-2014 Hochi Huang <hochi.huang@mediatek.com> am b4f9e042: am 23fe3c0a: [AU] Import gain setting into ports

* commit 'b4f9e04210fc76ea468cb4fb3c2b20d91b56ce50':
[AU] Import gain setting into ports
b4f9e04210fc76ea468cb4fb3c2b20d91b56ce50 04-Oct-2014 Hochi Huang <hochi.huang@mediatek.com> am 23fe3c0a: [AU] Import gain setting into ports

* commit '23fe3c0a05fcb619eeb5b0c2ece02cdadab2df6e':
[AU] Import gain setting into ports
23fe3c0a05fcb619eeb5b0c2ece02cdadab2df6e 03-Oct-2014 Hochi Huang <hochi.huang@mediatek.com> [AU] Import gain setting into ports

Review: https://partner-android-review.git.corp.google.com/#/c/183780

Signed-off-by: Hochi Huang <hochi.huang@mediatek.com>

Change-Id: I415d0b494b9bfadf783280aeea6ad46e0a242cfb
udiopolicy/AudioPolicyManager.cpp
e49574c22849dd1f53cf78e97d22e61b80a04a6a 03-Oct-2014 Eric Laurent <elaurent@google.com> am b17182d8: am 10b464cf: am 2b217bb3: Merge "audioflinger: fix pre processing transfer between record threads." into lmp-dev

* commit 'b17182d85f147a8d68bba2b4d7ed5e757691b4f4':
audioflinger: fix pre processing transfer between record threads.
b17182d85f147a8d68bba2b4d7ed5e757691b4f4 03-Oct-2014 Eric Laurent <elaurent@google.com> am 10b464cf: am 2b217bb3: Merge "audioflinger: fix pre processing transfer between record threads." into lmp-dev

* commit '10b464cf2a193f1a5d4b70db052d36eee227916e':
audioflinger: fix pre processing transfer between record threads.
4d9aba92e64eed4e09431a6544df27ab0b7ceff8 03-Oct-2014 Eric Laurent <elaurent@google.com> am 2b217bb3: Merge "audioflinger: fix pre processing transfer between record threads." into lmp-dev

* commit '2b217bb3aee87ce8486014f261c0f498f6209e80':
audioflinger: fix pre processing transfer between record threads.
10b464cf2a193f1a5d4b70db052d36eee227916e 03-Oct-2014 Eric Laurent <elaurent@google.com> am 2b217bb3: Merge "audioflinger: fix pre processing transfer between record threads." into lmp-dev

* commit '2b217bb3aee87ce8486014f261c0f498f6209e80':
audioflinger: fix pre processing transfer between record threads.
2b217bb3aee87ce8486014f261c0f498f6209e80 03-Oct-2014 Eric Laurent <elaurent@google.com> Merge "audioflinger: fix pre processing transfer between record threads." into lmp-dev
e979d5bb0060ad4fb4fb9aa5aefc6f9b722a1bab 03-Oct-2014 Glenn Kasten <gkasten@google.com> am 12d0cd1b: am 3a8bad2e: am be9ebd46: Merge "Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp" into lmp-dev

* commit '12d0cd1bf756ec96755fae2e573659898bfba6d6':
Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp
12d0cd1bf756ec96755fae2e573659898bfba6d6 03-Oct-2014 Glenn Kasten <gkasten@google.com> am 3a8bad2e: am be9ebd46: Merge "Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp" into lmp-dev

* commit '3a8bad2ed0b463d1401c33b92ff30951fc0df3a4':
Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp
780646847a475fbb5429dac062188c775988e88c 03-Oct-2014 Glenn Kasten <gkasten@google.com> am be9ebd46: Merge "Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp" into lmp-dev

* commit 'be9ebd46c1ec366dca5f142a36a71015b048c037':
Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp
3a8bad2ed0b463d1401c33b92ff30951fc0df3a4 03-Oct-2014 Glenn Kasten <gkasten@google.com> am be9ebd46: Merge "Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp" into lmp-dev

* commit 'be9ebd46c1ec366dca5f142a36a71015b048c037':
Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp
1b92868010b5c1409692a86f6b27e4a265b64c1a 03-Oct-2014 Eric Laurent <elaurent@google.com> audioflinger: fix pre processing transfer between record threads.

Fix two problems remaining with pre processing effects transfer from
one record thread to the next in case of tear down due to device connection:
1 - the enabled state of the effects was not communicated to the new HAL
input stream.
2 - the effects saved in orphan chains list were not transfered to the
new thread when a AudioRecord was created.

Bug: 17757378.
Change-Id: I0923c98470db3b51154dc89846157780a4c21e86
udioflinger/AudioFlinger.cpp
udioflinger/Effects.cpp
udioflinger/Effects.h
udioflinger/Threads.cpp
4c053ea158b29fa2cdd4c6f39d3c8da4ee5a7a02 28-Sep-2014 Glenn Kasten <gkasten@google.com> Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp

The per-thread timestamp latch was not synchronized with the per-track
released frames. Now the value of each track's released frames is
latched along with the timestamp.

Bug: 17531839
Bug: 17669342
Change-Id: I9d50c8c6a5de55a3f4561ac40e20d497376c1257
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
7463758ac831b7429c3f6274c4adac495fc412b3 02-Oct-2014 Eric Laurent <elaurent@google.com> am b0443283: am 92a69cde: am cb4b6e9f: audioflinger: fix failure to indicate volume to effect

* commit 'b04432837b6d0dd5317e745304c0da246307f68a':
audioflinger: fix failure to indicate volume to effect
4113fe9dcbcda53d09f9b9c91f59d9a54e6c2408 02-Oct-2014 Glenn Kasten <gkasten@google.com> am 0e42a880: am e5095be1: am a49c94ea: Merge "Revert "Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp"" into lmp-dev

* commit '0e42a8807edec5541ecac4a050459fbb72c477dc':
Revert "Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp"
b04432837b6d0dd5317e745304c0da246307f68a 02-Oct-2014 Eric Laurent <elaurent@google.com> am 92a69cde: am cb4b6e9f: audioflinger: fix failure to indicate volume to effect

* commit '92a69cde5f53a916c8c26a64d0dd610284161555':
audioflinger: fix failure to indicate volume to effect
0e42a8807edec5541ecac4a050459fbb72c477dc 02-Oct-2014 Glenn Kasten <gkasten@google.com> am e5095be1: am a49c94ea: Merge "Revert "Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp"" into lmp-dev

* commit 'e5095be17c623de8e4b97829d33e8a16b1b7164a':
Revert "Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp"
b90280e9bc1c0ee6b7c8034b42f0663c2dfe1f8c 02-Oct-2014 Nicholas Sauer <nicksauer@google.com> am ea90d32e: am 79e687ed: Merge "[AU] Update volume setting and Audio Device API 3.0" into lmp-sprout-dev

* commit 'ea90d32e98ad29c63b0449d21b0a74c53aab9ea6':
[AU] Update volume setting and Audio Device API 3.0
ea90d32e98ad29c63b0449d21b0a74c53aab9ea6 02-Oct-2014 Nicholas Sauer <nicksauer@google.com> am 79e687ed: Merge "[AU] Update volume setting and Audio Device API 3.0" into lmp-sprout-dev

* commit '79e687edb9bd7e2fcc60e06dd779f98c75511045':
[AU] Update volume setting and Audio Device API 3.0
29ccd3c4890601cb40f10e4e198c25a4a9f46819 02-Oct-2014 Eric Laurent <elaurent@google.com> am cb4b6e9f: audioflinger: fix failure to indicate volume to effect

* commit 'cb4b6e9f05d1c0b3fcc5be5ebe3f7d6f32669b1a':
audioflinger: fix failure to indicate volume to effect
92a69cde5f53a916c8c26a64d0dd610284161555 02-Oct-2014 Eric Laurent <elaurent@google.com> am cb4b6e9f: audioflinger: fix failure to indicate volume to effect

* commit 'cb4b6e9f05d1c0b3fcc5be5ebe3f7d6f32669b1a':
audioflinger: fix failure to indicate volume to effect
cb4b6e9f05d1c0b3fcc5be5ebe3f7d6f32669b1a 01-Oct-2014 Eric Laurent <elaurent@google.com> audioflinger: fix failure to indicate volume to effect

If an effect is added and enabled after a track is started
it will not receive current volume information because volume
is indicated only to active effects and if there is a volume change.

Add a flag to force EffectChain::setVolume_l() to pass volume indication
to all effects each time an effect is enabled.

Bug: 17572556.

Change-Id: I6b68488c9aca8b2095fb210aa124d02e4f759660
udioflinger/Effects.cpp
udioflinger/Effects.h
03248b02ca1d23dbbbe670d7ed993f0c8dbf9178 02-Oct-2014 Glenn Kasten <gkasten@google.com> am a49c94ea: Merge "Revert "Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp"" into lmp-dev

* commit 'a49c94ea49c8329a1bdefe980e1f7d335c0d1ec5':
Revert "Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp"
e5095be17c623de8e4b97829d33e8a16b1b7164a 02-Oct-2014 Glenn Kasten <gkasten@google.com> am a49c94ea: Merge "Revert "Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp"" into lmp-dev

* commit 'a49c94ea49c8329a1bdefe980e1f7d335c0d1ec5':
Revert "Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp"
a49c94ea49c8329a1bdefe980e1f7d335c0d1ec5 02-Oct-2014 Glenn Kasten <gkasten@google.com> Merge "Revert "Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp"" into lmp-dev
6954127b7ace022677ac407ff943c2793f8a11be 02-Oct-2014 Glenn Kasten <gkasten@google.com> Revert "Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp"

This reverts commit 54464ba861aaafd11ee5645f5d1ecd1171c6e9fe.

Bug: 17733142.

Change-Id: I9886d40032b2f7d96bee03e600e14f78943d8052
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
79e687edb9bd7e2fcc60e06dd779f98c75511045 01-Oct-2014 Nicholas Sauer <nicksauer@google.com> Merge "[AU] Update volume setting and Audio Device API 3.0" into lmp-sprout-dev
ac2a2239dfc86c70f7382bebdb85c8cc1a9f6119 01-Oct-2014 Glenn Kasten <gkasten@google.com> am 785da8f5: am 955e24d3: Merge "Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp" into lmp-dev

* commit '785da8f542120e49d29289947e69aba180c1724b':
Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp
1e3aedd7d613708fb13f05cc343a229ed22ea266 01-Oct-2014 Eric Laurent <elaurent@google.com> am 6e871139: am 6c7ae72f: Merge "audio policy: fix HW A/V sync output selection" into lmp-dev

* commit '6e871139d0301cebc677821d49b6901bc204cb96':
audio policy: fix HW A/V sync output selection
a2dda4fcb3ab34a58c5218bb3a8a156cf04651b2 01-Oct-2014 Eric Laurent <elaurent@google.com> am e0270e79: am f71224ce: Merge "audioflinger: forward flush to direct output streams" into lmp-dev

* commit 'e0270e79066825bb232ef5f271ac9ef84ce91b0f':
audioflinger: forward flush to direct output streams
0643f8d84c2bdbf6c29136a5c484c8f31ce2f83d 01-Oct-2014 Eino-Ville Talvala <etalvala@google.com> am 16450e9f: am c8c05d6a: Merge "CameraService: API1: Reallocate JPEG ashmem heap if size changes" into lmp-dev

* commit '16450e9fac197b076ee2b03b579183c6ff17ba46':
CameraService: API1: Reallocate JPEG ashmem heap if size changes
785da8f542120e49d29289947e69aba180c1724b 01-Oct-2014 Glenn Kasten <gkasten@google.com> am 955e24d3: Merge "Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp" into lmp-dev

* commit '955e24d3a8e218d4711cabc6558781e095011132':
Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp
6e871139d0301cebc677821d49b6901bc204cb96 01-Oct-2014 Eric Laurent <elaurent@google.com> am 6c7ae72f: Merge "audio policy: fix HW A/V sync output selection" into lmp-dev

* commit '6c7ae72f0eccf456744474785afd25f9e205881c':
audio policy: fix HW A/V sync output selection
e0270e79066825bb232ef5f271ac9ef84ce91b0f 01-Oct-2014 Eric Laurent <elaurent@google.com> am f71224ce: Merge "audioflinger: forward flush to direct output streams" into lmp-dev

* commit 'f71224ce266abb39f83ecba87783c2347631654a':
audioflinger: forward flush to direct output streams
16450e9fac197b076ee2b03b579183c6ff17ba46 01-Oct-2014 Eino-Ville Talvala <etalvala@google.com> am c8c05d6a: Merge "CameraService: API1: Reallocate JPEG ashmem heap if size changes" into lmp-dev

* commit 'c8c05d6a5821dd56209e160066314a03d2f2ca06':
CameraService: API1: Reallocate JPEG ashmem heap if size changes
4cb7073c020fb7d37061be43347fa0a3a7da29ea 30-Sep-2014 Glenn Kasten <gkasten@google.com> am 00cd942e: am 4379c034: Merge "Fix tee sink" into lmp-dev

* commit '00cd942ebe4bf675cad1fbba0d09ba36e419b017':
Fix tee sink
2cabc1f3653cd1d85dfc74742a1486e0ced55409 30-Sep-2014 Eino-Ville Talvala <etalvala@google.com> am 28cdaed3: am dc2e6ddc: Camera2Client: Revert HALv2 device behavior back to MR2

* commit '28cdaed394113a951ef528426a841bcedc9f3ca6':
Camera2Client: Revert HALv2 device behavior back to MR2
00cd942ebe4bf675cad1fbba0d09ba36e419b017 30-Sep-2014 Glenn Kasten <gkasten@google.com> am 4379c034: Merge "Fix tee sink" into lmp-dev

* commit '4379c03433e4613c417998ca7917059ef17dc3a9':
Fix tee sink
28cdaed394113a951ef528426a841bcedc9f3ca6 30-Sep-2014 Eino-Ville Talvala <etalvala@google.com> am dc2e6ddc: Camera2Client: Revert HALv2 device behavior back to MR2

* commit 'dc2e6ddc933e40632e79a866d9ece870db1a975e':
Camera2Client: Revert HALv2 device behavior back to MR2
327cb70dcbf3a1f1679aeafaaa62d8532abea86d 21-Sep-2014 Hochi Huang <hochi.huang@mediatek.com> [AU] Update volume setting and Audio Device API 3.0

Signed-off-by: Hochi Huang <hochi.huang@mediatek.com>
Review: https://partner-android-review.git.corp.google.com/#/c/182522

Change-Id: Ida2dfedc6eaa3204354cdc182e0ee13a35472661
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
a5bcce286594a064d623efb364fee47cca663836 30-Sep-2014 Glenn Kasten <gkasten@google.com> am 955e24d3: Merge "Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp" into lmp-dev

* commit '955e24d3a8e218d4711cabc6558781e095011132':
Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp
fad66ea7367193156187b84e57bbb5f5600410f1 30-Sep-2014 Eric Laurent <elaurent@google.com> am 6c7ae72f: Merge "audio policy: fix HW A/V sync output selection" into lmp-dev

* commit '6c7ae72f0eccf456744474785afd25f9e205881c':
audio policy: fix HW A/V sync output selection
a5d419be9507c81af3b1f522cdc681708769f625 30-Sep-2014 Eric Laurent <elaurent@google.com> am f71224ce: Merge "audioflinger: forward flush to direct output streams" into lmp-dev

* commit 'f71224ce266abb39f83ecba87783c2347631654a':
audioflinger: forward flush to direct output streams
1f25ce3c3c4d34826cddbd1907e2b09f1cd735f6 30-Sep-2014 Eino-Ville Talvala <etalvala@google.com> am c8c05d6a: Merge "CameraService: API1: Reallocate JPEG ashmem heap if size changes" into lmp-dev

* commit 'c8c05d6a5821dd56209e160066314a03d2f2ca06':
CameraService: API1: Reallocate JPEG ashmem heap if size changes
955e24d3a8e218d4711cabc6558781e095011132 30-Sep-2014 Glenn Kasten <gkasten@google.com> Merge "Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp" into lmp-dev
6c7ae72f0eccf456744474785afd25f9e205881c 30-Sep-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: fix HW A/V sync output selection" into lmp-dev
f71224ce266abb39f83ecba87783c2347631654a 30-Sep-2014 Eric Laurent <elaurent@google.com> Merge "audioflinger: forward flush to direct output streams" into lmp-dev
54464ba861aaafd11ee5645f5d1ecd1171c6e9fe 28-Sep-2014 Glenn Kasten <gkasten@google.com> Fix uncertainty of one normal mix buffer in AudioTrack::getTimestamp

The per-thread timestamp latch was not synchronized with the per-track
released frames. Now the value of each track's released frames is
latched along with the timestamp.

Bug: 17531839
Bug: 17669342
Change-Id: I96252782911bd42a2534cc4030521b7eeb99a7b9
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
c260784e37dea73a2090d4ccd91472d61d3b6230 29-Sep-2014 Eric Laurent <elaurent@google.com> audio policy: fix HW A/V sync output selection

commit b732cf5a broke the selection mechanism for the
HW A/V sync direct output.
Add a rule to only select a mixed output for basic PCM
stereo content when a direct output is not explicitly requested.

Bug: 17702382.

Change-Id: I1387690ace77cd4d6a8faf0b525c3d1008fba3f1
udiopolicy/AudioPolicyManager.cpp
e659ef420dae0caae84ab78f9df8952acb9ad3a0 29-Sep-2014 Eric Laurent <elaurent@google.com> audioflinger: forward flush to direct output streams

Track flush should be forwarded to the audio HAL when playing
on a direct output stream.

Bug: 17704953.
Change-Id: Iafc94327fe9aebf1d4eaa97b76c6767b7ac5babe
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
c8c05d6a5821dd56209e160066314a03d2f2ca06 30-Sep-2014 Eino-Ville Talvala <etalvala@google.com> Merge "CameraService: API1: Reallocate JPEG ashmem heap if size changes" into lmp-dev
2d077d0acdbb26eeb1357489c999ec875f6ce297 29-Sep-2014 Eino-Ville Talvala <etalvala@google.com> CameraService: API1: Reallocate JPEG ashmem heap if size changes

Bug: 17682603
Change-Id: I7cba3365d00c33cf4267b1b59a94bd7d0bba08df
amera/libcameraservice/api1/client2/JpegProcessor.cpp
04afc0a753c449994ad844d1f5713d28569df645 29-Sep-2014 Glenn Kasten <gkasten@google.com> am 4379c034: Merge "Fix tee sink" into lmp-dev

* commit '4379c03433e4613c417998ca7917059ef17dc3a9':
Fix tee sink
4b5d678e8a9724573f380574bec461e6056e4276 29-Sep-2014 Eino-Ville Talvala <etalvala@google.com> am dc2e6ddc: Camera2Client: Revert HALv2 device behavior back to MR2

* commit 'dc2e6ddc933e40632e79a866d9ece870db1a975e':
Camera2Client: Revert HALv2 device behavior back to MR2
4379c03433e4613c417998ca7917059ef17dc3a9 29-Sep-2014 Glenn Kasten <gkasten@google.com> Merge "Fix tee sink" into lmp-dev
aa3f88c5df33909bcba7fc644efd65f8c539e5a7 29-Sep-2014 Eino-Ville Talvala <etalvala@google.com> am e4782470: am a67ced97: Merge "CameraService: API1: Fix flash mode" into lmp-dev

* commit 'e478247078a232cc0875ce0f4c7c6ac999977d33':
CameraService: API1: Fix flash mode
788dfbee2860fc6f9574cb00c6423052fa5f3a19 29-Sep-2014 Eric Laurent <elaurent@google.com> am d1ed2a18: am a8a4eeb9: Merge "audio policy: favor mixed over direct output for PCM format" into lmp-dev

* commit 'd1ed2a189a9ba44877cb302025f2317519a47468':
audio policy: favor mixed over direct output for PCM format
17fa4e4f00f1985e180c13d4733d1847d531b60b 29-Sep-2014 Eric Laurent <elaurent@google.com> am 474d1d40: am 504de531: Merge "audio: fix stream type for accessibility usage" into lmp-dev

* commit '474d1d406130e6ad84e4b2c4eddef859953eb8c1':
audio: fix stream type for accessibility usage
f1e6fbdf3a6ed9c28a4831c044f96f28b9ffcda2 29-Sep-2014 Ian Rogers <irogers@google.com> am 3f76ca9d: am c53b98f3: am 6cd6792a: Merge "Allow building on clang without __builtin_assume_aligned"

* commit '3f76ca9d9b42146632a65c41d34a1cece863f972':
Allow building on clang without __builtin_assume_aligned
ba0b34c18da93681c0813ecdab19b0e215b6d261 28-Sep-2014 Glenn Kasten <gkasten@google.com> Fix tee sink

Note: this does not fix the bug below, but it helps to investigate the bug.

Bug: 17578238
Change-Id: I0fd27a477b73ba0e1c5a658bdfad17c500f5dc67
udioflinger/Threads.cpp
dc2e6ddc933e40632e79a866d9ece870db1a975e 26-Sep-2014 Eino-Ville Talvala <etalvala@google.com> Camera2Client: Revert HALv2 device behavior back to MR2

- Do not idle device before video snapshot stream configuration, to
avoid deadlock during waiting.
- Do not tear down ZSL stream
- Don't refresh ZSL stream after deletion was requested.
The v2 HAL implementations really don't like the ZSL stream being
touched ever.

Bug: 17634430
Bug: 17628507

Change-Id: I36b44a395e697be9802c4bd917a82b77c8d04be2
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/client2/ZslProcessor.cpp
e478247078a232cc0875ce0f4c7c6ac999977d33 28-Sep-2014 Eino-Ville Talvala <etalvala@google.com> am a67ced97: Merge "CameraService: API1: Fix flash mode" into lmp-dev

* commit 'a67ced9746e6f0d4e03ff8007682091afea71f6c':
CameraService: API1: Fix flash mode
a9e3132f66b307a162d5899290d38abb7a59166b 28-Sep-2014 Eino-Ville Talvala <etalvala@google.com> am a67ced97: Merge "CameraService: API1: Fix flash mode" into lmp-dev

* commit 'a67ced9746e6f0d4e03ff8007682091afea71f6c':
CameraService: API1: Fix flash mode
a67ced9746e6f0d4e03ff8007682091afea71f6c 28-Sep-2014 Eino-Ville Talvala <etalvala@google.com> Merge "CameraService: API1: Fix flash mode" into lmp-dev
248f9ce1b6052889dd55e7701f908477d16d6ff4 27-Sep-2014 Eino-Ville Talvala <etalvala@google.com> CameraService: API1: Fix flash mode

Sometimes it's useful to ensure variables are initialized in
all code paths.

Bug: 17680416
Change-Id: I9bed8a3bcb94417384bf0551fe1c0eee6cc49577
amera/libcameraservice/api1/client2/Parameters.cpp
d1ed2a189a9ba44877cb302025f2317519a47468 27-Sep-2014 Eric Laurent <elaurent@google.com> am a8a4eeb9: Merge "audio policy: favor mixed over direct output for PCM format" into lmp-dev

* commit 'a8a4eeb95988e6bb73f7a742c8dd238c1f96c5c4':
audio policy: favor mixed over direct output for PCM format
cc0d24f30e3d2c50a9f0082af64ce7ce3e1e9109 27-Sep-2014 Eric Laurent <elaurent@google.com> am a8a4eeb9: Merge "audio policy: favor mixed over direct output for PCM format" into lmp-dev

* commit 'a8a4eeb95988e6bb73f7a742c8dd238c1f96c5c4':
audio policy: favor mixed over direct output for PCM format
a8a4eeb95988e6bb73f7a742c8dd238c1f96c5c4 27-Sep-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: favor mixed over direct output for PCM format" into lmp-dev
474d1d406130e6ad84e4b2c4eddef859953eb8c1 27-Sep-2014 Eric Laurent <elaurent@google.com> am 504de531: Merge "audio: fix stream type for accessibility usage" into lmp-dev

* commit '504de531a08facd130fa00f64fdc00521a975175':
audio: fix stream type for accessibility usage
0d5653fa4e66f884ec9f036abe3b9dbdf6ed3084 27-Sep-2014 Eric Laurent <elaurent@google.com> am 504de531: Merge "audio: fix stream type for accessibility usage" into lmp-dev

* commit '504de531a08facd130fa00f64fdc00521a975175':
audio: fix stream type for accessibility usage
b732cf5af93c33fa183769210ce9954521fb68cd 25-Sep-2014 Eric Laurent <elaurent@google.com> audio policy: favor mixed over direct output for PCM format

modify getOutputForDevice() to skip direct output selection
if the request can obviously be attached to a mixed output
This prevents from selecting a direct output profile that
can manage stereo PCM format if a mixer output is available
to reach the same device.

Bug: 17628413.
Change-Id: I02e9a0b02c9ae5f44ff5768ac4ed02ce84d521c5
udiopolicy/AudioPolicyManager.cpp
504de531a08facd130fa00f64fdc00521a975175 27-Sep-2014 Eric Laurent <elaurent@google.com> Merge "audio: fix stream type for accessibility usage" into lmp-dev
eaab20484de47a3ac8f69636496c371c0ec09fb3 27-Sep-2014 Ian Rogers <irogers@google.com> am c53b98f3: am 6cd6792a: Merge "Allow building on clang without __builtin_assume_aligned"

* commit 'c53b98f3773299ca26acbe5c4a56450a76c2ecf9':
Allow building on clang without __builtin_assume_aligned
3f76ca9d9b42146632a65c41d34a1cece863f972 27-Sep-2014 Ian Rogers <irogers@google.com> am c53b98f3: am 6cd6792a: Merge "Allow building on clang without __builtin_assume_aligned"

* commit 'c53b98f3773299ca26acbe5c4a56450a76c2ecf9':
Allow building on clang without __builtin_assume_aligned
957adb778529f320656a0722dbb4c9291df6b4b3 26-Sep-2014 Eino-Ville Talvala <etalvala@google.com> am bedf4b8b: am 5f5d0544: Merge "Camera1 shim: If there\'s no flash, the keys need to be null." into lmp-dev

* commit 'bedf4b8b4b971e480e671e0762da467cdcad7867':
Camera1 shim: If there's no flash, the keys need to be null.
c1b475c8c0b7e2d4b27ac334f2a2ed59a4a6b712 26-Sep-2014 Ruchit Sharma <ruchits@nvidia.com> am cd8ff071: am e0711f26: camera: add traces for KPI measurement

* commit 'cd8ff071e90aaedc5507b63e73f0fed39b8057ae':
camera: add traces for KPI measurement
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
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/AudioPolicyService.cpp
udiopolicy/AudioPolicyService.h
b5bd1df2d6c78f8db5e7f6b416353ca8a93b7119 25-Sep-2014 Eino-Ville Talvala <etalvala@google.com> Camera1 shim: If there's no flash, the keys need to be null.

Previously, we set FLASH_MODE_OFF for FLASH_MODE when a flash unit
isn't available. However, per the API documentation, the key has to
be null instead.

- Make sure that the flash mode and supported flash mode keys are null
if there's no flash unit on start
- Don't set flash mode in later setParameters calls if there is no
flash unit
- Map NULL value for flash mode key to FLASH_MODE_OFF for internal
consistency.

Bug: 17660716
Change-Id: I3033682f0b882b8c2004114e2afef31662caebda
amera/libcameraservice/api1/client2/Parameters.cpp
e0711f2651121754a10c784e3b149024d17fa4d5 18-Aug-2014 Ruchit Sharma <ruchits@nvidia.com> camera: add traces for KPI measurement

Bug: 17658101
Change-Id: I1d8035c4a8fba7b88a87f205ce57c13d812e9df5
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.h
e56d83fd6aa31d48428b1ca9542ebac6cd41cd2c 24-Sep-2014 Eric Laurent <elaurent@google.com> am de979d88: am a4b08944: Merge "audio policy: add hw hotword flag for inputs" into lmp-dev

* commit 'de979d88917cceb96581f82be9ef95c6bdc625ed':
audio policy: add hw hotword flag for inputs
a4b0894425c0e2a2ebd54b002b6bafa5f1ce0445 24-Sep-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: add hw hotword flag for inputs" into lmp-dev
2224735b9351f731fea5ca14dc1f7893877ee015 23-Sep-2014 Zhijun He <zhijunhe@google.com> am 20862d50: am 88b4cc81: Merge "Camera2Client: log an error when autoFocus is called in wrong state" into lmp-dev

* commit '20862d50fa66a18b1984250e15e387960d24b22d':
Camera2Client: log an error when autoFocus is called in wrong state
f79f8ca07f9130d67ba575748cf3481f32dcad9f 23-Sep-2014 Zhijun He <zhijunhe@google.com> Camera2Client: log an error when autoFocus is called in wrong state

Bug: 17555612
Change-Id: Ife33da712fbc8dc44d81e1e869fc75fb21026204
amera/libcameraservice/api1/Camera2Client.cpp
5d594bef11fe52f7130f01d2c0cebeaf4dea165b 20-Sep-2014 Zhijun He <zhijunhe@google.com> am 11132a53: am d3b7327c: Merge "API1: ZSL buffers should be skipped for manual AF mode" into lmp-dev

* commit '11132a532564d335f38f5e0bcce473e5336f4b27':
API1: ZSL buffers should be skipped for manual AF mode
5dbe47139713292bf45bbf4f1a7af0835a5ff368 20-Sep-2014 Eric Laurent <elaurent@google.com> audio policy: add hw hotword flag for inputs

Audio input profiles can indicate flag AUDIO_INPUT_FLAG_HW_HOTWORD
meaning they allow capture from the same source as HW hotword
detection.

When a client requests capture with this flag, the policy will
try to find an input profile matching this request first and
fallback to a regular input if not found.

Bug: 17575019.
Change-Id: Ia463211597d7fa363527d776389f2257f0ced9a2
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
d3b7327c38964773453a861099c74f547aab9662 20-Sep-2014 Zhijun He <zhijunhe@google.com> Merge "API1: ZSL buffers should be skipped for manual AF mode" into lmp-dev
43e2418e30c360cdd43052fb3471433161cc161e 20-Sep-2014 Zhijun He <zhijunhe@google.com> API1: ZSL buffers should be skipped for manual AF mode

ZSL counts on good auto focus (CAF). It is really tricky to enable ZSL for
manual focus mode. as it is bascically a locked focus mode, you can not tell
if the focus is good or not by reading the afstate.

Bug: 17577928
Change-Id: I68ff7d143e7d56f942bb00a8da6a9faea57b52a0
amera/libcameraservice/api1/client2/ZslProcessor3.cpp
268cc87f8a592cbbcf00141c806c348c136b7ef4 19-Sep-2014 Eino-Ville Talvala <etalvala@google.com> am 7852a357: am 4f62441d: Merge "CameraService: Add client name/pid to device open/close logging." into lmp-dev

* commit '7852a357c9e166d9d3ea63a55e76a8b0ca98acc8':
CameraService: Add client name/pid to device open/close logging.
4f62441d36ad9e9e3f993b6f03ce68fcecf4f83b 19-Sep-2014 Eino-Ville Talvala <etalvala@google.com> Merge "CameraService: Add client name/pid to device open/close logging." into lmp-dev
837ff6f0a3d50f7902b5e2a82de831654fd977e0 19-Sep-2014 Eino-Ville Talvala <etalvala@google.com> am a32c696c: am 0fb7b51f: Merge "CameraService: Fix dump methods for two clients" into lmp-dev

* commit 'a32c696cf5d253f0f3be0cd65123d923d18236c1':
CameraService: Fix dump methods for two clients
b9d2f3333369183344aa89c7be1e643a44296d48 19-Sep-2014 Eino-Ville Talvala <etalvala@google.com> CameraService: Add client name/pid to device open/close logging.

Bug: 15672812
Change-Id: I1162c6d9d0a1eea1dd32949a04c295b4941d2602
amera/libcameraservice/common/Camera2ClientBase.cpp
amera/libcameraservice/common/Camera2ClientBase.h
0fb7b51f6e2a123b2414f4a4daf73ce465c9d8b6 19-Sep-2014 Eino-Ville Talvala <etalvala@google.com> Merge "CameraService: Fix dump methods for two clients" into lmp-dev
4fbf23238e3f927871576170d1a38c855e04473e 19-Sep-2014 Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> Allow building on clang without __builtin_assume_aligned

Clang versions up to and including 3.5 don't have
__builtin_assume_aligned.
Define it to a reasonable approximation when building with those.

Change-Id: I223ccfda6e6ae55ce29dda5e4cacc1b162728b2c
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
udioflinger/AudioResamplerSinc.cpp
67489d2f5668441a36cb1f1157e80ec8684023bf 19-Sep-2014 Eino-Ville Talvala <etalvala@google.com> CameraService: Fix dump methods for two clients

Actually write dump text into the provided FD, and add a bit more
dump data into CameraDeviceClient.

Bug: 17570762
Change-Id: I37b1db85188855d4e89c8050c4b13f0d22e07e0c
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api_pro/ProCamera2Client.cpp
137910189b005192ad4019894a970144f7377977 18-Sep-2014 Eric Laurent <elaurent@google.com> am 589e1241: am 2720c8c4: Merge "audioflinger: remove debug log." into lmp-dev

* commit '589e12415e10e291d48c19f63cb47193eb613fb0':
audioflinger: remove debug log.
2720c8c45a0040d7007239c100591b9f092b780f 18-Sep-2014 Eric Laurent <elaurent@google.com> Merge "audioflinger: remove debug log." into lmp-dev
dfdd20f46a9c6634f34418267a336dab61c31878 17-Sep-2014 Eric Laurent <elaurent@google.com> am 1385bc84: am ce250c91: Merge "audio policy: fix attached devices validation" into lmp-dev

* commit '1385bc848162539ffa29d0b1b24f4d7b83ff3b75':
audio policy: fix attached devices validation
80b617cf82e0030deef4f968a6341e2867166135 17-Sep-2014 Eric Laurent <elaurent@google.com> audioflinger: remove debug log.

Remove debug log left by commit ab5cdbaf.

bug: 17537746.
Change-Id: I10f672f607f8e87caaa8228fc05eff8aee7dfa15
udioflinger/Threads.cpp
d78f153a21868d870b14169a6928d991e4b82e73 17-Sep-2014 Eric Laurent <elaurent@google.com> audio policy: fix attached devices validation

Consider all supported devices in an io profile and
not only the first one when looking for a match with attached
devices.
Failing to do so would cause the device validation to fail
if supported devices are not declared in a specific order
in the io profile descriptor in audio_policy.conf

Bug: 17532764.
Change-Id: Id27c9192e21de7f075076e17eb8c48e7e42847f6
udiopolicy/AudioPolicyManager.cpp
c9f195b6a98900e49870d3da28be84067a76fe02 16-Sep-2014 Yin-Chia Yeh <yinchiayeh@google.com> am c15a2228: am 47e89d7d: Merge "Camera2: handle one more videosnapshot failure" into lmp-dev

* commit 'c15a22286c56ca9f6ee6452072e4c6f4a9a0ff55':
Camera2: handle one more videosnapshot failure
e716ae7a76941932535cd47ae454423dee598c1e 16-Sep-2014 Eric Laurent <elaurent@google.com> am f5e98702: am cf7863ea: Merge "audioflinger: fix pre processing effect leak" into lmp-dev

* commit 'f5e9870228db68d9cb927ff49f2e46dabfb7bbec':
audioflinger: fix pre processing effect leak
acbbcb5bf8dfb30dd387f38cd6588315f3afab2d 16-Sep-2014 Eino-Ville Talvala <etalvala@google.com> am 98a58a21: am dd5f7dc1: Merge "Camera3Device: Treat failure to idle as an error" into lmp-dev

* commit '98a58a2157ab17979d53107e8c28e14e3aa4cb7c':
Camera3Device: Treat failure to idle as an error
922ae96367e8e3be8809ce2b28c2e67f4a48497e 16-Sep-2014 Eric Laurent <elaurent@google.com> am 82bd8496: am 2a6074c4: Merge "audioflinger: send mic mute command to all audio HALs" into lmp-dev

* commit '82bd84968c06487c9da2ede05c5b50d0d18347f3':
audioflinger: send mic mute command to all audio HALs
47e89d7dcb4406b197c13764897fb28ac1e0b09b 16-Sep-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera2: handle one more videosnapshot failure" into lmp-dev
d3c5b081863ad5930971d90aee2f3a61f8424d88 15-Sep-2014 Yin-Chia Yeh <yinchiayeh@google.com> Camera2: handle one more videosnapshot failure

Handle one more corner case.
Also remove redundant re-try path.

Bug: 17484683
Change-Id: I0b3e1223f4f28022e7ec6abe028ca3c2623829de
amera/libcameraservice/api1/Camera2Client.cpp
cf7863ea8d9137aadf6bfd9756eb07ebd1c81b5c 15-Sep-2014 Eric Laurent <elaurent@google.com> Merge "audioflinger: fix pre processing effect leak" into lmp-dev
dd5f7dc1a870877c2f0cbe0b595c42b77035f9ec 15-Sep-2014 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3Device: Treat failure to idle as an error" into lmp-dev
2a6074c4f7dd6f5b85ea8d858199d4970ff404ac 15-Sep-2014 Eric Laurent <elaurent@google.com> Merge "audioflinger: send mic mute command to all audio HALs" into lmp-dev
aaa44478a373232d8416657035a9020f9c7aa7c3 13-Sep-2014 Eric Laurent <elaurent@google.com> audioflinger: fix pre processing effect leak

When a capture thread was closed, the effects attached to this thread
were left dangling and the associated effect chain destroyed.
When their last client was disconnected, the effects were not released
properly from the effect library because the destruction process could
not be completed without the effect being attached to a thread.

A similar problem prevented a RecordTrack to be properly released if
its client was destroyed after the capture thread.

The fix consists in allowing the effect or record track to be properly
released even if its parent thread cannot be promoted.

Also save any effect chain still present on a closed capture thread
in case a new client wants to reuse the effects on the same session later.

Bug: 17110064.
Change-Id: I5cd644daa357afd1f3548f9bcb28e6152d95fdb8
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Effects.cpp
udioflinger/Effects.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/TrackBase.h
udioflinger/Tracks.cpp
2f035f59d1e28728d38d18a7f0f7a9c6e8b0c11b 14-Sep-2014 Eric Laurent <elaurent@google.com> audioflinger: send mic mute command to all audio HALs

Mic mute should be sent to all audio HALs, not
only the primary HAL as telephony can use
capture devices on other HALs (e.g USB)

Bug: 17321604.
Change-Id: I658f6084d5b5cdc5a70784661d5cea0b6f81c3a9
udioflinger/AudioFlinger.cpp
bf9f051b65f37e350c5c9d7850a32b68ff3e656f 15-Sep-2014 Eino-Ville Talvala <etalvala@google.com> am cd72a5b1: am 83a23e1e: Merge "Camera1: Validate scene mode override AF mode" into lmp-dev

* commit 'cd72a5b15d8d6cfb6e567ec9465463b1d192b43b':
Camera1: Validate scene mode override AF mode
6c4d2d16ac05a5676288be7dab41761617dca765 15-Sep-2014 Zhijun He <zhijunhe@google.com> am 7f4ed6cb: am a1530f1b: Camera3: Update ZSL post-processing tags

* commit '7f4ed6cbba2ff14dfb82c9cc246957cb7e7ed93c':
Camera3: Update ZSL post-processing tags
83a23e1e1e45d9e2f5497e214796250f74aad1d4 15-Sep-2014 Eino-Ville Talvala <etalvala@google.com> Merge "Camera1: Validate scene mode override AF mode" into lmp-dev
9c8a091436052fb0f3290356abe1ac55b7bae8a2 14-Sep-2014 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Treat failure to idle as an error

Bug: 16899526
Change-Id: Ia995aac6360c9c41ed654af5a7052480f23903d8
amera/libcameraservice/device3/Camera3Device.cpp
a1530f1b16f093a91edbbbaf7dac9f9809867817 14-Sep-2014 Zhijun He <zhijunhe@google.com> Camera3: Update ZSL post-processing tags

Update ZSL processing tags according the still capture template
Also cache the request template to avoid extra cost of querying
into HAL every time.

Bug: 17463102
Change-Id: I2eeffefb0a4131c99a85dd3e4484cc6f0f025efa
amera/libcameraservice/api1/client2/ZslProcessor3.cpp
amera/libcameraservice/api1/client2/ZslProcessor3.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
264d4f59aca3a79506d238668aba42bd71714a02 14-Sep-2014 Eric Laurent <elaurent@google.com> am 9d18fd40: am 2b9530a7: Merge "audio policy: fix relative priorities of PHONE and ENFORCED_AUDIBLE" into lmp-dev

* commit '9d18fd402ec50a5cb66670d5942ca2010d429c96':
audio policy: fix relative priorities of PHONE and ENFORCED_AUDIBLE
2b9530a7287f4f470d5f2aecea4da043b7af98a7 14-Sep-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: fix relative priorities of PHONE and ENFORCED_AUDIBLE" into lmp-dev
176e4c253a63d581af6b21f3182d71b3026ef516 13-Sep-2014 Eino-Ville Talvala <etalvala@google.com> Camera1: Validate scene mode override AF mode

Don't allow uncalibrated cameras to list a fixed focus mode for
variable-focus cameras, since uncalibrated cameras cannot do INFINITY
focus.

Bug: 17492043
Change-Id: I5835efd6f21be0ebb74a9b7ea3ef5b2e7cf63e7a
amera/libcameraservice/api1/client2/Parameters.cpp
525db0d09a4d43ae16c206f82dbb2e0dd0cc4279 14-Sep-2014 Eino-Ville Talvala <etalvala@google.com> am d1d4312e: am f0b31e63: Merge "Camera: Allow larger preview resolutions in API1 for >= HALv2 devices" into lmp-dev

* commit 'd1d4312efd5d85c1faa9d4ca19bed8dfb087464f':
Camera: Allow larger preview resolutions in API1 for >= HALv2 devices
f0b31e6333839972afb2e374f6d8824180d29fc2 13-Sep-2014 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Allow larger preview resolutions in API1 for >= HALv2 devices" into lmp-dev
4d97b612cd33216daf9972a6b881245014fd1e48 13-Sep-2014 Zhijun He <zhijunhe@google.com> am 1c1731b3: am 0e40a839: Merge "Camera2: fix 4K recording" into lmp-dev

* commit '1c1731b3d5dcc8fa309a6eec688ee9fe75763b8b':
Camera2: fix 4K recording
a4c95a6bc3b801bf41ca841440e9124f947e53fe 13-Sep-2014 Eino-Ville Talvala <etalvala@google.com> Camera: Allow larger preview resolutions in API1 for >= HALv2 devices

Limit preview resolutions to a max of 1920x1920 instead of 1920x1080p,
so that any aspect ratio with a 1920 as the larger dimension can be used.

Also improve the initial preview/video size selection logic, to ensure
that the selected size is both a valid preview and video size, and not
too large.

Bug: 17458832
Change-Id: Iea006fadb5fbf0f03d23c3c5babb5b3611469688
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
0e40a83936d42a34788bbce1c113c404d727fe47 13-Sep-2014 Zhijun He <zhijunhe@google.com> Merge "Camera2: fix 4K recording" into lmp-dev
a53021f776d0c82271727e5817388936513feb92 12-Sep-2014 Yin-Chia Yeh <yinchiayeh@google.com> Camera2: fix 4K recording

Bug: 17484683
Change-Id: I09bb12698057555329286c777102b9b310452fb3
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/Camera2Client.h
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
amera/libcameraservice/api1/client2/StreamingProcessor.h
c41fd8f3e3f8b840fbcc05f6711a4a4cedc68ff4 13-Sep-2014 Eric Laurent <elaurent@google.com> am b3fac1c3: am 61cd63a5: Merge "audio policy: fix check in creaateAudioPatch()" into lmp-dev

* commit 'b3fac1c31c3c8e98c49c5443df1a127611d6bf18':
audio policy: fix check in creaateAudioPatch()
966095ea014bc0f6ae9f523ee7f37f2fed2faeb5 09-Sep-2014 Jon Eklund <jeklund@motorola.com> audio policy: fix relative priorities of PHONE and ENFORCED_AUDIBLE

ENFORCED_AUDIBLE should only be highest priority if system tones
are being forced. Otherwise it should behave like SONIFICATION.

Bug: 17474485.

Change-Id: Ia651779870d51100cc3179c96fa09694bc691ba7
udiopolicy/AudioPolicyManager.cpp
50a074c62573d4b79a059e6f562a9b266a4bc2fa 13-Sep-2014 Igor Murashkin <iam@google.com> am 6dcfb104: am e293c71c: Merge "camera: add latest parameters to dumpsys for api1 cameras" into lmp-dev

* commit '6dcfb104bc1451a5c6fec06ad1439ef3e3c31061':
camera: add latest parameters to dumpsys for api1 cameras
61cd63a51c87dde24c9b163033937fa304864512 13-Sep-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: fix check in creaateAudioPatch()" into lmp-dev
58f8eb7ae0ee400585bce6682a7212575115e758 13-Sep-2014 Eric Laurent <elaurent@google.com> audio policy: fix check in creaateAudioPatch()

Bug: 17488759.
Change-Id: I9dd2c3ca7f83de4b3573f4fb0e9934e1bc37c3bc
udiopolicy/AudioPolicyManager.cpp
e293c71cee0d00cda005baf5d0c2faa034812b7a 13-Sep-2014 Igor Murashkin <iam@google.com> Merge "camera: add latest parameters to dumpsys for api1 cameras" into lmp-dev
5faa9ed72895ade8305109d77279f848ae69fa43 12-Sep-2014 Yin-Chia Yeh <yinchiayeh@google.com> am e8b47c66: am f2a74aad: Merge "Camera2: improve ZSL candidate selection logic" into lmp-dev

* commit 'e8b47c667ca32631bfc284e4a401d6783ffbc374':
Camera2: improve ZSL candidate selection logic
20766f06c032f90febb2ef079715bf10326d4d98 12-Sep-2014 Yin-Chia Yeh <yinchiayeh@google.com> am 1decb3a9: am 095da43d: Merge "camera2: skip capture result after clearZslQueue" into lmp-dev

* commit '1decb3a9c4a98232c2ffa940b0d89d47c8d3571e':
camera2: skip capture result after clearZslQueue
e9923dca4b7f49e7f127ac4bfa5bbe9eda6acea3 12-Sep-2014 Eric Laurent <elaurent@google.com> am e21b7cd8: am 2f875dc8: Merge "AudioPolicyManager: Use "safe" speaker for notifications if available" into lmp-dev

* commit 'e21b7cd8feb7e9468c932609c53a114b1680a012':
AudioPolicyManager: Use "safe" speaker for notifications if available
f2a74aad5efc01e5b9939c7cbbfde058ce64bfec 12-Sep-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera2: improve ZSL candidate selection logic" into lmp-dev
095da43dfe840f28d8c026710644a97d9b7805bf 12-Sep-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "camera2: skip capture result after clearZslQueue" into lmp-dev
6b7a2294b9e4da784cfe4b562ee1720ad606c852 09-Sep-2014 Yin-Chia Yeh <yinchiayeh@google.com> camera2: skip capture result after clearZslQueue

After ZSL queue is cleared, don't add capture result to ZSL queue
if its corresponding buffer has been cleared.

Bug: 17185356
Change-Id: Iddac39ab09b2560e2ce9390895927217c1736d5a
amera/libcameraservice/api1/client2/ZslProcessor3.cpp
amera/libcameraservice/api1/client2/ZslProcessor3.h
amera/libcameraservice/device3/Camera3ZslStream.cpp
amera/libcameraservice/device3/Camera3ZslStream.h
amera/libcameraservice/gui/RingBufferConsumer.cpp
amera/libcameraservice/gui/RingBufferConsumer.h
fcf5fea2ac99e6359998078d09fd7e21269dca4a 11-Sep-2014 Igor Murashkin <iam@google.com> camera: add latest parameters to dumpsys for api1 cameras

Bug: 17290106
Change-Id: I08ac1659d0367613c37669d5bf6e6bf7b2b63bc2
amera/libcameraservice/api1/CameraClient.cpp
amera/libcameraservice/api1/CameraClient.h
dec84fb1c687509c3125acac76e0af80e4e0afbd 11-Sep-2014 Yin-Chia Yeh <yinchiayeh@google.com> Camera2: improve ZSL candidate selection logic

1. Clear ZSL queue when focus mode is changed and autoFocus is
cancelled.
2. Do not check focus state is focus mode is fixed.

Bug: 17185356
Change-Id: I2cb10fb457b080f0db950c894e56995f638e147b
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/client2/ZslProcessor3.cpp
amera/libcameraservice/api1/client2/ZslProcessor3.h
940c794be4d939d8ac3f1f3a279bbdfc04a54643 11-Sep-2014 Ruben Brunk <rubenbrunk@google.com> am b788e3d3: am 4bcbb07b: Merge "camera2: Fix video snapshot for HAL 2.* devices." into lmp-dev

* commit 'b788e3d3bb54b7f133c5b501d60054995bfd9b82':
camera2: Fix video snapshot for HAL 2.* devices.
11c9fb1f90cc786485a53aeb1d31ec1ad1dbf840 23-Jun-2014 Jon Eklund <jeklund@motorola.com> AudioPolicyManager: Use "safe" speaker for notifications if available

On particularly loud devices, unexpected audio bursts can be harmful.
For longer audio events, the conventional mitigation strategy is to
somehow soft-start (ramp) the loudspeaker volume, but this strategy
can severely impact the audibility of short audio events.

Use of the "safe" speaker path hints to AudioHAL to immediately output
at best allowable level for transient audio events.

SPEAKER_SAFE is aliased to SPEAKER for purposes of volume control.

Bug: 17319721
Change-Id: I75187c23f3d1f18e9f638c5d14e7b0bf805a67bc
udiopolicy/AudioPolicyManager.cpp
4bcbb07be57947ea1421519094f73577b1e263e6 10-Sep-2014 Ruben Brunk <rubenbrunk@google.com> Merge "camera2: Fix video snapshot for HAL 2.* devices." into lmp-dev
13f90db44d75313d1eed242a23aaf00b9efa0a68 10-Sep-2014 Eric Laurent <elaurent@google.com> am 5bec1b72: am c99d333f: Merge "audioflinger: fix audio patch release" into lmp-dev

* commit '5bec1b725df12905e86c35ea142b3a628b266a6c':
audioflinger: fix audio patch release
f8fd8d6daab5ced86ce950be68070d27c24d487f 10-Sep-2014 Eric Laurent <elaurent@google.com> audioflinger: fix audio patch release

Fix error in PatchPanel:releaseAudioPatch() causing
the wrong patch handle to be passed to the audio HAL.

Bug: 17368621.
Change-Id: I037fd2e6273508c830414b5900d07c0178b96dae
udioflinger/PatchPanel.cpp
6551e1ede59f4a3043fb141159ca67bd2c85a911 10-Sep-2014 Ruben Brunk <rubenbrunk@google.com> camera2: Fix video snapshot for HAL 2.* devices.

Bug: 15408128

- Lazily destroy ZSL stream when ZslProcessor is updated, or
when the camera client is disconnected, allowing HAL 2.*
devices that rely on the ZSL stream to capture video snapshots
to function correctly.

Change-Id: Ia5cf14c62acda4d9c640440dc5b8e0796dc0b3fa
amera/libcameraservice/Android.mk
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/client2/ZslProcessor.cpp
amera/libcameraservice/api1/client2/ZslProcessor.h
amera/libcameraservice/api1/client2/ZslProcessorInterface.cpp
amera/libcameraservice/api1/client2/ZslProcessorInterface.h
3380b5a936cc52683c4c460baa7a77c4a6e035cc 09-Sep-2014 Eric Laurent <elaurent@google.com> am 3a85e7b1: am 9f8551ff: Merge "audio policy: fix output stream selection" into lmp-dev

* commit '3a85e7b1fb12e6b15bca87400751a7558b4d257c':
audio policy: fix output stream selection
9f8551ffa967bd8a4d0a52487a183dcf8b22d91f 09-Sep-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: fix output stream selection" into lmp-dev
8838a3895c365d443ee22e169ccf45956780c081 09-Sep-2014 Eric Laurent <elaurent@google.com> audio policy: fix output stream selection

Make sure that all outputs considered by selectOutput()
when called from AudioPolicyManager::getOutputForDevice()
support the requested audio format.

Bug: 17340382.
Change-Id: I76520ce60e9a8fe4d2d23125d6143bb016522754
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
a766ce509cce0e97864e52b49e4576f1a378166b 08-Sep-2014 Yin-Chia Yeh <yinchiayeh@google.com> am 08771725: am 6d61a4f8: Merge "Camera2: reconfigure video snapshot size if needed" into lmp-dev

* commit '087717253dcddb41c02dfcb53f1ae2869b308187':
Camera2: reconfigure video snapshot size if needed
6d61a4f8a2fd63a5b906572e586a3e1c6ebfa8af 08-Sep-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera2: reconfigure video snapshot size if needed" into lmp-dev
f4207cd4024e421bf51e5cd1457dd454f52be68a 08-Sep-2014 Glenn Kasten <gkasten@google.com> am b12d6a17: am 62ce2072: Merge "Make IPowerManager native conform to .aidl for oneway" into lmp-dev

* commit 'b12d6a17d33141789c974e3bd3eacfcb0be1c1e3':
Make IPowerManager native conform to .aidl for oneway
62ce207291353a13dd722855102e99684259a517 08-Sep-2014 Glenn Kasten <gkasten@google.com> Merge "Make IPowerManager native conform to .aidl for oneway" into lmp-dev
3ea3fcd0822b2f43d87f1d8f67d7bf145864b201 05-Sep-2014 Yin-Chia Yeh <yinchiayeh@google.com> Camera2: reconfigure video snapshot size if needed

When recording fails to start due to stream configuration failed,
try configure stream again by setting jpeg stream to video size.

Bug: 16162133
Change-Id: Ib20271e787ae07719ce419f0b15c7f86434f7ebb
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Stream.cpp
8636d03dd14fa996bb0f8bf2f4714319173d886e 08-Sep-2014 Eric Laurent <elaurent@google.com> am d8ec8e3d: am 2e97b01c: Merge "audiopolicy: fix direct output profile probing" into lmp-dev

* commit 'd8ec8e3db145ae81c0958527bbe48b0dd7a78181':
audiopolicy: fix direct output profile probing
2e97b01cecec65e690ac7da5df9433c52ff75bd8 08-Sep-2014 Eric Laurent <elaurent@google.com> Merge "audiopolicy: fix direct output profile probing" into lmp-dev
828bcffa0d5f73461c6c1ba4ef6d3da704c27b7e 07-Sep-2014 Eric Laurent <elaurent@google.com> audiopolicy: fix direct output profile probing

Do not select maximum sampling rate and channel count
when opening a direct output for the first time
to make sure that the combination of sampling rate
and channel count is supported by the connected sink.

Bug: 17047809.
Change-Id: I077a3c1436158378f2762343469ceb39fab9775e
udiopolicy/AudioPolicyManager.cpp
ec61911dbcde30d62a03c040415a613b5913eaf9 06-Sep-2014 Jungshik Jang <jayjang@google.com> am 73fe338d: am cb16968f: Merge "Fix "invalid device combination" in system audio mode." into lmp-dev

* commit '73fe338db8332a9462b9ae872d4bae66e2322622':
Fix "invalid device combination" in system audio mode.
cb16968f593e4d58857c693c8ec6f2d2337f5512 06-Sep-2014 Jungshik Jang <jayjang@google.com> Merge "Fix "invalid device combination" in system audio mode." into lmp-dev
3abc2ded40066f3b1df23aceb553f22d569c5cd3 06-Sep-2014 Glenn Kasten <gkasten@google.com> Make IPowerManager native conform to .aidl for oneway

But provide a temporary escape hatch for AudioFlinger.
This oneway option will be removed as soon as possible.

Bug: 16408906
Change-Id: I058a50906af810787e444a96819cb781b7f639ad
udioflinger/Threads.cpp
ea99d46d955bf9489271a303f8bc2c068888a75f 06-Sep-2014 Zhijun He <zhijunhe@google.com> am d1376449: am 3c15d9b1: Merge "Camera API1: fix AE state check in precapture state" into lmp-dev

* commit 'd13764495c9c2676bd22ca33ea17c874d078b61a':
Camera API1: fix AE state check in precapture state
3c15d9b12394c62b58ab101c958e354f2c2bea19 05-Sep-2014 Zhijun He <zhijunhe@google.com> Merge "Camera API1: fix AE state check in precapture state" into lmp-dev
615080f60725ae5bc52d20950e2ca61b54bd8600 05-Sep-2014 Eric Laurent <elaurent@google.com> am 03a9ef73: am f2a2d0d6: Merge "audio policy service: filter out delayed audio patch commands if needed." into lmp-dev

* commit '03a9ef73dd1059c92740c271d300b899b7030498':
audio policy service: filter out delayed audio patch commands if needed.
f2a2d0d6731174f5ce2a7b9d6dfd96dd7f1727a4 05-Sep-2014 Eric Laurent <elaurent@google.com> Merge "audio policy service: filter out delayed audio patch commands if needed." into lmp-dev
e45b48aba115f4daf4a4aad31b6a95df9b79f463 05-Sep-2014 Eric Laurent <elaurent@google.com> audio policy service: filter out delayed audio patch commands if needed.

As for set parameters commands, create or release audio patch commands
modifying the same patch handle should be filtered by the audio policy service
command thread so that an immediate command is not overridden by
a pending delayed command.

Bug: 17379728.

Change-Id: I6aa4652b4bfec59eebd3c3cb7d1d9ac1bc1d6e49
udiopolicy/AudioPolicyService.cpp
a1f9917243caafd1da5fa743c6fda1d0614ed167 05-Sep-2014 Jungshik Jang <jayjang@google.com> Fix "invalid device combination" in system audio mode.

HDMI-CEC system audio mode removes speaker from output
list. It also has multiple outputs by connected outputs.
However, getDeviceForVolume() doesn't cover multiple
output with no speaker or bluetooth case.
This change picks one of system audio outputs in order.

Bug: 17400026
Change-Id: I102fd0052c9c4c9543f9e8f3b16ec6815d7485d8
udiopolicy/AudioPolicyManager.cpp
e8339fb87364469feb1f2cbda92889efecb79a7c 03-Sep-2014 Zhijun He <zhijunhe@google.com> Camera API1: fix AE state check in precapture state

It is legal to transit to CONVERGED or FLASH_REQUIRED after a AE precapture
trigger.

Bug: 17365185
Change-Id: Id041eff5eac564c32d09b547a0139d24807336f4
amera/libcameraservice/api1/client2/CaptureSequencer.cpp
648c1ecee3f79ff9d754dd982be59484de08d752 03-Sep-2014 Glenn Kasten <gkasten@google.com> am 955d8f90: am 23c8cf95: Merge "Restore the ability to build tee sink for debugging" into lmp-dev

* commit '955d8f906e920fe8da66e7943a7f2bfa98422e19':
Restore the ability to build tee sink for debugging
23c8cf958b1a756d5e0c78c46eac676676be4fdd 03-Sep-2014 Glenn Kasten <gkasten@google.com> Merge "Restore the ability to build tee sink for debugging" into lmp-dev
9d1cad2ba6a35168fa27a322518150193f19e53b 03-Sep-2014 Eric Laurent <elaurent@google.com> am 3d640e0a: am 97d547da: audio flinger: fix use of global effect buffer

* commit '3d640e0a93e31bb53e671ed467774b63bb69750e':
audio flinger: fix use of global effect buffer
97d547da43c9c41711d1ed1e3f4fa87c2ee3cb9a 02-Sep-2014 Eric Laurent <elaurent@google.com> audio flinger: fix use of global effect buffer

When float mixing format is enabled, audio effects use a specific
buffer in 16 bit format. This buffer was not enabled when only
global effects were present resulting in the mixer accumulating directly
to the output sink buffer.

Bug: 16202259.
Change-Id: I3537d36c63196d97772f0ab22dd31d04dfa7fdd6
udioflinger/Threads.cpp
329f6511ee4e03a4605c70bbda8d3a96d2544884 29-Aug-2014 Glenn Kasten <gkasten@google.com> Restore the ability to build tee sink for debugging

This changelist does not enable tee sink, but makes it possible to do so.
Tee sink had suffered some bit rot since it is not built by default.

Also fixes a crash for > 2 byte per sample or > 2 channels.
Still does not write correct header for floating-point;
that will be best solved by moving to libsndfile.

Bug: 16990102
Change-Id: I8e92c588ccc513d7802d696fcfb324e815772df6
udioflinger/AudioFlinger.cpp
udioflinger/FastMixer.cpp
udioflinger/Tracks.cpp
3b75618d86159be2461baf495388d29e9651b632 02-Sep-2014 Ruben Brunk <rubenbrunk@google.com> am b3b4f875: am b72726ba: Merge "camera1: Ensure MemoryHeap buffers are mmapped before copying." into lmp-dev

* commit 'b3b4f8758f5cc384c9464f56bdd38b279eedc52b':
camera1: Ensure MemoryHeap buffers are mmapped before copying.
b72726bad6c9253c26c82fea76bdf99e18b8ba6d 02-Sep-2014 Ruben Brunk <rubenbrunk@google.com> Merge "camera1: Ensure MemoryHeap buffers are mmapped before copying." into lmp-dev
65e01f763571b779fbc759e6f96d0a195b94c6da 30-Aug-2014 Ruben Brunk <rubenbrunk@google.com> camera1: Ensure MemoryHeap buffers are mmapped before copying.

Bug: 16986293
Change-Id: Icb68254d7ed1812fa9e60342749a2746d6fcfb17
amera/libcameraservice/api1/CameraClient.cpp
167f561c1f53b909ff043ea8dd67ae78a3e9fd5a 29-Aug-2014 Eric Laurent <elaurent@google.com> am 50ae18d3: am 4030b561: Merge "sound trigger: fix cross deadlock between service and client" into lmp-dev

* commit '50ae18d38005489b5c3e99610118507bc89ec84e':
sound trigger: fix cross deadlock between service and client
93874d95327157b898dde6094438b4614c032652 29-Aug-2014 Eric Laurent <elaurent@google.com> am 8b747c28: am 9a63396f: Merge "audio policy: fix input source passed to openInput()" into lmp-dev

* commit '8b747c28f84abcec7aa7e672d0450d4ddceefb1e':
audio policy: fix input source passed to openInput()
1acd3c428d7085345709cecf0789687c54633cc0 29-Aug-2014 Dmitry Shmidt <dimitrysh@google.com> am f6de317d: am 7fa42078: Merge "audiopolicy: Indicate output device change to all input threads for pre-processing" into lmp-dev

* commit 'f6de317dad8fef9a16cbbcd9c0f490dc4bb6504e':
audiopolicy: Indicate output device change to all input threads for pre-processing
4030b56153b398a96269522344e5be485f821b95 29-Aug-2014 Eric Laurent <elaurent@google.com> Merge "sound trigger: fix cross deadlock between service and client" into lmp-dev
9a63396f70880772e551e1e4c38f27c635612083 29-Aug-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: fix input source passed to openInput()" into lmp-dev
1f6b5c38ba0d2545bdb7b0d8fa9619fda813a543 29-Aug-2014 bryant_liu <bryant_liu@htc.com> am 2725169a: am 890a5637: frameworks: av: AudioPolicyEffect: Add refCount for each session

* commit '2725169aa7e5c18cf8b5b20a14b1153bb9073b38':
frameworks: av: AudioPolicyEffect: Add refCount for each session
79e045c59fb1bdf94558a7799bf3de9d456efa36 29-Aug-2014 Eino-Ville Talvala <etalvala@google.com> am d6c3c431: am 8b250cb6: Merge "CameraService: Create a dummy stream when 0 streams are requested." into lmp-dev

* commit 'd6c3c431efc01a27caa27043724cbcef14199805':
CameraService: Create a dummy stream when 0 streams are requested.
886561f06ddaea86a51def1e918367430240b5ac 29-Aug-2014 Eric Laurent <elaurent@google.com> sound trigger: fix cross deadlock between service and client

Do not call callback methods on ISoundTriggerClient with the service mutex
locked: the client implementation will lock its mutex to process
the callback and if a request from the same client with client
mutex locked was waiting for the service mutex a deadlock occurs.

Bug: 16873049.
Change-Id: Ifc3b31fdfaed525981fa59876c041478f38b42e8
oundtrigger/SoundTriggerHwService.cpp
1c9c2cc4b170b79a83433749808e286eb0fcc449 29-Aug-2014 Eric Laurent <elaurent@google.com> audio policy: fix input source passed to openInput()

The input source passed to openInput() must be
modified from HOTWORD to VOICE_RECOGNITION if the capture does not
correspond to a sound trigger session.

Bug: 16731718.
Change-Id: I48aa4180e75dd5335cd096b48da1c15f2236e6ed
udiopolicy/AudioPolicyManager.cpp
f5e7e79bf88b0c08c73262e7992634797a4f81a1 19-Aug-2014 bryant_liu <bryant_liu@htc.com> audiopolicy: Indicate output device change to all input threads for pre-processing

Bug: 17129715

Change-Id: I1fd938cce0b85241c80ea00f3d013a98948d3975
udiopolicy/AudioPolicyManager.cpp
890a5637b3e3eb197fd2c7f5deec816c7feb13fc 20-Aug-2014 bryant_liu <bryant_liu@htc.com> frameworks: av: AudioPolicyEffect: Add refCount for each session

Audio framework stops and restarts AudioTracks on same audio session.
Sometimes the AudioTrack start() comes before a stop(). As effects
are linked to the session, they should only be created on the last
stop() related to that session.

Bug: 17201117

Change-Id: I19343e293d6b7b6b794fe05ebd0dd239ed3b075c
udiopolicy/AudioPolicyEffects.cpp
udiopolicy/AudioPolicyEffects.h
8b250cb67d0cab6234c0e8e0e21342d03c1eca5d 29-Aug-2014 Eino-Ville Talvala <etalvala@google.com> Merge "CameraService: Create a dummy stream when 0 streams are requested." into lmp-dev
16a2ada049447c156648812b94d25be07869f284 27-Aug-2014 Eino-Ville Talvala <etalvala@google.com> CameraService: Create a dummy stream when 0 streams are requested.

A workaround for a camera device HAL v3.2 or older specification hole - it's
not acceptable to configure_streams with 0 output streams. However, we allow for
this at the public API level, to allow an application to release all output streams.

So in this case, create a dummy stream that doesn't actually do anything as a placeholder.

Bug: 17220694
Change-Id: Ib25242ffc2c9f2b2f619fd5fe6d652266579da85
amera/libcameraservice/Android.mk
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3DummyStream.cpp
amera/libcameraservice/device3/Camera3DummyStream.h
c1f1435ed8c9c7df42ad5dc621412fc7cc9d4633 28-Aug-2014 Paul McLean <pmclean@google.com> am 131ff148: am 8962e08c: Merge "Fix audio dropouts with multiple playback streams." into lmp-dev

* commit '131ff14853a45beb336cdd39b5ebfe51647272c0':
Fix audio dropouts with multiple playback streams.
8962e08c4989368d2c821b64f42632b6f5fb016e 28-Aug-2014 Paul McLean <pmclean@google.com> Merge "Fix audio dropouts with multiple playback streams." into lmp-dev
f71047f70ccdab19a874c9127dd465ff84e871f7 28-Aug-2014 Eric Laurent <elaurent@google.com> am dca12b44: am 47f64f2e: Merge "audio policy: remove audio patch when closing input or output" into lmp-dev

* commit 'dca12b44dd67ac074674888a91d08c83add2324a':
audio policy: remove audio patch when closing input or output
47f64f2ed14839a00b3b148d490dc0394282eb54 28-Aug-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: remove audio patch when closing input or output" into lmp-dev
33a8ba2c68d96ca56a4cf5a1b17e9a355759a147 28-Aug-2014 Yin-Chia Yeh <yinchiayeh@google.com> am 1c1688e5: am 01b9256a: Merge "cameraservice: decrease zsl metadata queue size by 1" into lmp-dev

* commit '1c1688e50629cc8b2b73b382dd673dfa4294c4bc':
cameraservice: decrease zsl metadata queue size by 1
0d0f58d153579c64406fe46a1d9091b1cf98912b 28-Aug-2014 Zhijun He <zhijunhe@google.com> am 19f0e163: am 13d98f41: Merge "Camera API1: Fix ZSLProcessor3 deadlock" into lmp-dev

* commit '19f0e163b74bf426912bf66b7527111830891539':
Camera API1: Fix ZSLProcessor3 deadlock
05b90f833337ab5f7b16509e5f1d339a04eb5bf6 28-Aug-2014 Eric Laurent <elaurent@google.com> audio policy: remove audio patch when closing input or output

Make sure that an audio patch having an output as source or input as sink
is removed when this input or output is closed.

Bug: 17303725.

Change-Id: I234d54a25ce0b579eeeafdcfda3a0594f048768c
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
01b9256a1358110ed718c1a83c2a1808d4afbb92 28-Aug-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "cameraservice: decrease zsl metadata queue size by 1" into lmp-dev
13d98f419c614c5d389b06232ff99f7fe00dabf7 28-Aug-2014 Zhijun He <zhijunhe@google.com> Merge "Camera API1: Fix ZSLProcessor3 deadlock" into lmp-dev
5487fd54f344c422be089217e62098545704bb03 28-Aug-2014 Zhijun He <zhijunhe@google.com> Camera API1: Fix ZSLProcessor3 deadlock

ZSLProcessor3 shouldn't acquire mInputMutex in onBufferReleased call for output
buffers, because the caller (Camera3Stream::returnBuffer) holds the camera3
stream lock already. This could cause deadlock for ZSL reprocess request as it
holds the ZSLProcessor3 input lock and try to acquire camera3 stream lock to
submit the request.

Bug: 17299038
Change-Id: I6a7bf8ebd7c2064852358c655f3a3e9a67769213
amera/libcameraservice/api1/client2/ZslProcessor3.cpp
5c477aa6205e2ebafec237411900d89a510cc105 21-Aug-2014 Paul McLean <pmclean@google.com> Fix audio dropouts with multiple playback streams.

Bug 17136569

Change-Id: I7f69cb24168c7d27ce28679735f53c1ece4014c1
udiopolicy/AudioPolicyManager.cpp
690895cfe0f128ee3fc375a357ab99b0b98394b6 27-Aug-2014 Yin-Chia Yeh <yinchiayeh@google.com> cameraservice: decrease zsl metadata queue size by 1

Zsl buffer needs to be longer than metadata queue to ensure that
oldest metadata can always find a match in buffer queue.
Since we don't want to add memory overhead, decrease metadata
queue size by one serves the same purpose.

bug 17264283

Change-Id: Ic53441cc29c98e57d3345f5845d92839d0ce6faf
amera/libcameraservice/api1/client2/ZslProcessor3.cpp
258827c2a957a7e34707a678cd8ae99422f8e91a 27-Aug-2014 Eino-Ville Talvala <etalvala@google.com> am 599e09a0: am 1754351d: CameraService: Correct API2 error handling

* commit '599e09a0a559143a2337722e53e6e46cb5f6af3e':
CameraService: Correct API2 error handling
059a103a0d8abfc147a47ce5b82ea87b12aab598 27-Aug-2014 Marco Nelissen <marcone@google.com> am dd801765: am 60ffbe05: Merge "Fix memory leak in getConnectionState" into lmp-dev

* commit 'dd8017650749ac8d133df9a482540ddc1a25a975':
Fix memory leak in getConnectionState
1754351d9199721e7e7943461689e399ef015260 06-Aug-2014 Eino-Ville Talvala <etalvala@google.com> CameraService: Correct API2 error handling

- Add more error codes to the binder camera2 callbacks
- Translate HAL errors to callback errors
- When flushing, report failures for queued requests
- Treat stream config failure as nonfatal
- Send request errors when buffers aren't available for captures

Bug: 15524101
Bug: 14448494
Bug: 11272459
Bug: 17160301
Change-Id: I81aa54e805a9cce1cb8a6a9374549daa7666deb2
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3Stream.cpp
amera/libcameraservice/device3/Camera3Stream.h
amera/libcameraservice/device3/Camera3StreamInterface.h
60ffbe05857b7583f4c70c31914947476a908b5b 27-Aug-2014 Marco Nelissen <marcone@google.com> Merge "Fix memory leak in getConnectionState" into lmp-dev
ecd03ba3f02177652351f559ff18afcce8ddc651 27-Aug-2014 Glenn Kasten <gkasten@google.com> Merge "Clear the timestamp latch valid flag if no new timestamp available"
9dd4a2ddd7caf8cbe50d8a76e0ec3e0274d2bce6 27-Aug-2014 Andy Hung <hunga@google.com> Merge "Fix AudioMixer MONO muted track handling" into lmp-dev
961ec21a5878517ce6db27bad8da269637c45a44 26-Aug-2014 Marco Nelissen <marcone@google.com> Fix memory leak in getConnectionState

Turns out having an sp<> point at the containing object doesn't really
work so well.

Bug: 17210991
Change-Id: I4bcb0c38adffc574d661f0772583357868f6c5b4
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
efaa7ab620b2ee936efa4fb74dc4c670ed757a46 20-Aug-2014 Glenn Kasten <gkasten@google.com> Clear the timestamp latch valid flag if no new timestamp available

Bug: 11815245
Change-Id: I94885a1b4c2c7c055b8eacc7f7d0fcd064094b6d
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
395db4bfa5b43a839f95632676d59cde99a9840d 26-Aug-2014 Andy Hung <hunga@google.com> Fix AudioMixer MONO muted track handling

Incorrect handling caused "stereo" mode to be used.
Augmented error handling to print more debug info.

Bug: 17208475
Change-Id: I5bcaf0ba5bd5a4f7d4885f8cce43bbf42e5f1e6b
udioflinger/AudioMixer.cpp
61deb78a8a608955e120469ea7a5d39e652b2ae8 22-Aug-2014 Zhijun He <zhijunhe@google.com> Camera API1: remove unnecessary buffer count check

This check doesn't work with ZSL use case. Since the ZSL is both an input and
output stream, When an input buffer is acquired, checking the handout buffer
count for that stream could trigger false alarm when all the output buffers
are sent to hal, instead, we should wait for an output buffer to return.

Bug: 17188380
Change-Id: I7eb166eb49d2f063189d993195ef389d2cf4f2b4
amera/libcameraservice/device3/Camera3IOStreamBase.cpp
fa1fc7086313f2f1868cae4c1a5698e592a437cb 22-Aug-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: fix triggerId logic" into lmp-dev
1da8c89a9d4a2319bb939771e43960c118445329 22-Aug-2014 Igor Murashkin <iam@google.com> Merge "camera: Configure streams immediately when API2 does configuration" into lmp-dev
c00a25ccce0734bf5627cf02d0c4fb3cf051ce15 21-Aug-2014 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix triggerId logic

Fix missing triggerId introduced by previous cleanup change.

bug 17108154
bug 17053130

Change-Id: Ifda55d5fbe992d98f335a8427aa256d78a856586
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
0e522ed229053c7d0238425e407431fc08cd7c63 21-Aug-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "camera: zsl: remove AF check if no focser presents" into lmp-dev
754fb0225369123ef6e369fd91c48071dcf6057c 21-Aug-2014 Yin-Chia Yeh <yinchiayeh@google.com> camera: zsl: remove AF check if no focser presents

If there is no focuser, don't check AF state while picking ZSL
candidate frames.

bug 17164077

Change-Id: Ib56e260249dcfb1b3bafea22abeb3abeae4e2c1a
amera/libcameraservice/api1/client2/ZslProcessor3.cpp
amera/libcameraservice/api1/client2/ZslProcessor3.h
e2d167eb689d7a536805f950c31f11b9e9c578ae 20-Aug-2014 Igor Murashkin <iam@google.com> camera: Configure streams immediately when API2 does configuration

This makes the configuration more eager (no more waiting until the first
request) and also allows any errors to immediately be sent back to the
client.

Bug: 16629195
Change-Id: I0c365bc8f760466916dcc089217a43c43f9f4c9d
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device2/Camera2Device.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
97c7fa1b1596a062147f034a2b44781193c052cf 19-Aug-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "cameraservice: update supportedFocusModes for api1" into lmp-dev
1b786a35ddd072765348eee2bffa2009c1b14da3 19-Aug-2014 Eino-Ville Talvala <etalvala@google.com> Merge "camera: Fix setParameters for Preview FPS single/range values" into lmp-dev
0b88a62d4d5ac1e515721e587cdf9bcec191812b 19-Mar-2014 Igor Murashkin <iam@google.com> camera: Fix setParameters for Preview FPS single/range values

As a workaround, duplicate CameraParameters into CameraParameters2 to
prevent ABI break for some camera HALs that directly link into
CameraParameters.

CameraParameters2 implements the real fixes needed in the framework,
while CameraParameters is left in to satisfy older camera HALs.

Bug: 12609188
Bug: 16654949
Change-Id: I82ea6f5de2183dd046d4bf5683600c97f37ab4da
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
735f45fbc37d7905ffb722f40727edbed82319b7 19-Aug-2014 Glenn Kasten <gkasten@google.com> Fix memory access error due to race during fast track removal

Bug: 16205169
Change-Id: Ie15ec2a737b6ddd16b2d26030d01564ff70177f5
udioflinger/Threads.cpp
c758f2276f9f9fca9ea24a6647361726acb03646 20-Aug-2014 Igor Murashkin <iam@google.com> camera: hal3: Remove register_stream setprop check

camera3_device_t::register_stream must always be NULL in HAL3.2+ cameras

Bug: 13914251
Change-Id: I116ee71135a827c8b4db61cd91f56ba56da3f0ef
amera/libcameraservice/device3/Camera3Stream.cpp
a858ea0495c887621a2fd9c0afc13780deccb597 19-Aug-2014 Igor Murashkin <iam@google.com> camera: Allow shutter sounds to be disabled from camera2 api

When using the connectLegacy binder interface (available only
through an @hide java api), then consider the camera to be in the
camera2 api legacy mode.

In legacy mode, allow disabling the shutter sound unconditionally.

Bug: 17109582
Change-Id: Ieb3fc61ff111d792cc657c018e278349c25472cf
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/Camera2Client.h
amera/libcameraservice/api1/CameraClient.cpp
amera/libcameraservice/api1/CameraClient.h
80ef94b5a7daa2d48ca72501e335a648dc67bc1d 14-Aug-2014 Yin-Chia Yeh <yinchiayeh@google.com> cameraservice: update supportedFocusModes for api1

Do not list infinity focus mode if the focuser is not calibrated.

bug 13933979

Change-Id: I677ed22305703ac09eeaf986f5bc2a680cececd8
amera/libcameraservice/api1/client2/Parameters.cpp
47bf8d8f0242bbe9cfa777c96e41e5fcd5294ee4 13-Aug-2014 Jean-Michel Trivi <jmtrivi@google.com> Merge "audiopolicy: add dump for audio patches" into lmp-dev
49d00ad9164ea5ce48c85765a2b6460d9b457d38 21-Jul-2014 Glenn Kasten <gkasten@google.com> Fix overruns when capturing with resampling

Bug: 16658148
Change-Id: I2dd04b23a143e0948b299d408790e7a46b5a53b0
udioflinger/Threads.cpp
ca05eb4b0194bb9b37a5261fa91f89add7a6df53 12-Aug-2014 Zhijun He <zhijunhe@google.com> Merge "Camera API1: Ignore the video size change during recording" into lmp-dev
c572362427cdfda53142ad0b44818c269c1d9db1 11-Aug-2014 Zhijun He <zhijunhe@google.com> Camera API1: Ignore the video size change during recording

Ignore the video size parameter change when recording is active.

Bug: 16524513
Change-Id: I55b7c961c06199764486f48bc2187838c2279606
amera/libcameraservice/api1/client2/Parameters.cpp
e7a1737c92cf2e84754ffbc52cfec8edeffcbc75 12-Aug-2014 Ricardo Garcia <rago@google.com> Merge "Fix to support mono in effect buffer allocation." into lmp-dev
726b6a7540ac997928df1a14dfede872a82f6210 11-Aug-2014 Ricardo Garcia <rago@google.com> Fix to support mono in effect buffer allocation.

Since effects are now enabled for recording, mono cases are possible
and needed to be correctly allocated.

Bug: 16917961
Change-Id: I760fc421f9f90fabb3f0deadd5f9dc61cd284371
udioflinger/Effects.cpp
306c92dabc524f408445f7da2524c7a5e77ade63 11-Aug-2014 Andy Hung <hunga@google.com> Merge "Extend downsampling ratios greater than 2:1" into lmp-dev
de975ca87c3dbdf9b7d92dae54b3446670b2a50e 11-Aug-2014 Igor Murashkin <iam@google.com> Merge "camera: Allow Camera#getParameters to be called by mediaserver anytime" 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
udioflinger/AudioResamplerDyn.cpp
udioflinger/Threads.cpp
088308a685ee54a476c96649af48ca3eca0bdd9c 11-Aug-2014 Zhijun He <zhijunhe@google.com> Merge "Camera2/3: Cleanup the jpeg buffer size calcaulation logic" into lmp-dev
edf103987d71f09dc2acb0a971cb40ff6608f1a5 11-Aug-2014 Jean-Michel Trivi <jmtrivi@google.com> Merge "Update audio ports with profile capabilities" into lmp-dev
28c9b6f298134624cb52b1af4ed8716dddb983d3 08-Aug-2014 Zhijun He <zhijunhe@google.com> Camera2/3: Cleanup the jpeg buffer size calcaulation logic

- Only one place calculating the jpeg size-the device layer, Camera2Device and
Camera3Device.
- Remove size argument for CameraDeviceBase and cleanup related code.

Bug: 14327010
Change-Id: I45d2ab4859ee0cc9273e579254f0569108c748f1
amera/libcameraservice/api1/client2/CallbackProcessor.cpp
amera/libcameraservice/api1/client2/JpegProcessor.cpp
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
amera/libcameraservice/api1/client2/ZslProcessor.cpp
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api_pro/ProCamera2Client.cpp
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device2/Camera2Device.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
f17026dfef596cf1c8008fda20f1f2ad23a3df3a 10-Aug-2014 Jean-Michel Trivi <jmtrivi@google.com> Update audio ports with profile capabilities

When opening an output, import the profile capabilities associated
with the device into the AudioPort.

Bug 10549017

Change-Id: If102f5623457542d2c1407ada303c71e43d19a08
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
4d41695d45e2c7211899afa94b20e32120b2b7e0 10-Aug-2014 Eric Laurent <elaurent@google.com> audiopolicy: add dump for audio patches

Bug: 10549017.
Change-Id: I896c8e16c8cf7490bab75295903620a76236f571
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
874c4287a4e49c59ac88767751dce00fcd3edb73 09-Aug-2014 Eric Laurent <elaurent@google.com> audio policy: enable more than one sink per audio patch.

Allow creation of audio patches with more than one sink.
More than one sink is enabled when:
- Connecting an input device to output devices on the same audio HW module.
- Connecting an output mix to output devices on the same audio HA module.

All other patches are limited to one sink.

Bug: 16879363.
Change-Id: I95be6948ef29df64e51e5b8ace38c2db7f3e89f2
udioflinger/PatchPanel.cpp
udiopolicy/AudioPolicyManager.cpp
ebe865b175b3f1b2a9212cea7b008937c919d8f3 08-Aug-2014 Igor Murashkin <iam@google.com> camera: Allow Camera#getParameters to be called by mediaserver anytime

This fixes a crash if the camera was locked by the media recorder and
another process tried to get the legacy parameters (for the camera
characteristics).

Bug: 16695955
Change-Id: I945a16a686a6987150c8754b5296353e76e5afa0
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/CameraClient.cpp
0912a5738d6baf2df7cd62e877240e3807b4b21f 08-Aug-2014 Andy Hung <hunga@google.com> Merge "Fix effect and mono sink handling." into lmp-dev
389cfdbb9a92a438a0d7710321c2964c7ad55eca 08-Aug-2014 Andy Hung <hunga@google.com> Fix effect and mono sink handling.

Do not permit mixing to mono sink in AudioFlinger.
Allow effects on mono sink if not Mixer thread (e.g. Record).

Bug: 16863095
Change-Id: I8b232fc1fb3f07bf017020c5d4f9ace644dec6d8
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
3659445a8b71afba9927b9d0d8ac41782278bde5 07-Aug-2014 Zhijun He <zhijunhe@google.com> Merge "Camera: Need consider AF state for ZSL buffer selection" into lmp-dev
7e4c0033c5d2f9d5f53f520a9b0a2fcb8023c810 07-Aug-2014 Zhijun He <zhijunhe@google.com> Camera: Need consider AF state for ZSL buffer selection

Bug: 16569983
Change-Id: I65e604e382ac0b98777155ad480ec3f6071e1a76
amera/libcameraservice/api1/client2/ZslProcessor3.cpp
7f04ec2a4ec94ada7ef89db8c50fd1e5c3a93a3b 07-Aug-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: add support for USB devices for voice call" into lmp-dev
c2730ba7c5e9559b7499ef5e0d7742deb18c5110 21-Jul-2014 Eric Laurent <elaurent@google.com> audio policy: add support for USB devices for voice call

Add possibility to use sink and source devices not on
the primary HW module for voice calls (e.g. USB headsets).

Bug: 15520724.

Change-Id: Ib27db4ba759b6d91ea1104dc2e35c87733517b30
udioflinger/Tracks.cpp
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
0a0e5f02037f396237461a9840b2fc7271812bdc 06-Aug-2014 Eric Laurent <elaurent@google.com> Merge "AudioSystem: add API to query audio HW sync source" into lmp-dev
7f3f2fa386b8dd917022663bcb01f10ea67061be 06-Aug-2014 Ricardo Garcia <rago@google.com> Merge "MediaServer crashing and audio effects not applied to TTS." into lmp-dev
322bab26dc3fe9bd9c1cbb829dc62ff44f1ae810 06-Aug-2014 Ricardo Garcia <rago@google.com> MediaServer crashing and audio effects not applied to TTS.

A memclear in the EffectChain was out of bounds.

Bug 15432115
Bug 16845751

Change-Id: Ib0adc7fa730d630bb71fb87d51163a26149b16e2
udioflinger/Effects.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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udiopolicy/AudioPolicyManager.cpp
92ce4715315bddd158c7d4028556632f0547e3b9 06-Aug-2014 Eric Laurent <elaurent@google.com> Merge "audio: fix crashes upon USB device connection" into lmp-dev
cf817a2330936947df94c11859f48771f5596a59 05-Aug-2014 Eric Laurent <elaurent@google.com> audio: fix crashes upon USB device connection

- Audio policy:
Replace unknown device assertion by debug log in setDeviceConnectionState().
It is possible that some kernels indicate connection of a legacy device type
when a USB audio device is connected.
We should just ignore this device.

- Audio flinger:
Make sure FastMixer thread is idle before exiting the normal mixer thread and
closing the output stream.

Change-Id: Ia10a20176a60a8aa56765538093a555fc998508a
udioflinger/Threads.cpp
udiopolicy/AudioPolicyManager.cpp
1c8d1e4079f2b8efd71423158e7f298cf1dc2c31 06-Aug-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "cameraservice: disallow zsl/recording coexistentce" into lmp-dev
a57ab8da6fe56fdb91dfc95ebd0282eb879dde53 30-Jul-2014 Eric Laurent <elaurent@google.com> policy manager: recognize AUDIO_DEVICE_IN_AMBIENT from policy.conf

Change-Id: If46b8d13f216bad4aa62598531d406d3303134f5
udiopolicy/AudioPolicyManager.cpp
ca05ebd4c666322e754ac63236c8b329dbb53b00 05-Aug-2014 Yin-Chia Yeh <yinchiayeh@google.com> cameraservice: disallow zsl/recording coexistentce

Make sure ZSL and recording stream does not exist at the same
time.

Change-Id: I19e28dedd9dd5cc5118449860b612a5c950fdaec
amera/libcameraservice/api1/Camera2Client.cpp
ac29afacbb34b92f1948188e5353fce5a252ccb3 28-Jul-2014 Jon Eklund <jeklund@motorola.com> audio policy: support line output device

Change-Id: Iddf1b6486430270d871a45c75615e54339a818e9
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
85c3773092cad9f2c6130ee83e8a78222bac6a0b 05-Aug-2014 Eric Laurent <elaurent@google.com> Merge "Add sound trigger control by audio policy" into lmp-dev
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
udiopolicy/Android.mk
udiopolicy/AudioPolicyClientImpl.cpp
udiopolicy/AudioPolicyInterface.h
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
udiopolicy/AudioPolicyService.h
oundtrigger/Android.mk
oundtrigger/SoundTriggerHwService.cpp
oundtrigger/SoundTriggerHwService.h
7a9b25940309e2967820daa13a7f71e41293d165 05-Aug-2014 Andy Hung <hunga@google.com> Merge "Remove unused TwoTrack process mode from AudioMixer" into lmp-dev
5241b8cacee86e17223695190959f4752910680f 05-Aug-2014 Andy Hung <hunga@google.com> Remove unused TwoTrack process mode from AudioMixer

Legacy code that has not been hooked up.

Change-Id: Ic01a4eddfa1020089d5bc42f58b6a4697698c27a
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
77cce80fa9d44f1e2a6bc486ad957fbbebfce3b2 05-Aug-2014 Phil Burk <philburk@google.com> [audio][policy] fix crash when offloadInfo is NULL

Added check for NULL pointer to avoid crash
in AudioPolicyManager when playing AC3 data.

Change-Id: Ie56788f6277be6da47d4218b1b4a6b359fce6473
Signed-off-by: Phil Burk <philburk@google.com>
udiopolicy/AudioPolicyManager.cpp
44622db93a24219123facbbe14259000f90de728 02-Aug-2014 Eric Laurent <elaurent@google.com> audio flinger: fix service fuzz test crash

Bug: 13744704.
Change-Id: I572c89f88dcab2b8b612ec6860983306f9f159ab
udioflinger/AudioFlinger.cpp
678792e362c4cd70640934049491d9f21560c63b 03-Aug-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: fix service fuzz test crash" into lmp-dev
222260168c144cca5a4e8f1c79df8c8baa22b591 02-Aug-2014 Eric Laurent <elaurent@google.com> audio policy: fix service fuzz test crash

Bug: 13744391.
Change-Id: I2430e09ad00476b9ac28dc55466942c61fb0531d
udiopolicy/AudioPolicyManager.cpp
facd8cf2651f7fcf7225e735cae5f5d4ef3a334e 02-Aug-2014 Eric Laurent <elaurent@google.com> Merge "Revert "Revert "sound trigger: added permission checks""" into lmp-dev
8ba53d87a2d311ff4b3f04e30b2e09309ae7421c 02-Aug-2014 Eric Laurent <elaurent@google.com> Revert "Revert "sound trigger: added permission checks""

This reverts commit 936c84a5b743dce2a2572fdf54b37b187bc88b60.

Bug: 16374803.
Change-Id: I9d3137faeddf119b13f9cdb73c14ca49e1ee3d1c
oundtrigger/Android.mk
oundtrigger/SoundTriggerHwService.cpp
e6fa1b7fdc74bec3292d6a10c99f25f9fd989d3f 16-Jul-2014 Hans Boehm <hboehm@google.com> Remove 64-bit android_atomic uses from StateQueue.

Use stdatomic.h instead. We're trying to remove android_atomic use
wherever possible. The 64-bit uses seem easiest to remove first.
This cleans up the code, though not as much as C++ <atomic> would,
if it worked everywhere.

(cherry picked from commit f39b560952d3706a7ff47ef0d82c1a836daeea42)
Change-Id: I3c29bdbd5915cb9d47118834a3a742fe296cf87f
udioflinger/StateQueue.cpp
udioflinger/StateQueue.h
a6d28be0be0fa813080a021bd6a5920a8cb4fbb1 30-Jul-2014 Andy Hung <hunga@google.com> Merge "Add Quad channel output to AudioPolicyManager" into lmp-dev
e1d37b784f3970e44a7331c189cbfdca15404648 29-Jul-2014 Eric Laurent <elaurent@google.com> audio policy: add missing enums in config file parsing

Change-Id: I4edd6cde11de62c9c19dfa623d08cddf42c953db
udiopolicy/AudioPolicyManager.cpp
3a0fe12fbd08b13e9f57d79b0391186be05072f5 30-Jul-2014 Andy Hung <hunga@google.com> Add Quad channel output to AudioPolicyManager

Matches some USB device configurations.

Change-Id: I2429f9de87816b4ad1d39516e3821562617c76ee
udiopolicy/AudioPolicyManager.cpp
318be3e7d245aea99efa194a16002395b609ab90 30-Jul-2014 Andy Hung <hunga@google.com> Merge "Enable multichannel in AudioFlinger" into lmp-dev
8b685b9e56cc207d44b08d124148e7d752ef2241 30-Jul-2014 Andy Hung <hunga@google.com> Merge "Update multichannel audio policy handling" into lmp-dev
a4daf0b4f934b800a49f199fb8c09409391c8fc0 29-Jul-2014 Glenn Kasten <gkasten@google.com> Fix build warnings

Change-Id: Ife5e40264f43fb3ccb40830228701003fe106bf5
udioflinger/AudioMixerOps.h
udioflinger/AudioResamplerDyn.cpp
udioflinger/AudioResamplerFirProcess.h
udioflinger/tests/resampler_tests.cpp
udioflinger/tests/test-mixer.cpp
udioflinger/tests/test_utils.h
b1ee3954153e9c40280f68d278526ca43c31fdcf 29-Jul-2014 Andy Hung <hunga@google.com> Enable multichannel in AudioFlinger

Change-Id: Ibdbdc6ea0b87cdcd15432257a3455b11b3ce14b7
udioflinger/AudioFlinger.h
9a60538b9ee2b097770dcd378281b31f4218ae56 29-Jul-2014 Andy Hung <hunga@google.com> Update multichannel audio policy handling

Ensure AUDIO_FORMAT_PCM_FLOAT and AUDIO_FORMAT_PCM_32_BIT
have proper precedence.
Allow more mixer channels than 2.

Change-Id: I02af97dad6218b25cbada4d93077a213314c6725
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
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
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
udiopolicy/AudioPolicyInterface.h
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
udiopolicy/AudioPolicyService.h
d530d415e60373caf875a37d2d747a51470ee45c 29-Jul-2014 Glenn Kasten <gkasten@google.com> Merge "Fix rounding in RecordThread resampler buffer computation" into lmp-dev
8661aaff9e9a4d4c1b57f6a68cdbcab006354ab2 28-Jul-2014 Andy Hung <hunga@google.com> Fix rounding in RecordThread resampler buffer computation

Bug: 16525305
Change-Id: Ie010822b0fa9dec74adde1d1b091ee44c183fc94
udioflinger/Threads.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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udiopolicy/AudioPolicyClientImpl.cpp
udiopolicy/AudioPolicyInterface.h
udiopolicy/AudioPolicyService.h
03524dcc1215b2c468f5c8c8abe6f1c26239fd71 28-Jul-2014 Eric Laurent <elaurent@google.com> Merge "AudioFlinger: update openInput() and openOutput()" into lmp-dev
7d70c5e5fe787ae5d7af8830864d208749d6337f 25-Jul-2014 Eino-Ville Talvala <etalvala@google.com> CameraService: Replace deprecated native_window methods

Change-Id: I3be5a720ac8b488d1e507c606a9146480faeef63
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device3/Camera3OutputStream.cpp
f67e23ef637d0b53a0d4bebb68c654234df3da94 24-Jul-2014 Eino-Ville Talvala <etalvala@google.com> CameraService: Clean up availability listeners and HAL error codes

- Refactor where availability listeners are called to centralize behavior,
ensuring that all client creation/destruction invokes the listeners
- Clean up some of the client hierarchy
- Filter error codes from key HAL calls to ensure proper reporting

Bug: 16514157
Bug: 16483222
Change-Id: I59875a865b6a508b47423946c78862da8df34cd1
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/common/Camera2ClientBase.cpp
amera/libcameraservice/device1/CameraHardwareInterface.h
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device3/Camera3Device.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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/PatchPanel.cpp
udiopolicy/AudioPolicyClientImpl.cpp
udiopolicy/AudioPolicyClientImplLegacy.cpp
udiopolicy/AudioPolicyInterface.h
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
udiopolicy/AudioPolicyService.h
141670d465d7673dfa6ad712ad100f84882dfa95 28-Jul-2014 Glenn Kasten <gkasten@google.com> Merge "Enable lower latency audio capture on more devices" into lmp-dev
9f81de3452dfb2385bd57dc05456a045174a1ab1 28-Jul-2014 Glenn Kasten <gkasten@google.com> Enable lower latency audio capture on more devices

Bug: 16601366
Change-Id: I573b98631f81b7768f7cc00aa09e560008dea587
udioflinger/Threads.cpp
0fb47759256ecdaedbc34c880238bc9d102ef160 23-Jul-2014 Jean-Michel Trivi <jmtrivi@google.com> AudioPolicyManager: handle outputs for different addresses

Add the notion of device types that cause the device address
to be taken into account, i.e. multiple devices of the
same type but with a different address can be connected/
disconnected.
AUDIO_DEVICE_OUT_REMOTE_SUBMIX is such a device type.
When making those devices available / unavailable, look for
all outputs with a matching address.

Bug 16009464

Change-Id: I260f8248b7794c4932094e876afdf29fdea007a3
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
97117153a0d681be70bfa9dc9876541375355c47 28-Jul-2014 Glenn Kasten <gkasten@google.com> Merge "audio policy: compatible sample rates and channel masks" into lmp-dev
d8622371d5ac5b98abcc5d388bd952bb3dd4fda9 27-Jul-2014 Eric Laurent <elaurent@google.com> audiopolicy: fix output audio format selection

Fix two problems in output stream audio format selection
added by commit 1e693b55:
- flags must be set before picking the format.
- fix logic error in best format selection.

Change-Id: I6458b32725f771da5a08108932d64e71964ae9f1
udiopolicy/AudioPolicyManager.cpp
cbd48023d0a0e3fd59955011538c0087a439f905 24-Jul-2014 Glenn Kasten <gkasten@google.com> audio policy: compatible sample rates and channel masks

Change-Id: I50d068a968aa6bd9e53e5b3111a1b09a6c2d219c
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
0f036bec92eca4c972f566355196acc3f4cbf804 25-Jul-2014 Andy Hung <hunga@google.com> Merge "Add multichannel capability to AudioFlinger" into lmp-dev
9a59276fb465e492138e0576523b54079671e8f4 22-Jul-2014 Andy Hung <hunga@google.com> Add multichannel capability to AudioFlinger

But not enabled (kEnableExtendedChannels == false).

Change-Id: I62f7e31fbd29ad703a9a02f5d1a280b6972dd423
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/FastMixer.cpp
udioflinger/FastMixer.h
udioflinger/Threads.cpp
e93b6b7347a7846c8fd746542364ec11b0cd5124 18-Jul-2014 Andy Hung <hunga@google.com> Add multichannel capability to AudioMixer

tests/test-mixer updated to handle multichannel.
New mixer path is still disabled (kUseNewMixer = false).
Subsequent CL will enable multichannel capability.

Change-Id: I71dafa94cc1d9af567c285e0ded7c5c94e3ff926
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/AudioMixerOps.h
udioflinger/tests/mixer_to_wav_tests.sh
udioflinger/tests/test-mixer.cpp
udioflinger/tests/test_utils.h
3eb54c30def7f626c5e2d73ab418c78616dc53db 25-Jul-2014 Andy Hung <hunga@google.com> Merge "Add multichannel capability to AudioMixer" into lmp-dev
9e62beeeb307a098be9c72bbd23188a7731b72bb 25-Jul-2014 Glenn Kasten <gkasten@google.com> Merge "audio policy: clean up checking for active input" into lmp-dev
0a234ea24a9b03da571150c464c6670fba9d224f 25-Jul-2014 Ricardo Garcia <rago@google.com> Merge "-Making sure mAudioCommands list is empty before going to sleep. -Wake_lock release before sleeping or quitting threadLoop()." into lmp-dev
05f2fdc1070c1c07af9e21760d4d2e06bebde55a 25-Jul-2014 Ricardo Garcia <rago@google.com> -Making sure mAudioCommands list is empty before going to sleep.
-Wake_lock release before sleeping or quitting threadLoop().

Change-Id: Icab53d7984a3ba3eaf13e514667b4d60f40cbcd6
udiopolicy/AudioPolicyService.cpp
74a8e2533561f04029873446206ab407cd2e033b 24-Jul-2014 Glenn Kasten <gkasten@google.com> audio policy: clean up checking for active input

Change-Id: I85cc089df32e6d469e8aef307599f1021ea5b835
udiopolicy/AudioPolicyManager.cpp
6a8ab05f0598f4ebdd5ef82e93cf32fde0598189 24-Jul-2014 Glenn Kasten <gkasten@google.com> audio policy: add audio_input_flags_t and mOpenRefCount

Change-Id: I5f9c7b5ebf03b9bc94efe70d3677edfabb99c194
udiopolicy/AudioPolicyInterface.h
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
319b09d0cf6ae5bc21d8fd1e14e7a9df915514cf 25-Jul-2014 Glenn Kasten <gkasten@google.com> Merge "audio policy: add audio_input_flags_t and mOpenRefCount" into lmp-dev
0a21051b91c2e07e49eb6fa568c505aee967ab9d 24-Jul-2014 Zhijun He <zhijunhe@google.com> Camera3: tear down Camera3 streams when they are deleted.

Also override the disconnectLocked method in Camera3ZslStream to make sure the
Camera3ZslStream specific buffer queue is cleaned up properly.

Also revert 0be123df1897fd3fe1b7ba30f24d8ae4c91b4dc7, as it was not the right
fix.
Change-Id: I89bdcb2e206379ae1f2602421e7fdbcde9a31399
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3OutputStream.h
amera/libcameraservice/device3/Camera3ZslStream.cpp
amera/libcameraservice/device3/Camera3ZslStream.h
83b8808faad1e91690c64d7007348be8d9ebde73 21-Jun-2014 Eric Laurent <elaurent@google.com> audio flinger: add patch connection between hw modules

Add support for audio device connections between different audio
hw modules.
The patch is performed by creating a bridge between the playback
thread connected to the sink device and the record thread connected
to the source device using a pair of specialized PlaybackTrack and
RecordTrack.
- Added PatchTrack and PatchRecord classes.
- Added TrackBase type to indicate more clearly the track behavior.
- A TrackBase can allocate the buffer or reuse an existing one.
- Factored some code in openOutput() and openInput() for internal use
by PatchPanel.

Bug: 14815883.

Change-Id: Ib9515fcda864610458a4bc81fa8f59096ff4d7db
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/PatchPanel.cpp
udioflinger/PatchPanel.h
udioflinger/PlaybackTracks.h
udioflinger/RecordTracks.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/TrackBase.h
udioflinger/Tracks.cpp
udiopolicy/AudioPolicyManager.cpp
c15c265676da2226a18a5373812608b19d4719d7 23-Jul-2014 Eric Laurent <elaurent@google.com> audio policy: remove redundant fixed volume management

Remove code handling fixed device volume in
AudioPolicyManager::computeVolume() as this is already
managed by AudioService.

Change-Id: Ib2be7578e40652c85a7d44c685ff9cc703d0c969
udiopolicy/AudioPolicyManager.cpp
17d0842cf33464a79a81b0e78e49514c3419d1cf 23-Jul-2014 Andy Hung <hunga@google.com> Merge "Fix multichannel integer resampling and add tests" into lmp-dev
f39b560952d3706a7ff47ef0d82c1a836daeea42 16-Jul-2014 Hans Boehm <hboehm@google.com> Remove 64-bit android_atomic uses from StateQueue.

Use stdatomic.h instead. We're trying to remove android_atomic use
wherever possible. The 64-bit uses seem easiest to remove first.
This cleans up the code, though not as much as C++ <atomic> would,
if it worked everywhere.

Change-Id: I3c29bdbd5915cb9d47118834a3a742fe296cf87f
udioflinger/StateQueue.cpp
udioflinger/StateQueue.h
f78cd5e5e6af5d06de15e6f91b98e648d89fc409 23-Jul-2014 Zhijun He <zhijunhe@google.com> Merge "Camera3: only append partial result to partial result collection" into lmp-dev
5d76e1a639c1bae9ea7d9af1124abf1c94353344 23-Jul-2014 Zhijun He <zhijunhe@google.com> Camera3: only append partial result to partial result collection

Otherwise, the metadata entries will be duplicated.

Change-Id: If0cd96e09960fdf746a70913d380e9036745a944
amera/libcameraservice/device3/Camera3Device.cpp
daf92cc876a1952059794e6d0f558f0f6dd9ac8c 23-Jul-2014 Eric Laurent <elaurent@google.com> audio policy: fix hotword capture

commit 1c333e2 introduced a regression causing the
wrong input source type to be communicated to
the audio HAL when starting hotword (background) capture.

Change-Id: Iec6b3c58cbc15b9988793077232ff3e7e72a4d6d
udiopolicy/AudioPolicyManager.cpp
0be123df1897fd3fe1b7ba30f24d8ae4c91b4dc7 22-Jul-2014 Ruchit Sharma <ruchits@nvidia.com> camera: clear ZSLQueue when switching modes

not clearing the queue here will eat up unnecessary memory every time
we switch from video to still mode.

Change-Id: I279ec709b485ca0dab672464e5b829be849bcaa5
amera/libcameraservice/api1/Camera2Client.cpp
e80b229a80a992cb14647bcc7bfa8c926dc65fe6 22-Jul-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "cameraservice: remove record stream in stopPreview" into lmp-dev
42b011166ece30969667e0ff9dcf4832568c9c1a 20-Jul-2014 Andy Hung <hunga@google.com> Fix multichannel integer resampling and add tests

Change-Id: I384bf8317d4f03616bf9f2b458a8700965d5cf56
udioflinger/AudioResamplerFirProcess.h
udioflinger/tests/resampler_tests.cpp
eeaf40a8e413780bd2aacde172ac820e2ce12eb3 22-Jul-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: add missing formats to audio_policy.conf parser." into lmp-dev
a204994e7dd7dab931297176c66b5d3b82e2c90b 22-Jul-2014 Eric Laurent <elaurent@google.com> audio policy: add missing formats to audio_policy.conf parser.

Change-Id: I872c11d080c505abe3025e7bbb554ca9711de9af
udiopolicy/AudioPolicyManager.cpp
a7e04803ffa0d8d4cc51a122f68bf5038422aabb 21-Jul-2014 Glenn Kasten <gkasten@google.com> Remove execute bit

Change-Id: I1cf0c0d9375779b3074af12f4cbf9c1ec07bf4ff
udioflinger/Threads.cpp
udiopolicy/Android.mk
udiopolicy/AudioPolicyEffects.cpp
udiopolicy/AudioPolicyEffects.h
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/AudioPolicyService.cpp
udiopolicy/AudioPolicyService.h
28d0327bc80e1e424c3db34c62e8f73cd5ffab1e 18-Jul-2014 Yin-Chia Yeh <yinchiayeh@google.com> cameraservice: remove record stream in stopPreview

Remove recording stream every time stopPreview is called.

Change-Id: Iabb783a75418aa41ddc2693cfdfd5a2131109070
amera/libcameraservice/api1/Camera2Client.cpp
8bce84142802ecdc1794d59488ede629801a5cba 20-Jul-2014 Andy Hung <hunga@google.com> Merge "Add RemixBufferProvider to AudioMixer" into lmp-dev
a08810b2feafeec88870c7c1f01efc39ee8e0d78 17-Jul-2014 Andy Hung <hunga@google.com> Add RemixBufferProvider to AudioMixer

This is used to convert between channel masks for input AudioTrack
data.

Change-Id: Iedffaeccb99c7053992152e7b1cb6b2d33b12eef
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
34803d594232af5604d893eff7ee40bb57d459a4 17-Jul-2014 Andy Hung <hunga@google.com> Update DownmixerBufferProvider to use CopyBufferProvider

Change-Id: I6b1a8755a1e6c29b916662fd376e9509cda5df55
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
1b2fdcb005f9fbe5ad465cec46ec5992b718b5e3 17-Jul-2014 Andy Hung <hunga@google.com> Add CopyBufferProvider class for AudioMixer

AudioMixer::ReformatBufferProvider now uses it as a base class.

Fix ReformatBufferProvider object leak.

Change-Id: If196f844eaaa124a173ffa27afe88098023c2ff9
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
4287942b0d6fabe5f99e15cd70c470b04f345de8 19-Jul-2014 Andy Hung <hunga@google.com> Merge "Update DownmixerBufferProvider to use CopyBufferProvider" into lmp-dev
c60780517a882e0905fd36a06b1c45da12e49557 19-Jul-2014 Andy Hung <hunga@google.com> Merge "Add CopyBufferProvider class for AudioMixer" into lmp-dev
529c61b7e4468a3e21f302f2a92a660249daa722 19-Jul-2014 Glenn Kasten <gkasten@google.com> Fix copy/paste bug

introduced by Change-Id: I4e9b7fa99858b488ac98a441fa70e31dbba1b865

Change-Id: I9a0c8800f5cf3767cc259776f95c96cad972e392
udioflinger/Tracks.cpp
91be1fbc424035e70688e60306b755893e0fb0ae 17-Jul-2014 Glenn Kasten <gkasten@google.com> Merge "Move AudioRecord frame count calculations to server" into lmp-dev
e94754c9601d132354e5db2079762c7d1a0bddda 17-Jul-2014 Glenn Kasten <gkasten@google.com> Merge "Add audio_input_flags_t to IAudioPolicyService::getInput" into lmp-dev
2e8186a258c934798129847f66171df36e95d23e 17-Jul-2014 Andy Hung <hunga@google.com> Merge "Fix initial audio glitch on startup" into lmp-dev
d1a4f35ec10f36c33cf7391e800910da8fdebb6e 17-Jul-2014 Glenn Kasten <gkasten@google.com> Merge "Add audio_input_flags_t to IAudioFlinger::openInput" into lmp-dev
e1a8112edec713ff1d84f67145f22cca3a401951 17-Jul-2014 Andy Hung <hunga@google.com> Merge "Revert "Revert "Enable extended precision PCM output in AudioFlinger""" into lmp-dev
7025b5bf189092015df97b0952d33ee76db165c7 17-Jul-2014 Andy Hung <hunga@google.com> Revert "Revert "Enable extended precision PCM output in AudioFlinger""

This reverts commit ce83432a922e55d68625aad854f8f6520db395bc.

Change-Id: I2d005bfe091beef810c9ddfb53e308fa0e47b355
udioflinger/AudioFlinger.h
5567aaf4818007cd8e77329683a91c0f5d7a8837 17-Jul-2014 Andy Hung <hunga@google.com> Fix initial audio glitch on startup

Also happens when restarting AudioFlinger.

Bug: 16322824
Change-Id: I382b20174cb0639e04316130141f2094d7dd0cb3
udioflinger/Threads.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
udioflinger/Threads.cpp
b3b1660ecb67f61f9da54efced8677fa3a6f4863 16-Jul-2014 Glenn Kasten <gkasten@google.com> Add audio_input_flags_t to IAudioPolicyService::getInput

Change-Id: I9f37be05f8dc7b85a8827a94e76ca0f45453e170
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/AudioPolicyService.h
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udiopolicy/AudioPolicyClientImpl.cpp
udiopolicy/AudioPolicyClientImplLegacy.cpp
udiopolicy/AudioPolicyInterface.h
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyService.h
6e6704c06d61bc356e30c164081e5bcffb37920c 03-Jul-2014 Glenn Kasten <gkasten@google.com> Improve dumpsys for capture threads

Show per-track sample rate, and whether there is a fast capture thread

Change-Id: If6a08a40d1eeba0690aa8da3c541f845ec101b7f
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
693dd7e252529be98acd2e2585b44a6a10fa4233 17-Jul-2014 Zhijun He <zhijunhe@google.com> Merge "Camera HAL3: migrate from partial quirks to partial result" into lmp-dev
ce83432a922e55d68625aad854f8f6520db395bc 17-Jul-2014 Andy Hung <hunga@google.com> Revert "Enable extended precision PCM output in AudioFlinger"

This reverts commit a494e82c3c73508b4d3cfe89e9134de94e12fd31.
udioflinger/AudioFlinger.h
936c84a5b743dce2a2572fdf54b37b187bc88b60 17-Jul-2014 Eric Laurent <elaurent@google.com> Revert "sound trigger: added permission checks"

This reverts commit dcb162f3aed807d1e51f29e2454ade584439992e.
oundtrigger/Android.mk
oundtrigger/SoundTriggerHwService.cpp
ca4805b607a6abce38abf05c09d3fb8bab521ee8 17-Jul-2014 Glenn Kasten <gkasten@google.com> Merge "Improve dumpsys for capture threads" into lmp-dev
b84bc80c952b888d2134e467835b7e9facd17805 17-Jul-2014 Andy Hung <hunga@google.com> Merge "Revert "Enable extended precision PCM output in AudioFlinger"" into lmp-dev
7b24ee381e806dcb53308c1cafc8a45f4e2d8300 15-Jul-2014 Jungshik Jang <jayjang@google.com> Revisit HDMI-CEC system audio mode in AudioService.

From recent feedback on HDMI-CEC system audio mode,
it would be unnecessary to enforce output from AudioService.
Instead, it would follow audio policy according to status
of HDMI-CEC system audio mode.
For that removed two params of setHdmiSystemAudioModeSupported
api of AudioManager.

In terms of speaker mute, it will be handled by removing speaker
from audio ouput instead of changing gain control. For that
added new force usage type, FOR_HDMI_SYSTEM_AUDIO_MODE and
new force config type, FORCE_HDMI_SYSTEM_AUDIO_ENFORCED.
This is used to notify change of system audio mode to
audio policy manager.

Bug: 16305986
Bug: 16002150
Change-Id: I702e0f9ce7c7887d5f5dd02b06a40d20e4c950df
udiopolicy/AudioPolicyManager.cpp
204e3295e2814052aef7e45ee9edd60128efbbd0 15-Jul-2014 Zhijun He <zhijunhe@google.com> Camera HAL3: migrate from partial quirks to partial result

- Enable the normal partial result path for HAL3.2, the quirk is only used
for the HAL version lower than HAL3.2. The partial quirks is no longer supported
for HAL3.2 or higher versions.
- Add CameraDeviceBase getDeviceVersion API.
- Fix some build warnings

Change-Id: I7a1b03d4d5fd5258d2addfba4368bee2ba691337
amera/libcameraservice/api1/client2/FrameProcessor.cpp
amera/libcameraservice/api1/client2/FrameProcessor.h
amera/libcameraservice/api1/client2/ZslProcessor3.cpp
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/common/FrameProcessorBase.cpp
amera/libcameraservice/common/FrameProcessorBase.h
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device2/Camera2Device.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
d81d48961da30f657fb095ed00a697bd50266269 16-Jul-2014 Glenn Kasten <gkasten@google.com> Merge "Add audio_input_flags_t to HAL open_input_stream" into lmp-dev
dcb162f3aed807d1e51f29e2454ade584439992e 11-Jul-2014 Eric Laurent <elaurent@google.com> sound trigger: added permission checks

Add check for android.permission.CAPTURE_AUDIO_HOTWORD
to all sound trigger binder calls on server side.

Bug: 12378680.
Change-Id: Ic3fd70e947882cdf5f4d4a4fe609a2c5a8236fd5
oundtrigger/Android.mk
oundtrigger/SoundTriggerHwService.cpp
da3bd9f12883f8344d2db00ce2fa47511ed9bef6 16-Jul-2014 Glenn Kasten <gkasten@google.com> Add audio_input_flags_t to HAL open_input_stream

For backward compatibility, until flags are added to openInput(),
we will assume that the request is for a low latency input stream.

Change-Id: I5e6f7e574418917ff1b41b0a47199203c69cb40f
udioflinger/AudioFlinger.cpp
efebe3974d4ad5870f957b77450c26a499fc467e 15-Jul-2014 Glenn Kasten <gkasten@google.com> Merge "const correctness on downmix and upmix" into lmp-dev
cd704219d22ec51660103684a680caf2c3a12dad 15-Jul-2014 Glenn Kasten <gkasten@google.com> const correctness on downmix and upmix

Change-Id: I0f51470a6d58a22310ce7cda80afc55e9d6df1dc
udioflinger/Threads.cpp
7c5b60ae8b8793b2d601ecf459807c974120331b 15-Jul-2014 Eric Laurent <elaurent@google.com> audio policy: build with USE_LEGACY_AUDIO_POLICY

Change-Id: I9def12ea689b00c0295c670c07373dacfb186799
udiopolicy/AudioPolicyInterfaceImplLegacy.cpp
5698d4461a260dbf208484383f692b03c6473e74 18-Jun-2014 Ruben Brunk <rubenbrunk@google.com> camera2: Set orientation flags for hardware composer.

Bug: 15116722
Change-Id: I3fcc9aea38afcbd665f86c511a9929fe9a6a3a8f
amera/libcameraservice/api2/CameraDeviceClient.cpp
388742df51084f02a362818a884f3bde71b7ef8d 12-Jul-2014 Eric Laurent <elaurent@google.com> Merge "audiopolicy: remove debug log in AudioPolicyEffects.cpp"
897a408b3f9c893776d67214257ca6a6bc1751bd 12-Jul-2014 Eric Laurent <elaurent@google.com> audiopolicy: remove debug log in AudioPolicyEffects.cpp

Change-Id: Ia037807a91d6649c3f47baccf8c107df496e934e
udiopolicy/AudioPolicyEffects.cpp
1e693b55d888b9d3e0a2ce770ae2b72b59c1a317 10-Jul-2014 Eric Laurent <elaurent@google.com> audio policy: add rules to select audio parameters

Added rules to select most appropriate sampling rate, format and
channel mask from an input or output profile.
Moved mFlags from IOProfile to its base class AudioPort.
Removed bogus mChannelMask member in DeviceDescriptor class.
Improveed dump of dynamic parameters in AudioPort.

Change-Id: Ic09d320386002a8bafee4a28db00b1001a386678
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
udiopolicy/AudioPolicyService.cpp
2829edccd7d2bb8244246f316face82b650b8949 18-Jun-2014 aarti jadhav-gaikwad <agaikwad@nvidia.com> stagefright: Pass audio aac sub formats in offloadinfo

Pass audio aac sub formats in offloadinfo according to
aac profile. Audio HAL can take decision about offload
using DSP capabilities

Change-Id: If269a3654b5d2b09c183212b0646ef03e06f2d8f
udioflinger/AudioFlinger.cpp
udiopolicy/AudioPolicyManager.cpp
8346bf5c2dd059c5451706ef1b906cb34d5175cd 11-Jul-2014 Andy Hung <hunga@google.com> Merge "Return negotiated format with HAL in AudioFlinger"
463be250de73907965faa6a216c00312bf81e049 11-Jul-2014 Andy Hung <hunga@google.com> Return negotiated format with HAL in AudioFlinger

Fixes an issue caused by extended precision and the FastMixer
when the format to the FastMixer was returned instead of the
HAL format.

Change-Id: I2be9d55d5c87d82e46b5200b07fcdd986ebde08a
udioflinger/Threads.cpp
udioflinger/Threads.h
0c94309d3c6db555b57f2e2e2dc3a0a2676ac6b7 08-Jul-2014 Jungshik Jang <jayjang@google.com> Revamp HDMI-CEC system audio mode integration with audio service.

In previous change we use setForceUse(FORCE_MEDIA, XXX) method
in order to set specific audio output type, such as LINE, HDMI_ARC,
and SPDIF. But it turns out that it conflicts with bluetooth
a2dp which uses the same setForceUse(FORCE_MEDIA, yyy).

This change is based on several conditions.

1. When other non-speaker devices are on, prevent system audio
from turing on.
2. In order to keep track of other devices' connectivity and to
turn off system audio if other device like bluetooth or
headphone preempts current output, register OnAudioPortChangeListner
to audio manager.
3. All possible system audio outputs can be merged with other
outputs without priority.

Change-Id: Ic5ccc80f9b48fb77433c347de7969837c69e58c1
udiopolicy/AudioPolicyManager.cpp
0dba9b1719a598f5d78cbcef4b0b9e47313f1037 09-Jul-2014 Andy Hung <hunga@google.com> Merge "Add floating point volume handling to AudioMixer"
91848a568e6ef4d6b214b81d3f82b6d49d00ffb6 09-Jul-2014 Andy Hung <hunga@google.com> Merge "Enable extended precision PCM output in AudioFlinger"
817d3356b5c23f01620105141633616b48002779 09-Jul-2014 Jean-Michel Trivi <jmtrivi@google.com> Merge "Revise speaker volume curve for media on devices with speaker DRC"
98c6043e089743355bb6686176877f2ba5125213 09-Jul-2014 Jean-Michel Trivi <jmtrivi@google.com> Revise speaker volume curve for media on devices with speaker DRC

Bug 15318604

Change-Id: I14b451e2d8d4439fe286dd98c45d09b9dadbb4f6
udiopolicy/AudioPolicyManager.cpp
5e58b0abe5b6c8f5bd96a8f78bbeeeb4d3892020 24-Jun-2014 Andy Hung <hunga@google.com> Add floating point volume handling to AudioMixer

Use floating point volume in AudioMixer mixing when floating
point input is used with the new mixer engine.
AudioResampler is updated to take floating point volume to match.
Both legacy integer and floating point mixer engines work.

For now, integer volume is used when the new mixer engine
runs in integer input mode, for backward compatibility with
the legacy mixer. The new mixer engine will generally run in
floating point input mode. When the legacy path is removed,
the integer volumes will be removed.

Change-Id: I79e80c292ae7c8b8bdd0aa371a1b2c3a1b618290
udioflinger/Android.mk
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/AudioMixerOps.h
udioflinger/AudioResampler.cpp
udioflinger/AudioResampler.h
udioflinger/AudioResamplerDyn.cpp
udioflinger/AudioResamplerDyn.h
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
udioflinger/Tracks.cpp
udioflinger/test-resample.cpp
udioflinger/tests/resampler_tests.cpp
a494e82c3c73508b4d3cfe89e9134de94e12fd31 09-Jul-2014 Andy Hung <hunga@google.com> Enable extended precision PCM output in AudioFlinger

Change-Id: I7c0907c7b2369681975d8ea0192b722d7ed7a867
udioflinger/AudioFlinger.h
2e8863b31e987f9bb54e52645e03e75120863a2e 08-Jul-2014 Eino-Ville Talvala <etalvala@google.com> Merge "av: native_window_set_buffers_geometry is deprecated."
c09cec7ba6df108b91d9d9583b340580bafa5d0b 03-Jul-2014 Pierre Couillaud <pierre@broadcom.com> av: native_window_set_buffers_geometry is deprecated.

native_window_set_buffers_geometry is deprecated, but
__set_buffers_geometry is still used for device1 camera
support.

replace deprecated call with its equivalent combination of
native_window_set_buffers_dimensions and
native_window_set_buffers_format.

Change-Id: I4940367dcae6049451508bfdfc11c16907ec1afc
Signed-off-by: Pierre Couillaud <pierre@broadcom.com>
amera/libcameraservice/device1/CameraHardwareInterface.h
c98bd8d9bf81663b5cd9c79e79d6e7869c1146e6 07-Jul-2014 Zhijun He <zhijunhe@google.com> Camera3: only return input buffer when it is sent in request

This is to WAR the case where HAL sends non-NULL input_buffer in capture
result even capture framework doesn't send input buffer in the request.
It's very likely the input_buffer is uninitialized, and we shouldn't
use it. Log a warning for such case as well.

Bug: 16115675
Bug: 16117312
Change-Id: Ib299b45fbfe084059a9f546ded239c8094b039e2
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
0d3679e21146bfa497c38842c80ae1f9906a042a 03-Jul-2014 Andy Hung <hunga@google.com> Merge "Add and enable multichannel for audio resampler"
075abae2a954bf3edf18ad1705c2c0f188454ae0 10-Apr-2014 Andy Hung <hunga@google.com> Add and enable multichannel for audio resampler

Change-Id: I2b86fb73d70abc4c456f7567270a888086b301d4
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/AudioResampler.cpp
udioflinger/AudioResamplerDyn.cpp
udioflinger/AudioResamplerDyn.h
udioflinger/tests/resampler_tests.cpp
68ffa200de7c4662c088851a328923be715c6c24 10-Apr-2014 Andy Hung <hunga@google.com> Add multichannel to audio resample processing

Change-Id: If6bfbf74000520713f9ba19488a475fc2eefc271
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/AudioResamplerFirProcess.h
72d039f007722c92ee5ea7ffd03ece19d2781103 09-Jul-2014 Terry Heo <terryheo@google.com> Merge "audio policy: add new input audio device"
0832b2d7d190f4fbe6f134446b2610df0cccdbbb 07-Jul-2014 Eric Laurent <elaurent@google.com> sound trigger: update HAL

New start_recognition() prototype with recognition
configuration structure.
New recognition event format.

Bug: 12378680.
Change-Id: I57b430eb076e6baa58118a0ed45ce4afaacb998c
oundtrigger/SoundTriggerHwService.cpp
3d638b30dcc67ef9eaa389160ef285cda055ed64 08-Jul-2014 Andy Hung <hunga@google.com> Merge "Replace int bitDepth with audio_format_t in Resampler"
0ea8fa4ccbf9b2b179370b983f3887d3daf2381f 08-Jul-2014 Zhijun He <zhijunhe@google.com> Camera3: Add capture intent for ZSL capture

Also fix the warning condition in input buffer return path.

Change-Id: I90e9edc1db9f1de87bc8936000b00c3306160c71
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
amera/libcameraservice/api1/client2/ZslProcessor3.cpp
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/device3/Camera3Device.cpp
3348e36c51e91e78020bcc6578eda83d97c31bec 07-Jul-2014 Andy Hung <hunga@google.com> Replace int bitDepth with audio_format_t in Resampler

Remove mBitDepth from class (not used).
Replace with audio_format_t in factory method to distinguish
between float and pcm 16-bit.

Change-Id: I166860796c68285077ef4458d8758d19b82523f9
udioflinger/AudioMixer.cpp
udioflinger/AudioResampler.cpp
udioflinger/AudioResampler.h
udioflinger/AudioResamplerCubic.h
udioflinger/AudioResamplerDyn.cpp
udioflinger/AudioResamplerDyn.h
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
udioflinger/Tracks.cpp
udioflinger/test-resample.cpp
udioflinger/tests/resampler_tests.cpp
7999a2236cb641dc1d7bf7bd8d2499d40d0a806d 27-Jun-2014 Terry Heo <terryheo@google.com> audio policy: add new input audio device

Add entry for AUDIO_DEVICE_IN_LOOPBACK to string to enum table.

Bug: 15437484
Change-Id: I552df0969c745bdf66ff9e5d7bd864ef9e3f438d
udiopolicy/AudioPolicyManager.cpp
3c643073650f469574498c68a6c30e5098350c33 03-Jul-2014 Jungshik Jang <jayjang@google.com> Merge "Add force usage and category for System Audio Control."
6a3eb6a1b1bf59ebc8c7aba8a0a3542d60d2fcfa 03-Jul-2014 Andy Hung <hunga@google.com> Merge "Add multichannel to audio resample processing"
5c68f959eaa2e02fed5643c78e281fff42bcc0a2 07-Jul-2014 Glenn Kasten <gkasten@google.com> Merge "IAudioFlinger::openRecord now suggests notificationFrames"
7df8c0b799d8f52d6386e03313286dbd7d5cdc7c 03-Jul-2014 Glenn Kasten <gkasten@google.com> IAudioFlinger::openRecord now suggests notificationFrames

Change-Id: I08885cc381d03c522a23289e74f0e1ed46563863
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
udioflinger/Threads.h
665470b36f202bcc8ee2f7417f68fd2608dd07c1 04-Jul-2014 Eric Laurent <elaurent@google.com> audio: deprecate audio_stream_frame_size()

Bug: 15000850.
Change-Id: I955a6efa620b8f70fa5193c7853cbe88e879c9c3
udioflinger/Threads.cpp
8382a0da75fd65ceaf4c27b3ec4dedc8721b1b78 03-Jul-2014 Zhijun He <zhijunhe@google.com> Merge "Camera3: fix ZSL processor3 issues"
f0d962a6737eb8eec002d6804d9ffbe7bee672a0 30-Jun-2014 Zhijun He <zhijunhe@google.com> Camera3: fix ZSL processor3 issues

- Return input buffer in capture result. Per hal3.2 spec, we should return the
input buffer in process capture result rather than immediately after process
capture request.
- Make the depths of mZslQueue and mFrameList the same. It doesn't make sense
mFrameList depth is larger than mZslQueue depth.
- Set the depths of mZslQueue and mFrameList based on pipelineMaxDepth.
- Clear result queue while clearing zsl buffer queue.
- Hook up camera3 buffer listener with ZslProcessor3, make sure that adding the
same listener multiple times has no effect.
- Remove flush call in pushToReprocess, it is a guaranteed deadlock once
camera3 buffer listener is hooked up.

Change-Id: I285155ab4241e827145855d628f8e98b881c01d5
amera/libcameraservice/api1/client2/ZslProcessor3.cpp
amera/libcameraservice/api1/client2/ZslProcessor3.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3Stream.cpp
amera/libcameraservice/device3/Camera3Stream.h
amera/libcameraservice/device3/Camera3ZslStream.cpp
5ba4440c11eb975ec0e104e0af1981838f42f57c 04-Jul-2014 Glenn Kasten <gkasten@google.com> Merge "Remove obsolete IAudioFlinger::channelCount()"
839e4f33906b650140b578d42d6a51300f26703c 26-Jun-2014 Jungshik Jang <jayjang@google.com> Add force usage and category for System Audio Control.

System Audio Control in HDMI-CEC delegate audio control
to audio receiver. When system audio control is selected
in audio settings as audio output it should select one of ARC, SPDIF,
and LINE as audio output.
Whenever user select System Audio as audio output, audio
setting should call
setForceUse(AUDIO_POLICY_FORCE_FOR_SYSTEM_AUDIO, AUDIO_POLICY_FORCE_XXX);
and if other output is selected it should call
setForceUse(AUDIO_POLICY_FORCE_FOR_SYSTEM_AUDIO, AUDIO_POLICY_FORCE_NONE);

Change-Id: I1c237ee9291a4e0acf01a86aff3176edce5c14e0
udiopolicy/AudioPolicyManager.cpp
b647abc0959b07c7568d9eeaf6b177aac3b20b60 01-Jul-2014 Eric Laurent <elaurent@google.com> Merge "frameworks: av: services: audiopolicy: Added AudioPolicyEffects"
ba2b43990a7b4f0f2c425cf6cdfc63376a45772c 11-Jun-2014 bryant_liu <bryant_liu@htc.com> frameworks: av: services: audiopolicy: Added AudioPolicyEffects

Manage pre- and postprocessing effects defined in audio_effects.conf

Change-Id: Idea1478e3d434f8ff66907adb3c77663db78d583
udiopolicy/Android.mk
udiopolicy/AudioPolicyEffects.cpp
udiopolicy/AudioPolicyEffects.h
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/AudioPolicyService.cpp
udiopolicy/AudioPolicyService.h
296b741e8eb38e749e3202182f703a2e30ee5f1f 18-Jun-2014 Andy Hung <hunga@google.com> Add new AudioMixer processing hooks

This change adds new process and thread hooks for
multi-format handling.
It is enabled by setting kUseNewMixer = true.

Change-Id: I262a3d2e4411f8cef7370a497b77a34eb55f1f86
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/AudioMixerOps.h
954d248e02e19f8ecd165804b7d063d346154f4c 20-Jun-2014 Gaurav Batra <gbatra@nvidia.com> Camera API1/2: don't register the same listener multiple times

FrameProcessorBase allows register the same metadata result listener multiple
times with the same range IDs, which causes the same metadata result is
delivered multiple times for the same listener. This is problematic as client
like ZslProcessor's updateStream is called multiple times between captures, and
each updateStream calls registerListener unconditionally. The the ZSL metadata
result queue will be flooded with same metadata result multiple times and the
number of same result will keep growing until the queue is full.

Change-Id: I2ff7808e5dce61068a7111e7fbbce2aba95198cd
amera/libcameraservice/common/FrameProcessorBase.cpp
amera/libcameraservice/common/FrameProcessorBase.h
f92f22becdf7fce1f55d5ebd80ac2caa2ad55602 30-Jun-2014 Andy Hung <hunga@google.com> Merge "Add enabling variable for extended precision audio"
0b5003b7d80f70af20f387b1d0d990972a5570da 28-Jun-2014 Zhijun He <zhijunhe@google.com> Merge "Camera1: Don't send partial results to ZSL clients"
25a0aef19e170d2695f64b4c48296e7914155a88 25-Jun-2014 Zhijun He <zhijunhe@google.com> Camera1: Don't send partial results to ZSL clients

ZSL clients expect each received result as a complete result, and send back to
HAL as a reprocess capture request. CaptureSequencer client assumes results to
be non-partial too, it need look into some metadata that may not be present in
partial results.

Change-Id: Id716913fd6e1c914726abd6610fddf91141783c2
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/Camera2Client.h
amera/libcameraservice/api1/client2/CaptureSequencer.cpp
amera/libcameraservice/api1/client2/ZslProcessor.cpp
amera/libcameraservice/api1/client2/ZslProcessor3.cpp
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/common/FrameProcessorBase.cpp
amera/libcameraservice/common/FrameProcessorBase.h
7b428d51a711b493090a2be4d27699215761a64e 27-Jun-2014 Paul McLean <pmclean@google.com> Merge "Enabling USB Device and Android Device Vol inc/dec functionality for USB Audio Output"
b919dd3334fed73e16ebac7b7e10cf2add34c338 26-Jun-2014 Paul McLean <pmclean@google.com> Enabling USB Device and Android Device Vol inc/dec functionality for USB Audio Output

Bug: 13747844
Change-Id: Ied5bb44f63a4e7183c52f8111e9a389b60ffe75f
udiopolicy/AudioPolicyManager.cpp
6146c08f0c3dd8b9e5788063aa433f304a810602 18-Mar-2014 Andy Hung <hunga@google.com> Add enabling variable for extended precision audio

Set AudioFlinger::kEnableExtendedPrecision = true to enable
extended precision. Enabling will be required for devices (such as
USB) which report 24 bit or 32 bit sink formats.

Change-Id: I0dc1d7a4f7607086d7b536ea0e43aef0e696f2ee
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
ff17990df24913df9267c9c8b938178716298114 25-Jun-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "cameraservice: Deprecate triggerId tags"
1760291cf87005f18605a32a35aed9cae09988f7 25-Jun-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: fix several issues on routing APIs."
84c70244bfea51b3413a8d8ffbf74ca737436251 23-Jun-2014 Eric Laurent <elaurent@google.com> audio policy: fix several issues on routing APIs.

- Do not list duplicated outputs in listAudioPorts(): duplicated
outputs are not valid sources for audio patches.
Also add asserts to make sure that an audio port with no valid profile
is never used by audio routing APIs.
- Fix typos causing the wrong device type to be used
when creating an audio patch.
- Fix error in building config mask in toAudioPortConfig().

Change-Id: I4505891dbed2c2fa92804d45505c3c2deb921f3e
udiopolicy/AudioPolicyManager.cpp
741ace8776f052245e33a47a0b99400f75996f45 23-Jun-2014 Yin-Chia Yeh <yinchiayeh@google.com> cameraservice: Deprecate triggerId tags

The following two tags are deprecated from HAL 3.2:
ANDROID_CONTROL_AF_TRIGGER_ID
ANDROID_CONTROL_AE_PRECAPTURE_ID

Trigger IDs are now internal to camera service.

Change-Id: Iaebd62ecb0905a811fa37fe7850e0221c38a0006
amera/libcameraservice/api1/client2/FrameProcessor.cpp
amera/libcameraservice/api1/client2/FrameProcessor.h
amera/libcameraservice/device3/Camera3Device.cpp
0e88703fce53453382b33a6462f21e67019ae3fa 25-Jun-2014 Glenn Kasten <gkasten@google.com> Merge "Use sp<> instead of raw pointer for FastMixer"
4d23ca370dd0ce584f49a80ef9dfcdbb75ba2c8e 13-May-2014 Glenn Kasten <gkasten@google.com> Use sp<> instead of raw pointer for FastMixer

This avoids worry about the thread lifetime during tear-down.

Bug: 15858655
Change-Id: I896d24317bd6f53a574645cdf4cd514eaa205dd5
udioflinger/Threads.cpp
udioflinger/Threads.h
d5d08c57fab3b8ccbdb5df206b579e51308dd3e7 24-Jun-2014 Zhijun He <zhijunhe@google.com> Merge "Camera: Clear ZSL buffer queue when jpeg size is changed"
e2d83756cb088db15fda73616ca097b8d190e1a1 23-Jun-2014 Zhijun He <zhijunhe@google.com> Camera: Clear ZSL buffer queue when jpeg size is changed

Bug: 15284653
Change-Id: I4778e8443945d918801102ba600874568bde12dc
amera/libcameraservice/api1/Camera2Client.cpp
eaf07697a9146d27ca863db5c43da64af4f8c94a 23-Jun-2014 Andy Hung <hunga@google.com> Merge "Add test-mixer AudioMixer test program"
e4fc42359cdd9786e521054a3a0491d6bc3a9e1c 18-Jun-2014 Andy Hung <hunga@google.com> Add test-mixer AudioMixer test program

The shell script mixer_to_wav_tests.sh shows how to use
test-mixer.

Change-Id: Ia7f1a368972c9c33fadc96df4cb1fc8b22446c8c
udioflinger/tests/Android.mk
udioflinger/tests/mixer_to_wav_tests.sh
udioflinger/tests/test-mixer.cpp
cd8fce8fbe0f515e53a0ea0f50b739cf42ee57a4 18-Jun-2014 Yin-Chia Yeh <yinchiayeh@google.com> Camera2: get stream configs by device verison

Starting from device version 3.2, the following tags:
ANDROID_SCALER_AVAILABLE_FORMATS
ANDROID_SCALER_AVAILABLE_JPEG_MIN_DURATIONS
ANDROID_SCALER_AVAILABLE_JPEG_SIZES
ANDROID_SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS
ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES
ANDROID_SCALER_AVAILABLE_RAW_MIN_DURATIONS
ANDROID_SCALER_AVAILABLE_RAW_SIZES

are deprecated and replaced by:
ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS

Change-Id: Iadc34af0ea985a16a25759d7a9a3eb4845c486fd
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/Camera2Client.h
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
amera/libcameraservice/common/Camera2ClientBase.cpp
amera/libcameraservice/common/Camera2ClientBase.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
fc2aa4c228aa3f2d85fe15faa959dbacc85b731a 20-Jun-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera2: Fix lastFrameNumber counter in flush case"
8684b7f7977f535260367040931c1fd994cca3b4 13-Jun-2014 Yin-Chia Yeh <yinchiayeh@google.com> Camera2: Fix lastFrameNumber counter in flush case

Decrement the counter for those repeating requests never
sent to device.

Change-Id: I2064e51cb5d509d86dbde4a89e8157de33f574b0
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
fcd58351b6d7fcd62a0fe65b425723dd53d10e5e 20-Jun-2014 Zhijun He <zhijunhe@google.com> Merge "Camera2/3: Don't release recording buffer when stream is active"
50468413251bd92a1cdf9de8275a994dab8648d1 19-Jun-2014 Mark Salyzyn <salyzyn@google.com> libcameraservice: 64-bit compile warnings

Change-Id: I168332a0d4699f6f5597d4883342aa7af7ed92c6
amera/libcameraservice/api2/CameraDeviceClient.cpp
beb9e30471701d7b76bc14fd0d5dd1de95edd680 19-Jun-2014 Mark Salyzyn <salyzyn@google.com> audiopolicy: 64-bit compile warnings

Change-Id: I71db11499c4b0c434df8144c633d42282f5823c2
udiopolicy/AudioPolicyManager.cpp
7e4082ff105f5b2d8fe889b04703f9b828304fbd 20-Jun-2014 Igor Murashkin <iam@google.com> Merge "camera: Let #connectLegacy calls through with unspecified HAL version"
3d07d1ad0e60fd2b9a25563a0c24faf7f1fb1afc 20-Jun-2014 Igor Murashkin <iam@google.com> camera: Let #connectLegacy calls through with unspecified HAL version

This enables the camera2 shim to open a camera1 device without
turning the error codes into a RuntimeException.

Change-Id: I08d9d1e30e72025c41bd54b702d7ae95b32257be
amera/libcameraservice/CameraService.cpp
9b3cd171710991625a94dea645248f708cb957fb 20-Jun-2014 Andy Hung <hunga@google.com> Merge "Extract out test utility functions from resampler_tests"
06508824dc699c566bc4ffbd816b2227fba15379 20-Jun-2014 Eino-Ville Talvala <etalvala@google.com> am f0d8468d: DO NOT MERGE: CameraService: Fix permissions check issues

* commit 'f0d8468dcec08e1ac4edf62ec7da5782a0b84d93':
DO NOT MERGE: CameraService: Fix permissions check issues
b10cdadf0fb945e23ca77008d4af76584bd0e39a 17-Jun-2014 Zhijun He <zhijunhe@google.com> cameraservice: Implement HAL1 and higher HAL API coexistence

A higher hal version device like HAL3.2 can be opened as HAL1.0 device
if HAL supports it. This only applies to camera API1.

Change-Id: I4ae9f59f4317158cc1bd7ed7726e4032cdd1fa07
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/api1/CameraClient.cpp
amera/libcameraservice/device1/CameraHardwareInterface.h
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
udioflinger/PlaybackTracks.h
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
udiopolicy/AudioPolicyManager.cpp
c0e5ec8e2d8db15b97094374d0a248e041304b62 17-Jun-2014 Andy Hung <hunga@google.com> Extract out test utility functions from resampler_tests

These will be used for mixer tests later.

Change-Id: I22b1c89857058cfb2450afe15e80d6c9306a31f1
udioflinger/tests/Android.mk
udioflinger/tests/resampler_tests.cpp
udioflinger/tests/test_utils.h
60800208d31bc5a0770c3acb4f7df53c6bb1ac39 18-Jun-2014 Zhijun He <zhijunhe@google.com> Camera2/3: Don't release recording buffer when stream is active

It is dangerous to release all recording buffers when recording stream is
actively sending buffer to encoder. This change only releases all buffers when
recording stream is idle and recording stream is about to start.

Bug: 15667833
Change-Id: Ia4a84cac84a2062c13333467c66698273ffb0e23
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
29a8b2fe294a34ac7f004203426961a599e725ea 19-Jun-2014 Jean-Michel Trivi <jmtrivi@google.com> Merge changes I0fef0584,I322b91fa

* changes:
AudioPolicyManager: return output for audio attributes
AudioTrack construction with audio attributes
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
udiopolicy/AudioPolicyInterface.h
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
udiopolicy/AudioPolicyService.h
07b56676694b01825df2375e4c2ead4e55fe2d98 18-Jun-2014 Igor Murashkin <iam@google.com> Merge "camera: Add #getLegacyParameters, #supportsCameraApi to ICameraService"
65d14b9825311f9d1847cf282bd0419e71bac666 17-Jun-2014 Igor Murashkin <iam@google.com> camera: Add #getLegacyParameters, #supportsCameraApi to ICameraService

Change-Id: Ic86c8df3d703e7cf89caa856387e2c0a1b977401
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
63d877fe4138a95c27f1020b34e81bfa0430d2b8 17-Jun-2014 Eino-Ville Talvala <etalvala@google.com> CameraService: Fix permissions check issues

Bug: 15677063
Change-Id: I012c111fff90fefd9eb0fef7c9d6034f00c9c6df
amera/libcameraservice/CameraService.cpp
f0d8468dcec08e1ac4edf62ec7da5782a0b84d93 17-Jun-2014 Eino-Ville Talvala <etalvala@google.com> DO NOT MERGE: CameraService: Fix permissions check issues

Bug: 15677063
Change-Id: I012c111fff90fefd9eb0fef7c9d6034f00c9c6df
amera/libcameraservice/CameraService.cpp
5094675aa55458414e8b00a86a104a32ea1d55c0 16-Jun-2014 Glenn Kasten <gkasten@google.com> am a3603693: Merge "Fix deadlock" into lmp-preview-dev

* commit 'a3603693fb784d7e1a820ee4629a69730a0bb424':
Fix deadlock
a3603693fb784d7e1a820ee4629a69730a0bb424 16-Jun-2014 Glenn Kasten <gkasten@google.com> Merge "Fix deadlock" into lmp-preview-dev
3d61bc1ffc8afc8d7be3b0d4205c9b5ba6daf2e8 16-Jun-2014 Glenn Kasten <gkasten@google.com> Fix deadlock

Bug: 15591052
Change-Id: I76154e1640646d2ae8fae65e163e1f3ed1be17dc
udioflinger/Threads.cpp
1555a9882179a26ce116dffc920ab0be338db4b8 16-Jun-2014 Ruben Brunk <rubenbrunk@google.com> Merge "camera2: Add jpeg sizes to legacy mode static characteristics."
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
udioflinger/Tracks.cpp
152dbcf2e0d8a46691e22b102972540640f054ec 13-Jun-2014 Ruben Brunk <rubenbrunk@google.com> camera2: Add jpeg sizes to legacy mode static characteristics.

Bug: 15116722

- Adds jpeg size mapping to available output formats.

Change-Id: I73e46dd4309767ba41156d9ba03c4724bf234758
amera/libcameraservice/CameraService.cpp
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
b6be7f22a82ee3bad8bcc709d21e72fc4727da09 12-Jun-2014 Bryant Liu <bryant_liu@htc.com> frameworks: av: fix bug in the volume management

which can cause volume levels to be applied twice. After applying volume
in the effect chain, the remaining volume needs to be converted back to
floating point before providing to mAudioMixer.

Bug: 15583440
Change-Id: I3c884f95b0fa9ad1b554285b069601c850c54776
Signed-off-by: Glenn Kasten <gkasten@google.com>
udioflinger/Threads.cpp
14c403fbab456a4a63586a767fbae498f5f8c260 12-Jun-2014 Glenn Kasten <gkasten@google.com> am 0ac53364: Merge "Fix non-monotonic AudioTrack::getTimestamp after pause" into lmp-preview-dev

* commit '0ac53364b79dc72ee0c09f0efc46a22ab4374dbf':
Fix non-monotonic AudioTrack::getTimestamp after pause
2c79bf19fc6622e757794eb835798d7ce00eac2e 11-Jun-2014 Yin-Chia Yeh <yinchiayeh@google.com> am 3416f9ac: Merge "Camera2: Add null check to createStream" into lmp-preview-dev

* commit '3416f9ac471f97e9544ee821a97a101cbdd25b11':
Camera2: Add null check to createStream
0ac53364b79dc72ee0c09f0efc46a22ab4374dbf 11-Jun-2014 Glenn Kasten <gkasten@google.com> Merge "Fix non-monotonic AudioTrack::getTimestamp after pause" into lmp-preview-dev
ced6e74215937182fe2f9f6b0867f7c28ccd02c1 10-Jun-2014 Glenn Kasten <gkasten@google.com> Fix non-monotonic AudioTrack::getTimestamp after pause

Bug: 15523502
Change-Id: Ifd4aa7fca197bc041c1620fc3f7d953a8902551a
udioflinger/PlaybackTracks.h
udioflinger/Tracks.cpp
89f14dacfadea1b14149510d4dfbc75dc79b23bb 11-Jun-2014 Yin-Chia Yeh <yinchiayeh@google.com> Camera2: Add null check to createStream

Prevent a native null dereference crash.

bug: 15332257
Change-Id: I10c4053a0b4f07fbf52c37dd2f2853b501def669
amera/libcameraservice/api2/CameraDeviceClient.cpp
421c34ef58f89f4cc39737118bb58b762e84e1c9 11-Jun-2014 Andy Hung <hunga@google.com> Merge "Update resampler to fetch exactly the frames needed" into lmp-preview-dev
54188de28dc7766ba578a7ce01c61151c6febdc0 03-Jun-2014 Andy Hung <hunga@google.com> Update resampler to fetch exactly the frames needed

This avoids unnecessary overfetching/releasing, which
could cause problems with the upstream AudioBufferProvider.
A one input sample delay is placed on the stream compared
with the previous implementation.

This change only affects the Dynamic resampler.

Bug: 15548547
Change-Id: Ic7fcff130e0081b4724cfb5a00dc8e8b4a8b1af3
(cherry picked from commit 717007429a50c02d2acc704a8c1ebbe6760a2c22)
udioflinger/AudioResamplerDyn.cpp
42092d7015b078a09c36de107d924fc8139ccf50 11-Jun-2014 Ruben Brunk <rubenbrunk@google.com> Merge "DO NOT MERGE: camera2: Disallow connectDevice for all old HALs." into lmp-preview-dev
9bbfb139ff95752b22ca0f73521f97c6262787d7 12-Jun-2014 Zhijun He <zhijunhe@google.com> Merge "Camera3: Separate the video and preview size filtering"
eb4b03cb98e38bf76ee6e6debb74e76c30cbc228 11-Jun-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: use factory to create audio policy manager"
8129e799f2774235c8cce3bf25fd98ef4ca2471b 10-Jun-2014 Ruben Brunk <rubenbrunk@google.com> DO NOT MERGE: camera2: Disallow connectDevice for all old HALs.

(preview only)

Bug: 15515564

Change-Id: I14ab73b130ee5355d9cc8b3602738022a5a18710
amera/libcameraservice/CameraService.cpp
f269b8e0e9ab950fc6652b9594b7a3431c81630c 10-Jun-2014 Eric Laurent <elaurent@google.com> audio policy: use factory to create audio policy manager

Use the class factory to create the audio policy mamager
instead of AudioPolicyManager class constructor and
use a pointer to an AudioPolicyInterface.

Change-Id: Ibb5a8eee5d597db67cf13f279c909181cfee9949
udiopolicy/Android.mk
udiopolicy/AudioPolicyFactory.cpp
udiopolicy/AudioPolicyService.cpp
udiopolicy/AudioPolicyService.h
0cbfbf3624c67cf40a18d5405a46d002aa12a048 28-May-2014 Zhijun He <zhijunhe@google.com> Camera3: Separate the video and preview size filtering

Supported video sizes were generated from supported preview sizes, which
effectively filtered out sizes larger than 1080p. This change filters the
supported video sizes based on the media profiles supported h.264 max video
frame width and height.

Bug: 15287656

Change-Id: Ifbd9d37fb775371e2a4ee5cf80abbf83a75ffd65
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
6d1c8480c61c168e798876c0a3ef44ae17eb7630 10-Jun-2014 Eric Laurent <elaurent@google.com> Merge "sound trigger: stop recognition on sound model unload"
d8754e07e23eecb68068c0c392aeb0428c529e4e 10-Jun-2014 Eric Laurent <elaurent@google.com> DO NOT MERGE - AudioFlinger: increase per client memory pool

Temporary workaround for issue 14057166 allowing
AudioTracks from a given client to use up to 4MB
of shared memory.

Bug: 14057166.
Change-Id: I19adb8d424ed170df61c1cd706be3d10788edfc1
udioflinger/AudioFlinger.cpp
1a1cba8f9a93db188b09d9754987354029129113 10-Jun-2014 Eric Laurent <elaurent@google.com> sound trigger: stop recognition on sound model unload

Force a stop recognition command to the HAL when
unloading a sound model and recognition is still active.

Change-Id: I7379a64a37bbc3eeea08e0e1d59e427de9544a10
oundtrigger/SoundTriggerHwService.cpp
51fabcd581f293db52997b0d43b2ef606d5759ff 09-Jun-2014 Andy Hung <hunga@google.com> Merge "Add tests directory for AudioFlinger"
59a8923027d2d6a155c0fa434ae65559318da4b6 08-Jun-2014 Eric Laurent <elaurent@google.com> audio policy service: fix potential deadlock in destructor

In the AudioCommandThread loop, release mLock before releasing
the strong reference on the service as AudioPolicyService destructor
calls AudioCommandThread::exit() which acquires mLock.

Also check exiPending in thread loop before processing pending
commands or sleeping.

Bug: 15449050.

Change-Id: I148bf21bd67ef721b5b5ee2c1a6afb185c59daa3
udiopolicy/AudioPolicyService.cpp
7e45ef9db7446d33c941961c14555413641e444b 07-Jun-2014 Eric Laurent <elaurent@google.com> am 318cd78e: Merge "audio policy: added audio HAL version in audio_policy.conf" into lmp-preview-dev

* commit '318cd78e3b8503113919191b3711eb8be5d23d35':
audio policy: added audio HAL version in audio_policy.conf
eb108a4622825688b02d7afc981014d149913cd8 06-Jun-2014 Eric Laurent <elaurent@google.com> audio policy: added audio HAL version in audio_policy.conf

Each hardware module section in audio_policy.conf indicates
the audio HAL version it implements.

Also added a template audio_policy.conf file with examples
of device and gain descriptors added for audio HAL version3.0.

Bug: 14815883.
Change-Id: Id219d121f81f687363f6c18f2d1684b2448dcdf4
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
udiopolicy/audio_policy.conf
udiopolicy/audio_policy_conf.h
6f264ac08317a27958f2b0d3c35133b368dd9f3c 06-Jun-2014 Jean-Michel Trivi <jmtrivi@google.com> Merge "Audio policy: new media volume curve for speaker with DRC"
32ff60c6ec297256b59b6ce4f3cb341a0f4638dd 06-Jun-2014 Eric Laurent <elaurent@google.com> am 45df31f5: Merge "AudioFlinger: fix PatchPanel debug log." into lmp-preview-dev

* commit '45df31f511ba9ae9b45c769fc546eca4bcf4bbdb':
AudioFlinger: fix PatchPanel debug log.
ccd8e4a9da4d0bcc2c715452c5a18fabb23f86ac 06-Jun-2014 Jean-Michel Trivi <jmtrivi@google.com> Audio policy: new media volume curve for speaker with DRC

For devices with DRC on speaker (using the flag "speaker_drc_enabled"
in audio_policy.conf), set the speaker media volume to use a
new curve with more aggressive attenuation in the upper range.

Bug 15318604

Change-Id: Ia5fb9fdd608fddad22fadfb1065d35574030bb52
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
45df31f511ba9ae9b45c769fc546eca4bcf4bbdb 05-Jun-2014 Eric Laurent <elaurent@google.com> Merge "AudioFlinger: fix PatchPanel debug log." into lmp-preview-dev
4fa0bb24d51a8af69db9796f909fee6b61428cf4 05-Jun-2014 Eric Laurent <elaurent@google.com> Merge "add sound trigger native service"
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
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/AudioResamplerDyn.cpp
udioflinger/FastCapture.cpp
udioflinger/FastCapture.h
udioflinger/FastCaptureState.cpp
udioflinger/FastCaptureState.h
udioflinger/FastMixer.cpp
udioflinger/FastMixer.h
udioflinger/FastMixerState.cpp
udioflinger/FastMixerState.h
udioflinger/StateQueueInstantiations.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/TrackBase.h
udioflinger/Tracks.cpp
24478d47fc631ab33208f4dd9d034abb6839c992 05-Jun-2014 Eric Laurent <elaurent@google.com> AudioFlinger: fix PatchPanel debug log.

Bug: 14815883.
Change-Id: I71cf2ef74a96d3cdb27f2beb1b76b8979c738335
udioflinger/PatchPanel.cpp
f1caa55fbe2a32a27968d7be2f0cd134e412db4d 05-Jun-2014 Andy Hung <hunga@google.com> Merge "Update resampler to fetch exactly the frames needed"
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
b7a11d83f749ad0200778c4815e907d011d4b5d3 19-Apr-2014 Eric Laurent <elaurent@google.com> add sound trigger native service

Change-Id: I0cd954c1c7d28a334e786d0004431d4f6a1227ec
oundtrigger/Android.mk
oundtrigger/SoundTriggerHwService.cpp
oundtrigger/SoundTriggerHwService.h
a408743e8a759b344ac95322ae336459a81edf24 04-Jun-2014 Eric Laurent <elaurent@google.com> am 4bd9d452: Merge "audio policy: removed raw pointers." into lmp-preview-dev

* commit '4bd9d45230cd69c0409591874db3e6f2e3a226b3':
audio policy: removed raw pointers.
aaaea95d23b78313b7ddf1f8f670c9b0110474ed 04-Jun-2014 Eric Laurent <elaurent@google.com> am 83438ce6: Merge "audio policy: add permission for routing APIs." into lmp-preview-dev

* commit '83438ce6cbbff49ca26d4bd694ffdad4842ded5a':
audio policy: add permission for routing APIs.
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
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
1f2f2230900581e5de9cf01a883e5d9338f0df94 02-Jun-2014 Eric Laurent <elaurent@google.com> audio policy: removed raw pointers.

Use only RefBase objects for the following classes:
- AudioOutputDescriptor
- AudioInputDescriptor
- HwModule
- EffectDescriptor

Create a common base class AudioPortConfig for:
AudioOutputDescriptor, AudioInputDescriptor and DeviceDescriptor

Bug: 14815883.

Change-Id: I1bd193ef1020780d8b94c13142029903615aba97
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
717007429a50c02d2acc704a8c1ebbe6760a2c22 03-Jun-2014 Andy Hung <hunga@google.com> Update resampler to fetch exactly the frames needed

This avoids unnecessary overfetching/releasing, which
could cause problems with the upstream AudioBufferProvider.
A one input sample delay is placed on the stream compared
with the previous implementation.

This change only affects the Dynamic resampler.

Change-Id: Ic7fcff130e0081b4724cfb5a00dc8e8b4a8b1af3
udioflinger/AudioResamplerDyn.cpp
8f415570afb174f0781d8bf6b1c0fa6bdecca7cd 03-Jun-2014 Andy Hung <hunga@google.com> Merge "Change parameter type for volume to float in AudioMixer"
93f87fe162f6c18a296451d388ea68e76fd67fb6 03-Jun-2014 Andy Hung <hunga@google.com> Merge "Rename UNITY_GAIN to UNITY_GAIN_INT in AudioMixer"
9dc6699fd613c29fe08ef7bc0d32052c8ce297c1 03-Jun-2014 Glenn Kasten <gkasten@google.com> Merge "Use of fast capture by normal capture"
740a5ca81f6498b34baea04bb0fb3fc29fe1e135 03-Jun-2014 Andy Hung <hunga@google.com> Merge "Refactor setVolumeRampVariables in AudioMixer"
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
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
4ea00a25cf85877b48ebd1e15a657cfaab29af58 02-Jun-2014 Glenn Kasten <gkasten@google.com> Add mPrimaryOutputSampleRate

Change-Id: I46b527fc3f2b5a5720a74b4f0b9a8f2e0d570b09
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
5284ed53c14cd4d15bd793000ede7166d143e69a 29-May-2014 Eric Laurent <elaurent@google.com> audio policy: add permission for routing APIs.

Add check for signature or system permission
"android.permission.MODIFY_AUDIO_ROUTING" for routing
APIs.

Bug: 14815883.
Change-Id: Iefa0b9d90127a53e03a2e6d50dc93d8f4ae63e2f
udioflinger/ServiceUtilities.cpp
udioflinger/ServiceUtilities.h
udiopolicy/AudioPolicyInterfaceImpl.cpp
43466a133984182b250453cea244eb146e83c010 02-Jun-2014 Eric Laurent <elaurent@google.com> am 62aaabb3: audio policy: fix unitialized hw module in audio port

* commit '62aaabb3905c61bb7acd6037414c206240a31c32':
audio policy: fix unitialized hw module in audio port
62aaabb3905c61bb7acd6037414c206240a31c32 02-Jun-2014 Eric Laurent <elaurent@google.com> audio policy: fix unitialized hw module in audio port

The hw module handle was not initialized when creating
and audio port configuration from an input stream descriptor.

Bug 15376641.

Change-Id: I6c784cded68a5c665fd22c3643765c63f70eb241
udioflinger/PatchPanel.cpp
udiopolicy/AudioPolicyManager.cpp
d28148537693b19320f3c3b5b34816d45542e9bd 02-Jun-2014 Andy Hung <hunga@google.com> Merge "Fix floating point output from mixer"
f947dbce4390f2c3c460325d37002a34f09c0b74 01-Jun-2014 Glenn Kasten <gkasten@google.com> Remove obsolete IAudioFlinger::channelCount()

Change-Id: Ie623edae2e795f9155f1f452fe4e6c7217a4a4c8
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Threads.h
e28456465fca86ed1b8b2225de073cfba64c7c42 01-Jun-2014 Glenn Kasten <gkasten@google.com> Merge "Start adding FastCapture based on FastThread WIP"
481c8837c7f67852e06137d636915ea6e96247e3 31-May-2014 Eric Laurent <elaurent@google.com> am e1715a46: audio policy: add audio port gain control

* commit 'e1715a465a29db625da9d0ea365edf371e39e201':
audio policy: add audio port gain control
68f5fb51f6ef2f54a0955bac98c16c2aa811f809 31-May-2014 Eric Laurent <elaurent@google.com> am 1afeecb8: audio policy: parse device descriptors in config file

* commit '1afeecb88bea660b2c10b2096be0fd02433303ce':
audio policy: parse device descriptors in config file
72aa32f7dbbfb658097930b57659d8e50f24a953 31-May-2014 Eric Laurent <elaurent@google.com> resolved conflicts for merge of b52c152d to master

Change-Id: I34869bda071d511c9595ea0a5ff6571eb34da059
e1715a465a29db625da9d0ea365edf371e39e201 20-May-2014 Eric Laurent <elaurent@google.com> audio policy: add audio port gain control

Implement setAudioPortConfig() API to configure an
audio port.
Currently limited to gain control.

Bug: 14815883.

Change-Id: Ic1b268e5ba5c277e9f5b8fa63c81dd7c0b250024
udioflinger/PatchPanel.cpp
udiopolicy/AudioPolicyClientImpl.cpp
udiopolicy/AudioPolicyInterface.h
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyService.cpp
udiopolicy/AudioPolicyService.h
6be494077f8d7970f3a88129c5d139c5a0c88f6d 30-May-2014 Andy Hung <hunga@google.com> Change parameter type for volume to float in AudioMixer

Change-Id: I4da1505ce852505f86f8e5b87f60e8edceeb30e0
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/FastMixer.cpp
udioflinger/Threads.cpp
97ae82408469286426d8dc57a361350f74e24a8b 30-May-2014 Andy Hung <hunga@google.com> Rename UNITY_GAIN to UNITY_GAIN_INT in AudioMixer

Change-Id: Ic040311305026f0b4c4280a5b3bef7a447ac1da3
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/Tracks.cpp
5866a3b9689035580c31f1a02037b8176d7508a7 30-May-2014 Andy Hung <hunga@google.com> Refactor setVolumeRampVariables in AudioMixer

Change-Id: I8fcf3101bcea292de7c65433fa578f1c9cdd0974
udioflinger/AudioMixer.cpp
f8a106ae5c40735de6c75e7c12d5e0e2e22f12cf 30-May-2014 Andy Hung <hunga@google.com> 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
udioflinger/AudioMixer.cpp
671714b80cad4725d07691fbd8284cb869a0c27f 30-May-2014 Eric Laurent <elaurent@google.com> am 6a94d69d: audio policy: implement routing control

* commit '6a94d69dc4f32abb53c466a96f905bb199be6417':
audio policy: implement routing control
47aaf6da5d7ecc2ad28de004d1820b64b02dd344 30-May-2014 Andy Hung <hunga@google.com> Merge "Add multiple format capability to FastMixer"
c0008d1146ccdeda0a4eb08f8225225b1b1237dc 30-May-2014 Eric Laurent <elaurent@google.com> Merge "handle in and out audio device connection separately"
1258c1ab592a899fabb1e31eb5db2ef413b6f38a 24-May-2014 Andy Hung <hunga@google.com> Add multiple format capability to FastMixer

Floating point data from MixerThread into FastMixer.
Multiple output format capability from FastMixer to Sink.

Change-Id: I0da17810ee71381a39a006c46faec71108d22c26
udioflinger/FastMixer.cpp
udioflinger/FastMixer.h
udioflinger/Threads.cpp
1afeecb88bea660b2c10b2096be0fd02433303ce 14-May-2014 Eric Laurent <elaurent@google.com> audio policy: parse device descriptors in config file

Implement parsing of audio_policy.conf for device and gain
controller definitions.
Copy audio_policy_conf.h from hardware_legacy.
New syntax for devices and gain controllers description will not
be parsed by legacy audio policy manager.

Bug: 14815883.

Change-Id: I7f1035d514dcf55fb3e45ed1f633a2f63ee398f5
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
udiopolicy/audio_policy_conf.h
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
udiopolicy/AudioPolicyClientImpl.cpp
udiopolicy/AudioPolicyInterface.h
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyService.cpp
udiopolicy/AudioPolicyService.h
6a94d69dc4f32abb53c466a96f905bb199be6417 20-May-2014 Eric Laurent <elaurent@google.com> audio policy: implement routing control

Add implementation of audio routing control via AudioSystem APIs.

The following APIs are implemented:
- listAudioPorts(): return a list of devices and output/input mixers ports
that can be used as sources or sinks for audio patches.
- createAudioPatch()/releaseAudioPatch(): create/release a connection patch between
two audio ports (e.g. to connect input from an HDMI device to a speaker output device).
Only one client application can own a patch from a given source.
When an audio port (device or mix) is part of an application created patch, its routing cannot
not be changed by a policy decision.
- listAudioPatches(): return a list of existing patches.

Each audio port addition/removal and each audio patch creation/release increments a generation count.
This generation count is used to ensure consistency betwen calls to
listAudioPorts() and listAudioPatches().

Bug: 14815883.

Change-Id: I022b638c2f5f0bb41543c7cfca7488fb45cfdd80
udioflinger/PatchPanel.cpp
udiopolicy/AudioPolicyInterface.h
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
b71e58b64cd4992355cf6afaf3f3530f723bc72c 30-May-2014 Eric Laurent <elaurent@google.com> handle in and out audio device connection separately

AudioService now indicates in and out device connection
separately in case of combined devices like wired headset
or BT SCO headset.

Change-Id: I97adf8343d0ce32c279ffc3cce5c84ca7a349e16
udiopolicy/AudioPolicyManager.cpp
1d26ddf715182d6082804ff70086c47fb8c354b8 30-May-2014 Andy Hung <hunga@google.com> Avoid resetting BufferProviders in mixer unnecessarily

Change-Id: Iad85c4dfd21be1dbf89dc11906106b34219376f8
udioflinger/AudioMixer.cpp
7dac33136d71ea566de4531235f5fbbd28048f0c 29-May-2014 Andy Hung <hunga@google.com> Merge "Update dynamic resampler buffer fetching"
1afdf38e0d8979e0a6bd5f3cc9b6751ca132753e 28-May-2014 Mike Lockwood <lockwood@google.com> Merge "Add audio policy support for A2DP sink"
203b1a18a806e2c56c701aac49cda963bccfad5b 01-Apr-2014 Eric Laurent <elaurent@google.com> DO NOT MERGE - IAudioPolicyService interface extension for patch panel

Change-Id: I0a62e5416edc41c3a0e816275085ab18a23066f1
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/AudioPolicyService.h
951f455566775e5f01e67c5ee26863d7d19209d7 20-May-2014 Eric Laurent <elaurent@google.com> DO NOT MERGE - audioflinger: first patch panel implementation.

Added a new PatchPanel subclass to AudioFlinger
to handle audio ports and audio patches configuration
and connection.
The first implementation does not add new functionnality.
AudioPolicyManager uses patch panel interface to control
device routing.
AudioFlinger:
- Added PatchPanel class. The first implementation does not
add new functionnality. PatchPanel handles routing commands
for audio HAL after 3.0 or converts to setParameters for audio
HALs before 3.0.
- Added config events to ThreadBase to control synchronized
audio patch connection.
AudioPolicyManager:
- Use PatchPanel API to control device selection isntead of setParameters.
- New base class AudioPort common to audio device descriptors
and input output stream profiles. This class is RefBase and groups
attributes common to audio ports.
- Use same device selection flow for input as for outputs:
getNewInputDevice -> getDeviceForInptusiource -> setInputDevice

Change-Id: Idaa5a883b19a45816651c58cac697640dc717cd9
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/PatchPanel.cpp
udioflinger/PatchPanel.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udiopolicy/AudioPolicyClientImpl.cpp
udiopolicy/AudioPolicyInterface.h
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
udiopolicy/AudioPolicyService.cpp
udiopolicy/AudioPolicyService.h
1cda6afaf6207a41303e653a6ecd7909d73186eb 11-Apr-2014 Eric Laurent <elaurent@google.com> DO NOT MERGE - IAudioFlinger interface extension for patch panel

Change-Id: Iaabe0a7e315d5725e00a74a6ed40339b98f20330
udioflinger/AudioFlinger.h
411cb8e45442d16d983a38722c7c7bce487bde6b 27-May-2014 Andy Hung <hunga@google.com> 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
udioflinger/AudioResamplerDyn.cpp
fe9adc4850572cb04a9cf7877d0e77d0c1fde84e 27-May-2014 Eric Laurent <elaurent@google.com> DO NOT MERGE - audioflinger: fix deadlock upon AudioRecord creation error

AudioFlinger:openRecord() should not hold mClientLock when
releasing the local reference on AudioRecord as the destructor will
also lock mClientLock.
Same fix for AudioFlinger::createTrack().
Also make sure that AudioFlinger::createEffect() holds mClientLock
when clearing local reference to the Client in case of error.

Regression introduced by 021cf9634ab09c0753a40b7c9ef4ba603be5c3da

Bug: 15118096.
Change-Id: Ie961c398c8e0460bca9b95e2ee4ce6859316c275
udioflinger/AudioFlinger.cpp
e5cfbd53612f2383f2e32b7a2605628f3c7baf6e 23-May-2014 Eric Laurent <elaurent@google.com> DO NOT MERGE - audio policy: enable use of new AudioPolicyManager

Do not define USE_LEGACY_AUDIO_POLICY by default.
By default, all devices will now use the new audio policy implementation
in AudioPolicyManager.cpp

To continue using the legacy audio policy implemented by
AudioPolicyManagerBase in libhardware_legacy a device should
define USE_LEGACY_AUDIO_POLICY in its makefile.

Change-Id: I7b8cac3cbb24b11105ba6233501c7212f5985727
udiopolicy/Android.mk
d6461906586032716fc5ff9970c8c6cacf235a20 22-May-2014 Eric Laurent <elaurent@google.com> DO NOT MERGE - audioflinger: test min HAL version instead of current

Change-Id: Ibce2353b4390329b4c1a453e829178e3986c25a7
udioflinger/AudioFlinger.cpp
546734b3ab577d46afe863515104a062e88a109b 02-Apr-2014 Andy Hung <hunga@google.com> Add tests directory for AudioFlinger

Native tests for audio resampler through gtest framework.

Change-Id: Ia340ca51f9b9b78d67e03e3541e4462b98578c95
udioflinger/tests/Android.mk
udioflinger/tests/build_and_run_all_unit_tests.sh
udioflinger/tests/resampler_tests.cpp
udioflinger/tests/run_all_unit_tests.sh
5584c58c7c952b5ed891bbff3b00a0be3f96196d 28-May-2014 Eric Laurent <elaurent@google.com> Merge "IAudioPolicyService interface extension for patch panel"
ecc03733bfd3262ffadef3166e6be23b539c505c 28-May-2014 Eric Laurent <elaurent@google.com> Merge "audioflinger: first patch panel implementation."
5e49780692b4f23966be89ac32b19c3c1ead4e85 28-May-2014 Eric Laurent <elaurent@google.com> Merge "IAudioFlinger interface extension for patch panel"
41b0e2421a0cf8dc22f224ea078678d7db651bda 14-May-2014 Mike Lockwood <lockwood@google.com> Add audio policy support for A2DP sink

Change-Id: Ifcad9c1d4bdb79668e03a31d843ec46670dd0bd8
udiopolicy/AudioPolicyManager.cpp
c9cd62bf52dd5ea8dc292fb7bc80ff51ed1a79bb 28-May-2014 Glenn Kasten <gkasten@google.com> Merge "Allow kFastTrackMultiplier to be specified per device"
0349009fd19f89f8414c428f6b71b369f7546085 27-May-2014 Glenn Kasten <gkasten@google.com> Allow kFastTrackMultiplier to be specified per device

Change-Id: I4eaaaf038df720cec4f5d9221d1b632970f9e3dd
udioflinger/Threads.cpp
b9e722bdf00333557578497c5abfc77c5d779ecb 28-May-2014 Andy Hung <hunga@google.com> Merge "Rename mixBuffer to mMixerBuffer in FastMixer"
018d324dc599c5f4238a4cd631baac47c28d59fe 27-May-2014 Andy Hung <hunga@google.com> Merge "Add multiple format capability to AudioMixer"
8670c31fddbeadcf9627aa970c69a823f13939ff 01-Apr-2014 Eric Laurent <elaurent@google.com> IAudioPolicyService interface extension for patch panel

Change-Id: I0a62e5416edc41c3a0e816275085ab18a23066f1
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/AudioPolicyService.h
1c333e252cbca3337c1bedbc57a005f3b7d23fdb 20-May-2014 Eric Laurent <elaurent@google.com> audioflinger: first patch panel implementation.

Added a new PatchPanel subclass to AudioFlinger
to handle audio ports and audio patches configuration
and connection.
The first implementation does not add new functionnality.
AudioPolicyManager uses patch panel interface to control
device routing.
AudioFlinger:
- Added PatchPanel class. The first implementation does not
add new functionnality. PatchPanel handles routing commands
for audio HAL after 3.0 or converts to setParameters for audio
HALs before 3.0.
- Added config events to ThreadBase to control synchronized
audio patch connection.
AudioPolicyManager:
- Use PatchPanel API to control device selection isntead of setParameters.
- New base class AudioPort common to audio device descriptors
and input output stream profiles. This class is RefBase and groups
attributes common to audio ports.
- Use same device selection flow for input as for outputs:
getNewInputDevice -> getDeviceForInptusiource -> setInputDevice

Change-Id: Idaa5a883b19a45816651c58cac697640dc717cd9
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/PatchPanel.cpp
udioflinger/PatchPanel.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udiopolicy/AudioPolicyClientImpl.cpp
udiopolicy/AudioPolicyInterface.h
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
udiopolicy/AudioPolicyService.cpp
udiopolicy/AudioPolicyService.h
1a83b736737e7f625371093519ff7a10b05e0c63 27-May-2014 Eric Laurent <elaurent@google.com> Merge "audioflinger: fix deadlock upon AudioRecord creation error"
4b123406c10c17852734a1b691bb9ce2a4cb7caf 11-Apr-2014 Eric Laurent <elaurent@google.com> IAudioFlinger interface extension for patch panel

Change-Id: Iaabe0a7e315d5725e00a74a6ed40339b98f20330
udioflinger/AudioFlinger.h
5912117110ae6efadd862fcb0e395fdcd18aa00c 27-May-2014 Glenn Kasten <gkasten@google.com> Merge "Move validation of frameCount from set to openRecord_l"
fe1a94e68e173fe4dfe7699112422a94eddacb4e 27-May-2014 Eric Laurent <elaurent@google.com> audioflinger: fix deadlock upon AudioRecord creation error

AudioFlinger:openRecord() should not hold mClientLock when
releasing the local reference on AudioRecord as the destructor will
also lock mClientLock.
Same fix for AudioFlinger::createTrack().
Also make sure that AudioFlinger::createEffect() holds mClientLock
when clearing local reference to the Client in case of error.

Regression introduced by 021cf9634ab09c0753a40b7c9ef4ba603be5c3da

Bug: 15118096.
Change-Id: Ie961c398c8e0460bca9b95e2ee4ce6859316c275
udioflinger/AudioFlinger.cpp
45d68d366d07b10733c1e8af6a6984befbc08ce1 24-May-2014 Andy Hung <hunga@google.com> Rename mixBuffer to mMixerBuffer in FastMixer

Likewise mixBufferState becomes mMixerBufferState.
This harmonizes with the naming in AF::MixerThread.

Change-Id: I1255d7c07cc2c6ee925d7430925236d2bd163122
udioflinger/FastMixer.cpp
udioflinger/FastMixer.h
ef7c7fbd0e3fb36af14cd7d39f64c949031516a5 13-May-2014 Andy Hung <hunga@google.com> Add multiple format capability to AudioMixer

Change-Id: I04ac1cafd90b6ed652f8d51888ad07576678f0bc
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/FastMixer.cpp
c62476f0c0c1cf9283a38852bde0a4c9434df712 24-May-2014 Andy Hung <hunga@google.com> Merge "Add format parameter to getTrackName() and track_t"
7a470c375c2cef8b186fbadd9915b30e5d757453 24-May-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: enable use of new AudioPolicyManager"
39cf5681975ec9097742c47de7c2d0f8c11248a2 23-May-2014 Glenn Kasten <gkasten@google.com> Merge "Allow track buffer "allocation" to be from pipe"
24ffe7a9161943c8ba2353e956653a71af564b5d 23-May-2014 Elliott Hughes <enh@google.com> am 79262cfc: am 5b756bfd: am 8b187f4a: Merge "Move frameworks/av off <sys/atomics.h>."

* commit '79262cfc14a9d8b5aa29d43e84ea91eedb9492ba':
Move frameworks/av off <sys/atomics.h>.
7a0aecb09a562fec144c07aeb7a3468a1e6da52e 23-May-2014 Eric Laurent <elaurent@google.com> audio policy: enable use of new AudioPolicyManager

Do not define USE_LEGACY_AUDIO_POLICY by default.
By default, all devices will now use the new audio policy implementation
in AudioPolicyManager.cpp

To continue using the legacy audio policy implemented by
AudioPolicyManagerBase in libhardware_legacy a device should
define USE_LEGACY_AUDIO_POLICY in its makefile.

Change-Id: I7b8cac3cbb24b11105ba6233501c7212f5985727
udiopolicy/Android.mk
f91df1b368a140abd37c80b204bd48d78778cc43 13-Mar-2014 Glenn Kasten <gkasten@google.com> Start adding FastCapture based on FastThread WIP

This version supports at most one fast capture client.

Change-Id: Idf609bfc80ae22433433d66a5232c043c65506df
udioflinger/Android.mk
udioflinger/FastCapture.cpp
udioflinger/FastCapture.h
udioflinger/FastCaptureState.cpp
udioflinger/FastCaptureState.h
udioflinger/StateQueueInstantiations.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
udioflinger/Threads.cpp
6181ffd90a436f333c43a7f812391eee2c35005a 13-May-2014 Glenn Kasten <gkasten@google.com> Allow track buffer "allocation" to be from pipe

Change-Id: Ib9ac170f8e8b7746b3588157a56cbee3b753a1cb
udioflinger/Threads.h
udioflinger/TrackBase.h
udioflinger/Tracks.cpp
5b756bfdaa27c8b606720544bf507213cf47376d 23-May-2014 Elliott Hughes <enh@google.com> am 8b187f4a: Merge "Move frameworks/av off <sys/atomics.h>."

* commit '8b187f4acea8d7e517ff9ced32fc7368bdbaa6e0':
Move frameworks/av off <sys/atomics.h>.
63492411cf4abff452b47f59ec7ff6f3e9925c84 22-May-2014 Elliott Hughes <enh@google.com> Move frameworks/av off <sys/atomics.h>.

Bug: 14903517
Change-Id: I92cdfc618d83fd914cfb558a07b1deae0255fccb
udioflinger/FastMixer.cpp
5806b3533437e3d83208e8e9d6bd74ed304e51ec 22-May-2014 Eric Laurent <elaurent@google.com> audioflinger: test min HAL version instead of current

Change-Id: Ibce2353b4390329b4c1a453e829178e3986c25a7
udioflinger/AudioFlinger.cpp
87cebadd48710e42474756fc3513df678de045ce 22-May-2014 Elliott Hughes <enh@google.com> resolved conflicts for merge of f285c91e to master

Change-Id: I4c995e297d09c0854a42142cc57dce8b771acf65
c10b874c4d0d6208fb93a7aa0dc8af4418faad45 22-May-2014 Calin Juravle <calin@google.com> am d5516339: Merge "Move frameworks/av from fdprintf to POSIX dprintf."

* commit 'd551633916d3677da4dda10aba6837bdc6803ee0':
Move frameworks/av from fdprintf to POSIX dprintf.
8b5f642eb2364ea7fe46a5b3af51b48b58f12183 22-May-2014 Elliott Hughes <enh@google.com> Move frameworks/av from fdprintf to POSIX dprintf.

Bug: 11156955
Change-Id: Ia98cd16b4c1f7be87cf060b7456de4f40896bacb
udioflinger/AudioFlinger.cpp
udioflinger/AudioWatchdog.cpp
udioflinger/FastMixer.cpp
udioflinger/StateQueue.cpp
udioflinger/Threads.cpp
amera/libcameraservice/utils/CameraTraces.cpp
edialog/MediaLogService.cpp
77a3374a6170fb5f0168169bc4bc3fa9baf318eb 22-May-2014 Ruben Brunk <rubenbrunk@google.com> Merge "camera2: Update CameraService for HAL1 shim."
9a59d411cbe68d6027c541854c6d7c1348e4ee3d 22-May-2014 Elliott Hughes <enh@google.com> am 85e6e87c: Merge "Restore accidentally-removed NULL timeout."

* commit '85e6e87c41bba51729cee8958a5c30157c8dc674':
Restore accidentally-removed NULL timeout.
e348c5b72ad889389c7c1c900c121f0fbee221b5 22-May-2014 Elliott Hughes <enh@google.com> resolved conflicts for merge of c0bf836f to master

Change-Id: I5cf238fa56d6fff443b212870cf9dd7f1110e7da
22f22ffcb111b38eb7a303bfde39aed108b43e07 22-May-2014 Elliott Hughes <enh@google.com> Restore accidentally-removed NULL timeout.

Change-Id: I933c80fea50950243f109acf8d6350013aaa811f
udioflinger/FastMixer.cpp
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
udioflinger/FastMixer.cpp
udioflinger/FastMixer.h
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
b2119af7f4ced0ecfefd4c7388f86b4e3a3ea7d8 10-May-2014 Ruben Brunk <rubenbrunk@google.com> camera2: Update CameraService for HAL1 shim.

Updates the camera service to handle shim connections.

Changes include:
- Adds begin/end configure binder calls.
- Adds cache for shim client static camera metadata.
- Implements basic getCameraCharacteristic functionality for shim clients.

Bug: 15116722
Bug: 15117269

Change-Id: I510c5888ca15f8e7d3b8ed1680ff1c7f8f514744
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
9382378b6b271949bdce527ea3da748c13c4c692 22-May-2014 Elliott Hughes <enh@google.com> resolved conflicts for merge of b1080917 to master

Change-Id: Iabbe3e95e29f28461ff722b550e8a9f35bd2528f
d83062287758be57d1d0908b30bb18aa9b367f38 22-May-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: split audio policy library"
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
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
98c6be0e30fa28e752b13f3dd5986d41710bb7ae 21-May-2014 Eric Laurent <elaurent@google.com> audio policy: split audio policy library

Split audio policy library into a service part and a policy part.
This will allow OEMs to customize the policy part:
- libaudiopolicyservice for the service.
- libaudiopolicymanager for the policy.

Two build options can be defined in device make file to select
the policy library:
- USE_LEGACY_AUDIO_POLICY = 1: this will use the legacy policy
in hardware/libhardware_legacy implemented by AudioPolicyManagerBase class.
This policy is loaded as a harware module and exposes the audio policy HAL
defined in include/hardware/audio_policy.h and is in a library called
audio_policy.XXX.so (e.g audio_policy.default.so)

The legacy HAL will not be updated with new features.

If USE_LEGACY_AUDIO_POLICY is not defined, the policy is implemented by
a class named AudioPolicyManager exposing an interface defined in
AudioPolicyInterface.h.
The corresponding library is libaudiopolicymanager.so.

New features will be added only to AudioPolicyInterface.h

The default implementation is provided here in file AudioPolicyManager.cpp

OEMs wanting to cutomize the policy can implement the AudioPolicyManager class
and provide the libaudiopolicymanager.so library.
In this case the device make file should define:
- USE_CUSTOM_AUDIO_POLICY = 1

For now, USE_LEGACY_AUDIO_POLICY = 1 is forced in audio policy service make file.
This will be removed when the new audio policy is enabled.

Change-Id: I066799dacc9b182b468a43d48ff7798c9109a414
udiopolicy/Android.mk
498692535c7ceecb3434a99c47e4c90ba3fdd90e 20-May-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: add new audio devices"
00ddac6f47a066a545342a81c40425e3a153e8a1 20-May-2014 Andy Hung <hunga@google.com> Merge "Update AudioMixer::getTrackName to save channelMask"
1b776237ec911f4bb09f42f295b41e13f5f49113 20-May-2014 Eric Laurent <elaurent@google.com> audio policy: add new audio devices

Add entries for new audio devices to string to enum table used
for audio_policy.conf file parsing.

Change-Id: Ica04c34af037d890a343af0b9eeb2ff0e5c86b02
udiopolicy/AudioPolicyManager.cpp
b4db73d022f3de3530bc2b3c9c831ccfdd1a2ead 20-May-2014 Andy Hung <hunga@google.com> Merge "Use new channel count functions for audio masks"
1e54e6dfc1bb8d33089ed8857f0f194e696f85e2 19-May-2014 Glenn Kasten <gkasten@google.com> Merge "Pass stereo gains as packed minifloat"
e8a1ced4da17dc6c07803dc2af8060f62a8389c1 10-May-2014 Andy Hung <hunga@google.com> Add format parameter to getTrackName() and track_t

Change-Id: Ia152a839014e235fbfb656104c15d7c1b456d02e
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/FastMixer.cpp
udioflinger/FastMixerState.cpp
udioflinger/FastMixerState.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
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
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.h
udioflinger/Effects.h
udioflinger/FastMixer.cpp
udioflinger/FastMixerState.h
udioflinger/PlaybackTracks.h
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
5859b98476de3bbb4ae4dc00d4b2f010ca7897d3 19-May-2014 Eric Laurent <elaurent@google.com> am be2664da: am 4c9bde7a: am ce473c32: Merge "Codec Offload: Add NULL check as mCallbackThread is NULL when offloaded HAL is running BLOCKING mode"

* commit 'be2664dac34a6a9d9f754d4097b32158d4947cd2':
Codec Offload: Add NULL check as mCallbackThread is NULL when offloaded HAL is running BLOCKING mode
4c9bde7a3e636d3ecccd7905d142dbbb80e977a0 19-May-2014 Eric Laurent <elaurent@google.com> am ce473c32: Merge "Codec Offload: Add NULL check as mCallbackThread is NULL when offloaded HAL is running BLOCKING mode"

* commit 'ce473c32705e2d1c5fcc817198101e1220b3c8f7':
Codec Offload: Add NULL check as mCallbackThread is NULL when offloaded HAL is running BLOCKING mode
68112fc4f77ab8c4a744782f78e9792afe0cbfc1 14-May-2014 Andy Hung <hunga@google.com> Update AudioMixer::getTrackName to save channelMask

Change-Id: I4fb4abbff1b05bdd0f6e21b5f5f4c3f2a57ae28d
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/AudioMixer.cpp
udioflinger/FastMixer.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>
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.cpp
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
deb9081a61b446dbe50461082974a4228899f178 14-May-2014 Glenn Kasten <gkasten@google.com> Merge "Pull up mFlags and isFastTrack from Track to TrackBase"
cbe6fddebe3ec84176037de7f9681d2407fa1113 14-May-2014 Glenn Kasten <gkasten@google.com> Merge "Explicitly include Configuration.h"
2d859b91a59b4f6d63ff2bd93b462cab60f4a8d7 14-May-2014 Glenn Kasten <gkasten@google.com> Merge "Fix memory corruption if increaseSamplingN is not called"
56604aa3a56dc8e15532597a0a74b3c7b165e006 13-May-2014 Uday Gupta <guptau@broadcom.com> Codec Offload: Add NULL check as mCallbackThread is NULL
when offloaded HAL is running BLOCKING mode

b/14897952

Change-Id: I159a33e1181c1a62d80ab4bd3337a35dafaad884
Signed-off-by: Uday Gupta <guptau@broadcom.com>
Signed-off-by: Pierre Couillaud <pierre@broadcom.com>
udioflinger/Threads.cpp
755b0a611f539dfa49e88aac592a938427c7e1b8 13-May-2014 Glenn Kasten <gkasten@google.com> Pull up mFlags and isFastTrack from Track to TrackBase

Change-Id: I6bd48292310be4e05758a11f617f50585904422d
udioflinger/PlaybackTracks.h
udioflinger/RecordTracks.h
udioflinger/Threads.cpp
udioflinger/TrackBase.h
udioflinger/Tracks.cpp
5b17c0b5b418c340d3e5201a72ee8c88c1755355 13-May-2014 Glenn Kasten <gkasten@google.com> Explicitly include Configuration.h

Must include Configuration.h in any source file with #ifdef or #if that
depends on Configuration.h. This avoid inconsistencies that could result
in subtle bugs.

Change-Id: I99fdf19d56e7c73de4e7d672b937336b932a2a00
udioflinger/AudioFlinger.h
udioflinger/StateQueue.h
963698408b1ce0f2ac7eab1e863dc7271de116a3 13-May-2014 Glenn Kasten <gkasten@google.com> Fix memory corruption if increaseSamplingN is not called

Change-Id: Icbf9aaf68c25ba3330ceb79167bd776cf0342d0d
udioflinger/FastThreadState.cpp
021cf9634ab09c0753a40b7c9ef4ba603be5c3da 13-May-2014 Eric Laurent <elaurent@google.com> AudioFlinger: add specific mutex for client lists

Add a specific mutex to protect access to mClients and
mNotificationClients lists. This avoids locking the main AudioFlinger
mutex from inside thread loops and allows not to worry about
cross deadlocks when sending a config event with status reply while
keeping the ThreadBase or AudioFlinger mutex locked.
As a way of consequence, remove notification client list passed to
processConfigEvents_l() and audioConfigChanged() as the list
can now be accessed by locking client mutex only.

Change-Id: I228022204b6709a8bb60cc96d9514a6ffe59b62e
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Effects.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
71fd9329263fb98d1aa1a1ad5452849119d73f9c 12-May-2014 Eric Laurent <elaurent@google.com> Merge "audiopolicy: refactor audio command threads"
0ede8924b98c2967be2795e8d4f9837d8d3f094c 10-May-2014 Eric Laurent <elaurent@google.com> audiopolicy: refactor audio command threads

- Use strong pointers for command data to avoid transfering
ownership of the object to receiver thread.
This avoids waiting for the command acknowlegement to proceed
with next command on server side.
- Use a separate mutex for each command condition.
- Factor in duplicated code to send commands.

Change-Id: Ib0526e7c4fa64a71ad4015f477c6361727c6f40a
udiopolicy/AudioPolicyService.cpp
udiopolicy/AudioPolicyService.h
39c852640929d90ae5bcbf49842cbd64bffaa29e 12-May-2014 Eino-Ville Talvala <etalvala@google.com> am 7fd1af85: am c36fbcdf: am f02f06c4: Merge "camera: check Intent entry count before reading it"

* commit '7fd1af85f8fb40f7cb4fcdba98418aeea61fb4f0':
camera: check Intent entry count before reading it
c36fbcdf37ec02314e7b8134bb0de5f624fa70fd 12-May-2014 Eino-Ville Talvala <etalvala@google.com> am f02f06c4: Merge "camera: check Intent entry count before reading it"

* commit 'f02f06c422a58ddaca49d14f21a196eaa435d07b':
camera: check Intent entry count before reading it
f02f06c422a58ddaca49d14f21a196eaa435d07b 12-May-2014 Eino-Ville Talvala <etalvala@google.com> Merge "camera: check Intent entry count before reading it"
c90f4c7c5838e4dee2f550c4d581e7205e666faa 15-Apr-2014 Yuvraj Pasi <ypasi@nvidia.com> camera: check Intent entry count before reading it

In case when find() returns empty entry, blindly
reading the entry will cause segfault

Change-Id: Ib5be7fd855c409ba3b45f0d43e15237367172817
amera/libcameraservice/api1/client2/Parameters.cpp
110135b9610fee8bfa5bac2d9ef4fc4c24991c36 09-May-2014 Glenn Kasten <gkasten@google.com> Explicitly ignore return value of __futex_syscall3

Change-Id: Ic65f257bfc4a0eff7bdd3c44fab68a3f17e2bd08
udioflinger/Threads.cpp
0fdbdd2a3909e4692fa3baaaa1f53eb91b31af56 10-May-2014 Glenn Kasten <gkasten@google.com> Merge "Remove obsolete IAudioRecord::getCblk()"
26d5ff926fa3323b39ae4408bcd29826a9523c9b 10-May-2014 Eric Laurent <elaurent@google.com> Merge "audioflinger: refactor thread config events"
fe9570c7b937b49d3603ccb394aed732b79bc6be 07-May-2014 Glenn Kasten <gkasten@google.com> Remove obsolete IAudioRecord::getCblk()

Change-Id: Id20b5efd765b9796b0e391610e06dc928a829ebf
udioflinger/AudioFlinger.h
udioflinger/Tracks.cpp
1035194cee4fbd57e35ea15c56e66cd09b63d56e 09-May-2014 Eric Laurent <elaurent@google.com> audioflinger: refactor thread config events

Merge config events and set parameters messaging mechanism.
- setting parameters now uses the config event mechanism
- config event now allow to wait for a condition and synchronize caller
binder thread with execution thread and return an execution status.
- simplify locking mechanism to avoid unlocking the thread
mutex while processing events.

Change-Id: Ia49cb3e617abec4bacb6c1f9a8cb304c4ed3902e
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
udioflinger/Threads.h
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/RecordTracks.h
udioflinger/Threads.cpp
udioflinger/TrackBase.h
udioflinger/Tracks.cpp
99401131e58f2ff7f5571037d0d53b6f684e5543 08-May-2014 Eric Laurent <elaurent@google.com> audio policy: fix mute delay when setting output device

The duration of the temporary mute applied on each output
when switching device must be more than twice the actual delay
we wait for the mute to be effective at the output.
Otherwise some outputs with short latencies will be unmuted before the
device switch is actually executed.

This change makes sure that we take the maximum wait time into account
when requesting the delayed unmuting of each output.

Change-Id: Id92c201b47786082a44b6a5c1c8015273835a42e
udiopolicy/AudioPolicyManager.cpp
eee8fc78703dd77244407250402fe7464fe50fd3 08-May-2014 Glenn Kasten <gkasten@google.com> Merge "Add a per-thread heap that is read-only to clients"
cdedf74e34117f9834055973880ee728f11d97cd 08-May-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: cleanup AudioPolicyService destructor"
b880f5e5fc07397ddd09a94ba18bdf4fa62aae00 07-May-2014 Glenn Kasten <gkasten@google.com> Add a per-thread heap that is read-only to clients

Change-Id: I401263566ca20fbfb565689c8fa99458d3b283b2
udioflinger/Threads.cpp
udioflinger/Threads.h
657ff61389d7316f798d4abe03efac56fd528d91 07-May-2014 Eric Laurent <elaurent@google.com> audio policy: cleanup AudioPolicyService destructor

No need to clear strong pointers in the destuctor.
Add explicit exit() command to mOutputCommandThread.

Change-Id: I60bb248fe6a20bfd8a55358ef139692b93df0238
udiopolicy/AudioPolicyService.cpp
a079461668e881718fa6c0de967e557f59da1cab 07-May-2014 Glenn Kasten <gkasten@google.com> Merge "Fix a couple of fast capture typo bugs"
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
udioflinger/Threads.cpp
5b61dddd0dba28922068da2487894761486aec6c 07-May-2014 Eric Laurent <elaurent@google.com> audio policy: fix typo in AudioPolicyManager constructor

Fix cut/paste error in new AudioPolicyManager constructor
causing the same index variable to be reused in nested for loops.

Change-Id: Id57ff19bf6dd8974486b07c8252029e377df2747
udiopolicy/AudioPolicyManager.cpp
5e0e2316578b8b9eccdf4002951d6e9cd96adaac 07-May-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: update from libhardware_legacy"
14136039b752376240698e8b422c76de01488bc5 06-May-2014 Zhijun He <zhijunhe@google.com> Merge "Camera3: fix missing string in logging code"
13c878f07fb36a49aade20cec684ed8e12724751 06-May-2014 Zhijun He <zhijunhe@google.com> Camera3: fix missing string in logging code

Change-Id: I15da6bb8b586b4641837f42d2145530fb45dd0bd
amera/libcameraservice/device3/Camera3Stream.cpp
d46929666d7e4b1cad45afd7dcb883ec4dd2d49f 06-May-2014 Eric Laurent <elaurent@google.com> audio policy: update from libhardware_legacy

Merge changes made to AudioPolicyManagerBase in libhardware_legacy
since it was forked here:

fd61179 Update policy handling for USB inputs
c7b6e3c audio: allow compiling for 64-bit
c26f454 Initial implementation of USB Audio output.
a7b1bc9 Audio policy is 32-bit only
26101ad audio policy : add AUDIO_DEVICE_IN_USB_DEVICE to sDeviceNameToEnumTable

Change-Id: I22bc883c20603a6598c6ee3ded636e9cc4d9ec03
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
7ebe2c64dea42a3fd4de34ccb877d23b7a4e8076 06-May-2014 Eric Laurent <elaurent@google.com> am 71171988: am f655acf1: am 8fb04d47: Merge "Fix memory leak when filtering commands in insertCommand_l()"

* commit '711719885d7563068579abf347c366cf6bc906f5':
Fix memory leak when filtering commands in insertCommand_l()
f655acf15e587dbf5d7120e9f2bf4b5bcb89941c 06-May-2014 Eric Laurent <elaurent@google.com> am 8fb04d47: Merge "Fix memory leak when filtering commands in insertCommand_l()"

* commit '8fb04d474ed9e0d1302ae223ee76fafbe5fb41a3':
Fix memory leak when filtering commands in insertCommand_l()
8fb04d474ed9e0d1302ae223ee76fafbe5fb41a3 06-May-2014 Eric Laurent <elaurent@google.com> Merge "Fix memory leak when filtering commands in insertCommand_l()"
d8484dd4cf124854e7ff950da4300887f32fd05b 05-May-2014 Glenn Kasten <gkasten@google.com> Merge "Use audio_is_linear_pcm()"
f2776a5692bb4228decbe4ea3c8cc6df1d9c684c 05-May-2014 Ruben Brunk <rubenbrunk@google.com> Merge "camera3: Update CameraMetadata vendor tag handling."
6640d87d1a9263c12bab6d7ded7cc78a3eb50ae9 05-May-2014 Natalie Silvanovich <natashenka@google.com> Merge "NULL check in ConnectPro"
e1b55da41878255570f18809c5fee72544740344 01-May-2014 Natalie Silvanovich <natashenka@google.com> NULL check in ConnectPro

Prevents service crash

Bug: 13744720
Change-Id: I7a5cdba830b4f96660f890ede6b94c38fc3108dd
amera/libcameraservice/CameraService.cpp
f81648ec38ff63f1f35516fa27c1c24d846e9ba5 18-Apr-2014 Ruben Brunk <rubenbrunk@google.com> camera3: Update CameraMetadata vendor tag handling.

Bug: 12134423
Change-Id: I97dc955ee9dd78ace93a7946296d6d9b0e407d43
amera/libcameraservice/CameraService.cpp
fa366b2a32294ea22bf7b6f237cdbbd715cbbeb9 03-May-2014 Ruben Brunk <rubenbrunk@google.com> Merge "Revert "camera3: Update CameraMetadata vendor tag handling.""
6770260f83f5576b041b7b3a2536d082a631f9b0 03-May-2014 Ruben Brunk <rubenbrunk@google.com> Revert "camera3: Update CameraMetadata vendor tag handling."

This reverts commit 4764324d2704f1b08bb7407014bf203924ff2363.

Change-Id: I86d7fcc11423502b73fab2a82af6aa89804f0b76
amera/libcameraservice/CameraService.cpp
6c516d800d97b7f25a22574998cb055c9d7f7b16 03-May-2014 Ruben Brunk <rubenbrunk@google.com> Merge "camera3: Update CameraMetadata vendor tag handling."
4764324d2704f1b08bb7407014bf203924ff2363 18-Apr-2014 Ruben Brunk <rubenbrunk@google.com> camera3: Update CameraMetadata vendor tag handling.

Bug: 12134423
Change-Id: I1d1be6792b6a4c9f08e042a8b2c89146bde5665e
amera/libcameraservice/CameraService.cpp
0a9aa4f5539482061dfe4dfa6128ef3696557818 02-May-2014 Glenn Kasten <gkasten@google.com> Merge "Fix bug for direct track with PCM != 16-bit"
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
udioflinger/AudioFlinger.cpp
ad3770a20daf1265a088404edbd2ca340166e9ef 02-May-2014 Zhijun He <zhijunhe@google.com> Merge "Camera3: Don't notifyError for non-fatal errors"
993fa0603707e94ce259e95e56838a85b5ccbdc5 02-May-2014 Glenn Kasten <gkasten@google.com> Use audio_is_linear_pcm()

Change-Id: I17b30fdb6dbb6454ad0a20dd703fd603a37a8397
udioflinger/Threads.cpp
e11ae4b2f7d38c8092e7c67ff06610165d866d98 01-May-2014 Zhijun He <zhijunhe@google.com> Camera3: Don't notifyError for non-fatal errors

Bug: 14448494
Change-Id: Ie2e2dc6a8475189707c556845adb77f20f270df5
amera/libcameraservice/device3/Camera3Device.cpp
1a7be1ec9c769203e6c8e26378de0ab8e2ad493d 29-Apr-2014 Bill Yi <byi@google.com> Merge commit '91820d46b5f3065c2fded3cdf65d305715b33bb1' into HEAD
4799fa447c2c9681c0c51fa8151974a764679fdc 29-Apr-2014 Glenn Kasten <gkasten@google.com> Merge "Start pulling bits of FastMixer up to FastThread"
2234002b0710c8db73f82d397cb945cd541c6bbb 07-Apr-2014 Glenn Kasten <gkasten@google.com> Start pulling bits of FastMixer up to FastThread

Change-Id: I4c6f7b8f88fcf107bb29ee6432feecd4ab6554d2
udioflinger/Android.mk
udioflinger/Configuration.h
udioflinger/FastMixer.cpp
udioflinger/FastMixer.h
udioflinger/FastMixerDumpState.h
udioflinger/FastMixerState.cpp
udioflinger/FastMixerState.h
udioflinger/FastThread.cpp
udioflinger/FastThread.h
udioflinger/FastThreadState.cpp
udioflinger/FastThreadState.h
f7da096db8655531c2f2b7bddccd1064b1021155 24-Apr-2014 Zhijun He <zhijunhe@google.com> Camera3: scale the max jpeg buffer size based on resolutions

The max jpeg buffer size was always the android.jpeg.maxSize, regardless of
the actual jpeg capture size. This creates a huge memory waste especially
for smaller size jpeg capture. Now the max jpeg buffer is linearly scaled based
on the resolution.

Bug: 14288983
Change-Id: I8a971b8e2f4fc7fec0154547bdb688579af71a47
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
e273141263e988ab086a8d41e0e4fc75c00f1b86 24-Apr-2014 Glenn Kasten <gkasten@android.com> am 7e5c6351: am 4513aa2c: Merge "AArch64: rewrite audioflinger\'s sinc resample by intrinsics."

* commit '7e5c635114a7762ad44581300021667a0da97389':
AArch64: rewrite audioflinger's sinc resample by intrinsics.
7e5c635114a7762ad44581300021667a0da97389 24-Apr-2014 Glenn Kasten <gkasten@android.com> am 4513aa2c: Merge "AArch64: rewrite audioflinger\'s sinc resample by intrinsics."

* commit '4513aa2cda9e636e4ac675dab9a1353b22e951ae':
AArch64: rewrite audioflinger's sinc resample by intrinsics.
4513aa2cda9e636e4ac675dab9a1353b22e951ae 24-Apr-2014 Glenn Kasten <gkasten@android.com> Merge "AArch64: rewrite audioflinger's sinc resample by intrinsics."
7ef20390ba4375c4b08edd14923846086987a8c8 22-Apr-2014 Zhijun He <zhijunhe@google.com> camera3: Don't hold mLock during flush call

HAL calls into Camera3Device functions like processCaptureResult during flush
call. When Camera3Device runs into error state during flush call,
processCaptureResult calls setErrorState(), which leads to deadlock.

Change-Id: I35a03f6eb4b77f914097917cb37de98663de365f
amera/libcameraservice/device3/Camera3Device.cpp
e7ec24c9934c98a451e986a07651992df7fe6558 21-Apr-2014 Jianing Wei <jianingwei@google.com> Merge "CameraService: fix waitUntilIdle bug revealed by TestingCamera2."
106b83d2447d3209d12fdc05215b965e05c5efea 21-Apr-2014 Eino-Ville Talvala <etalvala@google.com> am dae621c2: am 95006625: Merge "camera: set mNeedConfig after creating ZSL stream"

* commit 'dae621c2c7f40f1587b97636975908e1374ade9a':
camera: set mNeedConfig after creating ZSL stream
dae621c2c7f40f1587b97636975908e1374ade9a 21-Apr-2014 Eino-Ville Talvala <etalvala@google.com> am 95006625: Merge "camera: set mNeedConfig after creating ZSL stream"

* commit '95006625bd1c562c952833bf08c52e7e6c524363':
camera: set mNeedConfig after creating ZSL stream
95006625bd1c562c952833bf08c52e7e6c524363 21-Apr-2014 Eino-Ville Talvala <etalvala@google.com> Merge "camera: set mNeedConfig after creating ZSL stream"
3c76fa3e73374dfe7bb93e1b03fed30749e1e4b9 21-Apr-2014 Jianing Wei <jianingwei@google.com> CameraService: fix waitUntilIdle bug revealed by TestingCamera2.

* clear mStreamingRequestList in flush
* fix frame number checker in notify and processCaptureResult

Bug: 14166437
Change-Id: I022421080d05138f9068c1b9b85d83bd613b04fb
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/device3/Camera3Device.cpp
6adc9ccb2948d9421a0ed4b74f52b909bcec2037 15-Apr-2014 Zhijun He <zhijunhe@google.com> Camera3: block until get an available buffer

Camera3Stream shouldn't error out when the max number of buffers are already
dequeued. It should block until next buffer returned from camera device.

Bug: 11595505
Change-Id: If65a70c29cb04219e14ded0744059c0ab783444b
amera/libcameraservice/device3/Camera3IOStreamBase.cpp
amera/libcameraservice/device3/Camera3IOStreamBase.h
amera/libcameraservice/device3/Camera3InputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3Stream.cpp
amera/libcameraservice/device3/Camera3Stream.h
amera/libcameraservice/device3/Camera3ZslStream.cpp
77d4f613bbed8b646c8ddade6a0737fcbd391b07 18-Apr-2014 Jianing Wei <jianingwei@google.com> Merge "CameraService: fix race condition and wrong last frame number."
2d6bb3f9e3e7cc1c7debbbe3d74bf9c70b6f39d4 11-Apr-2014 Jianing Wei <jianingwei@google.com> CameraService: fix race condition and wrong last frame number.

Change-Id: Ie2be9a77a0b074497615de38cbb8e8f13b4858ec
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
1b24cf32e02a1372e57b3a2a432bc0adfe496e6d 16-Apr-2014 Mark Salyzyn <salyzyn@google.com> am e80631aa: am 839d11d1: Merge changes I0a744dc7,Id993a70d

* commit 'e80631aa1992ca50af679cd6a018c0ffda7f9b17':
media: use size_t for integer iterator to Vector::size()
media: 64 bit compile issues
e80631aa1992ca50af679cd6a018c0ffda7f9b17 16-Apr-2014 Mark Salyzyn <salyzyn@google.com> am 839d11d1: Merge changes I0a744dc7,Id993a70d

* commit '839d11d1f7be9dff2f06c7d30a9eb39cb6782078':
media: use size_t for integer iterator to Vector::size()
media: 64 bit compile issues
3ab368e0810d894dcbc0971350c095049478a055 15-Apr-2014 Mark Salyzyn <salyzyn@google.com> media: use size_t for integer iterator to Vector::size()

Change-Id: I0a744dc7815a86a993df9b0623440be620ec8903
udioflinger/AudioFlinger.cpp
udioflinger/Tracks.cpp
f0948bcf06b8a9679f4b772237c80ee63829423f 15-Apr-2014 Zhijun He <zhijunhe@google.com> Merge "Camera: don't dereference timestamp if it is missing"
e5e3d0823165dea9211a47232dbbbe361153fb49 15-Apr-2014 Yuvraj Pasi <ypasi@nvidia.com> camera: set mNeedConfig after creating ZSL stream

Set mNeedConfig after creating ZSL stream, camera device
will reconfigure for the case when only ZSL stream
is changed.

Change-Id: Ib592817f81125969824a1280349f77973116f375
amera/libcameraservice/device3/Camera3Device.cpp
6056bdda5b17c62ba320c806489e4d1a3b7653c7 15-Apr-2014 Zhijun He <zhijunhe@google.com> Camera: don't dereference timestamp if it is missing

Bug: 14059542
Change-Id: I8b45a98ef4b296db314cab3819d11626ac7211be
amera/libcameraservice/api1/client2/CaptureSequencer.cpp
96b0d5ef85d4d71690c41c84456afbf19864c785 15-Apr-2014 Andy Hung <hunga@google.com> Merge "Improve resampler filter computation speed"
c125f38cd0ae35409a01b98a99e483550daa1313 12-Apr-2014 Glenn Kasten <gkasten@google.com> audioflinger: forward device change to effects in direct thread

Device change during offload playback is not informed to effect chain
which causes effects still work on unexpected output devices. Add device
change notification in direct output thread.

Original author wjiang <wjiang@codeaurora.org>

CRs-Fixed: 630408
Bug: 14053172
Signed-off-by: Glenn Kasten <gkasten@google.com>
Change-Id: I094a99bdf540479cee2fca6614ec35c2fa7d6046
udioflinger/Threads.cpp
27a17103f99d23157ac80ef7d75e25a3aae788bd 12-Apr-2014 Andy Hung <hunga@google.com> Merge "Update test-resample to handle multichannel"
48412dc92c4cc92a3f4821616e12290f5eeabd07 24-Mar-2014 Jesper Tragardh <jesper.tragardh@sonymobile.com> Fix memory leak when filtering commands in insertCommand_l()

When AudioPolicyService::AudioCommandThread::insertCommand_l filters
a command from the queue, the AudioCommand* is removed from the
vector mAudioCommands by calling mAudioCommands.removeAt(). This will
destroy the pointer and compact the vector, but not delete the
AudioCommand object.

This patch adds code to delete a filtered out AudioCommand and its
data object mParam. However, mParam was void* and deleting a void
pointer is undefined behavior according to the C++
standard. Therefore, the data classes are modified to inherit
from an abstract base class with a virtual destructor.

The deletion of non-filtered commands in
AudioPolicyService::AudioCommandThread::threadLoop() was already
correct, as each case casts mParam to the proper type before
deleting.

This also fixes AOSP issue 36370.

Change-Id: I2b63838aff3608132aa496f964a929f78c4b6267
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
df383a5a54582811e5e038efc557172b8ec69dd1 10-Apr-2014 Andy Hung <hunga@google.com> Update test-resample to handle multichannel

Option -c # specifies number of channels (mono default).
Option -s to specify stereo is removed (-c 2 replaces).
Option -h to specify WAV header is removed (WAV is now default).

Change-Id: Iba4b83806028a8a9c1ddba6f555182d214ef73ff
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/test-resample.cpp
43827aea591c2fffdb87006462a5aa7a131a25c0 10-Apr-2014 Vineeta Srivastava <vsrivastava@google.com> Merge "camera3: Remove register_stream_buffers for HAL 3.2+"
9e5763aefde93afd375e0d9874e515d7c27b212b 10-Apr-2014 Jianing Wei <jianingwei@google.com> Merge "CameraService: trigger appropriate callbacks for burst capture."
cb0652e5a850b2fcd919e977247e87239efaf70e 13-Mar-2014 Jianing Wei <jianingwei@google.com> CameraService: trigger appropriate callbacks for burst capture.

* Instead of tracking CameraMetadata only, now we track both
CameraMetadata and CaptureResultExtras, which is not part of
the HAL metadata. This will enable the correct callback of
onCaptureStarted and onResultReceived given burst requests.

* Get last frame number in reply when submitting requests,
canceling requests, and flushing device. For repeating requests,
this frame number is the last frame number of the previous
request. For non-repeating requests, this frame number is the
expected last frame number of the current request. The goal
is provide frame number to Java side in order to trigger
onCaptureSequenceCompleted correctly.

* Fix notifyError so that onDeviceError can be called correctly.

Bug: 10749500
Change-Id: I2f3dda6c530090055d4a2ff9f0f087bbbe8d9257
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/api1/client2/CaptureSequencer.cpp
amera/libcameraservice/api1/client2/CaptureSequencer.h
amera/libcameraservice/api1/client2/FrameProcessor.cpp
amera/libcameraservice/api1/client2/FrameProcessor.h
amera/libcameraservice/api1/client2/ZslProcessor.cpp
amera/libcameraservice/api1/client2/ZslProcessor.h
amera/libcameraservice/api1/client2/ZslProcessor3.cpp
amera/libcameraservice/api1/client2/ZslProcessor3.h
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
amera/libcameraservice/api_pro/ProCamera2Client.cpp
amera/libcameraservice/api_pro/ProCamera2Client.h
amera/libcameraservice/common/Camera2ClientBase.cpp
amera/libcameraservice/common/Camera2ClientBase.h
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/common/FrameProcessorBase.cpp
amera/libcameraservice/common/FrameProcessorBase.h
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device2/Camera2Device.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
12b44bd5fe3069cd3450d05b6c446b600e0553d3 10-Apr-2014 Zhongwei Yao <zhongwei.yao@arm.com> AArch64: rewrite audioflinger's sinc resample by intrinsics.

Pass conformance test on armv7 and aarch64, performance test is done on armv7.
Compared with original armv7 assembly version, this version has similar
result. Here is performance data on pandaboard android4.4 (input: random wave
file, unit: Mspl/s, toolchain:gcc 4.8):

| | origin(assembly) | current(intrinsics) | C version |
|----------------+------------------+---------------------+-----------|
| single channel | 6.17 | 7.14 | 3.43 |
| double channel | 5.24 | 5.63 | 3.50 |

Change-Id: If5670218e1586e9dfd2b8d9c66a6880f3e4808ca
udioflinger/AudioResamplerSinc.cpp
771386e6e6e79697e2d839ef0f25a242946ba1e5 09-Apr-2014 Andy Hung <hunga@google.com> Add and enable floating point option for audio resampler

Can be tested with test-resample.

Change-Id: I8339846d7c647444b6025d33cfa145d5d3658121
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/AudioResampler.cpp
udioflinger/AudioResamplerDyn.cpp
udioflinger/AudioResamplerDyn.h
d549139155b20d7cbf6a4326133e06def465ef54 09-Apr-2014 Andy Hung <hunga@google.com> Add floating point to audio resample processing

Add template type parameters for input, output data type.
Minor change in non-NEON mono channel handling.
Minor fixup on comments.

Change-Id: I7dc9972d130913718b62f32c02d31f99c06682f2
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/AudioResamplerDyn.cpp
udioflinger/AudioResamplerFirProcess.h
13d315eb8c0848ea0584b9fb1d27bab55bc8158b 04-Apr-2014 Igor Murashkin <iam@google.com> camera3: Remove register_stream_buffers for HAL 3.2+

Use 'setprop camera.dev.register_stream 1' to skip the fatal NULL check
- This property will be removed before shipping L

Bug: 13301331
Bug: 13435680
Change-Id: I16aacd7b22e0a10b34f6fb8501be0256170a8cd5
amera/libcameraservice/device3/Camera3IOStreamBase.cpp
amera/libcameraservice/device3/Camera3Stream.cpp
amera/libcameraservice/device3/Camera3Stream.h
430b61c72094882bc48693dfc10c256a6ae36ee9 09-Apr-2014 Andy Hung <hunga@google.com> Add capability for floating point Kaiser window filters

Change-Id: Idbb33248bbab2300c2650a4657d8fbc482a5d46c
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/AudioResamplerFirGen.h
781366833a12877b8d5ad4aa081114e30f799319 09-Apr-2014 Andy Hung <hunga@google.com> Update test-resample to handle floating point

Change-Id: Ib34d716fbabcd5eb70f8a5ffcf362e242671d916
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/test-resample.cpp
0d521d91154fe0199181c845b6dc70faf38ca8fb 08-Apr-2014 Glenn Kasten <gkasten@google.com> Merge "Fix 64-bit build warnings"
1e4e4f40b4e2c655ca377adbba53df897545c3ae 08-Apr-2014 Glenn Kasten <gkasten@google.com> Fix 64-bit build warnings

Change-Id: I667401522cb4ccd41013e2883a4c75ddeca08ef6
udioflinger/test-resample.cpp
bc6ae9bd4ee93e91e212ad35be038f21797ef31e 07-Apr-2014 Glenn Kasten <gkasten@google.com> Fix regression in FastMixer statistics

At some point, the mSampleRate in FastMixerDumpState stopped being
initialized correctly. I'm not sure when this happened, it doesn't seem to
be introduced in recent CLs. This lack of initialization caused
some of the FastMixer statistics based on sample rate to be useless.

Change-Id: Id2a96d606130a90c4c4f1bddd59778f6c6428a9c
udioflinger/FastMixer.cpp
84a0c6e87c48f58a0d3be71961432c086a4d24cc 02-Apr-2014 Andy Hung <hunga@google.com> Change references of Q19.12 to Q4.27 for clarity

Change-Id: I5beb7daf6ff9bc123ff3582f7c294edcaf8652f6
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/AudioMixer.cpp
udioflinger/AudioResampler.h
udioflinger/RecordTracks.h
udioflinger/Threads.cpp
udioflinger/test-resample.cpp
bafa561d0c9363c5307b6b1daa498bd3ae36089d 02-Apr-2014 Andy Hung <hunga@google.com> Improve resampler filter computation speed

Approximate speed improvement is 10-15% for filter computation,
which is floating point intensive. This will be important
for devices without hw floating point support.

Change-Id: I10b4e778c8d632b52218a777504b092c189e437f
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/AudioResamplerFirGen.h
2ade30003882f0c3782d68018d06cb81b99dfeb2 01-Apr-2014 Glenn Kasten <gkasten@google.com> Merge "FastMixer use FastThread and FastMixerState use FastThreadState"
1e0c8cd8fad2108c8ea085748fcca2059e3ce4ab 01-Apr-2014 Glenn Kasten <gkasten@google.com> Merge changes I5748f47d,I3f074933

* changes:
Add FastThread.h
Add FastThreadState
f7160b5dc3091fd9624f25d534c6848ee831b706 19-Mar-2014 Glenn Kasten <gkasten@google.com> FastMixer use FastThread and FastMixerState use FastThreadState

Change-Id: I594c973e9f575113bdefee6f4cf8c29d8beac1f3
udioflinger/FastMixer.h
udioflinger/FastMixerState.cpp
udioflinger/FastMixerState.h
4cd161b5bf7a8008d684db4b217ed84d1704e683 19-Mar-2014 Glenn Kasten <gkasten@google.com> Add FastThread.h

Change-Id: I5748f47dbfa42c14cc93973742e05ac963bf3ba8
udioflinger/FastThread.h
a18f644ce5eb4ab876b343e24ea613566c00058f 19-Mar-2014 Glenn Kasten <gkasten@google.com> Add FastThreadState

Change-Id: I3f07493375ace6e5cfdcd02ad90c4b6fad543b0c
udioflinger/Android.mk
udioflinger/FastThreadState.cpp
udioflinger/FastThreadState.h
3a6c90aa0617666d9abc94c02b752d9eb3d64772 13-Mar-2014 Glenn Kasten <gkasten@google.com> Add FIXMEs to createRecord for fast capture

Change-Id: I759be200fae32969212c52a409f46f2e704081e3
udioflinger/Threads.cpp
udioflinger/Threads.h
1490d5142d8d485ea0d56a9974726fb6dff0a62d 28-Mar-2014 Glenn Kasten <gkasten@google.com> Merge "Mark the logging heap read-only to media.log service"
5bdb3c4d93269511d21d155c78790ee70d423095 27-Mar-2014 Zhijun He <zhijunhe@google.com> Merge "Camera3: fix HAL3.x version check issue"
2f8a36fc8df14cba33fa7c5c1c9d5a52f8a133c2 27-Mar-2014 Eric Laurent <elaurent@google.com> Fix the build

Change-Id: I2169a3d26f4e35e5cfa35a1264175aab6ac4db41
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
95dd5ba5bf83716f2eed5fe72366c4212464d710 27-Mar-2014 Zhijun He <zhijunhe@google.com> Camera3: fix HAL3.x version check issue

Camera service should support HAL3.x instead of only HAL3.0.

Bug: 13609405
Change-Id: If7e86f9abe019547fc0be2e11337551cd7c57870
amera/libcameraservice/CameraDeviceFactory.cpp
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
2347c7b0502f5f71d2f0e22d39f1d5a61add3f6b 27-Mar-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: remove obsolete AudioPolicyManager class members"
ec31c8d17f587cba01d5516ccd336aa54323c668 27-Mar-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: use new audio device representation"
c9b8d90dabdf1234be0117c592f635a92c4eb0d9 27-Mar-2014 Glenn Kasten <gkasten@google.com> Merge "Use symbol AUDIO_IO_HANDLE_NONE from <system/audio.h>"
1b512c05f46465a7b1a1d69f82937d7199d5d926 17-Mar-2014 Eric Laurent <elaurent@google.com> audio policy: remove obsolete AudioPolicyManager class members

Remove mHasA2dp, mHasUsb and mHasRemoteSubmix members from
AudoPolicyManager. They are not needed any more since
we use device descriptors with additional attributes.

Also remove obsolete limitation on device address
length (MAX_DEVICE_ADDRESS_LEN).

Change-Id: Iffe760a521692a4b50be3f6b935af84afb61bb86
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
3a4311c68348f728558e87b5db67d47605783890 17-Mar-2014 Eric Laurent <elaurent@google.com> audio policy: use new audio device representation

Represent audio devices with more attributes than just the
type (audio_device_t).
This is in preparation for new routing APIs allowing
device selection based on more criteria than just the type
(address, channel mask...)
A new class DeviceDescriptor is created and used by functions
needing more information than just the device type.
Bit fields for available and supported input or output devices are
replaced by vectors of device descriptors.
Each available device is allocated a unique ID for future use.
Removed obsolete mA2dpDeviceAddress, mScoDeviceAddress and mUsbCardAndDevice
fields replaced by address stored in DeviceDescriptor.

Policy decisions like getDeviceForStrategy() are still based
only on the device type.

Change-Id: I5de3b3ffb12ff8dcfb746782ab1e6b15bf040d0c
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.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
udioflinger/AudioFlinger.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
udioflinger/AudioMixer.cpp
udioflinger/FastMixer.cpp
udioflinger/Threads.cpp
udioflinger/Tracks.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>"
73ec11738cd4399c55d4905665a14a7c4cd42cbf 26-Mar-2014 Glenn Kasten <gkasten@google.com> Merge "Fix uses of KeyedVector"
1cebdb77323e4554a316b9c34bf36957b7dad5ae 26-Mar-2014 Eino-Ville Talvala <etalvala@google.com> Revert "camera: Fix setParameters for Preview FPS single/range values"

Causes a regression on some devices, so reverting until we're in a position to fix those devices.

This reverts commit 9078a1b3b9f9c0c48046ade0e8e18b0d79a659db.

Bug: 13563098
Change-Id: I7aedd01fde8b8fdee77e972ec395f0ecadbf8ccb
amera/libcameraservice/api1/client2/Parameters.cpp
551cec544652783e3342c18386f64cee22412b60 26-Mar-2014 Glenn Kasten <gkasten@google.com> Merge "Document AudioFlinger::nextUniqueId()"
45faf7e02791993a487d6e038d16ff46395f1975 17-Jan-2014 Glenn Kasten <gkasten@google.com> Use symbol AUDIO_DEVICE_NONE from <system/audio.h>

Change-Id: I61f882c5e7c949bf00d3bfc745ebf3b5e1c42a58
udioflinger/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
udioflinger/Threads.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
udioflinger/AudioFlinger.cpp
bcefec31bd1346133052356ffc8d7ac8a5b13fab 17-Jan-2014 Glenn Kasten <gkasten@google.com> Document AudioFlinger::nextUniqueId()

Change-Id: Iafe96f1c10bd85cb23a2553945ca68aa601dc2eb
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
29cdd9bb46437ab580deabf33b2242106e0090b6 25-Mar-2014 Eino-Ville Talvala <etalvala@google.com> am a1aaaf86: am 4f53fe74: Merge "CameraService: deadlock fix"

* commit 'a1aaaf86cd04eabaf961a30d7b0a9fa857089862':
CameraService: deadlock fix
c3dcf1007aa964f825b2ea2ef86acb7f332e748f 25-Mar-2014 Igor Murashkin <iam@google.com> am 65550a0e: am 0370be96: DO NOT MERGE: camera: Fix setParameters for Preview FPS single/range values

* commit '65550a0e17852fe657795508e3bf05bdbfb2520b':
DO NOT MERGE: camera: Fix setParameters for Preview FPS single/range values
65550a0e17852fe657795508e3bf05bdbfb2520b 25-Mar-2014 Igor Murashkin <iam@google.com> am 0370be96: DO NOT MERGE: camera: Fix setParameters for Preview FPS single/range values

* commit '0370be96e33ea0c8fb4069e704deccce43b7403c':
DO NOT MERGE: camera: Fix setParameters for Preview FPS single/range values
a1aaaf86cd04eabaf961a30d7b0a9fa857089862 25-Mar-2014 Eino-Ville Talvala <etalvala@google.com> am 4f53fe74: Merge "CameraService: deadlock fix"

* commit '4f53fe74051026e6635ba5bdbed4f1898cb66028':
CameraService: deadlock fix
91820d46b5f3065c2fded3cdf65d305715b33bb1 25-Mar-2014 Igor Murashkin <iam@google.com> am 0370be96: DO NOT MERGE: camera: Fix setParameters for Preview FPS single/range values

* commit '0370be96e33ea0c8fb4069e704deccce43b7403c':
DO NOT MERGE: camera: Fix setParameters for Preview FPS single/range values
1cc3f85de70e813998102bf572caad3691a6b6a2 25-Mar-2014 Eino-Ville Talvala <etalvala@google.com> am 4f53fe74: Merge "CameraService: deadlock fix"

* commit '4f53fe74051026e6635ba5bdbed4f1898cb66028':
CameraService: deadlock fix
0370be96e33ea0c8fb4069e704deccce43b7403c 19-Mar-2014 Igor Murashkin <iam@google.com> DO NOT MERGE: camera: Fix setParameters for Preview FPS single/range values

As a workaround, duplicate CameraParameters into CameraParameters2 to
prevent ABI break for some camera HALs that directly link into
CameraParameters.

CameraParameters2 implements the real fixes needed in the framework,
while CameraParameters is left in to satisfy older camera HALs.

Bug: 12609188
Change-Id: I82ea6f5de2183dd046d4bf5683600c97f37ab4da
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
6ec3a15257ca2b56b675a610aef43cc4ec6aaf00 30-Apr-2013 Kalle Lampila <kallex.lampila@intel.com> CameraService: deadlock fix

Release lock before return from CameraService::dump()

Change-Id: Ia20b0921fc675a284f3b7f8d26e0e3596b5a8774
Signed-off-by: Kalle Lampila <kallex.lampila@intel.com>
amera/libcameraservice/CameraService.cpp
d6d1883f607d40be5d9a87909ae563cf94256c24 25-Mar-2014 Zhijun He <zhijunhe@google.com> Merge "Camera3: Fix flush call deadlock"
32ce52b01dab863f2b4749e1c69f619cf820486f 24-Mar-2014 Colin Cross <ccross@android.com> am 5c679d41: resolved conflicts for merge of 3d7c5002 to klp-modular-dev-plus-aosp

* commit '5c679d41714e42f153f6aeb492df54510a195bc1':
libcameraservice: build 64-bit
libcameraservice: fix 64-bit print format warnings
69a374897392c8bd70f441b7284f6f578c651ec9 24-Mar-2014 Zhijun He <zhijunhe@google.com> Camera3: Fix flush call deadlock

Flush shouldn't call waitUntilDrained directly, as they are all API calls
with mLock and mInterfaceLock held. Move the waitUntilDrained implementation
into waitUntilDrainedLocked to solve this issue.

Change-Id: Id7d931091d5c11e12204790841097433515446db
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
5c679d41714e42f153f6aeb492df54510a195bc1 22-Mar-2014 Colin Cross <ccross@android.com> resolved conflicts for merge of 3d7c5002 to klp-modular-dev-plus-aosp

Change-Id: Ia6d87d56174d1388c1148fb55b6e4bc57d8666db
7b1524d4e866b53ab0d02a59cc6ccb133bd98f77 22-Mar-2014 Colin Cross <ccross@android.com> resolved conflicts for merge of 3d7c5002 to klp-dev-plus-aosp

Change-Id: I19e1a26bd0226119c4fe2920bf6a09aaeff315d9
cfe09079608d78a0a358f01bb49f279859e38664 22-Mar-2014 Jianing Wei <jianingwei@google.com> Merge "CameraService: Add support for burst capture and repeating burst."
90e59c98c343e941b1a75307ffa4b4b5f1eb50d6 13-Mar-2014 Jianing Wei <jianingwei@google.com> CameraService: Add support for burst capture and repeating burst.

Bug: 10749500
Change-Id: I292a485b222e5cf97388d76bf0d956a6ac54bb2f
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device2/Camera2Device.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
4bd71b4ed6f1825b287e448c336e3e59138c2956 21-Mar-2014 Colin Cross <ccross@android.com> libcameraservice: build 64-bit

libcameraservice builds fine for 64-bit, remove LOCAL_32_BIT_ONLY

Change-Id: I9f28bc42dc424dee9b92e6ab092f86d3aa1419b7
amera/libcameraservice/Android.mk
e5729fac81c8a984e984fefc90afc64135817d4f 21-Mar-2014 Colin Cross <ccross@android.com> libcameraservice: fix 64-bit print format warnings

Use PRId64 from inttypes.h to print nsecs_t (int64_t)
Use %zu to print size_t

Change-Id: I135620e0388db33587a8a7da393b48a45cb7275a
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/api1/client2/CaptureSequencer.cpp
amera/libcameraservice/api1/client2/FrameProcessor.cpp
amera/libcameraservice/api1/client2/JpegCompressor.cpp
amera/libcameraservice/api1/client2/JpegProcessor.cpp
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
amera/libcameraservice/api1/client2/ZslProcessor.cpp
amera/libcameraservice/api1/client2/ZslProcessor3.cpp
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/common/Camera2ClientBase.cpp
amera/libcameraservice/common/FrameProcessorBase.cpp
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3IOStreamBase.cpp
amera/libcameraservice/device3/Camera3Stream.cpp
amera/libcameraservice/device3/Camera3ZslStream.cpp
amera/libcameraservice/device3/StatusTracker.cpp
amera/libcameraservice/gui/RingBufferConsumer.cpp
9ac3c9a7ee931088d09027ffa09414cb0402886f 21-Mar-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: add option to use new policy manager"
9078a1b3b9f9c0c48046ade0e8e18b0d79a659db 19-Mar-2014 Igor Murashkin <iam@google.com> camera: Fix setParameters for Preview FPS single/range values

Bug: 12609188
Change-Id: I82ea6f5de2183dd046d4bf5683600c97f37ab4db
amera/libcameraservice/api1/client2/Parameters.cpp
46d1b4ab7e83c677532587c7c8bd46eb8b30fc67 19-Mar-2014 Glenn Kasten <gkasten@google.com> resolved conflicts for merge of f40c4c56 to master

Change-Id: Ifd5385ad42a81e02e6a6afc6281f09fbff361671
d09ec3b22013ef43d422c916dfd44bab9101a659 19-Mar-2014 Glenn Kasten <gkasten@android.com> am 36817364: Merge "Add libaudioresampler"

* commit '36817364738d4c45adc3e448fbec02a9611bfeda':
Add libaudioresampler
f40c4c561151ae93595e8fab5dcaaa1c69df74ef 19-Mar-2014 Glenn Kasten <gkasten@android.com> am 36817364: Merge "Add libaudioresampler"

* commit '36817364738d4c45adc3e448fbec02a9611bfeda':
Add libaudioresampler
ddf887c08b58382920effb7f0b2049e471960b4a 19-Mar-2014 Glenn Kasten <gkasten@android.com> Add libaudioresampler

libaudioresampler is available in both 32-bit and 64-bit,
unlike libaudioflinger which is currently 32-bit only.

Bug: 8141282
Change-Id: I839f7b4e6aaed6984012ca6d514323f927669df6
udioflinger/Android.mk
cf515ab0030cf5e0bef843638af7c989a8f6843a 15-Mar-2014 Glenn Kasten <gkasten@google.com> Mark the logging heap read-only to media.log service

Change-Id: Ie26a9e7e37c951774c71d2c53886db52dd5479aa
udioflinger/AudioFlinger.cpp
c7e05b0fc54f9ad22c6d219bf8cf6f10f8d9ba9c 18-Mar-2014 Glenn Kasten <gkasten@android.com> am 0c282de7: am 77658a06: Merge "AudioPolicyService: malloc/delete pair"

* commit '0c282de73240b1efce64558ab2fa0a8be1f4292b':
AudioPolicyService: malloc/delete pair
da677084cf68b62063815217156e7b262b493c3d 18-Mar-2014 Eric Laurent <elaurent@google.com> Merge "audioflinger: OffloadThread fix for resume underrun"
89a677950917263e34327c7b47f3bb7a06ab0b28 18-Mar-2014 Eric Laurent <elaurent@google.com> Merge "AudioFlinger: Change track ready condition in STOPPING_1 state"
9d9cba5be2b51d4c6c31cb7169ef2b786c35ddfd 18-Mar-2014 Eric Laurent <elaurent@google.com> Merge "audioflinger: Handle pause /resume in stopping state"
dce54a1492c410ad0d93253b341fb33305337505 10-Mar-2014 Eric Laurent <elaurent@google.com> audio policy: add option to use new policy manager

Add build option USE_LEGACY_AUDIO_POLICY to use either new
audio policy manager in local AudioPolicyManager.cpp
or the legacy AudioPolicyManagerBase.cpp via the policy HAL.

New features will be implemented only by the new audio policy manager.
Platform customiization will be by config file or new policy HAL.

AudioPolicyClientImplLegacy.cpp copied from AudioPolicyClientImpl.cpp
AudioPolicyInterfaceImplLegacy.cpp copied from AudioPolicyInterfaceImpl.cpp

New implementations of AudioPolicyInterface and AudioPolicyClient talking directly to
AudioPolicyManager.

Change-Id: I7a320883a1de13de2c9295343e996addf2f3c154
udiopolicy/Android.mk
udiopolicy/AudioPolicyClientImpl.cpp
udiopolicy/AudioPolicyClientImplLegacy.cpp
udiopolicy/AudioPolicyInterface.h
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyInterfaceImplLegacy.cpp
udiopolicy/AudioPolicyService.cpp
udiopolicy/AudioPolicyService.h
b5ea3014b8be9eaa16da0144bd81af6fa514d8e2 18-Mar-2014 Dan Stoza <stoza@google.com> Merge "Remove deprecated BufferQueue constructor"
d8590167fec151cc2e8f6e28e406c99882f40884 18-Mar-2014 Glenn Kasten <gkasten@android.com> am 77658a06: Merge "AudioPolicyService: malloc/delete pair"

* commit '77658a069c81a0d5b4a1b81443b470a3ea64cab0':
AudioPolicyService: malloc/delete pair
0c282de73240b1efce64558ab2fa0a8be1f4292b 18-Mar-2014 Glenn Kasten <gkasten@android.com> am 77658a06: Merge "AudioPolicyService: malloc/delete pair"

* commit '77658a069c81a0d5b4a1b81443b470a3ea64cab0':
AudioPolicyService: malloc/delete pair
77658a069c81a0d5b4a1b81443b470a3ea64cab0 18-Mar-2014 Glenn Kasten <gkasten@android.com> Merge "AudioPolicyService: malloc/delete pair"
0fab43120972dfbf4d6f0ec19ab470131b6c8b09 18-Mar-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: renamed AudioPolicyManagerBase to AudioPolicyManager"
6fe207b2992a5de2f766b6ab30bc760aa243f4a9 18-Mar-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: remove dependency from AudioSystemLegacy"
47b496dac93235740011fcfe7578b19c6b8445e5 18-Mar-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: import audio policy manager from hardware legacy"
a2b81d6cb02d8427dc0d719aa75c34ceddfc3c09 18-Mar-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: split implementation"
2d3ca68363f723fbe269d3ce52dab4985dfc7154 07-Mar-2014 Haynes Mathew George <hgeorge@codeaurora.org> audioflinger: OffloadThread fix for resume underrun

AudioFlinger can miss resuming h/w on a pause->resume transition
if sufficient data isn't available

Bug: 11358524.
Change-Id: Ic3c75256290d3515fd4a96dfcc900909fbe5bc15
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
164985121796cf214c7a83d32005d9b01125b558 18-Mar-2014 Eric Laurent <elaurent@google.com> AudioFlinger: Change track ready condition in STOPPING_1 state

Set FS_FILLED only if framesReady() > 0

Change-Id: Ibb1d2e988ff17fcf3a7ab61031a3f85df82f18d5
udioflinger/Tracks.cpp
8d6c292a0bed3d63b5b7297d09a604af6327c663 05-Feb-2014 Krishnankutty Kolathappilly <kkolat@codeaurora.org> audioflinger: Handle pause /resume in stopping state

-Pre-requisite:
Perform seek on the clip. After seek the data remaining till EOS
is little more than the driver and common block buffering.
-Framework state:
Offload thread is waiting for signal from the HAL for a free
buffer. Audio Player calls sink stop on reaching EOS. Audio
track is waiting on obtain buffer for a free space in common
block to send the last buffer. The track is moved to stopping
state as input EOS is reached.
-Issue:
Perform pause/ resume in this state(STOPPING), Audio playback
does not resume.
-Fix
Ensure resume is called in stopping state if frames ready is
greater than zero.

Bug: 12870871

Change-Id: Ib1378c4ee5ce4bea655691e93de0775f7b1d2804
Signed-off-by: Glenn Kasten <gkasten@google.com>
udioflinger/PlaybackTracks.h
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
9ff25ced1404c896df9e6ed3a6ad289305559361 18-Mar-2014 Igor Murashkin <iam@google.com> am 557847ee: am a6ca0acf: am bd3e2e03: camera2: Fix segfault when using null availability listener

* commit '557847ee511dd5e75d584ff04449322f0f098241':
camera2: Fix segfault when using null availability listener
557847ee511dd5e75d584ff04449322f0f098241 18-Mar-2014 Igor Murashkin <iam@google.com> am a6ca0acf: am bd3e2e03: camera2: Fix segfault when using null availability listener

* commit 'a6ca0acf0d009acf45b05561273aaad44ab22533':
camera2: Fix segfault when using null availability listener
314869117d5e3365fc3e43fee01209d18515ca42 18-Mar-2014 Eric Laurent <elaurent@google.com> Merge "move audio policy service to a separate library"
a6ca0acf0d009acf45b05561273aaad44ab22533 17-Mar-2014 Igor Murashkin <iam@google.com> am bd3e2e03: camera2: Fix segfault when using null availability listener

* commit 'bd3e2e03f3ab686c52982a9e50cae853128172cf':
camera2: Fix segfault when using null availability listener
63143ee8a0a59d73655c8eac715ae7321027fa2b 17-Mar-2014 Igor Murashkin <iam@google.com> am bd3e2e03: camera2: Fix segfault when using null availability listener

* commit 'bd3e2e03f3ab686c52982a9e50cae853128172cf':
camera2: Fix segfault when using null availability listener
947237f67dd5335b26326a98fd7d3eae5fd7d702 11-Mar-2014 Ruben Brunk <rubenbrunk@google.com> camera3: Remove old vendor tag ops dependencies.

Bug: 12134423
Change-Id: I7acdf76d4c0674bdb1cc939592d4620687c785c3
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device2/Camera2Device.h
e1445da74730473a66a3ae8414e940aebfe6585d 17-Mar-2014 Igor Murashkin <iam@google.com> camera2: Don't log vendor tag errors when camera HAL too old

Change-Id: Iac3d23284230c95c85ee404abbf9b22df1ae721c
amera/libcameraservice/CameraService.cpp
bd3e2e03f3ab686c52982a9e50cae853128172cf 17-Mar-2014 Igor Murashkin <iam@google.com> camera2: Fix segfault when using null availability listener

ICameraService::addListener / removeListener will now return BAD_VALUE
if a null listener is used.

Bug: 12891434
Change-Id: I9764110094d8fd42e22fcc8df3ef0e73c1b070e7
amera/libcameraservice/CameraService.cpp
3ef14ef30359376006a233f6a21a165d4b65a7df 13-Mar-2014 Glenn Kasten <gkasten@google.com> Make error handling more similar for output and capture

And simplify error case

Change-Id: I0bb1ec252945d672cc4cef137977b912f1b23d51
udioflinger/AudioFlinger.cpp
udioflinger/Tracks.cpp
15e5798908ccac14e10c84834eaf08c42931bd06 24-Sep-2013 Glenn Kasten <gkasten@google.com> Make error handling for audio driver initCheck more similar

Change-Id: I8222f00f7ac89d52235af0f64f3fee7a8c471e1e
udioflinger/Threads.cpp
570f633e0b02d1bc25f3312b92e72cc29a40ca38 13-Mar-2014 Glenn Kasten <gkasten@google.com> Make session ID code similar between output and capture

Change-Id: I873a97d0e36e1a452421df4f749d51e1916797a5
udioflinger/AudioFlinger.cpp
e848bd9abb3bbbd4c66f9fb9d1442f7663d7ba40 13-Mar-2014 Glenn Kasten <gkasten@google.com> Move declarations to where needed

Also remove unnecessary ALOGV and dead variable inFrameCount

Change-Id: I34547fb0fd2ff142fc60277bedfa4064e7356611
udioflinger/AudioFlinger.cpp
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
c3df838434b37d8400eea2438083cc01a4c1cc71 13-Mar-2014 Glenn Kasten <gkasten@google.com> Replace if/else by switch

Change-Id: Ibe96c8fb1f0ba7f850c0561f60769ce63aceba5d
udioflinger/Threads.cpp
05997e21af6c4517f375def6563af4b9ebe95f39 13-Mar-2014 Glenn Kasten <gkasten@google.com> Whitespace and comments

Change-Id: I99752cca74a459c4746ea4718acb0115439e50bd
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
0e0e846f3d86906ff990025981e514d6bcf44d8e 13-Mar-2014 Glenn Kasten <gkasten@google.com> Prepare for additional capture formats

Change-Id: Ib10b004f0029191b33a97671e41b0d86ebfbe0b9
udioflinger/AudioFlinger.cpp
758799cef41fc5495f59eeb6249d02ce9154cde8 14-Mar-2014 Glenn Kasten <gkasten@google.com> resolved conflicts for merge of 3c780188 to master

Change-Id: Ic579d346c27ff05ea6444faaa60fa6caaec86fbf
236104afb2300b7d969b1dc786f14b5f912df1cf 14-Mar-2014 Glenn Kasten <gkasten@android.com> am 089affb6: Merge "mediaserver and associated services are 32-bit only"

* commit '089affb6c2d9ed1e2d49df4be02d30dc490506f9':
mediaserver and associated services are 32-bit only
3c7801882bbb6d5f3cc641525a54cb8a6c4aca34 14-Mar-2014 Glenn Kasten <gkasten@android.com> am 089affb6: Merge "mediaserver and associated services are 32-bit only"

* commit '089affb6c2d9ed1e2d49df4be02d30dc490506f9':
mediaserver and associated services are 32-bit only
4b12341875be1ee7f0b37fa9972f1ea09da94b59 14-Mar-2014 Andy Hung <hunga@google.com> Merge "Fix Offload playback in AudioFlinger"
37e0661f476d2f9a393cff80e1be4955c5ff014f 14-Mar-2014 Andy Hung <hunga@google.com> Merge "Revert "Revert "Convert AudioFlinger mSinkBuffer to flexible format"""
5b10a2037a835e790994b9ebec3c2e55052f1f3b 13-Mar-2014 Andy Hung <hunga@google.com> Fix Offload playback in AudioFlinger

This fixes Offload playback regression introduced by adding
flexible format to mSinkBuffer. Test case is AAC file playback.

Bug: 13450717
Change-Id: I0fa11978295ed4793be90c565e5b8abedf156914
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/Threads.cpp
010a1a1a552cdaad362cea8a0333b8906402dbcb 13-Mar-2014 Andy Hung <hunga@google.com> Revert "Revert "Convert AudioFlinger mSinkBuffer to flexible format""

This reverts commit e2a9c29f35e0c09782558542fc4cf9823779590e.
udioflinger/Threads.cpp
udioflinger/Threads.h
1d59fea10d94e425cd48667d3030418e3907c56c 13-Mar-2014 Ruben Brunk <rubenbrunk@google.com> Merge "camera3: Pass vendor tags through binder."
d1176ef16677b6c94fb893edb6a864cdccc0b190 21-Feb-2014 Ruben Brunk <rubenbrunk@google.com> camera3: Pass vendor tags through binder.

Bug: 12134423

- Adds a class for parceling vendor tag definitions.
- Passes vendor tag definitions to clients of the camera service.
- Switches over to new vendor tag mechanism when reading from HAL.

Change-Id: Icef3fe9e67160767bdb8244ac49c85b68b497123
amera/libcameraservice/Android.mk
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
e2a9c29f35e0c09782558542fc4cf9823779590e 13-Mar-2014 Eric Laurent <elaurent@google.com> Revert "Convert AudioFlinger mSinkBuffer to flexible format"

This reverts commit e7e676fd2866fa4898712c4effa9e624e969c182.

Bug: 13450717.
Change-Id: Ib80b0d14428fecce33c62003a1fcf83f71cee03b
udioflinger/Threads.cpp
udioflinger/Threads.h
8aa0f0619ea867e8fb240cf27913d4f8ae767385 12-Mar-2014 Dan Stoza <stoza@google.com> Remove deprecated BufferQueue constructor

Bug: 13415624
Change-Id: Ifc8f778b70102a38a9f7a086632e6884714e6b58
amera/libcameraservice/api1/client2/CallbackProcessor.cpp
amera/libcameraservice/api1/client2/JpegProcessor.cpp
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
amera/libcameraservice/api1/client2/ZslProcessor.cpp
amera/libcameraservice/device3/Camera3InputStream.cpp
amera/libcameraservice/device3/Camera3ZslStream.cpp
af783aa91f7a279153fb8bab8d0d6b9f737996e9 03-Mar-2014 Glenn Kasten <gkasten@android.com> mediaserver and associated services are 32-bit only

also 32-bit only command-line apps

Change-Id: I9ac557a8d02bbf6986a9b5c3cdce23d400b306a3
udioflinger/Android.mk
amera/libcameraservice/Android.mk
edialog/Android.mk
708601d042ae2a927da2181f33da47d9b01ad411 12-Mar-2014 Zhijun He <zhijunhe@google.com> am f0fb921c: am bc69c8ba: DO NOT MERGE: Camera: delete preview callback when preview size is changed

* commit 'f0fb921c0170fe3b8ebce8fbe3c133a99c6def9f':
DO NOT MERGE: Camera: delete preview callback when preview size is changed
e07208765fcd5904165e425ec714a25c350a2f40 11-Mar-2014 Eric Laurent <elaurent@google.com> audio policy: renamed AudioPolicyManagerBase to AudioPolicyManager

Change-Id: Ia8b5ae9c3a9cf6ed98f162614ea331efc78e9ff2
udiopolicy/AudioPolicyManager.cpp
udiopolicy/AudioPolicyManager.h
udiopolicy/AudioPolicyManagerBase.cpp
udiopolicy/AudioPolicyManagerBase.h
3b73df74357b33869b39a1d69427673c780bd805 11-Mar-2014 Eric Laurent <elaurent@google.com> audio policy: remove dependency from AudioSystemLegacy

Remove all dependencies on AudioSystemLegacy from AudioPolicyManagerBase.
Only use types and definitions from audio.h and audio_policy.h.
Also move code back into android name space.

Change-Id: I0c2582cf854027fb1e599981865a6cbe7b5a9490
udiopolicy/AudioPolicyInterface.h
udiopolicy/AudioPolicyManagerBase.cpp
udiopolicy/AudioPolicyManagerBase.h
e552edb33fb5873179ae0a46d9579d1103eb13c6 11-Mar-2014 Eric Laurent <elaurent@google.com> audio policy: import audio policy manager from hardware legacy

Import AudioPolicyManagerBase from hardware/libhardware_legacy
to prepare move from android_audio_legacy name space.

Change-Id: I5d6682ccd2bfdeefbf2f6f81a557480a76aaf4fc
udiopolicy/AudioPolicyInterface.h
udiopolicy/AudioPolicyManagerBase.cpp
udiopolicy/AudioPolicyManagerBase.h
2d388eccc9dc085337c7a03a68467cbee6b809e1 07-Mar-2014 Eric Laurent <elaurent@google.com> audio policy: split implementation

Split audio policy service implementation to ease
further evolution:
AudioPolicyInterfaceImpl.cpp contains the implementation of
IAudioPolicyService interface
AudioPolicyClientImpl.cpp contains the implementation of the
AudioPolicyManager client interface
AudioPolicyService.cpp contains the rest of the code mostly
command threads implementation and pre processing management.

AudioPolicyService.cpp:

Change-Id: Ic48ba165532ef66e84a30894d01f750ed6619d02
udiopolicy/Android.mk
udiopolicy/AudioPolicyClientImpl.cpp
udiopolicy/AudioPolicyInterfaceImpl.cpp
udiopolicy/AudioPolicyService.cpp
c7e5040aa8b8e4da86814bf560346c7571e48087 06-Mar-2014 Eric Laurent <elaurent@google.com> move audio policy service to a separate library

Change-Id: Ibc3ef07aa9860b7fd4f9aaff27b0dbe0dcbf1cbf
udioflinger/Android.mk
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
udiopolicy/Android.mk
udiopolicy/AudioPolicyService.cpp
udiopolicy/AudioPolicyService.h
f0fb921c0170fe3b8ebce8fbe3c133a99c6def9f 11-Mar-2014 Zhijun He <zhijunhe@google.com> am bc69c8ba: DO NOT MERGE: Camera: delete preview callback when preview size is changed

* commit 'bc69c8ba9a8fc881603669205a56d0ca1b572a95':
DO NOT MERGE: Camera: delete preview callback when preview size is changed
b120f897ad41c0a386081f74f47fd560c6e86f34 11-Mar-2014 Zhijun He <zhijunhe@google.com> am bc69c8ba: DO NOT MERGE: Camera: delete preview callback when preview size is changed

* commit 'bc69c8ba9a8fc881603669205a56d0ca1b572a95':
DO NOT MERGE: Camera: delete preview callback when preview size is changed
e7e676fd2866fa4898712c4effa9e624e969c182 05-Mar-2014 Andy Hung <hunga@google.com> Convert AudioFlinger mSinkBuffer to flexible format

Change-Id: I618d9c99a5f6f8c8d6a9f4b2d19e82c9ddc3b06e
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/Threads.cpp
udioflinger/Threads.h
bc69c8ba9a8fc881603669205a56d0ca1b572a95 21-Jan-2014 Zhijun He <zhijunhe@google.com> DO NOT MERGE: Camera: delete preview callback when preview size is changed

Preview callback stream is left configured even the preview size is changed.
This makes the callback stream unnecessarily configured even in recording mode,
which could cause distorted preview for some devices.

Bug: 12210027
Bug: 12591410
Change-Id: If50cddfe5562e91aec1feb1760eccb82ddb21730
amera/libcameraservice/api1/Camera2Client.cpp
98ef978df4e928f486d244c4d7f7ad9f13111e98 04-Mar-2014 Andy Hung <hunga@google.com> Add mEffectBuffer to AudioFlinger

Change-Id: Icf97c50040bc127723d56eb4d2fb6e790a7253d9
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/Threads.cpp
udioflinger/Threads.h
6a7b53008ac0831431f42c620d2988c65b21d859 07-Mar-2014 Eino-Ville Talvala <etalvala@google.com> am a11111f9: Merge changes Id28b35fd,Ie4e64977,I2950f31e into klp-dev

* commit 'a11111f9135c98cf4247bbd1a61d7df3053e549e':
DO NOT MERGE: Camera: fix focusArea wrong indexing issue
DO NOT MERGE: camera2: Fix race with stream deletion during disconnect.
DO NOT MERGE: camera2/3: Add protection for still capture path
f69f9869514730aebe5724c461768507084dfff7 07-Mar-2014 Glenn Kasten <gkasten@google.com> NBAIO::Format_from_SR_C requires audio_format_t parameter

Change-Id: I4b65f6ed2f6ca3608b3a5f88f52a93af0b9b1f4a
udioflinger/Threads.cpp
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
10ac79930120efea20b125f5faedfe89e8674676 07-Mar-2014 Glenn Kasten <gkasten@android.com> am 5930e8eb: Merge "AudioFlinger: Remove code for supporting resampling in fast tracks"

* commit '5930e8ebdacf3a59c13eef11fd03658ba58b443e':
AudioFlinger: Remove code for supporting resampling in fast tracks
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
396a2bc8d1934ccea6159dfcee88e47f0c3c21aa 07-Mar-2014 Glenn Kasten <gkasten@android.com> am d66cd743: Merge "audioflinger: conform inline ASM to UAL"

* commit 'd66cd743525cc049033caa3e81cbdf74c72a4556':
audioflinger: conform inline ASM to UAL
40659dea8eefaa9d7f5b742e3333d68b6f0dd89c 07-Mar-2014 Eino-Ville Talvala <etalvala@google.com> am 47ef192f: am a11111f9: Merge changes Id28b35fd,Ie4e64977,I2950f31e into klp-dev

* commit '47ef192f0296642b901e82d0c72c5a1a0d08f4df':
DO NOT MERGE: Camera: fix focusArea wrong indexing issue
DO NOT MERGE: camera2: Fix race with stream deletion during disconnect.
DO NOT MERGE: camera2/3: Add protection for still capture path
47ef192f0296642b901e82d0c72c5a1a0d08f4df 07-Mar-2014 Eino-Ville Talvala <etalvala@google.com> am a11111f9: Merge changes Id28b35fd,Ie4e64977,I2950f31e into klp-dev

* commit 'a11111f9135c98cf4247bbd1a61d7df3053e549e':
DO NOT MERGE: Camera: fix focusArea wrong indexing issue
DO NOT MERGE: camera2: Fix race with stream deletion during disconnect.
DO NOT MERGE: camera2/3: Add protection for still capture path
a11111f9135c98cf4247bbd1a61d7df3053e549e 07-Mar-2014 Eino-Ville Talvala <etalvala@google.com> Merge changes Id28b35fd,Ie4e64977,I2950f31e into klp-dev

* changes:
DO NOT MERGE: Camera: fix focusArea wrong indexing issue
DO NOT MERGE: camera2: Fix race with stream deletion during disconnect.
DO NOT MERGE: camera2/3: Add protection for still capture path
55fbfbbbf00722dac3f789be69138445b771a1e1 06-Mar-2014 Glenn Kasten <gkasten@google.com> Merge "Use larger capture pipe since we support resampling by 6:1"
6cbccee701e74fa43a5ea49c15af7dd3267b6699 14-Dec-2013 Haynes Mathew George <hgeorge@codeaurora.org> audioflinger: Fix for a deadlock in track creation

AudioFlinger enters a deadlock (with itself) on trying to free a
RecordTrack or Track object that failed initialization. Clear this
bad object from the caller instead.

Bug: 12423233
Change-Id: I926f2beb922a70f6924e593e2bbf1a5b5df85b16
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
4f4c9a22f4676c65bcae77f0805dcd699b3ba475 06-Mar-2014 Eric Laurent <elaurent@google.com> am 281dd4e1: audioflinger: fix static track end detection

* commit '281dd4e13309973dbb85bce531f884237e0d8fb0':
audioflinger: fix static track end detection
a413dd621966044753a8fa1f57c76d847b6f4bec 29-Jan-2014 Zhijun He <zhijunhe@google.com> DO NOT MERGE: Camera: fix focusArea wrong indexing issue

Bug: 12304559
Change-Id: Id28b35fdd9697c1ec3365f617996801965de8bd0
amera/libcameraservice/api1/client2/Parameters.cpp
0c937b4946fae178447d9f8d29200fa2798c05f9 05-Mar-2014 Eric Laurent <elaurent@google.com> am eb16bb5d: am 7028a2c8: am 7e92abea: audioflinger: fix offload write buffer offset

* commit 'eb16bb5dcecf430bfec1c2a4bd15851c83b9c3cc':
audioflinger: fix offload write buffer offset
7028a2c8106ee5a22db88da5dad581820ee07254 05-Mar-2014 Eric Laurent <elaurent@google.com> am 7e92abea: audioflinger: fix offload write buffer offset

* commit '7e92abeafb184e8a34213d7149592e95a72601b0':
audioflinger: fix offload write buffer offset
6706009fa8294c8cdab1cdab4585f00d42df483e 05-Dec-2013 Ruben Brunk <rubenbrunk@google.com> DO NOT MERGE: camera2: Fix race with stream deletion during disconnect.

Bug: 11856804

- Shutdown order in Camera2Client allows a stream to be
deleted before the corresponding processing thread has
quit. This can result in updates being called on the
processor thread without a valid stream.

Change-Id: Ie4e649771f4321498659211f2a37ed89a6d956c4
amera/libcameraservice/api1/Camera2Client.cpp
81d754306ecd4a587459015da5168270c2a5c167 27-Nov-2013 Zhijun He <zhijunhe@google.com> DO NOT MERGE: camera2/3: Add protection for still capture path

Jpeg stream in JpegProcessor could be deleted while process new capture is
ongoing, which unsafe to access a dead consumer endpoint.
Bug: 9316454
Change-Id: I2950f31ea28d0ba01f08502e2e3ba452bf8bb818
amera/libcameraservice/api1/client2/JpegProcessor.cpp
d812fc012298470a1b8120e6d60a24b0b1d48047 03-Dec-2013 Glenn Kasten <gkasten@google.com> Increase kFastTrackMultiplier from 1 to 2

Bug: 11967381
Change-Id: Iedec06280aa745d9df5d661f4916940cede9c191
udioflinger/Threads.cpp
281dd4e13309973dbb85bce531f884237e0d8fb0 21-Dec-2013 Eric Laurent <elaurent@google.com> audioflinger: fix static track end detection

If a static track is not a fast track,
prepareTracks_l() must rely on framesReady() to
detect end of buffer and remove the track from the active
track list.
Failing to do so results in the track staying active but
not processed by the mixer because in underrun. This leaves the
mix buffer content uninitialized and causes the effect process
function to accumulate its output onto undefined data.

Bug: 12013676.
Change-Id: I4b0819a9d93141ac3307b8786fc6a451dd585220
udioflinger/Threads.cpp
abab1c33caf0982c11713e6d64d60105dcbc8ab7 06-Jan-2014 Gaurav Kumar <gaurav.kumar@broadcom.com> AudioMixer: Remove tracks from enabledTracks after reseting outTemp

If any track goes through AudioMixer::process__genericNoResampling, and
its getnextbuffer returns NULL, Then that track is removed by AudioMixer
from enabledTracks.

Thus if all tracks getnextbuffer return NULL, Then this function doesn't
reset outTemp and last buffer in AudioFlinger's mMixBuffer will be
repeated and noise is observed.

Remove tracks from enabledTracks after reseting outTemp to zero, so that
process__genericNoResampling will reset outTemp and noise won't appear.

Bug: 12450065

Change-Id: I28996d425838728955f01eb1a00acf6e6dc2dea1
Signed-off-by: Gaurav Kumar <gaurav.kumar@broadcom.com>
Signed-off-by: Pierre Couillaud <pierre@broadcom.com>
udioflinger/AudioMixer.cpp
7e92abeafb184e8a34213d7149592e95a72601b0 22-Nov-2013 Eric Laurent <elaurent@google.com> audioflinger: fix offload write buffer offset

Fix current audio HAL write buffer offset calculation
which assumes that the frame size is a multiple of 2.
'
Bug: 12823725.

Change-Id: I0195ed5cfef225a6f114e7dd405a02680bb7254e
udioflinger/Threads.cpp
0504a198d6595e29e58d1d66ae59fac1d662384a 05-Mar-2014 Haynes Mathew George <hgeorge@codeaurora.org> am 632c3790: am 7c206e5b: am e0cd1051: audioflinger: update track ready condition

* commit '632c3790523896260dc43fd6cd40a158765cdb15':
audioflinger: update track ready condition
d384a2c44810ce1b51277cc4ab4c5415ff7de6ee 05-Mar-2014 Haynes Mathew George <hgeorge@codeaurora.org> am 4f9e38c6: am 21e81bca: am e010f65e: audioflinger: Fix for a deadlock in track creation

* commit '4f9e38c60cc79407a8b2966b3b9780a3e395b017':
audioflinger: Fix for a deadlock in track creation
7c206e5bd24b5ae4565d0e60b637458a1054dfcf 05-Mar-2014 Haynes Mathew George <hgeorge@codeaurora.org> am e0cd1051: audioflinger: update track ready condition

* commit 'e0cd1051ed9fea0629745c29020516ae62298461':
audioflinger: update track ready condition
21e81bca4d1e6f7d1ccac61b65da7c7a4a121064 05-Mar-2014 Haynes Mathew George <hgeorge@codeaurora.org> am e010f65e: audioflinger: Fix for a deadlock in track creation

* commit 'e010f65e6337267cb15f8894c950a3f64370dd36':
audioflinger: Fix for a deadlock in track creation
50c3157c5a3e0617be77716beff1ae8801d8a72f 04-Dec-2013 Haynes Mathew George <hgeorge@codeaurora.org> audioflinger: check for condition before waiting

AsyncCallbackThread must check for any condition that
was already been satisfied before waiting.

Bug: 11824817
Change-Id: I04683a1f355de4f440106cab47fd916aa39d5e35
udioflinger/Threads.cpp
e0cd1051ed9fea0629745c29020516ae62298461 28-Dec-2013 Haynes Mathew George <hgeorge@codeaurora.org> audioflinger: update track ready condition

Signal track ready if the track isStopping().

Bug: 12423190
Change-Id: I95e14905df10ebf301e398263478c8ca25d7e2ce
udioflinger/Tracks.cpp
e010f65e6337267cb15f8894c950a3f64370dd36 14-Dec-2013 Haynes Mathew George <hgeorge@codeaurora.org> audioflinger: Fix for a deadlock in track creation

AudioFlinger enters a deadlock (with itself) on trying to free a
RecordTrack or Track object that failed initialization. Clear this
bad object from the caller instead.

Bug: 12423233
Change-Id: I926f2beb922a70f6924e593e2bbf1a5b5df85b16
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
788207057ed4b8df4719ed8089f376ef52de9ca1 01-Mar-2014 Andy Hung <hunga@google.com> Rename mSinkFormat to mMixerFormat for AudioMixer::track_t

AudioMixer::SINK_FORMAT also changes to AudioMixer::MIXER_FORMAT

Change-Id: Ic3f8be77d2c75c082c4fd140bc907e30c304d285
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/Threads.cpp
7ed1873acbf43280c5afe51833c3d628fe34e258 01-Mar-2014 Andy Hung <hunga@google.com> Merge "Use float_from_q19_12 conversion in AudioMixer"
3375bde6c6c1821fca3eeb4840774112e26c9a68 01-Mar-2014 Andy Hung <hunga@google.com> Use float_from_q19_12 conversion in AudioMixer

Change-Id: Idbe84fb9610c7e636a84468f2e2402a913435ca9
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/AudioMixer.cpp
e842614837e5401adf77e90485300c288b9a7876 01-Mar-2014 Glenn Kasten <gkasten@google.com> Use larger capture pipe since we support resampling by 6:1

This avoids overruns on the client AudioRecord side,
without requiring client to use a large buffer.
It should not increase input latency, since a newly started AudioRecord
always joins the stream starting at the latest data.

Change-Id: Ib2b8de75cc40a6a3d493a1f8b46b41220f69264f
udioflinger/Threads.cpp
b442921146664fba77b91f221e9b1997ffb8170e 01-Mar-2014 Andy Hung <hunga@google.com> Merge "Add MixerBuffer for accumulation of float audio"
3c35c48a47e9cfbc25778652ff8423f905271a19 28-Feb-2014 Andy Hung <hunga@google.com> Merge "Rename mixBufferSize to mSinkBufferSize in AudioFlinger"
eafbe37da9a08f7599281bc19e000cdf70ae08b6 28-Feb-2014 Andy Hung <hunga@google.com> Merge "Rename constants for MixBufferSize to SinkBufferSize"
625b57c5ab5fefde1547d89a061420be733fb7dd 28-Feb-2014 Andy Hung <hunga@google.com> Merge "Rename mMixBuffer to mSinkBuffer in AudioFlinger"
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioPolicyService.cpp
69aed5f0f4a3be3996d1e78a0473e1a72c1547da 26-Feb-2014 Andy Hung <hunga@google.com> Add MixerBuffer for accumulation of float audio

Path into and out of MixerBuffer is set up, but not
currently enabled.

Change-Id: I9d50752607d22dd2a3d9cc7e053babf8dfb22958
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/Threads.cpp
udioflinger/Threads.h
25c2dac12114699e90deb1c579cadebce7b91a97 27-Feb-2014 Andy Hung <hunga@google.com> Rename mixBufferSize to mSinkBufferSize in AudioFlinger

Change-Id: I4d1d18d716fa3ad8c0e7cc87f5a2823422f504eb
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/Threads.cpp
udioflinger/Threads.h
09a5007b17acb49d25cfa386a2e2534d942e8854 27-Feb-2014 Andy Hung <hunga@google.com> Rename constants for MixBufferSize to SinkBufferSize

Updated variable names are
kMinNormalSinkBufferSizeMs
kMaxNormalSinkBufferSizeMs

Change-Id: I91969eae3f8c10275db8778634cbf05fdec0712b
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/Threads.cpp
2098f2744cedf2dc3fa36f608aa965a34602e7c0 27-Feb-2014 Andy Hung <hunga@google.com> Rename mMixBuffer to mSinkBuffer in AudioFlinger

Change-Id: I1f55630425b8ce36e9df2aaf64e06a8960b69a47
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/Threads.cpp
udioflinger/Threads.h
8897759002677a7072a51a7f0b7cc63761c5f2d4 27-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "Move up AudioFlinger::createTrack and openRecord parameter checks"
53b5d098b7d5d4412b9b9fe08daaf84c56b716e9 05-Feb-2014 Glenn Kasten <gkasten@google.com> Move up AudioFlinger::createTrack and openRecord parameter checks

Perform the basic sample rate, format, and channel masks tests as
early as possible. Now the thread methods only need to do the thread
type-specific checks.

Change-Id: I57d8319a228dda0446ca9b3ddcb7c9f67f28238c
udioflinger/AudioFlinger.cpp
4d3c5bde85c5404d7927a770da90a5c9d09fb6a7 27-Feb-2014 Andy Hung <hunga@google.com> Merge "Add Track Sink Format to AudioMixer"
a1ab7cc8611c83427b57f6d4d4ce7aad9d1c0330 25-Feb-2014 Andy Hung <hunga@google.com> Add Track Sink Format to AudioMixer

Track Sink Format now allows both AUDIO_FORMAT_PCM_FLOAT and
AUDIO_FORMAT_PCM_16_BIT (default). The float case is not
enabled now.

Change-Id: Ibee70cab4725c8bc9905e49f1f9a9c2448f76e00
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
b78d804b1090a430a126a6c356037ded96ffd91a 25-Feb-2014 Andy Hung <hunga@google.com> Merge "Fix 1:1 dynamic resampler rate setting"
9d518f1aa50da9c3dfadb97090fb79aac886da12 25-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "The -O option now takes a CSV instead of a single value"
3f73448090d99612c6d8f579e4164507d8848cc1 24-Feb-2014 Ruben Brunk <rubenbrunk@google.com> Merge "camera2: Fix race with stream deletion during disconnect."
323da1015a758243c2c43017b026a01c6cf0c6f2 22-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "Account for unreleased frames when predicting resampler needs"
d0e0cfa58a35508c14818b88804845194b5d80e1 22-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "Make tee sink work again"
607fa3e928de696eba49f198af72d68e4591ca1b 21-Feb-2014 Glenn Kasten <gkasten@google.com> Account for unreleased frames when predicting resampler needs

Other changes related to resampling:
- improve logs
- use correct form of assert
- don't round up max usable circular buffer sizes to power of 2;
this gives more predictable results
- add some FIXMEs

Bug: 13133176
Change-Id: I8d3c90eed4eb0c0c1fbac3c864e179a2806c2301
udioflinger/Threads.cpp
c52b033f0be38ca915d389b672bcf9c46b4c78ef 21-Feb-2014 Glenn Kasten <gkasten@google.com> The -O option now takes a CSV instead of a single value

Also added -P option to provide a CSV list of provided values.

Change-Id: I4e0d6fe8b062d27d95d33493f80bd8f1c510d2c8
udioflinger/test-resample.cpp
f66b42242342017c26eb97de544dae31dd2537ca 20-Feb-2014 Glenn Kasten <gkasten@google.com> Make tee sink work again

It was broken by this earlier change to NBAIO:
> Change-Id: I5eda412648b094358f5eefc38300e9ec8a734cd3
But the code was not being compiled, so the error was not caught earlier.

Also increase the default size of per-track pipe to a reasonable value.

Change-Id: Ica05017e6c6533e1fea9df379a9b204eebed4a1f
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
8ea16e4b0a7d398d26887c18675b3899de5d779d 21-Feb-2014 Eric Laurent <elaurent@google.com> audioflinger: fix race condition in SyncEvent callback

Now that the SyncEvent callback is implemented by the
RecordTrack instead of the RecordThread, there is a possibility
that the callback is called after the track deletion.

SyncEvent callback now uses a weak pointer instead of
a raw pointer as cookie. This allows the callback implementer to
acquire a strong reference on the object pointed to by the cookie.

Bug: 13114128.
Change-Id: Id61b8f06044ed1e52c6f7e7c666cdede68340de2
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
1af34085e18c4d5ab297232f167a71e89ff7f65d 20-Feb-2014 Andy Hung <hunga@google.com> Fix 1:1 dynamic resampler rate setting

Change-Id: Id69e98ebaaca8dd8c976eb823f1cc1024b0eddf5
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/AudioResamplerDyn.cpp
56df9ff31d583ad3eae4f279a3df550273c58e1e 17-Feb-2014 Glenn Kasten <gkasten@google.com> Allow specifying frames per call to resample()

Bug: 13073201
Change-Id: Id2f0fcd7562d9ba5a58c128d71bbba42dfea86cc
udioflinger/test-resample.cpp
d20db4c4d8eb2593b5d0214890420a49e0b01796 20-Feb-2014 Andy Hung <hunga@google.com> Merge "Fix resampler to allow output of single frame"
24781fff62a4cf7279d3dac83c33e2ac612712ba 19-Feb-2014 Andy Hung <hunga@google.com> Fix resampler to allow output of single frame

Bug: 13073201
Change-Id: If7818a3389a191a37277bbd8e96a59ef8ce68509
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/AudioResampler.cpp
udioflinger/AudioResampler.h
udioflinger/AudioResamplerCubic.cpp
udioflinger/AudioResamplerDyn.cpp
udioflinger/AudioResamplerSinc.cpp
4cc0a6a835c806d200ef83ef31fe5bef327c355c 17-Feb-2014 Glenn Kasten <gkasten@google.com> Multi-client recording continued

Remove mReqChannelCount and mReqSampleRate.
Increase number of input frames needed for sample rate converter.
Add TODO comments to investigate later.
Fix bugs in sample rate conversion.

Change-Id: I3aa54b862843d518b6e4ece9a7f52fd27d741629
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
25f4aa83efaa9179e65a20583a6d441de2c3ff3f 07-Feb-2014 Glenn Kasten <gkasten@google.com> Move handleSyncStartEvent and clearSyncStartEvent to RecordTrack

Change-Id: I611a63e63acf3eb17e2072c1a77b91fe9e62e36a
udioflinger/RecordTracks.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
deca2ae0a7cf8bc54ff3f30b7dc39bbc78b94c0d 07-Feb-2014 Glenn Kasten <gkasten@google.com> Add _l suffix to readInputParameters/OutputParameters

They are always called while thread mutex is locked,
or in the thread constructor.

Change-Id: I56df71563a52a5cd6cea6fc0914df993519e1b74
udioflinger/RecordTracks.h
udioflinger/Threads.cpp
udioflinger/Threads.h
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
udioflinger/RecordTracks.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/TrackBase.h
udioflinger/Tracks.cpp
c940c38242e8e0265db25a646ad63263934f2bb9 13-Feb-2014 Marco Nelissen <marcone@google.com> Merge "Track pid for each session"
c6d7ab74962bfd24d105277b28248b4819763abd 12-Feb-2014 Andy Hung <hunga@google.com> Merge "Proper adjustment of filterlength for downsampling"
a3bb9a3a25b58669d75da4f73764ac4c2bf34158 11-Feb-2014 Andy Hung <hunga@google.com> Proper adjustment of filterlength for downsampling

Bug: 12963040
Change-Id: I772b8efd3f7eae6d075994b210dd0168f5365f4d
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/AudioResamplerDyn.cpp
d457c970c8d08519cd77280a90b61ae1e342cfe3 11-Feb-2014 Marco Nelissen <marcone@google.com> Track pid for each session

so they can be properly freed.

Change-Id: I6f389035bc29e74e7c367c1c6d0252b180f666b3
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/Effects.cpp
udioflinger/FastMixer.cpp
udioflinger/StateQueue.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/CameraClient.cpp
amera/libcameraservice/api1/client2/ZslProcessor.cpp
amera/libcameraservice/api1/client2/ZslProcessor3.cpp
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device3/Camera3IOStreamBase.cpp
amera/libcameraservice/device3/Camera3ZslStream.cpp
b1f5b0dd237c2767ad7bc0b081d03aafc87589ea 10-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "Fix clang warnings in AudioFlinger"
4b76d27d6c4751b31a1cb8ac5e6da1d4b7724a7b 10-Feb-2014 Glenn Kasten <gkasten@android.com> am 5a458ede: am 5930e8eb: Merge "AudioFlinger: Remove code for supporting resampling in fast tracks"

* commit '5a458ede3b7d303723fde4b856532bdc3b94971b':
AudioFlinger: Remove code for supporting resampling in fast tracks
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
5930e8ebdacf3a59c13eef11fd03658ba58b443e 10-Feb-2014 Glenn Kasten <gkasten@android.com> Merge "AudioFlinger: Remove code for supporting resampling in fast tracks"
4361749d74113069aafb0620a1189404205c58d0 10-Feb-2014 Glenn Kasten <gkasten@android.com> Merge "AudioTrack: Never try to use the fast path if resampling is required"
9601c6efcb2552960d6f125d073525b581c1b7ec 10-Feb-2014 Marco Nelissen <marcone@google.com> Merge "Pretty up audioflinger dumpsys"
01d3acba9de861cb2b718338e787cff3566fc5ec 06-Feb-2014 Glenn Kasten <gkasten@google.com> Fix clang warnings in AudioFlinger

Change-Id: I0fa61025c979709ad7d655bc717df5f194b6089e
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.h
udioflinger/AudioPolicyService.cpp
udioflinger/AudioResampler.cpp
udioflinger/AudioResampler.h
udioflinger/Effects.cpp
udioflinger/Effects.h
ec95f0e82a680931e9c7c9011dbbd68d5ab484c8 10-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "Use printf format %#x for audio_format_t in logs"
b220884bf3129253cc5bc8d030bc475411ea4911 07-Feb-2014 Marco Nelissen <marcone@google.com> Pretty up audioflinger dumpsys

Change-Id: I57e44b4c36b99f7149542bbcf9645521c6152dfa
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Effects.cpp
udioflinger/FastMixer.cpp
udioflinger/PlaybackTracks.h
udioflinger/RecordTracks.h
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
8f762d577f2dcf34357eb8731070ae465649ec9a 08-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "Fix whitespace"
a793625031a3e326a261a0843598c35a5784bbde 07-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "Use Format_isValid() and Format_isEqual() instead of direct comparison"
4944acb7355b3aa25748fd25945a363a69d65444 19-Aug-2013 Glenn Kasten <gkasten@google.com> Fix whitespace

Change-Id: I9add0872030a26933f6b6dad1be299154611cc56
udioflinger/AudioPolicyService.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
cac3daa6332bf6d1f7d26adc4a9915f3d7992dd9 07-Feb-2014 Glenn Kasten <gkasten@google.com> Use printf format %#x for audio_format_t in logs

Change-Id: I1c611d1037685d52ccc84efe0fccd6413ec938e9
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
f74f213c0cd0612101e00a73704429dac1a92fe3 07-Feb-2014 Eric Laurent <elaurent@google.com> Merge "AudioFlinger: Offload track transition fix"
d9a4783985203c759ddcca784798ef395668fe05 07-Feb-2014 Eric Laurent <elaurent@google.com> Merge "AudioFlinger: Modify flush handling for offload path"
c9583cba9913682e1c181675c6d0066292fb719d 07-Feb-2014 Eric Laurent <elaurent@google.com> Merge "audioflinger: OffloadThread state fix"
010c4c8ec50eb04ece15f792c508a3b869749310 07-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "Fix IoConfigEvent constructor initializer list"
4c6a433d74d5ae8b9bc0557207e3ced43bf34a25 15-Jan-2014 Haynes Mathew George <hgeorge@codeaurora.org> AudioFlinger: Offload track transition fix

Trigger state changes in OffloadThread on adding a new offload track.

Bug: 12530661
Change-Id: I95b62764c7ac041d470702e86b951f812eb0e70f
udioflinger/Threads.cpp
udioflinger/Threads.h
7844f679be8d94c5cdf017f53754cb68ee2f00da 15-Jan-2014 Haynes Mathew George <hgeorge@codeaurora.org> AudioFlinger: Modify flush handling for offload path

Do not allow an offload track to directly control the offload thread
behavior. OffloadThread can check for any pending flush reporting
by its active tracks and decide to flush the HW or not.

Bug: 12530661
Change-Id: Ib33f023c942f6c091b618004136b153c38a6eef6
udioflinger/PlaybackTracks.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
0f02f265123b7ef2fd6ac09ff70cde26eb5559ad 11-Jan-2014 Haynes Mathew George <hgeorge@codeaurora.org> audioflinger: OffloadThread state fix

When switching from one offload session to another that
reuses the same offload output, audio HAL is paused & flushed in
preparation for the new track

OffloadThread must reset mHwPaused to allow proper state transitions
for the second track. In addition, Offload thread need not
explicitly call resume on HAL while handling a flush.

Bug: 12530661
Change-Id: I8173845e1782b5a8b372a82c7d337299a61e0efe
udioflinger/Threads.cpp
3ce28aa3cb5262775180a8b423cfb4a5670ebc59 05-Feb-2014 Martin Storsjo <martin@martin.st> AudioFlinger: Remove code for supporting resampling in fast tracks

This isn't used at the moment.

Change-Id: I4e0fb2af5f7d959dbafd5ddb7defa1c6b8e8636a
udioflinger/FastMixer.cpp
udioflinger/FastMixerState.cpp
udioflinger/FastMixerState.h
udioflinger/Threads.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"
4a25471795b05ffcfcc079e9f9cb5ed549023d14 05-Feb-2014 Glenn Kasten <gkasten@android.com> am 5ef74dce: am d66cd743: Merge "audioflinger: conform inline ASM to UAL"

* commit '5ef74dce64a1b70534547c044a6d15533f4a9dca':
audioflinger: conform inline ASM to UAL
7332c37c459f5f382a9e4105d522d1c5a7f6f0b5 05-Feb-2014 Glenn Kasten <gkasten@google.com> Merge "audioflinger: Fix for a deadlock in track creation"
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
amera/libcameraservice/CameraService.cpp
ce6249980434dd04e0eac397083d917cdc4452e9 24-Jan-2014 Ruben Brunk <rubenbrunk@google.com> camera3: Update maxRegions tag.

Change-Id: I22501cbf7f941d9626b88182e2dda8a13a620d01
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
5f51ade2c290e239a125dc88943b240e1105fd97 04-Feb-2014 synergy dev <synergye@codefi.re> audioflinger: conform inline ASM to UAL

Clang requires some inline ASM to conform to the UAL standards (Unified Assembler Language).
This fixes a small issue in this inline asm to allow building.

Change-Id: Ifd9b1814343ab5ade636b9401a21d575559dac16
udioflinger/AudioResampler.cpp
6e0d67d7b496ce17c0970a4ffd3a6f808860949c 31-Jan-2014 Glenn Kasten <gkasten@google.com> Use Format_isValid() and Format_isEqual() instead of direct comparison

Change-Id: Ie87607aa514976947540a77775e6425c4e56e7d9
udioflinger/AudioFlinger.cpp
udioflinger/FastMixer.cpp
udioflinger/Tracks.cpp
a98a58ce32f4ad1bdb7692184eb17622fb11e397 04-Feb-2014 Andy Hung <hunga@google.com> Merge "Fix dynamic resampling for non-NEON devices"
83be2560d9396b3bd32919123bd67a783e6aaf7c 03-Feb-2014 Andy Hung <hunga@google.com> Fix dynamic resampling for non-NEON devices

The stride by 16 code template automatically falls back to stride by 2
(as the NEON code template override does not occur).
As such the stride by 2 (in the switch) was removed as it was unnecessary.
Removing the if() causes the fall back to happen properly for non-NEON
compilation.

Change-Id: Ia7aec6ae1d88eb54377e56e2fb57f2ae5b74cf1b
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/AudioResamplerDyn.cpp
0f11b51a57bc9062c4fe8af73747319cedabc5d6 01-Feb-2014 Glenn Kasten <gkasten@google.com> Fix unused parameter warnings in audio

Change-Id: I665ba3358dd9502f0adec70d486e7bf8a2e1b0fe
udioflinger/AudioFlinger.cpp
udioflinger/AudioPolicyService.cpp
udioflinger/Effects.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
edialog/MediaLogService.cpp
49debee5bdddd7a1e0742a3ab66d4630bbe25ca2 01-Feb-2014 Glenn Kasten <gkasten@google.com> Fix IoConfigEvent constructor initializer list

Fortunately this bug never showed up, because the parameter
field has not been used yet.

Change-Id: I2b36e2b7e1dcc2039c494fc5ea4994d262435aac
udioflinger/Threads.h
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
udioflinger/Configuration.h
udioflinger/Threads.cpp
9e0308c03d4e76d3146cbb6e30aeb3ac03f05cf5 30-Jan-2014 Andy Hung <hunga@google.com> Enable new dynamic audio resampler as default

The default may still be overridden by af.resampler.quality
in the local or build properties file. For the build properties
check the relevant device.mk files.

In the absence of being overridden, the 44.1 to 48kHz and
48 to 44.1kHz conversion will use the DYN_MED_QUALITY resamplers
and other conversion will use the DYN_LOW_QUALITY resamplers.

Change-Id: Icf9a4af5422cddc445e1904eef93984b0abe6a44
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/AudioMixer.cpp
udioflinger/AudioResampler.cpp
745e9a8283b56c7772ee7d72383a3f2e012e1ef9 21-Dec-2013 Eric Laurent <elaurent@google.com> audioflinger: fix static track end detection

If a static track is not a fast track,
prepareTracks_l() must rely on framesReady() to
detect end of buffer and remove the track from the active
track list.
Failing to do so results in the track staying active but
not processed by the mixer because in underrun. This leaves the
mix buffer content uninitialized and causes the effect process
function to accumulate its output onto undefined data.

Bug: 12013676.
Change-Id: Iad72c921fa18d34811abf7d1073890c093a27725
udioflinger/Threads.cpp
e983e0a0017fce81dc3d9bea36f5abb7b7bce40b 30-Jan-2014 Andy Hung <hunga@google.com> Merge "Remove warnings in Audio mixer resampler compilation."
03e9e83c47ab4a518da0a1f36b8f702f59221c95 14-Dec-2013 Haynes Mathew George <hgeorge@codeaurora.org> audioflinger: Fix for a deadlock in track creation

AudioFlinger enters a deadlock (with itself) on trying to free a
RecordTrack or Track object that failed initialization. Clear this
bad object from the caller instead.

Bug: 12423233
Change-Id: I926f2beb922a70f6924e593e2bbf1a5b5df85b16
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
ee931ff7d6620e5705f4dfba901fdb03fa4a35fd 28-Jan-2014 Andy Hung <hunga@google.com> Remove warnings in Audio mixer resampler compilation.

Change-Id: Ie68766142796772a54a90afdea188d0a5a78d4ac
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/AudioMixer.cpp
udioflinger/AudioResampler.cpp
000a4193dd82549192277fd4b9bb571d8a4c262f 30-Jan-2014 Eric Laurent <elaurent@google.com> audioflinger: fix record thread exit pending check

RecordThread loop must not release the mutex after checking for
exitPending and before waiting for a new wake up condition.
This can happen under the hood when methods like processConfigEvents_l()
or checkForNewParameters_l() are called. So exitPending() must
be checked after calling these functions.

Bug: 12787961.
Change-Id: Ia18c518bd5344fbb2401067303fcfe76a86879c4
udioflinger/Threads.cpp
0eed5ac1a14067d0fd51282e97b43b4fd9121842 29-Jan-2014 Glenn Kasten <gkasten@google.com> Merge commit 'adf3f9b9' into manualmerge

Change-Id: Icdef7d075b160eb2a5ced7c57f90c6a6a4b4c64a
1bf0eecd2ec6a3b3e29ad2c91bcefda76abef2fe 29-Jan-2014 Glenn Kasten <gkasten@android.com> Merge "AudioMixer: Remove tracks from enabledTracks after reseting outTemp"
7e79cd2d3067cdb7b9daf639cf772d4dd149c934 06-Jan-2014 Gaurav Kumar <gaurav.kumar@broadcom.com> AudioMixer: Remove tracks from enabledTracks after reseting outTemp

If any track goes through AudioMixer::process__genericNoResampling, and
its getnextbuffer returns NULL, Then that track is removed by AudioMixer
from enabledTracks.

Thus if all tracks getnextbuffer return NULL, Then this function doesn't
reset outTemp and last buffer in AudioFlinger's mMixBuffer will be
repeated and noise is observed.

Remove tracks from enabledTracks after reseting outTemp to zero, so that
process__genericNoResampling will reset outTemp and noise won't appear.

Bug: 12450065
Change-Id: I1ccac7ee4a3bf7fd930254356c072099e11e7c19
Signed-off-by: Gaurav Kumar <gaurav.kumar@broadcom.com>
Signed-off-by: Pierre Couillaud <pierre@broadcom.com>
udioflinger/AudioMixer.cpp
894fb7bc41dc8c3b8fb7d21ba24a5777c4347a5b 29-Jan-2014 Zhijun He <zhijunhe@google.com> Camera: fix focusArea wrong indexing issue

Bug: 12304559
Change-Id: Id28b35fdd9697c1ec3365f617996801965de8bd0
amera/libcameraservice/api1/client2/Parameters.cpp
5f44635dc35814b98b4dc2b255355a93122fec59 22-Jan-2014 Zhijun He <zhijunhe@google.com> camera3: Delete output stream of bi-directional stream

Bi-directional stream (like Zsl stream) is both input and output streams. When
deleted, both streams need to be deleted.

Change-Id: I8b6bb9054fec264cc03754003797de0bae10cb20
amera/libcameraservice/device3/Camera3Device.cpp
4bbf8ea1f17e85123abd2b037d357e2a89664511 27-Jan-2014 Zhijun He <zhijunhe@google.com> Merge "Camera: delete preview callback when preview size is changed"
ad1763b4ae3c60eb11182d2fd4c5a79f15275a52 27-Jan-2014 Zhijun He <zhijunhe@google.com> Merge "Camera3: Flush device before ZSL reprocess"
1862a008db748fd55834345dffe298078455d5c3 24-Jan-2014 Zhijun He <zhijunhe@google.com> Merge "Camera: delete zsl stream for video mode"
f0002d142e6d24c5438600b2c259679de710f8ac 24-Jan-2014 Glenn Kasten <gkasten@google.com> Merge "Replace control block frameCount_ by explicit in/out parameter"
c1b7cc4d3eeb55fd03ff77b099b827e7568480e4 21-Jan-2014 Zhijun He <zhijunhe@google.com> Camera: delete preview callback when preview size is changed

Preview callback stream is left configured even the preview size is changed.
This makes the callback stream unnecessarily configured even in recording mode,
which could cause distorted preview for some devices.

Bug: 12210027
Bug: 12591410
Change-Id: If50cddfe5562e91aec1feb1760eccb82ddb21730
amera/libcameraservice/api1/Camera2Client.cpp
491e341211b4772c75f719158f6b397e1c40497d 27-Dec-2013 Zhijun He <zhijunhe@google.com> Camera3: Flush device before ZSL reprocess

Call flush before sending ZSL reprocess request. This not only ensures no
in-flight requests pending in the HAL before ZSL reprocess request, but also
makes reprocess request to be processed by the HAL sooner.

Bug: 12230973
Change-Id: I4c9e5a0fb75ccdc1e8861262c08d599d04170b7f
amera/libcameraservice/api1/client2/ZslProcessor3.cpp
amera/libcameraservice/device3/Camera3Device.cpp
c69b91ceae6255e41c5413796fb0ed4f7af45b15 18-Jan-2014 Ruben Brunk <rubenbrunk@google.com> camera3: Update sceneMode tag spec.

Change-Id: I495435397086a295280c556d94fe8efd442a12c3
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/client2/Parameters.cpp
0ce5ca5e113d58cbcb7cb48615d6dbbf3fbe7c66 17-Jan-2014 Glenn Kasten <gkasten@google.com> Merge "Cleanup createTrack error handling"
6a507298357c9ff869b97db57a890e58bd6bdec0 17-Jan-2014 Glenn Kasten <gkasten@google.com> Merge "AudioRecord::getInputFramesLost() cleanup"
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
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
b1c8d9fbc69e2f103699d24a81c2406e52a94c9f 15-Jan-2014 Eino-Ville Talvala <etalvala@google.com> am a2949165: am 3eccdde9: am c7614eb7: Merge "libcameraservice: Fix build in ISO C++11 mode"

* commit 'a2949165680158db31dc1fce32f62bbe70c31820':
libcameraservice: Fix build in ISO C++11 mode
c7614eb7cf2e3e121baa3de26e3622974a163786 15-Jan-2014 Eino-Ville Talvala <etalvala@google.com> Merge "libcameraservice: Fix build in ISO C++11 mode"
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
udioflinger/Threads.h
5b27ccd67c845aa20a12a1fb58339e7e81e3d536 15-Jan-2014 Glenn Kasten <gkasten@google.com> Merge "Use AUDIO_SESSION_ALLOCATE instead of 0"
03f696e3eb89c0642f9a2b761ff2cfc6af003d16 10-Jan-2014 Andy Hung <hunga@google.com> Merge "Improve dynamic audio resampler filter generation"
6340829ffb9ff7586ffb88a214f56340d4c70d60 10-Jan-2014 Glenn Kasten <gkasten@android.com> am 0ba9f9b0: am d8d45edf: am 61540b5f: Merge "Frameworks: AudioFlinger: Fix effects memory leak"

* commit '0ba9f9b07d47e9e6b374798f397fe961256a6029':
Frameworks: AudioFlinger: Fix effects memory leak
61540b5fe82cad1c6baa018f02bd2554e62e4364 10-Jan-2014 Glenn Kasten <gkasten@android.com> Merge "Frameworks: AudioFlinger: Fix effects memory leak"
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
udioflinger/AudioPolicyService.cpp
6582f2b14a21e630654c5522ef9ad64e80d5058d 03-Jan-2014 Andy Hung <hunga@google.com> Improve dynamic audio resampler filter generation

Improve dynamic audio resampler filter generation speed by 2x.
The resulting filters should be the same (excepting roundoff).

Also added check for upsampling sample rate changes to share
previously generated filters.

Modify the profiling to improve output format and sampling result
reliability.

Change-Id: I9aa6b914fd552a63f79dd4a95945df2f8275772a
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/AudioResamplerDyn.cpp
udioflinger/AudioResamplerDyn.h
udioflinger/AudioResamplerFirGen.h
udioflinger/test-resample.cpp
0bcfa88149e2404b34d13c622e3921e1b846cdf8 28-Dec-2013 Haynes Mathew George <hgeorge@codeaurora.org> audioflinger: update track ready condition

Signal track ready if the track isStopping().

Bug: 12423190
Change-Id: Ie279995d5f90fa8211a20dfbeacc1cf9b921d0bf
udioflinger/Tracks.cpp
67d15f9ab45e7c03b23c871f680b1fae577ac43a 07-Jan-2014 Eric Laurent <elaurent@google.com> Merge "audioflinger: fix static track end detection"
04143e411f18557579651a41de8f20edc2f8856a 30-Dec-2013 Andy Hung <hunga@google.com> Merge "Audio resampler update to add S16 filters"
86eae0e5931103e040ac2cdd023ef5db252e09f6 09-Dec-2013 Andy Hung <hunga@google.com> Audio resampler update to add S16 filters

This does not affect the existing resamplers.
New resampler accessed through additional quality settings:

DYN_LOW_QUALITY = 5
DYN_MED_QUALITY = 6
DYN_HIGH_QUALITY = 7

Change-Id: Iebbd31871e808a4a6dee3f3abfd7e9dcf77c48e1
Signed-off-by: Andy Hung <hunga@google.com>
udioflinger/Android.mk
udioflinger/AudioResampler.cpp
udioflinger/AudioResampler.h
udioflinger/AudioResamplerDyn.cpp
udioflinger/AudioResamplerDyn.h
udioflinger/AudioResamplerFirGen.h
udioflinger/AudioResamplerFirOps.h
udioflinger/AudioResamplerFirProcess.h
udioflinger/AudioResamplerFirProcessNeon.h
udioflinger/test-resample.cpp
f0b7026fca225581c7711e4d802117869b66e9dc 26-Dec-2013 Zhijun He <zhijunhe@google.com> Camera2 API: fix front facing camera flip issue

Camera stream transform calculation should take camera facing into account.
For example, front facing camera preview stream should be horizontally or
vertically flipped.

Bug: 12300670
Change-Id: Ib497f0b8c3e65974de05d4f0aca3c51e99717c3d
amera/libcameraservice/api2/CameraDeviceClient.cpp
13e4c960ea3db03a43e084fbd85d52aa77f7b871 21-Dec-2013 Eric Laurent <elaurent@google.com> audioflinger: fix static track end detection

If a static track is not a fast track,
prepareTracks_l() must rely on framesReady() to
detect end of buffer and remove the track from the active
track list.
Failing to do so results in the track staying active but
not processed by the mixer because in underrun. This leaves the
mix buffer content uninitialized and causes the effect process
function to accumulate its output onto undefined data.

Bug: 12013676.
Change-Id: Iad72c921fa18d34811abf7d1073890c093a27725
udioflinger/Threads.cpp
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
udioflinger/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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
47f3f5a119194d4c06815453be9950ba112c8e3e 18-Dec-2013 Glenn Kasten <gkasten@google.com> Fix bug in test-resample's AudioBufferProvider

The contract for AudioBufferProvider::releaseBuffer() was missing.

Bug: 12194314
Change-Id: I2fcf75e7b8eaf6db34f360206d79457a04a73565
udioflinger/test-resample.cpp
bd72d22097f78f5bd668b223bc8c94e351311e31 18-Dec-2013 Glenn Kasten <gkasten@google.com> Add ability to read .wav files to test-resample

Previously test-resample could only read .raw files, and the input
sample rate had to be specified. Now the input sample rate is derived
from the input file. This also allows us to read 8-bit PCM files,
and other formats such as floating-point in the future.

However, the ability to read raw files is lost.
A workaround is to use sox or equivalent on the host.

Change-Id: Icd06b4d02482b3ad07bf03979f46860e68d38ad9
udioflinger/test-resample.cpp
f5293648b727fb3909cd2300a73377f032f8b050 17-Dec-2013 Glenn Kasten <gkasten@google.com> Use libsndfile to write .wav files

This will reduce code duplication, and allow us take advantage of more
advanced capabilities of libsndfile in the future.

Change-Id: I25fa2b6d0c21e325aeaf05bda62cf7aab0c5deb4
udioflinger/Android.mk
udioflinger/test-resample.cpp
9a1c785c019bdb25fefa7d1c0e50862ddc0e4e21 18-Dec-2013 Glenn Kasten <gkasten@google.com> Merge "Fix several test-resample BufferProvider bugs"
e00eefe64e3bad166c672db96c9c35992766e819 17-Dec-2013 Glenn Kasten <gkasten@google.com> Fix several test-resample BufferProvider bugs

Previously getNextBuffer always returned the same data address over
and over. Now it correctly returns the right portion of the input buffer.

Previously getNextBuffer always returned the total number of frames in
the input, which might be larger than the size requested by the caller,
and/or larger than the number of remaining input frames. It also always
returned successfully, even when there should be no frames available.
This violates the contract for getNextBuffer. Now getNextBuffer will
return the maximum of the number of frames requested, and the number of
remaining frames available. If that maximum is zero, getNextBuffer will
return an error instead.

Previously releaseBuffer would silently allow releasing more frames than
were actually gotten, which violates the contract for releaseBuffer.
Now releaseBuffer checks for this and logs a message if it happens.

Add 'v' (verbose) option to log buffer provider calls.

Bug: 12194314
Change-Id: I9b915e954b3612a07ef271da8652486b8875e0fd
udioflinger/test-resample.cpp
c95616357a911e5c1c55873492b05ebfa3cf1894 04-Dec-2013 Haynes Mathew George <hgeorge@codeaurora.org> audioflinger: check for condition before waiting

AsyncCallbackThread must check for any condition that
has already been satisfied before waiting.

Bug: 11824817
Change-Id: Ic8c2090d521ecd6a30b76ee75635258d35eb1eff
udioflinger/Threads.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"
24a325d6f8c4bbf9330e6ce0c769d46e04266ffc 04-Dec-2013 Haynes Mathew George <hgeorge@codeaurora.org> audioflinger: check for condition before waiting

AsyncCallbackThread must check for any condition that
was already been satisfied before waiting.

Bug: 11824817
Change-Id: Ic8c2090d521ecd6a30b76ee75635258d35eb1eff
udioflinger/Threads.cpp
70aca464f7e39a3b208341f442b6fc2316e17147 05-Dec-2013 Glenn Kasten <gkasten@google.com> Merge "Add RecordThread media.log and deferred deallocation"
0312b69e65e4c8bf6a0c0757d9100dee3651c16e 05-Dec-2013 Glenn Kasten <gkasten@google.com> Merge "Change mActiveTrack to mActiveTracks vector"
481fb67a595f23c5b7f5be84b06db9b84a41a42f 30-Sep-2013 Glenn Kasten <gkasten@google.com> Add RecordThread media.log and deferred deallocation

This change allows a media.log buffer for RecordThread.

Unlike playback threads which stick around forever, the RecordThread comes
and goes for every capture session. This means that the media.log buffer
for a RecordThread would disappear too, and so was useless. Now when a
thread exits, it's associated media.log buffer is just marked for deferred
deallocation. It is only actually freed when the memory is needed.

Other changes:
- Fix bug in unregistering comparison, it was comparing the wrong pointers
- Increased size of log area so we can log for RecordThread also

Change-Id: If45d4c03a793b86390a0112ec3acc5d41b2e3635
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
dfe715582943b3fc9bab91f88257a3bba6c6deef 05-Dec-2013 Ruben Brunk <rubenbrunk@google.com> camera2: Fix race with stream deletion during disconnect.

Bug: 11856804

- Shutdown order in Camera2Client allows a stream to be
deleted before the corresponding processing thread has
quit. This can result in updates being called on the
processor thread without a valid stream.
amera/libcameraservice/api1/Camera2Client.cpp
b5fed68bcdd6f44424c9e4d12bfe9a3ff51bd62e 03-Dec-2013 Glenn Kasten <gkasten@google.com> Increase kFastTrackMultiplier from 1 to 2

Change-Id: I158f147295eebcea96e4047d7618069bc48bdd7d
udioflinger/Threads.cpp
866d90595a177f6027e97161781948baebf2aa68 02-Dec-2013 Glenn Kasten <gkasten@google.com> Merge "Code simplification and movement to prepare for mActiveTracks"
138851bd3cadfb60238f87567e24808925731837 27-Nov-2013 Zhijun He <zhijunhe@google.com> camera2/3: Add protection for still capture path

Jpeg stream in JpegProcessor could be deleted while process new capture is
ongoing, which unsafe to access a dead consumer endpoint.
Bug: 9316454
Change-Id: I2950f31ea28d0ba01f08502e2e3ba452bf8bb818
amera/libcameraservice/api1/client2/JpegProcessor.cpp
480acec40aa2d96119530c7d451282af8cf07327 23-Nov-2013 Glenn Kasten <gkasten@google.com> Merge "Fix bug in creation of EffectHandle when out of memory"
639512ce33fb19c876b1be68555d83ccda6e7ad7 23-Nov-2013 Glenn Kasten <gkasten@google.com> Merge "Consistent error checking for sp<IMemory> and pointer()"
04733dbdede313fc5e291070014c1a0641fe6166 22-Nov-2013 Eric Laurent <elaurent@google.com> audioflinger: fix offload write buffer offset

Fix current audio HAL write buffer offset calculation
which assumes that the frame size is a multiple of 2.

Change-Id: I0195ed5cfef225a6f114e7dd405a02680bb7254e
udioflinger/Threads.cpp
5b19084a5089e3f6527a82440a1c8227c3a366fa 21-Nov-2013 Zhijun He <zhijunhe@google.com> Merge "Camera3: Remove request from InFlightMap for error case"
1b05dfc8df5e741086747d076fc39c79fb4acb33 21-Nov-2013 Zhijun He <zhijunhe@google.com> Camera3: Remove request from InFlightMap for error case

We don't expect HAL send back valid result metadata if error occurs for a
request, such as during flush call. The request needs to be removed from in
flight request map accordingly.

Bug: 9758581
Change-Id: I51fe327337325ce72f11ce592778a2af02e98479
amera/libcameraservice/device3/Camera3Device.cpp
2b806406ac1ec680b6fe3aaa84c54bdc4e43ad8d 21-Nov-2013 Glenn Kasten <gkasten@google.com> Change mActiveTrack to mActiveTracks vector

The size of mActiveTracks is still limited to 1 for now.

Change-Id: Ia6b06b25d8c4709f087110ae29c589999407a2a2
udioflinger/Threads.cpp
udioflinger/Threads.h
f10ffec18f930d92e1abe9200d60e746831841a7 21-Nov-2013 Glenn Kasten <gkasten@google.com> Code simplification and movement to prepare for mActiveTracks

Share code to acquire wake lock at entry to loop

Change-Id: I01fb645de9417055c0adfc6a4c4011bf22ea4f94
udioflinger/Threads.cpp
e75da4004b2c814987aa2adf8a76190f92d99c65 20-Nov-2013 Glenn Kasten <gkasten@google.com> Fix bug in creation of EffectHandle when out of memory

If there is insufficient client memory to create the EffectHandle,
it was returning a handle which would be useless. Now it correctly
reports the out-of-memory error back to client.

Change-Id: I894e65d5d17df39383032c1527be6ccd35f578bb
udioflinger/Effects.cpp
udioflinger/Effects.h
udioflinger/Threads.cpp
663c2247b71086e30bfd3192979d1dd7f15c539e 24-Sep-2013 Glenn Kasten <gkasten@google.com> Consistent error checking for sp<IMemory> and pointer()

There have been concerns that an sp<IMemory> could be non-0, but the
associated pointer() still be NULL. There are rumors this may happen
when a non-0 sp<IMemory> is passed in by client but the shared memory cannot
be re-mapped into mediaserver.

There's also evidence in the early (2009/03/03) pre-git code of checking
pointer() for NULL, after a local allocate() returned a non-0 sp<IMemory>.
It's not clear if this is "cargo cult" paranoia, or if there was a
genuine reason for the check.

In any case, we now consistently check pointer() for sp<IMemory>
input parameters in createTrack() and queueTimedBuffer().

We also check after successful allocate(). If allocate() returns a
non-0 sp<> but NULL pointer(), then treat it as if the allocate() had
returned 0.

Change-Id: I3013ac5766b493d443ecef71711ec861076a623e
udioflinger/AudioFlinger.cpp
udioflinger/Tracks.cpp
30ff92cba19c5acd747631365db1e1084e45ab34 20-Nov-2013 Glenn Kasten <gkasten@google.com> Code simplification for timed allocate

Change-Id: I5acccd7418c5b4a4dc0112147c750fef9f74bf33
udioflinger/Tracks.cpp
b50df220ae76c7bb6e78b096ece06b2609cf4ffe 19-Nov-2013 Zhijun He <zhijunhe@google.com> Merge "Camera3: add systraces for hal open/close"
213ce79e943a3b51d7859a184d8211c859c960a0 19-Nov-2013 Zhijun He <zhijunhe@google.com> Camera3: add systraces for hal open/close

Bug: 10901465
Change-Id: I32fb96aa0f9efd423bdb9a3d92c142a096a7a47f
amera/libcameraservice/device3/Camera3Device.cpp
3bd2531ac7c87b85bc9f5abf558b5dc247caaa86 18-Nov-2013 Igor Murashkin <iam@google.com> Merge "camera3: Remove BufferQueue::MIN_UNDEQUEUED_BUFFERS references"
054aab3479a094b0a04d48db9cb8f325ea5be162 18-Nov-2013 Igor Murashkin <iam@google.com> camera3: Remove BufferQueue::MIN_UNDEQUEUED_BUFFERS references

Change-Id: I4730ac7849e915e88d3b8fc8aa869f53a8242501
amera/libcameraservice/device3/Camera3InputStream.cpp
amera/libcameraservice/device3/Camera3InputStream.h
amera/libcameraservice/device3/Camera3ZslStream.cpp
amera/libcameraservice/device3/Camera3ZslStream.h
amera/libcameraservice/gui/RingBufferConsumer.h
731076cc7857fe322eed018569a2a67f6eac0e54 15-Nov-2013 Eric Laurent <elaurent@google.com> am 06d62548: am d7e59228: audioflinger: do not use raw pointer for tracks

* commit '06d6254823b8f7a46690369e57b5f149c94c9f65':
audioflinger: do not use raw pointer for tracks
d7e59228caad3867794d847f6bf163c6495e9506 15-Nov-2013 Eric Laurent <elaurent@google.com> audioflinger: do not use raw pointer for tracks

Commit 9da3d95 surfaced a problem caused by the use of a raw
pointer to a track in offload thread implementation.

Pointers to tracks should always be weak or strong pointers.

Bug: 11708529.
Change-Id: Ic48632532d186c9be8261f73cefdf824b9fbbd2b
udioflinger/Threads.cpp
udioflinger/Threads.h
27c70d391da6fde79d2e03fb767f9913555c1e9c 15-Nov-2013 Eino-Ville Talvala <etalvala@google.com> am 0f1ecc2e: am d8a62e25: Camera2: Rework the FPS range vs. FPS single setting detection

* commit '0f1ecc2e2ff84144d5293f7f79ba895538d27f9b':
Camera2: Rework the FPS range vs. FPS single setting detection
d8a62e25ba6520c2531c7a3d32cc8066e1dab776 14-Nov-2013 Eino-Ville Talvala <etalvala@google.com> Camera2: Rework the FPS range vs. FPS single setting detection

Give up on current approach of writing out consistent FPS values
into parameters that will be read back by the app.

- Preserve app's latest set parameters exactly, and compare against
them when detecting if a new FPS range or single FPS value has been
selected.

- Since get() returns exactly what was set(), it doesn't matter if the
app calls getParameters() before its next setParameters(), in terms
of retriggering FPS selection logic. Before, the behavior varied
depending on whether the app re-read the parameters.

- As before, if app changes both range and single FPS in a single set
call, the range set wins. Otherwise, the value that has changed more
recently is used.

Bug: 11570973
Change-Id: I72b5e60c3f60e88d55127dd1bda87e26eaf929c6
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
561879df42b65f44b83c391d78d351e9ad4cb162 14-Nov-2013 Eric Laurent <elaurent@google.com> am 307aa870: am 4215e616: Merge "audioflinger: fix offload track transition" into klp-dev

* commit '307aa87038017dff8ae1dd0262c0ff87723894d7':
audioflinger: fix offload track transition
b04b25321dd323142eec7c5136c81dea3629cf14 14-Nov-2013 Eric Laurent <elaurent@google.com> am b50fa77b: am 9f357f31: Merge "audioflinger: fix offload resume after drain" into klp-dev

* commit 'b50fa77b2cc7dadae1b8ebb591d42976879ac43c':
audioflinger: fix offload resume after drain
9da3d9573a18ffe08365557c706cf52f09118d1c 13-Nov-2013 Eric Laurent <elaurent@google.com> audioflinger: fix offload track transition

Make sure that when transitioning from one active
offloaded track to the next we flush DSP content
if both tracks are not on the same audio session.
This happens when switching between two applications
playing the same type of content (e.g MP3, stereo, 44.1).
In this case, we reuse the same output thread because the track
formats are compatible.

Bug: 11247103.
Change-Id: I2b9031591149adeb70766da5e0d21ff2933a37e8
udioflinger/Threads.cpp
1b9f9b134e732a48198e51f16424f330cbf03143 13-Nov-2013 Eric Laurent <elaurent@google.com> audioflinger: fix offload resume after drain

When pausing and resuming during the drain,
the drain sequence number shuold not be modified
otherwise the drain callback will be ignored.
This causes failure to notify end of stream to audio
player and transition to next song.

Bug: 11247103.
Change-Id: I2a35c5cc3fd6aa667cdd257f9e9cc8715cef5159
udioflinger/Threads.cpp
48da8933f18e7ebd5bccb8de04aada099ed99e74 12-Nov-2013 Eino-Ville Talvala <etalvala@google.com> am 5c2379fd: am 184dfe4e: Camera API2: Add support for partial result quirk

* commit '5c2379fdf93029c683c8bcf41b7b663b9940c921':
Camera API2: Add support for partial result quirk
184dfe4ea5e2ba33951bed2b1366007aee0ce3da 08-Nov-2013 Eino-Ville Talvala <etalvala@google.com> Camera API2: Add support for partial result quirk

- Camera3Device: Include requestId in partial 3A results
- FrameProcessorBase: Add support for partial result listeners
- CameraDeviceClient: Listen and forward partial results to client

Bug: 11115603
Change-Id: If1cc6bbc32932742ac142c058688761ebf6a8024
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/common/FrameProcessorBase.cpp
amera/libcameraservice/common/FrameProcessorBase.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
579dd27d96497022e534e859c6ebbec675ee07aa 08-Nov-2013 Glenn Kasten <gkasten@google.com> Fix build

Change-Id: I1ecccada22047d9c828152a53ad68b5599ff8827
udioflinger/Threads.cpp
8594843c15b4722ced39436fe9e64f3e57e7ace4 19-Aug-2013 Glenn Kasten <gkasten@google.com> Pull HAL reads out of RecordThread resample

Previously, the resample was indirectly calling HAL read
from within the BufferProvider's getNextBuffer. Now the HAL
read is done ahead of time into a circular buffer,
and the getNextBuffer just reads out of that memory.

This change will permit some future planned features.

Also removed the mono to mono resampling optimization,
as that optimization will no longer be valid in the future.

Change-Id: I59f5016a2df91078d697c37a7dec2d9d9f44542e
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
d8a1de6204829b0379bbd13042f1450bdb203f2b 08-Nov-2013 Glenn Kasten <gkasten@google.com> Merge "Channel counts are uint32_t"
7bf17159f233111a21b293cde8e227231353cd75 07-Nov-2013 Eino-Ville Talvala <etalvala@google.com> am d9d8b7b6: am fd6ecdd3: Camera HAL3/API1: Add support for the partial result quirk.

* commit 'd9d8b7b63514ceea143968b3f114c52755dda9ef':
Camera HAL3/API1: Add support for the partial result quirk.
fd6ecdd39bd83ea020f78b425e96310380d66c35 11-Oct-2013 Eino-Ville Talvala <etalvala@google.com> Camera HAL3/API1: Add support for the partial result quirk.

- Camera2Client:
- Detect partial result quirk
- Camera3Device:
- Accumulate all partial results together
- Fire off 3A-only result once all 3A states are available
- FrameProcessorBase:
- Filter out partials, don't send to listeners
- FrameProcessor:
- Skip face detect on partials
- Make sure to only handle a 3A update for a given frame once
- Trigger AF notifications when AF mode or trigger changes, to
properly detect all AF transitions.

Bug: 11115603
Change-Id: Iea8aa73c568701562a46071f7ea100624251d10b
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/client2/FrameProcessor.cpp
amera/libcameraservice/api1/client2/FrameProcessor.h
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
amera/libcameraservice/common/FrameProcessorBase.cpp
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
f551e9961a6f66d63bb57f288c4be01b00725289 20-Aug-2013 Glenn Kasten <gkasten@google.com> Channel counts are uint32_t

Change-Id: I5676b6a291b72d7db6326f7eaf6d17588de51b05
udioflinger/AudioMixer.cpp
udioflinger/Threads.cpp
09faf14b434bec0d184fecec947e3d750bcc64ff 07-Nov-2013 Glenn Kasten <gkasten@google.com> Merge "Rename standby methods"
d6fadf0479b489b09b764070974d8a59855ede64 30-Oct-2013 Glenn Kasten <gkasten@google.com> Simplify track 'needs' bits

Use more standard coding convention for bit masks,
and add a FIXME about max channel count.

Change-Id: I856784016703417ee480b92ae73757c472f9cf95
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
8f32537d028231abed103c68705bc5d07cedf919 30-Oct-2013 Glenn Kasten <gkasten@google.com> Remove redundant this->

Change-Id: Id783201e802b6ce294fa92f4bbe492adfb446686
udioflinger/AudioMixer.cpp
e25b778b11183fda65418ab2142873a030521870 30-Oct-2013 Glenn Kasten <gkasten@google.com> Remove dead code

Change-Id: Ide9196aa348cd3846b5c71d51fe6538f38ea8dc2
udioflinger/AudioMixer.cpp
5c6ba3ad8eed1d59e5e2ffe6b70ced2d582a9def 06-Nov-2013 Glenn Kasten <gkasten@google.com> Merge "Fix race condition in initializing downmix"
49c34acbef91800930b0fe561e0787145a10cfcc 30-Oct-2013 Glenn Kasten <gkasten@google.com> Fix race condition in initializing downmix

The code that initializes downmix GUID searches for an effect of
the right type. If two or more AudioMixers are created, there is a
possibility that the GUID will temporarily have the wrong value.

Now the initialization is only done once, regardless of how many
AudioMixers there are.

Other minor changes:
- use naming convention of leading 's' for static member variables
- log message for no downmix effect is now a warning instead of an error,
since it is not an error until there is actual content to downmix
without a downmix effect

Change-Id: I33ab0e51cf9d24ecaf8ae868883736b0772178c4
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
0699ed950b307663e0f7e01aecdfb505e62df7d6 06-Nov-2013 Glenn Kasten <gkasten@google.com> Merge "Move local declarations to point of first use"
44f412a81dcca8f7149d483eeeee9057ad0101cf 06-Nov-2013 Eric Laurent <elaurent@google.com> am 44dc9155: am 48b6cd98: Merge "audioflinger: fix direct output underrun" into klp-dev

* commit '44dc91554521eaab478674a7f812cb8a4fa4f809':
audioflinger: fix direct output underrun
7bb88779cdc1a1fe1445d6d1691fb7daac932e74 06-Nov-2013 Glenn Kasten <gkasten@google.com> Merge "Rename TrackPaused to trackPaused"
1b3ec0f33cbdcac5e148c23abc5bc4f68d780ed4 06-Nov-2013 Glenn Kasten <gkasten@google.com> Merge "Use const more places"
a23f17ac334ff20a11ee63dd177cb1080e44c483 06-Nov-2013 Eric Laurent <elaurent@google.com> audioflinger: fix direct output underrun

Underruns on tracks handled by a direct or offloaded
threads were not properly reported to the applications
causing a failure to automatically recover.

Bug: 11535001.
Change-Id: I7a8696b4d646f78b16710addfe7c108d0dd0038d
udioflinger/Threads.cpp
93e471f620454f7de73d190521568b1e25879767 19-Aug-2013 Glenn Kasten <gkasten@google.com> Rename standby methods

ThreadBase::standby() returns the value of mStandby.

RecordThread::standby() "overrode" ThreadBase::standby(), but with a
different meaning and no return value. This meant you couldn't
access the parent's class definition within RecordThread.

This could be confusing, so this CL renames RecordThread::standby()
to standbyIfNotAlreadyInStandby().

Change-Id: I9196ee12701dd2dccdfaed922af2d7b8e8774676
udioflinger/Threads.cpp
udioflinger/Threads.h
b91aa63779ad1ce1846fbc604f9ec935e0c67852 19-Aug-2013 Glenn Kasten <gkasten@google.com> Move local declarations to point of first use

Change-Id: I8a078386e371caab5174fc07b47f48fb9f21609a
udioflinger/Threads.cpp
e6f35b13567d920af19f0b8dc35f9120b7cf1dc9 19-Aug-2013 Glenn Kasten <gkasten@google.com> Rename TrackPaused to trackPaused

Change-Id: I3b38e0c9a6bbb6e18cb5b1f72670139a3071cb8f
udioflinger/Threads.cpp
b2737d0b33c17e408d96d6f9eeaa3381479c94c7 19-Aug-2013 Glenn Kasten <gkasten@google.com> Use const more places

Change-Id: Ibc068d319d6fff26f2d11248e17481d8f7f027e0
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
661076292093f82aec488baf8460cdf204a5efd2 01-Nov-2013 Zhijun He <zhijunhe@google.com> Camera: delete zsl stream for video mode

Change-Id: I9ebfe0cb7376092c6ecd71e5c1c5058947282a5f
amera/libcameraservice/api1/Camera2Client.cpp
1c7258b3c34b5656de92d845f6366a0f3ac1e0c6 31-Oct-2013 Eric Laurent <elaurent@google.com> am 4cf799fb: am 5c7ffaed: Merge "AudioFlinger: fix duplicating thread standby." into klp-dev

* commit '4cf799fbbb74de102d34ccb014ba7fbd9bfa5e14':
AudioFlinger: fix duplicating thread standby.
5c7ffaed6f04b844c2e4e2024bfb0203ac2233dd 31-Oct-2013 Eric Laurent <elaurent@google.com> Merge "AudioFlinger: fix duplicating thread standby." into klp-dev
2c3740f01acca69c3e0bcc5e01bb0edc51b6777f 31-Oct-2013 Eric Laurent <elaurent@google.com> AudioFlinger: fix duplicating thread standby.

Commit fd47797 fixing issue 11247103 introduced a regression
where the duplicating thread does not exit standby state as
expected. This in turn prevents the tracks sending audio to
other threads to complete their activity cycle normally.

The fix conists in clearing mStandby state also in the specialized
threadLoop_write() method of DuplicatingThread subclass.

Bug: 11451415.
Change-Id: Ie8a92c819a56a2834ea25fa70a8b7b2125721775
udioflinger/Threads.cpp
06b3aa2f8a431eba782aa8c8f5da19f945678983 30-Oct-2013 Igor Murashkin <iam@google.com> am 34790c86: am 3ff5792a: Merge "camera: Collect stack traces when bad things happen, print with dumpsys" into klp-dev

* commit '34790c866cdc309e3779b811db43f63aa7eae7ef':
camera: Collect stack traces when bad things happen, print with dumpsys
3ff5792adfdbf67662a5f8064315a55690d53944 30-Oct-2013 Igor Murashkin <iam@google.com> Merge "camera: Collect stack traces when bad things happen, print with dumpsys" into klp-dev
1fc6cb5be26734938b3999e6bf4ce0e625e7d284 30-Oct-2013 Eric Laurent <elaurent@google.com> am ce275b7d: am 1c594b63: Merge "audioflinger: enable effects after registration if needed" into klp-dev

* commit 'ce275b7dd20e3d4781a46126c753e6eb998e6c0f':
audioflinger: enable effects after registration if needed
1c594b637df26499ce1dae2db34f2b3290efd838 30-Oct-2013 Eric Laurent <elaurent@google.com> Merge "audioflinger: enable effects after registration if needed" into klp-dev
ff3e31d2b100d8efd969b358b18e4405c49dd10d 24-Oct-2013 Igor Murashkin <iam@google.com> camera: Collect stack traces when bad things happen, print with dumpsys

Bug: 11324229
Change-Id: Ic920e170a8f5a389fc139bbf5416c0e3186c7fb6
amera/libcameraservice/Android.mk
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/utils/CameraTraces.cpp
amera/libcameraservice/utils/CameraTraces.h
d21952fe5bc94f7bb6ee729f806c0e641fdb1a0d 29-Oct-2013 Eric Laurent <elaurent@google.com> am 7f8f7585: am fd477974: AudioFlinger: more fixes for offload audio lost

* commit '7f8f758506a95d6fe5c0e52aa7b5ef82fb18861a':
AudioFlinger: more fixes for offload audio lost
fd4779740ec3e9e865d5514464df26d015354388 26-Oct-2013 Eric Laurent <elaurent@google.com> AudioFlinger: more fixes for offload audio lost

mStandby being false was not a reliable indication that
something had been written to audio HAL.

Considering the last track in mActiveTracks vector as the
latest activated track was wrong as this is a SortedVector.

Bug: 11247103.
Change-Id: I397d011c5afcdd779def3fe25aaae7669a472cfc
udioflinger/Threads.cpp
udioflinger/Threads.h
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/PlaybackTracks.h
udioflinger/RecordTracks.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/TrackBase.h
udioflinger/Tracks.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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/PlaybackTracks.h
udioflinger/RecordTracks.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/TrackBase.h
udioflinger/Tracks.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
95c03858e2ab4fb693a2bfe47b3caa806e43c044 19-Oct-2013 Glenn Kasten <gkasten@google.com> Merge "Allow releaseBuffer after flush" into klp-dev
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
udioflinger/Tracks.cpp
6a7327f110b86613e6e8c7de105c49803acacc1d 18-Oct-2013 Eric Laurent <elaurent@google.com> am 6edd8ca5: am 6a51d7ed: audioflinger: fix track terminated before playing

* commit '6edd8ca5b7e3d169db4314d2b994bc9d48e9e082':
audioflinger: fix track terminated before playing
6a51d7ed7062536ccc892c8850a34ed55cbc8d5c 18-Oct-2013 Eric Laurent <elaurent@google.com> audioflinger: fix track terminated before playing

When a track is terminated before any audio was written,
we should not send a drain request to the HAL. The drain
will be ignored and we will wait the async callback for ever.

Also fix a potential deadlock by not deleting a track with the
thread mutex held: mPreviousTrack changed from a sp to a raw pointer.

Bug: 11247103.
Change-Id: I0a4b47b099204c7c326d45d700234ab8f72d8eae
udioflinger/Threads.cpp
udioflinger/Threads.h
9138d32050411c04cc45c25094352cf8b6e01df9 18-Oct-2013 Glenn Kasten <gkasten@google.com> am e45796de: am dedc7b0f: Merge "Fix flush() followed by start()" into klp-dev

* commit 'e45796dee9c072cdb13a00b407e68be2cd55e2f2':
Fix flush() followed by start()
12022ff8d223ccf4dfae019c81e4a93a3f44985c 17-Oct-2013 Glenn Kasten <gkasten@google.com> Fix flush() followed by start()

Bug: 11259166
Change-Id: I72526cdfd4e3ff4b06e6a317e577f57cc285205d
udioflinger/Tracks.cpp
d6c628f6db7e1b5079cb9a60cf84208891001ec4 17-Oct-2013 Zhijun He <zhijunhe@google.com> am dddafa84: am 3defdab8: Merge "Camera: don\'t do hw support check for ZSL" into klp-dev

* commit 'dddafa84dcbd85c11a732e7553d0b884e5a08c27':
Camera: don't do hw support check for ZSL
afada1e56cf0f91be5e44678850fcead2a70cca2 17-Oct-2013 Zhijun He <zhijunhe@google.com> Camera: don't do hw support check for ZSL

Only use camera.disable_zsl_mode to control disable/enable ZSL.

Bug: 11258054
Change-Id: Ibf10b959d0913f7dedb59d89b571e9bf66fe978a
amera/libcameraservice/api1/client2/Parameters.cpp
3278eed31fcf82045ac00dcd549dda5270c88971 15-Oct-2013 Narayan Kamath <narayan@google.com> am 8580679e: am 014e7fa2: Make Audio wakelock names less unique.

* commit '8580679e1780617d978d28a43e932314b86608ce':
Make Audio wakelock names less unique.
e6056ba0f2399fa3ebea9665e12a8237f99de250 15-Oct-2013 Yu Yezhong <yuyezhong@gmail.com> Frameworks: AudioFlinger: Fix effects memory leak

Patch by: csheng@marvell.com
Change-Id: I4e3032fb34643902f98e8fd7c8e894b6452324c9
Signed-off-by: Yu Yezhong <yuyezhong@gmail.com>
udioflinger/AudioPolicyService.cpp
987cd7c8b8697cd4f444135819c8608fe088260f 14-Oct-2013 Zhijun He <zhijunhe@google.com> am 1810a287: am 15ad2470: Camera: Fix deadlock in Camera3OutputStream

* commit '1810a287ecc81c243983051f9b1e32ff92ef1365':
Camera: Fix deadlock in Camera3OutputStream
014e7fa2e90827d911c37bb0ce4d2e10e14d0bb3 14-Oct-2013 Narayan Kamath <narayan@google.com> Make Audio wakelock names less unique.

These wakelocks now show up in the client process, where they
might cause wakelock overflows if AudioFlinger threads die often.

The client process should be agnostic of audio flinger threading,
so don't make the wakelock names rely on audioflinger thread names.

Wakelock names now depend only on the audio flinger thread type, and
not the ID itself.

bug: 11200551

Change-Id: Ia1f71b569cb7502d617b77596abc245f461a6ec0
udioflinger/Threads.cpp
udioflinger/Threads.h
d72b7c0180ee83fc3754629ed68fc5887a125c4c 13-Oct-2013 Eric Laurent <elaurent@google.com> audioflinger: enable effects after registration if needed

This fixes a bug where effects were not properly reenabled after
being moved from one playback thread to another. The effect
is enabled but the audio policy manager sees it as disabled.

Bug: 11181933.
Change-Id: I19cac7acbaf61c546e667fd85ed7d4eda1c716d8
udioflinger/AudioFlinger.cpp
udioflinger/Tracks.cpp
15ad2470b2f2ac34473eb568b606ad75e8e63ac6 12-Oct-2013 Zhijun He <zhijunhe@google.com> Camera: Fix deadlock in Camera3OutputStream

process capture request thread, process capture result and setParameter
binder threads can run into circular locking situation when acquiring
StreamingProcessor lock, Camera3Stream lock, and bufferQueue lock.
Releasing the Camera3Stream lock briefly in process capture request
thread getbuffer call can break this deadlock.

Bug: 11016037
Change-Id: If08d4b134c26be26039b1d5363759e60f911bad6
amera/libcameraservice/device3/Camera3OutputStream.cpp
6d2af34b7b2e3873de76f5834cd324c59a05e270 11-Oct-2013 Zhijun He <zhijunhe@google.com> am 92d27553: am d5ed2263: Merge "Camera: Skip AE precapture when possible" into klp-dev

* commit '92d275536ce3a7f1055627ac087b0f3a9957ad68':
Camera: Skip AE precapture when possible
a0c9584b6841831f1c75c27d027c939b2b4e0762 11-Oct-2013 Eino-Ville Talvala <etalvala@google.com> am c989d2d4: am 1dd08b30: Merge "Camera2/3: Add more tracing for API1" into klp-dev

* commit 'c989d2d4f6f7e63b1572673b390a5e89fa5c5702':
Camera2/3: Add more tracing for API1
d5ed2263a485d6e633fe08f033d04fad75daec6f 11-Oct-2013 Zhijun He <zhijunhe@google.com> Merge "Camera: Skip AE precapture when possible" into klp-dev
1dd08b30e2366cabc50d883885d6229dab8218f2 11-Oct-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2/3: Add more tracing for API1" into klp-dev
b790abf4d17f1c6865af7eb1595ec94dc0306447 11-Oct-2013 Zhijun He <zhijunhe@google.com> Camera: Skip AE precapture when possible

Skip AE precapture when AE is already converged for still capture use case. This
could save still capture latency 6-7 frame time for AE already converged case.

Bug: 10712902
Change-Id: Ie5512618b76e5d87c62c57c3d96d2004c604e29e
amera/libcameraservice/api1/client2/CaptureSequencer.cpp
2b07e0207da44d7b3cc63c369fd10c9f12a5e2cd 11-Oct-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Add more tracing for API1

- AF state
- Async autofocus completion
- Async takePicture completion
- Stages of takePicture

Bug: 10570497
Change-Id: Ida9fedd81aa4ee3ae3fb8dfada858a3bc3c213a3
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/Camera2Client.h
amera/libcameraservice/api1/client2/CaptureSequencer.cpp
amera/libcameraservice/api1/client2/CaptureSequencer.h
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
amera/libcameraservice/device3/Camera3Device.cpp
f1a968c41875e9487c35e77778270eb24d2ddffb 10-Oct-2013 Zhijun He <zhijunhe@google.com> am b9c0bd8a: am cc27e117: Camera: Save 1 frame time for takePicture call

* commit 'b9c0bd8ac65e8984e63a7e170b198e638fd3467f':
Camera: Save 1 frame time for takePicture call
cc27e117ed01c9a2b4def5a9c7a3103af83ee47e 04-Oct-2013 Zhijun He <zhijunhe@google.com> Camera: Save 1 frame time for takePicture call

Move the latest request signal call right before submitting request to HAL,
which avoids unnecessary 1 frame time wait.

Also fix request status constructor issue, and the log tag for Camera2Client.

Bug: 10570497
Change-Id: I0b1818658bee9983b117e49a5a00f1aab515c567
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
71d241c0e2092d6012ff28fecf5be0cba0cea4d8 09-Oct-2013 Igor Murashkin <iam@google.com> am c55d9e72: am 828363da: Merge "camera2: Don\'t race while dumping last frame metadata" into klp-dev

* commit 'c55d9e72f8d12e42a1f036badacd245fa99680e6':
camera2: Don't race while dumping last frame metadata
828363dada5878fca6e0cb1553fbea96f38671c8 09-Oct-2013 Igor Murashkin <iam@google.com> Merge "camera2: Don't race while dumping last frame metadata" into klp-dev
f1d5450ca6442cb459827c8bb0bee28676e70ace 08-Oct-2013 Eino-Ville Talvala <etalvala@google.com> am b488b251: am a5209c2e: Merge "Camera3: Improve resilience to stream failures" into klp-dev

* commit 'b488b25148b8e3814a6c4854e6e8cbea6ea33735':
Camera3: Improve resilience to stream failures
a5209c2e6a89ecd8d3bec79cb0e82a677301d794 08-Oct-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Improve resilience to stream failures" into klp-dev
07d2169d46f3536add6044dbf106967a1982252f 25-Sep-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Improve resilience to stream failures

- Handle binder connection drops (DEAD_OBJECT) for streams
- Just log an error, don't go to an error state when queue/dequeue fails

Bug: 10347526
Change-Id: Ib463ffe15d58db444cf5d8cad176a201c7d1facc
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3IOStreamBase.cpp
215bb3499c7eeea6303e55fac66452f2574c022a 08-Oct-2013 Igor Murashkin <iam@google.com> camera2: Don't race while dumping last frame metadata

Bug: 11095203
Change-Id: Icfb31e1719634b62004d6c15a95a9316e9642e4c
amera/libcameraservice/common/FrameProcessorBase.cpp
amera/libcameraservice/common/FrameProcessorBase.h
35295078ab59c8c5d143a54d5a55557c3ca62c51 07-Oct-2013 Glenn Kasten <gkasten@google.com> resolved conflicts for merge of 9a7d11f0 to master

Change-Id: Ie4d101185a93d37ec280f608813ad62a077a584e
fee4ce338d78eeb58af1f66831ead53322d3859e 07-Oct-2013 Glenn Kasten <gkasten@google.com> Merge "Cleanup openRecord error handling" into klp-dev
61f58c0c8d02970ea6d94ff816c54bf606f755b7 05-Oct-2013 Eric Laurent <elaurent@google.com> am c22a1a49: am ea0fadeb: audioflinger: offload: fix pause/flush/resume

* commit 'c22a1a495c26b8a36fa15233cc136cb6ce6d6bea':
audioflinger: offload: fix pause/flush/resume
ea0fadeb5d81ef3cb7f9db458c9033d628bdb86a 05-Oct-2013 Eric Laurent <elaurent@google.com> audioflinger: offload: fix pause/flush/resume

If a pause/flush/resume sequence is fast enough, resume is received while
we are still in PAUSING state in which case it is a NOP. If this happens,
flush is still forwarded to the audio HAL but is not preceeded by a pause
which can cause problems to the audio DSP.
It is necessary to preserve the flush as this sequence is typical to a seek.

The fix consists in forcing a pause/resume when a flush request must be
executed and the audio HAL has not been paused previously.

Bug: 11081559.
Change-Id: Ib84ed26d503a61c05933b923ec556b10cedfe140
udioflinger/Threads.cpp
1c7feca9cc3e408dfeb632e7060cf31e5015227e 04-Oct-2013 Eric Laurent <elaurent@google.com> am 6c48a011: am 026c5b07: Merge "audioflinger: fix wake lock acquisition check" into klp-dev

* commit '6c48a01188746202164f8e10d63ff3775dfcf727':
audioflinger: fix wake lock acquisition check
547789d25dc6bd6561553bcf6b384fb0d4fee834 04-Oct-2013 Eric Laurent <elaurent@google.com> audioflinger: fix wake lock acquisition check

Commit e14a5d6 introduced a bug in ThreadBase::acquireWakeLock() where
the wake lock acquisition return code is not initialized before
being checked causing the wake lock token to be sometines not set
and potential failure to release the wake lock later.

Bug: 10985160.
Change-Id: Iffd40e773ae3bcfec3c148a844d5dbebbf474eaf
udioflinger/Threads.cpp
2efc2a5551dc8d48cc4fcec97b29e45eb38c6ee5 04-Oct-2013 Zhijun He <zhijunhe@google.com> am 22077c59: am 19fffcbd: Merge "Camera3: track request status in inflight queue" into klp-dev

* commit '22077c5962dd2a435caa241cade297e2e3d8afc5':
Camera3: track request status in inflight queue
5918e0cb64200f64632595f7aea6062c65d43353 04-Oct-2013 Marco Nelissen <marcone@google.com> am b5677882: am 8097068d: Merge "Better recording wake lock accounting" into klp-dev

* commit 'b5677882cf9a34bd3f2daf76d10951282ea9b083':
Better recording wake lock accounting
4cde555e00a129f5684b1bdba1440fc89760383b 04-Oct-2013 Eino-Ville Talvala <etalvala@google.com> am 38ea22bb: am b2d71d3a: Merge "Camera API 2, Device 2/3: Implement idle and shutter callbacks" into klp-dev

* commit '38ea22bb3a841dd37cc2be0fdca8c5e4ba3cf6db':
Camera API 2, Device 2/3: Implement idle and shutter callbacks
19fffcbd89a51af797265af2e11c97be5820a07d 04-Oct-2013 Zhijun He <zhijunhe@google.com> Merge "Camera3: track request status in inflight queue" into klp-dev
1d1f846c0dbaa36d0944e7b1e54cc07863e00a92 03-Oct-2013 Zhijun He <zhijunhe@google.com> Camera3: track request status in inflight queue

Bug: 9758581
Change-Id: I1d7135cd0932bd6b453acabfeb9a553985c887bc
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
8097068de97c0cdab8150931f290edbd5b3721e5 03-Oct-2013 Marco Nelissen <marcone@google.com> Merge "Better recording wake lock accounting" into klp-dev
e14a5d6d2cc91dd2fc09ffdf7aa670b37da0795d 03-Oct-2013 Marco Nelissen <marcone@google.com> Better recording wake lock accounting

Count wake lock use against the app that initiated the recording,
not against the media server.

b/10985160

Change-Id: Iae6e6c030b7f1c6081d9c79725d6990f60dadaaa
udioflinger/Threads.cpp
udioflinger/Threads.h
f1e98d857ec377f2c9b916073d40732e6ebb7ced 06-Sep-2013 Eino-Ville Talvala <etalvala@google.com> Camera API 2, Device 2/3: Implement idle and shutter callbacks

- Update callback Binder interface
- Rename frameId to be requestId to be consistent and disambiguate
from frameNumber.
- Implement shutter callback from HAL2/3 notify()
- Add in-flight tracking to HAL2
- Add requestId to in-flight tracking
- Report requestId from shutter callback
- Implement idle callback from HAL3 process_capture_result
- Add new idle tracker thread
- Update all idle waiting to use the tracker
- Add reporting from request thread, all streams to tracker
- Remove existing idle waiting infrastructure

Bug: 10549462
Change-Id: I867bfc248e3848c50e71527e3561fe92dc037958
amera/libcameraservice/Android.mk
amera/libcameraservice/api1/client2/CaptureSequencer.cpp
amera/libcameraservice/api1/client2/CaptureSequencer.h
amera/libcameraservice/api1/client2/ZslProcessor.cpp
amera/libcameraservice/api1/client2/ZslProcessor.h
amera/libcameraservice/api1/client2/ZslProcessor3.cpp
amera/libcameraservice/api1/client2/ZslProcessor3.h
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
amera/libcameraservice/api_pro/ProCamera2Client.cpp
amera/libcameraservice/api_pro/ProCamera2Client.h
amera/libcameraservice/common/Camera2ClientBase.cpp
amera/libcameraservice/common/Camera2ClientBase.h
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/common/FrameProcessorBase.h
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device2/Camera2Device.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3IOStreamBase.cpp
amera/libcameraservice/device3/Camera3IOStreamBase.h
amera/libcameraservice/device3/Camera3InputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3Stream.cpp
amera/libcameraservice/device3/Camera3Stream.h
amera/libcameraservice/device3/Camera3StreamInterface.h
amera/libcameraservice/device3/StatusTracker.cpp
amera/libcameraservice/device3/StatusTracker.h
e78d02aedcc4990365a0fd8d36c6de255cc6b431 02-Oct-2013 Zhijun He <zhijunhe@google.com> am 3d839a32: am f05e50eb: Camera: only return static metadata for HAL3 device

* commit '3d839a327a17262ada6dc002544209c9310f0c2b':
Camera: only return static metadata for HAL3 device
911d5ce961e3ec82c0a189a171e60726cd3c5b23 02-Oct-2013 Zhijun He <zhijunhe@google.com> am e0bd5368: am 26c1fb23: Merge "Camera: drop stale callback buffer" into klp-dev

* commit 'e0bd536878ed1bf78424990b54ba19d5038305e2':
Camera: drop stale callback buffer
cd0ea3624dd8b713e78a066852f668ace2bf43da 02-Oct-2013 Zhijun He <zhijunhe@google.com> am 0fb0400b: am 8b905e19: Merge "Camera: Set default thumbnail size with matched aspect ratio" into klp-dev

* commit '0fb0400bc54cd1d9ca67f1ba18db1238cded9a50':
Camera: Set default thumbnail size with matched aspect ratio
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
f05e50eb06d3f70e50fa7f44c1fd32128033b49d 01-Oct-2013 Zhijun He <zhijunhe@google.com> Camera: only return static metadata for HAL3 device

This effectively disables the camera2 APIs for HAL2.x or lower HAL device.

Bug: 10360518
Change-Id: I0f374ac533468c6181f5672c75088b7144b9c53d
amera/libcameraservice/CameraService.cpp
26c1fb23a1e2cc059aac42fd1814efba2a3e9640 01-Oct-2013 Zhijun He <zhijunhe@google.com> Merge "Camera: drop stale callback buffer" into klp-dev
893068ad0ca0cce8428f5a358c86b81139399c07 01-Oct-2013 Zhijun He <zhijunhe@google.com> Camera: drop stale callback buffer

Sometimes, when preview size is changed and preview callback is enabled, stale
callback buffer from previous size could be delivered to callback processor
because stop preview doesn't guarantee consumer side buffers are properly
cleaned up. We need drop these buffers to avoid sending wrong data to app side.

Bug: 11009183
Change-Id: If9281e8c02481f883872ce58dfd8660a06d56a47
amera/libcameraservice/api1/client2/CallbackProcessor.cpp
8b905e19548248904ab0fd0b63c9adcab2331a1a 01-Oct-2013 Zhijun He <zhijunhe@google.com> Merge "Camera: Set default thumbnail size with matched aspect ratio" into klp-dev
98232ab7c20bfbdfe176d2c25bb810dbb5e7b4f1 30-Sep-2013 Jean-Michel Trivi <jmtrivi@google.com> am a2340b30: Merge "Don\'t call audio effect process on offloaded playback threads" into klp-dev

* commit 'a2340b3059b9d6e4286d0db7069df477c164df0c':
Don't call audio effect process on offloaded playback threads
a6c7d98033c161592a062c61eaa6b7fd635e3006 30-Sep-2013 Eric Laurent <elaurent@google.com> am 0adc67df: Merge "audioflinger: fix crash when starting offload thread" into klp-dev

* commit '0adc67dfc5cedb211c36f06849681a60a32f5805':
audioflinger: fix crash when starting offload thread
aceceea5e0d5772353e6049f51cc29084b76ead1 30-Sep-2013 Eino-Ville Talvala <etalvala@google.com> am 1da3b602: Camera2 API: Hack: Always use async mode with GLConsumer

* commit '1da3b602130d71ac3bff1a1fdecdc5e0d7b9d701':
Camera2 API: Hack: Always use async mode with GLConsumer
9fc79c6fccc41255bb4f3538e2a21b01db8dc2dc 30-Sep-2013 Zhijun He <zhijunhe@google.com> Camera: Set default thumbnail size with matched aspect ratio

Make default thumbnail size match the default still capture size aspect ratio.

Bug: 10885012
Change-Id: If46da9508d3b71992f0e14a35c600b7e8d347f4e
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
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
udioflinger/AudioFlinger.h
udioflinger/Effects.cpp
udioflinger/PlaybackTracks.h
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
a2340b3059b9d6e4286d0db7069df477c164df0c 27-Sep-2013 Jean-Michel Trivi <jmtrivi@google.com> Merge "Don't call audio effect process on offloaded playback threads" into klp-dev
0adc67dfc5cedb211c36f06849681a60a32f5805 27-Sep-2013 Eric Laurent <elaurent@google.com> Merge "audioflinger: fix crash when starting offload thread" into klp-dev
4de95592980dba88a35b3dc8f3fd045588387a4f 27-Sep-2013 Eric Laurent <elaurent@google.com> audioflinger: fix crash when starting offload thread

Passing a sp to parent thread to AsyncCallbackThread() constructor
causes a strong reference to be acquired on the OffloadThread inside
its constructor which causes an early launch of the thread loop
with unpredictable consequences.

Pass a wp to parent thread instead.

Also move the creation of the AsyncCallbackThread to
readOutputParameters() where mUseAsyncWrite is initialized which
makes more sense.

Also change the type of AsyncCallbackThread parent thread to PlaybackThread
instead of OffloadThread to allow a broder use of non blocking write which
in theory is not limited to audio offload use case.

Bug: 8174034.
Change-Id: I4b093b022030cd4f5eb8b8e477333e91098a6549
udioflinger/Threads.cpp
udioflinger/Threads.h
1da3b602130d71ac3bff1a1fdecdc5e0d7b9d701 27-Sep-2013 Eino-Ville Talvala <etalvala@google.com> Camera2 API: Hack: Always use async mode with GLConsumer

Until a cleaner solution is implemented, force buffer queues to
consumers that set USAGE_HW_TEXTURE usage to be asynchronous.

Bug: 10949105
Change-Id: I69e6b02b773831396767c282ce8c5936c5d41f03
amera/libcameraservice/api2/CameraDeviceClient.cpp
fed6292af65a0b97b583ecbd3c232b3811a3f37b 26-Sep-2013 Jean-Michel Trivi <jmtrivi@google.com> Don't call audio effect process on offloaded playback threads

An audio effect process command is not meant to be called for
playback threads belonging to offloaded playback.

Bug 10933817

Change-Id: Idc7b6a0224791bbf8d61648474d3c288617c498f
udioflinger/Effects.cpp
3c928c3a7a9684501664a59082a2583347e47664 26-Sep-2013 Zhijun He <zhijunhe@google.com> am 369af71e: am 6914de6d: Merge "Camera: Implement getCameraCharacteristics" into klp-dev

* commit '369af71eb7e402ee68b66b0f0ede5d4d40c857d1':
Camera: Implement getCameraCharacteristics
6914de6dd1d74fcf74e3247c89f9293fbf7bafe5 26-Sep-2013 Zhijun He <zhijunhe@google.com> Merge "Camera: Implement getCameraCharacteristics" into klp-dev
2b59be89dc245b6e2475d9e8b0c5f2392370e71e 25-Sep-2013 Zhijun He <zhijunhe@google.com> Camera: Implement getCameraCharacteristics

Bug: 10904541
Bug: 10360518
Change-Id: Ie9ca6b3b0b5f2fe529e6b0decc193096e770a017
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
62dbe93f7743061e97fc3299386a2f887ca748cf 25-Sep-2013 Eric Laurent <elaurent@google.com> am 4e141a4f: am 1802399c: Merge "fix deadlock in audioflinger::createEffect()" into klp-dev

* commit '4e141a4f1303767f70ea983925ec01b034fe667b':
fix deadlock in audioflinger::createEffect()
1802399c7c4d8557922688f246df292703f417f1 25-Sep-2013 Eric Laurent <elaurent@google.com> Merge "fix deadlock in audioflinger::createEffect()" into klp-dev
eb3c337a3d6c74ec857dfc8be7eeafe634614bcd 25-Sep-2013 Eric Laurent <elaurent@google.com> fix deadlock in audioflinger::createEffect()

commit 5baf2af5 introduced a regression by calling
getOutputForEffect() with AudioFLinger main mutex locked.
The locking order must always be AudioPolicyService mutex then
AudioFlinger then ThreadBase mutex.

Bug: 10916796.
Change-Id: Ide34a2d84dbb06dbb35abd0640d91b01b0ac4d40
udioflinger/AudioFlinger.cpp
udioflinger/Effects.h
34a8e85cbf5fc713af3bed9eb08212b477f4b03e 25-Sep-2013 Eino-Ville Talvala <etalvala@google.com> am 8318c786: am 2b890936: Merge "Camera2/3: Support new PASSIVE_UNFOCUSED AF state" into klp-dev

* commit '8318c7862f2edca41a0e1d10d2e45af026e6089f':
Camera2/3: Support new PASSIVE_UNFOCUSED AF state
2b890936e978de0a8d4450ee1aaeda53d22b5f4e 25-Sep-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2/3: Support new PASSIVE_UNFOCUSED AF state" into klp-dev
aab58d138ab3baccbf1badd6cfda1de1bfc24681 24-Sep-2013 Eino-Ville Talvala <etalvala@google.com> am 50ad1d36: am 1ecd3dc4: Merge "Camera2/3: Properly disambiguate FPS range vs. single FPS setting" into klp-dev

* commit '50ad1d3631efb486b3043c63ebd2774c7e3d337b':
Camera2/3: Properly disambiguate FPS range vs. single FPS setting
1ecd3dc4c779754e9d6603a17b9b3c6b709fb0cc 24-Sep-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2/3: Properly disambiguate FPS range vs. single FPS setting" into klp-dev
e93cf2ca27ae6f4a81d4ef548bbf10a34db6d98f 24-Sep-2013 Glenn Kasten <gkasten@google.com> Cleanup openRecord error handling

Bug: 10888816
Change-Id: I84897dd7d30b370640b54e928f230604b873cb68
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
c0dab528e8c63abce2022a391dface95c3ef67e5 24-Sep-2013 Eric Laurent <elaurent@google.com> am a57e2ab5: am 664539d2: audioflinger: fix ro.audio.silent in offload again

* commit 'a57e2ab58a17d3da35593a6c85f65e19249e9ebc':
audioflinger: fix ro.audio.silent in offload again
79360ad49d6f84d9e99a08d225a642d65079d740 24-Sep-2013 Eric Laurent <elaurent@google.com> am 3f1d3b97: am 21e54568: fix incoming call audio start time.

* commit '3f1d3b97f723cf39fe6bde9efd0a3fc9e78028a5':
fix incoming call audio start time.
664539d25180ab8f77e0521533ea2821cf28985f 24-Sep-2013 Eric Laurent <elaurent@google.com> audioflinger: fix ro.audio.silent in offload again

Commit 1abbdb4 was not working 100% of the times because
it is possible that the offload thread loop never sleeps
after being created in which case the property is never read.

The loop now reads the property once when starting.

Bug: 10899309.
Change-Id: I2e2ca332f2d7086e59d65f6010378c4d9618ba9e
udioflinger/Threads.cpp
21e5456821e3c107d09b0629adbf23c9e06e7c0b 23-Sep-2013 Eric Laurent <elaurent@google.com> fix incoming call audio start time.

commit cec4abb fixing issue 6720482 had a flaw that
would insert commmands at the wrong position in the
audio policy service command thread queue causing other
commands to be delayed more than expected.

A change in track stop timing introduced by commit bfb1b83
made this issue visible when answering a call.

Bug: 10860012.
Change-Id: Iec769112f14e13d13b64628b808e43663e33771c
udioflinger/AudioPolicyService.cpp
4ad28ea0a76c7ecdfcc5b96af2b0afcb0c3e5120 21-Sep-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Support new PASSIVE_UNFOCUSED AF state

Bug: 10860639
Change-Id: I39be64abaf79b49b2d1f74e1c2ab2adf718ae701
amera/libcameraservice/api1/Camera2Client.cpp
70b054021a3a22622c2710267362c5e235ed73bd 21-Sep-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Properly disambiguate FPS range vs. single FPS setting

The camera1 API allows for either setPreviewFrameRate or
setPreviewFPSRange, so both values may or may not change in a single
setParameter call.

The disambiguation of which setting has been changed since the last
setParameter() call was not fully correct, so a sequence of changes
that only changed setPreviewFPSRange or didn't change either could be
interpreted as as a change to setPreviewFrameRate.

Bug: 10842868
Change-Id: I40baeced80a58f09f8a1742ece8dd5e141e9c1e3
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
b0a5e24d162f6ff55aca720c3562556b87d69637 20-Sep-2013 Eino-Ville Talvala <etalvala@google.com> am af724697: am 291a09c3: Merge "Camera2/3: For still captures, use widest FPS range available." into klp-dev

* commit 'af724697148f5f5ed0026e2ac8ca7f886a96deb7':
Camera2/3: For still captures, use widest FPS range available.
0230a2a8a413076a138db4c4e1dea018104fd5e2 20-Sep-2013 Eric Laurent <elaurent@google.com> am c6bed216: am a3b97ad2: Merge "audioflinger: implement getTimestamp() for offloaded tracks" into klp-dev

* commit 'c6bed216e3a759a855ac4b9b743fbaed2d5929c1':
audioflinger: implement getTimestamp() for offloaded tracks
d2b80a1fb90cb4dc3f569e716af0279c1e1ea72d 20-Sep-2013 Eric Laurent <elaurent@google.com> am ce3e7cb0: am fbb2609f: Merge "audioflinger: fix lost offload thread resume event" into klp-dev

* commit 'ce3e7cb0bd09e7861d417b7d45c1e5921f10a93f':
audioflinger: fix lost offload thread resume event
291a09c3537f2160ec2f1cac16a22212304c2cbf 20-Sep-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2/3: For still captures, use widest FPS range available." into klp-dev
0181fde7bd20238cb13ae2665f0e5bfe7c2d9ac8 20-Sep-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: For still captures, use widest FPS range available.

Instead of using the application-selected preview FPS range for still
captures, select the widest FPS range advertised by the device and use
it for still captures instead, to give the HAL the widest range of exposure
values to choose from possible.

Bug: 10842868
Change-Id: I0e24f5eb713a4f8df116cd5979a84390cc0974d7
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
a3b97ad288e6808c54c6275eaac1bd53108d8f11 20-Sep-2013 Eric Laurent <elaurent@google.com> Merge "audioflinger: implement getTimestamp() for offloaded tracks" into klp-dev
accc147666bfd37fc8b4ef745f18a8c751555ec2 20-Sep-2013 Eric Laurent <elaurent@google.com> audioflinger: implement getTimestamp() for offloaded tracks

Bug: 9587132.
Change-Id: Ie9d5f4cca96306d08bc9a2dbd6edd8953096702d
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
fbb2609f132f23a983d376dec9ae6bfebfcacc4c 20-Sep-2013 Eric Laurent <elaurent@google.com> Merge "audioflinger: fix lost offload thread resume event" into klp-dev
ede6c3b8b1147bc425f7b923882f559a513fe23b 19-Sep-2013 Eric Laurent <elaurent@google.com> audioflinger: fix lost offload thread resume event

It was possible that a resume request signaled by addTrack_l()
while waiting for an async write callback is lost. This is because
mSignalPending was not set and waitingAsyncCallback_l() would pause the
thread loop before executing prepareTracks_l().

The fix consists in using signal_l() method to wake the thread
loop o that mSignalPending is set.

Also make sure that sleepTime is reset to 0 when resuming to make sure
that we write any remaining bytes to the HAL.

Bug: 10810347.

Change-Id: If9a3b22cc3b9e6eb384a56c48c40e6258d0896ad
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
1c826b3c038bdfaafa60c4038faa991529b4c20f 19-Sep-2013 Igor Murashkin <iam@google.com> am f572b3f1: am b5bca3ff: Merge "camera2: Tell all streams to ignore global device UI rotation" into klp-dev

* commit 'f572b3f11eb896f444b9e034c10f542911f0e966':
camera2: Tell all streams to ignore global device UI rotation
b5bca3ff7784ce95431224482ec42a50261e04b2 19-Sep-2013 Igor Murashkin <iam@google.com> Merge "camera2: Tell all streams to ignore global device UI rotation" into klp-dev
d7e076589dc5298d7a78cb683159723b7eb08d7f 19-Sep-2013 Eric Laurent <elaurent@google.com> am 87fb4f30: am d1b28d41: audioflniger: fix leaked audiosession references

* commit '87fb4f30077e7bcf78e65cf25fe95bd58238bad1':
audioflniger: fix leaked audiosession references
f8b2a6f7dea06234c7966798d9363d2d236488a6 18-Sep-2013 Igor Murashkin <iam@google.com> camera2: Tell all streams to ignore global device UI rotation

- Also use android.sensor.orientation to set the right transform
flags automatically.

Bug: 10804238
Change-Id: I10caf8331f19e107c461696963cc10f597c91d83
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
d1b28d41dbda203ffb420ba2e36cbe736b163ff8 19-Sep-2013 Eric Laurent <elaurent@google.com> audioflniger: fix leaked audiosession references

acquireAudioSessionId() should not create session references
if the caller is not listed in the known notification clients.
It happens when the MediaPlayer or AudioTrack is created by the
mediaserver on behalf of a client (e.g CameraService). In this case
releaseAudioSessionId() can be called from a different pid and
the session reference will not be removed.
Also we will not be able to remove the reference if the client
process dies.

Bug: 10606426.
Change-Id: Ibb5e27518daeb484a2e66302e4c6221cbaca5b70
udioflinger/AudioFlinger.cpp
dc8cae8c118e4aef4ef1f7b2c6f79becc1df4a05 18-Sep-2013 Eric Laurent <elaurent@google.com> am bf5e2397: am 5baf2af5: more support for audio effect offload

* commit 'bf5e23979a03da96ce1d63126c480103232f174b':
more support for audio effect offload
5baf2af52cd186633b7173196c1e4a4cd3435f22 13-Sep-2013 Eric Laurent <elaurent@google.com> more support for audio effect offload

Offloading of audio effects is now enabled for offloaded
output threads. If an effect not supporting offload is enabled,
the AudioTrack is invalidated so that it can be recreated in PCM
mode.

Fix some issues in effect proxy related to handling of effect
commands to offloaded and non offloaded effects.

Also fixed a bug on capture index in software Visualizer effect.

Bug: 8174034.

Change-Id: Ib23d3c2d5a652361b0aaec7faee09102f2b18fce
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Effects.cpp
udioflinger/Effects.h
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
9dbf87543b3a08fe39ba160494207f074294134c 17-Sep-2013 Eino-Ville Talvala <etalvala@google.com> am 0c126a84: am a099d1f6: Merge "Camera3: Always set a trigger ID for an active trigger" into klp-dev

* commit '0c126a8471f7a723e000a12995024704f16aead8':
Camera3: Always set a trigger ID for an active trigger
a099d1f6be3fbbb1af4c12b2ab627397f0826982 17-Sep-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Always set a trigger ID for an active trigger" into klp-dev
4aad3ca1cf99e56ca34aac9892a8692d2976571c 16-Sep-2013 Zhijun He <zhijunhe@google.com> am f0a6b8bc: am 72a2f171: Merge "Camera: setCallBackWindow only if callback surface is used" into klp-dev

* commit 'f0a6b8bcb22a742318c46d51b4343a64acf94900':
Camera: setCallBackWindow only if callback surface is used
1bcd8e9f74ac5c50a2888465aa38cc6f24eca997 16-Sep-2013 Zhijun He <zhijunhe@google.com> am 92db0c12: am 66281c3a: Camera: Don\'t overwrite the error status

* commit '92db0c12caec61485851c87faee9a78245ae1fde':
Camera: Don't overwrite the error status
2f876f9ee63396e4e0117f85c5b3132cac7e2c9d 13-Sep-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Always set a trigger ID for an active trigger

This is to work around HAL implementations that expect to see an
ID for every trigger.

Use a dummy trigger ID of 1, since 0 has special meaning for older
HALs.

Bug: 10720617
Change-Id: I9cb1b8dbcb113cb9e737e5adb04032fd61a54c12
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
527748abf04c0060894fd7aace54959a2c343435 16-Sep-2013 Zhijun He <zhijunhe@google.com> Camera: setCallBackWindow only if callback surface is used

Calling setCallBackWindow without checking the previewCallbackSurface could make
the stream to be deleted during callback stream operation, which is bad because
the preview is still active and the delete fails.

Bug: 10730496
Change-Id: I8addac25e5aa7901bf200d730c749bee2c088090
amera/libcameraservice/api1/Camera2Client.cpp
66281c3a5d7eea486ddc6ad30088ba92956fd4fd 14-Sep-2013 Zhijun He <zhijunhe@google.com> Camera: Don't overwrite the error status

Bug: 10749544
Change-Id: I6096effde03e18ee1b8c63cf3b36dce0344054c5
amera/libcameraservice/common/Camera2ClientBase.cpp
6d07d9bd2e0549ca2682ad9e94118feee1f733f6 14-Sep-2013 Eric Laurent <elaurent@google.com> am 029838a9: am 7f91e5e0: Merge "audioflinger: fix ro.audio.silent in offload mode" into klp-dev

* commit '029838a98c9377299ef3341e21e9378fd5562ab6':
audioflinger: fix ro.audio.silent in offload mode
bd091600eabdac6bd62987fb5ac91255ea2706d1 14-Sep-2013 Zhijun He <zhijunhe@google.com> am 571634ff: am d4dadf23: Merge "Camera: Limit supported preview sizes" into klp-dev

* commit '571634ff67db466327a32397c876d9365ff27698':
Camera: Limit supported preview sizes
d455cdfad40ca0558b8f4f800ec192027e272c14 14-Sep-2013 Eric Laurent <elaurent@google.com> am c91eb605: am 972a173d: audioflinger: longer offload thread standby delay

* commit 'c91eb6059a6af8b84c48e0ce727b01829f9cd789':
audioflinger: longer offload thread standby delay
7f91e5e09cf3bd8068894b2e54cbdaac70bf53a0 14-Sep-2013 Eric Laurent <elaurent@google.com> Merge "audioflinger: fix ro.audio.silent in offload mode" into klp-dev
1abbdb4429479975718421c4fef3f79ce7c820e3 14-Sep-2013 Eric Laurent <elaurent@google.com> audioflinger: fix ro.audio.silent in offload mode

Change-Id: I5a1a79000d53146689b0a198cc5419c36509703f
udioflinger/Threads.cpp
d4dadf23dd2dd8acd514d60d84475954070340b8 14-Sep-2013 Zhijun He <zhijunhe@google.com> Merge "Camera: Limit supported preview sizes" into klp-dev
3ef464e095da6c5d1acb5723dbc4b9f7cfd4ecf8 12-Sep-2013 Zhijun He <zhijunhe@google.com> Camera: Limit supported preview sizes

The ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES can provide sizes as large
as jpeg sizes, which could cause potential issues when trying to do
full size still capture and full size preview. This is not supported
by many devices due to hardware limitation. This change limits the
preview (as well video) size to no more than 1080p.

Bug: 10625115
Change-Id: I9467ab843553ec06e8249b4a17c0ecf4c6d6f04e
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
972a173d7d1de1a3b5a617aae3e2abb6e05ae02d 04-Sep-2013 Eric Laurent <elaurent@google.com> audioflinger: longer offload thread standby delay

- Increase offloaded output thread standby delay to 1 second
to allow transition between tracks with going to stanby
if reusing the same audio track (gapless)

- Make sure pause/flush/resume sequence is sent to the HAL
in the right order

- Fix format display in track dump

Bug: 8174034.
Change-Id: I43ef6f8fdbf7427e4eff6cc2d0665d7d1463ea8a
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
f523897787b64cf2217d0ab4946b564420c675fe 12-Sep-2013 Glenn Kasten <gkasten@google.com> am 8a220740: am dc33c542: Merge "Fix AudioTrack shared memory leak" into klp-dev

* commit '8a220740cd77eb844123d3914190a94513797b40':
Fix AudioTrack shared memory leak
dc33c542351449ceee95cc50a9009f495e7c72ba 12-Sep-2013 Glenn Kasten <gkasten@google.com> Merge "Fix AudioTrack shared memory leak" into klp-dev
db358afc965d9bfb703953ac004275428a7cda64 12-Sep-2013 You Kim <you.kim72@gmail.com> AudioPolicyService: malloc/delete pair

Change-Id: I75cd44ac0caccda9148faaa052c9e7a0c06d46d1
Signed-off-by: You Kim <you.kim72@gmail.com>
udioflinger/AudioPolicyService.cpp
d5577f26de1ae3a0dc6fbea9c60a07d585f894bf 12-Sep-2013 Eric Laurent <elaurent@google.com> am 4823964d: am efc4d489: Merge "audioflinger: add HOTWORD audio source." into klp-dev

* commit '4823964d198228289ff21530bf8b01bb2ef196bb':
audioflinger: add HOTWORD audio source.
efc4d4899e03fb8464017dd48539106cec2163de 12-Sep-2013 Eric Laurent <elaurent@google.com> Merge "audioflinger: add HOTWORD audio source." into klp-dev
0c72b24f91c68442eb374bd1b338c394105b8262 11-Sep-2013 Glenn Kasten <gkasten@google.com> Fix AudioTrack shared memory leak

Bug: 2801375
Change-Id: I50e15164fe310f69ea019dca5b49171a02bc6992
udioflinger/PlaybackTracks.h
udioflinger/Tracks.cpp
9a54bc27876acd5d8be5b1fc3dc46701fe76fbb3 09-Sep-2013 Eric Laurent <elaurent@google.com> audioflinger: add HOTWORD audio source.

HOTWORD is a special capture audio source that uses
the same audio tuning as VOICE_RECOGNITION but allows an
active capture to be preempted.

Bug: 10640877.

Change-Id: Iea09a11cbcdbacc8d434e5230e7559dcd1b44ac0
udioflinger/AudioPolicyService.cpp
udioflinger/RecordTracks.h
udioflinger/ServiceUtilities.cpp
udioflinger/ServiceUtilities.h
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
46636a0c108be12639ad4d6766d45bbfaa98c31f 10-Sep-2013 Igor Murashkin <iam@google.com> am a57c8b5c: am 6220f993: Merge "camera3: Dump latest request sent with dumpsys" into klp-dev

* commit 'a57c8b5cb86730297945736ca4e4b441f2a3448a':
camera3: Dump latest request sent with dumpsys
6220f993541b0317e6ace3c410dd35a8d76e30bc 10-Sep-2013 Igor Murashkin <iam@google.com> Merge "camera3: Dump latest request sent with dumpsys" into klp-dev
8136cfae9c22ae8ff42eec9ed751833dda605444 09-Sep-2013 Eric Laurent <elaurent@google.com> am 8a910716: am 6ca83fad: Merge "audioflinger: no effects on offloaded tracks" into klp-dev

* commit '8a910716892d17a2ac62c7e9884af0e9d75b26bc':
audioflinger: no effects on offloaded tracks
6ca83fad0c32f8d9c81c9e16b4f87025d1abbda1 09-Sep-2013 Eric Laurent <elaurent@google.com> Merge "audioflinger: no effects on offloaded tracks" into klp-dev
a041f2fce87fa7a0926365d8e8fbc66019ac0661 09-Sep-2013 Zhijun He <zhijunhe@google.com> am 8d7e1693: am d1d6467d: Camera: Correct stream id types

* commit '8d7e1693148c48e5e6ef3095ed8db2334c6b8c81':
Camera: Correct stream id types
813e2a74853bde19e37d878c596a044b3f299efc 31-Aug-2013 Eric Laurent <elaurent@google.com> audioflinger: no effects on offloaded tracks

Invalidate offloaded tracks when an effect is enabled
so that the track is recreated in PCM mode and the effect
can be applied.
This is temporary until effect offloading is implemented.

Bug: 8174034.

Change-Id: I77b8b54a10db6cb8334be76d863ea7e720eaad09
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Effects.cpp
udioflinger/Effects.h
udioflinger/Tracks.cpp
d1d6467d3bcbc1305eeba0176a2edf04925c368e 07-Sep-2013 Zhijun He <zhijunhe@google.com> Camera: Correct stream id types

Bug: 10604704
Change-Id: I223ac5d200eb6439c08955fb7ad586592099fbae
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/client2/CaptureSequencer.cpp
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
amera/libcameraservice/api1/client2/StreamingProcessor.h
amera/libcameraservice/api1/client2/ZslProcessor.cpp
amera/libcameraservice/api1/client2/ZslProcessor3.cpp
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/device3/Camera3Device.cpp
1e479c0f4cb3e2174dde0b02e5656fb658f73495 07-Sep-2013 Igor Murashkin <iam@google.com> camera3: Dump latest request sent with dumpsys

Bug: 10606535
Change-Id: I0dd5ca3e09f45701659ab9ebd3b51939a2f6e6ba
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
ec22d7da84a9cb22a6dcd0d79c4b3724565b8286 07-Sep-2013 Zhijun He <zhijunhe@google.com> am 7f69ab55: am 84b7fb0c: Camera: Send VIDEO_SNAPSHOT intent for video snapshot case

* commit '7f69ab555b70b76af2e163799f1edc85b24d109b':
Camera: Send VIDEO_SNAPSHOT intent for video snapshot case
84b7fb0c88ddd05ed7c148c82fe1691040a9404d 06-Sep-2013 Zhijun He <zhijunhe@google.com> Camera: Send VIDEO_SNAPSHOT intent for video snapshot case

Bug: 9924539
Change-Id: Ief39eff79c31f2c2aa5df2fe1a0f04c4afc74690
amera/libcameraservice/api1/client2/CaptureSequencer.cpp
bfc4214079875f0dc8c349e8c475d1813c234e67 06-Sep-2013 Eric Laurent <elaurent@google.com> am 99b84e8b: am 3b4529e0: audioflinger: remove async write race conditions

* commit '99b84e8b013a6e0b926693067b00e82cfbe2ca4f':
audioflinger: remove async write race conditions
3b4529e03c5fc7a44c22f9091ad15a269bfca3a8 06-Sep-2013 Eric Laurent <elaurent@google.com> audioflinger: remove async write race conditions

Remove possible race conditions between async callback
thread and offload thread when clearing and setting the
draining and write blocked flags.

Bug: 8174034.
Change-Id: I7af10491f39dc0e7d7414862a9d8e763daa2e2b7
udioflinger/Threads.cpp
udioflinger/Threads.h
5a0c108ed567a4d7fdaf1fb00916180f6864cb39 06-Sep-2013 Ruben Brunk <rubenbrunk@google.com> am 6e32da82: am 36a8b33a: Merge "camera: Fix race condition between setParameters() and stopPreview()." into klp-dev

* commit '6e32da82cf455d16debe66b819c2e0c48a056525':
camera: Fix race condition between setParameters() and stopPreview().
36a8b33a23dca49c9617e97e22e5d67f7d25c268 06-Sep-2013 Ruben Brunk <rubenbrunk@google.com> Merge "camera: Fix race condition between setParameters() and stopPreview()." into klp-dev
a27c4aa222c8dd1712617dad954c5f3aa68d5427 05-Sep-2013 Ruben Brunk <rubenbrunk@google.com> camera: Fix race condition between setParameters() and stopPreview().

Bug: 10414772
Change-Id: I928cb3935afb101da8a7931f88c27dccdb03b4a9
amera/libcameraservice/api1/Camera2Client.cpp
4167457a22f311fea2bd94c0916607eed0541b0b 04-Sep-2013 Ruben Brunk <rubenbrunk@google.com> am bef61478: am 7a4c2711: Merge "Fix CameraService error flag when running HAL1 with API2." into klp-dev

* commit 'bef614789efa7300e54703f5505f94a3f2acda5c':
Fix CameraService error flag when running HAL1 with API2.
17963d16d66526288ed66c91a6744daf3acfd731 20-Aug-2013 Ruben Brunk <rubenbrunk@google.com> Fix CameraService error flag when running HAL1 with API2.

Bug: 10620944

Change-Id: I44c0d09a3d313ae8f724fbe61fa5f36cf5b38b6d
amera/libcameraservice/CameraService.cpp
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
b9258d930d67fc314373f94ab4423974e5f87e1a 04-Sep-2013 Glenn Kasten <gkasten@google.com> am 97992cc7: am 732845c7: FastMixer computes presentation timestamps for fast tracks

* commit '97992cc71fd0bbd4aa22e5195ee7e5cde09ac254':
FastMixer computes presentation timestamps for fast tracks
1462a2b84a578b5541683c824e0f77ebf2aa82ae 04-Sep-2013 Glenn Kasten <gkasten@google.com> am a4a82c5f: am 6466c9e6: Add ExtendedAudioBufferProvider::framesReleased and onTimestamp

* commit 'a4a82c5f8f3eccfa10ce30a52cbb4b1c5c983282':
Add ExtendedAudioBufferProvider::framesReleased and onTimestamp
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
udioflinger/Tracks.cpp
a7fef85e7d419a4f5d6a3144f9ba70ceff2f122a 04-Sep-2013 Glenn Kasten <gkasten@google.com> am f81d5fc1: am 943ba3cc: Merge "Add NBAIO_Sink::getTimestamp()" into klp-dev

* commit 'f81d5fc1d67a5252d0da1a45274460c4dd33b87b':
Add NBAIO_Sink::getTimestamp()
732845c7e8d294bb1aaa4cd9687da62b51f1f6e6 23-Aug-2013 Glenn Kasten <gkasten@google.com> FastMixer computes presentation timestamps for fast tracks

and forwards them to each track's ExtendedAudioBufferProvider::onTimestamp().

Change-Id: I06fb9586bb7e20d5c0289abdc8cac6cd3fd2f6e8
udioflinger/FastMixer.cpp
6466c9e6e6278c740aed77f695f679be9f5db478 23-Aug-2013 Glenn Kasten <gkasten@google.com> Add ExtendedAudioBufferProvider::framesReleased and onTimestamp

and implement them in SourceAudioBufferProvider using the associated NBAIO_Source,
and in Track using the associated AudioTrackServerProxy.

Change-Id: I60dc4adba63fc1dc452ff16caf347e4a7c8242c2
udioflinger/PlaybackTracks.h
udioflinger/Tracks.cpp
943ba3cca8df0da24db38e97e43aaacb5b788a21 04-Sep-2013 Glenn Kasten <gkasten@google.com> Merge "Add NBAIO_Sink::getTimestamp()" into klp-dev
53827966d116dae8039e20deeed84b96c353ed26 03-Sep-2013 Eino-Ville Talvala <etalvala@google.com> am 68f193f3: am 0a4df035: Camera2/3: Increase precapture start timeout

* commit '68f193f3deab9ce579ab7a43d079725ba6e4880e':
Camera2/3: Increase precapture start timeout
0a4df03542e7d7aab716a60e206dceaf5da178f3 03-Sep-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Increase precapture start timeout

Currently, we only wait 200 ms for the HAL to switch to the precapture
state. This is insufficient at low preview frame rates (dark
conditions, ~10 fps), where a 3-request-deep HAL pipeline will take
300 ms to produce a precapture trigger output. In those cases, we
would prematurely skip the precapture sequence, causing bad quality
pictures.

Since this is a fallback timeout to prevent deadlock in case of a bad
HAL or framework implementation, increase the timeout to 1 second. Has
no impact on correctly-working implementations

Bug: 10430191
Change-Id: I08e99f8e7f3beb8f15dcee32632cdebfe3dca8b3
amera/libcameraservice/api1/client2/CaptureSequencer.h
767094dd98b01baf21de2ad09c27b3c98776cf73 23-Aug-2013 Glenn Kasten <gkasten@google.com> Add NBAIO_Sink::getTimestamp()

with a real implementation in AudioStreamOutSink
for dummy implementation initially in MonoPipe.

Use in AudioFlinger::PlaybackThread::threadLoop_write()
to keep the input to the timestamp latch up-to-date.

Change-Id: I10ef277991b63bb43d55d6f3df75116ef32246cd
udioflinger/Threads.cpp
0fd582e3ce5243c3e5a429fee3330aafc69b69fa 31-Aug-2013 Eric Laurent <elaurent@google.com> am 5d8cbf41: am 6bf9ae20: audioflinger: offloaded tracks flush/pause order

* commit '5d8cbf41ee7e511d20a649e240d6aecbbac3fae7':
audioflinger: offloaded tracks flush/pause order
6bf9ae20b3bd2dbb8f2e89ee167a6785222301cf 31-Aug-2013 Eric Laurent <elaurent@google.com> audioflinger: offloaded tracks flush/pause order

Make sure that a flush received after a pause is forwarded
to the HAL after the pause.

Change-Id: Ib3221f70c59f8b3dbbac20b23104f6b779b75be0
udioflinger/Threads.cpp
6c59945f3aae980621c52bcd4bb89d6084060a77 30-Aug-2013 Igor Murashkin <iam@google.com> am 9c1d4ce0: am d656a4be: Merge "camera: Fix deadlock when sending callbacks during disconnect" into klp-dev

* commit '9c1d4ce0e15a08550f99e42be85881d9f8cb7528':
camera: Fix deadlock when sending callbacks during disconnect
d656a4be3c3b6bc249b06599c2b02c2863d2c47f 30-Aug-2013 Igor Murashkin <iam@google.com> Merge "camera: Fix deadlock when sending callbacks during disconnect" into klp-dev
7408189dfab8374de82f8824c35b6a839dcb4ee4 30-Aug-2013 Eino-Ville Talvala <etalvala@google.com> am 74ba940f: am 96be8bb7: Merge "Camera3: Be busy as soon as work arrives." into klp-dev

* commit '74ba940f780d27a30128cde1179e441bb600a7db':
Camera3: Be busy as soon as work arrives.
96be8bb7c2ce0fc6d3c62f3467e752ddf87c7f44 30-Aug-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Be busy as soon as work arrives." into klp-dev
4fb55c15da1a563ab925914a0f493a3dc80495a3 30-Aug-2013 Igor Murashkin <iam@google.com> camera: Fix deadlock when sending callbacks during disconnect

Bug: 10552448
Change-Id: Ie93ba744ae6705aa657f980ae8e08ec624feeb39
amera/libcameraservice/api2/CameraDeviceClient.cpp
f557872b594d15599bdb65efd91eb5adeb1d0840 30-Aug-2013 Glenn Kasten <gkasten@google.com> am 908d3c09: am 51ec03c2: Merge "Implement Track::getTimestamp()" into klp-dev

* commit '908d3c09ca7f2ccb280aa5dc8d876099ff9a9d0f':
Implement Track::getTimestamp()
30c296c153447f5c2bb5251928bf4d3c4e28e552 30-Aug-2013 Glenn Kasten <gkasten@google.com> am 3ae0a58a: am 9841f636: Merge "Add AudioFlinger::PlaybackThread::Track::getTimestamp()" into klp-dev

* commit '3ae0a58a83d092d96672295c8a62908478f28a9b':
Add AudioFlinger::PlaybackThread::Track::getTimestamp()
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()
26fe6c7c56477ef227205c68f17df07ca3501d65 29-Aug-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Be busy as soon as work arrives.

RequestThread's internal busy flag (mPaused) was not being immediately
set when new work was submitted to it. This allowed for a race
condition where a capture() followed by an immediate
waitUntilDrained() would immediately return from the wait.

Set the mPaused flag to false immediately in capture() and
setStreamingRequest() to avoid this, instead of waiting until the end
of the next RequestThread iteration.

Bug: 10531739
Change-Id: I54a79fe5361d527ec717f41ad805e9b319a48cd8
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
bd096fd9d8e5fc0e62f98807f4818a06f70d0812 23-Aug-2013 Glenn Kasten <gkasten@google.com> Implement Track::getTimestamp()

using a new timestamp latch in PlaybackThread, and
AudioTrackServerProxy::framesReleased() which returns mServer.

Change-Id: I1ebfba968c773faaab95648c272fd3ebd74718d6
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
573d80a8f463f648a515fc0975bf83951b272993 26-Aug-2013 Glenn Kasten <gkasten@google.com> Add AudioFlinger::PlaybackThread::Track::getTimestamp()

with a dummy implementation initially,
and use it in AudioFlinger::TrackHandle::getTimestamp()

Change-Id: I2da88fc52a135a7f0d9fd9538986e919dc8ccd3b
udioflinger/PlaybackTracks.h
udioflinger/Tracks.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
udioflinger/AudioFlinger.h
udioflinger/Tracks.cpp
998d8225f6e4cb9f14e16a058ed2b04bf7237f69 27-Aug-2013 Eino-Ville Talvala <etalvala@google.com> am 677d2d3d: am e07f5372: Merge "Camera2: Add flush support" into klp-dev

* commit '677d2d3d4b212c81e4d3738794044711dca8ec8f':
Camera2: Add flush support
abaa51d3ca31f0eda99e1d271e6dc64c877dbf58 14-Aug-2013 Eino-Ville Talvala <etalvala@google.com> Camera2: Add flush support

- On HAL2 devices, fall back to wait until idle
- On HAL3 devices, call HAL flush method

Bug: 9758581
Change-Id: Ie1c570a15f6590a1ee6c271e3b989c48079b468a
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device2/Camera2Device.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
bc794f8e5c8f5ea5519f2c333f7eb1bd800dae34 22-Aug-2013 Eino-Ville Talvala <etalvala@google.com> am 8ad43118: am 1ce7c34e: Camera1: Set preview to be asynchronous, and remove dead code

* commit '8ad43118cf7207d02c0b7e9251c3e549b741f471':
Camera1: Set preview to be asynchronous, and remove dead code
1ce7c34e67c2cf58dd88c31f36f4bd62e375f7f0 21-Aug-2013 Eino-Ville Talvala <etalvala@google.com> Camera1: Set preview to be asynchronous, and remove dead code

- Use the controlledByApp flag to make sure application-bound
preview buffer queue is asynchronous as before
- Remove setPreviewDisplay in service, since it is no longer in
the binder interface
- Rename setPreviewTexture to setPreviewTarget, to make it clear it's
the only game in town now. Rename only on the binder level and service
for now.

Bug: 10312644
Change-Id: Icd33a462022f9729a63dc65c69b755cb7969857e
amera/libcameraservice/CameraService.h
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/Camera2Client.h
amera/libcameraservice/api1/CameraClient.cpp
amera/libcameraservice/api1/CameraClient.h
61bd7a0281ffecb99b27bff63334c559df7357e6 20-Aug-2013 Jeff Brown <jeffbrown@google.com> am 0541b3bb: am c8b226f4: Merge "Enforce permission for recording from remote submix." into klp-dev

* commit '0541b3bb40fa23e97e0a4599463b6afc0e271939':
Enforce permission for recording from remote submix.
893a5642871114fca3b2a00c6ff8e5699ce3e3ed 17-Aug-2013 Jeff Brown <jeffbrown@google.com> Enforce permission for recording from remote submix.

Bug: 10265163
Change-Id: I2395036bac6e10baeaf6ea4bc3093bd9dd98742d
udioflinger/AudioFlinger.cpp
udioflinger/ServiceUtilities.cpp
udioflinger/ServiceUtilities.h
c49d9f8511442ce555fa7365de24f3ef21928670 17-Aug-2013 Ruben Brunk <rubenbrunk@google.com> am a8542f05: am e9f3a314: Merge "Refactor CameraService to handle errors properly." into klp-dev

* commit 'a8542f05253e31a64428baf93a31183988a065bb':
Refactor CameraService to handle errors properly.
0f61d8f14aa368c9cd7076528e8096e10ed100a0 08-Aug-2013 Ruben Brunk <rubenbrunk@google.com> Refactor CameraService to handle errors properly.

Bug: 10361136

-Connect calls now return status_t error flags.

Change-Id: Idca453b111e5df31327f6c99ebe853bb2e332b95
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
7165268ffa6c7b6b405b6afad82e2a346500e8ee 15-Aug-2013 Glenn Kasten <gkasten@google.com> Don't lock and then immediately unlock effect chains

Change-Id: Id9a4b1e9c49cecfd3a008a7814b5c14dad9a5831
udioflinger/Threads.cpp
b86432b1d62e7c9034223f0120b9bceb44215c41 15-Aug-2013 Glenn Kasten <gkasten@google.com> Fix races in reading activeTrack->mState without lock

Change-Id: I8cfbd9884fa5959a846ddb52cdc797266b896769
udioflinger/Threads.cpp
9e98235a9e9bb870e1c76911e3b4d00386a52c39 14-Aug-2013 Glenn Kasten <gkasten@google.com> Simplify flow by having all mActiveTrack.clear() continue

Change-Id: Icd160b0aa79a747bd19fabaa7feee813afb155e0
udioflinger/Threads.cpp
5edadd46c76c5ff1c3edabf2ea943c2278e82e1c 15-Aug-2013 Glenn Kasten <gkasten@google.com> Don't sleep with effect chains locked

Change-Id: I6eae037304d3dc8a8f3ef55c5b210fd4f8856e99
udioflinger/Threads.cpp
ad5bcc29b216412dbc4d936c270d30620c68f361 14-Aug-2013 Glenn Kasten <gkasten@google.com> Copy mActiveTrack for stability and easier access

Change-Id: If0d88610ec35128054a22f42b2d79f07c4b724eb
udioflinger/Threads.cpp
1ba19cd7fcdf18ab6efab2a1b831affab9a46157 14-Aug-2013 Glenn Kasten <gkasten@google.com> Simplify code by pulling up mActiveTrack == 0 test

Change-Id: I225bb032b2fde97d891191f3599d9850c2d27bb2
udioflinger/Threads.cpp
d9fc34fb0fcfcc739f868b116edf50c62af19d5e 14-Aug-2013 Glenn Kasten <gkasten@google.com> Remove dead 'if'

Change-Id: I23c082f0115ae598cad293be0ac66a130afb692a
udioflinger/Threads.cpp
4ef0b463a56c19bad9197aa9f90d792090461429 14-Aug-2013 Glenn Kasten <gkasten@google.com> Fix race in checking exitPending() in RecordThread::threadLoop()

Change-Id: I97a1c5ab17a6c334d275be794392dcf6c9a88d0e
udioflinger/Threads.cpp
2cfbf88b89854f30b295e8ae26a031edb8d712f8 14-Aug-2013 Glenn Kasten <gkasten@google.com> Simplify code that checks for record standby

Take advantage of the new processConfigEvents_l()
and it's post condition that mConfigEvents is empty.

Change-Id: Icd40fb175f3e374203c9c8d2e9df2c3929bed89b
udioflinger/Threads.cpp
26a4029c95620a2b98187cf003cd3c58eea03747 14-Aug-2013 Glenn Kasten <gkasten@google.com> checkForNewParameters_l returns a value which is currently ignored

Change-Id: I19b9cc9df094d67560f6e832d94fa284dca18687
udioflinger/Threads.cpp
d5418eb594435c958d6c37fa9938161a0112adbd 14-Aug-2013 Glenn Kasten <gkasten@google.com> Use Autolock where possible

Change-Id: Id0e1836831c45beda4e5cb11e983005ea699fc2a
udioflinger/Threads.cpp
f777331418a86cd9fd709af898ef24a69967aeb4 14-Aug-2013 Glenn Kasten <gkasten@google.com> Add ThreadBase::processConfigEvents_l()

Change-Id: I6bcdc212a984c52ab98b0b0744943b4ecc1e1542
udioflinger/Threads.cpp
udioflinger/Threads.h
c527a7c2b1bfd26e8f3086e1b653d56e521379d9 14-Aug-2013 Glenn Kasten <gkasten@google.com> Pull in scope of effectChains

Change-Id: Id5336f8663099088a0958fb8bd59fc5df9f92829
udioflinger/Threads.cpp
47c2070b2ce8aedb7300c0aad91caccf3c383841 14-Aug-2013 Glenn Kasten <gkasten@google.com> Add record thread locking comments and FIXMEs

Change-Id: Ia5bdc9b8b013c2e40af17c82833051290bf4df70
udioflinger/Threads.cpp
2d94426cd3302cb1215c92c5f1c4b90c24ceb72b 13-Aug-2013 Glenn Kasten <gkasten@google.com> Convert if/else-if in threadLoop to switch

Change-Id: I7428abb332ead6c2a1df5903f6c4e166be1f7abb
udioflinger/Threads.cpp
3468e8a4d79cc6a7bb0f03f8382426195bed44df 14-Aug-2013 Glenn Kasten <gkasten@google.com> Fix switch indentation to follow our audio style

Change-Id: I137763917962b276838715319b163c763cb54c71
udioflinger/Threads.cpp
34fca34606b448e6b71c2942f63cb13a0aebd620 13-Aug-2013 Glenn Kasten <gkasten@google.com> Explicit comparison to 0 for integral types

Change-Id: I2bfe864d1bda719581e297a38d96abfc0e3748b9
udioflinger/AudioMixer.cpp
udioflinger/Threads.cpp
3255095af6677caeeebf81c8891ce8db745617ff 06-Aug-2013 Glenn Kasten <gkasten@google.com> Move local variable declarations to point of first use

Change-Id: Ia0fc4b099a3cf8bb5b67b287e7687e9dc9691e0e
udioflinger/AudioFlinger.cpp
6e2ebe97f2ad0a21907f20f9ee644c4eacbb7a40 13-Aug-2013 Glenn Kasten <gkasten@google.com> Use curly braces in 'if' to make it easier to add logs

Change-Id: I58b33fefdd8bf703647414157a99a3223be3531c
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.cpp
udioflinger/AudioPolicyService.cpp
udioflinger/AudioResampler.cpp
udioflinger/AudioResamplerCubic.cpp
udioflinger/Effects.cpp
udioflinger/FastMixer.cpp
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
e198c360d5e75a9b2097844c495c10902e7e8500 13-Aug-2013 Glenn Kasten <gkasten@google.com> Whitespace

Change-Id: Id3ccc183a03421330d0498faaa62a45915cdc3d6
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
2fc14730e4697a6f456b4631549c9981f6b0b115 05-Aug-2013 Glenn Kasten <gkasten@google.com> Comments

Change-Id: I56f82904cb3855bad6f33ad1ff4ddf66a61c5720
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
c0029a8551d65929cbf51a55bd3bae3342a1f2fe 13-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "Check input HAL channel mask instead of channel count"
030033342a6ea17003e6af38a56c7edc6d2ead01 07-Aug-2013 Glenn Kasten <gkasten@google.com> Clean up error handling in createTrack and openRecord

Outside callers now use initCheck() to determine whether a TrackBase
has been created successfully, instead of relying on internal knowledge.

Previously, callers needed to know that a TrackBase was only valid if it's
getCbk() != 0. For a Track (playback), they needed to know to also check
the track's name (track index). Now, outsiders can just call initCheck().

Other changes:
- Return a 0 reference if track creation fails
- Remove a dead line of code in AudioFlinger::openRecord

Change-Id: If374924a3f6fd27906f625aa83dd0a1e3f506e00
udioflinger/AudioFlinger.cpp
udioflinger/PlaybackTracks.h
udioflinger/Threads.cpp
udioflinger/TrackBase.h
udioflinger/Tracks.cpp
9156ef3e11b68cc4b6d3cea77f1f63673855a6d1 07-Aug-2013 Glenn Kasten <gkasten@google.com> Status pointer passed by caller is always non-NULL

in createTrack, openRecord, createEffect, createTrack_l,
createRecordTrack_l, and createEffect_l.

Change-Id: I2e459e4de9c78145f4d496e6abf289479a2f0941
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
udioflinger/Threads.h
e51a70ab6326715f614c737de1e8ea1941057b3b 12-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "Remove obsolete TrackBase::getBuffer()"
e92db4bdb575d897d6bbd5086761fa9387393c83 12-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "Pull up readyToRun into ThreadBase"
b0e6b967c290c905c4c696df4a8ac9e9d591928b 12-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "Simplify the code that allocates mMixBuffer by removing mAllocMixBuffer"
309f7abb3c170ba764e67e9b6fed31fb442e9953 09-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "Use 0 for sp<>, NULL for raw pointers"
3a6d5ded7187ae324532a60b03532c33d607e282 09-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "Rename reqChannels to reqChannelMask"
f874f1375d758c8a7a84572a94371fbd4085f0df 08-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "Pull up mBufferSize from RecordThread to ThreadBase"
2c03d0a2b741310c47d5f625cbdec4a4e4a0778e 08-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "Remove obsolete field RecordTrack::mAudioRecordServerProxy"
da09d5f1d8c7946708f8504daf305d96713b78bd 08-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "memset audio_config to zero"
ec3fb50c8ee25ac263a9c2cbe9242f877bef960c 17-Jul-2013 Glenn Kasten <gkasten@google.com> Check input HAL channel mask instead of channel count

The only supported channel masks are mono and stereo;
arbitrary channel masks are not yet allowed.

Change-Id: I9cebbe56480b53b98e59aa55245a1f03a30d2839
udioflinger/Threads.cpp
aac30336994235e42a92861eb83289131a6b94dd 06-Aug-2013 Glenn Kasten <gkasten@google.com> Remove obsolete TrackBase::getBuffer()

Change-Id: Ic39c7baa9538080bfec114bf18ff9b9986c93fed
udioflinger/TrackBase.h
937098b9b564a779ff1c8c2d9e60769ee5c69810 26-Jun-2013 Glenn Kasten <gkasten@google.com> Use 0 for sp<>, NULL for raw pointers

Change-Id: Ia0595afdc41e1dec428d7a3db73558b54c417bf3
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
deeef54487a34034dc0cfaab20b20d557224c07c 02-Aug-2013 Mathias Agopian <mathias@google.com> separte producer and consumer interfaces

Bug: 9265647
Change-Id: Iefabc11e4bd2e2e8ffd31160476c450affe6629c
amera/libcameraservice/api1/client2/CallbackProcessor.cpp
amera/libcameraservice/api1/client2/JpegProcessor.cpp
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
amera/libcameraservice/api1/client2/ZslProcessor.cpp
amera/libcameraservice/device3/Camera3InputStream.cpp
amera/libcameraservice/device3/Camera3InputStream.h
amera/libcameraservice/device3/Camera3ZslStream.cpp
amera/libcameraservice/gui/RingBufferConsumer.cpp
amera/libcameraservice/gui/RingBufferConsumer.h
fb872cc6f77f6d74011fab703b3edd7023c736cb 06-Aug-2013 Glenn Kasten <gkasten@google.com> memset audio_config to zero

Per guideline in hardware/libhardware/include/hardware/audio.h,
"You should memset() the entire structure to zero before use to
ensure forward compatibility."

Change-Id: I2bce70ef6ea4b070668bd9cbc54bfe20a60111aa
udioflinger/AudioFlinger.cpp
f506e9495f2b2123b3bec7d42ec8ef13c6213ee8 06-Aug-2013 Glenn Kasten <gkasten@google.com> Rename reqChannels to reqChannelMask

This avoids potential ambiguity with channel count.

Change-Id: I0db82efc4c14dd8189d65a1db29809a085acf528
udioflinger/AudioFlinger.cpp
6ae6b811666865815ebb1f670aacb1a0f2edaa73 06-Aug-2013 Glenn Kasten <gkasten@google.com> Remove obsolete field RecordTrack::mAudioRecordServerProxy

Change-Id: I054ba929e209797542940a0e734fc15f19f321c9
udioflinger/RecordTracks.h
udioflinger/Tracks.cpp
cf04c2cb8e031acc03c1c91cb1ccab15098c89b6 06-Aug-2013 Glenn Kasten <gkasten@google.com> Pull up readyToRun into ThreadBase

Change-Id: Ib150afd72c3b35d83599a61664e89302a8feb4b5
udioflinger/Threads.cpp
udioflinger/Threads.h
c1fac191069774c7bfcb062edbb821ea56e7dbc0 06-Aug-2013 Glenn Kasten <gkasten@google.com> Simplify the code that allocates mMixBuffer by removing mAllocMixBuffer

Change-Id: I5ac41210251789a034d760309c50fe018f2442ce
udioflinger/Threads.cpp
udioflinger/Threads.h
70949c47fbae3f836d15f040551d7631be3ed7c2 06-Aug-2013 Glenn Kasten <gkasten@google.com> Pull up mBufferSize from RecordThread to ThreadBase

Now both playback and record threads have a HAL buffer size for fast
tracks, and a potentially larger-sized buffer for normal tracks.

Change-Id: I6f57b85ecece3cbd4e9e64b8c41c3352f7656912
udioflinger/Threads.cpp
udioflinger/Threads.h
5279e3e1187e4da0fed4349d29ea548f52e95f95 06-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "RecordThread::createRecordTrack_l use flags for fast tracks"
75180715a8f85dd7ddf3da710fba8eb7709f8999 06-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "RecordTrack::createRecordTrack_l flags are in/out"
3aa03e40668dd90390d9f1702f8c576e15b366c3 06-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "IAudioFlinger::openRecord track_flags_t flags is in/out"
ce7842c295638ee1432041186700a71d4bf1c176 05-Aug-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Provide consumer usage flags to HAL for each stream"
b2f5b19e5b6e1408a259add23dba91037756a943 30-Jul-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Provide consumer usage flags to HAL for each stream

At stream configure time, pass on the stream's consumer usage flags
to the HAL, to speed up final hardware configuration.

Bug: 9592202
Change-Id: Ie467be053be36a09e482f5f05cad65df42d66476
amera/libcameraservice/device3/Camera3IOStreamBase.h
amera/libcameraservice/device3/Camera3InputStream.cpp
amera/libcameraservice/device3/Camera3InputStream.h
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.h
amera/libcameraservice/device3/Camera3Stream.cpp
amera/libcameraservice/device3/Camera3Stream.h
90e58b1fefc8caf70b34301a92bc86179580b6fc 01-Aug-2013 Glenn Kasten <gkasten@google.com> RecordThread::createRecordTrack_l use flags for fast tracks

Look at client's request for a fast track in the flags parameter,
and check whether the request can be satisfied.

Change-Id: I65ddaeb1b85670fe9066076f638bfed0cda01c0d
udioflinger/Threads.cpp
udioflinger/Threads.h
ddb0ccf3fb6fe8da8c71a6deb30561b821f3c0a2 01-Aug-2013 Glenn Kasten <gkasten@google.com> RecordTrack::createRecordTrack_l flags are in/out

The flags are currently unused, but will be used for requesting a fast
track. Making flags in/out will allow reporting back up to client that
the request is denied.

Change-Id: Ifbee57da3632ce130551065a426577fb97b1a68d
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
f36dbfe3d517e9311be0a4d0fd6658380690e84c 02-Aug-2013 Glenn Kasten <gkasten@google.com> Merge "Report underruns for fast tracks also"
1a3739169becc850999c3c06db402541119a428c 01-Aug-2013 Glenn Kasten <gkasten@android.com> am 6d4d8790: am b687ff9f: Merge "Fix mismatched delete/new couple"

* commit '6d4d879037a495f9a4276a6996d1845594ce9090':
Fix mismatched delete/new couple
6d4d879037a495f9a4276a6996d1845594ce9090 01-Aug-2013 Glenn Kasten <gkasten@android.com> am b687ff9f: Merge "Fix mismatched delete/new couple"

* commit 'b687ff9f2e02790e8a8e3964cb73e87546cd72dd':
Fix mismatched delete/new couple
c5f8c3e5502f3c220fdbb54573608f3b3bd47517 31-Jul-2013 Zhijun He <zhijunhe@google.com> Merge "Camera: fix the metadate parcel write issue"
11d0d44d583f679638cc927bfffe920e495e90cc 31-Jul-2013 Zhijun He <zhijunhe@google.com> Camera: fix the metadate parcel write issue

Also rename the frameId to requestId to make it less confusing.

Change-Id: I14a20b6fcabb86294afb31fc0c56397e185c1373
amera/libcameraservice/common/FrameProcessorBase.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
udioflinger/PlaybackTracks.h
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
b08ab81bab9e8cd2e3a7fff02725a387070fd078 31-Jul-2013 Glenn Kasten <gkasten@google.com> Merge "Add resampler comments and fix a typo"
34af02647b387a252fb02bab8e2cb9f7bd9c8abb 30-Jul-2013 Glenn Kasten <gkasten@google.com> Add resampler comments and fix a typo

Change-Id: Ie071673875f663de4212eed4a4dff89d51a5a915
udioflinger/AudioFlinger.cpp
udioflinger/AudioResampler.h
udioflinger/Threads.cpp
udioflinger/Threads.h
7b82efe7a376c882f8f938e1c41b8311a8cdda4a 26-Jul-2013 Eino-Ville Talvala <etalvala@google.com> Camera: Rename new API to camera2, rearrange camera service

- Support API rename from photography to camera2
- Reorganize camera service files
- API support files to api1/, api2/, api_pro/
- HAL device support files into device{1,2,3}/
- Common files into common/
- Camera service remains at top-level

Change-Id: Ie474c12536f543832fba0a2dc936ac4fd39fe6a9
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2ClientBase.cpp
amera/libcameraservice/Camera2ClientBase.h
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/Camera3Device.h
amera/libcameraservice/CameraClient.cpp
amera/libcameraservice/CameraClient.h
amera/libcameraservice/CameraDeviceBase.cpp
amera/libcameraservice/CameraDeviceBase.h
amera/libcameraservice/CameraDeviceFactory.cpp
amera/libcameraservice/CameraDeviceFactory.h
amera/libcameraservice/CameraHardwareInterface.h
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/ProCamera2Client.cpp
amera/libcameraservice/ProCamera2Client.h
amera/libcameraservice/api1/Camera2Client.cpp
amera/libcameraservice/api1/Camera2Client.h
amera/libcameraservice/api1/CameraClient.cpp
amera/libcameraservice/api1/CameraClient.h
amera/libcameraservice/api1/client2/BurstCapture.cpp
amera/libcameraservice/api1/client2/BurstCapture.h
amera/libcameraservice/api1/client2/CallbackProcessor.cpp
amera/libcameraservice/api1/client2/CallbackProcessor.h
amera/libcameraservice/api1/client2/Camera2Heap.h
amera/libcameraservice/api1/client2/CaptureSequencer.cpp
amera/libcameraservice/api1/client2/CaptureSequencer.h
amera/libcameraservice/api1/client2/FrameProcessor.cpp
amera/libcameraservice/api1/client2/FrameProcessor.h
amera/libcameraservice/api1/client2/JpegCompressor.cpp
amera/libcameraservice/api1/client2/JpegCompressor.h
amera/libcameraservice/api1/client2/JpegProcessor.cpp
amera/libcameraservice/api1/client2/JpegProcessor.h
amera/libcameraservice/api1/client2/Parameters.cpp
amera/libcameraservice/api1/client2/Parameters.h
amera/libcameraservice/api1/client2/StreamingProcessor.cpp
amera/libcameraservice/api1/client2/StreamingProcessor.h
amera/libcameraservice/api1/client2/ZslProcessor.cpp
amera/libcameraservice/api1/client2/ZslProcessor.h
amera/libcameraservice/api1/client2/ZslProcessor3.cpp
amera/libcameraservice/api1/client2/ZslProcessor3.h
amera/libcameraservice/api1/client2/ZslProcessorInterface.h
amera/libcameraservice/api2/CameraDeviceClient.cpp
amera/libcameraservice/api2/CameraDeviceClient.h
amera/libcameraservice/api_pro/ProCamera2Client.cpp
amera/libcameraservice/api_pro/ProCamera2Client.h
amera/libcameraservice/camera2/BurstCapture.cpp
amera/libcameraservice/camera2/BurstCapture.h
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/CallbackProcessor.h
amera/libcameraservice/camera2/Camera2Heap.h
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/CaptureSequencer.h
amera/libcameraservice/camera2/FrameProcessor.cpp
amera/libcameraservice/camera2/FrameProcessor.h
amera/libcameraservice/camera2/JpegCompressor.cpp
amera/libcameraservice/camera2/JpegCompressor.h
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/JpegProcessor.h
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
amera/libcameraservice/camera2/ProFrameProcessor.cpp
amera/libcameraservice/camera2/ProFrameProcessor.h
amera/libcameraservice/camera2/StreamingProcessor.cpp
amera/libcameraservice/camera2/StreamingProcessor.h
amera/libcameraservice/camera2/ZslProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.h
amera/libcameraservice/camera2/ZslProcessor3.cpp
amera/libcameraservice/camera2/ZslProcessor3.h
amera/libcameraservice/camera2/ZslProcessorInterface.h
amera/libcameraservice/camera3/Camera3IOStreamBase.cpp
amera/libcameraservice/camera3/Camera3IOStreamBase.h
amera/libcameraservice/camera3/Camera3InputStream.cpp
amera/libcameraservice/camera3/Camera3InputStream.h
amera/libcameraservice/camera3/Camera3OutputStream.cpp
amera/libcameraservice/camera3/Camera3OutputStream.h
amera/libcameraservice/camera3/Camera3OutputStreamInterface.h
amera/libcameraservice/camera3/Camera3Stream.cpp
amera/libcameraservice/camera3/Camera3Stream.h
amera/libcameraservice/camera3/Camera3StreamBufferListener.h
amera/libcameraservice/camera3/Camera3StreamInterface.h
amera/libcameraservice/camera3/Camera3ZslStream.cpp
amera/libcameraservice/camera3/Camera3ZslStream.h
amera/libcameraservice/common/Camera2ClientBase.cpp
amera/libcameraservice/common/Camera2ClientBase.h
amera/libcameraservice/common/CameraDeviceBase.cpp
amera/libcameraservice/common/CameraDeviceBase.h
amera/libcameraservice/common/FrameProcessorBase.cpp
amera/libcameraservice/common/FrameProcessorBase.h
amera/libcameraservice/device1/CameraHardwareInterface.h
amera/libcameraservice/device2/Camera2Device.cpp
amera/libcameraservice/device2/Camera2Device.h
amera/libcameraservice/device3/Camera3Device.cpp
amera/libcameraservice/device3/Camera3Device.h
amera/libcameraservice/device3/Camera3IOStreamBase.cpp
amera/libcameraservice/device3/Camera3IOStreamBase.h
amera/libcameraservice/device3/Camera3InputStream.cpp
amera/libcameraservice/device3/Camera3InputStream.h
amera/libcameraservice/device3/Camera3OutputStream.cpp
amera/libcameraservice/device3/Camera3OutputStream.h
amera/libcameraservice/device3/Camera3OutputStreamInterface.h
amera/libcameraservice/device3/Camera3Stream.cpp
amera/libcameraservice/device3/Camera3Stream.h
amera/libcameraservice/device3/Camera3StreamBufferListener.h
amera/libcameraservice/device3/Camera3StreamInterface.h
amera/libcameraservice/device3/Camera3ZslStream.cpp
amera/libcameraservice/device3/Camera3ZslStream.h
amera/libcameraservice/photography/CameraDeviceClient.cpp
amera/libcameraservice/photography/CameraDeviceClient.h
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/PlaybackTracks.h
udioflinger/Tracks.cpp
96f60d8f04432a1ed503b3e24d5736d28c63c9a2 12-Jul-2013 Glenn Kasten <gkasten@google.com> Rename control block flags to mFlags

Change-Id: I7b6d31e24531954ab1ecdf3ed56c19433700bd89
udioflinger/Threads.cpp
udioflinger/Tracks.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
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
a30e75897934da2ce7b1b03bcb4b58e139d3e81e 30-Jul-2013 Glenn Kasten <gkasten@google.com> Merge "Fix theoretical race using TrackBase::sampleRate()"
eb144bbbd0b18427562b0d7db5b38e11f9484739 09-Oct-2012 Andrei V. FOMITCHEV <andreix.fomitchev@intel.com> Fix mismatched delete/new couple

In RecordThread::readInputParameters(), mRsmpInBuffer is allocated
with new[] and should be freed with delete[] instead of delete.

This error has been found by valgrind.

Change-Id: I2f947abb658a21a7d1e61eebb99270cb37d2d147
Signed-off-by: Andrei V. FOMITCHEV <andreix.fomitchev@intel.com>
Signed-off-by: David Wagner <david.wagner@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
udioflinger/Threads.cpp
fa319e6d918b84f93fb5457af5d1cca6421ac517 30-Jul-2013 Glenn Kasten <gkasten@google.com> Remove CC_LIKELY and CC_UNLIKELY where not needed

Only keep them in performance-sensitive code

Change-Id: Ib257ddd7bc39ce9896997ffae008c524ac743d01
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
548efc94813c1dec6e8cf6c085ae41ccb04827f1 29-Nov-2012 Glenn Kasten <gkasten@google.com> Rename RecordThread::mInputBytes to the more generic mBufferSize

This prepares for using it in PlaybackThreads later

Change-Id: Id90a92aa6372e4b69914b0008cef07296ca5d6a3
udioflinger/Threads.cpp
udioflinger/Threads.h
9b58f63e45ef2fdfb839b9b9bb3411d81eb96128 16-Jul-2013 Glenn Kasten <gkasten@google.com> Move members from ThreadBase to PlaybackThread

Move mNormalFrameCount and frameCountHAL(), since they're not used by
record threads. Also comment which fields are updated by readParameters().

Change-Id: I5fc0a8a89cc637976f22d49271a5a3e136dab4e1
udioflinger/Threads.cpp
udioflinger/Threads.h
cd4f9920f5658fcf1bf62bfebf5232a1fea06ea6 30-Jul-2013 Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> libcameraservice: Fix build in ISO C++11 mode

Change log macro define so it can't be confused for a C++11 string
literal

Change-Id: Idcc8085735177aa3313fdea66dc0736cca749f9b
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
amera/libcameraservice/gui/RingBufferConsumer.cpp
7f249fa9bcb64da324d19f551943fac7686d221c 29-Jul-2013 Glenn Kasten <gkasten@google.com> Merge "Use standard name and type for channel mask"
ae4b5f93444802632d71ec34373842e6f5febbaa 29-Jul-2013 Igor Murashkin <iam@google.com> Merge "camera2 api: Override default RGBx formats to IMPLEMENTATION_DEFINED"
175f8338e67aae6d0ca420b8f45a5f7cab4394d5 29-Jul-2013 Glenn Kasten <gkasten@google.com> Merge "Simplify getParameters()"
f6ed423af92a56ef54bba23eba883b1f21448b54 16-Jul-2013 Glenn Kasten <gkasten@google.com> Treat mChannelCount as uint32_t consistently

mChannelCount was 8-, 16-, or 32-bits

Change-Id: I2cc2fedf3e33144e5c8bbd9894763282d9217f63
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/TrackBase.h
1581101ce2a8c1b8d0b07b643ad891595221d781 29-Jul-2013 Igor Murashkin <iam@google.com> camera2 api: Override default RGBx formats to IMPLEMENTATION_DEFINED

Bug: 9487482
Change-Id: I09d3b4e41454d350c4bc7b1f8e893c3dad655e73
amera/libcameraservice/photography/CameraDeviceClient.cpp
2eeca1f8e18106d118f7268cb9d8597539685c5c 29-Jul-2013 Glenn Kasten <gkasten@google.com> Merge "Move local variable declarations to point of first use"
b59c1ad726b8bdf441f373d0bdc612539769334a 29-Jul-2013 Glenn Kasten <gkasten@google.com> Merge "Declare methods in binder opcode order"
3dcd00dddec86a1c5133083ad7ba2265d49c048c 17-Jul-2013 Glenn Kasten <gkasten@google.com> Declare methods in binder opcode order

Change-Id: I5f624b7a51ffe1a17a67c056cf984f74e4c56eac
udioflinger/AudioFlinger.h
udioflinger/Tracks.cpp
3af48e6b28983da8c11d3d7d7fdd2088d881b462 29-Jul-2013 Glenn Kasten <gkasten@google.com> Merge "Remove obsolete mBufferEnd"
b283374cbf79dc5a36f1eef0015d7baf8881792e 29-Jul-2013 Glenn Kasten <gkasten@google.com> Merge "Move delete AudioMixer closer to point of re-allocation"
35cc4f3127322ad3e3dd1e15e8ae29ff4b4a3af6 25-Jul-2013 Glenn Kasten <gkasten@google.com> Remove obsolete mBufferEnd

Change-Id: I507c6109d66000bb30933ca23b912a1316f55e5e
udioflinger/TrackBase.h
udioflinger/Tracks.cpp
bd4c4fbb3b073e48963185d11a15da1fa18d2e54 25-Jul-2013 Glenn Kasten <gkasten@google.com> Remove obsolete TrackBase::step(), mStepCount, mStepServerFailed

Change-Id: I6347096f066b8b19451c6472db7b0671f0cf7702
udioflinger/TrackBase.h
udioflinger/Tracks.cpp
afbbc6c5f6bc470d504dcf24ceb3ac21d57fb78d 29-Jul-2013 Glenn Kasten <gkasten@google.com> Merge "Simplify RecordTrack::stop()"
420ea49539d23ab305a7b33c0854a7a475493dd4 27-Jul-2013 Glenn Kasten <gkasten@google.com> Merge "CBLK_OVERRUN, not CBLK_UNDERRUN, is for record threads"
65d30dd9ee498f7b3bfc033735458a6ff399c207 27-Jul-2013 Glenn Kasten <gkasten@google.com> Merge "Remove obsolete TrackBase::reset()"
422801c5e9b795105f28e639c4bed5ee3f4e56f3 26-Jul-2013 Glenn Kasten <gkasten@google.com> Merge "HAL stream format for mixer output threads must be stereo 16-bit PCM"
a8356f663014e7d4c27869629af83d8bb3441e19 25-Jul-2013 Glenn Kasten <gkasten@google.com> Simplify RecordTrack::stop()

Change-Id: Ib959c1e9dc9544d12277ce11bea445118b2e0521
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
fc38a2e0268b5e531db2975c3a81462a3593c861 25-Jul-2013 Glenn Kasten <gkasten@google.com> CBLK_OVERRUN, not CBLK_UNDERRUN, is for record threads

Change-Id: I8948f76ef4717a423c37cd6ea7db4381636af612
udioflinger/Tracks.cpp
0fea74cdbc09c1259e08215e2ea90e7988d62df8 25-Jul-2013 Glenn Kasten <gkasten@google.com> Remove obsolete TrackBase::reset()

Change-Id: I38100b7e28a12d7af8cb40ae3f4d9cb4a0ebe701
udioflinger/TrackBase.h
udioflinger/Tracks.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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
udioflinger/Effects.cpp
udioflinger/Effects.h
udioflinger/PlaybackTracks.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/TrackBase.h
udioflinger/Tracks.cpp
9e8fcbcd8efa51d70d1207ff57bfbfe31324287a 25-Jul-2013 Glenn Kasten <gkasten@google.com> Move delete AudioMixer closer to point of re-allocation

No need to delete AudioMixer before readOutputParameters

Change-Id: Icafa785c9021bbe8d985e4f9527f8fc8c5e62622
udioflinger/Threads.cpp
7fc97ba08e2850f3f16db704b78ce78e3dbe1ff0 17-Jul-2013 Glenn Kasten <gkasten@google.com> HAL stream format for mixer output threads must be stereo 16-bit PCM

Direct and tunnel output threads can support various HAL stream formats,
included encoded. But currently there are stereo 16-bit PCM assumptions
in several places for mixer and duplicating output threads:
- mMixBuffer and mixBuffer()
- AudioMixer including resampler
- FastMixer's mixBuffer
- effects
- NBAIO_Format
- anywhere FCC_2 is used
- possibly other places

Until those assumptions are removed, this CL enforces stereo 16-bit
PCM in mixer and duplicating threads at the place where the HAL format
is read. It was already being checked in checkForNewParameters_l(),
but not in readOutputParameters().

Change-Id: Ibe344cc922743da234299097aa1bb1f54795cc9b
udioflinger/FastMixer.cpp
udioflinger/Threads.cpp
d8ea699dc8e7dac58bb32e9cdb31b0758da25817 16-Jul-2013 Glenn Kasten <gkasten@google.com> Simplify getParameters()

Change-Id: Iedfeca3cd477d023c350d6d4e6eed874ee467a32
udioflinger/Threads.cpp
34542acfa25c6413c87a94b6f7cc315a0c496277 26-Jun-2013 Glenn Kasten <gkasten@google.com> Move local variable declarations to point of first use

Change-Id: Ideb83dea2c3002651c34fa646753cba598e29e93
udioflinger/AudioFlinger.cpp
udioflinger/Threads.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
udioflinger/Threads.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
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
2ab500c632569e2f131a1a2288459933da70c4ee 23-Jul-2013 Zhijun He <zhijunhe@google.com> camera2: Implement ICameraDeviceUser::waitUntilIdle

Also fixed some logging typo

Change-Id: Ib254bdb137dca10b12595c23aeb1c53097423425
amera/libcameraservice/camera3/Camera3OutputStream.cpp
amera/libcameraservice/photography/CameraDeviceClient.cpp
amera/libcameraservice/photography/CameraDeviceClient.h
47110057829ba7d5c7b41fd2aa381b5f5ed811ca 23-Jul-2013 Zhijun He <zhijunhe@google.com> Camera: ProCamera connect need support HAL3 device

Change-Id: Iae7e5f9e6387f61f1c4bbb91f75803fc1fdf2668
amera/libcameraservice/CameraService.cpp
01061c1d57700b37fa879217763494cdf94d5c98 22-Jul-2013 Glenn Kasten <gkasten@google.com> Merge "Use AudioSystem::setLowRamDevice() to configure memory"
cb155c8f4bf556b0d37c3596c4dc265ab491152b 22-Jul-2013 Glenn Kasten <gkasten@google.com> Merge "Revert "Fix Audioflinger crash when TeeSink is enabled""
18cf609ca3f20a9da2c7e140088d7557e7479f49 22-Jul-2013 Glenn Kasten <gkasten@google.com> Merge "Fix compile warning"
288abb6fe160dff109dedbf89b227fc2b10a2ee8 20-Jul-2013 Zhijun He <zhijunhe@google.com> Merge "camera2: Fix request ID bug"
cd63212dedc29d72d4746a4070d018fdbca316a9 20-Jul-2013 Mathias Agopian <mathias@google.com> Merge "update to new Consumer APIs"
e4bc8dbf0329c4845c692a02e54c16906998f77d 20-Jul-2013 Eino-Ville Talvala <etalvala@google.com> am b0177ff2: am 46910bdc: Camera2/3: Fix deadlock when starting recording before preview.

* commit 'b0177ff25e3e620be6ebe1e2c3f645b2f05dd57e':
Camera2/3: Fix deadlock when starting recording before preview.
b0177ff25e3e620be6ebe1e2c3f645b2f05dd57e 19-Jul-2013 Eino-Ville Talvala <etalvala@google.com> am 46910bdc: Camera2/3: Fix deadlock when starting recording before preview.

* commit '46910bdc57c35ac36bd4adcbb76f4f3a590e3f21':
Camera2/3: Fix deadlock when starting recording before preview.
fe0799e8f1c5db22df3bafdfb9ec995f5494d260 19-Jul-2013 Zhijun He <zhijunhe@google.com> camera2: Fix request ID bug

Wrong request id was pushed in request list.

Change-Id: I55bf7ae84ca41eec79db1a81d2cde35beaa2a6b9
amera/libcameraservice/photography/CameraDeviceClient.cpp
1b8ae3d9f3605fab7d14c323f2118ba3c769a42a 19-Jul-2013 Glenn Kasten <gkasten@google.com> Fix compile warning

Change-Id: I80de4a013dc65eb7c532561438fd10e005354c03
udioflinger/AudioPolicyService.cpp
4182c4e2a07e2441fcd5c22eaff0ddfe7f826f61 15-Jul-2013 Glenn Kasten <gkasten@google.com> Use AudioSystem::setLowRamDevice() to configure memory

Bug: 9798886
Change-Id: I9321e3f369f1ed9429ae222e3926ebdeb012b8b0
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/FastMixer.cpp
udioflinger/FastMixer.h
udioflinger/Threads.cpp
0d61251648b5110bfc33ef5b3d19bbf65db0a7b5 16-Jul-2013 Glenn Kasten <gkasten@google.com> Revert "Fix Audioflinger crash when TeeSink is enabled"

This reverts commit 84e391686d7eced293913d1d7993721224ee0ba1.

Bug: 8834855
Change-Id: I8211ef5ea5d87d97ada115723df31c8057f38ca8
udioflinger/AudioFlinger.h
153b9fe667e6e78e0218ff0159353097428c7657 15-Jul-2013 Glenn Kasten <gkasten@google.com> Make AudioFlinger::instantiate() more resilient when called from separate module

Bug: 8834855
Change-Id: I4cd842cdfb09d2aaaaab9df9ac3bec6179709bd3
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.cpp
udioflinger/AudioPolicyService.cpp
udioflinger/AudioWatchdog.cpp
udioflinger/Configuration.h
udioflinger/Effects.cpp
udioflinger/FastMixer.cpp
udioflinger/FastMixerState.cpp
udioflinger/StateQueue.cpp
udioflinger/StateQueueInstantiations.cpp
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
46910bdc57c35ac36bd4adcbb76f4f3a590e3f21 19-Jul-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Fix deadlock when starting recording before preview.

Move 3A notification synthesis for HAL3 devices from
Camera3Device::processCaptureResult to Camera2Client's
FrameProcessor. This will ensure that calls to processCaptureResult
from HAL can never block on Camera2Client internal mutexes.

Bug: 9923891
Change-Id: I5184649bf45c0807babe6b8c0e1239e959cd3480
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/Camera3Device.h
amera/libcameraservice/CameraDeviceBase.h
amera/libcameraservice/camera2/FrameProcessor.cpp
amera/libcameraservice/camera2/FrameProcessor.h
c6ae3c8a261794fd4445e4e152d1ada074a3f92f 17-Jul-2013 Glenn Kasten <gkasten@google.com> Fix theoretical memory leak in mConfigEvents

Change-Id: I137f70676c8919661e716c33e0dd9c25c2b6285c
udioflinger/Threads.cpp
udioflinger/Threads.h
ee5e8d3e8dc61f8fb1fa725278d63802074c10c5 17-Jul-2013 Glenn Kasten <gkasten@google.com> Merge "Fix indentation"
cff1b2359b8a302f19539c0bc5d25c98a52733fd 17-Jul-2013 Glenn Kasten <gkasten@google.com> Merge "Add comments"
5e1f08b3917ac7900f8a11118afb7e8bf3e61c64 17-Jul-2013 Mathias Agopian <mathias@google.com> update to new Consumer APIs

Change-Id: I3c5d4be2a2e8783fbf98b3e268fd02658f71dc7d
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/StreamingProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.cpp
amera/libcameraservice/camera3/Camera3InputStream.cpp
amera/libcameraservice/gui/RingBufferConsumer.cpp
5478f3c44b9d6670261733953a71a8290fa70ae8 16-Jul-2013 Mathias Agopian <mathias@google.com> Merge "always pass the BufferQueue explicitely to consumers"
099b457f3203fa51387e21bd450495abb973ab31 13-Jul-2013 Igor Murashkin <iam@google.com> camera2: Implement ICameraDeviceUser::getCameraInfo

Bug: 9529161
Change-Id: I927e39c124cd5fb19e38423506f4463acc381cb0
amera/libcameraservice/photography/CameraDeviceClient.cpp
amera/libcameraservice/photography/CameraDeviceClient.h
8d764bfc74c40641f018a0aa87d6f484aec92eae 13-Jul-2013 Mathias Agopian <mathias@google.com> always pass the BufferQueue explicitely to consumers

Change-Id: Ic2d9a9cf184a482b3c78a481ed693ee32df5ca13
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/StreamingProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.cpp
amera/libcameraservice/camera3/Camera3InputStream.cpp
ceb1f0af56b5ff1f546438ec27321929956c705f 11-Jul-2013 Andy McFadden <fadden@android.com> Merge "Pass additional arg to acquireBuffer calls."
132a4fb88207075932d5dbb7970383ceb6405be7 11-Jul-2013 Zhijun He <zhijunhe@google.com> am adaa78c9: am a2520db0: camera2/3: set preview callback oneshot flag during still capture

* commit 'adaa78c901a2f2509965b7acc1cde848dfc6bafe':
camera2/3: set preview callback oneshot flag during still capture
3d1982595cb9cb0856841f1f57fbdb4581189e99 11-Jul-2013 Glenn Kasten <gkasten@google.com> Fix indentation

Change-Id: Ia28720a7d0fad8cf110c2448b967d5648d42e017
udioflinger/FastMixer.cpp
fb1fdc9d6603aa228362e7349451f6455c9849c2 11-Jul-2013 Glenn Kasten <gkasten@google.com> Add comments

Change-Id: Ifbf3a46a4183c8abc0feee1c588953ab10303cc1
udioflinger/StateQueue.h
udioflinger/Threads.h
adaa78c901a2f2509965b7acc1cde848dfc6bafe 09-Jul-2013 Zhijun He <zhijunhe@google.com> am a2520db0: camera2/3: set preview callback oneshot flag during still capture

* commit 'a2520db02bead68d4980783c41500ae96511bdf8':
camera2/3: set preview callback oneshot flag during still capture
656e86250cd68f7f362c50a4bc92a865e9deacbe 28-Jun-2013 Andy McFadden <fadden@android.com> Pass additional arg to acquireBuffer calls.

Bug 7900302

Change-Id: I30b9cca783e0a48f77035b745b7d5e20edf10f27
amera/libcameraservice/camera2/StreamingProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.cpp
amera/libcameraservice/gui/RingBufferConsumer.cpp
a2520db02bead68d4980783c41500ae96511bdf8 09-Jul-2013 Zhijun He <zhijunhe@google.com> camera2/3: set preview callback oneshot flag during still capture

Preview callback oneshot flag need set when a still picture is being captured
and preview callback oneshot is enabled, otherwise, the callback enabling status
could be lost when preview is restarted after still catpure.

Bug 9742091

Change-Id: If9562369013e53727edfdd16f3d00d6a9392e70d
amera/libcameraservice/Camera2Client.cpp
551ababe67ce31778000d52958e53e1c56e1a294 09-Jul-2013 Eino-Ville Talvala <etalvala@google.com> am 06a4604e: am 4a5c009b: Camera2/3: As a fallback, unilaterally free old recording buffers

* commit '06a4604e77b5872857ef95fe712b6ce00c7aa506':
Camera2/3: As a fallback, unilaterally free old recording buffers
06a4604e77b5872857ef95fe712b6ce00c7aa506 09-Jul-2013 Eino-Ville Talvala <etalvala@google.com> am 4a5c009b: Camera2/3: As a fallback, unilaterally free old recording buffers

* commit '4a5c009bc2389304cf078c270bceb656479367d2':
Camera2/3: As a fallback, unilaterally free old recording buffers
4a5c009bc2389304cf078c270bceb656479367d2 04-Jul-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: As a fallback, unilaterally free old recording buffers

When starting a recording session, check for and clear out recording
buffers still owned by stagefright from a previous recording session,
if any. There should never be any, but in case they are due to a bug
elsewhere in the system, clearing out the buffers makes recovery
possible.

Bug: 9591080
Change-Id: I3a2a1256860bd174381cd525948419f985c9b415
amera/libcameraservice/camera2/StreamingProcessor.cpp
amera/libcameraservice/camera2/StreamingProcessor.h
20ed5f444c149c49d0e599da09e5cec1e5cc6051 03-Jul-2013 Eric Laurent <elaurent@google.com> am ace2378c: am f59a4b39: fix scheduling policy service death detection

* commit 'ace2378c934b61fbd865b5ade9ff7d0df81dabe3':
fix scheduling policy service death detection
ace2378c934b61fbd865b5ade9ff7d0df81dabe3 03-Jul-2013 Eric Laurent <elaurent@google.com> am f59a4b39: fix scheduling policy service death detection

* commit 'f59a4b393f4844c5bbc8d6212364bdddea33d232':
fix scheduling policy service death detection
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioPolicyService.cpp
udioflinger/Threads.cpp
f59a4b393f4844c5bbc8d6212364bdddea33d232 02-Jul-2013 Eric Laurent <elaurent@google.com> fix scheduling policy service death detection

Check status of transactions to scheduling policy service
and re-acquire a binder interface in case of DEAD_OBJECT.

Bug: 8875559.
Change-Id: I1e00bd44e2d4723b3ec95d5c31d9652ba08e238a
udioflinger/ISchedulingPolicyService.cpp
udioflinger/SchedulingPolicyService.cpp
8f13428cb29a9b610a9e9a0f5fea437cd2d3f032 01-Jul-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2Api: Creating a JPEG stream needs to use the right size"
c7ba4a5c938d191bf0e477fc9b9aa4f0cba986ef 01-Jul-2013 Eino-Ville Talvala <etalvala@google.com> Camera2Api: Creating a JPEG stream needs to use the right size

JPEG streams have variable size, so use the HAL-provided max size
to size the stream buffers.

Change-Id: Ie6900bc9ece6e972eae93fca6aca779224c9bfc6
amera/libcameraservice/photography/CameraDeviceClient.cpp
226939c6d250d7d90f84a8667edde7efb879afc9 28-Jun-2013 Eric Laurent <elaurent@google.com> Merge "Public API changes for audio offload support."
25d729c3aba847cb4b56b1e6ca143410faca76c8 28-Jun-2013 Eino-Ville Talvala <etalvala@google.com> resolved conflicts for merge of 364a2677 to master

Change-Id: I21f23c1c5e4408c24c359bef6270dffce47a988d
364a2677c862af64f21b41dd3ab1b9e5c68b4ce0 28-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am a691ff3c: Camera2/3: Don\'t allow recording and callbacks to coexist.

* commit 'a691ff3c03e38e148bbefed35ebb15e552a12613':
Camera2/3: Don't allow recording and callbacks to coexist.
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>
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
udioflinger/Tracks.cpp
a691ff3c03e38e148bbefed35ebb15e552a12613 27-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Don't allow recording and callbacks to coexist.

- Tear down conflicting streams when necessary.

- Shut down callbacks if recording starts

- Do not allow callbacks to start if recording is active

Per the current camera API, recording and preview callbacks cannot be
active simultaneously. However, the framework did not explicitly
disallow this, and in fact left the streams configured once they were
created, even if switching between the two operational modes.

In addition, no guards existed for trying to enable both recording and
callbacks at the same time.

Bug: 9423825

Change-Id: I7d6e6114c2e14fcfb5299b4c72ad557895cbf4b8
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/CallbackProcessor.cpp
9fdcb0a9497ca290bcf364b10868587b6bde3a34 27-Jun-2013 Glenn Kasten <gkasten@google.com> Fix theoretical race using TrackBase::sampleRate()

In two places we assumed that TrackBase::sampleRate() would return the
same value when it is called twice in the same function. This is not
guaranteed; sampleRate() reads from the control block so the return
value could change. To fix this, only call sampleRate() once and cache
the return value to get a consistent value.

This was only a theoretical race. In MixerThread::prepareTracks_l()
it would have no bad effect. In TimedTrack::getNextBuffer() it could
cause a real problem, but we don't currently support dynamic sample rate
ratios for timed tracks.

Change-Id: I8e5c33f0121fc058d1e70c2ab5e9135397d3e0b7
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
d44ffc822be382791327c45aec2e812fe66981ce 25-Jun-2013 Igor Murashkin <iam@google.com> Merge changes I5b2eeab2,I71568560

* changes:
Make android.hardware.photography.Camera work on HAL3+ devices
Initial implementation of android.hardware.photography.CameraDevice (service)
98e24724fb77445d4d015a5fec4ecbd5b49abc9b 20-Jun-2013 Igor Murashkin <iam@google.com> Make android.hardware.photography.Camera work on HAL3+ devices

Bug: 9213377
Change-Id: I5b2eeab28985f53dfcb7b8e3029930f5adcd74f5
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2ClientBase.cpp
amera/libcameraservice/CameraDeviceFactory.cpp
amera/libcameraservice/CameraDeviceFactory.h
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
e7ee7637747371635a85fedd24d2190bb1f38651 12-Jun-2013 Igor Murashkin <iam@google.com> Initial implementation of android.hardware.photography.CameraDevice (service)

* Verified preview streaming requests
* Other things *should* work but unverified / unimplemented in client side

Missing:
* CameraService needs to return static camera info metadata

Bug: 9213377
Change-Id: I71568560fcf18d0e2b408ed1c4d0066647314868
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2ClientBase.cpp
amera/libcameraservice/Camera2ClientBase.h
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/photography/CameraDeviceClient.cpp
amera/libcameraservice/photography/CameraDeviceClient.h
e8fdbae47bf5793124f244c684ed597ebb78d3f5 21-Jun-2013 Alex Ray <aray@google.com> camera2/3: Warn on missing active array size parameters

Change-Id: I752659e1f0522392b902839cd7f4d997dcd85966
amera/libcameraservice/camera2/Parameters.cpp
30755ddfd36849a0be87fee5da849f161a45a8a6 21-Jun-2013 Glenn Kasten <gkasten@android.com> am d3ac2fc0: am f3e21c30: am 60f3f102: Merge "Prevent AudioCommands being freed before read"

* commit 'd3ac2fc0c5429003f69d161e42bba7e94434ec09':
Prevent AudioCommands being freed before read
d3ac2fc0c5429003f69d161e42bba7e94434ec09 21-Jun-2013 Glenn Kasten <gkasten@android.com> am f3e21c30: am 60f3f102: Merge "Prevent AudioCommands being freed before read"

* commit 'f3e21c301b8fef49eecf9c716373fcbfbaa47670':
Prevent AudioCommands being freed before read
f3e21c301b8fef49eecf9c716373fcbfbaa47670 21-Jun-2013 Glenn Kasten <gkasten@android.com> am 60f3f102: Merge "Prevent AudioCommands being freed before read"

* commit '60f3f102ba2973cc31e5c7ea00d95bbf19968e8b':
Prevent AudioCommands being freed before read
5fa8c4bf81275d5e1f5ef71bc66fc22e3152eeb0 18-Jan-2013 Christer Fletcher <christer.fletcher@sonymobile.com> Prevent AudioCommands being freed before read

When AudioCommandThread::threadLoop process AudioCommands it was
possible for it to delete a command where the posting thread still
hadn't read that status from it.

If a second command signaled the thread loop to continue after it
had inserted a new command while the thread loop was actually waiting
for the first command to report that it had read the status the
thread loop would continue and delete the first command.

Changed the wait condition when waiting for the calling thread to
read status to use command->mCond instead of mWaitWorkCV. This way
it's guaranteed that the signal to continue comes from the correct
thread.

Change-Id: Ia69b48cb4fdfaf8b4c83b56a197fb9f2058a92d1
udioflinger/AudioPolicyService.cpp
b3570568b3f37b3f7018257ece53cbc009b91407 19-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am 9c8714da: am e6478de7: Camera2/3: Avoid shutdown race in callback processor.

* commit '9c8714daaf6a402abd85557e9b652c86f0df86e4':
Camera2/3: Avoid shutdown race in callback processor.
9c8714daaf6a402abd85557e9b652c86f0df86e4 19-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am e6478de7: Camera2/3: Avoid shutdown race in callback processor.

* commit 'e6478de72a8ae1d3abb3e8c20898977c45354a4f':
Camera2/3: Avoid shutdown race in callback processor.
e6478de72a8ae1d3abb3e8c20898977c45354a4f 19-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Avoid shutdown race in callback processor.

It's possible, during shutdown, for callback processor's heap to be
destroyed when it's about to send the callback back to the user.
Properly copy the heap reference to a local variable before unlocking
the mutex.

Bug: 9485959
Change-Id: I301347b77145f19c7ac721b9127dc74f122acce2
amera/libcameraservice/camera2/CallbackProcessor.cpp
078a540525f86517aefa4afc56e12fbd74e3823d 18-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am bda5d1f2: am 241b5279: Camera3: Power: Properly shut down unused thread.

* commit 'bda5d1f2a34f9b7ded0bc0441be4856e78ec066c':
Camera3: Power: Properly shut down unused thread.
bda5d1f2a34f9b7ded0bc0441be4856e78ec066c 18-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am 241b5279: Camera3: Power: Properly shut down unused thread.

* commit '241b52798809d8db3d369af05ace1f73f723f29b':
Camera3: Power: Properly shut down unused thread.
241b52798809d8db3d369af05ace1f73f723f29b 17-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Power: Properly shut down unused thread.

Bug: 9466221
Change-Id: I9ed0740561b2e04954eebc1b8aec89cfab40a3a0
amera/libcameraservice/camera2/ZslProcessor3.cpp
8147a6ddfd54079ef89f90bf2b5ed3ab6f59bbc0 14-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am 0cc75491: am 26bc908b: Camera2/3: Make sure to wait for idle after still capture.

* commit '0cc754918a3c1353164ccc5798f63b28f65db406':
Camera2/3: Make sure to wait for idle after still capture.
c0c13c0cd4d21877e1de6a83504c1804a90c149f 14-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am e4a453d4: am 214a17fd: Camera3: Always close HAL device even in face of errors.

* commit 'e4a453d4b7563d1dab674df6ce52c291e63c6ca7':
Camera3: Always close HAL device even in face of errors.
0cc754918a3c1353164ccc5798f63b28f65db406 14-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am 26bc908b: Camera2/3: Make sure to wait for idle after still capture.

* commit '26bc908b3dafb5d80f092a22c5c71116526eae06':
Camera2/3: Make sure to wait for idle after still capture.
e4a453d4b7563d1dab674df6ce52c291e63c6ca7 14-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am 214a17fd: Camera3: Always close HAL device even in face of errors.

* commit '214a17fd37ef85fc841d3157b1e9096e1aa1b42f':
Camera3: Always close HAL device even in face of errors.
26bc908b3dafb5d80f092a22c5c71116526eae06 14-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Make sure to wait for idle after still capture.

While this wait should be immediate, it's important to guarantee
that preview is stopped when takePicture completes, and that the
device knows itself to be idle.

Bug: 9413025
Change-Id: I1c151ba920e226107ee048918187364990f444c0
amera/libcameraservice/camera2/CaptureSequencer.cpp
a28a10c618e90db32e5ebf4927484fdcbda89840 14-Jun-2013 Alex Ray <aray@google.com> Merge "camera2: accept 4-value active array size"
03e6579fc8d853ab6dd6b8ece10ebf4d434b1e17 13-Jun-2013 Alex Ray <aray@google.com> camera2: accept 4-value active array size

Change-Id: Ia320a022b201a938a025efc30a54c05fcfe5b02f
amera/libcameraservice/camera2/Parameters.cpp
214a17fd37ef85fc841d3157b1e9096e1aa1b42f 13-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Always close HAL device even in face of errors.

To improve robustness, make sure the HAL device instance is always
closed, even if it cannot be put into the IDLE state.

Bug: 9414167
Change-Id: I8e7035ff0afe7214951f9824e561b340cb37592e
amera/libcameraservice/Camera3Device.cpp
04411d3ed343added179703837c6c24444acce3b 13-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am ccc366a9: am 1191454a: Merge "Camera3: Skipping no-ops good, not updating state machine bad." into jb-mr2-dev

* commit 'ccc366a90fdd8d9df5de27820f04bc534d122c07':
Camera3: Skipping no-ops good, not updating state machine bad.
2b5f8f451d5459b17a7a99637f99a950fd74cc96 13-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am 4541531a: am c4a8d2dd: Merge "Camera2/3: Create JPEG stream unconditionally." into jb-mr2-dev

* commit '4541531a6e64329764ad7359775689a8f5aca165':
Camera2/3: Create JPEG stream unconditionally.
ccc366a90fdd8d9df5de27820f04bc534d122c07 13-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am 1191454a: Merge "Camera3: Skipping no-ops good, not updating state machine bad." into jb-mr2-dev

* commit '1191454a3a960a1972b0f36e625796c6c1b2c9ca':
Camera3: Skipping no-ops good, not updating state machine bad.
4541531a6e64329764ad7359775689a8f5aca165 13-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am c4a8d2dd: Merge "Camera2/3: Create JPEG stream unconditionally." into jb-mr2-dev

* commit 'c4a8d2ddfff6d91e493692251733f20ece3e713d':
Camera2/3: Create JPEG stream unconditionally.
1191454a3a960a1972b0f36e625796c6c1b2c9ca 13-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Skipping no-ops good, not updating state machine bad." into jb-mr2-dev
c4a8d2ddfff6d91e493692251733f20ece3e713d 13-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2/3: Create JPEG stream unconditionally." into jb-mr2-dev
31fdb29c9f5569fff20756ef1240120817993660 13-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Skipping no-ops good, not updating state machine bad.

If a HAL-level stream reconfigure is not needed, still need to
transition camera device to ACTIVE state in configureStreams.
Otherwise, shutdown functions will not wait for device to drain
properly.

Bug: 9413025
Change-Id: I0b15792097c7e5771015f2a362735d5f88b8c6ea
amera/libcameraservice/Camera3Device.cpp
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
udioflinger/AudioFlinger.h
udioflinger/PlaybackTracks.h
udioflinger/RecordTracks.h
udioflinger/Threads.cpp
udioflinger/TrackBase.h
udioflinger/Tracks.cpp
fe9a901a445633e70073b1b91fca3af34d8e8132 12-Jun-2013 Eric Laurent <elaurent@google.com> am bb35be24: am 7be48189: Merge "audioflinger: fix effects on direct output threads" into jb-mr2-dev

* commit 'bb35be24239f05f59715960a93cd491a4cd3b4d6':
audioflinger: fix effects on direct output threads
bb35be24239f05f59715960a93cd491a4cd3b4d6 12-Jun-2013 Eric Laurent <elaurent@google.com> am 7be48189: Merge "audioflinger: fix effects on direct output threads" into jb-mr2-dev

* commit '7be48189c0aefb82825a7689d9e1005175570779':
audioflinger: fix effects on direct output threads
7be48189c0aefb82825a7689d9e1005175570779 12-Jun-2013 Eric Laurent <elaurent@google.com> Merge "audioflinger: fix effects on direct output threads" into jb-mr2-dev
52b943e8036aa6ebd15131820d196fedb321613d 12-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am 44ade05f: am ea26c777: Camera3: Skip no-op stream configurations.

* commit '44ade05f8d030ae3af8d05359734b18eac433935':
Camera3: Skip no-op stream configurations.
44ade05f8d030ae3af8d05359734b18eac433935 12-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am ea26c777: Camera3: Skip no-op stream configurations.

* commit 'ea26c7772f4721657db409068d4bed194ae49c94':
Camera3: Skip no-op stream configurations.
ea26c7772f4721657db409068d4bed194ae49c94 12-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Skip no-op stream configurations.

If configuring the same set of streams more than once, don't actually
call into the HAL for the second and subsequent configure calls, since
they're no-ops.

This can speed up camera operation substantially if the
HAL implementation does not detect no-ops on its own and does a full
shutdown/restart on each configure call.

Bug: 9392513
Change-Id: I23baf4acbae2304735899adcf8e17565fa94d31d
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/Camera3Device.h
d0107bcd44fe608b0c00a8843d19fb6356c4cb69 11-Jun-2013 Eric Laurent <elaurent@google.com> audioflinger: fix effects on direct output threads

PlaybackThread::addTrack_l() uses the assumption that
effects are attached to a track only if the track accumulation
buffer is different from the mixer thread output buffer.
This is not true for direct output threads where only one track is active
an only one buffer is needed.
This assumption is an optimization to avoid checking for effect chains with
the same session ID each time a track is processed. The optimization
is not key if only one track is attached to the thread which is the case for
direct outputs.

Current code fails to increment the active track count in the effect chain
on direct output threads when a track is started thus making the effect
framework clear the mix buffer and produce silence each time the mixer runs.

The fix consists in removing the optimization described above.

Bug: 9324989.

Change-Id: Id7a6337450ed90d326299c2ce9fc02f4b9e2fa6f
udioflinger/Threads.cpp
a9c64a9398ac2e6173f99e252f305808a34cab1c 11-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Create JPEG stream unconditionally.

Instead of creating the JPEG output stream only at first use,
create it at time of preview start. This is important for reducing
the first-capture latency on HAL3 devices, and for ZSL on them.

Bug: 9339858
Change-Id: I4296f706cfd151c47ef315149e87d01fe554aaa4
amera/libcameraservice/Camera2Client.cpp
5e07157c8f69030b4f9bdabded76f84fd4c91fd7 10-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Add more tracing"
17a61adbd7cc1abe432deeffc11660daa74f6496 04-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Add more tracing

Change-Id: I5f5d0d3f37244f19446c473db70373bdf16cce56
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/camera3/Camera3Stream.cpp
f05aec20748c9b71ffbb35cf0ae10078d297b45d 07-Jun-2013 Zhijun He <zhijunhe@google.com> am 574ca4f4: am ba696bbf: Merge "camera2/3: Fix deadlock take picture while preview callback" into jb-mr2-dev

* commit '574ca4f4f15a42d6159150149f68bf3cb800d869':
camera2/3: Fix deadlock take picture while preview callback
574ca4f4f15a42d6159150149f68bf3cb800d869 07-Jun-2013 Zhijun He <zhijunhe@google.com> am ba696bbf: Merge "camera2/3: Fix deadlock take picture while preview callback" into jb-mr2-dev

* commit 'ba696bbff88d5627beaa0be95be78ba30138983d':
camera2/3: Fix deadlock take picture while preview callback
ba696bbff88d5627beaa0be95be78ba30138983d 07-Jun-2013 Zhijun He <zhijunhe@google.com> Merge "camera2/3: Fix deadlock take picture while preview callback" into jb-mr2-dev
04b035e3ccbf2919e4447c66e6483c11f2889f01 07-Jun-2013 Eric Laurent <elaurent@google.com> am d3a5b48a: am 18b46679: Merge "AudioFlinger: do not cache audio device when 0." into jb-mr2-dev

* commit 'd3a5b48a1bc4f5d6ff4472f54f909abaadd5fa39':
AudioFlinger: do not cache audio device when 0.
d3a5b48a1bc4f5d6ff4472f54f909abaadd5fa39 07-Jun-2013 Eric Laurent <elaurent@google.com> am 18b46679: Merge "AudioFlinger: do not cache audio device when 0." into jb-mr2-dev

* commit '18b466790aa0a55ff4282ed8b5e550e58e0444b2':
AudioFlinger: do not cache audio device when 0.
18b466790aa0a55ff4282ed8b5e550e58e0444b2 07-Jun-2013 Eric Laurent <elaurent@google.com> Merge "AudioFlinger: do not cache audio device when 0." into jb-mr2-dev
7e1139c0377b6806942fb2a043737b3b9cf0ae91 07-Jun-2013 Eric Laurent <elaurent@google.com> AudioFlinger: do not cache audio device when 0.

AudioFlinger should not cache the audio device
passed to the audio HAL when it is AUDIO_DEVICE_NONE
but keep previous valid selection instead.

Bug: 9323399.
Change-Id: I6f9480e55a21be4115453e6a5eebc5cf2536c476
udioflinger/Effects.cpp
udioflinger/Threads.cpp
ddb104d382e5432e0b15c1b3ee91ba0eed73d0ec 07-Jun-2013 Zhijun He <zhijunhe@google.com> camera2/3: Fix deadlock take picture while preview callback

Acquiring mInputMutex before SharedParameters mutex in preview callback thread
causes circular locking dependency between callback thread and capture callback
thread.
Enforce the right lock ordering to break the dead lock.

Bug: 9323319
Change-Id: Iea2e025e4d9e29debcf74297c19930075017e179
amera/libcameraservice/camera2/CallbackProcessor.cpp
dcb614cda0fb11d06dc3e7f508367a36baaebd54 06-Jun-2013 Zhijun He <zhijunhe@google.com> am e097efde: am b05eeaed: camera3: Fix crash in set error state.

* commit 'e097efde4363f80d5ffc34da6ec6253fbd4e5397':
camera3: Fix crash in set error state.
e097efde4363f80d5ffc34da6ec6253fbd4e5397 06-Jun-2013 Zhijun He <zhijunhe@google.com> am b05eeaed: camera3: Fix crash in set error state.

* commit 'b05eeaedacaff92b6e5ac89f99b0fccdf7643f09':
camera3: Fix crash in set error state.
b05eeaedacaff92b6e5ac89f99b0fccdf7643f09 06-Jun-2013 Zhijun He <zhijunhe@google.com> camera3: Fix crash in set error state.

When camera open fails in camera3device initialize call, setErrorStateLockedV()
tries to access RequestThread object that is not created yet.

Bug: 9319518
Change-Id: Id5c6c0150ecaecb198045d5c6eb1b2ceebf5a727
amera/libcameraservice/Camera3Device.cpp
9490a96eab4b25b23777b297de75186dfb932577 06-Jun-2013 Zhijun He <zhijunhe@google.com> am 1d263b89: am 62a8f67f: camera2/3: Add protection to callback processing call

* commit '1d263b89bd1c5d73389f53976e104dd6b088ab6e':
camera2/3: Add protection to callback processing call
1d263b89bd1c5d73389f53976e104dd6b088ab6e 06-Jun-2013 Zhijun He <zhijunhe@google.com> am 62a8f67f: camera2/3: Add protection to callback processing call

* commit '62a8f67f33faf19d0ff815672dd19bb71dd0d650':
camera2/3: Add protection to callback processing call
62a8f67f33faf19d0ff815672dd19bb71dd0d650 06-Jun-2013 Zhijun He <zhijunhe@google.com> camera2/3: Add protection to callback processing call

Callback stream in callbackprocessor could be delleted while process or
discard callback are ongoing, which leads CpuConsumer related call crash.

Bug 9303911

Change-Id: Ib6137e512208e5603468eba166640729b744e8f9
amera/libcameraservice/camera2/CallbackProcessor.cpp
50bdb73e04cbdf5a8da647f8830cd88663f20f14 05-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am 4dd110ae: am 254446a8: Camera2/3: Move recording frame processing to its own thread.

* commit '4dd110ae6d9f00e1ec036f697045f4b3326b7873':
Camera2/3: Move recording frame processing to its own thread.
4dd110ae6d9f00e1ec036f697045f4b3326b7873 05-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am 254446a8: Camera2/3: Move recording frame processing to its own thread.

* commit '254446a80cb13d5beb606bfc3e60a17473869478':
Camera2/3: Move recording frame processing to its own thread.
254446a80cb13d5beb606bfc3e60a17473869478 05-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Move recording frame processing to its own thread.

Due to new deadlock opportunities from HAL3 integration, recording
frame processing needs to move out of the new frame handler into its
own thread in StreamingProcessor.

Bug: 9282913
Change-Id: I8d2926f2de9d0d395eef3c328c65caebbdbd2827
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/StreamingProcessor.cpp
amera/libcameraservice/camera2/StreamingProcessor.h
4b58d70b4109648b5d392d6ad4e4512d9ae5afb7 04-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am cbbd6c83: am 8f908c0c: Merge "Camera2/3: Don\'t trigger AF when in INFINITY focus mode." into jb-mr2-dev

* commit 'cbbd6c8354f7323933081b217ce53461d99215c4':
Camera2/3: Don't trigger AF when in INFINITY focus mode.
cbbd6c8354f7323933081b217ce53461d99215c4 04-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am 8f908c0c: Merge "Camera2/3: Don\'t trigger AF when in INFINITY focus mode." into jb-mr2-dev

* commit '8f908c0c211f8051f339bc85b01a6450f0dfd7d0':
Camera2/3: Don't trigger AF when in INFINITY focus mode.
9454a9710b13c7d9262fe1cbd910235a3cd35f20 04-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Don't trigger AF when in INFINITY focus mode.

While the HAL should ignore it, it's faster to immediately respond
with success.

Also filter out cancel autofocus calls for FIXED/INFINITY focus.

Bug: 9263856
Change-Id: I637ec7c8b459d654ef11cb1142b959f2674224c5
amera/libcameraservice/Camera2Client.cpp
911c7451475fb116e4888e936398cb85db16d6f3 31-May-2013 Glenn Kasten <gkasten@google.com> Merge "Consistent whitespace"
7c027248e1a4ccd5b22bc4deafb03e2d87ac8f38 26-Dec-2012 Glenn Kasten <gkasten@google.com> Consistent whitespace

Change-Id: I118cce68d3b777f9ec9b6bfb70367496422a40f2
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
fe7e0c6154309f2491463ee6ca4920d225289638 30-May-2013 Alex Ray <aray@google.com> camera: Dont segfault when result lacks timestamp

Also make a log message more useful.

Change-Id: Id8b65a9b55e1ebe41598dc2db4b0b2aa3f161965
amera/libcameraservice/Camera3Device.cpp
20cb300bce9a2b80966a422ef2de35b18533e1dd 29-May-2013 Alex Ray <aray@google.com> camera3: Error on minimum buffer count

Change-Id: Idf16de20e940e411286ec3e477534b36ef1c9b11
amera/libcameraservice/camera3/Camera3OutputStream.cpp
211a2ed2c05044a10c8619d1dba1070b72a8b256 23-May-2013 Alex Ray <aray@google.com> Camera: static parameter default values

Use sane default values for static metadata parameters.

Change-Id: I180d9b6560ebba468a083e847b78e02b845db788
amera/libcameraservice/camera2/Parameters.cpp
608cff22d70a0eabb7e01ef39f13b4d6db5ba48a 25-May-2013 Alex Ray <aray@google.com> libcameraservice: missing argument when logging

Change-Id: I6f3da400f8f47a387968b9da4ee7cd8e0c9dea70
amera/libcameraservice/camera2/JpegCompressor.cpp
8bae43ae86b9942892980c3c01bff5c812b1db7f 29-May-2013 Igor Murashkin <iam@google.com> am 9f013a46: am 3c89a2e9: Merge "camera3: Don\'t try to disconnect stream native windows more than once" into jb-mr2-dev

* commit '9f013a46e150da01ebb267574d8095eef399cd0c':
camera3: Don't try to disconnect stream native windows more than once
9f013a46e150da01ebb267574d8095eef399cd0c 29-May-2013 Igor Murashkin <iam@google.com> am 3c89a2e9: Merge "camera3: Don\'t try to disconnect stream native windows more than once" into jb-mr2-dev

* commit '3c89a2e9d4ee10b9e955783af2ab9e9dd137922f':
camera3: Don't try to disconnect stream native windows more than once
3c89a2e9d4ee10b9e955783af2ab9e9dd137922f 29-May-2013 Igor Murashkin <iam@google.com> Merge "camera3: Don't try to disconnect stream native windows more than once" into jb-mr2-dev
e2172bed7e77ab1d922588cf727818b481400b53 29-May-2013 Igor Murashkin <iam@google.com> camera3: Don't try to disconnect stream native windows more than once

This fixes the multiple-disconnect-from-BufferQueue bug.

(In logs)
BufferQueue: [SurfaceView] disconnect: connected to another api (cur=0, req=4)

Bug: 9114681
Change-Id: I21ae1c5bd993701eea13648aa9994979a24eb210
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/camera3/Camera3IOStreamBase.cpp
amera/libcameraservice/camera3/Camera3Stream.cpp
amera/libcameraservice/camera3/Camera3Stream.h
55beec78a47a32288a01dde7fbc08406aa44345a 24-May-2013 Zhijun He <zhijunhe@google.com> am 22a5ddb6: am 6f6b31da: Merge "Camera3: Fix the deadlock during recording pinch zooming" into jb-mr2-dev

* commit '22a5ddb68173b75053d838a30d091920cd0a1dca':
Camera3: Fix the deadlock during recording pinch zooming
4032fc33089ddd6f4bc4f247f5c8f32a3f7f975e 24-May-2013 Ed Heyl <edheyl@google.com> am 14e585c8: am 6947f125: Merge "camera3: Disable ZSL for limited mode camera HALs" into jb-mr2-dev

* commit '14e585c8e0667c13202dbefc52f9d00ffe161cf1':
camera3: Disable ZSL for limited mode camera HALs
22a5ddb68173b75053d838a30d091920cd0a1dca 24-May-2013 Zhijun He <zhijunhe@google.com> am 6f6b31da: Merge "Camera3: Fix the deadlock during recording pinch zooming" into jb-mr2-dev

* commit '6f6b31da6097f1d770137ebadac5023dd8b79413':
Camera3: Fix the deadlock during recording pinch zooming
6f6b31da6097f1d770137ebadac5023dd8b79413 24-May-2013 Zhijun He <zhijunhe@google.com> Merge "Camera3: Fix the deadlock during recording pinch zooming" into jb-mr2-dev
14e585c8e0667c13202dbefc52f9d00ffe161cf1 24-May-2013 Ed Heyl <edheyl@google.com> am 6947f125: Merge "camera3: Disable ZSL for limited mode camera HALs" into jb-mr2-dev

* commit '6947f125f76dde6664779126415d11b3365225da':
camera3: Disable ZSL for limited mode camera HALs
6947f125f76dde6664779126415d11b3365225da 24-May-2013 Ed Heyl <edheyl@google.com> Merge "camera3: Disable ZSL for limited mode camera HALs" into jb-mr2-dev
059161b7ab0a38b276b1aa26e73ff4398a02e012 24-May-2013 Igor Murashkin <iam@google.com> camera3: Disable ZSL for limited mode camera HALs

Bug: 9111852
Change-Id: Idad7e0d2f912341bd643d0ad1a0861fb2043aa90
amera/libcameraservice/camera2/Parameters.cpp
d030447b617105b31bf3013e5e4b39d422b53b77 15-May-2013 Lajos Molnar <lajos@google.com> stagefright: BufferProducer updates

Update BufferQueue and ConsumerBase users to new BufferQueue
API, to allow BufferQueue slots to be reused. Buffer consumers
generally now need to track the unique frameNumber belonging to
each frame acquired if they are using BufferQueue directly.
Otherwise, they can simply track the graphicBuffer.

Change-Id: I30ee3158cf40fb10bbd085241646d5f1128ee480
Signed-off-by: Lajos Molnar <lajos@google.com>
Related-to-bug: 7093648
amera/libcameraservice/gui/RingBufferConsumer.cpp
599d83e4f2197968d77d3d106630179c88c8a6d7 23-May-2013 Igor Murashkin <iam@google.com> am 9b89c15d: am ca3fb120: Merge "camera3: Fix zsl buffers released-while-in-use race condition" into jb-mr2-dev

* commit '9b89c15d9d8abb9408760ffdb022df4c4367685b':
camera3: Fix zsl buffers released-while-in-use race condition
9b89c15d9d8abb9408760ffdb022df4c4367685b 23-May-2013 Igor Murashkin <iam@google.com> am ca3fb120: Merge "camera3: Fix zsl buffers released-while-in-use race condition" into jb-mr2-dev

* commit 'ca3fb120f5697c05e3ea1a50abe913a9cc4a8d73':
camera3: Fix zsl buffers released-while-in-use race condition
ca3fb120f5697c05e3ea1a50abe913a9cc4a8d73 23-May-2013 Igor Murashkin <iam@google.com> Merge "camera3: Fix zsl buffers released-while-in-use race condition" into jb-mr2-dev
124ccf4b5023a40c57b49981123e6c9b61408a5d 22-May-2013 Zhijun He <zhijunhe@google.com> Camera3: Fix the deadlock during recording pinch zooming

When zooming during recording, hal callback thread and request update thread run
into deadlock due to lock circular dependency. This change release lock during
queuebuffer in callback thread to break the dependency.

Bug: 9091576
Change-Id: Ia7b3f0ec17573cb32a5696dcde419ca28f42cfb8
amera/libcameraservice/camera3/Camera3OutputStream.cpp
amera/libcameraservice/camera3/Camera3OutputStream.h
7d7bb975026a3b428101cdea11e2d94605f845c1 23-May-2013 Igor Murashkin <iam@google.com> am 98730cd7: am 1f7f83b7: Merge "Camera3: Make sure new metadata results signal other threads waiting" into jb-mr2-dev

* commit '98730cd7456b32255a37d691a70f49df22975a72':
Camera3: Make sure new metadata results signal other threads waiting
98730cd7456b32255a37d691a70f49df22975a72 23-May-2013 Igor Murashkin <iam@google.com> am 1f7f83b7: Merge "Camera3: Make sure new metadata results signal other threads waiting" into jb-mr2-dev

* commit '1f7f83b7a1f2e2d01f808913ef0b869652c08949':
Camera3: Make sure new metadata results signal other threads waiting
1f7f83b7a1f2e2d01f808913ef0b869652c08949 23-May-2013 Igor Murashkin <iam@google.com> Merge "Camera3: Make sure new metadata results signal other threads waiting" into jb-mr2-dev
efb0fd232388b1f726c59f2ec20eea2d3ea8465d 23-May-2013 Igor Murashkin <iam@google.com> camera3: Fix zsl buffers released-while-in-use race condition

Bug: 9007356
Change-Id: I0ced31020410978c549d408b2815f925e9c9ffcf
amera/libcameraservice/camera2/ZslProcessor3.cpp
amera/libcameraservice/gui/RingBufferConsumer.cpp
c7722457d9896c10fd33816fbea831852af68330 22-May-2013 Igor Murashkin <iam@google.com> am b7337d56: am ed49d7b5: Merge "camera3: Fix recording failure when switching resolutions while preview on" into jb-mr2-dev

* commit 'b7337d56a72c9b20abf57e853953126d0aa3dd1a':
camera3: Fix recording failure when switching resolutions while preview on
b7337d56a72c9b20abf57e853953126d0aa3dd1a 22-May-2013 Igor Murashkin <iam@google.com> am ed49d7b5: Merge "camera3: Fix recording failure when switching resolutions while preview on" into jb-mr2-dev

* commit 'ed49d7b57e66cc2520817b345ef9de289d688bd4':
camera3: Fix recording failure when switching resolutions while preview on
ed49d7b57e66cc2520817b345ef9de289d688bd4 22-May-2013 Igor Murashkin <iam@google.com> Merge "camera3: Fix recording failure when switching resolutions while preview on" into jb-mr2-dev
65e218ee5249d722a1af0bab6546709f3de62f8c 22-May-2013 Mansoor Aftab <maftab@codeaurora.org> am 1d60db8b: am c2c874d8: Camera3: Fix Bug minTimestamp is never greater than frame timestamp

* commit '1d60db8bfce9becee9d101eacc58e2a673221622':
Camera3: Fix Bug minTimestamp is never greater than frame timestamp
1d60db8bfce9becee9d101eacc58e2a673221622 22-May-2013 Mansoor Aftab <maftab@codeaurora.org> am c2c874d8: Camera3: Fix Bug minTimestamp is never greater than frame timestamp

* commit 'c2c874d88df1b4be52f5415de6606785691bba1f':
Camera3: Fix Bug minTimestamp is never greater than frame timestamp
c2c874d88df1b4be52f5415de6606785691bba1f 22-May-2013 Mansoor Aftab <maftab@codeaurora.org> Camera3: Fix Bug minTimestamp is never greater than frame timestamp

Bug in logic since minTimestamp is initialized to -1, and this needs
to be updated for the first frame atleast for logic to work correctly
for subsequent frames.

Bug: 9007356
Change-Id: I70edc4d9f34ff67a141c027c67396dc2ca9e413a
Signed-off-by: Igor Murashkin <iam@google.com>
amera/libcameraservice/camera2/ZslProcessor3.cpp
82db9e6126812dd2ee74e33e4c475cae2c7e48f6 21-May-2013 Igor Murashkin <iam@google.com> camera3: Fix recording failure when switching resolutions while preview on

Bug: 9069574
Change-Id: Ife2ae5467f799dbe37e66714b3a6c9a51e1fe328
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/camera2/StreamingProcessor.cpp
4345d5b57a93ec6d003df84f5cce2db7cccfbd86 17-May-2013 Igor Murashkin <iam@google.com> Camera3: Make sure new metadata results signal other threads waiting

- Also adds a lot of logging around shuffling around metadata frames

Bug: 9007356
Change-Id: I4285f4f55b4b899ea4928d43062c705619c8248a
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/camera2/ProFrameProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor3.cpp
475173cd4c9108e6cd141ae74ea62ef9bbdc2aed 21-May-2013 Zhijun He <zhijunhe@google.com> am 722e4892: am 01831d23: Camera2/3: Increase digital zoom steps

* commit '722e4892e2afeb0c7abab84be1caa243d1692e28':
Camera2/3: Increase digital zoom steps
722e4892e2afeb0c7abab84be1caa243d1692e28 21-May-2013 Zhijun He <zhijunhe@google.com> am 01831d23: Camera2/3: Increase digital zoom steps

* commit '01831d233c84da7f9092e62f143626918a5a747e':
Camera2/3: Increase digital zoom steps
61d404efeaaf3ea1b615c160b843ac9f274d0018 20-May-2013 Dianne Hackborn <hackbod@google.com> Update to supply correct name for new power manager app ops.

Change-Id: Ia686319509d98a4f467479ea494e8a54f2c1e238
udioflinger/Threads.cpp
01831d233c84da7f9092e62f143626918a5a747e 20-May-2013 Zhijun He <zhijunhe@google.com> Camera2/3: Increase digital zoom steps

Digitial zoom number of steps was 30 and a bit rough. Change it to 100 to make
smooth zoom smoother.

Bug: 9050908
Change-Id: I141bc0335d58cdcd6530c14cbbfe6c4ffb4c6dc6
amera/libcameraservice/camera2/Parameters.h
bd398c64c368615a810c9658798dbe8ec44978e8 17-May-2013 Mathias Agopian <mathias@google.com> am 074eb387: am e2dfa5a4: Merge "update to Fence::waitForever() API change" into jb-mr2-dev

* commit '074eb387091ca464257601a2d23020e3e10a6915':
update to Fence::waitForever() API change
074eb387091ca464257601a2d23020e3e10a6915 17-May-2013 Mathias Agopian <mathias@google.com> am e2dfa5a4: Merge "update to Fence::waitForever() API change" into jb-mr2-dev

* commit 'e2dfa5a4ea3459b155b4b403b7dafe2116d960d4':
update to Fence::waitForever() API change
d76442421eadfa73f2f3a9e50f6caf65b0dd1ce9 17-May-2013 Mathias Agopian <mathias@google.com> update to Fence::waitForever() API change

Bug: 8988871
Change-Id: I24a2620d356f3bb6207ed834c79fd3e48b429695
amera/libcameraservice/camera3/Camera3Stream.cpp
amera/libcameraservice/camera3/Camera3Stream.h
amera/libcameraservice/gui/RingBufferConsumer.cpp
3551dfe5b1e228e609d69f717ef25692e4c7a4d5 15-May-2013 Eino-Ville Talvala <etalvala@google.com> am dfaccc77: am 7dd801bd: Merge "Camera3: Fix fast flexible YUV->NV21 path." into jb-mr2-dev

* commit 'dfaccc77508d5d0c6a4cc161ecb76d910c29f6c6':
Camera3: Fix fast flexible YUV->NV21 path.
eef0aa7a674fc250a8b3e29cdb4cf605e5e30078 15-May-2013 Eino-Ville Talvala <etalvala@google.com> am 7dd801bd: Merge "Camera3: Fix fast flexible YUV->NV21 path." into jb-mr2-dev

* commit '7dd801bd108bff3e897e9e86c5f79f1ab05709d0':
Camera3: Fix fast flexible YUV->NV21 path.
dfaccc77508d5d0c6a4cc161ecb76d910c29f6c6 15-May-2013 Eino-Ville Talvala <etalvala@google.com> am 7dd801bd: Merge "Camera3: Fix fast flexible YUV->NV21 path." into jb-mr2-dev

* commit '7dd801bd108bff3e897e9e86c5f79f1ab05709d0':
Camera3: Fix fast flexible YUV->NV21 path.
0d0d868f5fbd549728e9ca4dea738f4663e076c4 15-May-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Fix fast flexible YUV->NV21 path." into jb-mr2-dev
7dd801bd108bff3e897e9e86c5f79f1ab05709d0 15-May-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Fix fast flexible YUV->NV21 path." into jb-mr2-dev
478b9593cede8e07ce0590d7a48bd4c0931ce9d2 15-May-2013 Igor Murashkin <iam@google.com> am 0560ecdc: am 083a08ac: Camera: don\'t spam RingBufferConsumer logs in eng builds

* commit '0560ecdc2de3032a3cba2d6e4e00777b5186fd2a':
Camera: don't spam RingBufferConsumer logs in eng builds
a1f70e6abb5375c6bfaf06ab92f64d9e3a2ef22f 15-May-2013 Igor Murashkin <iam@google.com> am 083a08ac: Camera: don\'t spam RingBufferConsumer logs in eng builds

* commit '083a08ac82704fdcc37334a4253ff075f703cc87':
Camera: don't spam RingBufferConsumer logs in eng builds
0560ecdc2de3032a3cba2d6e4e00777b5186fd2a 15-May-2013 Igor Murashkin <iam@google.com> am 083a08ac: Camera: don\'t spam RingBufferConsumer logs in eng builds

* commit '083a08ac82704fdcc37334a4253ff075f703cc87':
Camera: don't spam RingBufferConsumer logs in eng builds
d5694a2e7e61cf7e19a0e135e63142d1967e178b 15-May-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Fix fast flexible YUV->NV21 path.

A U by any other name may smell just as sweet, but the color's pretty
awful if you call it a V.

Henceforth they never will be UV.

Bug: 8949720
Change-Id: I4897e93d5a293e576bb1d7ba44d91792b869ad42
amera/libcameraservice/camera2/CallbackProcessor.cpp
9c910c2d780ce1afa221f963da4d4a307443d9be 15-May-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Fix fast flexible YUV->NV21 path.

A U by any other name may smell just as sweet, but the color's pretty
awful if you call it a V.

Henceforth they never will be UV.

Bug: 8949720
Change-Id: I4897e93d5a293e576bb1d7ba44d91792b869ad42
amera/libcameraservice/camera2/CallbackProcessor.cpp
8e2afd9817e53858e3f99f810c0b7abe4c4d5533 15-May-2013 Igor Murashkin <iam@google.com> Camera: don't spam RingBufferConsumer logs in eng builds

Bug: 8969579
Change-Id: Ia51d4072725754fd3b6ca028232a605885376287
amera/libcameraservice/gui/RingBufferConsumer.cpp
083a08ac82704fdcc37334a4253ff075f703cc87 15-May-2013 Igor Murashkin <iam@google.com> Camera: don't spam RingBufferConsumer logs in eng builds

Bug: 8969579
Change-Id: Ia51d4072725754fd3b6ca028232a605885376287
amera/libcameraservice/gui/RingBufferConsumer.cpp
e974c7df1c4a87ced27a773430690a20d208d40e 15-May-2013 Elliott Hughes <enh@google.com> am effc08ed: Merge "Replace obsolete CLOCK_MONOTONIC_HR by CLOCK_MONOTONIC"

* commit 'effc08ed1eb1d55ca13997ec96f72e40a0866394':
Replace obsolete CLOCK_MONOTONIC_HR by CLOCK_MONOTONIC
394b47e595fe6677fa85cfa0823170978e6479c8 15-May-2013 Elliott Hughes <enh@google.com> am effc08ed: Merge "Replace obsolete CLOCK_MONOTONIC_HR by CLOCK_MONOTONIC"

* commit 'effc08ed1eb1d55ca13997ec96f72e40a0866394':
Replace obsolete CLOCK_MONOTONIC_HR by CLOCK_MONOTONIC
8df7184c17a6f7f7fa6612b6de30af655f5eb0a7 10-May-2013 Glenn Kasten <gkasten@google.com> Replace obsolete CLOCK_MONOTONIC_HR by CLOCK_MONOTONIC

(cherry-pick of da1a325bc0a1421f4233e62704da4fab8b0acf7b.)

Bug: 8895727
Change-Id: I29d5dcf8519600fdd2910345449c66a5c1284646
udioflinger/test-resample.cpp
4a434ce11e328ab97b02ca3cc44e920bc82c198b 10-May-2013 Glenn Kasten <gkasten@google.com> Replace obsolete CLOCK_MONOTONIC_HR by CLOCK_MONOTONIC

(cherry-pick of da1a325bc0a1421f4233e62704da4fab8b0acf7b.)

Bug: 8895727
Change-Id: I29d5dcf8519600fdd2910345449c66a5c1284646
udioflinger/test-resample.cpp
7f7728ffb7e812a845078e2e905b4d17ea40b57c 14-May-2013 Igor Murashkin <iam@google.com> am bd61103f: am be03b28f: Merge "Camera: Pause preview when needing to delete jpeg/zsl streams" into jb-mr2-dev

* commit 'bd61103faef2f75053c86764ae59b3b78d293448':
Camera: Pause preview when needing to delete jpeg/zsl streams
5282713a976184e41451315f1286d8075b257d58 13-May-2013 Igor Murashkin <iam@google.com> Camera: Pause preview when needing to delete jpeg/zsl streams

Bug: 8876221
Change-Id: Idf9490a48462fa44d49c4ebe99425c3149ae6378
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/StreamingProcessor.cpp
amera/libcameraservice/camera2/StreamingProcessor.h
amera/libcameraservice/camera2/ZslProcessor3.cpp
dca254aef0c09867e50fe6613c6fad405de72842 13-May-2013 Igor Murashkin <iam@google.com> Camera: Pause preview when needing to delete jpeg/zsl streams

Bug: 8876221
Change-Id: Idf9490a48462fa44d49c4ebe99425c3149ae6378
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/StreamingProcessor.cpp
amera/libcameraservice/camera2/StreamingProcessor.h
amera/libcameraservice/camera2/ZslProcessor3.cpp
e05eabe5c279e08adf100208143b0df229050778 13-May-2013 Igor Murashkin <iam@google.com> am 80502989: am 38ea629e: Merge "Camera3: Refactor stream code to be DRY" into jb-mr2-dev

* commit '805029896a90dc5897e07caf8e4cfa0f85613890':
Camera3: Refactor stream code to be DRY
8dbaa56a9de51d506977bda112f75b8af50920e9 13-May-2013 Igor Murashkin <iam@google.com> Merge "Camera3: Refactor stream code to be DRY" into jb-mr2-dev
38ea629ed2ccba17c763f697ced6d654a42bf699 13-May-2013 Igor Murashkin <iam@google.com> Merge "Camera3: Refactor stream code to be DRY" into jb-mr2-dev
4a1c0a68578c069b09ff5a1b6817dd3a0fe089a2 11-May-2013 Eino-Ville Talvala <etalvala@google.com> am 9ca66450: am 1d74d78f: Merge "Camera2/3: Optimize a few YCbCr_420_888 copy paths" into jb-mr2-dev

* commit '9ca66450ba724aa656382adb82bd61f3c6bdbbf6':
Camera2/3: Optimize a few YCbCr_420_888 copy paths
5fd5b268201e2fc21aaeba4fbac11195ee430c71 11-May-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2/3: Optimize a few YCbCr_420_888 copy paths" into jb-mr2-dev
1d74d78feb36aa08cfba696b67278cb6bbed6bd2 11-May-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2/3: Optimize a few YCbCr_420_888 copy paths" into jb-mr2-dev
38ff2244e951a9365aa142d46b1a8c326788756a 11-May-2013 Alex Ray <aray@google.com> am 0626ee02: am da5405fb: Merge "Camera2: FoV quirk crop regions" into jb-mr2-dev

* commit '0626ee0238dea760e35b840e424ec357ebebaf23':
Camera2: FoV quirk crop regions
6d0cf90b6b28cbb7e3e1b3ae32017aa4b44b6452 10-May-2013 Alex Ray <aray@google.com> Merge "Camera2: FoV quirk crop regions" into jb-mr2-dev
da5405fb0453d8a8ce99ab303599ecb4b47c6ccb 10-May-2013 Alex Ray <aray@google.com> Merge "Camera2: FoV quirk crop regions" into jb-mr2-dev
e3a9f964d7ebb6f269e6df2ba9c24b7c8b9ccefd 09-May-2013 Igor Murashkin <iam@google.com> Camera3: Refactor stream code to be DRY

Bug: 8851039
Change-Id: Iaac2926bfa25dd6e9db8b307765d4fe709b88d21
amera/libcameraservice/Android.mk
amera/libcameraservice/camera3/Camera3IOStreamBase.cpp
amera/libcameraservice/camera3/Camera3IOStreamBase.h
amera/libcameraservice/camera3/Camera3InputStream.cpp
amera/libcameraservice/camera3/Camera3InputStream.h
amera/libcameraservice/camera3/Camera3OutputStream.cpp
amera/libcameraservice/camera3/Camera3OutputStream.h
amera/libcameraservice/camera3/Camera3ZslStream.cpp
amera/libcameraservice/camera3/Camera3ZslStream.h
ae3d0babb9c5d68b107b53d5a67193309020c556 09-May-2013 Igor Murashkin <iam@google.com> Camera3: Refactor stream code to be DRY

Bug: 8851039
Change-Id: Iaac2926bfa25dd6e9db8b307765d4fe709b88d21
amera/libcameraservice/Android.mk
amera/libcameraservice/camera3/Camera3IOStreamBase.cpp
amera/libcameraservice/camera3/Camera3IOStreamBase.h
amera/libcameraservice/camera3/Camera3InputStream.cpp
amera/libcameraservice/camera3/Camera3InputStream.h
amera/libcameraservice/camera3/Camera3OutputStream.cpp
amera/libcameraservice/camera3/Camera3OutputStream.h
amera/libcameraservice/camera3/Camera3ZslStream.cpp
amera/libcameraservice/camera3/Camera3ZslStream.h
22d63bfe19e04d0c268cfe1219022ff8b85d1826 10-May-2013 Eino-Ville Talvala <etalvala@google.com> am d9e8b326: am 747b8492: Camera3: Fix initial orientation configuration.

* commit 'd9e8b32690078f2cc518a76b3abc501e41fb3aa3':
Camera3: Fix initial orientation configuration.
b8ef4856ba7c0cd74ce77e0bc855f8b391f46fa7 10-May-2013 Glenn Kasten <gkasten@google.com> Merge "Replace obsolete CLOCK_MONOTONIC_HR by CLOCK_MONOTONIC"
da1a325bc0a1421f4233e62704da4fab8b0acf7b 10-May-2013 Glenn Kasten <gkasten@google.com> Replace obsolete CLOCK_MONOTONIC_HR by CLOCK_MONOTONIC

Bug: 8895727
Change-Id: I0abf6da941965e9e29e232943184dbc72b95d03c
udioflinger/test-resample.cpp
2703cf1f71f679542f21632a9c1bd88af9578d0f 10-May-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Fix initial orientation configuration.

One call to set orientation too many.

Bug: 8683719
Change-Id: I4b776fc8665eed940a1f18a6f617be4f1406e41a
amera/libcameraservice/camera3/Camera3OutputStream.cpp
747b84925886dec39cd7532637b9338054e649ef 10-May-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Fix initial orientation configuration.

One call to set orientation too many.

Bug: 8683719
Change-Id: I4b776fc8665eed940a1f18a6f617be4f1406e41a
amera/libcameraservice/camera3/Camera3OutputStream.cpp
e762be91c3280d837b1d48455cba90459ced7511 10-May-2013 Mathias Agopian <mathias@google.com> make libaudioflinger symbols visibility hidden

we export only symbols needed by clients of this library.
this saves about 130KB (1/3rd of the lib size)

Change-Id: Id81f3ecb299ee3abc0811915cf6efe87180bf15c
udioflinger/Android.mk
udioflinger/AudioFlinger.h
udioflinger/AudioPolicyService.h
udioflinger/AudioResampler.h
dfb6ca555f3b77baa3f18c4dbbc20c644778e60f 09-May-2013 Igor Murashkin <iam@google.com> am e0a4abca: am e464e15a: Merge "camera3: Manage fences properly when buffers are returned with an error" into jb-mr2-dev

* commit 'e0a4abcad6b7e9df99201e35a43b8a8878aa46f8':
camera3: Manage fences properly when buffers are returned with an error
bdf8f272d34c883755637bb08e4b9d2cd0384eb6 09-May-2013 Igor Murashkin <iam@google.com> am 12e66666: am 7fe6ac0d: Merge "camera2: Add height to the crop region metadata property" into jb-mr2-dev

* commit '12e666660a8ff9dabc5270a8d06b402481d97a14':
camera2: Add height to the crop region metadata property
7167849162e046606ffdbfa6a94fadd8f0518af2 09-May-2013 Eino-Ville Talvala <etalvala@google.com> resolved conflicts for merge of c077fc5d to master

Change-Id: Ic636aaf49ac81c070551f3ba9fc48cfa4932bec0
fcbf94b9407b28d5a5f1a14e822e8b9ee264b7d8 09-May-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Optimize a few YCbCr_420_888 copy paths

Covers cases where the HAL format and the API format have the same
chroma layout.

Bug: 8734880
Change-Id: Ia735082c260b5914fc14f12551f91917c4e53b01
amera/libcameraservice/camera2/CallbackProcessor.cpp
7e66ebc932b4cfa9b4611dffeeb1e91399deb442 09-May-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Optimize a few YCbCr_420_888 copy paths

Covers cases where the HAL format and the API format have the same
chroma layout.

Bug: 8734880
Change-Id: Ia735082c260b5914fc14f12551f91917c4e53b01
amera/libcameraservice/camera2/CallbackProcessor.cpp
9d75e9928f0fd49c4a0764ab71eb00636848c87a 09-May-2013 Igor Murashkin <iam@google.com> Merge "camera3: Manage fences properly when buffers are returned with an error" into jb-mr2-dev
e464e15a31bb57754a227f5058299160e6d47ebb 09-May-2013 Igor Murashkin <iam@google.com> Merge "camera3: Manage fences properly when buffers are returned with an error" into jb-mr2-dev
7fe6ac0de4b36f89a7f20dafb693e814344f9b4d 09-May-2013 Igor Murashkin <iam@google.com> Merge "camera2: Add height to the crop region metadata property" into jb-mr2-dev
714e392037834a1d183609745e69d3cfc2d26985 09-May-2013 Igor Murashkin <iam@google.com> Merge "camera2: Add height to the crop region metadata property" into jb-mr2-dev
19cb41fbee0218c51345844a59437ee8c087c970 09-May-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Support flexible YUV for preview callbacks" into jb-mr2-dev
8513c5ef44428229fc43d4c0fe3f31f0ff79ed41 09-May-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Support flexible YUV for preview callbacks" into jb-mr2-dev
d354abf5658a9da89762e09ae46404ab6b1c9bae 09-May-2013 Igor Murashkin <iam@google.com> am a790258a: am a5751c3a: Merge "Camera: Hotplug - conditionally transition to PRESENT when clients disconnect" into jb-mr2-dev

* commit 'a790258aa5061a18ef455061de914c025fa86ded':
Camera: Hotplug - conditionally transition to PRESENT when clients disconnect
5a1798ad24c73212c6614cf9f11de5fa86a20148 07-May-2013 Igor Murashkin <iam@google.com> camera3: Manage fences properly when buffers are returned with an error

Bug: 8622089
Change-Id: I4df0258d6803d460d4dd98f0a80829eb844ca30d
amera/libcameraservice/camera3/Camera3OutputStream.cpp
amera/libcameraservice/camera3/Camera3ZslStream.cpp
df2c8bfd48b687bfefacc9167c5dbc66b20f5e91 07-May-2013 Igor Murashkin <iam@google.com> camera3: Manage fences properly when buffers are returned with an error

Bug: 8622089
Change-Id: I4df0258d6803d460d4dd98f0a80829eb844ca30d
amera/libcameraservice/camera3/Camera3OutputStream.cpp
amera/libcameraservice/camera3/Camera3ZslStream.cpp
a5751c3ade37923ef7b36c53c36bb55ef7076a3b 08-May-2013 Igor Murashkin <iam@google.com> Merge "Camera: Hotplug - conditionally transition to PRESENT when clients disconnect" into jb-mr2-dev
a281c960b27eff06e3f4a57d1057c38dad18fff5 08-May-2013 Igor Murashkin <iam@google.com> Merge "Camera: Hotplug - conditionally transition to PRESENT when clients disconnect" into jb-mr2-dev
4ad015003cbab4ee6889b803225648c76a156193 07-May-2013 Alex Ray <aray@google.com> Camera2: FoV quirk crop regions

Bug: 8484377
Change-Id: I5ffcc20b68dc92b502acc9898e57f12cadb92848
amera/libcameraservice/camera2/Parameters.cpp
c3624cbf410c8915a103fcb3dacaab583badcfe0 07-May-2013 Alex Ray <aray@google.com> Camera2: FoV quirk crop regions

Bug: 8484377
Change-Id: I5ffcc20b68dc92b502acc9898e57f12cadb92848
amera/libcameraservice/camera2/Parameters.cpp
05bbae99e0fc30ffdef8a3c5037fb3db7c55211b 07-May-2013 Igor Murashkin <iam@google.com> camera2: Add height to the crop region metadata property

Bug: 8756080
Change-Id: I90b9166440e92f7675255a01ddc4a980c2e52201
amera/libcameraservice/camera2/Parameters.cpp
be53a80f4e50921790aa7c5eb12b798b988232b6 07-May-2013 Igor Murashkin <iam@google.com> camera2: Add height to the crop region metadata property

Bug: 8756080
Change-Id: I90b9166440e92f7675255a01ddc4a980c2e52201
amera/libcameraservice/camera2/Parameters.cpp
4a66ad403b21a256773c719ae39f7b5e705b244e 05-May-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Support flexible YUV for preview callbacks

When the HAL supports it, and the client asks for YV12 or NV21,
use the new flexible YUV format instead.

Bug: 8734880

Change-Id: Ib0129d9c26a6b30f3be7aa624c2439c6edba1bbd
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/CallbackProcessor.h
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
92086e6d402dcad6e199325ef097d7707b3d1f83 05-May-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Support flexible YUV for preview callbacks

When the HAL supports it, and the client asks for YV12 or NV21,
use the new flexible YUV format instead.

Bug: 8734880

Change-Id: Ib0129d9c26a6b30f3be7aa624c2439c6edba1bbd
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/CallbackProcessor.h
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
106fbe30bb586242fb41c9bd4202eb8141d9ba65 07-May-2013 Glenn Kasten <gkasten@google.com> am 7fd56aba: am 831a0055: Fix Audioflinger crash when TeeSink is enabled

* commit '7fd56aba56e5508ceb9e3f1f88e16f964555895c':
Fix Audioflinger crash when TeeSink is enabled
831a0055665c3d15ff9c99ad23e5ab2b7346f2ac 07-May-2013 Glenn Kasten <gkasten@google.com> Fix Audioflinger crash when TeeSink is enabled

Bug: 8834855
Change-Id: I54665f16d79901970348a8247d9a354da2990f42
udioflinger/AudioFlinger.h
84e391686d7eced293913d1d7993721224ee0ba1 07-May-2013 Glenn Kasten <gkasten@google.com> Fix Audioflinger crash when TeeSink is enabled

Bug: 8834855
Change-Id: I54665f16d79901970348a8247d9a354da2990f42
udioflinger/AudioFlinger.h
13320af823b7e539af13f66cb0fa4654cbae6beb 07-May-2013 Igor Murashkin <iam@google.com> am 41348da3: am ef33d308: Merge "camera3: Don\'t eagerly finish configuring bidi streams more than once" into jb-mr2-dev

* commit '41348da3a614bca05e7a4f6c96b0a91d7df924fe':
camera3: Don't eagerly finish configuring bidi streams more than once
ef33d3085fd5ac92e90af80a9fca729daa001eca 06-May-2013 Igor Murashkin <iam@google.com> Merge "camera3: Don't eagerly finish configuring bidi streams more than once" into jb-mr2-dev
41af583462d06aeac417567d08d10d21a484aa00 06-May-2013 Igor Murashkin <iam@google.com> Merge "camera3: Don't eagerly finish configuring bidi streams more than once" into jb-mr2-dev
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
4170f515cd6148b952a07fcbe23364f5c76a2d9c 03-May-2013 Eric Laurent <elaurent@google.com> Merge "Remove timing jitter during startup of audio" into jb-mr2-dev
a6560120f96685d7929d535319198485d1d5ccdf 03-May-2013 Eric Laurent <elaurent@google.com> Merge "Remove timing jitter during startup of audio" into jb-mr2-dev
93747b9c7724f690b3068300514c05629e0b0a3e 02-May-2013 Igor Murashkin <iam@google.com> Camera: Hotplug - conditionally transition to PRESENT when clients disconnect

Fixes an issue where a client could unconditionally transition to PRESENT
after a client disconnects, even though the underlying HAL status was actually
NOT_PRESENT or ENUMERATING.

Bug: 8780114
Change-Id: I68adb5fc819eec3b046ddcb2507b84bedc999a0f
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
f6adf0eaa9b1035540b5f68555c307983b631a6f 02-May-2013 Igor Murashkin <iam@google.com> Camera: Hotplug - conditionally transition to PRESENT when clients disconnect

Fixes an issue where a client could unconditionally transition to PRESENT
after a client disconnects, even though the underlying HAL status was actually
NOT_PRESENT or ENUMERATING.

Bug: 8780114
Change-Id: I68adb5fc819eec3b046ddcb2507b84bedc999a0f
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
b0864b6a20dc2e72bd6d08ad3c06f0fa5cef92e0 03-May-2013 Igor Murashkin <iam@google.com> am f9539bb7: am 2628bc9d: Merge "camera3: Don\'t crash when taking a still capture with ZSL disabled" into jb-mr2-dev

* commit 'f9539bb75101b85033eb45fd283b3fa40eaa8c98':
camera3: Don't crash when taking a still capture with ZSL disabled
2628bc9d1261c2942f3506baca348ccd71ea9c86 03-May-2013 Igor Murashkin <iam@google.com> Merge "camera3: Don't crash when taking a still capture with ZSL disabled" into jb-mr2-dev
98e099aca2089decdf3486ae216c89766cc252f2 03-May-2013 Igor Murashkin <iam@google.com> Merge "camera3: Don't crash when taking a still capture with ZSL disabled" into jb-mr2-dev
0b918674b971c111b8cba322aad5848a6d53a913 02-May-2013 Igor Murashkin <iam@google.com> camera3: Don't eagerly finish configuring bidi streams more than once

Finishing all stream configuration immediately is good, but when a stream is
both input and output it attempted to finish configuring bidi streams twice.
Since all ZSL streams are bidi, when we had a ZSL stream active preview would
immediately stop working.

Bug: 8563838
Change-Id: Iec998f11f6405fc15f3f31bd7cd29f03a7968d14
amera/libcameraservice/Camera3Device.cpp
073f8570d8404b6d1ea3a1bd34954c6332ba991a 02-May-2013 Igor Murashkin <iam@google.com> camera3: Don't eagerly finish configuring bidi streams more than once

Finishing all stream configuration immediately is good, but when a stream is
both input and output it attempted to finish configuring bidi streams twice.
Since all ZSL streams are bidi, when we had a ZSL stream active preview would
immediately stop working.

Bug: 8563838
Change-Id: Iec998f11f6405fc15f3f31bd7cd29f03a7968d14
amera/libcameraservice/Camera3Device.cpp
fe98d7cabf689784fe804fb8fdc2908b3cf83aa9 02-May-2013 Eino-Ville Talvala <etalvala@google.com> am 86150f33: am a69f3213: Merge "Camera2/3: Fix still image FOV reporting." into jb-mr2-dev

* commit '86150f33380a93cbc0d1554f5bcd0af2d3ebf246':
Camera2/3: Fix still image FOV reporting.
a69f3213d122b09d04fb890efd6dbe87a8df4ecc 02-May-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2/3: Fix still image FOV reporting." into jb-mr2-dev
e0b121bd312dc4c238cca5d9b48192c1b4cd53c1 02-May-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2/3: Fix still image FOV reporting." into jb-mr2-dev
768b7d07e8c660d7b42b0f6b76da275821ee0adb 02-May-2013 Igor Murashkin <iam@google.com> camera3: Don't crash when taking a still capture with ZSL disabled

Bug: 8790212
Change-Id: I4bf7ac5ab856b0ea1738844182efb86137e14083
amera/libcameraservice/camera2/ZslProcessor3.cpp
61675c0a7b5d88d5f525b1a1926fab6a7b2c7904 02-May-2013 Igor Murashkin <iam@google.com> camera3: Don't crash when taking a still capture with ZSL disabled

Bug: 8790212
Change-Id: I4bf7ac5ab856b0ea1738844182efb86137e14083
amera/libcameraservice/camera2/ZslProcessor3.cpp
1f1872f1e1f3705e235ce784ce6d79102d26c117 29-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Fix still image FOV reporting.

Still FOV can vary as a function of the output sizes, with
the function depending on the HAL version.

Calculate and update the FOV whenever the output sizes might change.

Bug: 8484377
Change-Id: I56f2cc768a1e128a159b326588be55b2752db06e
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
a1220f482f5a50488777ab789abd861b5565acdc 29-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Fix still image FOV reporting.

Still FOV can vary as a function of the output sizes, with
the function depending on the HAL version.

Calculate and update the FOV whenever the output sizes might change.

Bug: 8484377
Change-Id: I56f2cc768a1e128a159b326588be55b2752db06e
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
7d710e1fb373d338a166560abdb90fde0c0213ef 01-May-2013 Igor Murashkin <iam@google.com> am 1931e9b9: am 3c7c39af: Merge "Camera3: Add missing buffer listener include (for ZSL)" into jb-mr2-dev

* commit '1931e9b9e5ff613f3c45f298e30d717b4a2b15a5':
Camera3: Add missing buffer listener include (for ZSL)
3c7c39afbc8931ef2cec1bed3c477a19c139f87e 01-May-2013 Igor Murashkin <iam@google.com> Merge "Camera3: Add missing buffer listener include (for ZSL)" into jb-mr2-dev
197b11755575a0ff65b5bf19523972ca5b39bf22 01-May-2013 Igor Murashkin <iam@google.com> Merge "Camera3: Add missing buffer listener include (for ZSL)" into jb-mr2-dev
eb10919cd3c8c26b0b9c09f933d152248ac3a666 01-May-2013 Igor Murashkin <iam@google.com> Camera3: Add missing buffer listener include (for ZSL)

Bug: 8563838
Change-Id: Ie053655f5583d20003abdabccee68980d7cdcbfd
amera/libcameraservice/camera3/Camera3StreamBufferListener.h
1dbcd935994dc5067bb2f16101f0f2ad6c9c1e1d 01-May-2013 Igor Murashkin <iam@google.com> Camera3: Add missing buffer listener include (for ZSL)

Bug: 8563838
Change-Id: Ie053655f5583d20003abdabccee68980d7cdcbfd
amera/libcameraservice/camera3/Camera3StreamBufferListener.h
bfbe189e1052fe44f668efedb8eca6c9b3c9abaf 01-May-2013 Igor Murashkin <iam@google.com> am 7a0f7d9f: am d24b0653: Merge changes I2feda142,I5a95e0be,Ia0c21ef0 into jb-mr2-dev

* commit '7a0f7d9f6cdad84e4b5f6c6b164874393d541824':
Camera3: Add ZSL stream support
camera: Add new RingBufferConsumer to keep a ring buffer of acquired frames
Camera3: Add input stream support
d24b0653c7620e07e92308c05b41f7df9943f83b 01-May-2013 Igor Murashkin <iam@google.com> Merge changes I2feda142,I5a95e0be,Ia0c21ef0 into jb-mr2-dev

* changes:
Camera3: Add ZSL stream support
camera: Add new RingBufferConsumer to keep a ring buffer of acquired frames
Camera3: Add input stream support
75b61342bd47ed27ce0d8bf8f59ddaf8f6b73b19 01-May-2013 Igor Murashkin <iam@google.com> Merge changes I2feda142,I5a95e0be,Ia0c21ef0 into jb-mr2-dev

* changes:
Camera3: Add ZSL stream support
camera: Add new RingBufferConsumer to keep a ring buffer of acquired frames
Camera3: Add input stream support
ef052a9a7ca79340086bf636e536fb6420f5c2ac 01-May-2013 Igor Murashkin <iam@google.com> am 6feba7db: am d8c7ad1c: Camera: Don\'t complain repeatedly about missing android.led.availableLeds

* commit '6feba7db1144dc383de22a521854d7e983c700fb':
Camera: Don't complain repeatedly about missing android.led.availableLeds
d8c7ad1cbc2e6830560a085380a5828cc3d41010 30-Apr-2013 Igor Murashkin <iam@google.com> Camera: Don't complain repeatedly about missing android.led.availableLeds

Bug: 8765726
Change-Id: I78f5f98315068aaad3a39d56698b9c8a18cc8f4a
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
37b2602761cbfc20f8a36e27eb4cf1b3dfd04e6b 30-Apr-2013 Igor Murashkin <iam@google.com> Camera: Don't complain repeatedly about missing android.led.availableLeds

Bug: 8765726
Change-Id: I78f5f98315068aaad3a39d56698b9c8a18cc8f4a
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
4e2a359b7c4f0255f8323c379d6f85e6f210cbbc 29-Apr-2013 Igor Murashkin <iam@google.com> am ce68884d: am b7e2ef14: Merge "ProCamera: Add security permission checks for disabling transmit LED" into jb-mr2-dev

* commit 'ce68884da85fdc148756c0b233366b17507e72de':
ProCamera: Add security permission checks for disabling transmit LED
60f11be60f84e79f69e597d158a775c1294e75e9 29-Apr-2013 Eino-Ville Talvala <etalvala@google.com> resolved conflicts for merge of c853784d to master

Change-Id: I8aecc3c4c533a0444ee5c696f05b5c48ac077dbf
ae500e53efa1d26eb7c13e62d0ecc8d75db2473a 22-Apr-2013 Igor Murashkin <iam@google.com> Camera3: Add ZSL stream support

Bug: 8563838

Change-Id: I2feda142ff5172aba17ade5c8d502f9bb5d5b766
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/Camera3Device.h
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/CaptureSequencer.h
amera/libcameraservice/camera2/ZslProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.h
amera/libcameraservice/camera2/ZslProcessor3.cpp
amera/libcameraservice/camera2/ZslProcessor3.h
amera/libcameraservice/camera2/ZslProcessorInterface.h
amera/libcameraservice/camera3/Camera3OutputStream.h
amera/libcameraservice/camera3/Camera3OutputStreamInterface.h
amera/libcameraservice/camera3/Camera3Stream.cpp
amera/libcameraservice/camera3/Camera3Stream.h
amera/libcameraservice/camera3/Camera3StreamInterface.h
amera/libcameraservice/camera3/Camera3ZslStream.cpp
amera/libcameraservice/camera3/Camera3ZslStream.h
2fba584544e8687b526e3388bf7160b696da1dba 22-Apr-2013 Igor Murashkin <iam@google.com> Camera3: Add ZSL stream support

Bug: 8563838

Change-Id: I2feda142ff5172aba17ade5c8d502f9bb5d5b766
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/Camera3Device.h
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/CaptureSequencer.h
amera/libcameraservice/camera2/ZslProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.h
amera/libcameraservice/camera2/ZslProcessor3.cpp
amera/libcameraservice/camera2/ZslProcessor3.h
amera/libcameraservice/camera2/ZslProcessorInterface.h
amera/libcameraservice/camera3/Camera3OutputStream.h
amera/libcameraservice/camera3/Camera3OutputStreamInterface.h
amera/libcameraservice/camera3/Camera3Stream.cpp
amera/libcameraservice/camera3/Camera3Stream.h
amera/libcameraservice/camera3/Camera3StreamInterface.h
amera/libcameraservice/camera3/Camera3ZslStream.cpp
amera/libcameraservice/camera3/Camera3ZslStream.h
40602741ae87e6bf368c17dd28db4d2db344bded 29-Apr-2013 Igor Murashkin <iam@google.com> camera: Add new RingBufferConsumer to keep a ring buffer of acquired frames

Bug: 8563838
Change-Id: I5a95e0be94e5388b30639905efae42d3c3279f72
amera/libcameraservice/Android.mk
amera/libcameraservice/gui/RingBufferConsumer.cpp
amera/libcameraservice/gui/RingBufferConsumer.h
d4d5227521a53dec6f77bed33846b4ccd4a760e4 29-Apr-2013 Igor Murashkin <iam@google.com> camera: Add new RingBufferConsumer to keep a ring buffer of acquired frames

Bug: 8563838
Change-Id: I5a95e0be94e5388b30639905efae42d3c3279f72
amera/libcameraservice/Android.mk
amera/libcameraservice/gui/RingBufferConsumer.cpp
amera/libcameraservice/gui/RingBufferConsumer.h
b7e2ef14a93974935783e71829f4b3174001a0fb 27-Apr-2013 Igor Murashkin <iam@google.com> Merge "ProCamera: Add security permission checks for disabling transmit LED" into jb-mr2-dev
948700612e987b49185f7916befd38f39a2b0a3b 27-Apr-2013 Igor Murashkin <iam@google.com> Merge "ProCamera: Add security permission checks for disabling transmit LED" into jb-mr2-dev
a307beb68ac08d59525bbcb37ffb56bb3d4728c9 27-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Fix deadlock on shutdown due to client getting killed." into jb-mr2-dev
7081533bea68a71014d708776d0c384c45321ec5 27-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Fix deadlock on shutdown due to client getting killed." into jb-mr2-dev
0776a14513300f04dc5c1d2f89c4156576b8b8ed 15-Apr-2013 Igor Murashkin <iam@google.com> Camera3: Add input stream support

- Untested with actual CAMERA3_STREAM_INPUT streams.

Bug: 8629088

Change-Id: Ia0c21ef0a2c951e401ea8babd15d3cceb4bb25a1
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/Camera3Device.h
amera/libcameraservice/camera3/Camera3InputStream.cpp
amera/libcameraservice/camera3/Camera3InputStream.h
amera/libcameraservice/camera3/Camera3OutputStream.cpp
amera/libcameraservice/camera3/Camera3Stream.cpp
amera/libcameraservice/camera3/Camera3Stream.h
5a269fa72b419e7fe4bf6bf9b27eec8782b3a963 15-Apr-2013 Igor Murashkin <iam@google.com> Camera3: Add input stream support

- Untested with actual CAMERA3_STREAM_INPUT streams.

Bug: 8629088

Change-Id: Ia0c21ef0a2c951e401ea8babd15d3cceb4bb25a1
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/Camera3Device.h
amera/libcameraservice/camera3/Camera3InputStream.cpp
amera/libcameraservice/camera3/Camera3InputStream.h
amera/libcameraservice/camera3/Camera3OutputStream.cpp
amera/libcameraservice/camera3/Camera3Stream.cpp
amera/libcameraservice/camera3/Camera3Stream.h
d09801b99503b57c35e321ad9afa7e861e012813 24-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix deadlock on shutdown due to client getting killed.

When the binder connection dies and is the only holder of a strong
pointer to the Camera2Client, disconnect is called from the
destructor. At this point, all weak pointers to Camera2Client are no
longer promotable, and lots of cleanup code paths are broken as a
result.

Rework all such code paths to not need the client pointer, and to
discard image buffers that arrive during shutdown.

Bug: 8696047
Change-Id: Ic0672ecde7c1baaf65079f925a45bd5be45f1fb3
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/CallbackProcessor.h
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/JpegProcessor.h
amera/libcameraservice/camera2/StreamingProcessor.cpp
amera/libcameraservice/camera2/StreamingProcessor.h
amera/libcameraservice/camera2/ZslProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.h
02f8457cf788e09e4f0c302dda453f13293009e7 24-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix deadlock on shutdown due to client getting killed.

When the binder connection dies and is the only holder of a strong
pointer to the Camera2Client, disconnect is called from the
destructor. At this point, all weak pointers to Camera2Client are no
longer promotable, and lots of cleanup code paths are broken as a
result.

Rework all such code paths to not need the client pointer, and to
discard image buffers that arrive during shutdown.

Bug: 8696047
Change-Id: Ic0672ecde7c1baaf65079f925a45bd5be45f1fb3
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/CallbackProcessor.h
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/JpegProcessor.h
amera/libcameraservice/camera2/StreamingProcessor.cpp
amera/libcameraservice/camera2/StreamingProcessor.h
amera/libcameraservice/camera2/ZslProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.h
ab5254653ea9f3886487144e76173c0b6a00f3e1 26-Apr-2013 Eric Laurent <elaurent@google.com> am 4fcff885: am 8d2d4932: audioflinger: fix duplicating track sampling rate

* commit '4fcff8859393adce884ea958c66d471a4c36b55f':
audioflinger: fix duplicating track sampling rate
03ac850527ffb90348dcdaad95caceb97649fd6b 23-Apr-2013 Igor Murashkin <iam@google.com> ProCamera: Add security permission checks for disabling transmit LED

Bug: 8554573
Change-Id: Ie909908a4cab3700bd622282e8342e8fa5b72376
amera/libcameraservice/ProCamera2Client.cpp
amera/libcameraservice/ProCamera2Client.h
amera/libcameraservice/camera2/Parameters.cpp
b2d99929781e6c6c4aee41636aa5c6b6922b83de 23-Apr-2013 Igor Murashkin <iam@google.com> ProCamera: Add security permission checks for disabling transmit LED

Bug: 8554573
Change-Id: Ie909908a4cab3700bd622282e8342e8fa5b72376
amera/libcameraservice/ProCamera2Client.cpp
amera/libcameraservice/ProCamera2Client.h
amera/libcameraservice/camera2/Parameters.cpp
8d2d4932b96632e9eb3af4a3d4000192ef603960 25-Apr-2013 Eric Laurent <elaurent@google.com> audioflinger: fix duplicating track sampling rate

Add missing initialization of client proxy sampling rate
and volumes in OutputTrack constructor.

Bug: 8687522
Change-Id: I813e700315bb97083a63dd32279f1998ac775483
udioflinger/Tracks.cpp
c114c6509b7f552e76e55a3502e926436ccfb2d8 25-Apr-2013 Eric Laurent <elaurent@google.com> audioflinger: fix duplicating track sampling rate

Add missing initialization of client proxy sampling rate
and volumes in OutputTrack constructor.

Bug: 8687522
Change-Id: I813e700315bb97083a63dd32279f1998ac775483
udioflinger/Tracks.cpp
4e6139a522ee0fae9acad3e48d2b4158127a3bfa 24-Apr-2013 Eino-Ville Talvala <etalvala@google.com> am b524303e: am 5e437722: Merge "Camera3: Register all stream buffers at stream configuration time." into jb-mr2-dev

* commit 'b524303ec9c48377a3a47fb273e0017f8edec142':
Camera3: Register all stream buffers at stream configuration time.
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
udioflinger/FastMixer.cpp
udioflinger/ISchedulingPolicyService.cpp
udioflinger/ISchedulingPolicyService.h
udioflinger/SchedulingPolicyService.cpp
udioflinger/SchedulingPolicyService.h
udioflinger/Threads.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
udioflinger/FastMixer.cpp
udioflinger/ISchedulingPolicyService.cpp
udioflinger/ISchedulingPolicyService.h
udioflinger/SchedulingPolicyService.cpp
udioflinger/SchedulingPolicyService.h
udioflinger/Threads.cpp
cc8d4f8f280dfdcc76df4f18f63e7f9c21684455 20-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Register all stream buffers at stream configuration time.

While registering them later would be nice for startup time, current
hardware will have to reinitialize everything, resulting in glitches.

Bug: 8657740
Change-Id: I1ed1f0a65d648f219f5228c8df15ffcf2a4b272e
amera/libcameraservice/Camera3Device.cpp
4c95676d259f4449a7da5161dfd46c1d1f9498fe 20-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Register all stream buffers at stream configuration time.

While registering them later would be nice for startup time, current
hardware will have to reinitialize everything, resulting in glitches.

Bug: 8657740
Change-Id: I1ed1f0a65d648f219f5228c8df15ffcf2a4b272e
amera/libcameraservice/Camera3Device.cpp
22ce7101128e32648fc2178800baee0ba9a75a70 19-Apr-2013 Glenn Kasten <gkasten@google.com> am da013597: am 1de65a91: Merge "Fix error message to match CTS" into jb-mr2-dev

* commit 'da013597edcc4239ffac3af15990a170e6d2d812':
Fix error message to match CTS
63d7395ac108d3b908c3f5f2ee50567df21e564a 19-Apr-2013 Glenn Kasten <gkasten@google.com> am e3cf96cc: am dbe60357: Merge "Use correct pid when running under test harness" into jb-mr2-dev

* commit 'e3cf96ccbe200c4bd3d007eecd3ec83e4a0b5125':
Use correct pid when running under test harness
1de65a91b9d174b26b594073eb1ee0dcccb31819 19-Apr-2013 Glenn Kasten <gkasten@google.com> Merge "Fix error message to match CTS" into jb-mr2-dev
19c04c90478c4c5b8558a9b94713da148b4aa64c 19-Apr-2013 Glenn Kasten <gkasten@google.com> Merge "Fix error message to match CTS" into jb-mr2-dev
949a926cadbc961fbb649c91d76d7aee8ea4d7bd 16-Apr-2013 Glenn Kasten <gkasten@google.com> Use correct pid when running under test harness

This is a partial fix which addresses one of the root causes of this bug,
but only when running under test harness. It has no effect otherwise.

Bug: 8598539
Change-Id: I87444daef1d76b17544f331e651ba1c87893c381
udioflinger/AudioFlinger.cpp
udioflinger/ServiceUtilities.cpp
udioflinger/ServiceUtilities.h
727cc2d1b378844474c775e9f42dab672d603ae9 16-Apr-2013 Glenn Kasten <gkasten@google.com> Use correct pid when running under test harness

This is a partial fix which addresses one of the root causes of this bug,
but only when running under test harness. It has no effect otherwise.

Bug: 8598539
Change-Id: I87444daef1d76b17544f331e651ba1c87893c381
udioflinger/AudioFlinger.cpp
udioflinger/ServiceUtilities.cpp
udioflinger/ServiceUtilities.h
5051b5303155d65c92da9d81135fe7832742ae59 19-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Add preview callback surface support"
5ea77ae380a7ad9268fdbda1d7d3aa14b5839065 19-Apr-2013 Glenn Kasten <gkasten@google.com> Fix error message to match CTS

Bug: 8657725
Change-Id: Ib608eb55f14d557d667f93e4f646c03d5ea470c1
edialog/MediaLogService.cpp
587af2e6fb54a8ada61d44a998885b1e4528a856 19-Apr-2013 Glenn Kasten <gkasten@google.com> Fix error message to match CTS

Bug: 8657725
Change-Id: Ib608eb55f14d557d667f93e4f646c03d5ea470c1
edialog/MediaLogService.cpp
3ee3550a2f529cbf56d87d8503f59a8f45dccf32 03-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Camera: Add preview callback surface support

- Add call to set a preview callback surface
- Implement support for HAL2/3 devices
- Still need HAL1 implementation

Change-Id: I0dc0bd72e43d871aa487858d1665c1efca633ffe
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/CameraClient.cpp
amera/libcameraservice/CameraClient.h
amera/libcameraservice/CameraService.h
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/CallbackProcessor.h
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
480721ea3a724875a9d7787f656eb0bb88be7700 16-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Allow multiple process_capture_result calls per request" into jb-mr2-dev
dc2024a80d2eec26afd906348dc52aaaf112d63f 16-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Allow multiple process_capture_result calls per request" into jb-mr2-dev
55137044fef6cb9dc4872fbbe963add28c4383a0 09-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Allow multiple process_capture_result calls per request

To simplify HAL implementation, allow the results for a single
capture request to be sent from the HAL across multiple calls
to process_capture_request.

This requires that the HAL must call notify() with the SHUTTER message
to indicate start of exposure time, before the first call to
process_capture_result for a given frame.

Bug: 8565103

Change-Id: I6a61449725f98af88769fafa07736848a226dad2
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/Camera3Device.h
42368d9308db27a47c9ac706f9b040fa269257a9 09-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Allow multiple process_capture_result calls per request

To simplify HAL implementation, allow the results for a single
capture request to be sent from the HAL across multiple calls
to process_capture_request.

This requires that the HAL must call notify() with the SHUTTER message
to indicate start of exposure time, before the first call to
process_capture_result for a given frame.

Bug: 8565103

Change-Id: I6a61449725f98af88769fafa07736848a226dad2
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/Camera3Device.h
5182337fcf848ca410ae61397752dfb0995067ef 15-Apr-2013 Glenn Kasten <gkasten@google.com> Merge "Workaround: requestPriority() is one-way" into jb-mr2-dev
a75003e583b7b317951ceca13e44f3fd226012c7 15-Apr-2013 Glenn Kasten <gkasten@google.com> Merge "Workaround: requestPriority() is one-way" into jb-mr2-dev
9a62391fa187a345a5d1301d4bc0b165c2ea4737 12-Apr-2013 Glenn Kasten <gkasten@google.com> Workaround: requestPriority() is one-way

Bug: 8565696
Change-Id: If5fcdf8593e1ca15bea45217bd683b43a2a106c7
udioflinger/ISchedulingPolicyService.cpp
8d480b86ec00396b37a22803fdfe5f7bef3d8e05 12-Apr-2013 Glenn Kasten <gkasten@google.com> Workaround: requestPriority() is one-way

Bug: 8565696
Change-Id: If5fcdf8593e1ca15bea45217bd683b43a2a106c7
udioflinger/ISchedulingPolicyService.cpp
cb42f317876ff42ed2b7de432b87d0486c385eb7 12-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Improve error logging" into jb-mr2-dev
30c90a56adf7709f2e735219a24a70c60bd1c882 12-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Improve error logging" into jb-mr2-dev
da0dc0af0effe9fbfb3ce3187c8472fca2baf3c6 10-Apr-2013 Ying Wang <wangying@google.com> Add liblog

Bug: 8580410
Change-Id: If493d87d60d71be664ad75b140c62acadb75b0d0
udioflinger/Android.mk
amera/libcameraservice/Android.mk
edialog/Android.mk
ecba7488c5cceaacef95836b1b476433451e7761 10-Apr-2013 Ying Wang <wangying@google.com> Add liblog

Bug: 8580410
Change-Id: If493d87d60d71be664ad75b140c62acadb75b0d0
udioflinger/Android.mk
amera/libcameraservice/Android.mk
edialog/Android.mk
13ec8c4eb54067a9c982ee141121d0ec8230348b 09-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Improve error logging

In preparation for supporting fragmented result calls.

Bug: 8565103
Change-Id: Id834637d7cbecf7b550333beedab3281b5400748
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/Camera3Device.h
b2058d19297e508133a66b033d29380924b5d267 09-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Improve error logging

In preparation for supporting fragmented result calls.

Bug: 8565103
Change-Id: Id834637d7cbecf7b550333beedab3281b5400748
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/Camera3Device.h
b3a95a56f0adaf2b60ff164275487d1870442734 02-Apr-2013 Igor Murashkin <iam@google.com> Camera: implement takePicture for HAL3-using clients

* Implements Camera2Device-style triggers by mutating the next request
* Implements Camera3Device::waitUntilRequestReceived

Change-Id: Ie0b5591158872513a0bffbfab33123cf18dacf8a
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/Camera3Device.h
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/JpegProcessor.h
4d2f2e8414df33337d4f09e5235719dfcc705674 02-Apr-2013 Igor Murashkin <iam@google.com> Camera: implement takePicture for HAL3-using clients

* Implements Camera2Device-style triggers by mutating the next request
* Implements Camera3Device::waitUntilRequestReceived

Change-Id: Ie0b5591158872513a0bffbfab33123cf18dacf8a
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/Camera3Device.h
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/JpegProcessor.h
d595b7c858c481a07745674ce2d8a6690e980e74 04-Apr-2013 Eric Laurent <elaurent@google.com> audioflinger: multiple tracks on direct output

Fix problems when multiple tracks exist on a direct output
thread: when multiple tracks are active, continue to update all
track states but only take into account the last track started
for audio HAL volume and mixer state control.

Bug 8388941

Change-Id: I57e6757286f41651dda99b11a5449e431812431b
udioflinger/Threads.cpp
7fd54ff906c69400727fc8e90118a8a0429d7ab2 04-Apr-2013 Eric Laurent <elaurent@google.com> audioflinger: multiple tracks on direct output

Fix problems when multiple tracks exist on a direct output
thread: when multiple tracks are active, continue to update all
track states but only take into account the last track started
for audio HAL volume and mixer state control.

Bug 8388941

Change-Id: I57e6757286f41651dda99b11a5449e431812431b
udioflinger/Threads.cpp
a9cbef06acb2a422474cbf292debc1f31fcf9c44 03-Apr-2013 Eric Laurent <elaurent@google.com> Merge "audioflinger: add effect config status check" into jb-mr2-dev
8344844311b852ea7321e914642bd9e57e0d5fb0 03-Apr-2013 Eric Laurent <elaurent@google.com> Merge "audioflinger: add effect config status check" into jb-mr2-dev
2a9c5cd47159c41051fe7b8366d8205a7d1d5296 03-Apr-2013 Eric Laurent <elaurent@google.com> audioflinger: add effect config status check

Check the result of the effect engine configuration command
and do not attempt to send parameters to, enable, or process
the effect if configuration fails.

Bug 8512027

Change-Id: I8c78a05d79fba36b1a387aa5cf2700612301ac91
udioflinger/Effects.cpp
d0ebb538599cc25726b856e0f5deeb8215db8c92 03-Apr-2013 Eric Laurent <elaurent@google.com> audioflinger: add effect config status check

Check the result of the effect engine configuration command
and do not attempt to send parameters to, enable, or process
the effect if configuration fails.

Bug 8512027

Change-Id: I8c78a05d79fba36b1a387aa5cf2700612301ac91
udioflinger/Effects.cpp
e09f486085c7e7f3de329db73ad6bb9899740dbe 03-Apr-2013 Igor Murashkin <iam@google.com> Camera3: Fix output stream creation for JPEG streams

Change-Id: Iadf85c103c21614abb1aeb69a832ca01919c2aa5
amera/libcameraservice/camera3/Camera3OutputStream.cpp
a55b545ef3d8624123efe0e04c2a7d3a30b56b48 03-Apr-2013 Igor Murashkin <iam@google.com> Camera3: Fix output stream creation for JPEG streams

Change-Id: Iadf85c103c21614abb1aeb69a832ca01919c2aa5
amera/libcameraservice/camera3/Camera3OutputStream.cpp
b7c9d61b9d398b272c8138a2c6aace069229ac03 02-Apr-2013 Igor Murashkin <iam@google.com> Camera3: Fix metadata result not being rewritten after capture

Generally this problem manifested itself as the Frame Count not being set,
which then errored out ProFrameProcessor with a "Success" error.

Change-Id: Ifa927f43d0ce92100651ad3f714099a2f1ec4c2a
amera/libcameraservice/Camera3Device.cpp
d2c90696403bb3c9e28d7b51d65c9468bdf8e78b 02-Apr-2013 Igor Murashkin <iam@google.com> Camera3: Fix metadata result not being rewritten after capture

Generally this problem manifested itself as the Frame Count not being set,
which then errored out ProFrameProcessor with a "Success" error.

Change-Id: Ifa927f43d0ce92100651ad3f714099a2f1ec4c2a
amera/libcameraservice/Camera3Device.cpp
d0158c38ad82c1c3033a6dd5806435def3727784 11-Mar-2013 Eino-Ville Talvala <etalvala@google.com> Camera: Add output side to camera3 HAL device

- Notifications
- Result queue and processing

Change-Id: Id6b4746708ce6c6dcc7262666b6ac3130fa3d225
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/Camera3Device.h
7d346fa448551703f98e8892ae7f4eb56675b92a 11-Mar-2013 Eino-Ville Talvala <etalvala@google.com> Camera: Add output side to camera3 HAL device

- Notifications
- Result queue and processing

Change-Id: Id6b4746708ce6c6dcc7262666b6ac3130fa3d225
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/Camera3Device.h
3b53bc9b41c262d22f094406e3751bc5a41ef2ef 28-Feb-2013 Eino-Ville Talvala <etalvala@google.com> Camera: Add input side to camera3 HAL device

- Stream creation/deletion
- Request submission
- Request thread loop
- Add get() to CameraMetadata to allow HAL submission while retaining
ownership.

Change-Id: I271f72bcbe9557eded43cbcbfe789109857f8144
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/Camera3Device.h
f76e027c43f531fc6f9287838b5c332236a4338a 28-Feb-2013 Eino-Ville Talvala <etalvala@google.com> Camera: Add input side to camera3 HAL device

- Stream creation/deletion
- Request submission
- Request thread loop
- Add get() to CameraMetadata to allow HAL submission while retaining
ownership.

Change-Id: I271f72bcbe9557eded43cbcbfe789109857f8144
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/Camera3Device.h
8be20f50711a94426f1394ec113672e41c1224e8 07-Mar-2013 Eino-Ville Talvala <etalvala@google.com> Camera: Add streams to camera3 HAL device

- Generic stream interface
- Functional output stream
- Skeleton input/zsl stream

Change-Id: I143794eac1a2217031d62b51912662fc6d1db900
amera/libcameraservice/Android.mk
amera/libcameraservice/camera3/Camera3InputStream.cpp
amera/libcameraservice/camera3/Camera3InputStream.h
amera/libcameraservice/camera3/Camera3OutputStream.cpp
amera/libcameraservice/camera3/Camera3OutputStream.h
amera/libcameraservice/camera3/Camera3Stream.cpp
amera/libcameraservice/camera3/Camera3Stream.h
amera/libcameraservice/camera3/Camera3ZslStream.cpp
amera/libcameraservice/camera3/Camera3ZslStream.h
fd58f1a10a749ca72fec1012920d6e94a664cd70 07-Mar-2013 Eino-Ville Talvala <etalvala@google.com> Camera: Add streams to camera3 HAL device

- Generic stream interface
- Functional output stream
- Skeleton input/zsl stream

Change-Id: I143794eac1a2217031d62b51912662fc6d1db900
amera/libcameraservice/Android.mk
amera/libcameraservice/camera3/Camera3InputStream.cpp
amera/libcameraservice/camera3/Camera3InputStream.h
amera/libcameraservice/camera3/Camera3OutputStream.cpp
amera/libcameraservice/camera3/Camera3OutputStream.h
amera/libcameraservice/camera3/Camera3Stream.cpp
amera/libcameraservice/camera3/Camera3Stream.h
amera/libcameraservice/camera3/Camera3ZslStream.cpp
amera/libcameraservice/camera3/Camera3ZslStream.h
ad065d38daace14281801127bd447114b7b4daa5 27-Mar-2013 Igor Murashkin <iam@google.com> Merge "Camera: Add hotplug support (for fixed # of cameras)" into jb-mr2-dev
8d012b56cbd49f33841c13aaa5b7b42020de82ed 27-Mar-2013 Igor Murashkin <iam@google.com> Merge "Camera: Add hotplug support (for fixed # of cameras)" into jb-mr2-dev
cba2c163555cd329f49d40658ea3ee902e94dda3 20-Mar-2013 Igor Murashkin <iam@google.com> Camera: Add hotplug support (for fixed # of cameras)

* Minor: also change addListener to fire the current status upon subscription
* Minor: STATUS_AVAILABLE is now an alias for STATUS_PRESENT and deprecated

Change-Id: I254608a7332095e3ef201ffea64cff156cfc1b3e
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
a36381479c5c546a01188390f1e0d2e280a3dbd8 20-Mar-2013 Igor Murashkin <iam@google.com> Camera: Add hotplug support (for fixed # of cameras)

* Minor: also change addListener to fire the current status upon subscription
* Minor: STATUS_AVAILABLE is now an alias for STATUS_PRESENT and deprecated

Change-Id: I254608a7332095e3ef201ffea64cff156cfc1b3e
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
bc5120797e0d2995b63a96306b638d1d0d8457d0 26-Mar-2013 Glenn Kasten <gkasten@google.com> media.log dump

Bug: 8446008
Change-Id: Ia47b204f5c4c91b99591eec5420a25a3dc8e7631
edialog/MediaLogService.cpp
4ee9962da3df1b4300eccdbd20910d82c5a61f63 26-Mar-2013 Glenn Kasten <gkasten@google.com> media.log dump

Bug: 8446008
Change-Id: Ia47b204f5c4c91b99591eec5420a25a3dc8e7631
edialog/MediaLogService.cpp
cc76ec941661206e3a3c53f9aff789c839a869bb 21-Mar-2013 Igor Murashkin <iam@google.com> Camera2: getSceneMode should return NULL when there are no supported scene modes

Bug: 8444806
Change-Id: Ic92924ceda3de738a7971605552baf00a4fc0546
amera/libcameraservice/camera2/Parameters.cpp
b08a63931f22a1e934b32e8fb8de9ab4877d5258 21-Mar-2013 Igor Murashkin <iam@google.com> Camera2: getSceneMode should return NULL when there are no supported scene modes

Bug: 8444806
Change-Id: Ic92924ceda3de738a7971605552baf00a4fc0546
amera/libcameraservice/camera2/Parameters.cpp
caf3a9c1447f602c658f558025b90413d1b4114d 21-Mar-2013 Ziv Hendel <ziv@primesense.com> commandStartFaceDetectionL returned the wrong value when face detection is not supported by the HAL.
This caused the JNI function to fail since it expected a BAD_VALUE response in that case.

Change-Id: I53107a3958d541c25930b81eda638d4b6a394254
Signed-off-by: Igor Murashkin <iam@google.com>
amera/libcameraservice/Camera2Client.cpp
ea49f4b4ba9d182fd8a74c74d16590cb65f3a5f1 21-Mar-2013 Ziv Hendel <ziv@primesense.com> commandStartFaceDetectionL returned the wrong value when face detection is not supported by the HAL.
This caused the JNI function to fail since it expected a BAD_VALUE response in that case.

Change-Id: I53107a3958d541c25930b81eda638d4b6a394254
Signed-off-by: Igor Murashkin <iam@google.com>
amera/libcameraservice/Camera2Client.cpp
c13c8bc609be74c89a23a4e3b396b807e59047f1 17-Mar-2013 Alex Ray <aray@google.com> Camera: fix waitUntilDrained log message

Change-Id: Iab6197e0674752de7933dd812bff430a5c487c4b
amera/libcameraservice/Camera2Device.cpp
f0eeb53e4763fe5063d3ce880f72d52f136fc3c5 17-Mar-2013 Alex Ray <aray@google.com> Camera: fix waitUntilDrained log message

Change-Id: Iab6197e0674752de7933dd812bff430a5c487c4b
amera/libcameraservice/Camera2Device.cpp
acd695c42749f8821b0a0cc27739ddf096c6d4e8 14-Mar-2013 Igor Murashkin <iam@google.com> ProCamera: Fix rare deadlock when client destructs inside the connect call

Bug: 8337737
Change-Id: Ia6fca4365fa20fdbfd6a1ec8d047639a002f2aba
amera/libcameraservice/CameraService.cpp
26bb1d3702e01779c5ef481c2ad38568d4cc2aa8 14-Mar-2013 Igor Murashkin <iam@google.com> ProCamera: Fix rare deadlock when client destructs inside the connect call

Bug: 8337737
Change-Id: Ia6fca4365fa20fdbfd6a1ec8d047639a002f2aba
amera/libcameraservice/CameraService.cpp
3eca0ac4428aa74f197a2a498d84490c4e30f11d 13-Mar-2013 Mathias Agopian <mathias@google.com> remove CameraServiceTest which wasn't used

this test hasn't been compiled or run in a long long time
and isn't up to date or relevant.

Change-Id: I5a7f1190d4a783e088d44e3e6ef66231cf0cfb49
amera/tests/CameraServiceTest/Android.mk
amera/tests/CameraServiceTest/CameraServiceTest.cpp
amera/tests/CameraServiceTest/MODULE_LICENSE_APACHE2
amera/tests/CameraServiceTest/NOTICE
b05526fc3c0ccc9f9310830074e863212af433e0 13-Mar-2013 Mathias Agopian <mathias@google.com> remove CameraServiceTest which wasn't used

this test hasn't been compiled or run in a long long time
and isn't up to date or relevant.

Change-Id: I5a7f1190d4a783e088d44e3e6ef66231cf0cfb49
amera/tests/CameraServiceTest/Android.mk
amera/tests/CameraServiceTest/CameraServiceTest.cpp
amera/tests/CameraServiceTest/MODULE_LICENSE_APACHE2
amera/tests/CameraServiceTest/NOTICE
e6800cea0678dbc0bf697b44c3e4548b0253085c 05-Mar-2013 Igor Murashkin <iam@google.com> Camera: Make ProCamera connect take the same paths as Camera connect

* ProCamera uses the app ops manager
* Refactored connect calls to be as common as possible
* Removed some useless not implemented function calls in ProClient

Change-Id: I5dab30d20f0c202a494a07b2cfe4c1fa04a2a076
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2ClientBase.cpp
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
9ab909bff49b2eccde1b028901717c193ef723af 05-Mar-2013 Igor Murashkin <iam@google.com> Camera: Make ProCamera connect take the same paths as Camera connect

* ProCamera uses the app ops manager
* Refactored connect calls to be as common as possible
* Removed some useless not implemented function calls in ProClient

Change-Id: I5dab30d20f0c202a494a07b2cfe4c1fa04a2a076
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2ClientBase.cpp
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
fa4cf9d310685b4c25877cba772ff7da84caf517 05-Mar-2013 Igor Murashkin <iam@google.com> (Camera)ProCamera: Remove unused functions from binder interface

Change-Id: I0582268cef6e84b630bc87c8a03dcd69d54c440d
amera/libcameraservice/ProCamera2Client.cpp
amera/libcameraservice/ProCamera2Client.h
7cf9a7e7d19579565e0f9dba8be9c107f2dbf548 05-Mar-2013 Igor Murashkin <iam@google.com> (Camera)ProCamera: Remove unused functions from binder interface

Change-Id: I0582268cef6e84b630bc87c8a03dcd69d54c440d
amera/libcameraservice/ProCamera2Client.cpp
amera/libcameraservice/ProCamera2Client.h
ce124da179775a81ad7dcc3f33315eca451e66f2 04-Mar-2013 Igor Murashkin <iam@google.com> (Camera)FrameProcessor: Refactor to share code with ProFrameProcessor

Change-Id: Ie8cd0df7caf83f9d0134f560ae31ab72f2f7d1fc
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/Camera3Device.h
amera/libcameraservice/CameraDeviceBase.h
amera/libcameraservice/ProCamera2Client.cpp
amera/libcameraservice/camera2/FrameProcessor.cpp
amera/libcameraservice/camera2/FrameProcessor.h
amera/libcameraservice/camera2/ProFrameProcessor.cpp
amera/libcameraservice/camera2/ProFrameProcessor.h
71381051e2d048b2705c447b3d59db6e972493ee 04-Mar-2013 Igor Murashkin <iam@google.com> (Camera)FrameProcessor: Refactor to share code with ProFrameProcessor

Change-Id: Ie8cd0df7caf83f9d0134f560ae31ab72f2f7d1fc
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/Camera3Device.h
amera/libcameraservice/CameraDeviceBase.h
amera/libcameraservice/ProCamera2Client.cpp
amera/libcameraservice/camera2/FrameProcessor.cpp
amera/libcameraservice/camera2/FrameProcessor.h
amera/libcameraservice/camera2/ProFrameProcessor.cpp
amera/libcameraservice/camera2/ProFrameProcessor.h
44cfcf00b9008c1c04f4c8277c6c06af039fd976 02-Mar-2013 Igor Murashkin <iam@google.com> CameraService: Refactor Camera2Client to share a base with ProCameraClient

Change-Id: I249e2a0fc47ae84f29c9d9c4a223fba13da3ee66
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2ClientBase.cpp
amera/libcameraservice/Camera2ClientBase.h
amera/libcameraservice/CameraClient.cpp
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/ProCamera2Client.cpp
amera/libcameraservice/ProCamera2Client.h
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/FrameProcessor.cpp
amera/libcameraservice/camera2/ProFrameProcessor.cpp
amera/libcameraservice/camera2/StreamingProcessor.cpp
a2e203bdb911bd5595723651d06ad91c330a7873 02-Mar-2013 Igor Murashkin <iam@google.com> CameraService: Refactor Camera2Client to share a base with ProCameraClient

Change-Id: I249e2a0fc47ae84f29c9d9c4a223fba13da3ee66
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2ClientBase.cpp
amera/libcameraservice/Camera2ClientBase.h
amera/libcameraservice/CameraClient.cpp
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/ProCamera2Client.cpp
amera/libcameraservice/ProCamera2Client.h
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/FrameProcessor.cpp
amera/libcameraservice/camera2/ProFrameProcessor.cpp
amera/libcameraservice/camera2/StreamingProcessor.cpp
0d35f7818dedd67844cc90218d5c131a8644f802 11-Mar-2013 Glenn Kasten <gkasten@google.com> Increase size of statistics buffer

Bug: 8354576
Change-Id: I327e9dc203e09df8abc21e589ce9056540618abd
udioflinger/FastMixer.h
75d1ef97d9799061be9631b08b56592a7cea6013 11-Mar-2013 Glenn Kasten <gkasten@google.com> Increase size of statistics buffer

Bug: 8354576
Change-Id: I327e9dc203e09df8abc21e589ce9056540618abd
udioflinger/FastMixer.h
910403e064d37bd7f135f7de0cd3c64c5fa417c8 07-Mar-2013 Alex Ray <aray@google.com> Camera: Log warning on out-of-range face detect scores

Bug: 7368364
Change-Id: I7b1e995dd15e87c816b89ccf9968a222fd66d140
amera/libcameraservice/camera2/FrameProcessor.cpp
36185a4b38d43b712dc9790513b8ef5637aab004 07-Mar-2013 Alex Ray <aray@google.com> Camera: Log warning on out-of-range face detect scores

Bug: 7368364
Change-Id: I7b1e995dd15e87c816b89ccf9968a222fd66d140
amera/libcameraservice/camera2/FrameProcessor.cpp
5c4cc0d99d3b1cb35c5d7c237272ee53142745fb 26-Nov-2012 Glenn Kasten <gkasten@google.com> Add template class SingleStateQueue

Change-Id: If7e2bc9b2a216524ee9cbb68682e2634933b4973
udioflinger/Android.mk
538f498bbd5a2da51c9037a2689afc97f8bded8f 26-Nov-2012 Glenn Kasten <gkasten@google.com> Add template class SingleStateQueue

Change-Id: If7e2bc9b2a216524ee9cbb68682e2634933b4973
udioflinger/Android.mk
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
udioflinger/AudioFlinger.cpp
udioflinger/FastMixer.cpp
udioflinger/PlaybackTracks.h
udioflinger/Threads.cpp
udioflinger/TrackBase.h
udioflinger/Tracks.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
udioflinger/AudioFlinger.cpp
udioflinger/FastMixer.cpp
udioflinger/PlaybackTracks.h
udioflinger/Threads.cpp
udioflinger/TrackBase.h
udioflinger/Tracks.cpp
bf04b5860182d8f4130dcb5d6d88ee68a58c99cd 02-Mar-2013 Glenn Kasten <gkasten@google.com> Merge "media.log cleanup" into jb-mr2-dev
10774e144b3c99afad9a5070ccf50fdb12b5fb4e 02-Mar-2013 Glenn Kasten <gkasten@google.com> Merge "media.log cleanup" into jb-mr2-dev
ab7d72f0804fbb7e91ad9d2a16f826d97e20e5d0 27-Feb-2013 Glenn Kasten <gkasten@google.com> media.log cleanup

Remove almost all of the specific logs, but leave the media.log
logging infrastructure in place for the next time we need it.

Re-apply a few good changes that were reverted earlier:
- check logf format vs. argument list compatibility
- distinguish potentially modified and actually modified tracks in FastMixer
- fix benign bug where sq->end() was called more than once
- fix a build warning

Bug: 6490974
Change-Id: I02d3e83646c738acaebb415bd0d6b548638b4ef5
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/FastMixer.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
d3c4b134a87b96227b90b9ec052d8a6e9880bbdf 27-Feb-2013 Glenn Kasten <gkasten@google.com> media.log cleanup

Remove almost all of the specific logs, but leave the media.log
logging infrastructure in place for the next time we need it.

Re-apply a few good changes that were reverted earlier:
- check logf format vs. argument list compatibility
- distinguish potentially modified and actually modified tracks in FastMixer
- fix benign bug where sq->end() was called more than once
- fix a build warning

Bug: 6490974
Change-Id: I02d3e83646c738acaebb415bd0d6b548638b4ef5
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/FastMixer.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
487422017767078980bc7435f05ea2b58601b6f4 01-Mar-2013 Glenn Kasten <gkasten@google.com> Merge "Remove tee sink debugging at compile time" into jb-mr2-dev
5324bb2889c34cb85849ff1302215751a32c6a0d 01-Mar-2013 Glenn Kasten <gkasten@google.com> Merge "Remove tee sink debugging at compile time" into jb-mr2-dev
bfc9915f482520eb9676c6d2dbf7f1ac078d937d 27-Feb-2013 Igor Murashkin <iam@google.com> Camera: Drop ProCamera connections when a Camera connection happens

* Also adds an ICameraServiceListener with available/not available statuses

Bug: 8291653
Change-Id: I24680f1a2dc109510caf451cf7c7bd180b670d84
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/ProCamera2Client.cpp
amera/libcameraservice/ProCamera2Client.h
8fdfbe27acd157d58fa35a849ec50c82464062f0 27-Feb-2013 Igor Murashkin <iam@google.com> Camera: Drop ProCamera connections when a Camera connection happens

* Also adds an ICameraServiceListener with available/not available statuses

Bug: 8291653
Change-Id: I24680f1a2dc109510caf451cf7c7bd180b670d84
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/ProCamera2Client.cpp
amera/libcameraservice/ProCamera2Client.h
b99c5b8eebb35133a08c46b015624bd4c4a6c477 07-Feb-2013 Eino-Ville Talvala <etalvala@google.com> Camera: Start of support for version 3.0 of camera device HAL

- Refactor common CameraDevice interface out of Camera2Device
- Initial skeleton only for Camera3Device

Change-Id: I097cc76e2ad102a51712ac114235163245f5482c
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/Camera3Device.h
amera/libcameraservice/CameraClient.h
amera/libcameraservice/CameraDeviceBase.cpp
amera/libcameraservice/CameraDeviceBase.h
amera/libcameraservice/CameraHardwareInterface.h
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/FrameProcessor.cpp
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/StreamingProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.h
7fa43f376ebd63fda24d85c9ebf97e0ddf534083 07-Feb-2013 Eino-Ville Talvala <etalvala@google.com> Camera: Start of support for version 3.0 of camera device HAL

- Refactor common CameraDevice interface out of Camera2Device
- Initial skeleton only for Camera3Device

Change-Id: I097cc76e2ad102a51712ac114235163245f5482c
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
amera/libcameraservice/Camera3Device.cpp
amera/libcameraservice/Camera3Device.h
amera/libcameraservice/CameraClient.h
amera/libcameraservice/CameraDeviceBase.cpp
amera/libcameraservice/CameraDeviceBase.h
amera/libcameraservice/CameraHardwareInterface.h
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/FrameProcessor.cpp
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/StreamingProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.h
8b5c4ec7bbf253eb704094ab6b04f58923f67994 27-Feb-2013 Igor Murashkin <iam@google.com> Merge "camera_client: refactor Camera/ProCamera commonalities into BasicCamera" into jb-mr2-dev
f5daac4225905184b8d7cdd2fd87247d73e27ea7 27-Feb-2013 Igor Murashkin <iam@google.com> Merge "camera_client: refactor Camera/ProCamera commonalities into BasicCamera" into jb-mr2-dev
409e3749a5627f1b360feb1479fcd341067a90b8 27-Feb-2013 Glenn Kasten <gkasten@google.com> Revert "Logging to investigate a crash"

This reverts commit f0ff908da019a44115109f1b4d1b6864b35a8a29.
udioflinger/AudioMixer.cpp
3c3c527a792249d07938c5c6cb9b465344a22383 27-Feb-2013 Glenn Kasten <gkasten@google.com> Revert "Logging to investigate a crash"

This reverts commit f0ff908da019a44115109f1b4d1b6864b35a8a29.
udioflinger/AudioMixer.cpp
c073ba525404f3416c2824c435d3d926a9892f1b 26-Feb-2013 Igor Murashkin <iam@google.com> camera_client: refactor Camera/ProCamera commonalities into BasicCamera

Change-Id: Ie10a4094522d49683657665fe94ab0b7ccd280e9
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
b84d935c179a275a47e07291d2a983daf844de80 26-Feb-2013 Igor Murashkin <iam@google.com> camera_client: refactor Camera/ProCamera commonalities into BasicCamera

Change-Id: Ie10a4094522d49683657665fe94ab0b7ccd280e9
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
46909e7eb074ce1b95b8a411eb71154f53f84f77 26-Feb-2013 Glenn Kasten <gkasten@google.com> Remove tee sink debugging at compile time

Bug: 8223560
Change-Id: Iddbfb06c45d43d9f20bb428215dd4094931e19a7
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
dd0bda0c47871d4964b5035a096c7c8c27fa7469 26-Feb-2013 Glenn Kasten <gkasten@google.com> Remove tee sink debugging at compile time

Bug: 8223560
Change-Id: Iddbfb06c45d43d9f20bb428215dd4094931e19a7
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.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
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/CameraClient.cpp
amera/libcameraservice/CameraClient.h
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/ProCamera2Client.cpp
amera/libcameraservice/ProCamera2Client.h
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
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/CameraClient.cpp
amera/libcameraservice/CameraClient.h
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/ProCamera2Client.cpp
amera/libcameraservice/ProCamera2Client.h
0894bfb78b7872570b94d0b8d23ebbf6a8b51d35 23-Feb-2013 Glenn Kasten <gkasten@google.com> Merge "Update tee sink"
68e6e24cb6cdd66c2209774c4871a2c47e8bbc8b 23-Feb-2013 Glenn Kasten <gkasten@google.com> Merge "Update tee sink"
da6ef1320d0161b1640dc84d7a9c5a25860c3619 10-Jan-2013 Glenn Kasten <gkasten@google.com> Update tee sink

Implement rotation to reduce long-term storage use.
Implement optional per-track tee.
Dynamically enable at runtime based on property, instead of at compile-time.
Dynamic frame count not yet implemented.

Bug: 8223560
Change-Id: I3706443c6ec0cb0c6656dc288715a02ad5fea63a
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
udioflinger/TrackBase.h
udioflinger/Tracks.cpp
dd4abb5177b8d94cd30a787d4ce336d5110c185c 10-Jan-2013 Glenn Kasten <gkasten@google.com> Update tee sink

Implement rotation to reduce long-term storage use.
Implement optional per-track tee.
Dynamically enable at runtime based on property, instead of at compile-time.
Dynamic frame count not yet implemented.

Bug: 8223560
Change-Id: I3706443c6ec0cb0c6656dc288715a02ad5fea63a
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Threads.cpp
udioflinger/TrackBase.h
udioflinger/Tracks.cpp
7b33a74bbc514b99c16be7fff9a34e892bc19264 21-Feb-2013 Igor Murashkin <iam@google.com> ProCamera: Add getInfo for getting static metadata (and a test)

Change-Id: I3b87dfbc621d98bf41f37a892a1012baf85b5166
amera/libcameraservice/ProCamera2Client.cpp
amera/libcameraservice/ProCamera2Client.h
d127c2c8a8b68dae2f8743c310c2547e8f46d967 21-Feb-2013 Igor Murashkin <iam@google.com> ProCamera: Add getInfo for getting static metadata (and a test)

Change-Id: I3b87dfbc621d98bf41f37a892a1012baf85b5166
amera/libcameraservice/ProCamera2Client.cpp
amera/libcameraservice/ProCamera2Client.h
a91537e268f2b35f9f0dfdc0c4f84655c93285ae 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: ProCamera - implement onResultReceived callback for metadata callbacks

Change-Id: I46775402b007244bc383d6343a620eebbd492aad
amera/libcameraservice/Android.mk
amera/libcameraservice/ProCamera2Client.cpp
amera/libcameraservice/ProCamera2Client.h
amera/libcameraservice/camera2/ProFrameProcessor.cpp
amera/libcameraservice/camera2/ProFrameProcessor.h
418e493e8d67924cfda652cb64965647ce6381cb 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: ProCamera - implement onResultReceived callback for metadata callbacks

Change-Id: I46775402b007244bc383d6343a620eebbd492aad
amera/libcameraservice/Android.mk
amera/libcameraservice/ProCamera2Client.cpp
amera/libcameraservice/ProCamera2Client.h
amera/libcameraservice/camera2/ProFrameProcessor.cpp
amera/libcameraservice/camera2/ProFrameProcessor.h
5835cc46a2f06dbfa5fbdab70e091896ef2fb438 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: ProCamera - add createStreamCpu and unit test

Change-Id: I468172dbfdd78510b273bf9d119c950cbeda7ea3
amera/libcameraservice/ProCamera2Client.cpp
c0767f148e29ce821281b5965c0e25b4c143e76d 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: ProCamera - add createStreamCpu and unit test

Change-Id: I468172dbfdd78510b273bf9d119c950cbeda7ea3
amera/libcameraservice/ProCamera2Client.cpp
76f8b43909817179b317880202360863b8f976d0 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: Change ProCamera to take IGraphicBufferProducer

Change-Id: Iec62eead6d179aa5486f7719143340976bb76e7d
amera/libcameraservice/ProCamera2Client.cpp
amera/libcameraservice/ProCamera2Client.h
5494cdc67b541034c963919aef8acb8b665e4dde 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: Change ProCamera to take IGraphicBufferProducer

Change-Id: Iec62eead6d179aa5486f7719143340976bb76e7d
amera/libcameraservice/ProCamera2Client.cpp
amera/libcameraservice/ProCamera2Client.h
3261fd3f1d8f798fab2f1b3efaa92d5a35cd42e7 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: ProCamera2Client implement createStream,createDefaultRequest

The StreamingImage unit test should now work when TEST_DISPLAY_SECS is set.

Change-Id: I9cf3ad5bd5a76096ab21bd39e631d636c4ff3d3f
amera/libcameraservice/ProCamera2Client.cpp
amera/libcameraservice/ProCamera2Client.h
9fb7fa159b2a47d6a7c0e9ef323b23298cdc7cb9 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: ProCamera2Client implement createStream,createDefaultRequest

The StreamingImage unit test should now work when TEST_DISPLAY_SECS is set.

Change-Id: I9cf3ad5bd5a76096ab21bd39e631d636c4ff3d3f
amera/libcameraservice/ProCamera2Client.cpp
amera/libcameraservice/ProCamera2Client.h
985fd30a10f6fec4293f071fd258c4726cff5a3d 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: ProCamera2Client - add createStream (service is stubbed) and unit test

Change-Id: I1ae7ba9b24f5883c214c19a7ed0eaf0c802d69c1
amera/libcameraservice/Android.mk
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/ProCamera2Client.cpp
amera/libcameraservice/ProCamera2Client.h
69e22433b9d7df77907579f67e47a159aa57f876 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: ProCamera2Client - add createStream (service is stubbed) and unit test

Change-Id: I1ae7ba9b24f5883c214c19a7ed0eaf0c802d69c1
amera/libcameraservice/Android.mk
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/ProCamera2Client.cpp
amera/libcameraservice/ProCamera2Client.h
634a51509ee50475f3e9f8ccf897e90fc72ded31 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: Add ProCamera private binder interface for an API2-light functionality

Change-Id: I2af7a807c99df75ea659e6e6acc9c4fca6a56274
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
bfb5d5ef5bae01efac171397260a7152782d92c7 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: Add ProCamera private binder interface for an API2-light functionality

Change-Id: I2af7a807c99df75ea659e6e6acc9c4fca6a56274
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
1d88023e1de6b9f370eb4be944dd9c4480d01f11 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: Add unit test infrastructure for libcameraclient

Change-Id: I957538663ae8332d26f3640c63a75efc79f4ac5c
amera/libcameraservice/CameraService.cpp
e4e5b2f23fa85cae789dc6824ea8af321e211d60 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: Add unit test infrastructure for libcameraclient

Change-Id: I957538663ae8332d26f3640c63a75efc79f4ac5c
amera/libcameraservice/CameraService.cpp
7efa520c76e6a1f6b3146404cc6aca5a8353583a 14-Feb-2013 Igor Murashkin <iam@google.com> Camera: Move CameraMetadata.h from service to client library

Change-Id: I940ce86f318f37ae5b73f912a6e589415150125f
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
amera/libcameraservice/camera2/BurstCapture.h
amera/libcameraservice/camera2/CallbackProcessor.h
amera/libcameraservice/camera2/CameraMetadata.cpp
amera/libcameraservice/camera2/CameraMetadata.h
amera/libcameraservice/camera2/CaptureSequencer.h
amera/libcameraservice/camera2/FrameProcessor.h
amera/libcameraservice/camera2/JpegProcessor.h
amera/libcameraservice/camera2/Parameters.h
amera/libcameraservice/camera2/StreamingProcessor.h
amera/libcameraservice/camera2/ZslProcessor.h
bd02dd1bf1f34eb4e100d0d058f1fe5a2790d67e 14-Feb-2013 Igor Murashkin <iam@google.com> Camera: Move CameraMetadata.h from service to client library

Change-Id: I940ce86f318f37ae5b73f912a6e589415150125f
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
amera/libcameraservice/camera2/BurstCapture.h
amera/libcameraservice/camera2/CallbackProcessor.h
amera/libcameraservice/camera2/CameraMetadata.cpp
amera/libcameraservice/camera2/CameraMetadata.h
amera/libcameraservice/camera2/CaptureSequencer.h
amera/libcameraservice/camera2/FrameProcessor.h
amera/libcameraservice/camera2/JpegProcessor.h
amera/libcameraservice/camera2/Parameters.h
amera/libcameraservice/camera2/StreamingProcessor.h
amera/libcameraservice/camera2/ZslProcessor.h
99c2f923f6b04efffe949d1daf9cb7148e3cc201 22-Feb-2013 Mathias Agopian <mathias@google.com> Merge "replace getISurfaceTexture by getIGraphicBufferProducer"
ee9cc423e2551ffbacfd226b8627737beabaec99 22-Feb-2013 Mathias Agopian <mathias@google.com> Merge "replace getISurfaceTexture by getIGraphicBufferProducer"
c0dd54f1a77fb94ae69cc3ac5944d718bb6caa28 20-Feb-2013 Alex Ray <aray@google.com> CameraService: Log camera module name

Explicitly logs camera module loaded. This is useful on systems with
multiple camera modules installed. Also this make the camera service
match audioflinger, which logs hardware module names as well.

Change-Id: I280bf12df2d517f936916b8ba3cb662e671d0216
amera/libcameraservice/CameraService.cpp
53c8ad31435bfb7c71a5b04dfc0314ac8f899219 20-Feb-2013 Alex Ray <aray@google.com> CameraService: Log camera module name

Explicitly logs camera module loaded. This is useful on systems with
multiple camera modules installed. Also this make the camera service
match audioflinger, which logs hardware module names as well.

Change-Id: I280bf12df2d517f936916b8ba3cb662e671d0216
amera/libcameraservice/CameraService.cpp
9e1cdea45d40fa8cf95dd080943053856009054f 20-Feb-2013 Mathias Agopian <mathias@google.com> replace getISurfaceTexture by getIGraphicBufferProducer

Change-Id: I723a3863558126f2635a544a39bb3ec88d499c60
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/CameraClient.cpp
a6843669d4da47755ce97fb85389d4d1c52b8197 20-Feb-2013 Mathias Agopian <mathias@google.com> replace getISurfaceTexture by getIGraphicBufferProducer

Change-Id: I723a3863558126f2635a544a39bb3ec88d499c60
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/CameraClient.cpp
fc900c922e219771d0cd3c075720d90026e1ca4a 18-Feb-2013 Glenn Kasten <gkasten@google.com> A reference cannot be re-bound

Bug: 8213067
Bug: 6490974
Change-Id: If546215641fbc9a0fb1e8af8b85cc01f0a4b26ab
udioflinger/AudioMixer.cpp
2f8025eef6c681920579f75d298a262b12a80ac9 18-Feb-2013 Glenn Kasten <gkasten@google.com> A reference cannot be re-bound

Bug: 8213067
Bug: 6490974
Change-Id: If546215641fbc9a0fb1e8af8b85cc01f0a4b26ab
udioflinger/AudioMixer.cpp
4353cef86a90c83f02c4ff338d236e8361a27dd1 16-Feb-2013 Glenn Kasten <gkasten@google.com> Merge "Revert "Temporary additional logging to investigate bug""
a457c43cd7f4225ffbedfbdcd68dd9cf6fef1d38 16-Feb-2013 Glenn Kasten <gkasten@google.com> Merge "Revert "Temporary additional logging to investigate bug""
7f5d335f7b4caecd0dfb8f1085f352f1d2da5d2e 16-Feb-2013 Glenn Kasten <gkasten@google.com> Revert "Temporary additional logging to investigate bug"

This reverts commit 32584a7d672864b20ab8b83a3cb23c1858e908b7

Change-Id: I9dc680578b955b1af462eeb7a49d61a0d45eb81b
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/FastMixer.cpp
udioflinger/StateQueue.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
5f6f3764989601d3b3ee65beaf1447d2a6b5f284 16-Feb-2013 Glenn Kasten <gkasten@google.com> Revert "Temporary additional logging to investigate bug"

This reverts commit 32584a7d672864b20ab8b83a3cb23c1858e908b7

Change-Id: I9dc680578b955b1af462eeb7a49d61a0d45eb81b
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/FastMixer.cpp
udioflinger/StateQueue.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
e96cdab491551ced9d529a2b9587508b92cf7f45 16-Feb-2013 Glenn Kasten <gkasten@google.com> Merge "Temporary additional logging to investigate bug"
c046148d93212f8a4da916bb860a1fa5926fe159 16-Feb-2013 Glenn Kasten <gkasten@google.com> Merge "Temporary additional logging to investigate bug"
32584a7d672864b20ab8b83a3cb23c1858e908b7 13-Feb-2013 Glenn Kasten <gkasten@google.com> Temporary additional logging to investigate bug

The bug appears related to continuing to use an invalid buffer provider
in fast mixer after track destruction, so focus the added logs in that area.

Also includes a bug fix: was calling log in an unsafe place
near Threads.cpp AudioFlinger::PlaybackThread::createTrack_l line 1250.

Details:
- include caller pid or client pid where appropriate
- increase log buffer size
- log mFastIndex when AudioMixer sees an invalid bufferProvider.
- log both potentially modified and actually modified tracks in FastMixer.
- fix benign bug where sq->end() was called more than once.
- log StateQueue push() call and return.
- increase StateQueue size from 4 to 8 entries
- log mixer->enable(), bufferProvider, and currentTrackMask
- log buffer provider addresses
- increase fast mixer log buffer again
- check logf format vs. argument list compatibility
- add logging to AudioMixer
- add checking of magic field in AudioMixer to detect overwrites
- add bool AudioMixer::enabled()
- increase log buffer sizes yet again
- enable assertion checking without ALOGV
- improve a few log messages
- check for corruption in more places
- log in all the process hooks
- add new mixer APIs so we can check for corruption of mixer state
- fix a build warning

Bug: 6490974
Change-Id: Ib0c4a73dcf606ef9bd898313b3b40ef61ab42f51
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/FastMixer.cpp
udioflinger/StateQueue.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
dd9764290b3c1d801fea9505189cae29db919902 13-Feb-2013 Glenn Kasten <gkasten@google.com> Temporary additional logging to investigate bug

The bug appears related to continuing to use an invalid buffer provider
in fast mixer after track destruction, so focus the added logs in that area.

Also includes a bug fix: was calling log in an unsafe place
near Threads.cpp AudioFlinger::PlaybackThread::createTrack_l line 1250.

Details:
- include caller pid or client pid where appropriate
- increase log buffer size
- log mFastIndex when AudioMixer sees an invalid bufferProvider.
- log both potentially modified and actually modified tracks in FastMixer.
- fix benign bug where sq->end() was called more than once.
- log StateQueue push() call and return.
- increase StateQueue size from 4 to 8 entries
- log mixer->enable(), bufferProvider, and currentTrackMask
- log buffer provider addresses
- increase fast mixer log buffer again
- check logf format vs. argument list compatibility
- add logging to AudioMixer
- add checking of magic field in AudioMixer to detect overwrites
- add bool AudioMixer::enabled()
- increase log buffer sizes yet again
- enable assertion checking without ALOGV
- improve a few log messages
- check for corruption in more places
- log in all the process hooks
- add new mixer APIs so we can check for corruption of mixer state
- fix a build warning

Bug: 6490974
Change-Id: Ib0c4a73dcf606ef9bd898313b3b40ef61ab42f51
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/FastMixer.cpp
udioflinger/StateQueue.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
1a2952aee048ca7b1765e2bc09ebe9aeddaeafa3 15-Feb-2013 Mathias Agopian <mathias@google.com> Refactoring: Rename SurfaceTextureClient to Surface

Change-Id: I4e8a8b20914cb64edc37abe68233fbc9f2b5d830
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/CameraClient.cpp
amera/libcameraservice/CameraClient.h
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/StreamingProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.cpp
b1e7cd156ca3e1747374e0d20cdd1ce467210453 15-Feb-2013 Mathias Agopian <mathias@google.com> Refactoring: Rename SurfaceTextureClient to Surface

Change-Id: I4e8a8b20914cb64edc37abe68233fbc9f2b5d830
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/CameraClient.cpp
amera/libcameraservice/CameraClient.h
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/StreamingProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.cpp
e186b51e0a9834b287d7a509e960eaf1b688db75 15-Feb-2013 Glenn Kasten <gkasten@google.com> Revert "Temporary additional logging to investigate bug"

This reverts commit 639482c24c911b125398b31883ba6d55faebe28b

Change-Id: I11f2829072ab11e18b0663024f27bf31192f1d39
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/FastMixer.cpp
udioflinger/StateQueue.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
ce70d400ff9fb614e334ab2b661df2933533ef57 15-Feb-2013 Glenn Kasten <gkasten@google.com> Revert "Temporary additional logging to investigate bug"

This reverts commit 639482c24c911b125398b31883ba6d55faebe28b

Change-Id: I11f2829072ab11e18b0663024f27bf31192f1d39
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/FastMixer.cpp
udioflinger/StateQueue.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
639482c24c911b125398b31883ba6d55faebe28b 13-Feb-2013 Glenn Kasten <gkasten@google.com> Temporary additional logging to investigate bug

The bug appears related to continuing to use an invalid buffer provider
in fast mixer after track destruction, so focus the added logs in that area.

Also includes a bug fix: was calling log in an unsafe place
near Threads.cpp AudioFlinger::PlaybackThread::createTrack_l line 1250.

Details:
- include caller pid or client pid where appropriate
- increase log buffer size
- log mFastIndex when AudioMixer sees an invalid bufferProvider.
- log both potentially modified and actually modified tracks in FastMixer.
- fix benign bug where sq->end() was called more than once.
- log StateQueue push() call and return.
- increase StateQueue size from 4 to 8 entries
- log mixer->enable(), bufferProvider, and currentTrackMask
- log buffer provider addresses
- increase fast mixer log buffer again
- check logf format vs. argument list compatibility
- add logging to AudioMixer
- add checking of magic field in AudioMixer to detect overwrites
- add bool AudioMixer::enabled()

Bug: 6490974
Change-Id: I1f3f18aa62d9fbd35bc32285b669f5ba40efe28e
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/FastMixer.cpp
udioflinger/StateQueue.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
5881f18029deb80eb83ea88046d0593441be79c7 13-Feb-2013 Glenn Kasten <gkasten@google.com> Temporary additional logging to investigate bug

The bug appears related to continuing to use an invalid buffer provider
in fast mixer after track destruction, so focus the added logs in that area.

Also includes a bug fix: was calling log in an unsafe place
near Threads.cpp AudioFlinger::PlaybackThread::createTrack_l line 1250.

Details:
- include caller pid or client pid where appropriate
- increase log buffer size
- log mFastIndex when AudioMixer sees an invalid bufferProvider.
- log both potentially modified and actually modified tracks in FastMixer.
- fix benign bug where sq->end() was called more than once.
- log StateQueue push() call and return.
- increase StateQueue size from 4 to 8 entries
- log mixer->enable(), bufferProvider, and currentTrackMask
- log buffer provider addresses
- increase fast mixer log buffer again
- check logf format vs. argument list compatibility
- add logging to AudioMixer
- add checking of magic field in AudioMixer to detect overwrites
- add bool AudioMixer::enabled()

Bug: 6490974
Change-Id: I1f3f18aa62d9fbd35bc32285b669f5ba40efe28e
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/FastMixer.cpp
udioflinger/StateQueue.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
51eb3965caa8ba135bcdd8ffb7a2024a042ecdc0 14-Feb-2013 Glenn Kasten <gkasten@google.com> Revert "Temporary additional logging to investigate bug"

This reverts commit 0ddd56316262ac74a95e9edb595697c163136d6d

Change-Id: I180a928af6f5a38d15a5efe44cd1fe927b5d961c
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/FastMixer.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
7f2f8042cf335ab1323dec3edbe9143a06109f4e 14-Feb-2013 Glenn Kasten <gkasten@google.com> Revert "Temporary additional logging to investigate bug"

This reverts commit 0ddd56316262ac74a95e9edb595697c163136d6d

Change-Id: I180a928af6f5a38d15a5efe44cd1fe927b5d961c
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/FastMixer.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
0ddd56316262ac74a95e9edb595697c163136d6d 13-Feb-2013 Glenn Kasten <gkasten@google.com> Temporary additional logging to investigate bug

The bug appears related to continuing to use an invalid buffer provider
in fast mixer after track destruction, so focus the added logs in that area.

Also includes a bug fix: was calling log in an unsafe place
near Threads.cpp AudioFlinger::PlaybackThread::createTrack_l line 1250.

Details:
- include caller pid or client pid where appropriate
- increase log buffer size
- log mFastIndex when AudioMixer sees an invalid bufferProvider.
- log both potentially modified and actually modified tracks in FastMixer.
- fix benign bug where sq->end() was called more than once.
- log StateQueue push() call and return.

Bug: 6490974
Change-Id: Iee7c8f40e20b6000cd8286c0ec6a14fff4a37af1
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/FastMixer.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
b900234f9e772bb7591a551f06ba17ee1969368f 13-Feb-2013 Glenn Kasten <gkasten@google.com> Temporary additional logging to investigate bug

The bug appears related to continuing to use an invalid buffer provider
in fast mixer after track destruction, so focus the added logs in that area.

Also includes a bug fix: was calling log in an unsafe place
near Threads.cpp AudioFlinger::PlaybackThread::createTrack_l line 1250.

Details:
- include caller pid or client pid where appropriate
- increase log buffer size
- log mFastIndex when AudioMixer sees an invalid bufferProvider.
- log both potentially modified and actually modified tracks in FastMixer.
- fix benign bug where sq->end() was called more than once.
- log StateQueue push() call and return.

Bug: 6490974
Change-Id: Iee7c8f40e20b6000cd8286c0ec6a14fff4a37af1
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/FastMixer.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
ecd9389c8712aedeb2a79823ea0e4fb842684269 12-Feb-2013 Glenn Kasten <gkasten@google.com> Revert "Temporary additional logging to investigate bug"

This reverts commit 3051df27261e9952c0e642dec548515250e85f6a

Change-Id: I8bf5c3e91b65bd20de26f480c367c2854b62373c
udioflinger/AudioFlinger.h
udioflinger/FastMixer.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
c93aff0a698265501f46393f3146b884aa357aee 12-Feb-2013 Glenn Kasten <gkasten@google.com> Revert "Temporary additional logging to investigate bug"

This reverts commit 3051df27261e9952c0e642dec548515250e85f6a

Change-Id: I8bf5c3e91b65bd20de26f480c367c2854b62373c
udioflinger/AudioFlinger.h
udioflinger/FastMixer.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
3051df27261e9952c0e642dec548515250e85f6a 12-Feb-2013 Glenn Kasten <gkasten@google.com> Temporary additional logging to investigate bug

The bug appears related to continuing to use an invalid buffer provider
in fast mixer after track destruction, so focus the added logs in that area.

Also includes a bug fix: was calling log in an unsafe place
near Threads.cpp AudioFlinger::PlaybackThread::createTrack_l line 1250.

Details:
- include caller pid or client pid where appropriate
- increase log buffer size

Bug: 6490974
Change-Id: I4c030f171343fe4b483eae0ddea4427118d8d4b1
udioflinger/AudioFlinger.h
udioflinger/FastMixer.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
a1bf28b533907b0b234e52c72bc372b3fa49c5a3 12-Feb-2013 Glenn Kasten <gkasten@google.com> Temporary additional logging to investigate bug

The bug appears related to continuing to use an invalid buffer provider
in fast mixer after track destruction, so focus the added logs in that area.

Also includes a bug fix: was calling log in an unsafe place
near Threads.cpp AudioFlinger::PlaybackThread::createTrack_l line 1250.

Details:
- include caller pid or client pid where appropriate
- increase log buffer size

Bug: 6490974
Change-Id: I4c030f171343fe4b483eae0ddea4427118d8d4b1
udioflinger/AudioFlinger.h
udioflinger/FastMixer.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.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
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
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
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
59686720182dcaa1a1a4757964df38c16f1a5246 04-Feb-2013 Eric Laurent <elaurent@google.com> Merge "AudioFlinger: fix RecordThread initial device"
83fa606bd629ac32a2dab5af255188acfa30db4a 04-Feb-2013 Eric Laurent <elaurent@google.com> Merge "AudioFlinger: fix RecordThread initial device"
685ef09bcaf5de6abf2064d552296f70eaec6761 04-Feb-2013 Glenn Kasten <gkasten@google.com> Fix crash when destroying a DuplicatingThread

Bug: 8121343
Change-Id: I9b1fc56c753e465e8a08916022e52db6c3a36906
udioflinger/AudioFlinger.cpp
5fa419b962f668e6fa9adf7e14fddea97cdb736e 04-Feb-2013 Glenn Kasten <gkasten@google.com> Fix crash when destroying a DuplicatingThread

Bug: 8121343
Change-Id: I9b1fc56c753e465e8a08916022e52db6c3a36906
udioflinger/AudioFlinger.cpp
d3922f72601d82c6fc067a98916fda0bd1291c5f 02-Feb-2013 Eric Laurent <elaurent@google.com> AudioFlinger: fix RecordThread initial device

A regression was introduced when the audio device enums where
modified for a 32 bit representation: the device passed when
constructing a RecordThread was still the concatenation of input
device and output device bit fields on one 32 bit value which
is not possible anymore.

The fix consists in modifying the RecordThread constructor to accept
separate values for input and output devices.

Change-Id: I81fb5f4718428b54251e65d74b86e198ce15193e
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
201fc9c9feb4765a12bc39e95d25f3aa1deb8ffe 02-Feb-2013 Eric Laurent <elaurent@google.com> AudioFlinger: fix RecordThread initial device

A regression was introduced when the audio device enums where
modified for a 32 bit representation: the device passed when
constructing a RecordThread was still the concatenation of input
device and output device bit fields on one 32 bit value which
is not possible anymore.

The fix consists in modifying the RecordThread constructor to accept
separate values for input and output devices.

Change-Id: I81fb5f4718428b54251e65d74b86e198ce15193e
udioflinger/AudioFlinger.cpp
udioflinger/Threads.cpp
udioflinger/Threads.h
9e58b552f51b00b3b674102876bd6c77ef3da806 19-Jan-2013 Glenn Kasten <gkasten@google.com> AudioFlinger uses media.log service for logging

Change-Id: Ia0f8204334f6b233f644d897762a18c95d936b4b
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/FastMixer.cpp
udioflinger/FastMixerState.cpp
udioflinger/FastMixerState.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
011aa652a9349750dd6bca1dcb1b82f19e07504e 19-Jan-2013 Glenn Kasten <gkasten@google.com> AudioFlinger uses media.log service for logging

Change-Id: Ia0f8204334f6b233f644d897762a18c95d936b4b
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/FastMixer.cpp
udioflinger/FastMixerState.cpp
udioflinger/FastMixerState.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/Tracks.cpp
9b7e8fc7c564b24a1c099dddae4e9c1126bd7c4e 04-Jan-2013 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix JPEG quality metadata type, new warnings.: DO NOT MERGE

- JPEG quality tag is now a uint8_t, not an int. Update parameter code
accordingly.

- Fix new warnings about narrowing conversions.

Bug: 7944244

Change-Id: Ie081c57c9e9323148614b170b132ffb98c0a0b9f
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
64143ff27c2ffd8bd91ee9451305704e6b54ac6e 04-Jan-2013 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix JPEG quality metadata type, new warnings.: DO NOT MERGE

- JPEG quality tag is now a uint8_t, not an int. Update parameter code
accordingly.

- Fix new warnings about narrowing conversions.

Bug: 7944244

Change-Id: Ie081c57c9e9323148614b170b132ffb98c0a0b9f
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
abeee0ec92b5c77147036bf346de9309092a5ca1 28-Nov-2012 Igor Murashkin <iam@google.com> Camera2: fix metadata symbols: DO NOT MERGE

Change-Id: I59e457824782de26b7b489cd92eb33d48e6ee2d9
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/FrameProcessor.cpp
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
950fcbe17288bfb3d9bb89f8311cc6bead276499 28-Nov-2012 Igor Murashkin <iam@google.com> Camera2: fix metadata symbols: DO NOT MERGE

Change-Id: I59e457824782de26b7b489cd92eb33d48e6ee2d9
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/FrameProcessor.cpp
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
6f1c1918d0dfece10f728711b055441e4d135c73 19-Jan-2013 Glenn Kasten <gkasten@google.com> Add media.log service based on NBLog

Change-Id: Ie45093df6ac9a739d05c8d408fab52a9a8a27e7f
edialog/Android.mk
edialog/MediaLogService.cpp
edialog/MediaLogService.h
fdf4e4f1859771b95585cbc87f8cd038ea2815c6 19-Jan-2013 Glenn Kasten <gkasten@google.com> Add media.log service based on NBLog

Change-Id: Ie45093df6ac9a739d05c8d408fab52a9a8a27e7f
edialog/Android.mk
edialog/MediaLogService.cpp
edialog/MediaLogService.h
2592f6e68edbed386e004d5b045233f15e7b9ba1 18-Jan-2013 Eric Laurent <elaurent@google.com> AudioFlinger: fix build with debug log enabled

Change-Id: Id397155ec884c41cb84b35462ea09a97a04d3ed2
udioflinger/Threads.cpp
3a948fceb6b59121cc2e5eeb458064150870ffde 18-Jan-2013 Eric Laurent <elaurent@google.com> AudioFlinger: fix build with debug log enabled

Change-Id: Id397155ec884c41cb84b35462ea09a97a04d3ed2
udioflinger/Threads.cpp
7ac90e913d96e49e636b02f2c3984c71080dafff 09-Jan-2013 Glenn Kasten <gkasten@google.com> Merge "Fix build warnings"
95819503abcfafdb37fbba1401b6cd9dd91ff2f1 09-Jan-2013 Glenn Kasten <gkasten@google.com> Merge "Fix build warnings"
70dc7025fac462e502803108e55911e6b3301bfe 09-Jan-2013 Glenn Kasten <gkasten@google.com> Fix build warnings

Change-Id: I79f4d7052a4c0a9fde144063f44a9c8c9dd575d5
udioflinger/audio-resampler/AudioResamplerCoefficients.cpp
udioflinger/audio-resampler/filter_coefficients.h
befdd0275dbb78e1a9fa2a33a3a1de731b1fe389 09-Jan-2013 Glenn Kasten <gkasten@google.com> Fix build warnings

Change-Id: I79f4d7052a4c0a9fde144063f44a9c8c9dd575d5
udioflinger/audio-resampler/AudioResamplerCoefficients.cpp
udioflinger/audio-resampler/filter_coefficients.h
c695b7c660e1fe62fca35c6b25c1849f3c81a49f 04-Jan-2013 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix JPEG quality metadata type, new warnings.

- JPEG quality tag is now a uint8_t, not an int. Update parameter code
accordingly.

- Fix new warnings about narrowing conversions.

Bug: 7944244

Change-Id: Ie081c57c9e9323148614b170b132ffb98c0a0b9f
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
eae312137f71af037d5f5b4071eef8e2ecd6055e 04-Jan-2013 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix JPEG quality metadata type, new warnings.

- JPEG quality tag is now a uint8_t, not an int. Update parameter code
accordingly.

- Fix new warnings about narrowing conversions.

Bug: 7944244

Change-Id: Ie081c57c9e9323148614b170b132ffb98c0a0b9f
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
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"
7cd2dd3ae3278a50396886cf0b5c9a1277601816 20-Dec-2012 Glenn Kasten <gkasten@google.com> Merge "Fix build warnings"
10f57df484daecc356ca1720c4ba799a8bf6761a 20-Dec-2012 Glenn Kasten <gkasten@google.com> Merge "Fix build warnings"
cb02ba7c2666b72db030b8bf4a3f2cddc3c23ead 20-Dec-2012 Glenn Kasten <gkasten@google.com> Merge "Add warning about following the design rules"
f93aa1fdae47ca2eddc7ca35fbde4266b114e8c5 20-Dec-2012 Glenn Kasten <gkasten@google.com> Merge "Add warning about following the design rules"
8d6cc842e8d525405c68e57fdf3bc5da0b4d7e87 03-Feb-2012 Glenn Kasten <gkasten@google.com> Remove unnecessary parameter

Just get the parameter on server side

Change-Id: I433a63104dbb257e0d862be2ab61847cb36d1c15
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
f37971f624164c3ed185d3f976404a6f60f49b9a 03-Feb-2012 Glenn Kasten <gkasten@google.com> Remove unnecessary parameter

Just get the parameter on server side

Change-Id: I433a63104dbb257e0d862be2ab61847cb36d1c15
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
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
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/CameraClient.cpp
amera/libcameraservice/CameraClient.h
amera/libcameraservice/CameraService.h
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
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/CameraClient.cpp
amera/libcameraservice/CameraClient.h
amera/libcameraservice/CameraService.h
c4974312e5a1e2ab94eca56045f991baf1508d73 14-Dec-2012 Glenn Kasten <gkasten@google.com> Fix build warnings

Change-Id: I9e3cfa0c6b3467fe763ce55f759d179f02c5deea
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
udioflinger/Threads.cpp
92b1343f5fbc2fc43198a0a1252fe023cc9a5061 14-Dec-2012 Glenn Kasten <gkasten@google.com> Fix build warnings

Change-Id: I9e3cfa0c6b3467fe763ce55f759d179f02c5deea
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
udioflinger/Threads.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
udioflinger/AudioFlinger.h
udioflinger/PlaybackTracks.h
udioflinger/RecordTracks.h
udioflinger/Threads.cpp
udioflinger/TrackBase.h
udioflinger/Tracks.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
udioflinger/AudioFlinger.h
udioflinger/PlaybackTracks.h
udioflinger/RecordTracks.h
udioflinger/Threads.cpp
udioflinger/TrackBase.h
udioflinger/Tracks.cpp
5736c35b841de56ce394b4879389f669b61425e6 04-Dec-2012 Glenn Kasten <gkasten@google.com> Prepare for track invalidation to be done by proxy

Don't rely on control block to determine whether track has been marked
invalid. Instead, use a local flag that can't be corrupted by client.

Change-Id: I783dafe828f93c1c3d2d0e5a08105ea536436efb
udioflinger/PlaybackTracks.h
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
30c01816ddee2268fcd3d965240cba9c00301e7d 04-Dec-2012 Glenn Kasten <gkasten@google.com> Prepare for track invalidation to be done by proxy

Don't rely on control block to determine whether track has been marked
invalid. Instead, use a local flag that can't be corrupted by client.

Change-Id: I783dafe828f93c1c3d2d0e5a08105ea536436efb
udioflinger/PlaybackTracks.h
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
ae162976dda428671af09a8fbc3f03173a7e6f3e 11-Dec-2012 Glenn Kasten <gkasten@google.com> am 76143093: am f0ff908d: Logging to investigate a crash

* commit '761430930a7335d714af0f7c1d497feb8f9f0a5a':
Logging to investigate a crash
e1cf3c41bd27b5ab7d8e70ef8dd6fcd0f5453568 11-Dec-2012 Glenn Kasten <gkasten@google.com> am 76143093: am f0ff908d: Logging to investigate a crash

* commit '761430930a7335d714af0f7c1d497feb8f9f0a5a':
Logging to investigate a crash
f0ff908da019a44115109f1b4d1b6864b35a8a29 07-Dec-2012 Glenn Kasten <gkasten@google.com> Logging to investigate a crash

Bug: 6490974
Change-Id: Ib926a9258bde4ee05ed42eea662dff68e426a997
udioflinger/AudioMixer.cpp
ef5abc369823f634c460c8f24d3cbf310542fe3b 07-Dec-2012 Glenn Kasten <gkasten@google.com> Logging to investigate a crash

Bug: 6490974
Change-Id: Ib926a9258bde4ee05ed42eea662dff68e426a997
udioflinger/AudioMixer.cpp
88e672043a0671557d9c0877e069dc95de0d8cb0 05-Dec-2012 Igor Murashkin <iam@google.com> Merge "Camera2: fix metadata symbols"
07dfb08e935fdfe9f73f452cf27e3e2b052eda4f 05-Dec-2012 Igor Murashkin <iam@google.com> Merge "Camera2: fix metadata symbols"
811cddad95a75c71dfeca0965c92f710c81e192f 04-Dec-2012 Alex Ray <aray@google.com> Merge "audioflinger: define ANDROID_SMP, remove conditional tracing"
e0da485dd76267e86cff7cbd334c74435d745225 04-Dec-2012 Alex Ray <aray@google.com> Merge "audioflinger: define ANDROID_SMP, remove conditional tracing"
d32b99b1a87497280add6efc0e99bd383e402de1 28-Nov-2012 Igor Murashkin <iam@google.com> Camera2: fix metadata symbols

Change-Id: I59e457824782de26b7b489cd92eb33d48e6ee2d9
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/FrameProcessor.cpp
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
2d2b40b67515208273197ac2f03c5fabd430efae 28-Nov-2012 Igor Murashkin <iam@google.com> Camera2: fix metadata symbols

Change-Id: I59e457824782de26b7b489cd92eb33d48e6ee2d9
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/FrameProcessor.cpp
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
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
udioflinger/AudioFlinger.h
udioflinger/PlaybackTracks.h
udioflinger/Threads.cpp
udioflinger/Tracks.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
udioflinger/AudioFlinger.h
udioflinger/PlaybackTracks.h
udioflinger/Threads.cpp
udioflinger/Tracks.cpp
b3a8364eeea621ef63b983e4c1b0771f62069fe0 01-Dec-2012 Alex Ray <aray@google.com> audioflinger: define ANDROID_SMP, remove conditional tracing

With ANDROID_SMP set, tracing functionality is completely inline, and
without the performance hits of external library calls, tracing does
not need to be conditionally compiled.

Change-Id: I4b29a9a52c403f0d2ea137c5b7bc05a518a7ca4b
udioflinger/Android.mk
udioflinger/FastMixer.cpp
71b6e60c52ce367bc0d64ffca60848d600511b65 01-Dec-2012 Alex Ray <aray@google.com> audioflinger: define ANDROID_SMP, remove conditional tracing

With ANDROID_SMP set, tracing functionality is completely inline, and
without the performance hits of external library calls, tracing does
not need to be conditionally compiled.

Change-Id: I4b29a9a52c403f0d2ea137c5b7bc05a518a7ca4b
udioflinger/Android.mk
udioflinger/FastMixer.cpp
371eb9756c32109ea572b91216b19bb623f6d3fd 30-Nov-2012 Alex Ray <aray@google.com> Remove conditional compilation of ATRACE functions

Tracing functions are meant to be dynamically controlled via sysprops.
Conditional compilation removes this functionality.

Change-Id: I26bc473d104d0b3c50a228dddfda3fa2428d157a
udioflinger/Android.mk
udioflinger/FastMixer.cpp
udioflinger/Threads.cpp
af348741539ae4a84aa929a54ecf359dae96f3ee 30-Nov-2012 Alex Ray <aray@google.com> Remove conditional compilation of ATRACE functions

Tracing functions are meant to be dynamically controlled via sysprops.
Conditional compilation removes this functionality.

Change-Id: I26bc473d104d0b3c50a228dddfda3fa2428d157a
udioflinger/Android.mk
udioflinger/FastMixer.cpp
udioflinger/Threads.cpp
a3d2628a22f2b3d682495044897a40ea1399a662 30-Nov-2012 Glenn Kasten <gkasten@google.com> Add warning about following the design rules

Change-Id: Ic4895ed5682bad10b03e97d8015e642ee1696533
udioflinger/FastMixer.cpp
05f9e4fe9a97e077b5ed37214464c0a67af80871 30-Nov-2012 Glenn Kasten <gkasten@google.com> Add warning about following the design rules

Change-Id: Ic4895ed5682bad10b03e97d8015e642ee1696533
udioflinger/FastMixer.cpp
45f7c446777171a728f9eb257f48145dde5d19e2 30-Nov-2012 Simon Wilson <simonwilson@google.com> Merge "Use ATRACE macros instead of Tracer statics"
e8cb004257565111cb261f3e9c786adba881859a 30-Nov-2012 Simon Wilson <simonwilson@google.com> Merge "Use ATRACE macros instead of Tracer statics"
2d590964aa58e137d17a43e095e6443dd0fe2e98 30-Nov-2012 Simon Wilson <simonwilson@google.com> Use ATRACE macros instead of Tracer statics

ATRACE_BEGIN and ATRACE_END have replaced the static
Tracer::traceBegin and Tracer::traceEnd functions, so
use them instead.

Fixes compilation errors when tracing is enabled.

Change-Id: I4d1147d2f76afcdf113e9986f0544cb848802b15
udioflinger/FastMixer.cpp
udioflinger/Threads.cpp
7a90bc9265782788675af577c7b1c56e5d5be709 30-Nov-2012 Simon Wilson <simonwilson@google.com> Use ATRACE macros instead of Tracer statics

ATRACE_BEGIN and ATRACE_END have replaced the static
Tracer::traceBegin and Tracer::traceEnd functions, so
use them instead.

Fixes compilation errors when tracing is enabled.

Change-Id: I4d1147d2f76afcdf113e9986f0544cb848802b15
udioflinger/FastMixer.cpp
udioflinger/Threads.cpp
8fac1ce6bd56e3a4b0c26c1c177bf76d9ee19da6 29-Nov-2012 Glenn Kasten <gkasten@google.com> am 9428cdd7: am 5dea84c3: Fix log spam

* commit '9428cdd7b9d32647d35207b3579133ee6a1f7355':
Fix log spam
f15a6227840b8d04a70fbd45fbd4de06b21fdc1f 29-Nov-2012 Glenn Kasten <gkasten@google.com> am 9428cdd7: am 5dea84c3: Fix log spam

* commit '9428cdd7b9d32647d35207b3579133ee6a1f7355':
Fix log spam
5dea84c39b5e790315b525009c635806e33c97e0 29-Nov-2012 Glenn Kasten <gkasten@google.com> Fix log spam

Change-Id: Ie6c982af906dcfd3cdea4b771dfab1f7e47745ca
udioflinger/audio-resampler/AudioResamplerCoefficients.cpp
65ac1b1761c57124382355c21edbbdaaab2ee025 29-Nov-2012 Glenn Kasten <gkasten@google.com> Fix log spam

Change-Id: Ie6c982af906dcfd3cdea4b771dfab1f7e47745ca
udioflinger/audio-resampler/AudioResamplerCoefficients.cpp
ff82370c7c04340d50673d425f48acafd00f2bc9 28-Nov-2012 Ben Murdoch <benm@google.com> Fix master build.

Change-Id: Ia362f74d8cd7df76292473c26c112dffe190c599
amera/libcameraservice/Camera2Client.cpp
72421521fd06787a407d06966e11f17b86900d2a 28-Nov-2012 Ben Murdoch <benm@google.com> Fix master build.

Change-Id: Ia362f74d8cd7df76292473c26c112dffe190c599
amera/libcameraservice/Camera2Client.cpp
6e406b10353af2c8ae9f7cd38f9053d4e017b4b1 28-Nov-2012 Igor Murashkin <iam@google.com> am b8fa1240: am aa9e3e01: Camera: Play shutter sound iff enableShutterSound(true) && ShutterCallback !null

* commit 'b8fa1240eedeb487a7ee0cf7d60e17bed9b25cf4':
Camera: Play shutter sound iff enableShutterSound(true) && ShutterCallback !null
a10f9b0470f598c8edf0b11a7b4c78cdf7dd1f86 28-Nov-2012 Igor Murashkin <iam@google.com> am b8fa1240: am aa9e3e01: Camera: Play shutter sound iff enableShutterSound(true) && ShutterCallback !null

* commit 'b8fa1240eedeb487a7ee0cf7d60e17bed9b25cf4':
Camera: Play shutter sound iff enableShutterSound(true) && ShutterCallback !null
41829f30e60cdb7ae8eb1f0266834d245164f70e 27-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "New VHQ resampler" into jb-mr1.1-dev
5ad21fb5686d4d32f61a47eab5a3fd2c4670e32d 27-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "New VHQ resampler" into jb-mr1.1-dev
9bcb476a95a26e62f5706d1f00f4873cf44f9e04 19-Nov-2012 Glenn Kasten <gkasten@google.com> New VHQ resampler

Squashed commit of the following:

commit 12b6952da9f25e94d06dd7185bce255924e7e791
Author: Mathias Agopian <mathias@google.com>
Date: Mon Nov 19 15:27:26 2012 -0800

fix a typo in SINC resampler that prevented tracks to be mixed

we were always erasing the current mix instead of mixing into it.

Change-Id: Ib229245f9e5a0d384f1727640a59e9f0469211a2

commit 0019ce082df430278f14ab922e900ce33b64897d
Author: Dave Bort <dbort@google.com>
Date: Tue Nov 13 01:30:32 2007 -0800

Rename "TARGET" to "MODULE" in the build system.

Part one of the grand renaming.

API_CHANGE: Third parties may need to update their makefiles.
Any variables with "LOCAL" and "TARGET" in their names
should now use "MODULE" instead of "TARGET"; e.g., LOCAL_MODULE,
LOCAL_MODULE_TAGS.

PRESUBMIT=passed
OCL=39840

Change-Id: Ica9a7937d3d9552ab84db46ac6eea8a290e404fe
Signed-off-by: Glenn Kasten <gkasten@google.com>

commit f01adc0cef0e39e75c76d9195ac26a94cac0a100
Author: Glenn Kasten <gkasten@google.com>
Date: Wed Nov 14 08:32:08 2012 -0800

Fix build warnings

Change-Id: Ic43bcca166a529a6431711b05a7fa21849b6a38b

commit 9bb031a565c753a03d9c9397edea318947d80528
Author: Mathias Agopian <mathias@google.com>
Date: Sat Nov 10 04:44:30 2012 -0800

more optimizations...

calculate the offsets from the phase differently, this happens
to reduce the register pressure in the main loop, which in turns
allows the compiler to generate much better code (doesn't need
to spill a lot of stuff on the stack).

this gives another 15% performance increase

Change-Id: I2ce3479dd48b9e6941adb80e6d443d6e14d64d96

commit 5a951598f31217b8cd2babd0720c9608ee17291a
Author: Mathias Agopian <mathias@google.com>
Date: Sat Nov 10 03:26:39 2012 -0800

refactor code to improve neon code

we want to make sure we don't transfer data from the
neon unit to the arm register file, as this can be quite
slow. instead we do all the calculation on the neon side
and write the result directly to main memory.

Change-Id: Ibb56664d3ab03098ae2798b75e2b6927ac900187

commit b381ee9e83bc9fd18986e79c7809841514ed590e
Author: Mathias Agopian <mathias@google.com>
Date: Sun Nov 4 15:16:13 2012 -0800

NEON optimized SINC resampler

this currently gives us a 60% to 80% boost depending
on the quality level selected.

Change-Id: I7db385007e811ed7bffe5fd3403b44e300894f5b

commit bea077354210242ea193a50b0dbab0fedab25df3
Author: Mathias Agopian <mathias@google.com>
Date: Mon Nov 5 01:51:37 2012 -0800

minor cleanups

Change-Id: Ia12ee4fb59e90221761bec85e6450db29197591f

commit 8f4ed7decbe161a5ff38200b218f5216d80aba46
Author: Mathias Agopian <mathias@google.com>
Date: Sun Nov 4 18:49:14 2012 -0800

improve resample test

- handle stereo input
- input file can now be ommited, in this case
a linear chirp will be used automatically
- better usage information

Change-Id: I5d62a6c26a9054a1c1a517a065b4df5a2cdcda22

commit 5fcd634ea6cb4df27c495abe20f5f9b8ff55d128
Author: Mathias Agopian <mathias@google.com>
Date: Sun Nov 4 02:03:49 2012 -0800

change how we store the FIR coefficients

The coefficient table is now transposed and shows
much better its polyphase nature: we now have a FIR
per line, each line corresponding to a phase.

This doesn't change at all the results produced by
the filter, but allows us to make slightly better
use of the data cache and improves performance a bit
(although not as much as I thought it would).

The main benefit is that it is the first step
before we can make much larger optimizations
(like using NEON).

Change-Id: Iebf7695825dcbd41f25861efcaefbaa3365ecb43

commit d652231abf4c7e2ea1fc89caae730cec1f7259a1
Author: Mathias Agopian <mathias@google.com>
Date: Sat Nov 3 23:37:53 2012 -0700

improve SINC resampler performance

The improvement is about 60% by just tweaking a few
things to help the compiler generate better code.
It turns out that inlining too much stuff manually was hurting us.

Change-Id: I8068f0f75051f95ac600e50ce552572dd1e8c304

commit 9dc68ef5b94c700c4ee68790e8cbb334c90a538d
Author: Mathias Agopian <mathias@google.com>
Date: Thu Nov 1 21:03:46 2012 -0700

new coefficients for the vhq resampler

previous coefficients were provided by a 3rd party and didn't have a
way to re-generate them. we're now using the 'fir' utility.

the performance of the filter is virtually identical, except for
the down-sampling case which seems slightly better now:
It looks like both the previous and new coefficients are generating
some sort of clipping for full-scale signals in the down-sampling case
(although the new ones seem better), the reason for that is
unknown (see bug: 7453062)

Also updated the HQ coefficients for the down-samplers, previous ones
were a little bit too conservative -- the new ones push the cut-off
frequency up by about 1 KHz.

Change-Id: I54a827b5c707c7cc41268ed01283758dce1d7647

commit 38e0b8560a6fc1b7124e22e0e09a84a285182f8e
Author: Mathias Agopian <mathias@google.com>
Date: Tue Oct 30 13:51:44 2012 -0700

fix SINC resampler on non ARM architectures

make sure the C version of the code generates the same
output than the ARM assemply version.

Change-Id: Ide218785c35d02598b2d7278e646b1b178148698

commit a1878128b182696ba508569b4d211d0dfae92463
Author: Mathias Agopian <mathias@google.com>
Date: Tue Oct 30 12:49:07 2012 -0700

fix another issue with generating FIR coefficients

the impulse response of a low-pass is 2*f*sinc(2*pi*f*k), we were
missing the 2*f scale factor. This explains why we were seeing
clipping and had to manually scale the filter down.

Change-Id: I86d0bb82ecdd99681c8ba5a8112a8257bf6f0186

commit 1a0fb993430acc9f601e6c538305bc407c20ac5d
Author: Mathias Agopian <mathias@google.com>
Date: Mon Oct 29 17:13:20 2012 -0700

fir a typo that caused up-sampling coefficiens to be wrong

up-sample coefficient were generated with a cut-off frequency of 24KHz
intead of ~20KHz, which caused more aliasing in the audible band.

also increased the attenuation to 1.3 dB on both up and down
sampling coefficient to avoid clipping.

Change-Id: Ie8aeecf1429190541b656810c6716b6aae5ece2e

commit 9520ad6862bd682ad075a9d9e3e94ada9f6e58b6
Author: Mathias Agopian <mathias@google.com>
Date: Mon Oct 29 17:13:16 2012 -0700

test-resample: clip instead of overflowing

Change-Id: I550e5a59e51c11e1095ca338222b094f92b96878

commit ba36656300f250f7f1fdeb75149749344260e6cb
Author: Mathias Agopian <mathias@google.com>
Date: Sun Oct 21 01:01:38 2012 -0700

a test app for the resamplers

Change-Id: I66852d90d384f1d9e77b51ad1a1ebdbaf61d0607

commit 056a08b9bfd33cf27228c992adc8293a56b01be8
Author: Mathias Agopian <mathias@google.com>
Date: Fri Oct 26 14:11:01 2012 -0700

reenable the cubic resampler

cubic resampler was disabled because it hadn't been qualified,
however after I did some tests, it does improve significantly
the sound quality over the order-1 resampler, even if it is
still quite bad.

also HIGH_QUALITY resampler was partially disabled, it's now
fully enabled. It's a big improvement over the cubic resampler
in terms of aliasing noise (it's not as good in the pass-band).

Change-Id: I70e3658c255896588642697be9eb594ff4ec0f8b

commit 8c0241d3ff50ae85167f69b3bd369244894cfa44
Author: Mathias Agopian <mathias@google.com>
Date: Fri Oct 26 13:48:42 2012 -0700

improve SINC resampler coefficients

- we increase the interpolation precision from 4 to 7 bits
this doesn't increase CPU power required, it only increases the
size of the filter table but significantly reduces the noise
introduced by the quantization of the impulse response.

- the parameters of the filter are set such that aliasing is
rejected at 80 dB below 20 KHz. Because we don't use a lot of
coefficient (to save compute power), there are quite a bit of
attenuation in the pass-band: starting at 9KHz for the
down-sampler (48 to 44.1), and starting at 13 KHz for the
up-sampler (44.1 to 48) -- the transition band is about 15 KHz.

Change-Id: I855548d2aab8a0fb0d2a2da3a364b6842d7d3838

commit 69e7dab2192adc1f780464146810629ebd01b145
Author: Pixelflinger <mathias.agopian@gmail.com>
Date: Thu Oct 25 19:43:49 2012 -0700

improve fir tool: cleanup, better default, bug fixes

- all parameters can be changed on the command-line
- added float output
- added debug option
- added an option to generate a polyphase filter coefficients
- added an attenuation option in dBFS
- added a lot of comments and references
- fixed kaiser window parameter

also the default should generate a filter with 80 dB rejection
(of the 24 KHz aliasing) above 20 KHz and a 15 KHz transition
band around ~20 KHz (for 48 KHz sampling rate).
It's not very good but corresponds to the current code.

commit 8347499d105a50257c18e9dac652e750b06428b1
Author: Glenn Kasten <gkasten@google.com>
Date: Mon Oct 22 17:09:27 2012 -0700

Increase allowed number of VHQ resamplers to 3

Bug: 7378660
Change-Id: I69e33ca2eb4bb9bd38e2c63df62cd1130d68baf6

commit f91cf3cad7f5c4d52614271c89ab468741c5d24c
Author: Mathias Agopian <mathias@google.com>
Date: Sun Oct 21 03:04:05 2012 -0700

Fix a typo that caused the high quality resampler to produce garbage

the problem is that if libaudio_resampler is present, it is those
coefficients that will always be selected, but the correct
meta-data.

Bug: 7385994
Change-Id: Ieebeb37b4dfb62a1a051bc29fae2ce056dbc6621

commit e158a9e4262a174c59469a205658bc3ca4078234
Author: Dan Bornstein <danfuzz@google.com>
Date: Fri Oct 3 10:34:57 2008 -0700

Manually merge change #111620 from tc3 to mainline, to keep the

automerger from choking on it.

p4 sync
p4 integrate -r -b android_to_tc3 //...@111620,111620
p4 resolve -a
p4 resolve # resolve a couple merge travesties

PRESUBMIT=passed
BUG=1399648
TBR=edheyl
OCL=111902

Change-Id: I854b01553dd92bbf9c864f5a9bd51a3d665f0ac2
Signed-off-by: Glenn Kasten <gkasten@google.com>

commit b9f3c26032be7a6ea01a10d93d94826f449e68ab
Author: Dave Bort <dbort@google.com>
Date: Fri Jan 18 14:51:05 2008 -0800

Rename "Makefile" to "Android.mk" throughout the tree.

For <http://b/issue?id=960416>.

I've tested this as much as I can, but 1500 open files =
easy to mess things up. Please let me know if there's
a problem rather than rolling back this change.

PRESUBMIT=passed
BUG=960416
TBR=joeo
OCL=46537

Change-Id: I5a404caf0f398a7afa7ae7abaf2f2a1c6ab490eb
Signed-off-by: Glenn Kasten <gkasten@google.com>

commit 0c22a9a44c4103483fba1d944acf1354c5eb1617
Author: Mathias Agopian <mathias@google.com>
Date: Mon Oct 29 23:44:25 2007 -0700

Tweak the SINC resampler parameters and double the performance. It's using about 10% CPU in the worse case now.

Change-Id: I50ac7e6c6702a427fa36ab6d976c507155057507
Signed-off-by: Glenn Kasten <gkasten@google.com>

commit b85e41487983ad085b859acf8251e7e54480308a
Author: Mathias Agopian <mathias@google.com>
Date: Mon Oct 29 04:34:36 2007 -0700

A sinc resampler for Audioflinger. It's not enabled yet, but fully functional and apparently working. It need more "quality" tests. In the 48->44 KHz, it takes about 25% of the CPU time.

Change-Id: I80eb5185e13ebdb907e0b85c49ba1272c23d60ec
Signed-off-by: Glenn Kasten <gkasten@google.com>

commit ba3949ef17cac2ba71cc3096c413782a49c922e5
Author: Mathias Agopian <mathias@google.com>
Date: Thu Aug 23 21:01:28 2007 -0700

fix a few small typos in the FIR computation

Change-Id: I6e56b514fe520f30f7487f85c64ea5d2a7c19b40
Signed-off-by: Glenn Kasten <gkasten@google.com>

commit 7474bfa7de2604021963794dddfe44985648db6a
Author: Mathias Agopian <mathias@google.com>
Date: Thu Aug 23 03:16:02 2007 -0700

This is a tool to compute the the reconstruction filter coefficients for a sinc audio resampler.

Change-Id: I99be2505139b8e0e7647200e1647509d4f7e6067
Signed-off-by: Glenn Kasten <gkasten@google.com>

Bug: 7577965
Change-Id: I2c84a9283a1668723bad83e1a119c849c88c3e6b
udioflinger/Android.mk
udioflinger/AudioResampler.cpp
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
udioflinger/audio-resampler/AudioResamplerCoefficients.cpp
udioflinger/audio-resampler/dnsampler_filter_coefficients_x128_10112011.h
udioflinger/audio-resampler/filter_coefficients.h
udioflinger/audio-resampler/resampler_filter_coefficients_10042011.h
udioflinger/test-resample.cpp
a614426bc7e195af227a585bb0a07f43b4022d78 19-Nov-2012 Glenn Kasten <gkasten@google.com> New VHQ resampler

Squashed commit of the following:

commit 12b6952da9f25e94d06dd7185bce255924e7e791
Author: Mathias Agopian <mathias@google.com>
Date: Mon Nov 19 15:27:26 2012 -0800

fix a typo in SINC resampler that prevented tracks to be mixed

we were always erasing the current mix instead of mixing into it.

Change-Id: Ib229245f9e5a0d384f1727640a59e9f0469211a2

commit 0019ce082df430278f14ab922e900ce33b64897d
Author: Dave Bort <dbort@google.com>
Date: Tue Nov 13 01:30:32 2007 -0800

Rename "TARGET" to "MODULE" in the build system.

Part one of the grand renaming.

API_CHANGE: Third parties may need to update their makefiles.
Any variables with "LOCAL" and "TARGET" in their names
should now use "MODULE" instead of "TARGET"; e.g., LOCAL_MODULE,
LOCAL_MODULE_TAGS.

PRESUBMIT=passed
OCL=39840

Change-Id: Ica9a7937d3d9552ab84db46ac6eea8a290e404fe
Signed-off-by: Glenn Kasten <gkasten@google.com>

commit f01adc0cef0e39e75c76d9195ac26a94cac0a100
Author: Glenn Kasten <gkasten@google.com>
Date: Wed Nov 14 08:32:08 2012 -0800

Fix build warnings

Change-Id: Ic43bcca166a529a6431711b05a7fa21849b6a38b

commit 9bb031a565c753a03d9c9397edea318947d80528
Author: Mathias Agopian <mathias@google.com>
Date: Sat Nov 10 04:44:30 2012 -0800

more optimizations...

calculate the offsets from the phase differently, this happens
to reduce the register pressure in the main loop, which in turns
allows the compiler to generate much better code (doesn't need
to spill a lot of stuff on the stack).

this gives another 15% performance increase

Change-Id: I2ce3479dd48b9e6941adb80e6d443d6e14d64d96

commit 5a951598f31217b8cd2babd0720c9608ee17291a
Author: Mathias Agopian <mathias@google.com>
Date: Sat Nov 10 03:26:39 2012 -0800

refactor code to improve neon code

we want to make sure we don't transfer data from the
neon unit to the arm register file, as this can be quite
slow. instead we do all the calculation on the neon side
and write the result directly to main memory.

Change-Id: Ibb56664d3ab03098ae2798b75e2b6927ac900187

commit b381ee9e83bc9fd18986e79c7809841514ed590e
Author: Mathias Agopian <mathias@google.com>
Date: Sun Nov 4 15:16:13 2012 -0800

NEON optimized SINC resampler

this currently gives us a 60% to 80% boost depending
on the quality level selected.

Change-Id: I7db385007e811ed7bffe5fd3403b44e300894f5b

commit bea077354210242ea193a50b0dbab0fedab25df3
Author: Mathias Agopian <mathias@google.com>
Date: Mon Nov 5 01:51:37 2012 -0800

minor cleanups

Change-Id: Ia12ee4fb59e90221761bec85e6450db29197591f

commit 8f4ed7decbe161a5ff38200b218f5216d80aba46
Author: Mathias Agopian <mathias@google.com>
Date: Sun Nov 4 18:49:14 2012 -0800

improve resample test

- handle stereo input
- input file can now be ommited, in this case
a linear chirp will be used automatically
- better usage information

Change-Id: I5d62a6c26a9054a1c1a517a065b4df5a2cdcda22

commit 5fcd634ea6cb4df27c495abe20f5f9b8ff55d128
Author: Mathias Agopian <mathias@google.com>
Date: Sun Nov 4 02:03:49 2012 -0800

change how we store the FIR coefficients

The coefficient table is now transposed and shows
much better its polyphase nature: we now have a FIR
per line, each line corresponding to a phase.

This doesn't change at all the results produced by
the filter, but allows us to make slightly better
use of the data cache and improves performance a bit
(although not as much as I thought it would).

The main benefit is that it is the first step
before we can make much larger optimizations
(like using NEON).

Change-Id: Iebf7695825dcbd41f25861efcaefbaa3365ecb43

commit d652231abf4c7e2ea1fc89caae730cec1f7259a1
Author: Mathias Agopian <mathias@google.com>
Date: Sat Nov 3 23:37:53 2012 -0700

improve SINC resampler performance

The improvement is about 60% by just tweaking a few
things to help the compiler generate better code.
It turns out that inlining too much stuff manually was hurting us.

Change-Id: I8068f0f75051f95ac600e50ce552572dd1e8c304

commit 9dc68ef5b94c700c4ee68790e8cbb334c90a538d
Author: Mathias Agopian <mathias@google.com>
Date: Thu Nov 1 21:03:46 2012 -0700

new coefficients for the vhq resampler

previous coefficients were provided by a 3rd party and didn't have a
way to re-generate them. we're now using the 'fir' utility.

the performance of the filter is virtually identical, except for
the down-sampling case which seems slightly better now:
It looks like both the previous and new coefficients are generating
some sort of clipping for full-scale signals in the down-sampling case
(although the new ones seem better), the reason for that is
unknown (see bug: 7453062)

Also updated the HQ coefficients for the down-samplers, previous ones
were a little bit too conservative -- the new ones push the cut-off
frequency up by about 1 KHz.

Change-Id: I54a827b5c707c7cc41268ed01283758dce1d7647

commit 38e0b8560a6fc1b7124e22e0e09a84a285182f8e
Author: Mathias Agopian <mathias@google.com>
Date: Tue Oct 30 13:51:44 2012 -0700

fix SINC resampler on non ARM architectures

make sure the C version of the code generates the same
output than the ARM assemply version.

Change-Id: Ide218785c35d02598b2d7278e646b1b178148698

commit a1878128b182696ba508569b4d211d0dfae92463
Author: Mathias Agopian <mathias@google.com>
Date: Tue Oct 30 12:49:07 2012 -0700

fix another issue with generating FIR coefficients

the impulse response of a low-pass is 2*f*sinc(2*pi*f*k), we were
missing the 2*f scale factor. This explains why we were seeing
clipping and had to manually scale the filter down.

Change-Id: I86d0bb82ecdd99681c8ba5a8112a8257bf6f0186

commit 1a0fb993430acc9f601e6c538305bc407c20ac5d
Author: Mathias Agopian <mathias@google.com>
Date: Mon Oct 29 17:13:20 2012 -0700

fir a typo that caused up-sampling coefficiens to be wrong

up-sample coefficient were generated with a cut-off frequency of 24KHz
intead of ~20KHz, which caused more aliasing in the audible band.

also increased the attenuation to 1.3 dB on both up and down
sampling coefficient to avoid clipping.

Change-Id: Ie8aeecf1429190541b656810c6716b6aae5ece2e

commit 9520ad6862bd682ad075a9d9e3e94ada9f6e58b6
Author: Mathias Agopian <mathias@google.com>
Date: Mon Oct 29 17:13:16 2012 -0700

test-resample: clip instead of overflowing

Change-Id: I550e5a59e51c11e1095ca338222b094f92b96878

commit ba36656300f250f7f1fdeb75149749344260e6cb
Author: Mathias Agopian <mathias@google.com>
Date: Sun Oct 21 01:01:38 2012 -0700

a test app for the resamplers

Change-Id: I66852d90d384f1d9e77b51ad1a1ebdbaf61d0607

commit 056a08b9bfd33cf27228c992adc8293a56b01be8
Author: Mathias Agopian <mathias@google.com>
Date: Fri Oct 26 14:11:01 2012 -0700

reenable the cubic resampler

cubic resampler was disabled because it hadn't been qualified,
however after I did some tests, it does improve significantly
the sound quality over the order-1 resampler, even if it is
still quite bad.

also HIGH_QUALITY resampler was partially disabled, it's now
fully enabled. It's a big improvement over the cubic resampler
in terms of aliasing noise (it's not as good in the pass-band).

Change-Id: I70e3658c255896588642697be9eb594ff4ec0f8b

commit 8c0241d3ff50ae85167f69b3bd369244894cfa44
Author: Mathias Agopian <mathias@google.com>
Date: Fri Oct 26 13:48:42 2012 -0700

improve SINC resampler coefficients

- we increase the interpolation precision from 4 to 7 bits
this doesn't increase CPU power required, it only increases the
size of the filter table but significantly reduces the noise
introduced by the quantization of the impulse response.

- the parameters of the filter are set such that aliasing is
rejected at 80 dB below 20 KHz. Because we don't use a lot of
coefficient (to save compute power), there are quite a bit of
attenuation in the pass-band: starting at 9KHz for the
down-sampler (48 to 44.1), and starting at 13 KHz for the
up-sampler (44.1 to 48) -- the transition band is about 15 KHz.

Change-Id: I855548d2aab8a0fb0d2a2da3a364b6842d7d3838

commit 69e7dab2192adc1f780464146810629ebd01b145
Author: Pixelflinger <mathias.agopian@gmail.com>
Date: Thu Oct 25 19:43:49 2012 -0700

improve fir tool: cleanup, better default, bug fixes

- all parameters can be changed on the command-line
- added float output
- added debug option
- added an option to generate a polyphase filter coefficients
- added an attenuation option in dBFS
- added a lot of comments and references
- fixed kaiser window parameter

also the default should generate a filter with 80 dB rejection
(of the 24 KHz aliasing) above 20 KHz and a 15 KHz transition
band around ~20 KHz (for 48 KHz sampling rate).
It's not very good but corresponds to the current code.

commit 8347499d105a50257c18e9dac652e750b06428b1
Author: Glenn Kasten <gkasten@google.com>
Date: Mon Oct 22 17:09:27 2012 -0700

Increase allowed number of VHQ resamplers to 3

Bug: 7378660
Change-Id: I69e33ca2eb4bb9bd38e2c63df62cd1130d68baf6

commit f91cf3cad7f5c4d52614271c89ab468741c5d24c
Author: Mathias Agopian <mathias@google.com>
Date: Sun Oct 21 03:04:05 2012 -0700

Fix a typo that caused the high quality resampler to produce garbage

the problem is that if libaudio_resampler is present, it is those
coefficients that will always be selected, but the correct
meta-data.

Bug: 7385994
Change-Id: Ieebeb37b4dfb62a1a051bc29fae2ce056dbc6621

commit e158a9e4262a174c59469a205658bc3ca4078234
Author: Dan Bornstein <danfuzz@google.com>
Date: Fri Oct 3 10:34:57 2008 -0700

Manually merge change #111620 from tc3 to mainline, to keep the

automerger from choking on it.

p4 sync
p4 integrate -r -b android_to_tc3 //...@111620,111620
p4 resolve -a
p4 resolve # resolve a couple merge travesties

PRESUBMIT=passed
BUG=1399648
TBR=edheyl
OCL=111902

Change-Id: I854b01553dd92bbf9c864f5a9bd51a3d665f0ac2
Signed-off-by: Glenn Kasten <gkasten@google.com>

commit b9f3c26032be7a6ea01a10d93d94826f449e68ab
Author: Dave Bort <dbort@google.com>
Date: Fri Jan 18 14:51:05 2008 -0800

Rename "Makefile" to "Android.mk" throughout the tree.

For <http://b/issue?id=960416>.

I've tested this as much as I can, but 1500 open files =
easy to mess things up. Please let me know if there's
a problem rather than rolling back this change.

PRESUBMIT=passed
BUG=960416
TBR=joeo
OCL=46537

Change-Id: I5a404caf0f398a7afa7ae7abaf2f2a1c6ab490eb
Signed-off-by: Glenn Kasten <gkasten@google.com>

commit 0c22a9a44c4103483fba1d944acf1354c5eb1617
Author: Mathias Agopian <mathias@google.com>
Date: Mon Oct 29 23:44:25 2007 -0700

Tweak the SINC resampler parameters and double the performance. It's using about 10% CPU in the worse case now.

Change-Id: I50ac7e6c6702a427fa36ab6d976c507155057507
Signed-off-by: Glenn Kasten <gkasten@google.com>

commit b85e41487983ad085b859acf8251e7e54480308a
Author: Mathias Agopian <mathias@google.com>
Date: Mon Oct 29 04:34:36 2007 -0700

A sinc resampler for Audioflinger. It's not enabled yet, but fully functional and apparently working. It need more "quality" tests. In the 48->44 KHz, it takes about 25% of the CPU time.

Change-Id: I80eb5185e13ebdb907e0b85c49ba1272c23d60ec
Signed-off-by: Glenn Kasten <gkasten@google.com>

commit ba3949ef17cac2ba71cc3096c413782a49c922e5
Author: Mathias Agopian <mathias@google.com>
Date: Thu Aug 23 21:01:28 2007 -0700

fix a few small typos in the FIR computation

Change-Id: I6e56b514fe520f30f7487f85c64ea5d2a7c19b40
Signed-off-by: Glenn Kasten <gkasten@google.com>

commit 7474bfa7de2604021963794dddfe44985648db6a
Author: Mathias Agopian <mathias@google.com>
Date: Thu Aug 23 03:16:02 2007 -0700

This is a tool to compute the the reconstruction filter coefficients for a sinc audio resampler.

Change-Id: I99be2505139b8e0e7647200e1647509d4f7e6067
Signed-off-by: Glenn Kasten <gkasten@google.com>

Bug: 7577965
Change-Id: I2c84a9283a1668723bad83e1a119c849c88c3e6b
udioflinger/Android.mk
udioflinger/AudioResampler.cpp
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
udioflinger/audio-resampler/AudioResamplerCoefficients.cpp
udioflinger/audio-resampler/dnsampler_filter_coefficients_x128_10112011.h
udioflinger/audio-resampler/filter_coefficients.h
udioflinger/audio-resampler/resampler_filter_coefficients_10042011.h
udioflinger/test-resample.cpp
aa9e3e01b86bd9bfb5ac36c0f360d5fe478cbb2d 26-Nov-2012 Igor Murashkin <iam@google.com> Camera: Play shutter sound iff enableShutterSound(true) && ShutterCallback !null

Bug: 7564718
Change-Id: Ie7821cdee57966d88af048759578439a3e6ecb2e
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/CaptureSequencer.h
786a8daf400df7b49f6a7c19a5cea9b504d6aa9e 26-Nov-2012 Igor Murashkin <iam@google.com> Camera: Play shutter sound iff enableShutterSound(true) && ShutterCallback !null

Bug: 7564718
Change-Id: Ie7821cdee57966d88af048759578439a3e6ecb2e
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/CaptureSequencer.h
eac37593f82855e980524f8c8c4441c21bba18e6 20-Nov-2012 Eric Laurent <elaurent@google.com> Merge "AudioFlinger files reorganization"
da398117aff410e1856299450ef6ca4faddad75c 20-Nov-2012 Eric Laurent <elaurent@google.com> Merge "AudioFlinger files reorganization"
81784c37c61b09289654b979567a42bf73cd2b12 19-Nov-2012 Eric Laurent <elaurent@google.com> AudioFlinger files reorganization

Audioflinger.cpp and Audioflinger.h files must be split to
improve readability and maintainability.

This CL splits the files as follows:

AudioFlinger.cpp split into:
- AudioFlinger.cpp: implementation of IAudioflinger interface and global methods
- AFThreads.cpp: implementation of ThreadBase, PlaybackThread, MixerThread,
DuplicatingThread, DirectOutputThread and RecordThread.
- AFTracks.cpp: implementation of TrackBase, Track, TimedTrack, OutputTrack,
RecordTrack, TrackHandle and RecordHandle.
- AFEffects.cpp: implementation of EffectModule, EffectChain and EffectHandle.

AudioFlinger.h is modified by inline inclusion of header files containing
the declaration of complex inner classes:
- AFThreads.h: ThreadBase, PlaybackThread, MixerThread, DuplicatingThread,
DirectOutputThread and RecordThread
- AFEffects.h: EffectModule, EffectChain and EffectHandle

AFThreads.h includes the follownig headers inline:
- AFTrackBase.h: TrackBase
- AFPlaybackTracks: Track, TimedTrack, OutputTrack
- AFRecordTracks: RecordTrack

Change-Id: I512ebc3a51813ab7a4afccc9a538b18125165c4c
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Effects.cpp
udioflinger/Effects.h
udioflinger/PlaybackTracks.h
udioflinger/RecordTracks.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/TrackBase.h
udioflinger/Tracks.cpp
ca7cc8273ffd88b9b89655808ee7e3df74162b83 19-Nov-2012 Eric Laurent <elaurent@google.com> AudioFlinger files reorganization

Audioflinger.cpp and Audioflinger.h files must be split to
improve readability and maintainability.

This CL splits the files as follows:

AudioFlinger.cpp split into:
- AudioFlinger.cpp: implementation of IAudioflinger interface and global methods
- AFThreads.cpp: implementation of ThreadBase, PlaybackThread, MixerThread,
DuplicatingThread, DirectOutputThread and RecordThread.
- AFTracks.cpp: implementation of TrackBase, Track, TimedTrack, OutputTrack,
RecordTrack, TrackHandle and RecordHandle.
- AFEffects.cpp: implementation of EffectModule, EffectChain and EffectHandle.

AudioFlinger.h is modified by inline inclusion of header files containing
the declaration of complex inner classes:
- AFThreads.h: ThreadBase, PlaybackThread, MixerThread, DuplicatingThread,
DirectOutputThread and RecordThread
- AFEffects.h: EffectModule, EffectChain and EffectHandle

AFThreads.h includes the follownig headers inline:
- AFTrackBase.h: TrackBase
- AFPlaybackTracks: Track, TimedTrack, OutputTrack
- AFRecordTracks: RecordTrack

Change-Id: I512ebc3a51813ab7a4afccc9a538b18125165c4c
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Effects.cpp
udioflinger/Effects.h
udioflinger/PlaybackTracks.h
udioflinger/RecordTracks.h
udioflinger/Threads.cpp
udioflinger/Threads.h
udioflinger/TrackBase.h
udioflinger/Tracks.cpp
d6864faccd19096b72d32481a3cc475e6d36e50d 20-Nov-2012 Mathias Agopian <mathias@google.com> fix a typo in SINC resampler that prevented tracks to be mixed

we were always erasing the current mix instead of mixing into it.

Change-Id: Ib229245f9e5a0d384f1727640a59e9f0469211a2
udioflinger/AudioResamplerSinc.cpp
bc9ea63daaad764d242ce0eadfeb697abb9ce34e 20-Nov-2012 Mathias Agopian <mathias@google.com> fix a typo in SINC resampler that prevented tracks to be mixed

we were always erasing the current mix instead of mixing into it.

Change-Id: Ib229245f9e5a0d384f1727640a59e9f0469211a2
udioflinger/AudioResamplerSinc.cpp
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
d65d73c4ae74d084751b417615a78cbe7a51372a 23-Jun-2012 Glenn Kasten <gkasten@google.com> "if" statements use curly braces per media style

Change-Id: I130e7849fd1da7a0b7fe56c3c53919d26e3843b8
udioflinger/AudioFlinger.cpp
a204922b4c04633a4e9896db3c40763bcf921ade 23-Jun-2012 Glenn Kasten <gkasten@google.com> "if" statements use curly braces per media style

Change-Id: I130e7849fd1da7a0b7fe56c3c53919d26e3843b8
udioflinger/AudioFlinger.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
udioflinger/AudioFlinger.cpp
udioflinger/AudioPolicyService.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
udioflinger/AudioFlinger.cpp
udioflinger/AudioPolicyService.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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
d983364b3655a547b55bb11dbe148103198c011d 15-Nov-2012 Glenn Kasten <gkasten@google.com> Static AudioTrack plays twice initially

Bug: 7528721
Change-Id: I10bc16a26f33dba6572b730a170cb3bf00e68e30
udioflinger/AudioFlinger.cpp
35436ad21902edf83e3c1307b45b38d13137d31c 15-Nov-2012 Glenn Kasten <gkasten@google.com> Static AudioTrack plays twice initially

Bug: 7528721
Change-Id: I10bc16a26f33dba6572b730a170cb3bf00e68e30
udioflinger/AudioFlinger.cpp
aac817e6685a51843e84c23d970b3d559e74e8f6 16-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Use size_t for frame counts"
56938ef8dc82b49ddbc201a8855c91ba46d73bfb 16-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Use size_t for frame counts"
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
4bd7e5436f9c308503d72e80804fb5637fda1584 15-Nov-2012 Glenn Kasten <gkasten@google.com> Static AudioTrack plays twice initially

Bug: 7528721
Change-Id: I10bc16a26f33dba6572b730a170cb3bf00e68e30
udioflinger/AudioFlinger.cpp
5b78fc92d9e64623be66a5c3031b54dcd8ed28f9 15-Nov-2012 Glenn Kasten <gkasten@google.com> Static AudioTrack plays twice initially

Bug: 7528721
Change-Id: I10bc16a26f33dba6572b730a170cb3bf00e68e30
udioflinger/AudioFlinger.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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
3b16c766d1ae2cfd8487e8ffb2b23936fc0a8e17 14-Nov-2012 Glenn Kasten <gkasten@google.com> Use uint32_t for sample rate

Change-Id: Ie240b48fb54b08359f69ecd4e5f8bda3d15cbe80
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
1127d65d536ebbe447ee17ce0926a7ce4a2a3c08 14-Nov-2012 Glenn Kasten <gkasten@google.com> Use uint32_t for sample rate

Change-Id: Ie240b48fb54b08359f69ecd4e5f8bda3d15cbe80
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
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"
acc8706f91f799ea63c10ecad4959c55e0873d93 15-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Fix build warnings"
a9749e3468fda2288dda65d1ef52e0997f6d8897 15-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Fix build warnings"
30ca3be314993fb4155bee1a17a4b76354cd6ef9 14-Nov-2012 Mathias Agopian <mathias@google.com> Merge changes I2ce3479d,Ibb56664d

* changes:
more optimizations...
refactor code to improve neon code
656130a7bcff790dc9311754189d46bd4b911fbf 14-Nov-2012 Mathias Agopian <mathias@google.com> Merge changes I2ce3479d,Ibb56664d

* changes:
more optimizations...
refactor code to improve neon code
22eb4e239fbe9103568147d566d7482e480350b8 07-Nov-2012 Glenn Kasten <gkasten@google.com> Update audio comments

Change-Id: I85d7d2f6381b251db5695202fec75128883a8662
udioflinger/AudioFlinger.h
udioflinger/StateQueue.h
020f79fd967736d36c7ec860814e2e93866a020f 07-Nov-2012 Glenn Kasten <gkasten@google.com> Update audio comments

Change-Id: I85d7d2f6381b251db5695202fec75128883a8662
udioflinger/AudioFlinger.h
udioflinger/StateQueue.h
b26e3e9f2ab0334bff21a4fa4851dbf6e57fba5d 14-Nov-2012 Glenn Kasten <gkasten@google.com> Fix build warnings

Change-Id: Ic43bcca166a529a6431711b05a7fa21849b6a38b
udioflinger/test-resample.cpp
98d9922247ef21b0faf8c7d817650b8327052a4a 14-Nov-2012 Glenn Kasten <gkasten@google.com> Fix build warnings

Change-Id: Ic43bcca166a529a6431711b05a7fa21849b6a38b
udioflinger/test-resample.cpp
9f2016d9adfb4f88fa0bbfcfa5954f79160db595 13-Nov-2012 Glenn Kasten <gkasten@google.com> Rename TrackBase::mFrameCount to mStepCount

This prepares for adding a new field TrackBase::mFrameCount
with a different meaning.

Change-Id: I6bbe2c59f2a882be57caeec2e2e06f439a0e9e83
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
e2a0586eae45a3eb1fad0f28ca2f8b0204d78df6 13-Nov-2012 Glenn Kasten <gkasten@google.com> Rename TrackBase::mFrameCount to mStepCount

This prepares for adding a new field TrackBase::mFrameCount
with a different meaning.

Change-Id: I6bbe2c59f2a882be57caeec2e2e06f439a0e9e83
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
7492a7ff46a75b5d8e10ae11d4ad50429cf945ce 10-Nov-2012 Mathias Agopian <mathias@google.com> more optimizations...

calculate the offsets from the phase differently, this happens
to reduce the register pressure in the main loop, which in turns
allows the compiler to generate much better code (doesn't need
to spill a lot of stuff on the stack).

this gives another 15% performance increase

Change-Id: I2ce3479dd48b9e6941adb80e6d443d6e14d64d96
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
5d3370d0db4dc97fa413a302e426fb24e87462be 10-Nov-2012 Mathias Agopian <mathias@google.com> more optimizations...

calculate the offsets from the phase differently, this happens
to reduce the register pressure in the main loop, which in turns
allows the compiler to generate much better code (doesn't need
to spill a lot of stuff on the stack).

this gives another 15% performance increase

Change-Id: I2ce3479dd48b9e6941adb80e6d443d6e14d64d96
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
0d585c85524eb5d398fadff5ca8dd43939ed9cb4 10-Nov-2012 Mathias Agopian <mathias@google.com> refactor code to improve neon code

we want to make sure we don't transfer data from the
neon unit to the arm register file, as this can be quite
slow. instead we do all the calculation on the neon side
and write the result directly to main memory.

Change-Id: Ibb56664d3ab03098ae2798b75e2b6927ac900187
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
3c11ff2f409a0abb5b9d8ffd5e13cc42cda67fdc 10-Nov-2012 Mathias Agopian <mathias@google.com> refactor code to improve neon code

we want to make sure we don't transfer data from the
neon unit to the arm register file, as this can be quite
slow. instead we do all the calculation on the neon side
and write the result directly to main memory.

Change-Id: Ibb56664d3ab03098ae2798b75e2b6927ac900187
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
e35a582d02586cb43ad9e344138b4edad62868b3 09-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Move buffers pointer out of the control block"
3f6f4393d0adf4465959059d69798aed55e34876 09-Nov-2012 Glenn Kasten <gkasten@google.com> Merge "Move buffers pointer out of the control block"
ad9af03c4b491912239fc8c97a3ad0d342a33303 05-Nov-2012 Mathias Agopian <mathias@google.com> NEON optimized SINC resampler

this currently gives us a 60% to 80% boost depending
on the quality level selected.

Change-Id: I7db385007e811ed7bffe5fd3403b44e300894f5b
udioflinger/AudioResamplerSinc.cpp
udioflinger/test-resample.cpp
c6ccbabd2800e749bc86a34d2ae233f99102ba51 05-Nov-2012 Mathias Agopian <mathias@google.com> NEON optimized SINC resampler

this currently gives us a 60% to 80% boost depending
on the quality level selected.

Change-Id: I7db385007e811ed7bffe5fd3403b44e300894f5b
udioflinger/AudioResamplerSinc.cpp
udioflinger/test-resample.cpp
7aa7ed773040ea60bbe0a2a6ea949d62802304a4 05-Nov-2012 Mathias Agopian <mathias@google.com> minor cleanups

Change-Id: Ia12ee4fb59e90221761bec85e6450db29197591f
udioflinger/AudioResamplerSinc.cpp
af03dfb73d05dfabdf55640aff8b2256fdd78663 05-Nov-2012 Mathias Agopian <mathias@google.com> minor cleanups

Change-Id: Ia12ee4fb59e90221761bec85e6450db29197591f
udioflinger/AudioResamplerSinc.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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
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"
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
879256758603bac0e4718ab88db145f19f70027b 07-Nov-2012 Mathias Agopian <mathias@google.com> Merge changes I5d62a6c2,Iebf76958,I8068f0f7

* changes:
improve resample test
change how we store the FIR coefficients
improve SINC resampler performance
3929402c7e3d9865cdeabedf291e1c4a1db48ce7 07-Nov-2012 Mathias Agopian <mathias@google.com> Merge changes I5d62a6c2,Iebf76958,I8068f0f7

* changes:
improve resample test
change how we store the FIR coefficients
improve SINC resampler performance
287fedb1b1430f138c1f583869b10294773945be 05-Nov-2012 Glenn Kasten <gkasten@google.com> Merge duplicate code in TrackBase::TrackBase()

Change-Id: Id8a7db4d94888796a9dcbed4cac99941705cd174
udioflinger/AudioFlinger.cpp
ac65726b26a63635d3461f96b4b979add5a8f7dc 05-Nov-2012 Glenn Kasten <gkasten@google.com> Merge duplicate code in TrackBase::TrackBase()

Change-Id: Id8a7db4d94888796a9dcbed4cac99941705cd174
udioflinger/AudioFlinger.cpp
9c5fdd83f9b9f49be35107971feb33528d60b945 05-Nov-2012 Glenn Kasten <gkasten@google.com> Simplify control block flag names

Use only one symbol per flag

Change-Id: Ia3582e2134abd60c896d11337face65383e79c7c
udioflinger/AudioFlinger.cpp
d12b033552585cd8761ba6241f21e4cea4a21878 05-Nov-2012 Glenn Kasten <gkasten@google.com> Simplify control block flag names

Use only one symbol per flag

Change-Id: Ia3582e2134abd60c896d11337face65383e79c7c
udioflinger/AudioFlinger.cpp
3f71761cab8a08e4ae9e4cf8cb8f1b82643825b2 05-Nov-2012 Mathias Agopian <mathias@google.com> improve resample test

- handle stereo input
- input file can now be ommited, in this case
a linear chirp will be used automatically
- better usage information

Change-Id: I5d62a6c26a9054a1c1a517a065b4df5a2cdcda22
udioflinger/test-resample.cpp
7df17073f1783421d6ed2013e6b55c60283d1474 05-Nov-2012 Mathias Agopian <mathias@google.com> improve resample test

- handle stereo input
- input file can now be ommited, in this case
a linear chirp will be used automatically
- better usage information

Change-Id: I5d62a6c26a9054a1c1a517a065b4df5a2cdcda22
udioflinger/test-resample.cpp
46afbec3743f1d799f185273ff897d1f8e0175dd 04-Nov-2012 Mathias Agopian <mathias@google.com> change how we store the FIR coefficients

The coefficient table is now transposed and shows
much better its polyphase nature: we now have a FIR
per line, each line corresponding to a phase.

This doesn't change at all the results produced by
the filter, but allows us to make slightly better
use of the data cache and improves performance a bit
(although not as much as I thought it would).

The main benefit is that it is the first step
before we can make much larger optimizations
(like using NEON).

Change-Id: Iebf7695825dcbd41f25861efcaefbaa3365ecb43
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
udioflinger/audio-resampler/filter_coefficients.h
e8299af5665bf9c396466c33b9b16a84fe78c7f6 04-Nov-2012 Mathias Agopian <mathias@google.com> change how we store the FIR coefficients

The coefficient table is now transposed and shows
much better its polyphase nature: we now have a FIR
per line, each line corresponding to a phase.

This doesn't change at all the results produced by
the filter, but allows us to make slightly better
use of the data cache and improves performance a bit
(although not as much as I thought it would).

The main benefit is that it is the first step
before we can make much larger optimizations
(like using NEON).

Change-Id: Iebf7695825dcbd41f25861efcaefbaa3365ecb43
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
udioflinger/audio-resampler/filter_coefficients.h
a798c97386a842d06d290797ba5dce95d031332a 04-Nov-2012 Mathias Agopian <mathias@google.com> improve SINC resampler performance

The improvement is about 60% by just tweaking a few
things to help the compiler generate better code.
It turns out that inlining too much stuff manually was hurting us.

Change-Id: I8068f0f75051f95ac600e50ce552572dd1e8c304
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
50ebdf2086b645b9b703a6d489238767a9afb34f 04-Nov-2012 Mathias Agopian <mathias@google.com> improve SINC resampler performance

The improvement is about 60% by just tweaking a few
things to help the compiler generate better code.
It turns out that inlining too much stuff manually was hurting us.

Change-Id: I8068f0f75051f95ac600e50ce552572dd1e8c304
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
f27bdebd0c611f9618577f65346f44574146dc00 02-Nov-2012 Mathias Agopian <mathias@google.com> Merge "new coefficients for the vhq resampler"
fb242fa66643d1bd5362077a44c02c86c8064564 02-Nov-2012 Mathias Agopian <mathias@google.com> Merge "new coefficients for the vhq resampler"
4ed475d3ad4231370371e14a94779c5d300eb3c5 02-Nov-2012 Mathias Agopian <mathias@google.com> new coefficients for the vhq resampler

previous coefficients were provided by a 3rd party and didn't have a
way to re-generate them. we're now using the 'fir' utility.

the performance of the filter is virtually identical, except for
the down-sampling case which seems slightly better now:
It looks like both the previous and new coefficients are generating
some sort of clipping for full-scale signals in the down-sampling case
(although the new ones seem better), the reason for that is
unknown (see bug: 7453062)

Also updated the HQ coefficients for the down-samplers, previous ones
were a little bit too conservative -- the new ones push the cut-off
frequency up by about 1 KHz.

Change-Id: I54a827b5c707c7cc41268ed01283758dce1d7647
udioflinger/AudioResamplerSinc.cpp
udioflinger/audio-resampler/AudioResamplerCoefficients.cpp
udioflinger/audio-resampler/dnsampler_filter_coefficients_x128_10112011.h
udioflinger/audio-resampler/filter_coefficients.h
udioflinger/audio-resampler/resampler_filter_coefficients_10042011.h
c5b0b9a13a29be483173f092663ed17ea306ac0d 02-Nov-2012 Mathias Agopian <mathias@google.com> new coefficients for the vhq resampler

previous coefficients were provided by a 3rd party and didn't have a
way to re-generate them. we're now using the 'fir' utility.

the performance of the filter is virtually identical, except for
the down-sampling case which seems slightly better now:
It looks like both the previous and new coefficients are generating
some sort of clipping for full-scale signals in the down-sampling case
(although the new ones seem better), the reason for that is
unknown (see bug: 7453062)

Also updated the HQ coefficients for the down-samplers, previous ones
were a little bit too conservative -- the new ones push the cut-off
frequency up by about 1 KHz.

Change-Id: I54a827b5c707c7cc41268ed01283758dce1d7647
udioflinger/AudioResamplerSinc.cpp
udioflinger/audio-resampler/AudioResamplerCoefficients.cpp
udioflinger/audio-resampler/dnsampler_filter_coefficients_x128_10112011.h
udioflinger/audio-resampler/filter_coefficients.h
udioflinger/audio-resampler/resampler_filter_coefficients_10042011.h
85ab62c4b433df3f1a9826bed1c9bec07a86c750 01-Nov-2012 Glenn Kasten <gkasten@google.com> Line length 100

Change-Id: Ib28fd7b9ce951a6933f006e7f8812ba617625530
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
udioflinger/test-resample.cpp
8af901cdea0af7e536579dee6d56e69987035a01 01-Nov-2012 Glenn Kasten <gkasten@google.com> Line length 100

Change-Id: Ib28fd7b9ce951a6933f006e7f8812ba617625530
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
udioflinger/test-resample.cpp
d06785bebf7e43d4a011b62a252771373ada910c 30-Sep-2012 Glenn Kasten <gkasten@google.com> Save copy of mic input, disabled by default

Change-Id: I4f5e95a5ddf016530d1b2747a0a5ca0962caabda
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
8c32734c1e2dda852011fc46d0caded971464bc2 30-Sep-2012 Glenn Kasten <gkasten@google.com> Save copy of mic input, disabled by default

Change-Id: I4f5e95a5ddf016530d1b2747a0a5ca0962caabda
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
a2757a0ef4ccffd01864dcc643726d26838d562b 31-Oct-2012 Glenn Kasten <gkasten@google.com> Merge "StateQueue comments"
901475744e15d8a4728cb111e510624377abaec3 31-Oct-2012 Glenn Kasten <gkasten@google.com> Merge "StateQueue comments"
b7d55a839356ad55316b5dd5b83396b69d391ce3 31-Oct-2012 Glenn Kasten <gkasten@google.com> Merge "Remove obsolete references to libmedia_native"
be58bd19f4b99e04651cff0dfc968248f5b0e440 31-Oct-2012 Glenn Kasten <gkasten@google.com> Merge "Remove obsolete references to libmedia_native"
670d4b7520bca8c6b3c59db2640698358d83aca6 30-Oct-2012 Mathias Agopian <mathias@google.com> Merge changes Ide218785,I86d0bb82

* changes:
fix SINC resampler on non ARM architectures
fix another issue with generating FIR coefficients
d55d23209bb90ff7bd7443d1b54fa07c0ed8d14f 30-Oct-2012 Mathias Agopian <mathias@google.com> Merge changes Ide218785,I86d0bb82

* changes:
fix SINC resampler on non ARM architectures
fix another issue with generating FIR coefficients
1f09b4ada212d259b531228db67ca160d280275c 30-Oct-2012 Mathias Agopian <mathias@google.com> fix SINC resampler on non ARM architectures

make sure the C version of the code generates the same
output than the ARM assemply version.

Change-Id: Ide218785c35d02598b2d7278e646b1b178148698
udioflinger/AudioResamplerSinc.cpp
d7a3c142b3ce4ed26e025533f57bef9e4ec58740 30-Oct-2012 Mathias Agopian <mathias@google.com> fix SINC resampler on non ARM architectures

make sure the C version of the code generates the same
output than the ARM assemply version.

Change-Id: Ide218785c35d02598b2d7278e646b1b178148698
udioflinger/AudioResamplerSinc.cpp
d88a051aff15fdf5c57e1e5a4083bbd9635af3ad 30-Oct-2012 Mathias Agopian <mathias@google.com> fix another issue with generating FIR coefficients

the impulse response of a low-pass is 2*f*sinc(2*pi*f*k), we were
missing the 2*f scale factor. This explains why we were seeing
clipping and had to manually scale the filter down.

Change-Id: I86d0bb82ecdd99681c8ba5a8112a8257bf6f0186
udioflinger/AudioResamplerSinc.cpp
cca56d5784c02a5f02ce5e47c3d6583d71a2469b 30-Oct-2012 Mathias Agopian <mathias@google.com> fix another issue with generating FIR coefficients

the impulse response of a low-pass is 2*f*sinc(2*pi*f*k), we were
missing the 2*f scale factor. This explains why we were seeing
clipping and had to manually scale the filter down.

Change-Id: I86d0bb82ecdd99681c8ba5a8112a8257bf6f0186
udioflinger/AudioResamplerSinc.cpp
c41590251aa84c078c942d258e838aad814b73a5 30-Oct-2012 Glenn Kasten <gkasten@google.com> Remove obsolete references to libmedia_native

Bug: 6654403
Change-Id: I3993d62987cf0dd85db10bf002a5cce53d4f01bd
udioflinger/Android.mk
amera/libcameraservice/Android.mk
faa4420344216ccbad15a49aa7c1cd6141532fcb 30-Oct-2012 Glenn Kasten <gkasten@google.com> Remove obsolete references to libmedia_native

Bug: 6654403
Change-Id: I3993d62987cf0dd85db10bf002a5cce53d4f01bd
udioflinger/Android.mk
amera/libcameraservice/Android.mk
0eac0714e9fbd6e43b1fd13a38131800b2a81377 30-Oct-2012 Glenn Kasten <gkasten@google.com> Merge "Document AudioMixer hard-coded limits"
b387e0f0e3338b4e19055d6ec2b79c04314251b3 30-Oct-2012 Glenn Kasten <gkasten@google.com> Merge "Document AudioMixer hard-coded limits"
db3a20ea484514f7f23d4ef3c30fe4780ab940d2 30-Oct-2012 Glenn Kasten <gkasten@google.com> Merge "Use ALOGVV instead of commented ALOGV"
f84d5761c5f12bb75af492de27d9bc5491e5667d 30-Oct-2012 Glenn Kasten <gkasten@google.com> Merge "Use ALOGVV instead of commented ALOGV"
bf1d047d6759c624139bfe9897dc3062d2e446e2 30-Oct-2012 Glenn Kasten <gkasten@google.com> Merge "Clean up constructor and derivation whitespace"
3b0389dd5f611db1f65dcae88d0f6b332e447d7a 30-Oct-2012 Glenn Kasten <gkasten@google.com> Merge "Clean up constructor and derivation whitespace"
eb79904784c9479ae6fb60202c47e5287c058c4a 30-Oct-2012 Glenn Kasten <gkasten@google.com> Merge "Mark volume fields private"
a6d7d340cee564d41e7594a22233cab3d1ee26d9 30-Oct-2012 Glenn Kasten <gkasten@google.com> Merge "Mark volume fields private"
b4b75b47c2a4248e60bbc3229d6acc4d5f872431 30-Oct-2012 Mathias Agopian <mathias@google.com> fir a typo that caused up-sampling coefficiens to be wrong

up-sample coefficient were generated with a cut-off frequency of 24KHz
intead of ~20KHz, which caused more aliasing in the audible band.

also increased the attenuation to 1.3 dB on both up and down
sampling coefficient to avoid clipping.

Change-Id: Ie8aeecf1429190541b656810c6716b6aae5ece2e
udioflinger/AudioResamplerSinc.cpp
7c4349fe6e1e4faaa0c0db40a74f2ccbac46f57e 30-Oct-2012 Mathias Agopian <mathias@google.com> fir a typo that caused up-sampling coefficiens to be wrong

up-sample coefficient were generated with a cut-off frequency of 24KHz
intead of ~20KHz, which caused more aliasing in the audible band.

also increased the attenuation to 1.3 dB on both up and down
sampling coefficient to avoid clipping.

Change-Id: Ie8aeecf1429190541b656810c6716b6aae5ece2e
udioflinger/AudioResamplerSinc.cpp
9aec8c3f7f72cd36a8e3d7aafc1149f50514087a 30-Oct-2012 Mathias Agopian <mathias@google.com> test-resample: clip instead of overflowing

Change-Id: I550e5a59e51c11e1095ca338222b094f92b96878
udioflinger/test-resample.cpp
3e48fd11e3fca5c1d03354a99657298e110be56a 30-Oct-2012 Mathias Agopian <mathias@google.com> test-resample: clip instead of overflowing

Change-Id: I550e5a59e51c11e1095ca338222b094f92b96878
udioflinger/test-resample.cpp
26dd66e8ea7a1abf28c33196fc77822f68a718af 19-Oct-2012 Glenn Kasten <gkasten@google.com> Use ALOGVV instead of commented ALOGV

Change-Id: I17bdb5274877760c7edaa31416020d349082e593
udioflinger/AudioFlinger.cpp
cbe4b36e67baba4ec1a4d7a9db9461e09c714f0c 19-Oct-2012 Glenn Kasten <gkasten@google.com> Use ALOGVV instead of commented ALOGV

Change-Id: I17bdb5274877760c7edaa31416020d349082e593
udioflinger/AudioFlinger.cpp
2188bc912a56d9bc577fcec7bf2208f49455e744 27-Oct-2012 Glenn Kasten <gkasten@google.com> StateQueue comments

Change-Id: Id8c76d1e2ab5201e7ab3875f1dbcc0a126e611a4
udioflinger/StateQueue.h
67360781c2d139a71d924ae24880b56adb7c1605 27-Oct-2012 Glenn Kasten <gkasten@google.com> StateQueue comments

Change-Id: Id8c76d1e2ab5201e7ab3875f1dbcc0a126e611a4
udioflinger/StateQueue.h
36a65500ec740bfd9ea403c94b7cefb82a230e20 27-Oct-2012 Mathias Agopian <mathias@google.com> Merge "a test app for the resamplers"
856d2116bf4bfed20b7df113dadf6e0555994b42 27-Oct-2012 Mathias Agopian <mathias@google.com> Merge "a test app for the resamplers"
132cf756c152f36dafd81ebc235bc7e15660593e 27-Oct-2012 Mathias Agopian <mathias@google.com> Merge "reenable the cubic resampler"
7a9c931d49db621bc82ba6279a7ca3f9295ff095 27-Oct-2012 Mathias Agopian <mathias@google.com> Merge "reenable the cubic resampler"
401c4cf650ab8b208aedde8daf74aa2ae02dd760 27-Oct-2012 Mathias Agopian <mathias@google.com> Merge "improve SINC resampler coefficients"
16e05c26e8b21eadc41390a74e2802b4c7522485 27-Oct-2012 Mathias Agopian <mathias@google.com> Merge "improve SINC resampler coefficients"
599fabc596687efa4b71b8f3ebbb957c7cae0c72 08-Mar-2012 Glenn Kasten <gkasten@google.com> Document AudioMixer hard-coded limits

Change-Id: I83ea8bed375f251260945db788bdb5f280dba12d
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
d82c750ca261d01caa405f555eef34b7af8d9b63 08-Mar-2012 Glenn Kasten <gkasten@google.com> Document AudioMixer hard-coded limits

Change-Id: I83ea8bed375f251260945db788bdb5f280dba12d
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
274c02ee1464d8948913ac70e64e8dbb80f82ad7 10-Jul-2012 Glenn Kasten <gkasten@google.com> Clean up constructor and derivation whitespace

Change-Id: I47d688a9c10c4c3c868accc34102fb402ebcac62
udioflinger/AudioFlinger.h
8a831724c52164a62e22e8e4d5f5180501e3c307 10-Jul-2012 Glenn Kasten <gkasten@google.com> Clean up constructor and derivation whitespace

Change-Id: I47d688a9c10c4c3c868accc34102fb402ebcac62
udioflinger/AudioFlinger.h
dc8a0d75bd7b1343cd65c3c7f6e0f91ca0fa6946 06-Mar-2012 Glenn Kasten <gkasten@google.com> Mark volume fields private

Change-Id: I8ffca0460195263d159aa13015c246122d8556a2
udioflinger/AudioFlinger.h
288a6fd72949dec167c5421d5bc977d1ccb75561 06-Mar-2012 Glenn Kasten <gkasten@google.com> Mark volume fields private

Change-Id: I8ffca0460195263d159aa13015c246122d8556a2
udioflinger/AudioFlinger.h
ddf3c5025e2f6f35a4c188c19f30142c64a092c4 13-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Compile with warnings, fix warnings

Change-Id: I557350abb32b0480f5da7dcecadfbe9edbe53361
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/CameraClient.cpp
amera/libcameraservice/CameraHardwareInterface.h
amera/libcameraservice/camera2/BurstCapture.cpp
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/FrameProcessor.cpp
amera/libcameraservice/camera2/JpegCompressor.cpp
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/StreamingProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.cpp
ebe3f69ef09777001b14a1cb9a2a21090655a14b 13-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Compile with warnings, fix warnings

Change-Id: I557350abb32b0480f5da7dcecadfbe9edbe53361
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/CameraClient.cpp
amera/libcameraservice/CameraHardwareInterface.h
amera/libcameraservice/camera2/BurstCapture.cpp
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/FrameProcessor.cpp
amera/libcameraservice/camera2/JpegCompressor.cpp
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/StreamingProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.cpp
0fc2cb59d5f77412f5922540d67fea81f4d1744b 21-Oct-2012 Mathias Agopian <mathias@google.com> a test app for the resamplers

Change-Id: I66852d90d384f1d9e77b51ad1a1ebdbaf61d0607
udioflinger/Android.mk
udioflinger/test-resample.cpp
bcf5220780fbf24477bf8d6148581307356c97b7 21-Oct-2012 Mathias Agopian <mathias@google.com> a test app for the resamplers

Change-Id: I66852d90d384f1d9e77b51ad1a1ebdbaf61d0607
udioflinger/Android.mk
udioflinger/test-resample.cpp
93d0767a8a9ee9d649eea9afac59f778e29a6a54 26-Oct-2012 Mathias Agopian <mathias@google.com> reenable the cubic resampler

cubic resampler was disabled because it hadn't been qualified,
however after I did some tests, it does improve significantly
the sound quality over the order-1 resampler, even if it is
still quite bad.

also HIGH_QUALITY resampler was partially disabled, it's now
fully enabled. It's a big improvement over the cubic resampler
in terms of aliasing noise (it's not as good in the pass-band).

Change-Id: I70e3658c255896588642697be9eb594ff4ec0f8b
udioflinger/Android.mk
udioflinger/AudioResampler.cpp
51ba3c7c9a4a238cdef57ad75a2d8f406ffd4515 26-Oct-2012 Mathias Agopian <mathias@google.com> reenable the cubic resampler

cubic resampler was disabled because it hadn't been qualified,
however after I did some tests, it does improve significantly
the sound quality over the order-1 resampler, even if it is
still quite bad.

also HIGH_QUALITY resampler was partially disabled, it's now
fully enabled. It's a big improvement over the cubic resampler
in terms of aliasing noise (it's not as good in the pass-band).

Change-Id: I70e3658c255896588642697be9eb594ff4ec0f8b
udioflinger/Android.mk
udioflinger/AudioResampler.cpp
443e69625d598ea578e2c838960778ce498fd773 26-Oct-2012 Mathias Agopian <mathias@google.com> improve SINC resampler coefficients

- we increase the interpolation precision from 4 to 7 bits
this doesn't increase CPU power required, it only increases the
size of the filter table but significantly reduces the noise
introduced by the quantization of the impulse response.

- the parameters of the filter are set such that aliasing is
rejected at 80 dB below 20 KHz. Because we don't use a lot of
coefficient (to save compute power), there are quite a bit of
attenuation in the pass-band: starting at 9KHz for the
down-sampler (48 to 44.1), and starting at 13 KHz for the
up-sampler (44.1 to 48) -- the transition band is about 15 KHz.

Change-Id: I855548d2aab8a0fb0d2a2da3a364b6842d7d3838
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
3bd72cc23f74e750069a2943ad3d5c9af3be4b55 26-Oct-2012 Mathias Agopian <mathias@google.com> improve SINC resampler coefficients

- we increase the interpolation precision from 4 to 7 bits
this doesn't increase CPU power required, it only increases the
size of the filter table but significantly reduces the noise
introduced by the quantization of the impulse response.

- the parameters of the filter are set such that aliasing is
rejected at 80 dB below 20 KHz. Because we don't use a lot of
coefficient (to save compute power), there are quite a bit of
attenuation in the pass-band: starting at 9KHz for the
down-sampler (48 to 44.1), and starting at 13 KHz for the
up-sampler (44.1 to 48) -- the transition band is about 15 KHz.

Change-Id: I855548d2aab8a0fb0d2a2da3a364b6842d7d3838
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
692c3e54c63aaaf7e9ef4d89761f98975bd34f33 25-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 203836b7: am b8d6efba: Camera2: Don\'t hold locks while waiting to sync.

* commit '203836b7584ccb7787202578259d27d70a8a3ede':
Camera2: Don't hold locks while waiting to sync.
bd37975395b6517e155f6195d2300872bc26ee70 25-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 203836b7: am b8d6efba: Camera2: Don\'t hold locks while waiting to sync.

* commit '203836b7584ccb7787202578259d27d70a8a3ede':
Camera2: Don't hold locks while waiting to sync.
b8d6efba8b87e6eeb049651cb67f9827198e658e 25-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't hold locks while waiting to sync.

Bug: 7409877
Change-Id: Ia3a0bc4f0ab4e19fca868ba04a870cf8e8ee7adb
amera/libcameraservice/Camera2Client.cpp
1d838ceb5808a8753ec20b59deb121ec8b011fb4 25-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't hold locks while waiting to sync.

Bug: 7409877
Change-Id: Ia3a0bc4f0ab4e19fca868ba04a870cf8e8ee7adb
amera/libcameraservice/Camera2Client.cpp
e2097a5a3ea4e11b6dfa53a67ae6c101faeadcdb 23-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 9e83f44c: am 6ccc3c34: Merge "Camera2: Increase mode update timeout." into jb-mr1-dev

* commit '9e83f44c0b310a72a080c006ebc3c07bdccc7027':
Camera2: Increase mode update timeout.
c0b24fdc610d27518b12a3e5ae1ec1872932d9de 23-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 9e83f44c: am 6ccc3c34: Merge "Camera2: Increase mode update timeout." into jb-mr1-dev

* commit '9e83f44c0b310a72a080c006ebc3c07bdccc7027':
Camera2: Increase mode update timeout.
6ccc3c343e2751ebfe9fa77215bf84e1a97e38fc 23-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Increase mode update timeout." into jb-mr1-dev
77d5554b5a18351993414c277b9f41c3710e6803 23-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Increase mode update timeout." into jb-mr1-dev
43b7ac6bd1a949ecb8ffc7e50d0a2f01a6258034 23-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Increase mode update timeout.

During camera startup, it might take a few hundred milliseconds before
requests start to be dequeued by the HAL. Increase the timeout for
synchronizing mode changes and triggers so that triggers near startup
don't time out.

Bug: 6970465
Change-Id: I9dc35378e8018ec18ae31be874fcb094f8a9a0e9
amera/libcameraservice/Camera2Client.cpp
b66e9d6bcc45fabd1a8490d968d58cac8e1ac70c 23-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Increase mode update timeout.

During camera startup, it might take a few hundred milliseconds before
requests start to be dequeued by the HAL. Increase the timeout for
synchronizing mode changes and triggers so that triggers near startup
don't time out.

Bug: 6970465
Change-Id: I9dc35378e8018ec18ae31be874fcb094f8a9a0e9
amera/libcameraservice/Camera2Client.cpp
790382e5f7e18672dce955747b8afd09a5e6cf04 23-Oct-2012 Glenn Kasten <gkasten@google.com> am 3aaa4e30: am c4640c9e: Increase allowed number of VHQ resamplers to 3

* commit '3aaa4e30f7663673f3453d3f4671b1119f1802fd':
Increase allowed number of VHQ resamplers to 3
d5f327e5f1d9d43208c59ae1f47187fb375fb941 23-Oct-2012 Glenn Kasten <gkasten@google.com> am 3aaa4e30: am c4640c9e: Increase allowed number of VHQ resamplers to 3

* commit '3aaa4e30f7663673f3453d3f4671b1119f1802fd':
Increase allowed number of VHQ resamplers to 3
c4640c9eef850bb1c754bd6b477f1cc8350c6081 23-Oct-2012 Glenn Kasten <gkasten@google.com> Increase allowed number of VHQ resamplers to 3

Bug: 7378660
Change-Id: I69e33ca2eb4bb9bd38e2c63df62cd1130d68baf6
udioflinger/AudioResampler.cpp
f1b2a9b65a904b10f91482cc0389bea1f66a891f 23-Oct-2012 Glenn Kasten <gkasten@google.com> Increase allowed number of VHQ resamplers to 3

Bug: 7378660
Change-Id: I69e33ca2eb4bb9bd38e2c63df62cd1130d68baf6
udioflinger/AudioResampler.cpp
df71e8e48ccf36b9f3947fb9d90cea4a5d319187 22-Oct-2012 Mathias Agopian <mathias@google.com> am 7f4d5714: am e384d75b: Merge "Fix a typo that caused the high quality resampler to produce garbage" into jb-mr1-dev

* commit '7f4d5714f3f0ab4efaf2d0929a9f984467ef95c7':
Fix a typo that caused the high quality resampler to produce garbage
8516ae9f56fd6d2ae6c6b5534609ae2ae3725d10 22-Oct-2012 Mathias Agopian <mathias@google.com> am 7f4d5714: am e384d75b: Merge "Fix a typo that caused the high quality resampler to produce garbage" into jb-mr1-dev

* commit '7f4d5714f3f0ab4efaf2d0929a9f984467ef95c7':
Fix a typo that caused the high quality resampler to produce garbage
61ea117b03b53382b5ecbc33004c7d37ea70ea8b 21-Oct-2012 Mathias Agopian <mathias@google.com> Fix a typo that caused the high quality resampler to produce garbage

the problem is that if libaudio_resampler is present, it is those
coefficients that will always be selected, but the correct
meta-data.

Bug: 7385994
Change-Id: Ieebeb37b4dfb62a1a051bc29fae2ce056dbc6621
udioflinger/AudioResamplerSinc.cpp
ebed918320bdacdb225f679a8d7135d1acd3fe51 21-Oct-2012 Mathias Agopian <mathias@google.com> Fix a typo that caused the high quality resampler to produce garbage

the problem is that if libaudio_resampler is present, it is those
coefficients that will always be selected, but the correct
meta-data.

Bug: 7385994
Change-Id: Ieebeb37b4dfb62a1a051bc29fae2ce056dbc6621
udioflinger/AudioResamplerSinc.cpp
cffeb15b9bf85657a2b03398cac3e3085cfdbdb2 20-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am e50ba28a: am 9e760d66: Merge "Camera2: Fix potential deadlock" into jb-mr1-dev

* commit 'e50ba28aa1846a7c2a296f122a5675476dacc4a5':
Camera2: Fix potential deadlock
b411ab3d7dbd6da7ec153fc7ed6bfe90bc21523b 20-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am e50ba28a: am 9e760d66: Merge "Camera2: Fix potential deadlock" into jb-mr1-dev

* commit 'e50ba28aa1846a7c2a296f122a5675476dacc4a5':
Camera2: Fix potential deadlock
9e760d66c5dfae4d9688e32d7a02fca09569f7ef 20-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Fix potential deadlock" into jb-mr1-dev
11eb0d9b627a4d153c9e023968f73f65b415c0a8 20-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Fix potential deadlock" into jb-mr1-dev
4687da74717842852009df4787fe041ef8c935ef 19-Oct-2012 Glenn Kasten <gkasten@google.com> am 424b4a57: am 291f824e: Remove active track when thread goes to standby

* commit '424b4a57f5e1e8bd99cb619398389a467ec41f92':
Remove active track when thread goes to standby
d3eb71055a81cf405ae3fac8172d3fd592ed2e4b 19-Oct-2012 Glenn Kasten <gkasten@google.com> am 424b4a57: am 291f824e: Remove active track when thread goes to standby

* commit '424b4a57f5e1e8bd99cb619398389a467ec41f92':
Remove active track when thread goes to standby
291f824e02ff517a34cfe50220b4e2b402ee998d 19-Oct-2012 Glenn Kasten <gkasten@google.com> Remove active track when thread goes to standby

Bug: 7369232
Change-Id: I7ff9f525dad4be0aef562a53015b06ee7d3d50f1
udioflinger/AudioFlinger.cpp
126c910f48a1e1b7a8044157d95f774d5e142316 19-Oct-2012 Glenn Kasten <gkasten@google.com> Remove active track when thread goes to standby

Bug: 7369232
Change-Id: I7ff9f525dad4be0aef562a53015b06ee7d3d50f1
udioflinger/AudioFlinger.cpp
f1945f0435e431fab2e6b83337a1ffe71a8df28c 18-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix potential deadlock

setPreviewWindow was holding a lock during long-lasting HAL calls
which may cause deadlock if the HAL calls back into the service during
the call. Stop holding the lock during these calls, since it's not
essential to do so.

Bug: 7320517
Change-Id: I4a35703d751e22ac32979b5a1288e291610576e7
amera/libcameraservice/Camera2Client.cpp
c0fdb98b87bdd88c643a630e18838ddcdd5ab964 18-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix potential deadlock

setPreviewWindow was holding a lock during long-lasting HAL calls
which may cause deadlock if the HAL calls back into the service during
the call. Stop holding the lock during these calls, since it's not
essential to do so.

Bug: 7320517
Change-Id: I4a35703d751e22ac32979b5a1288e291610576e7
amera/libcameraservice/Camera2Client.cpp
db2c9afc763d40e699ba93c8a495783f2372ad66 17-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am ed653a35: am ecfbc952: Merge "Camera2: Improve quirks focusing behavior." into jb-mr1-dev

* commit 'ed653a35784969b7d36e8b36bd421e2a54def0de':
Camera2: Improve quirks focusing behavior.
1d98d9b28397ebe33434f4c14fe5f08c7295607b 17-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am ed653a35: am ecfbc952: Merge "Camera2: Improve quirks focusing behavior." into jb-mr1-dev

* commit 'ed653a35784969b7d36e8b36bd421e2a54def0de':
Camera2: Improve quirks focusing behavior.
ecfbc952d51c71832f739b7483dcc8cb5fe68038 17-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Improve quirks focusing behavior." into jb-mr1-dev
509c451f99dff4bda6d73e301df43a5b95c4ffcb 17-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Improve quirks focusing behavior." into jb-mr1-dev
ac0cd56627b121081308213d5a327cfbae410f4d 16-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Improve quirks focusing behavior.

- When scene mode is set and the AF quirk is in use, don't change AF
mode and then cancel when AF cancel is received. Just change mode
since that also implies a cancel.

- Only trigger quirks switch when a focusing area is set.

Bug: 7318812
Change-Id: I28d8755553bd78052e774701210cb94d84ee2046
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/Parameters.h
65dc3fc6fd708350c8d984736da5a2a0b72c5324 16-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Improve quirks focusing behavior.

- When scene mode is set and the AF quirk is in use, don't change AF
mode and then cancel when AF cancel is received. Just change mode
since that also implies a cancel.

- Only trigger quirks switch when a focusing area is set.

Bug: 7318812
Change-Id: I28d8755553bd78052e774701210cb94d84ee2046
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/Parameters.h
426ee0f6f828b01693f83780832c167b683c004f 16-Oct-2012 Jean-Michel Trivi <jmtrivi@google.com> am aa00830e: am bbe11e46: Merge "Fix track estimation for presentation complete" into jb-mr1-dev

* commit 'aa00830e46cb7494af7217246788c1bca83b1d04':
Fix track estimation for presentation complete
ca794bc9fb43f24addff4c1915d397269d1568ab 16-Oct-2012 Jean-Michel Trivi <jmtrivi@google.com> am aa00830e: am bbe11e46: Merge "Fix track estimation for presentation complete" into jb-mr1-dev

* commit 'aa00830e46cb7494af7217246788c1bca83b1d04':
Fix track estimation for presentation complete
bbe11e46faf8f9e3296431993c36d3efc61337b5 16-Oct-2012 Jean-Michel Trivi <jmtrivi@google.com> Merge "Fix track estimation for presentation complete" into jb-mr1-dev
9bccfb551d79a16e23278db7b0e043da79118bf8 16-Oct-2012 Jean-Michel Trivi <jmtrivi@google.com> Merge "Fix track estimation for presentation complete" into jb-mr1-dev
697d2c4aa17c95051d8b14738856334db37ee1c9 16-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 74a7bcc0: am 54717320: Camera2: Don\'t touch frame counter on output frames.

* commit '74a7bcc052d9bdd0f555e9be6f5ecaf92c6b22d8':
Camera2: Don't touch frame counter on output frames.
a15809ee0dbfd82afd28c4ea2014f682934857b1 16-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 74a7bcc0: am 54717320: Camera2: Don\'t touch frame counter on output frames.

* commit '74a7bcc052d9bdd0f555e9be6f5ecaf92c6b22d8':
Camera2: Don't touch frame counter on output frames.
5120e1f0c7fd1e524407895ba624ea39dc559f9d 16-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 522fa119: am d6cc4a62: Camera2: When focus is already locked in CAF mode, do not trigger HAL.

* commit '522fa119fe2745cd950b6216ad6b49587372b7b3':
Camera2: When focus is already locked in CAF mode, do not trigger HAL.
77bc9b970c7c09298021026e2170ee280d3a3e83 16-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 522fa119: am d6cc4a62: Camera2: When focus is already locked in CAF mode, do not trigger HAL.

* commit '522fa119fe2745cd950b6216ad6b49587372b7b3':
Camera2: When focus is already locked in CAF mode, do not trigger HAL.
a045dcafd2b77036210f5b72e79d745ad4c1b848 16-Oct-2012 Jean-Michel Trivi <jmtrivi@google.com> Fix track estimation for presentation complete

Audio tracks were not using the right latency estimation for
signalling the completion of their presetation. This caused
the synchronization mechanism between playback and record to be
off, and a synchronized recording would contain some of the audio
that was meant to be over once recording would start.
Use the playback thread's latency reporting which takes the audio
pipe into account.

Bug 7237669

Change-Id: I23a907a53ad0b0d68d246789ec595a77a79fced5
udioflinger/AudioFlinger.cpp
115b87ecf6182698b54055288d0f8710308b324d 16-Oct-2012 Jean-Michel Trivi <jmtrivi@google.com> Fix track estimation for presentation complete

Audio tracks were not using the right latency estimation for
signalling the completion of their presetation. This caused
the synchronization mechanism between playback and record to be
off, and a synchronized recording would contain some of the audio
that was meant to be over once recording would start.
Use the playback thread's latency reporting which takes the audio
pipe into account.

Bug 7237669

Change-Id: I23a907a53ad0b0d68d246789ec595a77a79fced5
udioflinger/AudioFlinger.cpp
547173205b3fd909dd72b597f6372840c38460e4 16-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't touch frame counter on output frames.

Bug: 7357069
Change-Id: I9cd0cdcc23959bfecced5f47bb9e8c59c997dade
amera/libcameraservice/Camera2Device.h
fbd60660780839a15db9f1c78c5feecd6ba6ed09 16-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't touch frame counter on output frames.

Bug: 7357069
Change-Id: I9cd0cdcc23959bfecced5f47bb9e8c59c997dade
amera/libcameraservice/Camera2Device.h
d6cc4a62f3d94cad4dd36bd0a844ba8764177d26 16-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: When focus is already locked in CAF mode, do not trigger HAL.

In HAL2 CAF modes, once focus is locked by an AF trigger, additional
triggers will not cause AF notifications, since the state will not
change again until a cancelAutofocus call.

Since the old API still expects to see a notification, short-circuit
this at the service and send an immediate success notification.

Bug: 7318298
Change-Id: Ib209a24eaf2a35a247d06aea671efe80a33d751e
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
f1a6e0d28abdd0fcf9d35ecf53d7497f573f6113 16-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: When focus is already locked in CAF mode, do not trigger HAL.

In HAL2 CAF modes, once focus is locked by an AF trigger, additional
triggers will not cause AF notifications, since the state will not
change again until a cancelAutofocus call.

Since the old API still expects to see a notification, short-circuit
this at the service and send an immediate success notification.

Bug: 7318298
Change-Id: Ib209a24eaf2a35a247d06aea671efe80a33d751e
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
5f62bd6335cd45260e26a4dae26b307c3b672f1f 11-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am cb3911d3: am a14be593: Camera2: Don\'t error out of startPreview when already recording.

* commit 'cb3911d30c515e06fbea0000af02fa3d09688943':
Camera2: Don't error out of startPreview when already recording.
60d87c5af8e4bfe07b3bba3d6036dd6321eb9bf1 11-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am cb3911d3: am a14be593: Camera2: Don\'t error out of startPreview when already recording.

* commit 'cb3911d30c515e06fbea0000af02fa3d09688943':
Camera2: Don't error out of startPreview when already recording.
aa1890ff61b06c0f19ae5cf60720e351f62ba600 11-Oct-2012 Jean-Michel Trivi <jmtrivi@google.com> am 0f95fadb: am 7e2c0a15: Merge "Support querying active record sources" into jb-mr1-dev

* commit '0f95fadb8a3ee402f2c51a932a06f1f685ab2d35':
Support querying active record sources
b9c24111ecc135d47d563eaa3609730b6b4ee5e0 11-Oct-2012 Jean-Michel Trivi <jmtrivi@google.com> am 0f95fadb: am 7e2c0a15: Merge "Support querying active record sources" into jb-mr1-dev

* commit '0f95fadb8a3ee402f2c51a932a06f1f685ab2d35':
Support querying active record sources
31fb725372f2f62a234c4f43c66504dddeaf3c8f 11-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am f5230955: am 907e5651: Camera2: Don\'t let unlocks happen during recording.

* commit 'f52309555013e9909b248374f96d22dae29f6454':
Camera2: Don't let unlocks happen during recording.
142dbcfe437524bc0e8d546d2d43cab2a3ea625b 11-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am f5230955: am 907e5651: Camera2: Don\'t let unlocks happen during recording.

* commit 'f52309555013e9909b248374f96d22dae29f6454':
Camera2: Don't let unlocks happen during recording.
a14be59340219c47639ec77a352d2af362551a6f 11-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't error out of startPreview when already recording.

Bug: 7327474
Change-Id: I603da5b8bd58e5a700d7ae0b3d34bd89bbcb1d53
amera/libcameraservice/Camera2Client.cpp
411ddcc42a17abf4173345a992e4cd6575751739 11-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't error out of startPreview when already recording.

Bug: 7327474
Change-Id: I603da5b8bd58e5a700d7ae0b3d34bd89bbcb1d53
amera/libcameraservice/Camera2Client.cpp
7e2c0a15bb8086460070811a152029726479a297 11-Oct-2012 Jean-Michel Trivi <jmtrivi@google.com> Merge "Support querying active record sources" into jb-mr1-dev
32dd792aa1675e91c7a0cf7cee7aba215fe1be67 11-Oct-2012 Jean-Michel Trivi <jmtrivi@google.com> Merge "Support querying active record sources" into jb-mr1-dev
907e5651c18d0e25073743a49a685fe1a385939a 11-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't let unlocks happen during recording.

Bug: 7309020
Change-Id: I6e66809b868d2e8f47f71e6f8752b44ec06dfb17
amera/libcameraservice/Camera2Client.cpp
cfee40e0d30aa2d93df2c4633e7573165f0d7337 11-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't let unlocks happen during recording.

Bug: 7309020
Change-Id: I6e66809b868d2e8f47f71e6f8752b44ec06dfb17
amera/libcameraservice/Camera2Client.cpp
4c510b9209f7f75520fd2d62657f08192cc49a51 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 6f846139: am 55f6c9df: Camera2: Do not set auto-white-balance regions from metering regions.

* commit '6f846139d97ad6cccdd2f243ccf3a19036ad12c7':
Camera2: Do not set auto-white-balance regions from metering regions.
e6ff6cd2fe5c897803d8dfc2d575c24db38acd88 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 6f846139: am 55f6c9df: Camera2: Do not set auto-white-balance regions from metering regions.

* commit '6f846139d97ad6cccdd2f243ccf3a19036ad12c7':
Camera2: Do not set auto-white-balance regions from metering regions.
3a8850848f4887105338e3e0e3bb2466fc445d2d 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am e44d7f83: am c0379204: Camera: Limit valid caller PIDs for camera clients.

* commit 'e44d7f83a4d04b90417684d74f18ad8c703b981a':
Camera: Limit valid caller PIDs for camera clients.
4e5e64e76a5db351b852109dd288953a4eaaad38 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am e44d7f83: am c0379204: Camera: Limit valid caller PIDs for camera clients.

* commit 'e44d7f83a4d04b90417684d74f18ad8c703b981a':
Camera: Limit valid caller PIDs for camera clients.
55f6c9dfd713776e251655b3ddd496b17df0926e 09-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Do not set auto-white-balance regions from metering regions.

Per API documentation, metering regions are only for AE, not also for AWB.

Bug: 7312720
Change-Id: I39bcf33e4c81e80022f45e8fca77ea6cf9ba115e
amera/libcameraservice/camera2/Parameters.cpp
1bf2809d3fd3890a782869a041b70b8e595ecdb6 09-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Do not set auto-white-balance regions from metering regions.

Per API documentation, metering regions are only for AE, not also for AWB.

Bug: 7312720
Change-Id: I39bcf33e4c81e80022f45e8fca77ea6cf9ba115e
amera/libcameraservice/camera2/Parameters.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
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
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
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
c03792041b9dd6f7f54abd6c82bd6c755a336cd8 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera: Limit valid caller PIDs for camera clients.

Narrow down on PID checks to avoid cases where service can access the
camera even though it shouldn't be able to, per API semantics.

Bug: 6970469

Change-Id: Ic468a31949c28ef978b6ed48a70e4601c7ced684
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/CameraClient.cpp
617048834dc5b2cb87ab208bdd526262a7c4e90c 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera: Limit valid caller PIDs for camera clients.

Narrow down on PID checks to avoid cases where service can access the
camera even though it shouldn't be able to, per API semantics.

Bug: 6970469

Change-Id: Ic468a31949c28ef978b6ed48a70e4601c7ced684
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/CameraClient.cpp
9f43843a364a70940b6e76edcb2eec702a4c2d84 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 4c7b3129: am 2b0db6ae: Merge "Camera: Clear Hardware device pointer when initialization fails" into jb-mr1-dev

* commit '4c7b312964b2430ccc1f99e99092cc870be2a293':
Camera: Clear Hardware device pointer when initialization fails
b01ba8ff3cceee0f6573f18e5d1cd9535069c395 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 4c7b3129: am 2b0db6ae: Merge "Camera: Clear Hardware device pointer when initialization fails" into jb-mr1-dev

* commit '4c7b312964b2430ccc1f99e99092cc870be2a293':
Camera: Clear Hardware device pointer when initialization fails
2b0db6aea3be519334f340ca97581db902196690 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Clear Hardware device pointer when initialization fails" into jb-mr1-dev
af5041cca803f4e7f0d2dfeca596abb8bda313b6 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Clear Hardware device pointer when initialization fails" into jb-mr1-dev
dfe31723835f5006d394c9ebf2a6ac900d3acf9f 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 754cbdd2: am dca0ac21: Merge "Camera2: Fix uninitialized parameters." into jb-mr1-dev

* commit '754cbdd2dd3376bb2b55d762c2909f816bd768cc':
Camera2: Fix uninitialized parameters.
ffbbacb85b5236d256aae6ad43ae42f4eea6e4ce 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 754cbdd2: am dca0ac21: Merge "Camera2: Fix uninitialized parameters." into jb-mr1-dev

* commit '754cbdd2dd3376bb2b55d762c2909f816bd768cc':
Camera2: Fix uninitialized parameters.
dca0ac2193e87c57d871dd208073107408c13c0a 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Fix uninitialized parameters." into jb-mr1-dev
a70995f9dec3c2915792113c9c228b5b6474a915 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Fix uninitialized parameters." into jb-mr1-dev
44f120fa169cb3131ec853c638ea9c88a9b33b97 09-Oct-2012 Igor Murashkin <iam@google.com> Camera: Clear Hardware device pointer when initialization fails

When disconnecting, don't try to call device functions if the initialization
fails since this can lead to internal HAL segfaults.

Bug: 7317107
Change-Id: Ib65db7eb6556ee10d844959934b1bfd7bb08d0ff
amera/libcameraservice/CameraClient.cpp
d230cc783aa13de5c563adec54641bec6a355054 09-Oct-2012 Igor Murashkin <iam@google.com> Camera: Clear Hardware device pointer when initialization fails

When disconnecting, don't try to call device functions if the initialization
fails since this can lead to internal HAL segfaults.

Bug: 7317107
Change-Id: Ib65db7eb6556ee10d844959934b1bfd7bb08d0ff
amera/libcameraservice/CameraClient.cpp
151f6cd670a20cd0ccdb7a5e4a7531680c4e4dd7 09-Oct-2012 Igor Murashkin <iam@google.com> am e4664bb0: am 3d84d38e: Merge "Camera2: Call onAutoFocus immediately for fixed-focus cameras" into jb-mr1-dev

* commit 'e4664bb098a9b7d6ae1a93486456eff71eaae1bf':
Camera2: Call onAutoFocus immediately for fixed-focus cameras
efc04db5b3751ae02d74c104a0f31b2a88dfcf7a 09-Oct-2012 Igor Murashkin <iam@google.com> am e4664bb0: am 3d84d38e: Merge "Camera2: Call onAutoFocus immediately for fixed-focus cameras" into jb-mr1-dev

* commit 'e4664bb098a9b7d6ae1a93486456eff71eaae1bf':
Camera2: Call onAutoFocus immediately for fixed-focus cameras
3d84d38e7ac02b47d17f4bb272f18f8b0e873104 09-Oct-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Call onAutoFocus immediately for fixed-focus cameras" into jb-mr1-dev
9436ff8d852306fb1160170b1cb8613d840df637 09-Oct-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Call onAutoFocus immediately for fixed-focus cameras" into jb-mr1-dev
a3ee047fd8e2a63253f70346925c3ffd069dfc99 09-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix uninitialized parameters.

Some parameters were not being set to default values, causing strange
flakiness in any app that wasn't calling setParameters. This includes
many CTS tests.

Bug: 6970468
Change-Id: If91635afc000e23862e7b039292a55349274c5ee
amera/libcameraservice/camera2/Parameters.cpp
4cc45fa65659ff8771a185e4f4584a9b0da10247 09-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix uninitialized parameters.

Some parameters were not being set to default values, causing strange
flakiness in any app that wasn't calling setParameters. This includes
many CTS tests.

Bug: 6970468
Change-Id: If91635afc000e23862e7b039292a55349274c5ee
amera/libcameraservice/camera2/Parameters.cpp
5fa8add64b7f7614c288a9e3b790ab7bfc7858b5 09-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 240a538b: am d016cf5b: Merge "Camera2: Move non-ZSL shutter sound firing to be later." into jb-mr1-dev

* commit '240a538b59b905b68d46e39d79c8d48d1662161c':
Camera2: Move non-ZSL shutter sound firing to be later.
88c6afe3612b808629d58ba10eacf7552a8699b9 09-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 240a538b: am d016cf5b: Merge "Camera2: Move non-ZSL shutter sound firing to be later." into jb-mr1-dev

* commit '240a538b59b905b68d46e39d79c8d48d1662161c':
Camera2: Move non-ZSL shutter sound firing to be later.
d016cf5b12cb73bd49bcecb0d5a4958df23620c3 09-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Move non-ZSL shutter sound firing to be later." into jb-mr1-dev
c8d9bc29aaede1f104c6faed095a4c636bbe5748 09-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Move non-ZSL shutter sound firing to be later." into jb-mr1-dev
915b08fe3e65c8391a60404c52c1f87a4499eaab 09-Oct-2012 Eric Laurent <elaurent@google.com> am 80dfc5dc: am 350d3b68: Merge "audio policy: deprecate ro.camera.sound.forced" into jb-mr1-dev

* commit '80dfc5dc7ec6d20beb0360e8efcc5331f4d25d06':
audio policy: deprecate ro.camera.sound.forced
1e908f4d342f7c7f0535d254837fc2e95a535650 09-Oct-2012 Eric Laurent <elaurent@google.com> am 80dfc5dc: am 350d3b68: Merge "audio policy: deprecate ro.camera.sound.forced" into jb-mr1-dev

* commit '80dfc5dc7ec6d20beb0360e8efcc5331f4d25d06':
audio policy: deprecate ro.camera.sound.forced
350d3b686357a159fb1a962bbd41e01924d27cad 09-Oct-2012 Eric Laurent <elaurent@google.com> Merge "audio policy: deprecate ro.camera.sound.forced" into jb-mr1-dev
e069ec80e964c39229314fa05bd2bc91d4e9e77b 09-Oct-2012 Eric Laurent <elaurent@google.com> Merge "audio policy: deprecate ro.camera.sound.forced" into jb-mr1-dev
5f0714eb039c07554bef6ec289c70ed1164fdf52 09-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Call onAutoFocus immediately for fixed-focus cameras

Bug: 7311578
Change-Id: Ib8a8ea1f5fc269abdd24ed1e0370dc9b87b284ee
amera/libcameraservice/Camera2Client.cpp
5b44beef5a4ff04889bcdd874dc4e8d140f3edac 09-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Call onAutoFocus immediately for fixed-focus cameras

Bug: 7311578
Change-Id: Ib8a8ea1f5fc269abdd24ed1e0370dc9b87b284ee
amera/libcameraservice/Camera2Client.cpp
03d630b6360aada1df89bd0d4a81eefe145f5514 09-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 843aba43: am 2458d482: Merge "Camera2: Always disconnect in the client destructor" into jb-mr1-dev

* commit '843aba43ef85f5a40db03e0f384ed096b03592d0':
Camera2: Always disconnect in the client destructor
5ba6b98cac148e0e5d114ae26127e9189fe6262e 09-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 843aba43: am 2458d482: Merge "Camera2: Always disconnect in the client destructor" into jb-mr1-dev

* commit '843aba43ef85f5a40db03e0f384ed096b03592d0':
Camera2: Always disconnect in the client destructor
2458d482c4822c6f9e6274f5bd12b6aea095a9cd 09-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Always disconnect in the client destructor" into jb-mr1-dev
19caf26b1ab1619020aa417d7913c11fd1d5590d 09-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Always disconnect in the client destructor" into jb-mr1-dev
1e6ccd5c78016ac9f9247cb8337cf263b3afb73e 08-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Move non-ZSL shutter sound firing to be later.

Instead of firing shutter sound when capture request is submitted for
non-ZSL captures, fire it when the metadata frame is received. This
guarantees that the shutter sound fires after picture capture is
completed by the sensor.

Bug: 7259900
Change-Id: I4a1eeed89ed0400bf80b0f0cc2d5799c3d9bb9e3
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/CaptureSequencer.h
ad21da9c2b575eddc0d11b789bb577985a0bf50b 08-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Move non-ZSL shutter sound firing to be later.

Instead of firing shutter sound when capture request is submitted for
non-ZSL captures, fire it when the metadata frame is received. This
guarantees that the shutter sound fires after picture capture is
completed by the sensor.

Bug: 7259900
Change-Id: I4a1eeed89ed0400bf80b0f0cc2d5799c3d9bb9e3
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/CaptureSequencer.h
cf6eb207f21a3cbf4da91273c16c5dab04b2d824 09-Oct-2012 Igor Murashkin <iam@google.com> am 4a4253b9: am 82edd543: Camera2: isSmoothZoomSupported should return FALSE

* commit '4a4253b979586c9de21425f5e3cb34da9f1e57de':
Camera2: isSmoothZoomSupported should return FALSE
245b812096e7af209025b8f50a0519e54f040112 09-Oct-2012 Igor Murashkin <iam@google.com> am 4a4253b9: am 82edd543: Camera2: isSmoothZoomSupported should return FALSE

* commit '4a4253b979586c9de21425f5e3cb34da9f1e57de':
Camera2: isSmoothZoomSupported should return FALSE
390bb827d50a1ba0d7df8e9f15eaebcb56e99b3c 09-Oct-2012 Alex Ray <aray@google.com> am 9ea63b3b: am 6f854608: Camera2: Set default flash mode to FLASH_OFF

* commit '9ea63b3bfd696bcce9cb28e86218a3449dd699d8':
Camera2: Set default flash mode to FLASH_OFF
a374b0507be31317042e096b186ec62295262a0d 09-Oct-2012 Alex Ray <aray@google.com> am 9ea63b3b: am 6f854608: Camera2: Set default flash mode to FLASH_OFF

* commit '9ea63b3bfd696bcce9cb28e86218a3449dd699d8':
Camera2: Set default flash mode to FLASH_OFF
bac4a4a9073a440bc6df7ca2306604819aa1c342 09-Oct-2012 Eric Laurent <elaurent@google.com> audio policy: deprecate ro.camera.sound.forced

The volume and routing policy of AUDIO_STREAM_ENFORCED_AUDIBLE is
now controlled by AudioService.

Do not read ro.camera.sound.forced is not needed anymore.

Bug 7032634.

Change-Id: Ic0a6396fc4b6efb91cdb4dffe0c8eb035d0440bd
udioflinger/AudioPolicyService.cpp
116bc97164e0fa836744f31e54779b5a7a8c9db4 09-Oct-2012 Eric Laurent <elaurent@google.com> audio policy: deprecate ro.camera.sound.forced

The volume and routing policy of AUDIO_STREAM_ENFORCED_AUDIBLE is
now controlled by AudioService.

Do not read ro.camera.sound.forced is not needed anymore.

Bug 7032634.

Change-Id: Ic0a6396fc4b6efb91cdb4dffe0c8eb035d0440bd
udioflinger/AudioPolicyService.cpp
036bc3e2cfc5a11c3f7ace41088c8936dae2e946 09-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Always disconnect in the client destructor

If Camera2Client failed to initialize, it would skip disconnect step,
and thus the camera would be forever marked as busy. By always calling
disconnect it will always call free.

It also adds a new guarantee that Client::disconnect is idempotent

Bug: 7298182
Change-Id: Ic9876f1665b7d9b3c0da692880f63f165e3f4fa5
amera/libcameraservice/CameraService.cpp
be8d28a12e8d08531c6053bcf8ad1183c2f6e6d3 09-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Always disconnect in the client destructor

If Camera2Client failed to initialize, it would skip disconnect step,
and thus the camera would be forever marked as busy. By always calling
disconnect it will always call free.

It also adds a new guarantee that Client::disconnect is idempotent

Bug: 7298182
Change-Id: Ic9876f1665b7d9b3c0da692880f63f165e3f4fa5
amera/libcameraservice/CameraService.cpp
82edd5431951f461058c07b73c0dbc093aa45c99 08-Oct-2012 Igor Murashkin <iam@google.com> Camera2: isSmoothZoomSupported should return FALSE

Bug: 7308024
Change-Id: Ib757bef8f6dc203f8dfa6ea6d11191e3c7cfcc6d
amera/libcameraservice/camera2/Parameters.cpp
0ad293aac9af377606fb4aa752b95547a8462791 08-Oct-2012 Igor Murashkin <iam@google.com> Camera2: isSmoothZoomSupported should return FALSE

Bug: 7308024
Change-Id: Ib757bef8f6dc203f8dfa6ea6d11191e3c7cfcc6d
amera/libcameraservice/camera2/Parameters.cpp
6f854608d26d7abcce5e46396c7260ed7b250653 08-Oct-2012 Alex Ray <aray@google.com> Camera2: Set default flash mode to FLASH_OFF

Bug: 6970090
Change-Id: I904b1be2ee0710e82e8e647753a705184c10b46c
amera/libcameraservice/camera2/Parameters.cpp
2814a4dc0dd45007ce62871af08b98214cd1692c 08-Oct-2012 Alex Ray <aray@google.com> Camera2: Set default flash mode to FLASH_OFF

Bug: 6970090
Change-Id: I904b1be2ee0710e82e8e647753a705184c10b46c
amera/libcameraservice/camera2/Parameters.cpp
957126db7a5cec33a6ab113151ebc54d4dfd865b 08-Oct-2012 Igor Murashkin <iam@google.com> am a761686d: am 4c9aeb21: Merge "Camera2: Fix Parameters#setZoom off by 1 validation error" into jb-mr1-dev

* commit 'a761686d14ff8abd704a4802ca6ea0b801a9a32d':
Camera2: Fix Parameters#setZoom off by 1 validation error
a476c9e2d59048928ce50d273a8b31e723fcc492 08-Oct-2012 Igor Murashkin <iam@google.com> am a761686d: am 4c9aeb21: Merge "Camera2: Fix Parameters#setZoom off by 1 validation error" into jb-mr1-dev

* commit 'a761686d14ff8abd704a4802ca6ea0b801a9a32d':
Camera2: Fix Parameters#setZoom off by 1 validation error
4c9aeb21051e908b0a0a0864a04a96a4109717a1 08-Oct-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Fix Parameters#setZoom off by 1 validation error" into jb-mr1-dev
07cc78fe7dee9a96cd33865de890d0890fe752d7 08-Oct-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Fix Parameters#setZoom off by 1 validation error" into jb-mr1-dev
5db1d00d66cc2b620b469326ec5c7cffb7ea77a2 08-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am c7ee4fda: am b8f0090a: Merge "Camera2: On stopping preview, wait until captures are completed." into jb-mr1-dev

* commit 'c7ee4fda96539815e877cf035c9984f6009c4875':
Camera2: On stopping preview, wait until captures are completed.
30ae899f684e0ddc31576ed67bf5ef41eaffd01f 08-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am c7ee4fda: am b8f0090a: Merge "Camera2: On stopping preview, wait until captures are completed." into jb-mr1-dev

* commit 'c7ee4fda96539815e877cf035c9984f6009c4875':
Camera2: On stopping preview, wait until captures are completed.
b8f0090af19b95027d2e08667c662d058832f94b 08-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: On stopping preview, wait until captures are completed." into jb-mr1-dev
8ada0bf772354a1d31361d3b4f49efd36d8a6e6e 08-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: On stopping preview, wait until captures are completed." into jb-mr1-dev
709bc10c04a9b62875b1c7f1f69486cf275338ba 08-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Fix Parameters#setZoom off by 1 validation error

Bug: 7298683
Change-Id: If79ac6396379593eb852f041ca7d5a20ad2f9e6d
amera/libcameraservice/camera2/Parameters.cpp
cfdd84284394cecdb33cf121fe6d4205da84c761 08-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Fix Parameters#setZoom off by 1 validation error

Bug: 7298683
Change-Id: If79ac6396379593eb852f041ca7d5a20ad2f9e6d
amera/libcameraservice/camera2/Parameters.cpp
47f97033850ae8540fc389c9bf253e2ebe9b314e 08-Oct-2012 Igor Murashkin <iam@google.com> am 97f00a6b: am e18c1cce: Merge "Camera2: Report getMaxNumFocusAreas 0 for fixed focus cameras" into jb-mr1-dev

* commit '97f00a6b6cde4837e0ab3751d7cfd2921c11f9b4':
Camera2: Report getMaxNumFocusAreas 0 for fixed focus cameras
00614a72a47a0a34ad0c6f17d9442332b431ae77 08-Oct-2012 Igor Murashkin <iam@google.com> am 97f00a6b: am e18c1cce: Merge "Camera2: Report getMaxNumFocusAreas 0 for fixed focus cameras" into jb-mr1-dev

* commit '97f00a6b6cde4837e0ab3751d7cfd2921c11f9b4':
Camera2: Report getMaxNumFocusAreas 0 for fixed focus cameras
e18c1cce29dde2054ce52b9135b152901883ca91 08-Oct-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Report getMaxNumFocusAreas 0 for fixed focus cameras" into jb-mr1-dev
193c13fa1615ad5130b6d75dc05e50468e1c585c 08-Oct-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Report getMaxNumFocusAreas 0 for fixed focus cameras" into jb-mr1-dev
a3bdbdca6772a43cb63b70bbede8dea8359bc6cc 08-Oct-2012 ty.lee <ty.lee@lge.com> am 6f45866e: am c8823995: audioflinger/resampler: add build source for libaudio-resampler

* commit '6f45866e8a942b2a8a21c75708a717b0c8a8f120':
audioflinger/resampler: add build source for libaudio-resampler
9c54cca8444bd00bba5173815d3029d45f244960 08-Oct-2012 ty.lee <ty.lee@lge.com> am 6f45866e: am c8823995: audioflinger/resampler: add build source for libaudio-resampler

* commit '6f45866e8a942b2a8a21c75708a717b0c8a8f120':
audioflinger/resampler: add build source for libaudio-resampler
d5087f91357a9218580596b466926ab750bc8ea7 05-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: On stopping preview, wait until captures are completed.

If preview is stopped while a still capture or a video snapshot is
underway, wait until the capture completes before stopping preview.

Also use the same behavior for disconnect - do not shut down the
camera device until captures are complete.

This works around HAL implementations which report to be done
(get_in_progress_count returns 0) even when a capture is still
outstanding.

Bug: 7276954

Change-Id: I66290acf1740cc330eadecbcded0c59fa9c5d2fd
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/CaptureSequencer.h
amera/libcameraservice/camera2/JpegProcessor.cpp
e049384cdd0f728c45955d65cae754c46aac18cf 05-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: On stopping preview, wait until captures are completed.

If preview is stopped while a still capture or a video snapshot is
underway, wait until the capture completes before stopping preview.

Also use the same behavior for disconnect - do not shut down the
camera device until captures are complete.

This works around HAL implementations which report to be done
(get_in_progress_count returns 0) even when a capture is still
outstanding.

Bug: 7276954

Change-Id: I66290acf1740cc330eadecbcded0c59fa9c5d2fd
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/CaptureSequencer.h
amera/libcameraservice/camera2/JpegProcessor.cpp
c8823995d16b909fae30ff4f94217e875d3e8c8a 01-Oct-2012 ty.lee <ty.lee@lge.com> audioflinger/resampler: add build source for libaudio-resampler

Bug: 7229644
Change-Id: I93bde36be1c3ec84174a4c98423e28f8b3d8782f
Signed-off-by: ty.lee <ty.lee@lge.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
udioflinger/Android.mk
2b5232dd49d006a08c35ba865a6801acdb15483c 01-Oct-2012 ty.lee <ty.lee@lge.com> audioflinger/resampler: add build source for libaudio-resampler

Bug: 7229644
Change-Id: I93bde36be1c3ec84174a4c98423e28f8b3d8782f
Signed-off-by: ty.lee <ty.lee@lge.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
udioflinger/Android.mk
400011b9785ca2a92be116736a80cbc170d62f4c 07-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 3576742a: am 4d410ede: Camera2: Fix off-by-one error in ZSL selection.

* commit '3576742a2bb3dc10bf8256579d600d85f17c3835':
Camera2: Fix off-by-one error in ZSL selection.
5b9c992c7128bf857e82d42ac8027285ad86b1e0 07-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 3576742a: am 4d410ede: Camera2: Fix off-by-one error in ZSL selection.

* commit '3576742a2bb3dc10bf8256579d600d85f17c3835':
Camera2: Fix off-by-one error in ZSL selection.
4d410ede659448557398c84552eb0bf50ef09cbc 06-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix off-by-one error in ZSL selection.

Bug: 7258126
Change-Id: Ie6da4645c46a7bb0dbd11d7c6183e904f41f74fd
amera/libcameraservice/camera2/ZslProcessor.cpp
3d33019b95439ba8cc062633168ec8fe51ef6ad4 06-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix off-by-one error in ZSL selection.

Bug: 7258126
Change-Id: Ie6da4645c46a7bb0dbd11d7c6183e904f41f74fd
amera/libcameraservice/camera2/ZslProcessor.cpp
3b23853ad7e0d4f1203071beaadb12deafaf2096 06-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 4d85afad: am f6e09d20: Camera2: Unconditionally shut down streams on disconnect.

* commit '4d85afad335ded1019ec7697b9f37241a839efa1':
Camera2: Unconditionally shut down streams on disconnect.
056a76e1b9275833ec8134a5ff56a4489e86d952 06-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 4d85afad: am f6e09d20: Camera2: Unconditionally shut down streams on disconnect.

* commit '4d85afad335ded1019ec7697b9f37241a839efa1':
Camera2: Unconditionally shut down streams on disconnect.
7d2a4aaaf5691ee523fc0d03c286620f392ed16f 06-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Report getMaxNumFocusAreas 0 for fixed focus cameras

Bug: 7298805
Change-Id: I7499b80a9416bf454c8ea80c31ea4fdd3c4ee2d7
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
572bf9a00204ac91de8c5347d793891c6a4bf1d7 06-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Report getMaxNumFocusAreas 0 for fixed focus cameras

Bug: 7298805
Change-Id: I7499b80a9416bf454c8ea80c31ea4fdd3c4ee2d7
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
f6e09d200c3e043737adcdadd52310ebbd1b19da 05-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Unconditionally shut down streams on disconnect.

stopPreviewL may do nothing in certain states. Stop streams directly
to avoid those failures, so that we always maintain the HAL interface
invariant that streams referenced by in-flight requests are never
deleted.

Bug: 7276954
Change-Id: Ic4cffc43036f4944684d941981a43d6dd1dce7af
amera/libcameraservice/Camera2Client.cpp
3dcdc3d056c8756d690a6fa719d50aae2e4299d4 05-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Unconditionally shut down streams on disconnect.

stopPreviewL may do nothing in certain states. Stop streams directly
to avoid those failures, so that we always maintain the HAL interface
invariant that streams referenced by in-flight requests are never
deleted.

Bug: 7276954
Change-Id: Ic4cffc43036f4944684d941981a43d6dd1dce7af
amera/libcameraservice/Camera2Client.cpp
50f15231529ba953396d77d12f9b2cdc39f48e85 05-Oct-2012 Igor Murashkin <iam@google.com> am de434d89: am 7373cbe8: Camera2: Fix metering regions to take into account the current zoom/crop region

* commit 'de434d8969bd02ffd7cdfdd39577dd59f6a71e9d':
Camera2: Fix metering regions to take into account the current zoom/crop region
649254536988be71fd77e7b98782d7d26843344f 05-Oct-2012 Igor Murashkin <iam@google.com> am de434d89: am 7373cbe8: Camera2: Fix metering regions to take into account the current zoom/crop region

* commit 'de434d8969bd02ffd7cdfdd39577dd59f6a71e9d':
Camera2: Fix metering regions to take into account the current zoom/crop region
7373cbe85e617345f7002256a4be389fe62af913 29-Sep-2012 Igor Murashkin <iam@google.com> Camera2: Fix metering regions to take into account the current zoom/crop region

Also adds a quirk to disable this fix to work around for incompliant HALs

Bug: 7246065
Change-Id: I80bad25e56ba59149270238e5639bb33cae495ae
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
3a6e45320685b36bb266bbf8fa548f4474d90d6c 29-Sep-2012 Igor Murashkin <iam@google.com> Camera2: Fix metering regions to take into account the current zoom/crop region

Also adds a quirk to disable this fix to work around for incompliant HALs

Bug: 7246065
Change-Id: I80bad25e56ba59149270238e5639bb33cae495ae
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
4c6739026ece4779f168027d2818a575d8896374 05-Oct-2012 Igor Murashkin <iam@google.com> am 9be4d65d: am af3d2887: Camera2: Change policy for calculating previewFpsRange from previewFps

* commit '9be4d65d73bb8db98bf1f53e8c47ff3e3546a144':
Camera2: Change policy for calculating previewFpsRange from previewFps
970fb1e0b4eb08ae825047b9b2100e7db9341b4f 05-Oct-2012 Igor Murashkin <iam@google.com> am 9be4d65d: am af3d2887: Camera2: Change policy for calculating previewFpsRange from previewFps

* commit '9be4d65d73bb8db98bf1f53e8c47ff3e3546a144':
Camera2: Change policy for calculating previewFpsRange from previewFps
af3d28870f7890370d6acb21d20cf1ccab4b9e08 04-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Change policy for calculating previewFpsRange from previewFps

Bug: 7259959
Change-Id: I759a559d7115201264f88db1f23edc2d6aef6c43
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
63dc19921f2770f07bf976bb7573a1133d6548f9 04-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Change policy for calculating previewFpsRange from previewFps

Bug: 7259959
Change-Id: I759a559d7115201264f88db1f23edc2d6aef6c43
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
9b29c2ca7cf5d5390b74121e2829d97090a07afa 05-Oct-2012 Igor Murashkin <iam@google.com> am 7ca6460d: am becb0bc4: Merge "Camera2: Don\'t promote weak IBinder ptrs to strong ones" into jb-mr1-dev

* commit '7ca6460d06144d76460c8d43128bd338839d9501':
Camera2: Don't promote weak IBinder ptrs to strong ones
ccd9808cec4b17ee37be0173e35fbc3d9caf2718 05-Oct-2012 Igor Murashkin <iam@google.com> am 7ca6460d: am becb0bc4: Merge "Camera2: Don\'t promote weak IBinder ptrs to strong ones" into jb-mr1-dev

* commit '7ca6460d06144d76460c8d43128bd338839d9501':
Camera2: Don't promote weak IBinder ptrs to strong ones
becb0bc4b620dcd88b559d821e40a9ca7ced5604 05-Oct-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Don't promote weak IBinder ptrs to strong ones" into jb-mr1-dev
0feea710e236ad90eea73110414ea5d3555fcdfd 05-Oct-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Don't promote weak IBinder ptrs to strong ones" into jb-mr1-dev
a148eabd26157cdd68035734b52f837c305c8a36 05-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am e5f4024b: am 95069fef: Camera2: Use the triggerAfWithAuto quirk

* commit 'e5f4024bad9875e96cefbe3fe81172d166d52154':
Camera2: Use the triggerAfWithAuto quirk
cc1abea590b8d3f9b9707b3442aea02cd2b4fcef 05-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am e5f4024b: am 95069fef: Camera2: Use the triggerAfWithAuto quirk

* commit 'e5f4024bad9875e96cefbe3fe81172d166d52154':
Camera2: Use the triggerAfWithAuto quirk
16e0e1f5568cb530416641f28835adf21f0ec88b 05-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 577ac8a7: am 4865c526: Camera2: Synchronize mode changes and triggers

* commit '577ac8a74e8af7fcc7bc714874b8da21f57989b5':
Camera2: Synchronize mode changes and triggers
3b716883db5fb5e2cae20ad4c3f1c6ff445a7371 05-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 577ac8a7: am 4865c526: Camera2: Synchronize mode changes and triggers

* commit '577ac8a74e8af7fcc7bc714874b8da21f57989b5':
Camera2: Synchronize mode changes and triggers
294d0eca9eabfaa3ef0ee8bee7ccf3eaaa925e41 05-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Don't promote weak IBinder ptrs to strong ones

The Binder driver does not support promoting weak pointers into strong
pointers. Occassionally the system would lock up when trying to do this
(when closing the camera app).

Bug: 7289040
Change-Id: I8bc0b5c48616bf0b7f4eed1878ad4994ee635871
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
507994d0312f89127562a1401f118439f810e751 05-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Don't promote weak IBinder ptrs to strong ones

The Binder driver does not support promoting weak pointers into strong
pointers. Occassionally the system would lock up when trying to do this
(when closing the camera app).

Bug: 7289040
Change-Id: I8bc0b5c48616bf0b7f4eed1878ad4994ee635871
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
14c2d2404a800ecbe9f2bd8433584c4a00f0d9e8 05-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am e68eb9b8: am 9942f62d: Merge "Camera2: Include JPEG settings in ZSL requests." into jb-mr1-dev

* commit 'e68eb9b82d0371324add708e2b2eb45a99ddbd70':
Camera2: Include JPEG settings in ZSL requests.
4bfc4a67d4f7d5a9b6cbe5a39d4b599e8ceb505b 05-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am e68eb9b8: am 9942f62d: Merge "Camera2: Include JPEG settings in ZSL requests." into jb-mr1-dev

* commit 'e68eb9b82d0371324add708e2b2eb45a99ddbd70':
Camera2: Include JPEG settings in ZSL requests.
95069fefbdf54d87a624c2ac73727fce1c38545e 04-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use the triggerAfWithAuto quirk

When this quirk is set, and a scene mode is enabled, do AF calls with
AF mode AUTO instead of whatever the scene more override AF mode is.

Bug: 7159577
Change-Id: I3ea6b8386abc0968047fc9bba3a35c5db5bdcfd3
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
4c843702c7c2d2ca951e25bc54787c68c2071a8b 04-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use the triggerAfWithAuto quirk

When this quirk is set, and a scene mode is enabled, do AF calls with
AF mode AUTO instead of whatever the scene more override AF mode is.

Bug: 7159577
Change-Id: I3ea6b8386abc0968047fc9bba3a35c5db5bdcfd3
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
4865c526e681366481b0ab242ffa1ead57bb02cc 02-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Synchronize mode changes and triggers

Make sure that changes to various parameters have reached the HAL
before triggering asynchronous events like autofocus or precapture
metering.

Bug: 7107220
Change-Id: I3c50038de1671968eb32004ce538435121934e7e
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/CaptureSequencer.h
amera/libcameraservice/camera2/FrameProcessor.cpp
amera/libcameraservice/camera2/FrameProcessor.h
amera/libcameraservice/camera2/StreamingProcessor.cpp
amera/libcameraservice/camera2/StreamingProcessor.h
amera/libcameraservice/camera2/ZslProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.h
4c9eb718352697cd75269752344c0bcc6b05e708 02-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Synchronize mode changes and triggers

Make sure that changes to various parameters have reached the HAL
before triggering asynchronous events like autofocus or precapture
metering.

Bug: 7107220
Change-Id: I3c50038de1671968eb32004ce538435121934e7e
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/CaptureSequencer.h
amera/libcameraservice/camera2/FrameProcessor.cpp
amera/libcameraservice/camera2/FrameProcessor.h
amera/libcameraservice/camera2/StreamingProcessor.cpp
amera/libcameraservice/camera2/StreamingProcessor.h
amera/libcameraservice/camera2/ZslProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.h
9942f62d6a5ee0a65da751b681217d3c4243cd89 05-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Include JPEG settings in ZSL requests." into jb-mr1-dev
1daada32f8eefd8951541ba243969b341deaaba5 05-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Include JPEG settings in ZSL requests." into jb-mr1-dev
ec7710898208162576c3242f5a590651ab42aa2d 04-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Include JPEG settings in ZSL requests.

Bug: 7287743
Change-Id: I1aba81b228451c3df712ce1f42b7aab79cac575f
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
amera/libcameraservice/camera2/ZslProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.h
db30e68be637ca85da238c1e8e3534ec07919985 04-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Include JPEG settings in ZSL requests.

Bug: 7287743
Change-Id: I1aba81b228451c3df712ce1f42b7aab79cac575f
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
amera/libcameraservice/camera2/ZslProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.h
d192e5f15c395daa87f4f198154379ee7c93d528 04-Oct-2012 Glenn Kasten <gkasten@google.com> resolved conflicts for merge of f12b1c81 to master

Change-Id: I914a11706bd01a198e2137e0c12af0fc92ffa02b
ea967355de0b985c8111abd57a23f566fe355260 04-Oct-2012 Glenn Kasten <gkasten@google.com> resolved conflicts for merge of f12b1c81 to master

Change-Id: I914a11706bd01a198e2137e0c12af0fc92ffa02b
7ffab2933bfc50ee0b64ea586b663dcb9275d593 04-Oct-2012 Glenn Kasten <gkasten@google.com> Merge "Integrate improved coefficient sinc resampler: VHQ" into jb-mr1-dev
ef7fdc2224eb2e8a2b220ef51b5dc3ce25b807ba 04-Oct-2012 Glenn Kasten <gkasten@google.com> Merge "Integrate improved coefficient sinc resampler: VHQ" into jb-mr1-dev
e50eb89bad3cb457ed7930225c47c6c4cb8534f5 04-Oct-2012 Igor Murashkin <iam@google.com> am d6e8c5b1: am f66cc52c: Merge "Camera2: Fix deadlock while zooming during record" into jb-mr1-dev

* commit 'd6e8c5b187225c55a279bc40f262fe137f2ef508':
Camera2: Fix deadlock while zooming during record
08102ee8425e39282893c2e84d2914e867124310 04-Oct-2012 Igor Murashkin <iam@google.com> am d6e8c5b1: am f66cc52c: Merge "Camera2: Fix deadlock while zooming during record" into jb-mr1-dev

* commit 'd6e8c5b187225c55a279bc40f262fe137f2ef508':
Camera2: Fix deadlock while zooming during record
f66cc52cc5a075b86b585cf72c4a41f6907b2142 04-Oct-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Fix deadlock while zooming during record" into jb-mr1-dev
5e8e66f369fd2f1918495380ed1886e50818e95e 04-Oct-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Fix deadlock while zooming during record" into jb-mr1-dev
ac6020508acedd316391dee42329040bf45f8d90 01-Oct-2012 Glenn Kasten <gkasten@google.com> Integrate improved coefficient sinc resampler: VHQ

Summary:
Very high quality is enabled only for 44.1 -> 48 or 48 -> 44.1,
and uses low quality for all other use cases.
Track estimated CPU load and throttles the quality based on load;
as currently configured it should allow up to 2 instances of very high quality.
Medium quality and high quality are currently disabled unless explicitly requested.

Details:
Only load .so the first time it is needed.
Cleanup code style: formatting, indentation, whitespace.
Restore medium quality resampler, but it is not used (see next line).
Fix memory leak for sinc resampler.
Check sample rate in resampler constructor.
Add logs for debugging.
Rename DEFAULT to DEFAULT_QUALITY for consistency with other quality levels.
Renumber VERY_HIGH_QUALITY from 255 to 4.
Use enum src_quality consistently.
Improve parsing of property af.resampler.quality.
Fix reentrancy bug - allow an instance of high quality and an instance
of very high quality to both be active concurrently.

Bug: 7229644
Change-Id: I0ce6b913b05038889f50462a38830b61a602a9f7
udioflinger/Android.mk
udioflinger/AudioMixer.cpp
udioflinger/AudioResampler.cpp
udioflinger/AudioResampler.h
udioflinger/AudioResamplerCubic.h
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
a6d41334d25ffde12484eb28301352560a063ef6 01-Oct-2012 Glenn Kasten <gkasten@google.com> Integrate improved coefficient sinc resampler: VHQ

Summary:
Very high quality is enabled only for 44.1 -> 48 or 48 -> 44.1,
and uses low quality for all other use cases.
Track estimated CPU load and throttles the quality based on load;
as currently configured it should allow up to 2 instances of very high quality.
Medium quality and high quality are currently disabled unless explicitly requested.

Details:
Only load .so the first time it is needed.
Cleanup code style: formatting, indentation, whitespace.
Restore medium quality resampler, but it is not used (see next line).
Fix memory leak for sinc resampler.
Check sample rate in resampler constructor.
Add logs for debugging.
Rename DEFAULT to DEFAULT_QUALITY for consistency with other quality levels.
Renumber VERY_HIGH_QUALITY from 255 to 4.
Use enum src_quality consistently.
Improve parsing of property af.resampler.quality.
Fix reentrancy bug - allow an instance of high quality and an instance
of very high quality to both be active concurrently.

Bug: 7229644
Change-Id: I0ce6b913b05038889f50462a38830b61a602a9f7
udioflinger/Android.mk
udioflinger/AudioMixer.cpp
udioflinger/AudioResampler.cpp
udioflinger/AudioResampler.h
udioflinger/AudioResamplerCubic.h
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
04273cb14d2326e85bb047ea6ef75294c8b3d561 04-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Fix deadlock while zooming during record

Acquired SharedParameters before mMutex in StreamingProcessor,
this avoids any potential deadlocks since Camera2Client code would
always acquire SharedParameters first before invoking StreamingProcessor.

Bug: 7275259
Change-Id: Ia741162c455300378bee049f063590ece5328b95
amera/libcameraservice/camera2/StreamingProcessor.cpp
05dd06eb54a4e15352405a3a5cedce6a7940b96b 04-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Fix deadlock while zooming during record

Acquired SharedParameters before mMutex in StreamingProcessor,
this avoids any potential deadlocks since Camera2Client code would
always acquire SharedParameters first before invoking StreamingProcessor.

Bug: 7275259
Change-Id: Ia741162c455300378bee049f063590ece5328b95
amera/libcameraservice/camera2/StreamingProcessor.cpp
c66fd7a9f92f05242adda1bab17c96cf257e3181 04-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am a9438d09: am ce953ce4: Merge "Camera2: Properly update FPS range when FPS is set." into jb-mr1-dev

* commit 'a9438d09fb44f6c95a558accd05711600cc4b2bf':
Camera2: Properly update FPS range when FPS is set.
f3c7f03eaefc2a89ce28b5ee1abf4056643546e8 04-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am a9438d09: am ce953ce4: Merge "Camera2: Properly update FPS range when FPS is set." into jb-mr1-dev

* commit 'a9438d09fb44f6c95a558accd05711600cc4b2bf':
Camera2: Properly update FPS range when FPS is set.
ce953ce4d698155c50356df093712df1dea76051 04-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Properly update FPS range when FPS is set." into jb-mr1-dev
b2e7a84664f3dcca774c754092ed8f390295ab15 04-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Properly update FPS range when FPS is set." into jb-mr1-dev
260f267288502b73d1920a3701be2038753125b5 03-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Properly update FPS range when FPS is set.

Otherwise a getParameters followed by setParameters will trigger an
incorrect reversion in FPS parameters.

Bug: 7279267
Change-Id: I7426860f05497dbdf4245c34cef1b38f2f5a1832
amera/libcameraservice/camera2/Parameters.cpp
02b62d3672ebb0761752ba6c841b2cc469c59ed3 03-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Properly update FPS range when FPS is set.

Otherwise a getParameters followed by setParameters will trigger an
incorrect reversion in FPS parameters.

Bug: 7279267
Change-Id: I7426860f05497dbdf4245c34cef1b38f2f5a1832
amera/libcameraservice/camera2/Parameters.cpp
17983e5b9a01e65722aa99128a8ae014b21ffa48 03-Oct-2012 Alex Ray <aray@google.com> am b08633fc: am c2063056: Camera2: Fix prematurely clearing stream request

* commit 'b08633fc95947173ba3f68627728a8c5f12ef72f':
Camera2: Fix prematurely clearing stream request
acd69364cac252c9ec0c4aaa48ad8e8f01d11662 03-Oct-2012 Alex Ray <aray@google.com> am b08633fc: am c2063056: Camera2: Fix prematurely clearing stream request

* commit 'b08633fc95947173ba3f68627728a8c5f12ef72f':
Camera2: Fix prematurely clearing stream request
fe5f12bec61d43da862c11aeddc464a088f214a4 03-Oct-2012 Igor Murashkin <iam@google.com> am 7fd4e2a8: am b3e97b34: Camera2: Fix trying to release HAL stream twice

* commit '7fd4e2a8f4d57d20e679e5321f34cc09245d82a1':
Camera2: Fix trying to release HAL stream twice
744c170d80ffa6a6b20c78daa2c312b6773539b5 03-Oct-2012 Igor Murashkin <iam@google.com> am 7fd4e2a8: am b3e97b34: Camera2: Fix trying to release HAL stream twice

* commit '7fd4e2a8f4d57d20e679e5321f34cc09245d82a1':
Camera2: Fix trying to release HAL stream twice
c20630569431234db23b6182dd17102023dee68e 03-Oct-2012 Alex Ray <aray@google.com> Camera2: Fix prematurely clearing stream request

Zsl handling was clearing the stream request before a capture request
was ready to be sent to the HAL, which would cause capture delays and
timeouts in certain conditions.

Bug: 7259520
Change-Id: Idde8bc4fc58b8b426c6985feac87759740e338ea
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/ZslProcessor.cpp
311f69f18c41909e3087e4205548095762a2ecb7 03-Oct-2012 Alex Ray <aray@google.com> Camera2: Fix prematurely clearing stream request

Zsl handling was clearing the stream request before a capture request
was ready to be sent to the HAL, which would cause capture delays and
timeouts in certain conditions.

Bug: 7259520
Change-Id: Idde8bc4fc58b8b426c6985feac87759740e338ea
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/ZslProcessor.cpp
3b33fc737dc85c2d3bbc8f8d0a050652f506dd27 03-Oct-2012 Igor Murashkin <iam@google.com> am 5f49d702: am ecf17e82: Camera2: Handle client processes dying by closing camera resources

* commit '5f49d702fe25fe3a6752be438db6bf006840e41f':
Camera2: Handle client processes dying by closing camera resources
cce7ab7a04880b0a9c7a03097775a22999f37160 03-Oct-2012 Igor Murashkin <iam@google.com> am 5f49d702: am ecf17e82: Camera2: Handle client processes dying by closing camera resources

* commit '5f49d702fe25fe3a6752be438db6bf006840e41f':
Camera2: Handle client processes dying by closing camera resources
b3e97b347dceb882983427ac872b772e25f3f166 03-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Fix trying to release HAL stream twice

When we fail to disconnect the native window, StreamAdapter::release
would fail and remain in the old (ALLOCATED) state, thus it thinks that
we haven't released the HAL stream yet.

With this change, ignore DEAD_OBJECT native window disconnect failures,
so the state transitions to RELEASED and we don't double release HAL
streams.

Bug: 7258314
Change-Id: I524893e4b4d6463d7b0a7ce32fb6f658afba8e11
amera/libcameraservice/Camera2Device.cpp
a1e5dccf73c0b734204b0094241e4a6a0752a67e 03-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Fix trying to release HAL stream twice

When we fail to disconnect the native window, StreamAdapter::release
would fail and remain in the old (ALLOCATED) state, thus it thinks that
we haven't released the HAL stream yet.

With this change, ignore DEAD_OBJECT native window disconnect failures,
so the state transitions to RELEASED and we don't double release HAL
streams.

Bug: 7258314
Change-Id: I524893e4b4d6463d7b0a7ce32fb6f658afba8e11
amera/libcameraservice/Camera2Device.cpp
75a6316633b0aecf27d41155d29608d11cc119d9 03-Oct-2012 Igor Murashkin <iam@google.com> am ad93604d: am 22d58d37: Camera2: Don\'t change state when reconnect is called

* commit 'ad93604d802c7f726f3bdb83ed14412b26a5c809':
Camera2: Don't change state when reconnect is called
b34304a14dc89944f6dc7ee41cf1381d656f1c75 03-Oct-2012 Igor Murashkin <iam@google.com> am ad93604d: am 22d58d37: Camera2: Don\'t change state when reconnect is called

* commit 'ad93604d802c7f726f3bdb83ed14412b26a5c809':
Camera2: Don't change state when reconnect is called
ecf17e82505fdb60d59e00b6dd59036df93de655 03-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Handle client processes dying by closing camera resources

CameraService now subscribes to binder death notifications
for each client, and disconnects the client if the death happened
without cleanly shutting down the client first.

Bug: 7258314
Change-Id: I7803836b589fd8f0dfe00f6c28a707b82012e751
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/CameraClient.cpp
amera/libcameraservice/CameraClient.h
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/StreamingProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.cpp
8dcdb9553defafa1166c64b496e1ee390e4eadfa 03-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Handle client processes dying by closing camera resources

CameraService now subscribes to binder death notifications
for each client, and disconnects the client if the death happened
without cleanly shutting down the client first.

Bug: 7258314
Change-Id: I7803836b589fd8f0dfe00f6c28a707b82012e751
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/CameraClient.cpp
amera/libcameraservice/CameraClient.h
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/StreamingProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.cpp
22d58d37db6b5f48a10b3a19f69ffda09943c125 03-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Don't change state when reconnect is called

Bug: 7252802
Change-Id: Ibed4f59a96bef75bf84b1aaf1235fb87e94102ef
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/StreamingProcessor.cpp
0cb290b2304ef582a5afa9a45a4594944e89156e 03-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Don't change state when reconnect is called

Bug: 7252802
Change-Id: Ibed4f59a96bef75bf84b1aaf1235fb87e94102ef
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/StreamingProcessor.cpp
2a27f0112ba575096efc069d0694bf74169cf33e 03-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am db6ead4f: am 1bac8972: Merge "Camera2: Use ZSL format quirk." into jb-mr1-dev

* commit 'db6ead4fd0d8bbe3df6ede6727927830727cfa30':
Camera2: Use ZSL format quirk.
94f21649c0505bfecdb673fd407ef3ad8478440b 03-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am db6ead4f: am 1bac8972: Merge "Camera2: Use ZSL format quirk." into jb-mr1-dev

* commit 'db6ead4fd0d8bbe3df6ede6727927830727cfa30':
Camera2: Use ZSL format quirk.
e382ee28709b83264a46b09e8f766c5ef42efa35 03-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use ZSL format quirk.

Switch service to using HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED,
unless ZSL quirk is set.

This is important for compatibility across multiple implementations.

Bug: 6243944
Change-Id: Iea74671cbb44890a07e4f99cd757b0a5423d447a
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
amera/libcameraservice/camera2/ZslProcessor.cpp
596cb97dff006229f10db8bd7306f4d228f96dfd 03-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use ZSL format quirk.

Switch service to using HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED,
unless ZSL quirk is set.

This is important for compatibility across multiple implementations.

Bug: 6243944
Change-Id: Iea74671cbb44890a07e4f99cd757b0a5423d447a
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
amera/libcameraservice/camera2/ZslProcessor.cpp
1aecbcb23d6304b1c86bd7ee8f6c5352d8d356cc 03-Oct-2012 Eino-Ville Talvala <etalvala@google.com> resolved conflicts for merge of 9bf263b2 to master

Change-Id: I28da6f16a1d044864c81d5f1dcf6543169c09460
f93992e4b0dce1755ef4d2571b0930ef3a1107f0 03-Oct-2012 Eino-Ville Talvala <etalvala@google.com> resolved conflicts for merge of 9bf263b2 to master

Change-Id: I28da6f16a1d044864c81d5f1dcf6543169c09460
8a42dd8cd1a245d844f96cfd67dc342d7937e353 02-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use scene mode override parameter

- Read in SCENE_MODE_OVERRIDES static parameter if available.
Use it to select AF/AE/AWB modes when a scene mode is set.
- Add quirks structure to parameters; not yet used
- Fix desynchronization between range and single FPS value.
Still need to sort out best way to convert from one to another.

Bug: 7259959
Bug: 7159577
Bug: 7172543

Change-Id: I0d07c31d5f21fbc4b0ec2fa23f7f778073d2d6e0
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/BurstCapture.cpp
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
c85f826e7b67bdf159a3f1b01bc9f1f33d05aaff 02-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use scene mode override parameter

- Read in SCENE_MODE_OVERRIDES static parameter if available.
Use it to select AF/AE/AWB modes when a scene mode is set.
- Add quirks structure to parameters; not yet used
- Fix desynchronization between range and single FPS value.
Still need to sort out best way to convert from one to another.

Bug: 7259959
Bug: 7159577
Bug: 7172543

Change-Id: I0d07c31d5f21fbc4b0ec2fa23f7f778073d2d6e0
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/BurstCapture.cpp
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
f1aa6eb20be602a43ea478957fc8e6d5098cfde4 01-Oct-2012 Glenn Kasten <gkasten@google.com> am 14bab416: am 087dd8e7: Disable audio watchdog

* commit '14bab41620ed8e667c79242e5ad0f4bd84264758':
Disable audio watchdog
c704ce6c0101f4933587fb2799618fb55e80f69a 01-Oct-2012 Glenn Kasten <gkasten@google.com> am 14bab416: am 087dd8e7: Disable audio watchdog

* commit '14bab41620ed8e667c79242e5ad0f4bd84264758':
Disable audio watchdog
a98a900f58d297d71621fb80afcb7d291bbb50db 01-Oct-2012 Jean-Michel Trivi <jmtrivi@google.com> am 7fff6091: am 7165491b: Merge "bug 7253033 clean up before closing an output" into jb-mr1-dev

* commit '7fff6091174451170912099954725c8109f4c559':
bug 7253033 clean up before closing an output
0033ac1b0c2258077ad60792b5c60807b359fd0e 01-Oct-2012 Jean-Michel Trivi <jmtrivi@google.com> am 7fff6091: am 7165491b: Merge "bug 7253033 clean up before closing an output" into jb-mr1-dev

* commit '7fff6091174451170912099954725c8109f4c559':
bug 7253033 clean up before closing an output
da68fae17aaa5b9852caf6a96222f327d5ee3779 01-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 700a4cdc: am 73bbd1f1: Camera2: Refactor preview/recording management to separate class.

* commit '700a4cdc50b07dc75bb8103e55cc227b6cfa1fc7':
Camera2: Refactor preview/recording management to separate class.
63c2a38a3c0be207306073c9196ab76cd9df4b2a 01-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 700a4cdc: am 73bbd1f1: Camera2: Refactor preview/recording management to separate class.

* commit '700a4cdc50b07dc75bb8103e55cc227b6cfa1fc7':
Camera2: Refactor preview/recording management to separate class.
087dd8e7232e4c009e9121ab7e8c37985522c9ad 27-Sep-2012 Glenn Kasten <gkasten@google.com> Disable audio watchdog

It's not critical, and is wasting power

Bug: 7241714
Change-Id: I6ad4375f0000c92529688723dbe0ff0caa809c5d
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
02e5dbb025bf164f0b273f01a114ddc497798823 27-Sep-2012 Glenn Kasten <gkasten@google.com> Disable audio watchdog

It's not critical, and is wasting power

Bug: 7241714
Change-Id: I6ad4375f0000c92529688723dbe0ff0caa809c5d
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
7165491b8fe140609ab987b510ad1a55715856e9 30-Sep-2012 Jean-Michel Trivi <jmtrivi@google.com> Merge "bug 7253033 clean up before closing an output" into jb-mr1-dev
b82cf1e21d2bd3792382c6ed0f19b10cb0e8f482 30-Sep-2012 Jean-Michel Trivi <jmtrivi@google.com> Merge "bug 7253033 clean up before closing an output" into jb-mr1-dev
2bfc6b42b3733c12485dd51ed95191956abc3e4e 28-Sep-2012 Jean-Michel Trivi <jmtrivi@google.com> bug 7253033 clean up before closing an output

An output can only be closed if there is no lock contention that
prevents ThreadBase::exit() from being blocked. If an output
device is waiting for an operation to complete (here a write
in the remote_submix module, because the pipe is full), signal
the module that it's entering the "exiting" state.

Change-Id: I8248add60da543e90c25a4c809866cdb26255651
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
2fa114de80a5f6afd2055054a163c6d7e2ef71bc 28-Sep-2012 Jean-Michel Trivi <jmtrivi@google.com> bug 7253033 clean up before closing an output

An output can only be closed if there is no lock contention that
prevents ThreadBase::exit() from being blocked. If an output
device is waiting for an operation to complete (here a write
in the remote_submix module, because the pipe is full), signal
the module that it's entering the "exiting" state.

Change-Id: I8248add60da543e90c25a4c809866cdb26255651
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
73bbd1f1c493835f191ea2b0b72439292496b40a 26-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Refactor preview/recording management to separate class.

Untangle preview/recording management from main class to simplify
callpaths; in preparation for fixing several HAL/app interactions
bugs.

Bug: 7172543
Bug: 7159577
Bug: 7107220
Change-Id: Iab5503f66b35d88a1524111536a484c9e33fd934
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/JpegProcessor.h
amera/libcameraservice/camera2/StreamingProcessor.cpp
amera/libcameraservice/camera2/StreamingProcessor.h
43cbdc5b5545d3344c556014b9afe8249add91e4 26-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Refactor preview/recording management to separate class.

Untangle preview/recording management from main class to simplify
callpaths; in preparation for fixing several HAL/app interactions
bugs.

Bug: 7172543
Bug: 7159577
Bug: 7107220
Change-Id: Iab5503f66b35d88a1524111536a484c9e33fd934
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/JpegProcessor.h
amera/libcameraservice/camera2/StreamingProcessor.cpp
amera/libcameraservice/camera2/StreamingProcessor.h
0517e304d0cce25653a033e3cb00172d54ba251d 28-Sep-2012 James Painter <jpainter@google.com> DO NOT MERGE: Remove experimental parameters for burst mode

Bug: 7248756
Change-Id: I3aaf2da4791b2a13e1e788b2914e4c51c529a75d
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
2e63d52ea03e0a9d098759cf4689691809f44ceb 28-Sep-2012 James Painter <jpainter@google.com> DO NOT MERGE: Remove experimental parameters for burst mode

Bug: 7248756
Change-Id: I3aaf2da4791b2a13e1e788b2914e4c51c529a75d
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
cffe7501e5ffb2fce5079aeae54bdc658834ebc4 28-Sep-2012 Alex Ray <aray@google.com> am 927a8010: am 23f74017: Merge "Camera2: Use new JPEG transport header" into jb-mr1-dev

* commit '927a801071f2e89868c69b05a300bba74ac5d674':
Camera2: Use new JPEG transport header
f7bdda5e5dad9ebfa6b3277f257041c83f70aeb9 28-Sep-2012 Alex Ray <aray@google.com> am 927a8010: am 23f74017: Merge "Camera2: Use new JPEG transport header" into jb-mr1-dev

* commit '927a801071f2e89868c69b05a300bba74ac5d674':
Camera2: Use new JPEG transport header
23f74017a2c457a25382677b6e696c4cfa06cef5 28-Sep-2012 Alex Ray <aray@google.com> Merge "Camera2: Use new JPEG transport header" into jb-mr1-dev
0c0cfd7fb8042b63f0ffebd2de563f2ef733526f 28-Sep-2012 Alex Ray <aray@google.com> Merge "Camera2: Use new JPEG transport header" into jb-mr1-dev
74137f3bdf35c5f32ed27ce82e536e7a4b9665dd 28-Sep-2012 Alex Ray <aray@google.com> am 7c0f1b36: am 24dfc952: Merge "Camera2: Re-entering preview state on v2 Device" into jb-mr1-dev

* commit '7c0f1b36ec676d7358bb440640e32a2b04564c12':
Camera2: Re-entering preview state on v2 Device
0cb271c4768fa9ab93528f016956a8882d7e06a4 28-Sep-2012 Alex Ray <aray@google.com> am 7c0f1b36: am 24dfc952: Merge "Camera2: Re-entering preview state on v2 Device" into jb-mr1-dev

* commit '7c0f1b36ec676d7358bb440640e32a2b04564c12':
Camera2: Re-entering preview state on v2 Device
24dfc952bcb609f7ba59c7fb9f7c3004ffb8c83b 28-Sep-2012 Alex Ray <aray@google.com> Merge "Camera2: Re-entering preview state on v2 Device" into jb-mr1-dev
d0dad6ece142f132f5d295330bfe386c2c28de46 28-Sep-2012 Alex Ray <aray@google.com> Merge "Camera2: Re-entering preview state on v2 Device" into jb-mr1-dev
d4cc56c1b5e47cfee9bb2a14209c9eea0b5218f0 28-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 0c6bd60f: am d0cec0cb: Camera2: Only _some_ FPS values in the old API are scaled.

* commit '0c6bd60f30da59271a9f3e93b3259cd7cb22bac7':
Camera2: Only _some_ FPS values in the old API are scaled.
949fc1b96ededf46de2620f3910e4ede4b90a345 28-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 0c6bd60f: am d0cec0cb: Camera2: Only _some_ FPS values in the old API are scaled.

* commit '0c6bd60f30da59271a9f3e93b3259cd7cb22bac7':
Camera2: Only _some_ FPS values in the old API are scaled.
dbb36fd92ed901fb2b5b6490da6199596708ee6e 28-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am f4ffb508: am 12d3e887: Merge "Camera2: Fix FPS value scaling between HAL2 and API" into jb-mr1-dev

* commit 'f4ffb508cafaa94ce470cf5a8c29b98d3d38e7eb':
Camera2: Fix FPS value scaling between HAL2 and API
3c054c7c17505acf5af034658a254bcf45bbcf95 28-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am f4ffb508: am 12d3e887: Merge "Camera2: Fix FPS value scaling between HAL2 and API" into jb-mr1-dev

* commit 'f4ffb508cafaa94ce470cf5a8c29b98d3d38e7eb':
Camera2: Fix FPS value scaling between HAL2 and API
0fa1e760f7093d025c977e5813e8d3a04c863ce3 28-Sep-2012 Alex Ray <aray@google.com> Camera2: Use new JPEG transport header

Check for new JPEG transport header at the end of the stream buffer
instead of at the beginning.

Bug: 7108816
Change-Id: I26c52267cb406dae50c9d0ee01e6c26359ba84aa
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/JpegProcessor.h
6751c093886112f4774bc3de514268e7b85ea417 28-Sep-2012 Alex Ray <aray@google.com> Camera2: Use new JPEG transport header

Check for new JPEG transport header at the end of the stream buffer
instead of at the beginning.

Bug: 7108816
Change-Id: I26c52267cb406dae50c9d0ee01e6c26359ba84aa
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/JpegProcessor.h
d0cec0cb574a3d629afb7c32883bc986d7a65535 28-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Only _some_ FPS values in the old API are scaled.

The (deprecated) single-FPS parameter is not scaled by 1000.

Bug: 7230239
Change-Id: I5664cce90f9cb01e57e39f1a1f7c8eb730501da3
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
823b786e8558b7e73d9096cdd629e8896226e422 28-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Only _some_ FPS values in the old API are scaled.

The (deprecated) single-FPS parameter is not scaled by 1000.

Bug: 7230239
Change-Id: I5664cce90f9cb01e57e39f1a1f7c8eb730501da3
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
12d3e887c6cefcd5ae0abce528ea576950ce6b9f 28-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Fix FPS value scaling between HAL2 and API" into jb-mr1-dev
a7bf9305a27c22c6fd1f8a3037c2ccdfd274cf72 28-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Fix FPS value scaling between HAL2 and API" into jb-mr1-dev
c9d7e4da3f963dadbea19e9b520fb7a7e28e614a 27-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix FPS value scaling between HAL2 and API

API assumes FPS values are in fixed-point with LSB 0.001; HAL2 just
uses ints with no fractional part.

HAL should probably use floats or something similar, but for now, fix
scaling so the two agree on FPS values.

Bug: 7230239
Change-Id: Ie18a4f11fc9d17d9ae2d04781511a273213eda55
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
b5d91138fddcb1c4acdc91ddc68a9f4097da5b40 27-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix FPS value scaling between HAL2 and API

API assumes FPS values are in fixed-point with LSB 0.001; HAL2 just
uses ints with no fractional part.

HAL should probably use floats or something similar, but for now, fix
scaling so the two agree on FPS values.

Bug: 7230239
Change-Id: Ie18a4f11fc9d17d9ae2d04781511a273213eda55
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
77449ada4b5ca73a948aa4fef9aafe3079a66d61 27-Sep-2012 Alex Ray <aray@google.com> Camera2: Re-entering preview state on v2 Device

Bug: 7240891
Change-Id: I6a01b27197b4ee89a68f06f4375d315a716b67ae
amera/libcameraservice/Camera2Client.cpp
71d6454cc20b7a3bbe0cfd375c778c5fcc54795a 27-Sep-2012 Alex Ray <aray@google.com> Camera2: Re-entering preview state on v2 Device

Bug: 7240891
Change-Id: I6a01b27197b4ee89a68f06f4375d315a716b67ae
amera/libcameraservice/Camera2Client.cpp
f40c239e645b4e1afca3df9a022715b4056e7111 27-Sep-2012 Iliyan Malchev <malchev@google.com> am 33afc99b: am 6d6a4d3f: Merge changes Ia4414241,I34f5d36a into jb-mr1-dev

* commit '33afc99b78977ab94ba3fe86f485c6e2a33563aa':
audioflinger: use resample coefficients from audio-resampler library.
audioflinger/resampler: Add VERY_HIGH_QUALITY audio-resampler
395f2c8dd0d4b87c5b31cfa838885ae8169adff8 27-Sep-2012 Iliyan Malchev <malchev@google.com> am 33afc99b: am 6d6a4d3f: Merge changes Ia4414241,I34f5d36a into jb-mr1-dev

* commit '33afc99b78977ab94ba3fe86f485c6e2a33563aa':
audioflinger: use resample coefficients from audio-resampler library.
audioflinger/resampler: Add VERY_HIGH_QUALITY audio-resampler
76b111685010e1fea7c0a865c038aee35507fde4 17-Jan-2012 SathishKumar Mani <smani@codeaurora.org> audioflinger: use resample coefficients from audio-resampler library.

-Add a separate quality VERY_HIGH_QUALITY in resampler
-Use resample coefficients audio-resampler library for
quality VERY_HIGH_QUALITY.
-This improves the quality of resampled output.

Bug: 7024293
Change-Id: Ia44142413bed5f5963d7eab7846eec877a2415e4
Signed-off-by: Iliyan Malchev <malchev@google.com>
udioflinger/Android.mk
udioflinger/AudioResampler.cpp
udioflinger/AudioResampler.h
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
41dfd129a181a5b0b62628733cf96e0ce11d64d7 17-Jan-2012 SathishKumar Mani <smani@codeaurora.org> audioflinger: use resample coefficients from audio-resampler library.

-Add a separate quality VERY_HIGH_QUALITY in resampler
-Use resample coefficients audio-resampler library for
quality VERY_HIGH_QUALITY.
-This improves the quality of resampled output.

Bug: 7024293
Change-Id: Ia44142413bed5f5963d7eab7846eec877a2415e4
Signed-off-by: Iliyan Malchev <malchev@google.com>
udioflinger/Android.mk
udioflinger/AudioResampler.cpp
udioflinger/AudioResampler.h
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
12bff5dd87e6b863482e6bfd9f4561078ebcf3f0 24-Sep-2012 SathishKumar Mani <smani@codeaurora.org> audioflinger/resampler: Add VERY_HIGH_QUALITY audio-resampler

Change-Id: I34f5d36ae60010ec64222d6660d10a84da3bf566
Bug: 7024293
Signed-off-by: Iliyan Malchev <malchev@google.com>
udioflinger/audio-resampler/Android.mk
udioflinger/audio-resampler/AudioResamplerCoefficients.cpp
udioflinger/audio-resampler/dnsampler_filter_coefficients_x128_10112011.h
udioflinger/audio-resampler/resampler_filter_coefficients_10042011.h
f818ccfbbfc574d179c4639af6b41c83c368a699 24-Sep-2012 SathishKumar Mani <smani@codeaurora.org> audioflinger/resampler: Add VERY_HIGH_QUALITY audio-resampler

Change-Id: I34f5d36ae60010ec64222d6660d10a84da3bf566
Bug: 7024293
Signed-off-by: Iliyan Malchev <malchev@google.com>
udioflinger/audio-resampler/Android.mk
udioflinger/audio-resampler/AudioResamplerCoefficients.cpp
udioflinger/audio-resampler/dnsampler_filter_coefficients_x128_10112011.h
udioflinger/audio-resampler/resampler_filter_coefficients_10042011.h
173ed81066eb0cacd7f9c456b9a4193da7879763 26-Sep-2012 Alex Ray <aray@google.com> am 23520044: am eb8a42b9: Camera2: Fix JPEG Transport Header offset

* commit '23520044cfcb78db77950abc41c27e11b0d0f7db':
Camera2: Fix JPEG Transport Header offset
1a796b62e169662802369ace8ba378756dd71f02 26-Sep-2012 Alex Ray <aray@google.com> am 23520044: am eb8a42b9: Camera2: Fix JPEG Transport Header offset

* commit '23520044cfcb78db77950abc41c27e11b0d0f7db':
Camera2: Fix JPEG Transport Header offset
eb8a42b934f20a15f40d656e2bc90f384f1ccb10 25-Sep-2012 Alex Ray <aray@google.com> Camera2: Fix JPEG Transport Header offset

Use offset into start of buffer after transport header

Bug: 7108816
Change-Id: I6f9778db313856eaeee31f6999e4e55678b09b26
amera/libcameraservice/camera2/JpegProcessor.cpp
b991ed9ec044ece45e433e1ac0fbb84b9ed7e871 25-Sep-2012 Alex Ray <aray@google.com> Camera2: Fix JPEG Transport Header offset

Use offset into start of buffer after transport header

Bug: 7108816
Change-Id: I6f9778db313856eaeee31f6999e4e55678b09b26
amera/libcameraservice/camera2/JpegProcessor.cpp
fc417dc27adee8421eae1c6f506993e9a0cf2c4e 26-Sep-2012 Glenn Kasten <gkasten@google.com> am 070936d0: am 842c5d95: Revert "Don\'t wait for presentation complete if terminated"

* commit '070936d0530b535ccc9b404872f8333368bbfb02':
Revert "Don't wait for presentation complete if terminated"
7ab148fd703107f8f4d64483d1f03986bed3f38d 26-Sep-2012 Glenn Kasten <gkasten@google.com> am 070936d0: am 842c5d95: Revert "Don\'t wait for presentation complete if terminated"

* commit '070936d0530b535ccc9b404872f8333368bbfb02':
Revert "Don't wait for presentation complete if terminated"
842c5d9553f3f8e97d04ed1bd0d37e4851240654 26-Sep-2012 Glenn Kasten <gkasten@google.com> Revert "Don't wait for presentation complete if terminated"

This reverts commit 44cda3a4e7ca3de0db9cb49145def3803b03ebb4

Change-Id: I7fd29b77690dab057ac966a42fb198b2772f092c
udioflinger/AudioFlinger.cpp
52013e7ad02bd22b19a64bdccaa953c7b4b4d448 26-Sep-2012 Glenn Kasten <gkasten@google.com> Revert "Don't wait for presentation complete if terminated"

This reverts commit 44cda3a4e7ca3de0db9cb49145def3803b03ebb4

Change-Id: I7fd29b77690dab057ac966a42fb198b2772f092c
udioflinger/AudioFlinger.cpp
a4b3b7df111099ae6ce4996c6ff8ea586614e0b4 26-Sep-2012 Glenn Kasten <gkasten@google.com> am 512ba315: am cc0f1cfb: Implement android.media.AudioManager.getProperty()

* commit '512ba3150d45803ebadbefe45977a5eeed323540':
Implement android.media.AudioManager.getProperty()
2de3067ebf718007c4bacd3df4fba6f070c1538b 26-Sep-2012 Glenn Kasten <gkasten@google.com> am 512ba315: am cc0f1cfb: Implement android.media.AudioManager.getProperty()

* commit '512ba3150d45803ebadbefe45977a5eeed323540':
Implement android.media.AudioManager.getProperty()
cc0f1cfb69ce8b8985fc2c0984847a06a13ad22d 24-Sep-2012 Glenn Kasten <gkasten@google.com> Implement android.media.AudioManager.getProperty()

Bug: 6635041
Change-Id: I3386a4a6c226bc4eceaf65556119e4fb15f73224
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
4c6db4ce1e2760682d1c9e66448dbb39bb5d14d8 24-Sep-2012 Glenn Kasten <gkasten@google.com> Implement android.media.AudioManager.getProperty()

Bug: 6635041
Change-Id: I3386a4a6c226bc4eceaf65556119e4fb15f73224
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
9c7c6b36a7e443562148458bb4ee263433d73c26 25-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 0c82e022: am c7d9afdc: Camera2: Make sure to clean out reprocess streams on shutdown as well.

* commit '0c82e02258cf31347b16d1c1c305bb31490098bb':
Camera2: Make sure to clean out reprocess streams on shutdown as well.
1f10d46fc742790c094107c6e33fca4813f41ae8 25-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 0c82e022: am c7d9afdc: Camera2: Make sure to clean out reprocess streams on shutdown as well.

* commit '0c82e02258cf31347b16d1c1c305bb31490098bb':
Camera2: Make sure to clean out reprocess streams on shutdown as well.
ce00c851de49bc42cd1cbb86dd852b30dc744757 25-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am d2b4224e: am 4bb81188: Camera2: Debug and logging fixes.

* commit 'd2b4224e356e363bf753d246d805da4cf7481097':
Camera2: Debug and logging fixes.
bd9388b7e77a4474b670e72ef21b25936f0f22e1 25-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am d2b4224e: am 4bb81188: Camera2: Debug and logging fixes.

* commit 'd2b4224e356e363bf753d246d805da4cf7481097':
Camera2: Debug and logging fixes.
19dedfe04206b9d8044cb86bb2ed9dc30a26b9b5 25-Sep-2012 Eric Laurent <elaurent@google.com> am 4680802d: am b6ba2fd0: audioflinger: improve record start and thread exit

* commit '4680802d540379fda8a831167d8e7f2067327d90':
audioflinger: improve record start and thread exit
aeda50a708e41a000c509ee52cc6876ec48c191c 25-Sep-2012 Eric Laurent <elaurent@google.com> am 4680802d: am b6ba2fd0: audioflinger: improve record start and thread exit

* commit '4680802d540379fda8a831167d8e7f2067327d90':
audioflinger: improve record start and thread exit
c7d9afdc7d2181aef7688638fff52859bcdabd65 24-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Make sure to clean out reprocess streams on shutdown as well.

Otherwise, streams may persist past expected lifetime.

Bug: 6243944
Change-Id: I901971b78baf9d577ea3812588dec3885232e7ef
amera/libcameraservice/Camera2Device.cpp
c62bb787e53fc4b400219567585b365a5792412c 24-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Make sure to clean out reprocess streams on shutdown as well.

Otherwise, streams may persist past expected lifetime.

Bug: 6243944
Change-Id: I901971b78baf9d577ea3812588dec3885232e7ef
amera/libcameraservice/Camera2Device.cpp
4bb8118816874c696d9f1adab48490df1da365f7 24-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Debug and logging fixes.

- Fix LOG_TAGs to work with standard logcat filtering.
- Add ATRACE to Camera2Device
- Shorten thread names to fit in 16 characters
- Remove some ATRACEs to avoid flooding trace unnecessarily

Bug: 7220520
Change-Id: Ief8d677b5c8bb35d94e0f21b11b86505e83169ea
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/camera2/BurstCapture.cpp
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/CameraMetadata.cpp
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/FrameProcessor.cpp
amera/libcameraservice/camera2/JpegCompressor.cpp
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/ZslProcessor.cpp
852c381dbd1a9f86e6759201b50ac8847a1c3e3c 24-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Debug and logging fixes.

- Fix LOG_TAGs to work with standard logcat filtering.
- Add ATRACE to Camera2Device
- Shorten thread names to fit in 16 characters
- Remove some ATRACEs to avoid flooding trace unnecessarily

Bug: 7220520
Change-Id: Ief8d677b5c8bb35d94e0f21b11b86505e83169ea
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/camera2/BurstCapture.cpp
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/CameraMetadata.cpp
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/FrameProcessor.cpp
amera/libcameraservice/camera2/JpegCompressor.cpp
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/ZslProcessor.cpp
b6ba2fd0d61a4844c153e17843fbe2c841c4bf57 25-Sep-2012 Eric Laurent <elaurent@google.com> audioflinger: improve record start and thread exit

Use broadcast() instead of signal() on the
thread wake up condition when starting record or requesting thread
exit to make sure that if another thread is waiting for the same
condition (e.g binder thread calling setParameters()) the mixer
thread will be woken up.

Bug 7184317.

Change-Id: I3154a4509ca7af6ffae5236e522b0fab8e75ed06
udioflinger/AudioFlinger.cpp
67d8ac3a8b49b114366684cd6310493423581056 25-Sep-2012 Eric Laurent <elaurent@google.com> audioflinger: improve record start and thread exit

Use broadcast() instead of signal() on the
thread wake up condition when starting record or requesting thread
exit to make sure that if another thread is waiting for the same
condition (e.g binder thread calling setParameters()) the mixer
thread will be woken up.

Bug 7184317.

Change-Id: I3154a4509ca7af6ffae5236e522b0fab8e75ed06
udioflinger/AudioFlinger.cpp
168fd9a150b632ae384e43ff623d72f6105ce73f 25-Sep-2012 Igor Murashkin <iam@google.com> am 08e12910: am 9a2e4fa6: Merge "Camera2: Emit ShutterCallback/RawCallback events after takePicture" into jb-mr1-dev

* commit '08e129101318a2618ff624e3de742dc9ead01bcf':
Camera2: Emit ShutterCallback/RawCallback events after takePicture
d950d6b8eb6a76e6c3ec97550e7a73fac0e58e27 25-Sep-2012 Igor Murashkin <iam@google.com> am 08e12910: am 9a2e4fa6: Merge "Camera2: Emit ShutterCallback/RawCallback events after takePicture" into jb-mr1-dev

* commit '08e129101318a2618ff624e3de742dc9ead01bcf':
Camera2: Emit ShutterCallback/RawCallback events after takePicture
8fd84a218d61463744692cedfb9ce9dde5f3f701 25-Sep-2012 Igor Murashkin <iam@google.com> am d4722b87: am aae1de9e: Merge "Camera2: Fix cropRegion sometimes exceeding the sensor array size" into jb-mr1-dev

* commit 'd4722b8761ea3579e9412001bfe7f1ba8a989389':
Camera2: Fix cropRegion sometimes exceeding the sensor array size
fdaa846779f01007d7cdd79482721657def971ef 25-Sep-2012 Igor Murashkin <iam@google.com> am d4722b87: am aae1de9e: Merge "Camera2: Fix cropRegion sometimes exceeding the sensor array size" into jb-mr1-dev

* commit 'd4722b8761ea3579e9412001bfe7f1ba8a989389':
Camera2: Fix cropRegion sometimes exceeding the sensor array size
9a2e4fa60c843df54f35923898975fdbd04bed56 25-Sep-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Emit ShutterCallback/RawCallback events after takePicture" into jb-mr1-dev
f83e2b4fcff8298432dc75d9808aa05331b23bb1 25-Sep-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Emit ShutterCallback/RawCallback events after takePicture" into jb-mr1-dev
aae1de9eaba5aa3e2bce68b59aa78f918020f5a8 25-Sep-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Fix cropRegion sometimes exceeding the sensor array size" into jb-mr1-dev
2e57a199f302446957eec3fd1a603129fd03e1d4 25-Sep-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Fix cropRegion sometimes exceeding the sensor array size" into jb-mr1-dev
eb2ef90381ea42617f6a04b9356f5b5bf1ce4f5c 24-Sep-2012 Glenn Kasten <gkasten@google.com> am 6aee72a4: am 8d452f1c: Merge "Check clock_gettime(CLOCK_MONOTONIC) for failure" into jb-mr1-dev

* commit '6aee72a479afb15498a4dc31327c5d5ff7ee4294':
Check clock_gettime(CLOCK_MONOTONIC) for failure
ca301b7ec0a2a005a924d1cc7a4e988843722055 24-Sep-2012 Glenn Kasten <gkasten@google.com> am 6aee72a4: am 8d452f1c: Merge "Check clock_gettime(CLOCK_MONOTONIC) for failure" into jb-mr1-dev

* commit '6aee72a479afb15498a4dc31327c5d5ff7ee4294':
Check clock_gettime(CLOCK_MONOTONIC) for failure
8d452f1c61aa70c4a86c4114532f2c0983120ef8 24-Sep-2012 Glenn Kasten <gkasten@google.com> Merge "Check clock_gettime(CLOCK_MONOTONIC) for failure" into jb-mr1-dev
7ca821d51972bb83fa900cf2206ae98f29b33ca9 24-Sep-2012 Glenn Kasten <gkasten@google.com> Merge "Check clock_gettime(CLOCK_MONOTONIC) for failure" into jb-mr1-dev
1b65ae9b7bcb4302f80ddc1464f1aa2c7483efb8 21-Sep-2012 Igor Murashkin <iam@google.com> Camera2: Emit ShutterCallback/RawCallback events after takePicture

Bug: 7176692
Change-Id: I50e8f9511f1770d97a42d1fa208c04b1bbcfba6b
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/CaptureSequencer.h
707c3e34b067064f45c1b50919e88080fcdb5e77 21-Sep-2012 Igor Murashkin <iam@google.com> Camera2: Emit ShutterCallback/RawCallback events after takePicture

Bug: 7176692
Change-Id: I50e8f9511f1770d97a42d1fa208c04b1bbcfba6b
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/CaptureSequencer.h
018d228ac43a8da7d5f36e45fd105c9baf2490a0 19-Sep-2012 Igor Murashkin <iam@google.com> Camera2: Fix cropRegion sometimes exceeding the sensor array size

Bug: 7155264
Bug: 7120431
Change-Id: I92a9c695b97ec40acf26dbdaa877964e41a9fd4c
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
e500bc25cb801e69b4193b2863ec40bb3de04db9 19-Sep-2012 Igor Murashkin <iam@google.com> Camera2: Fix cropRegion sometimes exceeding the sensor array size

Bug: 7155264
Bug: 7120431
Change-Id: I92a9c695b97ec40acf26dbdaa877964e41a9fd4c
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
80b3273cea8660fe8a5868d024d2788a1e083ffc 24-Sep-2012 Glenn Kasten <gkasten@google.com> Check clock_gettime(CLOCK_MONOTONIC) for failure

Bug: 7100774
Change-Id: I15a84a19bb6d6ef1d9dac4beaa03587638196404
udioflinger/FastMixer.cpp
99ae06be60d7ccd753a0808191583225e5533f3a 24-Sep-2012 Glenn Kasten <gkasten@google.com> Check clock_gettime(CLOCK_MONOTONIC) for failure

Bug: 7100774
Change-Id: I15a84a19bb6d6ef1d9dac4beaa03587638196404
udioflinger/FastMixer.cpp
d4c1f2b55688fafabd468cd5b316dea636d7b4b8 24-Sep-2012 Eric Laurent <elaurent@google.com> am 842feefd: am c0c3b298: Merge "fix end of track presentation on suspended output" into jb-mr1-dev

* commit '842feefd25f3ac03de3cd9bcc5bc7627abec6ebc':
fix end of track presentation on suspended output
b777b2757b299c5fdb26d729ce405ab5b1c698ec 24-Sep-2012 Eric Laurent <elaurent@google.com> am 842feefd: am c0c3b298: Merge "fix end of track presentation on suspended output" into jb-mr1-dev

* commit '842feefd25f3ac03de3cd9bcc5bc7627abec6ebc':
fix end of track presentation on suspended output
c0c3b298cbcf47feeeaa597a7621a0dd45f5a99e 24-Sep-2012 Eric Laurent <elaurent@google.com> Merge "fix end of track presentation on suspended output" into jb-mr1-dev
595f54fd2d4990b2ff311314b76a224969d7e79e 24-Sep-2012 Eric Laurent <elaurent@google.com> Merge "fix end of track presentation on suspended output" into jb-mr1-dev
a3903b1fe72c1c3ad70d54489575d8b1b7e48cfd 24-Sep-2012 Alex Ray <aray@google.com> am 2355f172: am 53787020: Merge "Camera2: Truncate JPEG images" into jb-mr1-dev

* commit '2355f172c80b32d205faad7a59f5410eb1198a80':
Camera2: Truncate JPEG images
eec1151f216f980c78927478311ed12e59f60760 24-Sep-2012 Alex Ray <aray@google.com> am 2355f172: am 53787020: Merge "Camera2: Truncate JPEG images" into jb-mr1-dev

* commit '2355f172c80b32d205faad7a59f5410eb1198a80':
Camera2: Truncate JPEG images
9d1d7aad6cadfa9debe6bb2f1d7b1791b5472d69 24-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 585549bc: am df2bc296: Merge "Camera2: Don\'t use ZSL when flash is on force fire mode." into jb-mr1-dev

* commit '585549bc13dc03859d39f92f13e9da5e583b2d28':
Camera2: Don't use ZSL when flash is on force fire mode.
d18176804445bcc18ac9f39f73b54f5b420a20f6 24-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 585549bc: am df2bc296: Merge "Camera2: Don\'t use ZSL when flash is on force fire mode." into jb-mr1-dev

* commit '585549bc13dc03859d39f92f13e9da5e583b2d28':
Camera2: Don't use ZSL when flash is on force fire mode.
a6b4c40e70eafc5aba16163999de6d3e26667b89 21-Sep-2012 Alex Ray <aray@google.com> Camera2: Truncate JPEG images

Check for JPEG size hint from HAL, use if applicable. Otherwise
read until end of JPEG image to find appropriate file size.

Bug: 7108816
Change-Id: Idfd194133eb6c293ab08c9466f59606e62ba56b6
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/JpegProcessor.h
12c5d13c644cef1774cec2aafcbfeb4b205ba70f 21-Sep-2012 Alex Ray <aray@google.com> Camera2: Truncate JPEG images

Check for JPEG size hint from HAL, use if applicable. Otherwise
read until end of JPEG image to find appropriate file size.

Bug: 7108816
Change-Id: Idfd194133eb6c293ab08c9466f59606e62ba56b6
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/JpegProcessor.h
84b800853aad6fd30c2f0147e9c8c9d989b80dc3 24-Sep-2012 Igor Murashkin <iam@google.com> am 43d0199a: am 75dce94a: Merge "Camera2: Emit FaceDetection events for all except repeating 0-face frames" into jb-mr1-dev

* commit '43d0199a5c89d756cb3ac3c0c0fa7afe421be28b':
Camera2: Emit FaceDetection events for all except repeating 0-face frames
d41a238ada7ffe06e95c1971c066be94e58012cc 24-Sep-2012 Igor Murashkin <iam@google.com> am 43d0199a: am 75dce94a: Merge "Camera2: Emit FaceDetection events for all except repeating 0-face frames" into jb-mr1-dev

* commit '43d0199a5c89d756cb3ac3c0c0fa7afe421be28b':
Camera2: Emit FaceDetection events for all except repeating 0-face frames
1afc26db11b71c43f63a0f72a45a803f1a7910dd 24-Sep-2012 Eric Laurent <elaurent@google.com> fix end of track presentation on suspended output

The code detecting the end of an audio track presentation before
removing it from the active track list is based on the
count of audio frames sent to audio HAL. When an output stream
is suspended (e.g. A2DP when SCO is active), this count does not
change and a track in stopped state will never be removed from
active track list causing the mixer thread to never release
the wake lock.

The fix consists in incrementing the audio HAL frame count even
if the output is suspended.

Also fix a problem in getRenderPosition() when the output is suspended.

Bug 7167534.

Change-Id: I3be836cbbea29b65dc087199cac6a1cd84c0a41d
udioflinger/AudioFlinger.cpp
6090a17389fc86ec6d7b16b358c540fa6627923f 24-Sep-2012 Eric Laurent <elaurent@google.com> fix end of track presentation on suspended output

The code detecting the end of an audio track presentation before
removing it from the active track list is based on the
count of audio frames sent to audio HAL. When an output stream
is suspended (e.g. A2DP when SCO is active), this count does not
change and a track in stopped state will never be removed from
active track list causing the mixer thread to never release
the wake lock.

The fix consists in incrementing the audio HAL frame count even
if the output is suspended.

Also fix a problem in getRenderPosition() when the output is suspended.

Bug 7167534.

Change-Id: I3be836cbbea29b65dc087199cac6a1cd84c0a41d
udioflinger/AudioFlinger.cpp
df2bc29664d3bf80bed0012970608e5605acf7af 22-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Don't use ZSL when flash is on force fire mode." into jb-mr1-dev
e7fc0ece01c9672629664c07108640f589034636 22-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Don't use ZSL when flash is on force fire mode." into jb-mr1-dev
6b367f2a2bddfed60d63fa4da5e19ca13352a454 22-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't use ZSL when flash is on force fire mode.

Bug: 7213907
Change-Id: I120b187c1886d85f4b2b5d3a6f28a28936424e8e
amera/libcameraservice/camera2/CaptureSequencer.cpp
5a07a62123d3e630d739e790528273c1c09e3490 22-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't use ZSL when flash is on force fire mode.

Bug: 7213907
Change-Id: I120b187c1886d85f4b2b5d3a6f28a28936424e8e
amera/libcameraservice/camera2/CaptureSequencer.cpp
75dce94aca6203ada887b6c2d6a8a8130cdbfaca 22-Sep-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Emit FaceDetection events for all except repeating 0-face frames" into jb-mr1-dev
e8f1b2e454c4e462521d1751d515c1be4aa820e0 22-Sep-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Emit FaceDetection events for all except repeating 0-face frames" into jb-mr1-dev
e7f256a4b1d2037a67ab139fc8131a6ca97bd405 21-Sep-2012 Igor Murashkin <iam@google.com> Camera2: Emit FaceDetection events for all except repeating 0-face frames

Bug: 7205311
Change-Id: I570209445acf3a26f2246c3fe886d56bb63bd2f8
amera/libcameraservice/camera2/FrameProcessor.cpp
amera/libcameraservice/camera2/FrameProcessor.h
46dee9da04e80971c93cf23d772355217c88bb6a 21-Sep-2012 Igor Murashkin <iam@google.com> Camera2: Emit FaceDetection events for all except repeating 0-face frames

Bug: 7205311
Change-Id: I570209445acf3a26f2246c3fe886d56bb63bd2f8
amera/libcameraservice/camera2/FrameProcessor.cpp
amera/libcameraservice/camera2/FrameProcessor.h
d146b3438150a544cae1f633abdcdda727db0584 21-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 5819289d: am 75041228: Merge "Camera2: Clean up startup/shutdown sequences." into jb-mr1-dev

* commit '5819289db44c0c2ed9d5b06d1a90d6a521d80d15':
Camera2: Clean up startup/shutdown sequences.
9c6ebcb24aa5f8a7ea83722cf8e8360a2ce28018 21-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 5819289d: am 75041228: Merge "Camera2: Clean up startup/shutdown sequences." into jb-mr1-dev

* commit '5819289db44c0c2ed9d5b06d1a90d6a521d80d15':
Camera2: Clean up startup/shutdown sequences.
00a70e7207bb97db6b49a5986fe0cbc484b44f0c 21-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 31c6f064: am 4386b7c4: Merge "Camera2: Erase ZSL queue after each use." into jb-mr1-dev

* commit '31c6f0647da02ed2110522225c9f304312930db1':
Camera2: Erase ZSL queue after each use.
f5fc7772ebc5f4e091c0b19914aaf819a74ef689 21-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 31c6f064: am 4386b7c4: Merge "Camera2: Erase ZSL queue after each use." into jb-mr1-dev

* commit '31c6f0647da02ed2110522225c9f304312930db1':
Camera2: Erase ZSL queue after each use.
75041228626439668b64c93eb7bb866b3f63c3fd 21-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Clean up startup/shutdown sequences." into jb-mr1-dev
dab11978a30160c65322d46000497d1dfc6c764b 21-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Clean up startup/shutdown sequences." into jb-mr1-dev
98bb82d1bf7c94240956426812de6593801faad4 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Clean up startup/shutdown sequences.

- Close camera device on startup errors

- Make sure all threads are shut down and the device is closed before
returning from ICamera::disconnect.

Bug: 7172680
Change-Id: I98611448ec5f2311e6604fa8ee5f9dde7bfdd988
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
7adb52f9fcbe9e72ac29f89bfdabea093a0a0804 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Clean up startup/shutdown sequences.

- Close camera device on startup errors

- Make sure all threads are shut down and the device is closed before
returning from ICamera::disconnect.

Bug: 7172680
Change-Id: I98611448ec5f2311e6604fa8ee5f9dde7bfdd988
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
5fbf14045c7578fe48b357b5844437899aaf2b2b 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 8c3d991e: am aa05a277: Merge "Camera2: State must be STOPPED before JPEG callback is fired." into jb-mr1-dev

* commit '8c3d991efed8d22cccef53683a7910d51b1ae047':
Camera2: State must be STOPPED before JPEG callback is fired.
50e7e703dba3f8544b1943e08b158b79d928df40 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 8c3d991e: am aa05a277: Merge "Camera2: State must be STOPPED before JPEG callback is fired." into jb-mr1-dev

* commit '8c3d991efed8d22cccef53683a7910d51b1ae047':
Camera2: State must be STOPPED before JPEG callback is fired.
768cf093dade9085e0ad6305d9f7c16ae9ad9e26 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Erase ZSL queue after each use.

Since preview stops after a capture is submitted, need to clear out
the ZSL queue to avoid using stale buffers when the preview starts up
again.

Bug: 7189765
Change-Id: I9ae2382d0af132208aca5ccba49b5464d18a263e
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/ZslProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.h
5a8fed0251b978388bcebd6f4d0c4e2773c7641e 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Erase ZSL queue after each use.

Since preview stops after a capture is submitted, need to clear out
the ZSL queue to avoid using stale buffers when the preview starts up
again.

Bug: 7189765
Change-Id: I9ae2382d0af132208aca5ccba49b5464d18a263e
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/ZslProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.h
8c83015a3f19b3baac1e45a6398d49eec63c9bda 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 720a153c: am da1c5c15: Camera2: ZSL captures should also make some noise.

* commit '720a153ceb6f27bec2912918bce094f5a63355aa':
Camera2: ZSL captures should also make some noise.
819f26b8fc26a77ca36e5c7c335783b26b68786c 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 720a153c: am da1c5c15: Camera2: ZSL captures should also make some noise.

* commit '720a153ceb6f27bec2912918bce094f5a63355aa':
Camera2: ZSL captures should also make some noise.
37abef1ca85957880a5bbb69418f8665c3c54602 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 554eb1f2: am c5531186: Camera2: Increase max timeout for the precapture sequence.

* commit '554eb1f2e895ece43f7257658b738359653ebe17':
Camera2: Increase max timeout for the precapture sequence.
b3449de0ec8cb52c7527f8a0f05e5ffd8a08526e 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 554eb1f2: am c5531186: Camera2: Increase max timeout for the precapture sequence.

* commit '554eb1f2e895ece43f7257658b738359653ebe17':
Camera2: Increase max timeout for the precapture sequence.
fe580e57081885dd6059e0d407a6cd96a1be7e51 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: State must be STOPPED before JPEG callback is fired.

Move handling of JPEG callback to CaptureSequencer instead of
JpegProcessor, so that we can be sure the camera state is updated to
STOPPED before the JPEG callback is sent to the application layer.

Bug: 7172743
Change-Id: Ie8752d946d3eb8254230c77f10e5c38a83dc5371
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/CaptureSequencer.h
amera/libcameraservice/camera2/JpegProcessor.cpp
52e9ad48ddd3c2e7c90a9002a2a65a5d63125b78 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: State must be STOPPED before JPEG callback is fired.

Move handling of JPEG callback to CaptureSequencer instead of
JpegProcessor, so that we can be sure the camera state is updated to
STOPPED before the JPEG callback is sent to the application layer.

Bug: 7172743
Change-Id: Ie8752d946d3eb8254230c77f10e5c38a83dc5371
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/CaptureSequencer.h
amera/libcameraservice/camera2/JpegProcessor.cpp
da1c5c15c2483cd41035e1a492c5963ac86bbcf5 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: ZSL captures should also make some noise.

Change-Id: If7aff7223db41b4b7edeeb4c32e40ef3197b180b
amera/libcameraservice/camera2/CaptureSequencer.cpp
a4247b833599882b23db39e9f773746dc2fd9693 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: ZSL captures should also make some noise.

Change-Id: If7aff7223db41b4b7edeeb4c32e40ef3197b180b
amera/libcameraservice/camera2/CaptureSequencer.cpp
c55311869f1853c6814c9bcda8a4b60e43091c1a 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Increase max timeout for the precapture sequence.

Increase maximum duration of the precapture sequence (final metering +
preflash + redeye reduction) to 2 seconds before timing out.

Change-Id: Ie1de4e96d46599eb53e1def9052b211e684f1fbc
amera/libcameraservice/camera2/CaptureSequencer.h
9d5f5c2a6a2af953de5b091e00bf59cae7f8d481 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Increase max timeout for the precapture sequence.

Increase maximum duration of the precapture sequence (final metering +
preflash + redeye reduction) to 2 seconds before timing out.

Change-Id: Ie1de4e96d46599eb53e1def9052b211e684f1fbc
amera/libcameraservice/camera2/CaptureSequencer.h
3438af98697069444522df18ec73c62400d8a15f 19-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am c28d5d24: am 74e58c55: Merge "Camera2: Increase capture timeout." into jb-mr1-dev

* commit 'c28d5d24c98f50daa9fa31a8afaca6d6c50283cd':
Camera2: Increase capture timeout.
a4ae0b974e580b759e82d861d137cea6f91a304d 19-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am c28d5d24: am 74e58c55: Merge "Camera2: Increase capture timeout." into jb-mr1-dev

* commit 'c28d5d24c98f50daa9fa31a8afaca6d6c50283cd':
Camera2: Increase capture timeout.
74e58c55bc5259b957a51f1bb44a5911ad1f8400 19-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Increase capture timeout." into jb-mr1-dev
d5a9ae029b50678de3b468d8324728a73ff5b0aa 19-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Increase capture timeout." into jb-mr1-dev
1f266efe8ce2976b6531fab8698716354b2247f8 19-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Increase capture timeout.

Low-light modes may take longer to capture a picture, so increase the
timeouts.

Change-Id: Id50b1e4fd3186da4e75b2cc1c226ced2f8d394ac
amera/libcameraservice/camera2/CaptureSequencer.h
59ab044774bf7fd0b841087212078babb4451eb8 19-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Increase capture timeout.

Low-light modes may take longer to capture a picture, so increase the
timeouts.

Change-Id: Id50b1e4fd3186da4e75b2cc1c226ced2f8d394ac
amera/libcameraservice/camera2/CaptureSequencer.h
291c5cd791defc9bf05031ccdd71958f6cd1e424 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 0e004bd9: am 2f93127d: Camera2: Enable ZSL by default.

* commit '0e004bd92d88540ead11f0b4728b7c0a0a11169c':
Camera2: Enable ZSL by default.
9f6b07ec93877d22c69bb07706fa54abe2f76c71 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 0e004bd9: am 2f93127d: Camera2: Enable ZSL by default.

* commit '0e004bd92d88540ead11f0b4728b7c0a0a11169c':
Camera2: Enable ZSL by default.
eef5f991b2f37692a18deb38c2effdd50e21ce64 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 5daef989: am 9c6ec821: Merge "Camera2: ZSL: Do regular capture if AE is not satisfied." into jb-mr1-dev

* commit '5daef98953509f699ca88419f4bb5be45e75716c':
Camera2: ZSL: Do regular capture if AE is not satisfied.
3fd4532fb635949ff91df409add390611ad511a1 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 5daef989: am 9c6ec821: Merge "Camera2: ZSL: Do regular capture if AE is not satisfied." into jb-mr1-dev

* commit '5daef98953509f699ca88419f4bb5be45e75716c':
Camera2: ZSL: Do regular capture if AE is not satisfied.
2f93127de30bbe17707ca8923c486d4494ffda37 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Enable ZSL by default.

Bug: 6910087
Change-Id: Ie774f28fbb943b2ac2c856872fd4cae68b40430c
amera/libcameraservice/camera2/Parameters.cpp
a2acc96eadc02228b8a3366de3d05d3a6a81272c 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Enable ZSL by default.

Bug: 6910087
Change-Id: Ie774f28fbb943b2ac2c856872fd4cae68b40430c
amera/libcameraservice/camera2/Parameters.cpp
9c6ec8213d8da486a61659b9c37b7a57a2c4bb1a 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: ZSL: Do regular capture if AE is not satisfied." into jb-mr1-dev
a80773ba36872943713d76c8485bed12ddc53499 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: ZSL: Do regular capture if AE is not satisfied." into jb-mr1-dev
97b38a81ac989ccba02d726011a82541f14166df 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: ZSL: Do regular capture if AE is not satisfied.

- Check the AE state of the selected ZSL buffer; if it's not reporting
as CONVERGED or LOCKED, fall back to normal capture sequence
- Add more debugging for the ZSL queue.

Bug: 6910087
Change-Id: I77a4287580aa9ddbd58438477c40ce829555d0ca
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/ZslProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.h
2274549ec18f63a285db871fa67abf42124d116e 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: ZSL: Do regular capture if AE is not satisfied.

- Check the AE state of the selected ZSL buffer; if it's not reporting
as CONVERGED or LOCKED, fall back to normal capture sequence
- Add more debugging for the ZSL queue.

Bug: 6910087
Change-Id: I77a4287580aa9ddbd58438477c40ce829555d0ca
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/ZslProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.h
ee1c2543f4bad38a0b21e66a0bf09bc07db18c12 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 6f76dbca: am 0d61a788: Merge changes Ibe5c08d5,I559f1281,I6f0f44fa into jb-mr1-dev

* commit '6f76dbca21402053ab9cd0b0d748e0a58b0d756d':
Camera2: Don't be bothered by lack of faces.
Camera2: Filter out faces with 0 confidence.
Camera2: Change face detect/scene mode priority.
4706578d6f209c19e04ab0286a8bb0e446d990c8 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 6f76dbca: am 0d61a788: Merge changes Ibe5c08d5,I559f1281,I6f0f44fa into jb-mr1-dev

* commit '6f76dbca21402053ab9cd0b0d748e0a58b0d756d':
Camera2: Don't be bothered by lack of faces.
Camera2: Filter out faces with 0 confidence.
Camera2: Change face detect/scene mode priority.
663c2cd909cb9c0699b4d58c1db7c6252afd77ea 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't be bothered by lack of faces.

Sometimes, people might want to photograph scenes with no faces. And
not have their log fill with errors when they do.

Bug: 7078231
Change-Id: Ibe5c08d51b49a3ea14203416fe7803a58de08dda
amera/libcameraservice/camera2/FrameProcessor.cpp
0e0a14013dc3c0c02f96ec486d70d0871747062c 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't be bothered by lack of faces.

Sometimes, people might want to photograph scenes with no faces. And
not have their log fill with errors when they do.

Bug: 7078231
Change-Id: Ibe5c08d51b49a3ea14203416fe7803a58de08dda
amera/libcameraservice/camera2/FrameProcessor.cpp
a9f8d040146533a9c214473fd79cbd9dff44428d 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Filter out faces with 0 confidence.

Bug: 7078231
Change-Id: I559f1281359835e0489456091a5409ebc8f73479
amera/libcameraservice/camera2/FrameProcessor.cpp
55619ef9beb0383b383f185f2e1b61a82745dbcd 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Filter out faces with 0 confidence.

Bug: 7078231
Change-Id: I559f1281359835e0489456091a5409ebc8f73479
amera/libcameraservice/camera2/FrameProcessor.cpp
d14de47262340d70fc11fe56159462b9b981067f 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Change face detect/scene mode priority.

Explicit scene modes should override the implicit face priority scene
mode from enabling face detection, to match application/API
expectations.

Change-Id: I6f0f44fadeacfdc0594dd2fdc280e294d2d87df6
amera/libcameraservice/camera2/Parameters.cpp
063886eed72c1a12ff73953561d662b47e8230d5 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Change face detect/scene mode priority.

Explicit scene modes should override the implicit face priority scene
mode from enabling face detection, to match application/API
expectations.

Change-Id: I6f0f44fadeacfdc0594dd2fdc280e294d2d87df6
amera/libcameraservice/camera2/Parameters.cpp
91f6439dd744a08730c98cc775aeec8036b39207 17-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 9486e8ca: am 874a4618: Merge "Camera2: Don\'t play shutter sound when doing a video snapshot" into jb-mr1-dev

* commit '9486e8cac69e0a9bfc20aee148c515f8237a6b3e':
Camera2: Don't play shutter sound when doing a video snapshot
137b32bef9e5abbdc68549bd8e9edf15c14d28ca 17-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 9486e8ca: am 874a4618: Merge "Camera2: Don\'t play shutter sound when doing a video snapshot" into jb-mr1-dev

* commit '9486e8cac69e0a9bfc20aee148c515f8237a6b3e':
Camera2: Don't play shutter sound when doing a video snapshot
98bc0b929c682adb59595688d5b87081218eaa3c 17-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 92908745: am b845c6b0: Merge "Revert "Revert "Camera2: Use FORMAT_ZSL until transition to new gralloc scheme.""" into jb-mr1-dev

* commit '92908745a52989339dc5b9ebf3d402607ea09b24':
Revert "Revert "Camera2: Use FORMAT_ZSL until transition to new gralloc scheme.""
628335809726683ce13d49d51ab51ef984933a13 17-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 92908745: am b845c6b0: Merge "Revert "Revert "Camera2: Use FORMAT_ZSL until transition to new gralloc scheme.""" into jb-mr1-dev

* commit '92908745a52989339dc5b9ebf3d402607ea09b24':
Revert "Revert "Camera2: Use FORMAT_ZSL until transition to new gralloc scheme.""
8c5372ed6644b800932dbef4aedb6add6c8c5661 17-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am d31bdeca: am e44e90c8: Merge "Revert "Camera2: Use FORMAT_ZSL until transition to new gralloc scheme."" into jb-mr1-dev

* commit 'd31bdeca545a0da00c1f8d29fa47cb725c67c21f':
Revert "Camera2: Use FORMAT_ZSL until transition to new gralloc scheme."
30fe5bade008909e907aca9ce2eba408ca01e859 17-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am d31bdeca: am e44e90c8: Merge "Revert "Camera2: Use FORMAT_ZSL until transition to new gralloc scheme."" into jb-mr1-dev

* commit 'd31bdeca545a0da00c1f8d29fa47cb725c67c21f':
Revert "Camera2: Use FORMAT_ZSL until transition to new gralloc scheme."
fac9b61a05e2143c877474ce3e2a3a47803ed799 17-Sep-2012 Igor Murashkin <iam@google.com> am fff97293: am cb66d22f: Merge "Camera2: Use FORMAT_ZSL until transition to new gralloc scheme." into jb-mr1-dev

* commit 'fff97293d56ca9869004f89ce46c2b337d7f57e7':
Camera2: Use FORMAT_ZSL until transition to new gralloc scheme.
45fb44687dd9d02490120d0d104a65e21d342402 17-Sep-2012 Igor Murashkin <iam@google.com> am fff97293: am cb66d22f: Merge "Camera2: Use FORMAT_ZSL until transition to new gralloc scheme." into jb-mr1-dev

* commit 'fff97293d56ca9869004f89ce46c2b337d7f57e7':
Camera2: Use FORMAT_ZSL until transition to new gralloc scheme.
efb039e07c688c21122c938b008457bd4f555898 15-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't play shutter sound when doing a video snapshot

Bug: 7171820
Change-Id: I11ec0900aff3cdf4b57ae1bfc75f7acfecf95098
amera/libcameraservice/camera2/CaptureSequencer.cpp
bd3a81653a9bbdf7aa9394d99f2fc9b7dabf68dc 15-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't play shutter sound when doing a video snapshot

Bug: 7171820
Change-Id: I11ec0900aff3cdf4b57ae1bfc75f7acfecf95098
amera/libcameraservice/camera2/CaptureSequencer.cpp
b845c6b0c3066d6791973be830f0953477461a65 14-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Revert "Revert "Camera2: Use FORMAT_ZSL until transition to new gralloc scheme.""" into jb-mr1-dev
482136a5f977056eeffe2aa58d31ce395be562a3 14-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Revert "Revert "Camera2: Use FORMAT_ZSL until transition to new gralloc scheme.""" into jb-mr1-dev
beb1416afd1d331b8e7e93d626f39267acce289a 14-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Revert "Revert "Camera2: Use FORMAT_ZSL until transition to new gralloc scheme.""

The changes this commit depends on are now submitted.

This reverts commit f54b1459cda7f585b4896671643b33bab8290964

Change-Id: If7f146ab7968d50fffd2174c2c5792bdc9d7724c
amera/libcameraservice/camera2/ZslProcessor.cpp
d697d5c780b61d121249c51eeddd4b36cae877fb 14-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Revert "Revert "Camera2: Use FORMAT_ZSL until transition to new gralloc scheme.""

The changes this commit depends on are now submitted.

This reverts commit f54b1459cda7f585b4896671643b33bab8290964

Change-Id: If7f146ab7968d50fffd2174c2c5792bdc9d7724c
amera/libcameraservice/camera2/ZslProcessor.cpp
e44e90c82d75b806e89f751a61dc7e54d0144338 14-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Revert "Camera2: Use FORMAT_ZSL until transition to new gralloc scheme."" into jb-mr1-dev
ac7ba271fc74fe149679fdaf990fa0e19263f05e 14-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Revert "Camera2: Use FORMAT_ZSL until transition to new gralloc scheme."" into jb-mr1-dev
f54b1459cda7f585b4896671643b33bab8290964 14-Sep-2012 Igor Murashkin <iam@google.com> Revert "Camera2: Use FORMAT_ZSL until transition to new gralloc scheme."

This reverts commit 8a3016613dc684a6be11fdf643f9cc5cad817e8f

Change-Id: I3f1d4e9c13df838b8b6aa5696a6494140eac3e04
amera/libcameraservice/camera2/ZslProcessor.cpp
b362ce8130a345c3675f985e00411bb8fcbdc55e 14-Sep-2012 Igor Murashkin <iam@google.com> Revert "Camera2: Use FORMAT_ZSL until transition to new gralloc scheme."

This reverts commit 8a3016613dc684a6be11fdf643f9cc5cad817e8f

Change-Id: I3f1d4e9c13df838b8b6aa5696a6494140eac3e04
amera/libcameraservice/camera2/ZslProcessor.cpp
cb66d22f2e3727ca858bb578c1d18956da1a9c2b 14-Sep-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Use FORMAT_ZSL until transition to new gralloc scheme." into jb-mr1-dev
cfc68d5e907528581a2e84a822812b848429ad83 14-Sep-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Use FORMAT_ZSL until transition to new gralloc scheme." into jb-mr1-dev
6adeb50d4b320c235c4ad1e334493eb174eaeeda 14-Sep-2012 Eric Laurent <elaurent@google.com> am 01dcf4de: am 896adcd3: audioflinger: send priority request from a thread

* commit '01dcf4de81ed0f9b6942dea2787463bf9c945a37':
audioflinger: send priority request from a thread
1cbb9253100d428e52330cc71f09db08cfdcf6ae 14-Sep-2012 Eric Laurent <elaurent@google.com> am 01dcf4de: am 896adcd3: audioflinger: send priority request from a thread

* commit '01dcf4de81ed0f9b6942dea2787463bf9c945a37':
audioflinger: send priority request from a thread
cb48dcf506e8ed9fbc5fae449ff014e495dff67d 14-Sep-2012 Jean-Michel Trivi <jmtrivi@google.com> am 868bb58e: am 4362f530: Handle audio HAL returning 0 bytes in record thread

* commit '868bb58ed5873edb1d138f82d4751823ef433ebb':
Handle audio HAL returning 0 bytes in record thread
550f0bc9cbe8ea44b380eafa2ee674c62d10b819 14-Sep-2012 Jean-Michel Trivi <jmtrivi@google.com> am 868bb58e: am 4362f530: Handle audio HAL returning 0 bytes in record thread

* commit '868bb58ed5873edb1d138f82d4751823ef433ebb':
Handle audio HAL returning 0 bytes in record thread
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
8a3016613dc684a6be11fdf643f9cc5cad817e8f 14-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use FORMAT_ZSL until transition to new gralloc scheme.

Until all HAL implementations move to the new format negotiation
scheme, use CAMERA2_HAL_PIXEL_FORMAT_ZSL to indicate ZSL mode.

Bug: 6243944
Change-Id: Idf5d9f42e203903ba906d5df156100646b27404c
amera/libcameraservice/camera2/ZslProcessor.cpp
06068bffa9d226ab578e8dea5540179da89aebf9 14-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use FORMAT_ZSL until transition to new gralloc scheme.

Until all HAL implementations move to the new format negotiation
scheme, use CAMERA2_HAL_PIXEL_FORMAT_ZSL to indicate ZSL mode.

Bug: 6243944
Change-Id: Idf5d9f42e203903ba906d5df156100646b27404c
amera/libcameraservice/camera2/ZslProcessor.cpp
2fb740c2335a3321deb46b5120b77e61bf702016 13-Sep-2012 Eric Laurent <elaurent@google.com> am 6777e539: am f4bca03d: Merge "Don\'t deadlock on AudioRecord start when reads return 0" into jb-mr1-dev

* commit '6777e539f0479ed8ca13bfeed63edf9402b00655':
Don't deadlock on AudioRecord start when reads return 0
3fc73b477cba93ff74e46d93ed40ebe1cfced138 13-Sep-2012 Eric Laurent <elaurent@google.com> am 6777e539: am f4bca03d: Merge "Don\'t deadlock on AudioRecord start when reads return 0" into jb-mr1-dev

* commit '6777e539f0479ed8ca13bfeed63edf9402b00655':
Don't deadlock on AudioRecord start when reads return 0
6adf6983c46826833661ab563ab7e675fcb43d20 13-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am d021c2f3: am bdde5f88: Camera2: Fix ZSL bugs.

* commit 'd021c2f390ecedae498233679659c37cfde8e8fb':
Camera2: Fix ZSL bugs.
95fa0dd131b625e73c8a18c95a252e5eabbfe1a5 13-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am d021c2f3: am bdde5f88: Camera2: Fix ZSL bugs.

* commit 'd021c2f390ecedae498233679659c37cfde8e8fb':
Camera2: Fix ZSL bugs.
4362f5300162ed55f56cf167eccf7f2e5b89d435 13-Sep-2012 Jean-Michel Trivi <jmtrivi@google.com> Handle audio HAL returning 0 bytes in record thread

Enter standby when HAL returns an error, but also consider 0 bytes
returned as NOT_ENOUGH_DATA.

Change-Id: Ica83142310e9c176f936e0440571a6034cbc575f
udioflinger/AudioFlinger.cpp
89b4470bc926c4b5de59deaff2b6a4993ab6cab7 13-Sep-2012 Jean-Michel Trivi <jmtrivi@google.com> Handle audio HAL returning 0 bytes in record thread

Enter standby when HAL returns an error, but also consider 0 bytes
returned as NOT_ENOUGH_DATA.

Change-Id: Ica83142310e9c176f936e0440571a6034cbc575f
udioflinger/AudioFlinger.cpp
43ed5337f3eaa909ad2e87df0ccd061c3e6d0096 13-Sep-2012 Jean-Michel Trivi <jmtrivi@google.com> Fix build in AudioFlinger/FastMixer

Commit was missing some changes to modifications to send session ID
from AudioFlinger to AudioMixer.

Change-Id: I7daeaf4eff243b5287bef63be86a87acf408374a
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/FastMixer.cpp
063c1eac60d7cee5d6f1ee61a10f0b6027782357 13-Sep-2012 Jean-Michel Trivi <jmtrivi@google.com> Fix build in AudioFlinger/FastMixer

Commit was missing some changes to modifications to send session ID
from AudioFlinger to AudioMixer.

Change-Id: I7daeaf4eff243b5287bef63be86a87acf408374a
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/FastMixer.cpp
53e2ea7f656a6d5cf96b59be71b9d15a83533c08 13-Sep-2012 Jean-Michel Trivi <jmtrivi@google.com> Merge "Communicate audio session ID to downmixer"
cd0817e208a5420cf6787e766ec017676cbe4e72 13-Sep-2012 Jean-Michel Trivi <jmtrivi@google.com> Merge "Communicate audio session ID to downmixer"
f4bca03d996b584030a80268f58cdb29dc7b7cde 13-Sep-2012 Eric Laurent <elaurent@google.com> Merge "Don't deadlock on AudioRecord start when reads return 0" into jb-mr1-dev
f8c5023fd3200aaf79293bdbab264d09b0936d54 13-Sep-2012 Eric Laurent <elaurent@google.com> Merge "Don't deadlock on AudioRecord start when reads return 0" into jb-mr1-dev
52762410dbc9189cd92a4094a1dbd4cfe8e71cb6 13-Sep-2012 Jean-Michel Trivi <jmtrivi@google.com> Don't deadlock on AudioRecord start when reads return 0

When calling start() on an AudioRecord with a HAL that
returns 0 on a read() operation, the start blocking
condition was never unblocked.
Add a boolean to track the first read operation so the returned
number of bytes (mBytesRead) is only evaluated after that
first read.

Change-Id: I8c735a00d48cd6a0da467ccdf75d3616b38f6afa
udioflinger/AudioFlinger.cpp
607364600e4f6ef8bebec8958e16e7fb0bcb7d25 13-Sep-2012 Jean-Michel Trivi <jmtrivi@google.com> Don't deadlock on AudioRecord start when reads return 0

When calling start() on an AudioRecord with a HAL that
returns 0 on a read() operation, the start blocking
condition was never unblocked.
Add a boolean to track the first read operation so the returned
number of bytes (mBytesRead) is only evaluated after that
first read.

Change-Id: I8c735a00d48cd6a0da467ccdf75d3616b38f6afa
udioflinger/AudioFlinger.cpp
bdde5f884eaf270ab4b806849f3122a46cd872ce 12-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix ZSL bugs.

The ZSL processor was discarding buffers too often, and waiting for
new buffers with mutexes held.

Also adds basic fallback to regular capture in case the ZSL queue
doesn't contain a suitable buffer.

Bug: 7147043

Change-Id: I5721267ef08dbc87ef9d8ec47f333db5f67e41c1
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/ZslProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.h
2954fe9a1cf578c2ad54c2fefb79aeb2a3d220eb 12-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix ZSL bugs.

The ZSL processor was discarding buffers too often, and waiting for
new buffers with mutexes held.

Also adds basic fallback to regular capture in case the ZSL queue
doesn't contain a suitable buffer.

Bug: 7147043

Change-Id: I5721267ef08dbc87ef9d8ec47f333db5f67e41c1
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/ZslProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.h
d06e132358d44f02c22527b4f463df1f58da9216 13-Sep-2012 Jean-Michel Trivi <jmtrivi@google.com> Communicate audio session ID to downmixer

The audio downmixer effect might need the audio session Id, pass it
from the track creation in AudioFlinger to the downmix effect
creation in AudioMixer.

Change-Id: I836873eebd6711f1048fce81cd2eb29b94f0ad0c
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
a59d27196cc411331efbcce5dde817c7273a64c3 13-Sep-2012 Jean-Michel Trivi <jmtrivi@google.com> Communicate audio session ID to downmixer

The audio downmixer effect might need the audio session Id, pass it
from the track creation in AudioFlinger to the downmix effect
creation in AudioMixer.

Change-Id: I836873eebd6711f1048fce81cd2eb29b94f0ad0c
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
99970de9a58befc260b86fd94728507dd0e7a5c5 13-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am f1e354df: am d067489a: Merge "Camera2: Use full pixel array for ZSL stream" into jb-mr1-dev

* commit 'f1e354df16ad01542b06f8f14d7d47dae5fd381e':
Camera2: Use full pixel array for ZSL stream
4808377df5087b93352e82f640fe37e3a1a48746 13-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am f1e354df: am d067489a: Merge "Camera2: Use full pixel array for ZSL stream" into jb-mr1-dev

* commit 'f1e354df16ad01542b06f8f14d7d47dae5fd381e':
Camera2: Use full pixel array for ZSL stream
4a127a7bc9c3a4b0611242927cfb666b20197918 13-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 8bb57472: am 2552036a: Merge "Camera2: Configure ZSL at the right time." into jb-mr1-dev

* commit '8bb574725ea880c53986c8d66eeb090731ecd6d5':
Camera2: Configure ZSL at the right time.
f0372bb34036da279322117532b5800f5b19fba2 13-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 8bb57472: am 2552036a: Merge "Camera2: Configure ZSL at the right time." into jb-mr1-dev

* commit '8bb574725ea880c53986c8d66eeb090731ecd6d5':
Camera2: Configure ZSL at the right time.
0f32c64f6ad62d83aafb75ff76b67e3a355df61e 13-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 2664dab4: am b063cb62: Merge "Camera1: Fix enable shutter sound command error handling." into jb-mr1-dev

* commit '2664dab44dd61fde35be6806b0a4d5f1eb523df2':
Camera1: Fix enable shutter sound command error handling.
fe9938f7f39f62a8ece1dc29196943761165383a 13-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 2664dab4: am b063cb62: Merge "Camera1: Fix enable shutter sound command error handling." into jb-mr1-dev

* commit '2664dab44dd61fde35be6806b0a4d5f1eb523df2':
Camera1: Fix enable shutter sound command error handling.
d067489a23640a107e0a86f6de9b467d509deb36 12-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Use full pixel array for ZSL stream" into jb-mr1-dev
2fd313002a0e987ac01c037d5357e1572c4522c6 12-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Use full pixel array for ZSL stream" into jb-mr1-dev
2552036ac67472411082d894eb6e11623799d277 12-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Configure ZSL at the right time." into jb-mr1-dev
c4cb95449426b5715c6f737abb7eb95945f87166 12-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Configure ZSL at the right time." into jb-mr1-dev
6e4db898bac9499a8abe7e6b6fbf729b78f6bd68 12-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use full pixel array for ZSL stream

For efficiency, use full pixel array size for the ZSL output/input
streams, instead of the final picture size.

Bug: 7139362
Change-Id: I98ad4f5a1ca283efe87ae60bf0cf39573e22d2f3
amera/libcameraservice/camera2/ZslProcessor.cpp
efd69bc6740cb20a9d8bf58ecdf16f411573c100 12-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use full pixel array for ZSL stream

For efficiency, use full pixel array size for the ZSL output/input
streams, instead of the final picture size.

Bug: 7139362
Change-Id: I98ad4f5a1ca283efe87ae60bf0cf39573e22d2f3
amera/libcameraservice/camera2/ZslProcessor.cpp
b075252349a4b40ddda791f2e1221ae0ce7e4cd1 12-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Configure ZSL at the right time.

ZSL enable was too early in the camera startup sequence, resulting it
being turned off most of the time.

Bug: 7148012
Change-Id: Ie144dd960d018a34b0bc77c88208ca22b7112772
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/Parameters.cpp
c33e4b59c48aff4c531ba33d03066b0fe101b8bf 12-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Configure ZSL at the right time.

ZSL enable was too early in the camera startup sequence, resulting it
being turned off most of the time.

Bug: 7148012
Change-Id: Ie144dd960d018a34b0bc77c88208ca22b7112772
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/Parameters.cpp
b063cb62ab371cced17a6288ebf54e7e6ca58982 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera1: Fix enable shutter sound command error handling." into jb-mr1-dev
eb37db0ff21ab89d9870099d8fe7c073d58f1c6e 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera1: Fix enable shutter sound command error handling." into jb-mr1-dev
c5268e825d4a513ad857b7944a9f85dc478c1dc6 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera1: Fix enable shutter sound command error handling.

Return the error codes from calls to enableShutterSound to the caller,
and don't call the HAL with the enable shutter sound command.

Change-Id: Ibe4943bd1cd0fcd1832fd904f12dd2f78fec06a5
amera/libcameraservice/CameraClient.cpp
ccd795f3c52e626b6eb37a9b6c6ad4ca2f68aa03 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera1: Fix enable shutter sound command error handling.

Return the error codes from calls to enableShutterSound to the caller,
and don't call the HAL with the enable shutter sound command.

Change-Id: Ibe4943bd1cd0fcd1832fd904f12dd2f78fec06a5
amera/libcameraservice/CameraClient.cpp
498a274c188f18049053ef5424b52cc4d9314c80 11-Sep-2012 Jean-Michel Trivi <jmtrivi@google.com> Merge "Communicate audio session ID to downmixer" into jb-mr1-dev
488044714727d86fd1bd40ec0d01b9fd670631c9 11-Sep-2012 Jean-Michel Trivi <jmtrivi@google.com> Merge "Communicate audio session ID to downmixer" into jb-mr1-dev
fe3156ec6fd9fa57dde913fd8567530d095a6550 11-Sep-2012 Jean-Michel Trivi <jmtrivi@google.com> Communicate audio session ID to downmixer

The audio downmixer effect might need the audio session Id, pass it
from the track creation in AudioFlinger to the downmix effect
creation in AudioMixer.

Change-Id: I5e29540542ae89cf4a0cdb537b3e67f04442a20a
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/FastMixer.cpp
cff7137411e737dfb783013c23841ccb335e5f5b 11-Sep-2012 Jean-Michel Trivi <jmtrivi@google.com> Communicate audio session ID to downmixer

The audio downmixer effect might need the audio session Id, pass it
from the track creation in AudioFlinger to the downmix effect
creation in AudioMixer.

Change-Id: I5e29540542ae89cf4a0cdb537b3e67f04442a20a
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/FastMixer.cpp
e0458faea9589a9f2492e47c2a17e3eefa973237 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am e47e904f: am ac19caca: Merge "Camera2: Temporarily stop pre-allocation of recording stream." into jb-mr1-dev

* commit 'e47e904f58b7abd460ef7ff92057babcf2f31eb9':
Camera2: Temporarily stop pre-allocation of recording stream.
5ca0bc5a1c2cd4a59af56791fb5908618b95794a 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am e47e904f: am ac19caca: Merge "Camera2: Temporarily stop pre-allocation of recording stream." into jb-mr1-dev

* commit 'e47e904f58b7abd460ef7ff92057babcf2f31eb9':
Camera2: Temporarily stop pre-allocation of recording stream.
0d230da6455e90ee0baea8e73c394fa98b4a4fa4 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 8b3f8b75: am ba5e6505: Merge "Camera2: Clean up the right streams." into jb-mr1-dev

* commit '8b3f8b7594b14063f427c221eafa831d8cde81e6':
Camera2: Clean up the right streams.
4ac4c9466130d2e908a8d371b6534dda5420b169 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 8b3f8b75: am ba5e6505: Merge "Camera2: Clean up the right streams." into jb-mr1-dev

* commit '8b3f8b7594b14063f427c221eafa831d8cde81e6':
Camera2: Clean up the right streams.
186543402c822cf823e8ded5e0231b00a5aad19c 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am b8473d5c: am 61c0cc6a: Camera2: Use face priority scene mode when face detect is enabled.

* commit 'b8473d5c6048cecb8a6ada2a4c78dfa917e6b37a':
Camera2: Use face priority scene mode when face detect is enabled.
b72812c60f7f6e01ff9a4fe2da134f0f5fb695aa 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am b8473d5c: am 61c0cc6a: Camera2: Use face priority scene mode when face detect is enabled.

* commit 'b8473d5c6048cecb8a6ada2a4c78dfa917e6b37a':
Camera2: Use face priority scene mode when face detect is enabled.
754b7f3a48305d5b9ed13902998a816d1a17b871 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am bb732004: am 4a02cc81: Camera2: Sanity check inputs better.

* commit 'bb7320049911007be877e0f5e6ee53c36ee6a34c':
Camera2: Sanity check inputs better.
cda2e3844204d603ee3b28a2ab63ab29d4b4b72c 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am bb732004: am 4a02cc81: Camera2: Sanity check inputs better.

* commit 'bb7320049911007be877e0f5e6ee53c36ee6a34c':
Camera2: Sanity check inputs better.
240d637c7da00dd89648b96581154b514e2770e5 11-Sep-2012 Glenn Kasten <gkasten@google.com> am f53e33fb: am 6ce3d19c: Merge "Add outlier statistics for fast mixer cycle times" into jb-mr1-dev

* commit 'f53e33fbb03f7de07d79f5f99f73d7b2d0bbed03':
Add outlier statistics for fast mixer cycle times
9b827b72202038a321a9b038165971bed042311c 11-Sep-2012 Glenn Kasten <gkasten@google.com> am f53e33fb: am 6ce3d19c: Merge "Add outlier statistics for fast mixer cycle times" into jb-mr1-dev

* commit 'f53e33fbb03f7de07d79f5f99f73d7b2d0bbed03':
Add outlier statistics for fast mixer cycle times
f6da872b69701220b7d44add893051c6f3cd2984 11-Sep-2012 James Painter <jpainter@google.com> am dceb601b: am 10894e50: Fix build

* commit 'dceb601b09d99110d5c8f71bb25532875a152622':
Fix build
21eeed3f316bf77f0deeeb221a9b5f5f5aee7eb2 11-Sep-2012 James Painter <jpainter@google.com> am dceb601b: am 10894e50: Fix build

* commit 'dceb601b09d99110d5c8f71bb25532875a152622':
Fix build
28188c1e101b45b99c0d59273130fdf71f5b02bf 11-Sep-2012 James Painter <jpainter@google.com> am e9474959: am e538206d: Camera2: Add a burst mode skeleton.

* commit 'e9474959a667dcef28506db1e10e2d4fa232c404':
Camera2: Add a burst mode skeleton.
f395d75f3317cfb489e2331c9874722b6d0ece4a 11-Sep-2012 James Painter <jpainter@google.com> am e9474959: am e538206d: Camera2: Add a burst mode skeleton.

* commit 'e9474959a667dcef28506db1e10e2d4fa232c404':
Camera2: Add a burst mode skeleton.
75ed25a60f65e2239c1e9e480297559825fffe8f 11-Sep-2012 Eric Laurent <elaurent@google.com> am 1fbb83b6: am 85396642: Merge "audioflinger: changes for new audio devices enums" into jb-mr1-dev

* commit '1fbb83b665720f2629d7a3759a0a7b61b4f04571':
audioflinger: changes for new audio devices enums
644f98718e604a58545918d99b1438e12b3a973f 11-Sep-2012 Eric Laurent <elaurent@google.com> am 1fbb83b6: am 85396642: Merge "audioflinger: changes for new audio devices enums" into jb-mr1-dev

* commit '1fbb83b665720f2629d7a3759a0a7b61b4f04571':
audioflinger: changes for new audio devices enums
7677ec6bd293cdd1736e59fbaf52bfb497893c96 11-Sep-2012 Alexander Ray <aray@google.com> am 97614a22: am 1c7ff022: Merge "Camera2: Increase zoom steps." into jb-mr1-dev

* commit '97614a228f3826c3772d1b7c7b2ea32576e341fb':
Camera2: Increase zoom steps.
5b08b1e32c8f184d70ee2712175de6b83661da7f 11-Sep-2012 Alexander Ray <aray@google.com> am 97614a22: am 1c7ff022: Merge "Camera2: Increase zoom steps." into jb-mr1-dev

* commit '97614a228f3826c3772d1b7c7b2ea32576e341fb':
Camera2: Increase zoom steps.
35209ebf89e6e0d324484f86d31165c056cf4e72 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am f69ef056: am 5a4f93ea: Camera2: Use the recordingHint parameter.

* commit 'f69ef056e1ef70fd48c67071a6c4f565779c3e0e':
Camera2: Use the recordingHint parameter.
9228ae822a8360288029e612986f9ae67290901b 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am f69ef056: am 5a4f93ea: Camera2: Use the recordingHint parameter.

* commit 'f69ef056e1ef70fd48c67071a6c4f565779c3e0e':
Camera2: Use the recordingHint parameter.
01ca35c307e15e7c8490870da04ec99021480ec7 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 85b355f8: am cf70d346: Camera2: Delete all streams and stop all threads during shutdown.

* commit '85b355f82bcff886f892229076b92819dd9490e3':
Camera2: Delete all streams and stop all threads during shutdown.
bcfb856e2d7a876af13e56356f806d3f7c3d3cdb 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 85b355f8: am cf70d346: Camera2: Delete all streams and stop all threads during shutdown.

* commit '85b355f82bcff886f892229076b92819dd9490e3':
Camera2: Delete all streams and stop all threads during shutdown.
2b7da9b4a7d9cbebc93fa5cbe08b3701c88e18c1 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 6039c1e3: am 2d1ef137: Merge "Camera2: Play shutter and recording sounds." into jb-mr1-dev

* commit '6039c1e34245711baab6c4c3e06da0e4d9d632ae':
Camera2: Play shutter and recording sounds.
bcaca0be90a56e0ed6bd0b4fe8a9a4e7a6329f38 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 6039c1e3: am 2d1ef137: Merge "Camera2: Play shutter and recording sounds." into jb-mr1-dev

* commit '6039c1e34245711baab6c4c3e06da0e4d9d632ae':
Camera2: Play shutter and recording sounds.
14fe42d8d8d622f6fcdbd83df5f3932e24cd896e 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Temporarily stop pre-allocation of recording stream.

When recordingHint is set, don't pre-allocate recording stream on
preview start.

Bug: 7137947
Change-Id: I06b5f6d7dbb21d4d0747974ba001b0c8929a0b02
amera/libcameraservice/Camera2Client.cpp
587879f29d1282f20f5043a840a40eefb68547c3 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Temporarily stop pre-allocation of recording stream.

When recordingHint is set, don't pre-allocate recording stream on
preview start.

Bug: 7137947
Change-Id: I06b5f6d7dbb21d4d0747974ba001b0c8929a0b02
amera/libcameraservice/Camera2Client.cpp
47512a7da600ababdfd052b574488b9e499c22f6 10-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Clean up the right streams.

Change-Id: I780c3e8e255f6a185e0edf1d76f35afdc74dff48
amera/libcameraservice/camera2/ZslProcessor.cpp
8ad3e8043415aaebe907f0556e973b1d7faf3b48 10-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Clean up the right streams.

Change-Id: I780c3e8e255f6a185e0edf1d76f35afdc74dff48
amera/libcameraservice/camera2/ZslProcessor.cpp
61c0cc6af2c64d280bcfc1fcca3e3589172a5817 07-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use face priority scene mode when face detect is enabled.

Per API specs, enabled face detection implies that metering, etc is
done based on faces.

Bug: 6243944
Change-Id: Ie35162226d70cc0f437e92e37be138e71e45e738
amera/libcameraservice/camera2/Parameters.cpp
2a88b7130e50ea579401a4407847e57fd36eab85 07-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use face priority scene mode when face detect is enabled.

Per API specs, enabled face detection implies that metering, etc is
done based on faces.

Bug: 6243944
Change-Id: Ie35162226d70cc0f437e92e37be138e71e45e738
amera/libcameraservice/camera2/Parameters.cpp
4a02cc818607c0c145f91c3acb9181868a108f26 10-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Sanity check inputs better.

Bug: 7132141
Change-Id: I866a65dfe47464070a6ef4ac60be4801cb68327b
amera/libcameraservice/camera2/Parameters.cpp
4c6b0b8fe86740a7cee1e179d0f55cbcd143d2d2 10-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Sanity check inputs better.

Bug: 7132141
Change-Id: I866a65dfe47464070a6ef4ac60be4801cb68327b
amera/libcameraservice/camera2/Parameters.cpp
6ce3d19cd35a49add6893298f70b87917fc60d52 09-Sep-2012 Glenn Kasten <gkasten@google.com> Merge "Add outlier statistics for fast mixer cycle times" into jb-mr1-dev
b89909df83e55af1726ebc97d1a5ecb4905a91ef 09-Sep-2012 Glenn Kasten <gkasten@google.com> Merge "Add outlier statistics for fast mixer cycle times" into jb-mr1-dev
10894e509f777c6bd7e408a57f5cf21ee2b36a96 08-Sep-2012 James Painter <jpainter@google.com> Fix build

Change-Id: Ia4bebc4ecc850b42ebd4edd1ffed07e9bc2ec300
amera/libcameraservice/Camera2Client.cpp
fe140e882c578883238a2dd7793159c848a07b49 08-Sep-2012 James Painter <jpainter@google.com> Fix build

Change-Id: Ia4bebc4ecc850b42ebd4edd1ffed07e9bc2ec300
amera/libcameraservice/Camera2Client.cpp
e538206d15282afbc5b168d60b1026a5dfcd13c0 06-Sep-2012 James Painter <jpainter@google.com> Camera2: Add a burst mode skeleton.

Bug: 6243944
Change-Id: I7f496ca1051571c68fdd99a6f85bf6a908a4e29a
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/BurstCapture.cpp
amera/libcameraservice/camera2/BurstCapture.h
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/CaptureSequencer.h
amera/libcameraservice/camera2/JpegCompressor.cpp
amera/libcameraservice/camera2/JpegCompressor.h
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
c3dbf1a40df85b75e5805382838a90416f69730f 06-Sep-2012 James Painter <jpainter@google.com> Camera2: Add a burst mode skeleton.

Bug: 6243944
Change-Id: I7f496ca1051571c68fdd99a6f85bf6a908a4e29a
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/BurstCapture.cpp
amera/libcameraservice/camera2/BurstCapture.h
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/CaptureSequencer.h
amera/libcameraservice/camera2/JpegCompressor.cpp
amera/libcameraservice/camera2/JpegCompressor.h
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
85396642425b94ec33aa26f27e109353e3516ec4 07-Sep-2012 Eric Laurent <elaurent@google.com> Merge "audioflinger: changes for new audio devices enums" into jb-mr1-dev
5ba3e964a2a4f8522b308d598cdf74b0c5a146a7 07-Sep-2012 Eric Laurent <elaurent@google.com> Merge "audioflinger: changes for new audio devices enums" into jb-mr1-dev
1ab212cf5cfa5b88c801840e11e3191cd10f48e4 07-Sep-2012 Glenn Kasten <gkasten@google.com> Add outlier statistics for fast mixer cycle times

Change-Id: I31c964caeb8b5d9ae0a426224f030cdcb01114a0
udioflinger/FastMixer.cpp
ba8a616c39259e98094440e9656a49a1cc96c976 07-Sep-2012 Glenn Kasten <gkasten@google.com> Add outlier statistics for fast mixer cycle times

Change-Id: I31c964caeb8b5d9ae0a426224f030cdcb01114a0
udioflinger/FastMixer.cpp
1c7ff022a91e4f966c23dcf11f6859c69c08841a 07-Sep-2012 Alexander Ray <aray@google.com> Merge "Camera2: Increase zoom steps." into jb-mr1-dev
1a4d1536ed9b2fe2dbe67d564018eed848120400 07-Sep-2012 Alexander Ray <aray@google.com> Merge "Camera2: Increase zoom steps." into jb-mr1-dev
5a4f93eaaab7518fd734fdc9f0f686d632f31a59 30-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use the recordingHint parameter.

Use recordingHint to create recording and still capture streams up
front, and to use the recording template when doing preview.

Bug: 6243944

Change-Id: Ifeb624794849f734784b53a1a10ff2bfe8f1a357
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
f98cbbeb01aa15178c7a58f3c478ec1050dbe83e 30-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use the recordingHint parameter.

Use recordingHint to create recording and still capture streams up
front, and to use the recording template when doing preview.

Bug: 6243944

Change-Id: Ifeb624794849f734784b53a1a10ff2bfe8f1a357
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
cf70d3469332445dc3ffd09729da3538612b1bb2 06-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Delete all streams and stop all threads during shutdown.

Bug: 6243944
Change-Id: If13a1f91e8a07c1ec4f91183d1a4b261ec4f6d52
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.cpp
7d8b92bf72194896363ceef97e12a52ac1bb1e5c 06-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Delete all streams and stop all threads during shutdown.

Bug: 6243944
Change-Id: If13a1f91e8a07c1ec4f91183d1a4b261ec4f6d52
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.cpp
f1c04f952916cf70407051c9f824ab84fb2b6e09 28-Aug-2012 Eric Laurent <elaurent@google.com> audioflinger: changes for new audio devices enums

The ThreadBase class now has a separate member for input
and output devices (mInDevice, mOutDevice).

Only query get_supported_devices() from audio HAL if the function
is exposed and if the audio policy manager did not specify the
audio module to open.

Also fixed bug in AEC preprocessing that would reset
to default output device when an input device was given.

Change-Id: I19d4d06aeb920b068e3ef31e6e6be6345ce5d67a
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
8895925e38d2521607fd2010f3f3b14ecd15962c 28-Aug-2012 Eric Laurent <elaurent@google.com> audioflinger: changes for new audio devices enums

The ThreadBase class now has a separate member for input
and output devices (mInDevice, mOutDevice).

Only query get_supported_devices() from audio HAL if the function
is exposed and if the audio policy manager did not specify the
audio module to open.

Also fixed bug in AEC preprocessing that would reset
to default output device when an input device was given.

Change-Id: I19d4d06aeb920b068e3ef31e6e6be6345ce5d67a
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
609acc0c96bc2aedd42246862b537e045f5184b6 07-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Play shutter and recording sounds.

Bug: 6987540

Change-Id: Icd441a757c4b68fc4988b3bfbef428adb8d1ba28
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/camera2/CaptureSequencer.cpp
33578836f930024306fb2a173d7da36d7f3d7dbf 07-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Play shutter and recording sounds.

Bug: 6987540

Change-Id: Icd441a757c4b68fc4988b3bfbef428adb8d1ba28
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/camera2/CaptureSequencer.cpp
ad42039eaefa06fff6cd957bcae196f087364c09 07-Sep-2012 Eric Laurent <elaurent@google.com> am e1659521: am d06ab147: Merge "AudioFlinger: send audio source to audio effects" into jb-mr1-dev

* commit 'e16595211299534fe1b1986f66d55d250ffc1fea':
AudioFlinger: send audio source to audio effects
6a9fa853b13e854793a9ae85adf6bb2c78c81dd5 07-Sep-2012 Eric Laurent <elaurent@google.com> am e1659521: am d06ab147: Merge "AudioFlinger: send audio source to audio effects" into jb-mr1-dev

* commit 'e16595211299534fe1b1986f66d55d250ffc1fea':
AudioFlinger: send audio source to audio effects
161fac83b369f4873859a101b6a71efeb596bd4a 07-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Increase zoom steps.

10 is too low for smooth zoom; increase number to improve smoothness.

Bug: 7120794
Change-Id: I178cd3890ef37beeff97cadb9e92ceab6d2cad06
amera/libcameraservice/camera2/Parameters.h
15405329ab08979a0614060b92d7b044c550cbbd 07-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Increase zoom steps.

10 is too low for smooth zoom; increase number to improve smoothness.

Bug: 7120794
Change-Id: I178cd3890ef37beeff97cadb9e92ceab6d2cad06
amera/libcameraservice/camera2/Parameters.h
d06ab147394b0b49679c924a51d77c91dea04d82 07-Sep-2012 Eric Laurent <elaurent@google.com> Merge "AudioFlinger: send audio source to audio effects" into jb-mr1-dev
fcd7f0f7a1a5cddf4b3014e41c7c6fce721f5a79 07-Sep-2012 Eric Laurent <elaurent@google.com> Merge "AudioFlinger: send audio source to audio effects" into jb-mr1-dev
12810de62c780e31d38b133a94ae41b235a4b646 06-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 582d7468: am 96150cfc: Camera2: Move locked states out of AE/AWB mode

* commit '582d7468612766cf7b3653f4ad29580307a8686a':
Camera2: Move locked states out of AE/AWB mode
9183d55f7972b2c9364db33b7867599b4f4f22c2 06-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 582d7468: am 96150cfc: Camera2: Move locked states out of AE/AWB mode

* commit '582d7468612766cf7b3653f4ad29580307a8686a':
Camera2: Move locked states out of AE/AWB mode
96150cfc6b9ae93b6c4b60b5c7889a7a90af5def 03-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Move locked states out of AE/AWB mode

Bug: 6243944

Change-Id: I7b609cc6c04c957d1f48c1a996263fa9c7b94000
amera/libcameraservice/camera2/Parameters.cpp
2d6a503f548ac047f30995c4f74f58259ab9027b 03-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Move locked states out of AE/AWB mode

Bug: 6243944

Change-Id: I7b609cc6c04c957d1f48c1a996263fa9c7b94000
amera/libcameraservice/camera2/Parameters.cpp
85ed27f01831f7d39cfc4cfa0500b5bcd77b5158 06-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 4734f5b6: am da6665cb: Camera2: Basic ZSL and precapture trigger support.

* commit '4734f5b614340c356ccc022ca4476c5cd919022e':
Camera2: Basic ZSL and precapture trigger support.
a90a1ed586d991b8e71df9390c765c2179417594 06-Sep-2012 Eino-Ville Talvala <etalvala@google.com> am 4734f5b6: am da6665cb: Camera2: Basic ZSL and precapture trigger support.

* commit '4734f5b614340c356ccc022ca4476c5cd919022e':
Camera2: Basic ZSL and precapture trigger support.
da6665cbd06ca58d3357c3002b7366d13e23f152 30-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Basic ZSL and precapture trigger support.

- Add capture sequencer to control still image capture process
- Use precapture trigger for standard capture in sequencer
- Add infrastructure for reprocessing streams
- Add ZSL processor to maintain ZSL queue
- Add ZSL capture sequence to sequencer

This patch sets up ZSL mode and precapture triggers.

For now, to enable zsl mode, set the system property camera.zsl_mode
to 1.

Bug: 6243944

Change-Id: Icf8cb1a83a7c11a152a11007c8f3c54f8ea1c70c
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/CallbackProcessor.h
amera/libcameraservice/camera2/CameraMetadata.cpp
amera/libcameraservice/camera2/CameraMetadata.h
amera/libcameraservice/camera2/CaptureProcessor.cpp
amera/libcameraservice/camera2/CaptureProcessor.h
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/CaptureSequencer.h
amera/libcameraservice/camera2/FrameProcessor.cpp
amera/libcameraservice/camera2/FrameProcessor.h
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/JpegProcessor.h
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
amera/libcameraservice/camera2/ZslProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.h
69230df9905534cda15becd44c0109874c4be5f0 30-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Basic ZSL and precapture trigger support.

- Add capture sequencer to control still image capture process
- Use precapture trigger for standard capture in sequencer
- Add infrastructure for reprocessing streams
- Add ZSL processor to maintain ZSL queue
- Add ZSL capture sequence to sequencer

This patch sets up ZSL mode and precapture triggers.

For now, to enable zsl mode, set the system property camera.zsl_mode
to 1.

Bug: 6243944

Change-Id: Icf8cb1a83a7c11a152a11007c8f3c54f8ea1c70c
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/CallbackProcessor.h
amera/libcameraservice/camera2/CameraMetadata.cpp
amera/libcameraservice/camera2/CameraMetadata.h
amera/libcameraservice/camera2/CaptureProcessor.cpp
amera/libcameraservice/camera2/CaptureProcessor.h
amera/libcameraservice/camera2/CaptureSequencer.cpp
amera/libcameraservice/camera2/CaptureSequencer.h
amera/libcameraservice/camera2/FrameProcessor.cpp
amera/libcameraservice/camera2/FrameProcessor.h
amera/libcameraservice/camera2/JpegProcessor.cpp
amera/libcameraservice/camera2/JpegProcessor.h
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
amera/libcameraservice/camera2/ZslProcessor.cpp
amera/libcameraservice/camera2/ZslProcessor.h
58c3151add8a2b26b6d2180bb4910f237683a1a7 06-Sep-2012 James Dong <jdong@google.com> am c0896233: am e148910d: Merge "Fix an issue where the "mFrameCount" field was accessed without its containing object" into jb-mr1-dev

* commit 'c0896233f8c79077fe12b3ac34ce5c28d94596f3':
Fix an issue where the "mFrameCount" field was accessed without its containing object
b54312471d4f31b9c115d2256be5204d44bfee0e 06-Sep-2012 James Dong <jdong@google.com> am c0896233: am e148910d: Merge "Fix an issue where the "mFrameCount" field was accessed without its containing object" into jb-mr1-dev

* commit 'c0896233f8c79077fe12b3ac34ce5c28d94596f3':
Fix an issue where the "mFrameCount" field was accessed without its containing object
6638f3bd61df1e5d012bc600b7af4c1b4dd4a06b 06-Sep-2012 James Dong <jdong@google.com> Fix an issue where the "mFrameCount" field was accessed without its containing object

Change-Id: I6077b61b3e718b9b44ff86ca669a59f96b0b256f
amera/libcameraservice/Camera2Device.cpp
a289bf696e4b49e0a726fd07914f9dc178653efc 06-Sep-2012 James Dong <jdong@google.com> Fix an issue where the "mFrameCount" field was accessed without its containing object

Change-Id: I6077b61b3e718b9b44ff86ca669a59f96b0b256f
amera/libcameraservice/Camera2Device.cpp
57b2dd1e78af53115985f18d31ec5421c9da947e 01-Sep-2012 Eric Laurent <elaurent@google.com> AudioFlinger: send audio source to audio effects

Added support for EFFECT_CMD_SET_AUDIO_SOURCE audio effect
command to inform preprocessings of current audio source
selection for capture.

Change-Id: Ib2418a9aa8114e8457fe828ecd43b230ed86cdd6
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
2e9b0f24e7089fb23356871b2fdce771c2dae852 01-Sep-2012 Eric Laurent <elaurent@google.com> AudioFlinger: send audio source to audio effects

Added support for EFFECT_CMD_SET_AUDIO_SOURCE audio effect
command to inform preprocessings of current audio source
selection for capture.

Change-Id: Ib2418a9aa8114e8457fe828ecd43b230ed86cdd6
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
f10cf66d258ab88af9cb363077cdd96d59f7ca15 31-Aug-2012 Shuzhen Wang <shuzhenw@quicinc.com> am 0184a8e6: am 092fe44a: Camera: set vendor_ops on camera metadata.

* commit '0184a8e616ef536e270c42d802a3dfcb8bf5ca52':
Camera: set vendor_ops on camera metadata.
833084b6ed27476d75cc51083cf785aaf5a006aa 31-Aug-2012 Shuzhen Wang <shuzhenw@quicinc.com> am 0184a8e6: am 092fe44a: Camera: set vendor_ops on camera metadata.

* commit '0184a8e616ef536e270c42d802a3dfcb8bf5ca52':
Camera: set vendor_ops on camera metadata.
092fe44abd787fcb4377d90c63f2aa7120a4d267 31-Aug-2012 Shuzhen Wang <shuzhenw@quicinc.com> Camera: set vendor_ops on camera metadata.

This makes sure that vendor specific metadata can propogate through
the framework.

Change-Id: I3bd0ae4b889eb907caf7b305dbcb16abbbef0ea3
amera/libcameraservice/Camera2Device.cpp
314079efa77c07255b2a2794eba470fccd1541fb 31-Aug-2012 Shuzhen Wang <shuzhenw@quicinc.com> Camera: set vendor_ops on camera metadata.

This makes sure that vendor specific metadata can propogate through
the framework.

Change-Id: I3bd0ae4b889eb907caf7b305dbcb16abbbef0ea3
amera/libcameraservice/Camera2Device.cpp
0f7d1771689280dd32eec4a301d2781fa9172baa 31-Aug-2012 Glenn Kasten <gkasten@google.com> am 08d8228d: am b3428f7f: Merge "Update audio comments" into jb-mr1-dev

* commit '08d8228d508adf26e1e6bdf44401ee3b7fcca22f':
Update audio comments
8cd6a4a8199a84270231ca1f9212070b35e72815 31-Aug-2012 Glenn Kasten <gkasten@google.com> am 08d8228d: am b3428f7f: Merge "Update audio comments" into jb-mr1-dev

* commit '08d8228d508adf26e1e6bdf44401ee3b7fcca22f':
Update audio comments
c3ae93f21280859086ae371428ffd32f39e76d50 30-Jul-2012 Glenn Kasten <gkasten@google.com> Update audio comments

Change-Id: Ie7504d0ddb252f7e4d4f99ed0b44cfc7b1049816
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
2662ac9220c9e07cd343e78bf3a0c21ca3e4ffd1 30-Jul-2012 Glenn Kasten <gkasten@google.com> Update audio comments

Change-Id: Ie7504d0ddb252f7e4d4f99ed0b44cfc7b1049816
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
49a3f8a8b4ec226690e7b5c91a7e516970ca6d0b 31-Aug-2012 Glenn Kasten <gkasten@google.com> am b5720b1f: am c9936c72: Merge "Remove dead code" into jb-mr1-dev

* commit 'b5720b1ff9262419cd331e56c75a60b291bc7694':
Remove dead code
fdca11917d73c21971054aa8cb9fc9ae28fa3164 31-Aug-2012 Glenn Kasten <gkasten@google.com> am b5720b1f: am c9936c72: Merge "Remove dead code" into jb-mr1-dev

* commit 'b5720b1ff9262419cd331e56c75a60b291bc7694':
Remove dead code
7aa25591769685ae0e8349b3ca3534c724484375 03-Aug-2012 Glenn Kasten <gkasten@google.com> Remove dead code

RecordThread::isValidSyncEvent() returns false, so most of
RecordThread::setSyncEvent() is never executed.

Change-Id: I0cf848beb46a367a45126d2df3073c5afa2ca59c
udioflinger/AudioFlinger.cpp
7f7d27eb0ee5dc7b0f52dd2c89791d14bfe82f29 03-Aug-2012 Glenn Kasten <gkasten@google.com> Remove dead code

RecordThread::isValidSyncEvent() returns false, so most of
RecordThread::setSyncEvent() is never executed.

Change-Id: I0cf848beb46a367a45126d2df3073c5afa2ca59c
udioflinger/AudioFlinger.cpp
e0c87269b94e5b24de8e9577ba32070b24e83582 31-Aug-2012 Glenn Kasten <gkasten@google.com> am c9beb01c: am b9cba9b7: Merge "Move libnbaio out of AudioFlinger" into jb-mr1-dev

* commit 'c9beb01c800e6326051aee52a00659288c25c6eb':
Move libnbaio out of AudioFlinger
b0dc8b57c7cc39a057170a0d1e5842bd866b1775 31-Aug-2012 Glenn Kasten <gkasten@google.com> am c9beb01c: am b9cba9b7: Merge "Move libnbaio out of AudioFlinger" into jb-mr1-dev

* commit 'c9beb01c800e6326051aee52a00659288c25c6eb':
Move libnbaio out of AudioFlinger
b9cba9b731195d4387ee21b7e9ba1137a3cfda68 31-Aug-2012 Glenn Kasten <gkasten@google.com> Merge "Move libnbaio out of AudioFlinger" into jb-mr1-dev
f351faed1f54aac8a06b6685dc77a7764d7cf543 31-Aug-2012 Glenn Kasten <gkasten@google.com> Merge "Move libnbaio out of AudioFlinger" into jb-mr1-dev
83307bac03c27c1c344fd24fdfbabc2d0a63a29d 30-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am 38f910bd: am 23466a95: Merge "Camera2: Require 2 JPEG thumbnail resolutions." into jb-mr1-dev

* commit '38f910bdfa1fb0665261eb60e0afdb4986c8934f':
Camera2: Require 2 JPEG thumbnail resolutions.
ff90587934a6c417385bd4da240185810f45ed43 30-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am 38f910bd: am 23466a95: Merge "Camera2: Require 2 JPEG thumbnail resolutions." into jb-mr1-dev

* commit '38f910bdfa1fb0665261eb60e0afdb4986c8934f':
Camera2: Require 2 JPEG thumbnail resolutions.
63bfd7fe7d14fd083bebba3a230938e8d6f62fd5 30-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am 18246bad: am 5f00501d: Merge changes I7bef5694,Id38e2a52 into jb-mr1-dev

* commit '18246badacee54f5ea6836576baca44ccf12f4e9':
Camera2: Move preview callback processing to its own thread.
Camera2: Move still capture processing to separate thread.
f31ab6e8ac927e48a1d7977a7333959113ec884f 30-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am 18246bad: am 5f00501d: Merge changes I7bef5694,Id38e2a52 into jb-mr1-dev

* commit '18246badacee54f5ea6836576baca44ccf12f4e9':
Camera2: Move preview callback processing to its own thread.
Camera2: Move still capture processing to separate thread.
2dd4bdd715f586d4d30cf90cc6fc2bbfbce60fe0 29-Aug-2012 Glenn Kasten <gkasten@google.com> Move libnbaio out of AudioFlinger

libnbaio is now a separate shared library from AudioFlinger, rather
than a static library used only by AudioFlinger.

AudioBufferProvider interface is now also independent of AudioFlinger,
moved to include/media/

Change-Id: I9bb62ffbc38d42a38b0af76e66da5e9ab1e0e21b
udioflinger/Android.mk
udioflinger/AudioBufferProvider.h
udioflinger/AudioBufferProviderSource.cpp
udioflinger/AudioBufferProviderSource.h
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.h
udioflinger/AudioResampler.h
udioflinger/AudioStreamInSource.cpp
udioflinger/AudioStreamInSource.h
udioflinger/AudioStreamOutSink.cpp
udioflinger/AudioStreamOutSink.h
udioflinger/ExtendedAudioBufferProvider.h
udioflinger/FastMixerState.h
udioflinger/LibsndfileSink.cpp
udioflinger/LibsndfileSink.h
udioflinger/LibsndfileSource.cpp
udioflinger/LibsndfileSource.h
udioflinger/MonoPipe.cpp
udioflinger/MonoPipe.h
udioflinger/MonoPipeReader.cpp
udioflinger/MonoPipeReader.h
udioflinger/NBAIO.cpp
udioflinger/NBAIO.h
udioflinger/Pipe.cpp
udioflinger/Pipe.h
udioflinger/PipeReader.cpp
udioflinger/PipeReader.h
udioflinger/SourceAudioBufferProvider.cpp
udioflinger/SourceAudioBufferProvider.h
udioflinger/roundup.c
udioflinger/roundup.h
fc7992bd8220824f1404c0c54ac516d9e28b58c2 29-Aug-2012 Glenn Kasten <gkasten@google.com> Move libnbaio out of AudioFlinger

libnbaio is now a separate shared library from AudioFlinger, rather
than a static library used only by AudioFlinger.

AudioBufferProvider interface is now also independent of AudioFlinger,
moved to include/media/

Change-Id: I9bb62ffbc38d42a38b0af76e66da5e9ab1e0e21b
udioflinger/Android.mk
udioflinger/AudioBufferProvider.h
udioflinger/AudioBufferProviderSource.cpp
udioflinger/AudioBufferProviderSource.h
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.h
udioflinger/AudioResampler.h
udioflinger/AudioStreamInSource.cpp
udioflinger/AudioStreamInSource.h
udioflinger/AudioStreamOutSink.cpp
udioflinger/AudioStreamOutSink.h
udioflinger/ExtendedAudioBufferProvider.h
udioflinger/FastMixerState.h
udioflinger/LibsndfileSink.cpp
udioflinger/LibsndfileSink.h
udioflinger/LibsndfileSource.cpp
udioflinger/LibsndfileSource.h
udioflinger/MonoPipe.cpp
udioflinger/MonoPipe.h
udioflinger/MonoPipeReader.cpp
udioflinger/MonoPipeReader.h
udioflinger/NBAIO.cpp
udioflinger/NBAIO.h
udioflinger/Pipe.cpp
udioflinger/Pipe.h
udioflinger/PipeReader.cpp
udioflinger/PipeReader.h
udioflinger/SourceAudioBufferProvider.cpp
udioflinger/SourceAudioBufferProvider.h
udioflinger/roundup.c
udioflinger/roundup.h
f128dc51c81e6b831806e0de505e4edbb02b7e71 28-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Require 2 JPEG thumbnail resolutions.

Include (0,0) as a required thumbnail resolution, to allow turning off
thumbnails.

Change-Id: I3c4efe2d6a4f576a11ce5b75a3d573812a100b80
amera/libcameraservice/camera2/Parameters.cpp
a1e4e309e9a32afa3a26576fa592789168db182e 28-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Require 2 JPEG thumbnail resolutions.

Include (0,0) as a required thumbnail resolution, to allow turning off
thumbnails.

Change-Id: I3c4efe2d6a4f576a11ce5b75a3d573812a100b80
amera/libcameraservice/camera2/Parameters.cpp
d86a6880fe86bda21a9b53b240996fc410a512a5 28-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Move preview callback processing to its own thread.

To reduce delays for HAL callbacks, manage preview callbacks in their
own thread.

Bug: 6243944
Change-Id: I7bef56949ac889ffce4e031bf40291a771a46f3e
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/CallbackProcessor.h
2863918926c82d6002de160c9d499be9b6a3856e 28-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Move preview callback processing to its own thread.

To reduce delays for HAL callbacks, manage preview callbacks in their
own thread.

Bug: 6243944
Change-Id: I7bef56949ac889ffce4e031bf40291a771a46f3e
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/camera2/CallbackProcessor.cpp
amera/libcameraservice/camera2/CallbackProcessor.h
ea0d51b5ed0b474433b02414f9133b835f972569 28-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Move still capture processing to separate thread.

To avoid stalling HAL when it queues up new buffers for still capture,
process still captures in a separate thread. Also move Camera2Heap to
its own class so it can be used by the CaptureProcessor.

Bug: 6243944
Change-Id: Id38e2a52367c0985812fcd4fd9af3ef90beef43f
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/camera2/Camera2Heap.h
amera/libcameraservice/camera2/CaptureProcessor.cpp
amera/libcameraservice/camera2/CaptureProcessor.h
177bd3489e73ed86cf47c485c88292bf399bd48a 28-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Move still capture processing to separate thread.

To avoid stalling HAL when it queues up new buffers for still capture,
process still captures in a separate thread. Also move Camera2Heap to
its own class so it can be used by the CaptureProcessor.

Bug: 6243944
Change-Id: Id38e2a52367c0985812fcd4fd9af3ef90beef43f
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/camera2/Camera2Heap.h
amera/libcameraservice/camera2/CaptureProcessor.cpp
amera/libcameraservice/camera2/CaptureProcessor.h
d64d2c9689582d32c75a783a27edaee6d1f12c18 30-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am 7016bf8e: am 6524b7e1: Merge "Camera2: Factor out FrameProcessor." into jb-mr1-dev

* commit '7016bf8e8741467428a64fd73a7036a60c67b5d7':
Camera2: Factor out FrameProcessor.
a3f8633d1bb55294eca1cae553b1f92506b5975d 30-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am 7016bf8e: am 6524b7e1: Merge "Camera2: Factor out FrameProcessor." into jb-mr1-dev

* commit '7016bf8e8741467428a64fd73a7036a60c67b5d7':
Camera2: Factor out FrameProcessor.
a16733eeb9c40db4793bec408f29b4204e5f23b1 28-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Factor out FrameProcessor.

Move FrameProcessor to its own file, add necessary interfaces to
Camera2Client.

Bug: 6243944
Change-Id: I8d1b8280a65d2822461ebe6b6c9de17992b34276
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/camera2/FrameProcessor.cpp
amera/libcameraservice/camera2/FrameProcessor.h
77a18b03fa63eb9aefe1c2deab3509b4788a1bf4 28-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am cb4d650a: am eb941f9a: Merge "Camera2: Factor out Camera2Client::Parameters" into jb-mr1-dev

* commit 'cb4d650a79d49f19e9271f843c1eaf4382337704':
Camera2: Factor out Camera2Client::Parameters
72717c463578002e2d7a93f17352bd32bbc00662 28-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am cb4d650a: am eb941f9a: Merge "Camera2: Factor out Camera2Client::Parameters" into jb-mr1-dev

* commit 'cb4d650a79d49f19e9271f843c1eaf4382337704':
Camera2: Factor out Camera2Client::Parameters
2e19c3c02957208371cdd491e6342ea7ddb440d9 26-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Factor out Camera2Client::Parameters

Move the parameter structure and the various utility methods using it
to its own class. Rename LockedParameters to SharedParameters to match
the Mutex naming convention.

Also move CameraMetadata to camera2 directory for organization.

No functional changes.

Bug: 6243944
Change-Id: Ie60b535936ecfda9bf23361d52604abf515c83d0
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
amera/libcameraservice/CameraMetadata.cpp
amera/libcameraservice/CameraMetadata.h
amera/libcameraservice/camera2/CameraMetadata.cpp
amera/libcameraservice/camera2/CameraMetadata.h
amera/libcameraservice/camera2/Parameters.cpp
amera/libcameraservice/camera2/Parameters.h
d03ba7973b355264abbfaf0a70b45821f5b62626 27-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am 56df4108: am 68536901: Merge "Camera2: Fix metering/focusing region coordinates, minor bugs" into jb-mr1-dev

* commit '56df4108bb6b34602fb2fad4f073b710e4494071':
Camera2: Fix metering/focusing region coordinates, minor bugs
1b0273c6a3c9a4cea859ac7a0a40338af232a6f5 27-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am 916e75f7: am 33ea2dff: Merge "Camera2: Move frame processing to its own thread." into jb-mr1-dev

* commit '916e75f7eb10741c128c24ad241c5425dd3c9332':
Camera2: Move frame processing to its own thread.
06dc8b353eede041c7e34766f6b64ec9ff04e6ce 27-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am 22b9ee81: am 928da7e2: Merge "Camera2: Use CameraMetadata wrapper class." into jb-mr1-dev

* commit '22b9ee8111c6a63190c5c15f8eac8cd5ec110912':
Camera2: Use CameraMetadata wrapper class.
f17b6cf6aa7548ca82e7fed96d71db7821103e57 26-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix metering/focusing region coordinates, minor bugs

- Use active pixel array-based coordinates instead of the normalized
camera API coordinates for ae/awb/af regions
- Fix calculation of UV stride for YV12 format

Bug: 6243944
Change-Id: I80cbd989858b0a3cb75c6f536c145e16e44fdb25
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
c8474b68e435cd840ba66791fb09e3da59f1d93c 25-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Move frame processing to its own thread.

To avoid blocking the HAL on possibly long-running binder calls,
move frame receiption and processing to its own thread.

Bug: 6243944
Change-Id: I6385be4410b2f68e2331755027afc10c342187cf
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
cab96a4a7a2900fa991ab77ae45ba8d4be97e054 24-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use CameraMetadata wrapper class.

Wrap the use of the camera_metadata library inside a CameraMetadata
class to avoid memory leaks, improve code clarity, and increase type
safety.

Bug: 6243944
Change-Id: I90ca592b5875e27e4c58ea1ca680582dc3c3b56a
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
amera/libcameraservice/CameraMetadata.cpp
amera/libcameraservice/CameraMetadata.h
4aa73099649056a39bd37e090c1fedd07c1ccbd5 22-Aug-2012 Glenn Kasten <gkasten@google.com> am 916ecd0a: am 0c676cd0: Make tee sink compile OK again

* commit '916ecd0acb4c12568d029c027a7626fc422bd84c':
Make tee sink compile OK again
0c676cd04ff15cc7eacf6144b4aead6deaccf60c 22-Aug-2012 Glenn Kasten <gkasten@google.com> Make tee sink compile OK again

Change-Id: Ie865ceeabaeb698a62c11eac9f96e303c44c28ae
udioflinger/PipeReader.cpp
udioflinger/PipeReader.h
445e9d6da8a953492af126e2e1406dedda3b4343 22-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am d2cdedb4: am 30e65e7e: Camera2: Replace MediaConsumer with BufferItemConsumer.

* commit 'd2cdedb4342cb016ef62d4b1a1d05a7d70c73e3a':
Camera2: Replace MediaConsumer with BufferItemConsumer.
30e65e7e2ec01e13e45b5e38552a34d2fbb3f866 21-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Replace MediaConsumer with BufferItemConsumer.

Get rid of MediaConsumer, which was largely duplicated code, and
replace it with the simpler BufferItemConsumer.

Bug: 6243944
Change-Id: I242d80c5fe39f2ee581ec8bb46f362997d994b0a
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/MediaConsumer.cpp
amera/libcameraservice/MediaConsumer.h
ac07bcbb71469ee7b966f0eff159f436f46fdf5c 22-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am 6ada8082: am 76dc8dac: Camera2: Ignore NOT_FOUND errors for face detect mode on frame receipt.

* commit '6ada80824da25f3622dc497d332cb4ef7e56d845':
Camera2: Ignore NOT_FOUND errors for face detect mode on frame receipt.
76dc8dacbb3e2a8c91cb526293270f9093cf8f8b 22-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Ignore NOT_FOUND errors for face detect mode on frame receipt.

Reduce log spamming due to incomplete implementations.

Change-Id: I6eb9d657591bd5f1476dd8c96e4a00b8a03e2a5e
amera/libcameraservice/Camera2Client.cpp
e1fbc3c974e9802371d6c9cc47766543b7d31487 21-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am 4b3d6d88: am 164c75d4: Merge "Camera2: Add support for preview callbacks" into jb-mr1-dev

* commit '4b3d6d881be4caba2c2a3b7cbbcb36d618aeee43':
Camera2: Add support for preview callbacks
228a53805808a24cb19fcf13b1f0bdc2ed89bbe1 13-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Add support for preview callbacks

- Move camera overall state enum to be part of parameters
- No longer use ICameraLock to guard access to overall state enum
- Add callback flag management
- Add callback stream and management

Bug: 6243944

Change-Id: Ideb3dc523a23c05e440e429ebf838b1900a96573
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/MediaConsumer.cpp
fcae2155ead72db76686b427565aaed71431ddd7 17-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am 9b9b8a9e: am 08ebb6b1: Merge "Camera2: Fix SCENE_MODE" into jb-mr1-dev

* commit '9b9b8a9ece1c4e05f04f04b1fff63236fb3067f7':
Camera2: Fix SCENE_MODE
3cc89794d92b833feff15ca76dfa196cc886e43f 17-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix SCENE_MODE

Now can set scene mode back to auto.

Bug: 7001465

Change-Id: Ia25ba54d13de662bef5bf79957987513a7313c18
amera/libcameraservice/Camera2Client.cpp
ce7db89c3521f46522bca415bb771edce33af5f6 14-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am 86e2067c: am f363ec55: Merge "Camera2: Skeleton for output frame processing, plus face detect" into jb-mr1-dev

* commit '86e2067c41b4ec0fdeae1c09a22610ffed9e2fe5':
Camera2: Skeleton for output frame processing, plus face detect
8ce89d9e2b132bf58a030acec88acf0a998926a1 10-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Skeleton for output frame processing, plus face detect

- Plumbing for processing output metadata frames from the HAL
- Support for passing face detection metadata from said frames
to the application.
- Switch calls on ICameraClient interface to use separate mutex to
avoid deadlock scenarios with messages being communicated from the
HAL to the camera user while calls from the user to the service are
active.

Bug: 6243944

Change-Id: Id4cf821d9c5c3c0069be4c0f669874b6ff0d1ecd
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
b45786becf800ae7c36939c7bc92f54fe8253147 13-Aug-2012 Glenn Kasten <gkasten@google.com> am a6a266d0: am 106e8a42: const methods

* commit 'a6a266d0e148f085ac1f83c4a36d3cf940c59e24':
const methods
2ef6e196198b3c2961e7fbf4637a70d6b38085ca 13-Aug-2012 Glenn Kasten <gkasten@google.com> am 0319e9e3: am 0dbb3560: Simplify AudioFlinger::PlaybackThread::isValidSyncEvent()

* commit '0319e9e31cb7b0033a3026b0305b78e2d48c6ec8':
Simplify AudioFlinger::PlaybackThread::isValidSyncEvent()
106e8a42038f9e90d5ff97f8ab6f1a42258bde9e 02-Aug-2012 Glenn Kasten <gkasten@google.com> const methods

Change-Id: I92e32ee16274c032c9d0ce910676be2a7fa52471
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
bfb3fec3341889226c66d72ab926c7de9553a125 13-Aug-2012 Glenn Kasten <gkasten@google.com> am b2f2d164: am d23eedca: Discard setSyncEvent() return value

* commit 'b2f2d1644b9d1a823fc3b78a59893652b080b35d':
Discard setSyncEvent() return value
0dbb356050d0db9e0043dd43045c1864a933332b 03-Aug-2012 Glenn Kasten <gkasten@google.com> Simplify AudioFlinger::PlaybackThread::isValidSyncEvent()

Change-Id: I3e4af69b929d4ca04afaac26c7e41c89fce25b9c
udioflinger/AudioFlinger.cpp
2917080826e0d7cec47e8ec8891e9ee1c2535d6a 13-Aug-2012 Glenn Kasten <gkasten@google.com> am f0235625: am a9599049: Merge "Replace hard-coded "2" by a constant and comment" into jb-mr1-dev

* commit 'f02356254262ec4a56e5ec1b1abefe1849ba9f9d':
Replace hard-coded "2" by a constant and comment
d23eedca9b5a1812891c05d89850ab7ee707040d 02-Aug-2012 Glenn Kasten <gkasten@google.com> Discard setSyncEvent() return value

setSyncEvent() returns a status_t which is sometimes ignored.
Emphasize this is intentional by casting to void.

Change-Id: Ic614988347cba36bd2504d7ad321594a355b0d9d
udioflinger/AudioFlinger.cpp
a959904968f1d300fe86334bf5099ae2dc39ee28 13-Aug-2012 Glenn Kasten <gkasten@google.com> Merge "Replace hard-coded "2" by a constant and comment" into jb-mr1-dev
037ac53aac0f51f2ccfaaa91822365c1c73c4365 10-Aug-2012 Jean-Baptiste Queru <jbq@google.com> am 0efd0358: am fcfc61da: am ff4c64d6: am c64a1787: Merge "Fix initialization of audio mixer track resources for MIPS."

* commit '0efd035854ad2c8d20100a740e054c4bf7b3e9a4':
Fix initialization of audio mixer track resources for MIPS.
fcfc61da927e98d18cdcb53da8fa0a8a32ee1422 10-Aug-2012 Jean-Baptiste Queru <jbq@google.com> am ff4c64d6: am c64a1787: Merge "Fix initialization of audio mixer track resources for MIPS."

* commit 'ff4c64d6b1b58494a1b15f1a664e5c421d095d15':
Fix initialization of audio mixer track resources for MIPS.
caab7b1686b754427243d18dfeac119658e83744 10-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am c0810621: am 603b12ef: Camera2: Swap AF notification order, minor bug fix.

* commit 'c0810621b8db2b5ca3012e7ad87e4ccb074100d2':
Camera2: Swap AF notification order, minor bug fix.
a253877eb94ea4551b54bd91a1fbaed09dc0cb02 10-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am 1a1fb540: am 174181ee: Camera2: Add trigger support, and implement autofocus

* commit '1a1fb540cb1a6c6b33790fa08cc66d2f33b3eea4':
Camera2: Add trigger support, and implement autofocus
603b12efa16e7afb4e6c75f6b353216c83e8e135 08-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Swap AF notification order, minor bug fix.

In continuous AF modes, when an AF trigger/cancel is received in the
middle of a passive AF scan, we want to send both an AF move stop
callback and an AF done callback. Swap the order of sending to
simplify life when the app just wants to pay attention to the AF done
callback during an active AF trigger.

Bug: 6243944
Change-Id: I127d1675bc37ef828ef89c70b8cfab75f9428a2f
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Device.cpp
174181eec57c963a2a17bd156d81c3f18b3ba75c 03-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Add trigger support, and implement autofocus

- Add skeletons for all triggering actions into Camera2Device
- Add support for AF triggers to HAL
- Add support for AF notifications from HAL

Bug: 6243944
Change-Id: I21025440849ae41f7083e1dcb72c99f8e5b2d5f7
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
27cfc5b48ff6861e54c987ab1303894836c1e3b0 10-Aug-2012 James Dong <jdong@google.com> am 8ade1e7b: am a59bf2c5: Merge "Update state only if calls to native window are successful" into jb-mr1-dev

* commit '8ade1e7b505d6bc9721cdfe16d000ebd23aedbf2':
Update state only if calls to native window are successful
31d377b7622279034326fbd8b9803a738a39fb30 10-Aug-2012 James Dong <jdong@google.com> Update state only if calls to native window are successful

Change-Id: I7a20f3ca787e11ca9c8c904b257e3c8a4e529136
amera/libcameraservice/Camera2Device.cpp
3ed292031dc50c56110cdadb1e3778117e3be76a 08-Aug-2012 Glenn Kasten <gkasten@google.com> Replace hard-coded "2" by a constant and comment

Bug: 6679403
Change-Id: I6c2701f9afedc26540dfad0b4e23348bbc4cb01a
udioflinger/AudioFlinger.cpp
e75640c4b06a5715622eeffd8d204f811284fd8c 09-Aug-2012 Glenn Kasten <gkasten@google.com> am 638f936d: am 0d27c65d: Tune the overrun correction

* commit '638f936d4dd0d4afdc952988ac6b6a9dcbb577e7':
Tune the overrun correction
3c507a754788872bdc19aa651180447c5456f191 09-Aug-2012 John Grossman <johngro@google.com> am acc5c275: am f6a35760: Merge "AudioFlinger: fix timed audio" into jb-mr1-dev

* commit 'acc5c275f6affe789184436b7d40fb1656a4596f':
AudioFlinger: fix timed audio
0d27c65ddb5c968baa6db0c26e80f5c451bc52bc 07-Aug-2012 Glenn Kasten <gkasten@google.com> Tune the overrun correction

The new overrun correction is: if the previous write() cycle time is <
50% of expected, then sleep enough extra to make the total cycle time =
95% of expected. This should help compensate for HAL implementations
that have uneven cycle times due to sample rate conversion.

Bug: 6881638
Change-Id: I5ab58afdfceee7ac523177f021fbf62d743d571a
udioflinger/FastMixer.cpp
2c3b2da3049627264b7c6b449a1622f002210f03 03-Aug-2012 John Grossman <johngro@google.com> AudioFlinger: fix timed audio

(cherry picked from commit e20ac92c564a2f4e8123885807abdf0a78de0dd7)

> AudioFlinger: fix timed audio
>
> Addresses Bug 6900517.
>
> Finish up support for timed audio in the new FastMixer world. Pay special
> attention to remaining lock-less and voluntary yield free on the FastMixer
> thread. This fixes audio playback for Q on JB.
>
> Change-Id: Iaf815e58a1b1d0a0190051794bec8dc5c9231785
> Signed-off-by: John Grossman <johngro@google.com>

Change-Id: I9bd687acc345a05867af48e71116690fdb0ce1b5
Signed-off-by: John Grossman <johngro@google.com>
udioflinger/AudioBufferProviderSource.cpp
udioflinger/AudioBufferProviderSource.h
udioflinger/AudioFlinger.cpp
udioflinger/AudioStreamOutSink.cpp
udioflinger/AudioStreamOutSink.h
udioflinger/FastMixer.cpp
udioflinger/MonoPipe.cpp
udioflinger/MonoPipe.h
udioflinger/MonoPipeReader.cpp
udioflinger/MonoPipeReader.h
udioflinger/NBAIO.cpp
udioflinger/NBAIO.h
udioflinger/SourceAudioBufferProvider.cpp
ee578c0330319f04a48bccbdb26b53fea0388d04 24-Jul-2012 John Grossman <johngro@google.com> AudioFlinger: Better handling for master volume/mute

(cherry picked from commit 93d906837e0e89aa1d9c913ab2b531b809f9bb9e)

> AudioFlinger: Better handling for master volume/mute
>
> Changes to address bug 6842827.
>
> When a HAL is loaded, cache whether or not the HAL supports
> set_master_volume/mute in the AudioHwDevice structure. Store an
> AudioHwDevice in AudioStream(In|Out) structures instead of just an
> audio_he_device_t. This give threads (PlaybackThreads in
> particular) access to the cached capabilities.
>
> When setting master volume/mute, change the system to always set the
> setting on all HAL which support it and also to set the setting on all
> PlaybackThreads. Change PlaybackThreads to apply the setting at the
> in SW mix stage of the pipeline if its assigned HAL does not support
> the setting, or to ignore the setting of the assigned HAL does support
> it.
>
> Change-Id: Ia14137a30b4c3ee6f2d7ddcc8cba87bf5eec87f4
> Signed-off-by: John Grossman <johngro@google.com>

Change-Id: Icb6bc13764e100a2003eb1dee2231132ab287d98
Signed-off-by: John Grossman <johngro@google.com>
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
d8f178d613821c3f61a5c5e391eb275339e526a9 20-Jul-2012 John Grossman <johngro@google.com> Change audio flinger to user HAL master mute if available

(cherry picked from commit 91de9b56282d126ffb36344266af5fee3cefcfdd)

> Change audio flinger to user HAL master mute if available
>
> Hand merge from ics-aah
>
> > Change audio flinger to user HAL master mute if available: DO NOT MERGE
> >
> > Replicate the pattern used for HAL master volume support to make use
> > of master mute support if the HAL supports it. This is part of the
> > change needed to address bug 6828363. Because of the divergences
> > between ICS and master, this change will need to be merged by hand.
> >
> > Signed-off-by: John Grossman <johngro@google.com>
> > Change-Id: I6d83be524021d273d093bcb117b8f2fe57c23685
>
> Change-Id: I32280582905c969aaec2bb166ec5c61df82d737a
> Signed-off-by: John Grossman <johngro@google.com>

Change-Id: I5cd709187221d307fe25c5117ccaadca5f6b197b
Signed-off-by: John Grossman <johngro@google.com>
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
0ae81b65f28ebbd2d713d66ef59e7cf0d99e60a1 07-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am cb668771: am 97197157: Camera2: Reduce redundant device dumpsys

* commit 'cb6687718a8952afb26e5084da3f23ac972b04a1':
Camera2: Reduce redundant device dumpsys
97197157cf619fb716710eb67915fdfa93502750 06-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Reduce redundant device dumpsys

Bug: 6243944
Change-Id: Ifdc15ee62156a7adfd133f0d0d8b772dd1e9d5a3
amera/libcameraservice/Camera2Device.cpp
ce818f883a094483f823cffd45106e1603ac5805 06-Aug-2012 James Dong <jdong@google.com> am da608d59: am 8da4cd7d: Fix a deadlock in commandSetVideoBufferCountL()

* commit 'da608d59a12509835ecd097ecc0abb2f7ab16a26':
Fix a deadlock in commandSetVideoBufferCountL()
8da4cd7d706d9f551bf2d08cd8b61907a10cd38d 05-Aug-2012 James Dong <jdong@google.com> Fix a deadlock in commandSetVideoBufferCountL()

o The lock to be acquired in recordingEnabled() has aleady been acquired in sendCommand()
before the call to commandSetVideoBufferCountL().

Change-Id: I664d51ef449c9eb3576d5d56f73f29c98444ff3f
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
c01e93e4534ddb45c9897192c2ef3a1be8c51943 04-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am 7dad0e96: am d9f02533: Merge "Camera2: Add notification handling skeleton." into jb-mr1-dev

* commit '7dad0e96cf7a9e9933aeac69623be8c31497e656':
Camera2: Add notification handling skeleton.
160d4af9d933fe9461bb213e5876fc5c8c2178c2 03-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Add notification handling skeleton.

Wire up skeleton methods for handling all currently defined
notifications.

Bug: 6243944
Change-Id: I84b3f60111416ba6fbcdb086f1310225142e2b70
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
27644634ea54d48863e765d87e24d60153a6e795 03-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am 8e888ec7: am 36cdfb18: Camera2: Break out individual commands

* commit '8e888ec75718db90d2e6b7e0ab3bea814e2dd3f0':
Camera2: Break out individual commands
36cdfb185877a7f573621d19ed2b2e1cac13d62e 03-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Break out individual commands

- List all commands that need implementing in sendCommand
- Write skeleton methods for each one
- Implements playRecordingSound command
- Partially implements enableShutterSound command

Bug: 6243944
Change-Id: I7866df75adca09483f407d3a4f630e847dbc7721
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
4b5412b6fe136a7391076c53eea6974c664ead91 03-Aug-2012 James Dong <jdong@google.com> am 903f037a: am 983cf231: Dynamically configure the number of video buffers used by camera source, if supported

* commit '903f037ae7e6161818cb3b2d662fd380a9d02499':
Dynamically configure the number of video buffers used by camera source, if supported
983cf231ab2d176a14595cdae46ff1b0c239af47 02-Aug-2012 James Dong <jdong@google.com> Dynamically configure the number of video buffers used by camera source, if supported

o related-to-bug: 6920805

Change-Id: I413bb50954cc84e32ed40bcb713842dc7b58e2b6
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/CameraClient.cpp
76a794f66595390c21639b6af89a6efbfd564e06 03-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am 22c875ae: am 15d7245e: Merge "Camera2: Fix exposure compensation step value." into jb-mr1-dev

* commit '22c875ae3b06597dabf82e6464a36a82967a4e83':
Camera2: Fix exposure compensation step value.
4d6a71d41a6bef57cc9ab81a95cfa975241486c8 03-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am 3b1069c5: am 1bf1c000: Merge "Camera2: Minor logging updates." into jb-mr1-dev

* commit '3b1069c5e5b70cefc185d7ea498b15e8b12e8807':
Camera2: Minor logging updates.
27170d87c8fa4a730eb246868539660a060d0c4a 03-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am 028488ec: am 4a76bcea: Merge "Camera2: Check PIDs to ensure camera exclusive access." into jb-mr1-dev

* commit '028488ecb9bc16482e94beca8e27a2d409126648':
Camera2: Check PIDs to ensure camera exclusive access.
15d7245ed2193e4956ea87998321cbc16a3b0a46 03-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Fix exposure compensation step value." into jb-mr1-dev
1bf1c000be916b5e3388ef9039beedda01fa2bdd 03-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Minor logging updates." into jb-mr1-dev
4a76bcea7a23356185c4fa9491d5a73256b80cd0 03-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Check PIDs to ensure camera exclusive access." into jb-mr1-dev
d6f8e08a9ca7f2fe41717acd351426a7ecb0c175 03-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix exposure compensation step value.

Fix floating-point divide error.

Change-Id: I61b140c1090d6773b9b530d19a2ec03cf784b85e
amera/libcameraservice/Camera2Client.cpp
750d74b0b64470dccdb7310bf33e0d0e582f2059 01-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Minor logging updates.

Improve double-verbose logging, report a few more errors/startup
conditions.

Bug: 6243944
Change-Id: I2e814f786b35f57b63220d1b7c39f39cb6c3ace3
amera/libcameraservice/Camera2Device.cpp
3a609147811105d40766f8f8f5904bf71cb123cb 31-Jul-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Check PIDs to ensure camera exclusive access.

Bug: 6243944
Change-Id: I4b36af2c92b7266a4aa896a2b048c56b6406cb9a
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
22651d2b681f3f75e2a1e73daede1b94e998cc6f 03-Aug-2012 Patric Frederiksen <patric.frederiksen@sonymobile.com> am 174e8f67: Shutter sound is heard at the end of the recorded video

* commit '174e8f67cf909ca293d45face46bd0a65199e211':
Shutter sound is heard at the end of the recorded video
3c0a0e8541846427db0587c2fffb90f60ee680b0 02-Aug-2012 Paul Lind <plind@mips.com> Fix initialization of audio mixer track resources for MIPS.

The value 1 << 32 (maxNumTracks defaults to 32) is surprisingly not defined
in C, and differs on MIPS than the other arch.

Therefore the track resources were not initialized properly, resulting
in failure to play any audio.

The fix allows the mConfiguredNames bitmask to be correctly set to all
1's in the 32-track case, for all arch.

Change-Id: Ied3e1305952e9567602e2cd76c5ef3acb0809ee0
Signed-off-by: Paul Lind <plind@mips.com>
udioflinger/AudioMixer.cpp
174e8f67cf909ca293d45face46bd0a65199e211 10-Jul-2012 Patric Frederiksen <patric.frederiksen@sonymobile.com> Shutter sound is heard at the end of the recorded video

On fast hardware, which is more common, the shutter sound is
played and recorded before video recording is stopped.

Before we call play shutter sound before calling stop recording.
With this fix we call play shutter sound after calling stop recording.

Change-Id: I06a3e65fd2700f1d2457fea5ff0f64500eac436f
amera/libcameraservice/CameraClient.cpp
9007619d1f786a75dae0fff31feadbf9aed9cfb8 02-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Shutter sound is heard at the end of the recorded video" into jb-mr1-dev
35f859b338c0922094ecfc37fb8157530df6b305 10-Jul-2012 Patric Frederiksen <patric.frederiksen@sonymobile.com> Shutter sound is heard at the end of the recorded video

On fast hardware, which is more common, the shutter sound is
played and recorded before video recording is stopped.

Before we call play shutter sound before calling stop recording.
With this fix we call play shutter sound after calling stop recording.

Change-Id: I06a3e65fd2700f1d2457fea5ff0f64500eac436f
amera/libcameraservice/CameraClient.cpp
bdce245042dab808cb9062d9161256f01b03a79c 01-Aug-2012 Glenn Kasten <gkasten@google.com> am b2676a29: am 44cda3a4: Don\'t wait for presentation complete if terminated

* commit 'b2676a2920c6514ae9405cc56dfa2db49f096016':
Don't wait for presentation complete if terminated
44cda3a4e7ca3de0db9cb49145def3803b03ebb4 01-Aug-2012 Glenn Kasten <gkasten@google.com> Don't wait for presentation complete if terminated

Change-Id: Ia04cf6c620693457dca87b4ffea5dd0fe71efdce
udioflinger/AudioFlinger.cpp
d4b5f7213911636a26a43127eb6ea139f403f558 01-Aug-2012 Glenn Kasten <gkasten@google.com> am 8d058d89: am 5665fde6: Merge "Start adding support for multiple record tracks" into jb-mr1-dev

* commit '8d058d89fd4d46bbacbb8f2dc9bd52e94cd69e56':
Start adding support for multiple record tracks
5665fde6d4520c8e6cec81a4e1e9c86f1537f689 01-Aug-2012 Glenn Kasten <gkasten@google.com> Merge "Start adding support for multiple record tracks" into jb-mr1-dev
510a3d6b8018a77683dac466127ffd0af34bef6e 16-Jul-2012 Glenn Kasten <gkasten@google.com> Start adding support for multiple record tracks

Replace single mTrack by vector mTracks.
Destroy record tracks similarly to playback tracks.
Dump all record tracks, in addition to the active record track.

Change-Id: I503f10b51928b6b92698fe1c51a9ddd3215df1f4
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
20d36d0c2f4ed99be6d9c0973ac4e833b04576ec 01-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am f0f4a0ab: am 428b77a2: Camera2: Improve formatting of debugging dump

* commit 'f0f4a0abe917fc9f18566fd67ef43e79b711134f':
Camera2: Improve formatting of debugging dump
1b88304c41db6efc43869cfd978a633a7b30f433 01-Aug-2012 Eino-Ville Talvala <etalvala@google.com> am 637a3676: am 836b81f3: Camera2: Improve threading safety

* commit '637a3676b1936d5202da5be6d38ccda5e6ac4aae':
Camera2: Improve threading safety
428b77a2b94b74665a47375b3fdb893b98d71269 30-Jul-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Improve formatting of debugging dump

Bug: 6243944
Change-Id: Id8730357f3adcd96923132f9f702e296e0dfd357
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/CameraService.cpp
836b81f3c5a5bacb800f698f90ded6bd6e6bc5ce 27-Jul-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Improve threading safety

Merge mutex lock for accessing internal parameters with the parameter
structure, forcing a lock to be held before the parameters can be accessed.

Bug: 6243944
Change-Id: I86e44f395de0d80ff7c3ff3530f25b60015512d2
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
05144f1d68c5240a1fedd42ac83814f3ecf70dfd 30-Jul-2012 Glenn Kasten <gkasten@google.com> Merge "Share local time frequency for all tracks & mixers"
93d906837e0e89aa1d9c913ab2b531b809f9bb9e 24-Jul-2012 John Grossman <johngro@google.com> AudioFlinger: Better handling for master volume/mute

Changes to address bug 6842827.

When a HAL is loaded, cache whether or not the HAL supports
set_master_volume/mute in the AudioHwDevice structure. Store an
AudioHwDevice in AudioStream(In|Out) structures instead of just an
audio_he_device_t. This give threads (PlaybackThreads in
particular) access to the cached capabilities.

When setting master volume/mute, change the system to always set the
setting on all HAL which support it and also to set the setting on all
PlaybackThreads. Change PlaybackThreads to apply the setting at the
in SW mix stage of the pipeline if its assigned HAL does not support
the setting, or to ignore the setting of the assigned HAL does support
it.

Change-Id: Ia14137a30b4c3ee6f2d7ddcc8cba87bf5eec87f4
Signed-off-by: John Grossman <johngro@google.com>
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
91de9b56282d126ffb36344266af5fee3cefcfdd 20-Jul-2012 John Grossman <johngro@google.com> Change audio flinger to user HAL master mute if available

Hand merge from ics-aah

> Change audio flinger to user HAL master mute if available: DO NOT MERGE
>
> Replicate the pattern used for HAL master volume support to make use
> of master mute support if the HAL supports it. This is part of the
> change needed to address bug 6828363. Because of the divergences
> between ICS and master, this change will need to be merged by hand.
>
> Signed-off-by: John Grossman <johngro@google.com>
> Change-Id: I6d83be524021d273d093bcb117b8f2fe57c23685

Change-Id: I32280582905c969aaec2bb166ec5c61df82d737a
Signed-off-by: John Grossman <johngro@google.com>
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
e4e2a37dbe2a4d923232305549101f779a2e3638 23-Jul-2012 Glenn Kasten <gkasten@google.com> Extract methods to enter standby and standby mode

Also move initial standby from to threadLoop to avoid a race condition.

Change-Id: I65afca83c36fb41b983b3b1d3dab35d4029560e3
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
52008f821a5202502a82a8ba2c024e69bd336350 18-Mar-2012 Glenn Kasten <gkasten@google.com> Share local time frequency for all tracks & mixers

Change-Id: I5e6f0e371f728a5225c2fa6f778c109449d33602
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
28567defef0ba95cb38f2d80eba30b01db207a77 26-Jul-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Use more buffers for video encoding."
82f517ba654ca4891b82ebe604dbd004b66a7b2d 26-Jul-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Revamp recording support to allow opaque formats."
803cbf6190f16f7b2c43cbc51d0df21ec888abdd 26-Jul-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use more buffers for video encoding.

To avoid starvation, set the number of simultaneously available buffers
to the encoder to 8.

Bug: 6243944
Change-Id: I6d0e9f3c0426d62d374c0ae0d427bf5189141adf
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
0a7af18d0308295405491f86603e3d119450aba0 10-Jul-2012 Glenn Kasten <gkasten@google.com> Use valueAt instead of editValueAt when possible

Change-Id: I885b169f4b176a6b5c2ca9a534214b4ffff1700e
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
58e5aa34f01d663654d8bafad65db1dda42161ff 20-Jun-2012 Glenn Kasten <gkasten@google.com> effect_descriptor_t const correctness

Change-Id: Iad008f20d35a18acf500f773900164552fd0c19e
udioflinger/AudioFlinger.h
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
1d491ff06f4b9c90ff24fe953b90d0843eaf1c04 16-Jul-2012 Glenn Kasten <gkasten@google.com> Fix races in AudioRecord stop()

Change-Id: Id0ac1915f57fef4a938c7f90989c1162a8b6c51c
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
78822d73af1e7f6b8b297fc7f98ef7f8257cc10a 19-Jul-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Revamp recording support to allow opaque formats.

- Avoid memcpy of buffer data by using metadata mode
- Temporarily add MediaConsumer BufferQueue class

Bug: 6243944
Change-Id: I7a8c4222b7dbd14f1b1d86fda06d38eb640e87c1
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/MediaConsumer.cpp
amera/libcameraservice/MediaConsumer.h
69d799679c8c0308e42057e7b5ad63a7ae806480 19-Jul-2012 Glenn Kasten <gkasten@google.com> Use upmix/downmix utility routines

Change-Id: I9ae2ec938fb695ec576ea008a42205325af7bbf1
udioflinger/AudioFlinger.cpp
e78d5c7bfda1e80223436df3faeb4a9e2e719bcf 21-Jul-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Stop preview: Wait until HAL is drained"
789e325341e73743630f45e92b77d07e31c3957e 21-Jul-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Add more verbose logging"
afa1669ef8b3cf172a695f8959d94849cb9f7195 21-Jul-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Fix recording bugs"
2267106c98f461b730c772a913da946c391a178c 21-Jul-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Stop preview: Wait until HAL is drained

Once camera returns from stopPreview, all preview activity needs to
have stopped. So wait until that's true.

Bug: 6243944
Change-Id: Ifa6cf171bd69015883e26dafb1e49e5ac098025a
amera/libcameraservice/Camera2Client.cpp
e65c89113232d070dd9153c54ca19301bca7a162 21-Jul-2012 Eric Laurent <elaurent@google.com> fix audio effect not destroyed when needed.

commit a5f44eba contained an error which made that audio effect
modules where not destroyed but left in the destroyed state
rendering them unuseable after being released.

Bug 6805168.

Change-Id: Ia4e683b3c970ffd01846c482fde73d799ff219de
udioflinger/AudioFlinger.cpp
33e6e35b03a726e35203e97550f32154c91d5f13 17-Jul-2012 Glenn Kasten <gkasten@google.com> Miscellaneous audio record fixes

Call AudioSystem::stopInput() if exitPending() after wait() returns.

Acquire lock before clearing mActiveThread.

Change-Id: Ia55e4c4b3accc65ad5479cbdc094fd919152af9f
udioflinger/AudioFlinger.cpp
cd2d61016527bf48bd2e9a920bb3fdbb875eb3e4 19-Jul-2012 Glenn Kasten <gkasten@google.com> Use constructor to initialize instead of memcpy

Also don't check for thread parameter as it's always non-NULL

Change-Id: Id23ded1370556ef3f76f81f5f0c6fa644bcba681
udioflinger/AudioFlinger.cpp
be5f05e0fdfc4e3799653702187861a2afa072ee 19-Jul-2012 Glenn Kasten <gkasten@google.com> Internal dump methods return void not status_t

Only the IAudioFlinger::dump() needs to return a status_t.

Change-Id: Iffeb2a7db4846df850b6b2ed960276f1fd75dba0
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
9e4c3db01ba4eb1e5acbed113f78a31374900df6 20-Jul-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Add more verbose logging

Until ATRACE works in emulator, add more verbose logs to help debugging

Bug: 6243944
Change-Id: Ic5fbf764f2717e5edd05d37e0f7d826f1d494179
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Device.cpp
898a9a9b867e5d209671feee4c92266f90a55aa3 20-Jul-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix recording bugs

- Release recording stream on shutdown
- Return recording gralloc buffers to queue when they are received by
camera service after recording has been stopped (which is normal
behavior thanks to pipeline latencies in camera pipelines)

Bug: 6243944
Change-Id: Ia13a501c726613fd1e404733456dbd10d7b00132
amera/libcameraservice/Camera2Client.cpp
5ad92f620fbbb6a8281f10169a23d38e3601e07a 19-Jul-2012 Glenn Kasten <gkasten@google.com> Revert 94479fd5405642c67efd14cebe722feb9cbe6e77

Change-Id: I5ca78d5462badf541868785b2ba2e3f6d0cf492a
udioflinger/AudioFlinger.cpp
bb4350d3b9e9485ae59e084de270f86aecef8066 04-Jul-2012 Glenn Kasten <gkasten@google.com> Use audio_devices_t more places

Change-Id: Id0ace02ca6f480a6c46e11880acf6cdc66d83184
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
ea682976030a3930f6ee49b33b7e21abfc68174a 17-Jul-2012 Eino-Ville Talvala <etalvala@google.com> Merge "CameraService: Add more information to service dump."
f5926136ad328e95a79336b051d6f853443eaab9 17-Jul-2012 Eino-Ville Talvala <etalvala@google.com> CameraService: Add more information to service dump.

Add dumpsys information even when there's no active client. Including:
- Camera module version / name / author
- Number of camera devices
- Static information for each device

Change-Id: Ib97e325f6be5f989b342d24f1ae17aa9e796f8ed
amera/libcameraservice/CameraService.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
udioflinger/AudioFlinger.cpp
udioflinger/AudioPolicyService.cpp
fd4e20c226eca185fc789de761beae64855bfbbb 04-Jun-2012 Glenn Kasten <gkasten@google.com> Run audio at priorities 2 and 3 above kernel 1

Also run the watchdog at same priority as the fast mixer.
requestPriority() originally used only the caller's pid to decide which
cgroup to assign, but in the future it might look at the priority also.
So it's safer to use same priority as the fast mixer to be sure we
run in the same cgroup.

Bug: 6461925
Change-Id: Ia59c93e4b22dacbb6746bfa6ad491be7b72f2b8d
udioflinger/AudioFlinger.cpp
d96c5724818fb47917bb5e7abe37799735e1ec0e 25-Apr-2012 Glenn Kasten <gkasten@google.com> Don't call virtual methods in destructor

The result of calling virtual methods from a destructor is undefined.

Change-Id: I0fd4a19626e5ae564a60b753315b5f6c4b8d1f2c
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
1ea6d23396118a9cfe912b7b8a4e6f231e318ea2 09-Jul-2012 Glenn Kasten <gkasten@google.com> Use atomic ops for thread suspend count

There was a theoretical but unlikely race if two binder threads
executed suspend() or restore() concurrently. Also added comments.

Change-Id: I0908acc810b83bdd66455b27ca3429de1662a2cd
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
9cca4c6d976d2d4127286e9eaa54d1b99880c25c 16-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Add recording support

- Support startRecording/stopRecording
- Support lock/unlock/connect
- Some rearrangement of class definitions for clarity/consistency

Bug: 6243944

Change-Id: I00c600a798572d2f69bb3f2bab3d79e4bd9a91e5
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
1879fff068422852c1483dcf8365c2ff0e2fadfc 12-Jul-2012 Glenn Kasten <gkasten@google.com> Add tid parameter to IAudioFlinger::openRecord

Not yet implemented

Change-Id: I35523fb15ad71727ecc9f4bb870f07e4b7397dc4
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
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
udioflinger/AudioFlinger.cpp
39c54f68804c1ce5c85ec588f3c2c63447a807b4 09-Mar-2012 Glenn Kasten <gkasten@google.com> Remove dead code

Change-Id: If22a6c4e572b0734eba0c5a7ce29a2c61c581e5d
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
4fe1ec4f40b58abff6cec147aa786cb65698161a 28-Feb-2012 Glenn Kasten <gkasten@google.com> Fix check for invalid channel count

Change-Id: Id9e3dce0e3d5971786212d3f70e17a17e32ce92b
udioflinger/AudioFlinger.cpp
04270daf50f0c602d7c57a257a693e68246cbeb7 10-Jul-2012 Glenn Kasten <gkasten@google.com> Record overflow cleanup

Add comments and rename one method for clarity

Change-Id: I04a9147e46e88a072256c0211b112d52202419e2
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
4d2132c866228eaef563e8141ebf06aa25ee9ff7 10-Jul-2012 Eric Laurent <elaurent@google.com> Merge "audio policy: fix delayed command insertion"
2df8f55055fe431a508148cf525df1ba40f03113 10-Jul-2012 Glenn Kasten <gkasten@google.com> Add comments on use of volatile for track count

and add acquire load at the read

Change-Id: Ib41a58f5b1f6af87a8bd63d3f77d2ec0e48cb479
udioflinger/AudioFlinger.h
a34f8ec169986c5a28600c0decaa4e2db70df8e4 21-Jun-2012 Glenn Kasten <gkasten@google.com> Remove 'volatile' from mMute and add comments

Change-Id: I386ba27b2305a397aba70331c6bf0d35ea727cf6
udioflinger/AudioFlinger.h
9f34a36d9cdb9595c288e50ffe00da038bc8abb9 21-Mar-2012 Glenn Kasten <gkasten@google.com> Whitespace and indentation

Change-Id: I424052b4ff9218147a5cfc8e6dcd67fe8105d229
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
7d6c35bf132a46c0a8a9826491882495fc98bd8c 02-Jul-2012 Glenn Kasten <gkasten@google.com> Move constant initializations from onFirstRef() to constructor

Change-Id: I57f55b0bd1edee105c58c3a055f95f1e4a2c9646
udioflinger/AudioFlinger.cpp
a21795c5d1d4ca9a6361e4b2db3e1f053e67b1c9 10-Jul-2012 Patric Frederiksen <patric.frederiksen@sonymobile.com> Shutter sound is heard at the end of the recorded video

On fast hardware, which is more common, the shutter sound is
played and recorded before video recording is stopped.

Before we call play shutter sound before calling stop recording.
With this fix we call play shutter sound after calling stop recording.

Change-Id: I06a3e65fd2700f1d2457fea5ff0f64500eac436f
amera/libcameraservice/CameraService.cpp
6648821933dc06c0b09ab2c8b32135edddcd4291 21-Jun-2012 Glenn Kasten <gkasten@google.com> AudioFlinger::getBuffer() always returns non-NULL

Change-Id: I543d3db507597cacbfdad5d9ea71732137fe54fb
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
94479fd5405642c67efd14cebe722feb9cbe6e77 10-Jul-2012 Glenn Kasten <gkasten@google.com> Fix build

Revert after system/core audio_devices_t is submitted

Change-Id: I5a8ee1a7b711e834501e927f41c62efa6a6600b6
udioflinger/AudioFlinger.cpp
cec4abb2a39eafa75cf6894170a200322aa7226e 03-Jul-2012 Eric Laurent <elaurent@google.com> audio policy: fix delayed command insertion

When inserting a delayed command in the audio policy service
command thread queue, later similar commands are filtered out.
In case of volume commands and delayed unmuting, this can cause
a problem where a new volume command can cause the timing of a
delayed unmuting command to not be honored.

This change makes that a volume command gets the time stamp of
any delayed command it replaces.

Bug 6720482.

Change-Id: I216f85ac0ea46e4a046d3483e9e9b7ffe6c34a08
udioflinger/AudioPolicyService.cpp
01542f2704f39956da09ae2840e192dab760091f 02-Jul-2012 Glenn Kasten <gkasten@google.com> Only write to mDevice once

This fixes a bug where readers might see intermediate values.
Also add comments about how mStandby and mDevice are used.

Change-Id: Idc84e56c21381a45137a2ca5ff9c57d437201869
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
c1dae24a08b67b98e18e4239d4f3a74d600d353c 03-Jul-2012 Glenn Kasten <gkasten@google.com> Remove debug code HAVE_REQUEST_PRIORITY and SOAKER

Change-Id: I73a2afe72d8acb53e57e6b4e6fb5133e22b7875a
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Soaker.h
a5f44ebaf58911805b4fb7fb479b19fd89d2e39b 25-Jun-2012 Eric Laurent <elaurent@google.com> audioflinger: fix effect disconnect deadlock

Fix possible deadlock when several EffectHandles on the same
EffectModule are destroyed simultaneously:
A wp on an EffectHandle should not be promoted to a local sp
with ThreadBase mutex held as the EffectHandle destructor can be
called when the sp gets out of scope which will call
ThreadBase::disconnectEffect() and try to acquire the mutex.

Use raw pointers instead of weak pointers for the list of handles
on an EffectModule.

Bug 6679606.

Change-Id: Ice8b602fb03a7d363c44ce3dced8a53540d96270
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
f1da96d8cf60842538e00a9c950cc451f7da2c10 03-Jul-2012 Glenn Kasten <gkasten@google.com> Remove longStandbyExit

It was never set (the assignment was within an "if" that was never true).

Change-Id: I01cc68e9df6b190eece621b2aa9858b4361880ce
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
415fa7599f48494f99206b8d6e1974abb52c5923 03-Jul-2012 Glenn Kasten <gkasten@google.com> Fix uninitialized field EffectModule::mPinned

Also mark EffectModule::mId and EffectModule::mSessionId const, and
document the initialization of other fields in EffectModule.

Change-Id: Ic1ca008e75e9b5924743ffc35bef80057f3a0669
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
d5903ec1332630f2992a6f0d5ca69d13a185c665 18-Mar-2012 Glenn Kasten <gkasten@google.com> Compare sp<> to 0 and raw pointers to NULL

Change-Id: I50ff8a010d349d1d7e3dffa04a6331814c2128b0
udioflinger/AudioFlinger.cpp
a01992a0675a06df7d0bbe7b977207dd0c33fdc7 02-Jul-2012 Eric Laurent <elaurent@google.com> am dbbd5b86: am 109347d4: audioflinger: fix regression in attachAuxEffect().

* commit 'dbbd5b860a3a26bea3376410f75f27530d9cd10b':
audioflinger: fix regression in attachAuxEffect().
109347d421413303eb1678dd9e2aa9d40acf89d2 02-Jul-2012 Eric Laurent <elaurent@google.com> audioflinger: fix regression in attachAuxEffect().

Commit 717e1286 introduced a regression in PlaybackThread::Track::attachAuxEffect()
when called with an effect ID of 0 to detach the auxiliary effect.

It is normal in this case that AudioFlinger::getEffectThread_l() returns 0.

Bug 6768757.

Change-Id: I7430bd1aad2f68da38f7c3e4794e7ad657bfc6be
udioflinger/AudioFlinger.cpp
dbabf8a7dfe3aa8bf0ed169220d2009d5891fef2 01-Jul-2012 Eric Laurent <elaurent@google.com> am 651f9e7c: am 717e1286: audioflinger: fix auxiliary effect attachment

* commit '651f9e7c972b58a49066081187161268bcf9237a':
audioflinger: fix auxiliary effect attachment
717e128691f083a9469a1d0e363ac6ecd5c65d58 30-Jun-2012 Eric Laurent <elaurent@google.com> audioflinger: fix auxiliary effect attachment

Auxiliary effects (Reverb) are global effects and as such follow
the default rule which is to attach them to the output thread that
handles music streams by default. This causes a problem when several
threads are eligible to handle music streams as tracks can be attached
to either thread based on criteria unknown when teh effect is created.

The fix consists in moving the auxiliary effect if necessary when an
AudioTrack is attached to it and this track is not on the same
output thread.

Bug 6608561.

Change-Id: Ib32c3cabc731b2046aba728be1771982999c6069
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
9ee836fc8cf54d26e1e0819d1467d4d39bb9295c 25-Jun-2012 Glenn Kasten <gkasten@google.com> Merge "Remove acoustics from AudioSystem::getInput()"
20010053daabfa43fcfe781bbf004473b4c08538 22-Jun-2012 Glenn Kasten <gkasten@google.com> Remove acoustics from AudioSystem::getInput()

Change-Id: I29fb3ee5664c1f0ee0409c1bb2be087ecca637db
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
52a530fda9ae2bb8e00b35972c73e9cd0b110ab4 25-Jun-2012 Eric Laurent <elaurent@google.com> Merge "audioflinger: fix setStreamOutput()"
1e5b2b3361ddd07259bf4b29820ca4aa5f3a861b 14-Jun-2012 Jamie Gennis <jgennis@google.com> Update ANativeWindow client code for sync

This change updates all the uses of ANativeWindow to use the new ANW functions
that accept and return Sync HAL fence file descriptors.

Change-Id: Id7db42d8d6380f8b440d88476ce9211c6225fb16
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/CameraHardwareInterface.h
22167855ff9af7b13fda669ca27c67a037a7d585 20-Jun-2012 Eric Laurent <elaurent@google.com> audioflinger: fix setStreamOutput()

AudioFlinger::setStreamOutput() should also work for direct outputs.
Also ignore the destination output specified to match the expected
behavior which is to invalidate all tracks using the specified stream
type so that they can be re created on the correct ouput thread.

Do not send STREAM_CONFIG_CHANGED event wich is ignored by AudioSystem
anyway since the stream to output cache has been removed.

Change-Id: I13d9d47922923b630dd755717875424c16be4637
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
5f12136299918ea30555f3481668ec0dbb775e5f 15-Jun-2012 Eric Laurent <elaurent@google.com> audio policy: acquire lock for volume functions

Acquire the AudioPolicyService mutex when executing
setStreamVolumeIndex() and getStreamVolumeIndex().

These functions have become more complex and iterate on the
list of opened outputs and it is safer to acquire the
AudioPolicyService mutex to avoid concurrency with other
functions.

Bug 6626532.

Change-Id: Ifdcbbbf13338fd9a59f694d43faa7ade143f94bf
udioflinger/AudioPolicyService.cpp
5b42ee8124ffc7f95d5a8a433b5df0e18d847635 18-Jun-2012 Glenn Kasten <gkasten@google.com> am 4862d1ea: am eb15716b: Change definition of warmup period

* commit '4862d1eaa6b3b2bad040d01fe090e8616685c12b':
Change definition of warmup period
ff3e9fa062e2afb2b8ebb0f47c8ad90fdd890dbd 18-Jun-2012 Glenn Kasten <gkasten@google.com> am 16f07fb7: am 972af221: FastMixer compensates for SRC jitter in audio HAL

* commit '16f07fb7bb4c284cc0b16f55fe5eabd4a4802590':
FastMixer compensates for SRC jitter in audio HAL
2c08dc66c2980a50e90befe84f836b7ebf17fe94 15-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Move per-frame verbose logs to separate log enable

Bug: 6243944
Change-Id: I5850f8ceb2e603aa555cc71328f64d6a928694a0
amera/libcameraservice/Camera2Device.cpp
74cfa5b792fc17d7afd3e833d552fa0ec45ea977 18-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Handle preview orientation changes."
e4aacc3be5f9a7128a0865a6878b644a05d25616 18-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Connect camera parameters to HAL request entries."
c94cd19694ea0befe2eb22735c50b00070f006d9 15-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Handle preview orientation changes.

- Process sendCommand(CAMERA_CMD_SET_DISPLAY_ORIENTATION)

Bug: 6243944
Change-Id: I92d3bb13312d475703325230487d660a1cb7e0e5
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
be0573b93e2d6fa133579c885583af9ed16bc29d 15-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Connect camera parameters to HAL request entries.

- All fields in Camera.Parameters are mapped to HAL2 entries, and
communicated to the HAL.

- Preview stream properly updated on parameter changes

- Slight code rearrangment for improved clarity

Bug: 6243944
Change-Id: I2a1db5c148809a62ba3524fb659dd6065affff8e
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
eb15716b59020f342df62bce5b293f0603b94861 13-Jun-2012 Glenn Kasten <gkasten@google.com> Change definition of warmup period

Previously, warmup was considered done as soon as any write() took
more than 0.5 nominal cycle time. In practice, this was always the
first write() that turned on power to the output path, and it didn't
accurately account for filling the full kernel buffer queue, or for
buffering in the HAL sample rate conversion.

Now warmup is considered done when a write() _after_ the first write
takes more than 0.5 nominal cycle time.

This will throttle the initial pull rate after coming out of standby.
When combined with another change to throttle the pull rate for
devices with HAL sample rate conversion, it may help reduce some of the
notification glitches. The only downside is that it will increase the
warmup time a bit.

Bug: 6508317, 6650846, 6607056
Change-Id: I39f324c5195578170a55308e9601d3a1b41db3e0
udioflinger/FastMixer.cpp
f6dca9f9101cac0fb2488b8f7691d4381476cab9 15-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Minor parameter restructuring"
11b7cdef9726f8270f12f6c393600e8fb3c469de 15-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Minor parameter restructuring

Will make it easier to update HAL-level parameters.

Bug: 6243944
Change-Id: I3acac3c532de440d46755ce3e1d819ad5ed2e106
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
972af221ae7253e406e0e1ea853e56a3010ed6b1 14-Jun-2012 Glenn Kasten <gkasten@google.com> FastMixer compensates for SRC jitter in audio HAL

Force a sleep if audio HAL write() returns too quickly.

Bug: 6661275
Change-Id: Ie810f5a087b89fb24dab229a0e500af1dee53571
udioflinger/FastMixer.cpp
4bb2253be6855ab2446fe2344a8a57487e3f5024 15-Jun-2012 Glenn Kasten <gkasten@google.com> am ff0fcb26: am 0a14c4ce: Make CPU frequency statistics optional

* commit 'ff0fcb2628613953f454875006bfb78c3fc087d3':
Make CPU frequency statistics optional
0a14c4ce1a41bc09eb7855fa531a3af629a69139 13-Jun-2012 Glenn Kasten <gkasten@google.com> Make CPU frequency statistics optional

Certain CPUs with dynamic cluster swapping and hotplug
don't report CPU frequency accurately. The file descriptors
used to read the frequency become stale and report bogus data.
So make this feature a build time option for debugging only.
This will also improve performance of the fast mixer loop.

Change-Id: I602f81ec3281a37992769208be08084ed1469e8c
udioflinger/Android.mk
udioflinger/FastMixer.cpp
udioflinger/FastMixer.h
362ebcbf100f7fccd37551c77e67c4faa7241b63 24-May-2012 Glenn Kasten <gkasten@google.com> DO NOT MERGE Remove log spam for fast track denied

Bug: 6531054
Change-Id: Iedf58e810a157aae88b5900da27c81054c437058
udioflinger/AudioFlinger.cpp
3297daae9681004775012faba9181d65e097e00c 14-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Add more dump information, connect HAL device dump

Bug: 6243944
Change-Id: I79a302f68786d815b9ab9984dbb31d237522416b
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
430aa1506245c42fa7106f3ee269b83143d53f34 14-Jun-2012 Glenn Kasten <gkasten@google.com> am ea1d16da: am e6adde40: Merge "Shorten dumpsys media.audio_flinger output" into jb-dev

* commit 'ea1d16da8e28b30a58090e6372ce12d40b99c21f':
Shorten dumpsys media.audio_flinger output
1d6573032ecde54a466ca32951e101b41a05c797 14-Jun-2012 Glenn Kasten <gkasten@google.com> am 48a0bfa6: am 49dd5cf3: Merge "Log track name on obtain/releaseBuffer warnings" into jb-dev

* commit '48a0bfa6f731386f2794ff36d6677d56e98fc6ea':
Log track name on obtain/releaseBuffer warnings
bfe00d2e46531ef546cd9422a4d533070cbed8af 14-Jun-2012 James Dong <jdong@google.com> am cc0df657: am e20435de: Merge "Add NOTICE and MODULE_LICENSE_APACH2 to libs build under /frameworks/av/" into jb-dev

* commit 'cc0df657cdc8316c2b816c562f269be1706f00ea':
Add NOTICE and MODULE_LICENSE_APACH2 to libs build under /frameworks/av/
e6adde403480333b613452ae0df442df9da4a5b2 14-Jun-2012 Glenn Kasten <gkasten@google.com> Merge "Shorten dumpsys media.audio_flinger output" into jb-dev
49dd5cf3469cd755321f8ec10013ad4fcfaf723d 14-Jun-2012 Glenn Kasten <gkasten@google.com> Merge "Log track name on obtain/releaseBuffer warnings" into jb-dev
ed790412320527bf61798559ccf5e0ff8cb827ae 14-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Improve error checking and debug logs."
239c0ddb4a783e4264537358b071637f0a9a6197 14-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Still image support"
3d51d5cb53cc630709a0ba78d0e60501a675f2d5 13-Jun-2012 James Dong <jdong@google.com> Add NOTICE and MODULE_LICENSE_APACH2 to libs build under /frameworks/av/

Change-Id: I0a3af3e2abdedebd5934f3d941d01c32cfc75e26
related-to-bug: 6647465
udioflinger/MODULE_LICENSE_APACHE2
udioflinger/NOTICE
amera/libcameraservice/MODULE_LICENSE_APACHE2
amera/libcameraservice/NOTICE
amera/tests/CameraServiceTest/MODULE_LICENSE_APACHE2
amera/tests/CameraServiceTest/NOTICE
868c0abe9f26852c217bc201b337e72c68f829b8 13-Jun-2012 Glenn Kasten <gkasten@google.com> Shorten dumpsys media.audio_flinger output

Don't include in FastMixer if it's not present.
This removes confusing clutter especially for devices
with a separate deep buffer output thread, or for the
duplicating thread and A2DP output thread.

Change-Id: I84933f5555593256f11ba0895ec915c09cf16963
udioflinger/FastMixer.cpp
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
udioflinger/AudioFlinger.cpp
4ecfec32aca8749baeb634f7c961f804cb1e8f3e 13-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Improve error checking and debug logs.

Bug: 6243944
Change-Id: Ie61d89b733af7d1f653443bf64b767456127a455
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2Device.cpp
d4bcfde6bf3e7b28e36f6ec66e6d9e5adebfa949 08-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Still image support

- Add stream / request creation for still image capture
- Add takePicture call
- Add callback handler
- Fix shutdown bugs (wait until requests have drained)

Bug: 6243944

Change-Id: Id73eb7090e61b40b90348d1eb262f641ea5f3229
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
8cc3651c04e48b755dcc579bfa4f9a7e9391d6e7 12-Jun-2012 Glenn Kasten <gkasten@google.com> am 57d9b728: am c15d6657: Add audio watchdog thread

* commit '57d9b72812d25dff1c33e37b8475a469accd0919':
Add audio watchdog thread
c15d6657a17d7cef91f800f40d11760e2e7340af 30-May-2012 Glenn Kasten <gkasten@google.com> Add audio watchdog thread

Change-Id: I4ed62087bd6554179abb8258d2da606050e762c0
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioWatchdog.cpp
udioflinger/AudioWatchdog.h
796078f96c8a15fefcea70e666b22ea67cc35301 08-Jun-2012 Glenn Kasten <gkasten@google.com> am ea5008d8: am 28ed2f93: Reduce underruns in screen off, esp. with EQ

* commit 'ea5008d8abfdf1479b4efa266cdb7c842d168aa9':
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
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/MonoPipe.cpp
udioflinger/MonoPipe.h
a9300fd3d84cc07bbfa702e2fad3b32a5ebfd337 08-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Copy metadata buffers for streaming."
0e0dc7a60d605648ba11af4a55e2b99d4a544c50 08-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Improve ANativeWindow handling"
da953c31c084d03fb964cb487134a363f97d2823 08-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Minor bugfixes and cleanup"
e9fd4e80c965b77c8d196f2624a2604f44463df6 08-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Add setParameters call"
02c892280bed166745ff36809da5b802e71c4aeb 08-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Merge changes I82c9811c,Id0294300

* changes:
Camera2: Add basic concurrency guards.
Camera2: Add internal parameter state to dump.
4ab2d8d734cafe4942c006544558266d4e55340c 08-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Use new param structure, improve static camera info queries"
bdbf0c6f1a11d6fd9b71aa765f7de39e248557ba 08-Jun-2012 Eric Laurent <elaurent@google.com> am 98e2e030: am a4f7e0e9: audioflinger: fix duplicating thread standby

* commit '98e2e030231ce99a4796d34d39a7517078d6735e':
audioflinger: fix duplicating thread standby
a4f7e0e9a0e92a063f1b3a08988cf46e2cf1fa94 08-Jun-2012 Eric Laurent <elaurent@google.com> audioflinger: fix duplicating thread standby

The code that waits for a track presentation to be complete
before disabling it caused a regression for duplicating threads.
Because of the way output tracks activity is managed, the number
of frames output by the duplicating thread would never
reach the target set for a track to be considered presented.
The track would not be removed from active list and the thread would
not go to standby and keep its wakelock held.

Bug 6606922.

Change-Id: I4b46b420ac4cbf79a86b6791ae6589d407b01c92
udioflinger/AudioFlinger.cpp
6ed1ed1b3aa6fe01a72fa1c9fea3d6946adc3048 07-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Copy metadata buffers for streaming.

Using the passed-in buffer directly is incorrect; copy them so that
concurrent access can be controlled, and ownership is clear.

Bug: 6243944
Change-Id: Iad22c0dc166b7739e6c5dbfa39aac631b974c95a
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
bd4976a1651d5973836454f8a56871226ec000b5 07-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Improve ANativeWindow handling

- Properly set up scaling mode and transform on stream create
- More error checking/verbose logs on enqueue/dequeue

Bug: 6243944
Change-Id: Ic814e7f84a2016ed46ee2eb6832474f741f7cfd1
amera/libcameraservice/Camera2Device.cpp
bd47b7bcfe7f5a97fef81143f4282c41590626fe 07-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Minor bugfixes and cleanup

- Use CameraParameter-defined enum strings instead of writing our own
- Remember last window binder sent properly

Bug: 6243944
Change-Id: I68b1d042becaa6ebb4776fd2865dc0a29db7b87e
amera/libcameraservice/Camera2Client.cpp
6861a4e9f929c2cb4a3131244e01e676c5b28f55 07-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Add setParameters call

- Validate new parameters and transfer to internal parameters

- Add several utility functions to convert between CameraParameter
strings and camera2/internal parameter enums

Bug: 6243944
Change-Id: I323798dbfa028066f4963a6357766a781dde7cb6
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
349d79668ea4ca078400995c70d5d3201e8d9ea1 07-Jun-2012 Marco Nelissen <marcone@google.com> am d89dea16: am e35a55fb: Merge "Take latency and current time into account for visualization" into jb-dev

* commit 'd89dea161ff3c3da515c02928cad4a9c73b23312':
Take latency and current time into account for visualization
e35a55fbdff5a695ee35ff43f1466a62fb75662b 07-Jun-2012 Marco Nelissen <marcone@google.com> Merge "Take latency and current time into account for visualization" into jb-dev
ac45eb3dfa7347f7b8c98be1111b2a5f9e344c46 07-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Add basic concurrency guards.

- Serialize access through ICamera interface
- Serialize access to internal parameter structure

Bug: 6243944
Change-Id: I82c9811c1d059b2bca5cca7e3d73890120dbbe59
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
7f61084a428a5c7afbeff2fa9e9839baf9018020 07-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Add internal parameter state to dump.

Bug: 6243944
Change-Id: Id02943001ef92a9c5717b295eb4af1a18669b08b
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
3cca136b73b0f4d058019230eb2070cc23e2bbb0 07-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use new param structure, improve static camera info queries

- Stop using CameraParameters for internal parameter storage, use a
straightforward structure instead.

- Improve querying for camera static characteristics for creating
defaults for API-facing CameraParameters.

Bug: 6243944

Change-Id: I965cdca7b242ef10ac1be931ebe7c186f997bb63
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
6685cf4fdfe4b9bdfd8e87c04165c08a436abcf7 07-Jun-2012 Eric Laurent <elaurent@google.com> am 6a070e79: am 9a0d82df: audioflinger: modify fast mixer overrun management

* commit '6a070e7941d3a521680116bfa2d0c99cd90c7502':
audioflinger: modify fast mixer overrun management
f06c2ed50e1db871ae9eb2bd15a196064f8c278c 06-Jun-2012 Marco Nelissen <marcone@google.com> Take latency and current time into account for visualization

Buffer more data, and return the data that is currently being
output from the audio output, to ensure that visualizations are
smooth and responsive even when the audio output has a large
latency and/or large buffers.
b/6522728

Change-Id: I401637f01be7600b3c594a55c869036c13b206c0
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
9a0d82df8fd681257bc5b29fb5e6c65fcc7cef5a 06-Jun-2012 Eric Laurent <elaurent@google.com> audioflinger: modify fast mixer overrun management

Do not force sleep when an overrun occurs. This was for non
blocking audio HAL and is unused.
Keep statistics on overruns.

Bug 6605215.

Change-Id: I295455d4562201aa3814c88bdd6e52c9226712af
udioflinger/FastMixer.cpp
a88ed026402d92d699c336aa11267616007e4a9d 05-Jun-2012 Eric Laurent <elaurent@google.com> am 717f9b73: am 67c0a58e: audioflinger: various fixes on direct output

* commit '717f9b7392b0fc3ba15b018c923b85e64c0662b5':
audioflinger: various fixes on direct output
67c0a58e05f4c19d4a6f01fe6f06267d57b49305 02-May-2012 Eric Laurent <elaurent@google.com> audioflinger: various fixes on direct output

Various fixes in direct output playback thread implementation:
- threadLoop_write() was broken for playback threads that do not
use a pipe sink.
- output buffer size calculation was hard coded for stereo.
- removed software volume that was implemented for PCM stereo
format only: the audio HAL has to implement volume if needed
for direct outputs.

Change-Id: If211b4489be9af395435707b8cf0388cce1347b2
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioPolicyService.cpp
b86f92d552c391f5d2471bd4f979135be2578578 05-Jun-2012 Eric Laurent <elaurent@google.com> am e506084e: am ab9071b8: audioflinger: fix active sleep time calculation.

* commit 'e506084e1c22f8f1797b9dc3eb789a699efd45c3':
audioflinger: fix active sleep time calculation.
ab9071b8d1b375418eb797c9a790da71de644344 04-Jun-2012 Eric Laurent <elaurent@google.com> audioflinger: fix active sleep time calculation.

When an audioTrack underruns, the audioflinger mixer thread
sleeps for a certain time to give the app a chance to recover.
This time is based on the reported audio HAL latency.
Some audio HALs implementing deep buffering have a variable
latency and this creates a problem if the sleep time is cached
when the output stream is opened and not updated afterwards.

This change derives the active sleep time from the mix buffer
framecount instead of the latency. This is more conservative
but works for variable latency.

Bug 6588525.

Change-Id: Ia892fc290fe06f836565c3ae15f7a2ce026c88c6
udioflinger/AudioFlinger.cpp
24a2fd0113da60785ce5af5dd905f8aaf9e0f0a1 04-Jun-2012 Glenn Kasten <gkasten@google.com> am f335f182: am 39993085: State queue dump

* commit 'f335f182e4b50249ac34b41da3566ddb016cc816':
State queue dump
5385b7b0f5d922ee38f8a54f11ee4462ef4b5e29 04-Jun-2012 Glenn Kasten <gkasten@google.com> am 2c00676c: am 1295bb4d: Fast track dumpsys

* commit '2c00676cd34d78460ad610a4a4fd7a68544a7b7d':
Fast track dumpsys
399930859a75d806ce0ef124ac22025ae4ef0549 31-May-2012 Glenn Kasten <gkasten@google.com> State queue dump

Bug: 6591648
Change-Id: Iac75e5ea64e86640b3d890c46a636641b9733c6d
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/StateQueue.cpp
udioflinger/StateQueue.h
510ba8b812d88f62968a2c9b0b638fff6d99ee84 03-Jun-2012 Glenn Kasten <gkasten@google.com> am f45dc2f1: am bf0d21fb: Count underruns for normal tracks also

* commit 'f45dc2f1751d9ac19826b99fab0b226f5c84570a':
Count underruns for normal tracks also
1295bb4dcff7b29c75cd23746816df12a871d72c 31-May-2012 Glenn Kasten <gkasten@google.com> Fast track dumpsys

Bug: 6591648
Change-Id: I696f51c682e7233ba690d97da26012084989b412
udioflinger/AudioFlinger.cpp
udioflinger/FastMixer.cpp
udioflinger/FastMixer.h
ad2c249a660f8ff81597dab00aaba1118b4a4342 03-Jun-2012 Glenn Kasten <gkasten@google.com> am 33350528: am 81787e56: Merge "Was calculating measured warmup time wrong" into jb-dev

* commit '333505280fd86cf91bd97096bfa5a3fb524d84c1':
Was calculating measured warmup time wrong
bf0d21fb1310e8677caa53b90e8c3aecebc7fc13 31-May-2012 Glenn Kasten <gkasten@google.com> Count underruns for normal tracks also

Bug: 6591648
Change-Id: Iff9cabe392bb2ce97062603adb9c9dc7aa4170d5
udioflinger/AudioFlinger.cpp
81787e56f8f21407eade5accc50c6da39b8af9b2 03-Jun-2012 Glenn Kasten <gkasten@google.com> Merge "Was calculating measured warmup time wrong" into jb-dev
35d7bfc359b3aa87ade92d1ab55c6992418cad48 01-Jun-2012 Glenn Kasten <gkasten@google.com> am 92e5ee95: am 7dc5b165: Merge "Fix fast track leak if out of normal track names" into jb-dev

* commit '92e5ee9548542513791a70c81e0cd3fd70397269':
Fix fast track leak if out of normal track names
68edcad7d1619a648e0988ac40cc23e61200c2a2 01-Jun-2012 Glenn Kasten <gkasten@google.com> am a0991fea: am 0c22272f: Merge "Pipe throttle based on requested frame count" into jb-dev

* commit 'a0991fea7b7047206ba8da573952d0c19d1bc4e7':
Pipe throttle based on requested frame count
7dc5b165d4f98a2059eaf1c7fec20b3b5773cd4c 01-Jun-2012 Glenn Kasten <gkasten@google.com> Merge "Fix fast track leak if out of normal track names" into jb-dev
0c22272f1c97fd4b7e106030a1fd5e6b50680b61 01-Jun-2012 Glenn Kasten <gkasten@google.com> Merge "Pipe throttle based on requested frame count" into jb-dev
04a4ca4217e9b30342d5865024c340013d7184e8 01-Jun-2012 Glenn Kasten <gkasten@google.com> Was calculating measured warmup time wrong

Bug: 6592923
Change-Id: I980c6fc69d78c569147ea44ce33a7f8a41739c91
udioflinger/FastMixer.cpp
a189097d0c96fac9afa86e644312ffbb0027b124 31-May-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Switch to using ATRACE

Bug: 6243944
Change-Id: Ib2aa1875c72b20ae764d9de95b4122b736738df2
amera/libcameraservice/Camera2Client.cpp
893a05479c96f911d02beb0443da3ed6508143a7 30-May-2012 Glenn Kasten <gkasten@google.com> Fix fast track leak if out of normal track names

Bug: 6580402
Change-Id: I3ac7f012062c35833147f47ba822eb4bf532a824
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
6db981c45a964f0d9df4c3451f064dff7954d78e 22-May-2012 Eino-Ville Talvala <etalvala@google.com> Camera service: Minimally functional preview for camera 2 devices.

- Camera app starts up
- Basic preview operation with defaults
- Shutdown sequence is very minimal

Bug: 6243944

Change-Id: I67673b7c1fc08956d218d99f9171e74a7a82bf07
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
611f61998863d3a3ffae4e5f2b723b7319c59ddf 31-May-2012 Eino-Ville Talvala <etalvala@google.com> Add basic Camera2Client dump, minor fixes to CameraService dump.

Bug: 6243944
Change-Id: I52caaa6146050c38976768e99b0eeea1d13a3f51
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/CameraService.cpp
820ba70df8ba595ae9055dfd34fdbfa32f70f14d 31-May-2012 Glenn Kasten <gkasten@google.com> Pipe throttle based on requested frame count

Now does throttling based on the requested frame count, but
still permits overfilling pipe up to the rounded-up frame count.
Also still uses the larger frame count for non-blocking arithmetic.

Bug: 6585323
Change-Id: Ic2420a071419905524a14c22ebe1ce0e32d70a9d
udioflinger/MonoPipe.cpp
udioflinger/MonoPipe.h
529e888738a91ca70cbdeeabd982f8fb2947780c 30-May-2012 Eric Laurent <elaurent@google.com> am 8c07f759: am 3bdb4fbf: Merge "audioflinger: fix effect problem during underrun" into jb-dev

* commit '8c07f7599a757fe51dc54253c480067cf01f13d3':
audioflinger: fix effect problem during underrun
3bdb4fbfc6730b6edc0b1ee980141574ed54ed8d 30-May-2012 Eric Laurent <elaurent@google.com> Merge "audioflinger: fix effect problem during underrun" into jb-dev
91b14c4c144d0cc957a427cffc02ba10d0615677 30-May-2012 Eric Laurent <elaurent@google.com> audioflinger: fix effect problem during underrun

When an audio track underruns, the input buffer of the
corresponding effect chain (if any) must be cleared, otherwise
audio from previous mixer run will be fed again to the effect process
function.

Bug 6551652.

Change-Id: I5cd02196745f756c85af82d6937e9dc54369b37f
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
f69c70ded4316ea3ee504ac779bd024433ed4ef7 21-May-2012 Eino-Ville Talvala <etalvala@google.com> Camera service: Initialization for camera2 clients and devices

- Refactor initialization code to hide device type from CameraService
- Add metadata queue class to Camera2Device
- Initialization of Camera2Device, Camera2Client
- Conversion from HAL2 device static metadata to camera API
parameters.

Bug: 6243944
Change-Id: I524145b45438e906d8493dae202704ce8f090aeb
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
amera/libcameraservice/CameraClient.cpp
amera/libcameraservice/CameraClient.h
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
09cf462a265c3e9bc84c518cc75d77a5b1d69012 29-May-2012 Eino-Ville Talvala <etalvala@google.com> DO NOT MERGE: Minimal fix for takePicture/previewCallback deadlock

- Caused by already held lock in camera service

- Introduce one more lock, mICameraLock, to control access to camera
client through ICamera binder interface.

- mLock is released before calling HAL takePicture, allowing HAL
callbacks to access camera client during takePicture processing.

Bug: 5804701
Change-Id: Ibcef4857a2c844c964afefa70f9cdccdd0a55fd0
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
6d80297a55ab12759ee00b7f99fa97584b430da0 24-May-2012 Eric Laurent <elaurent@google.com> am 0cc62570: am f436fdcf: audioflinger: change session check in createTrack.

* commit '0cc6257030d3e6c649ea3ad807ecb9327ceb5b3e':
audioflinger: change session check in createTrack.
f436fdcf93bd417fd3c9d2a8b19fd221d894b5e3 24-May-2012 Eric Laurent <elaurent@google.com> audioflinger: change session check in createTrack.

Do not refuse to create a track on an output thread if the same session
is present on another thread. It is now possible that two tracks
with the same session ID are on different threads if one can use deep
buffering and the other can't.

In this case, move effects attached to this session to the output
thread ion which the new track is created.

Bug 6530324.

Change-Id: I9019b3ee382e374c89d2319033afcfa7f886e4c4
udioflinger/AudioFlinger.cpp
852fca99e25db8d2180c2622ca55fca676490a08 24-May-2012 Glenn Kasten <gkasten@google.com> Remove log spam for fast track denied

Bug: 6531054
Change-Id: Iedf58e810a157aae88b5900da27c81054c437058
udioflinger/AudioFlinger.cpp
90886550eaf41e2255c99065667ac40b812b1c1b 23-May-2012 Eric Laurent <elaurent@google.com> am cf0bf78c: am e737cda6: audioflinger: refine latency latency calculation.

* commit 'cf0bf78c28cf25c30c42c784c1dc5bc094e6035d':
audioflinger: refine latency latency calculation.
e737cda649acbfa43fc1b74612a83f2fac9aa449 23-May-2012 Eric Laurent <elaurent@google.com> audioflinger: refine latency latency calculation.

There is an audio pipe between the normal mixer output and the fast
mixer to cope for scheduling delays and buffer size difference.
This pipe depth was not taken into account in latency calculation.

Adding the pipe contribution to the latency significantly improves A/V sync.

Bug 6520569.

Change-Id: I5584908e8aa8a02170eb38b22b4370eea800a235
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/MonoPipe.h
ea1151ac33f9327a44a6c7b80c1c15586c0f380c 22-May-2012 Glenn Kasten <gkasten@google.com> am 25a25ebd: am 67e54402: Merge "Keep a copy of most recent audio played" into jb-dev

* commit '25a25ebdd1cca5fa42ef20d4d55c3e49da294380':
Keep a copy of most recent audio played
2c19f57f03a6fda28d763c8c65ac5740977e33ec 21-May-2012 Glenn Kasten <gkasten@google.com> am 11a4b98d: am 7c2af29e: Merge "Add throttle to have pipe fill at more stable rate" into jb-dev

* commit '11a4b98d26dbce03ed2e97f4b1121995a09ed519':
Add throttle to have pipe fill at more stable rate
0dedfa41684a88440b71a81fa1f5b4215eb5c75e 21-May-2012 Glenn Kasten <gkasten@google.com> am 4e11a1ff: am 874a897f: Merge "systrace for audio" into jb-dev

* commit '4e11a1ffa708965cf91ea210daa5675a82149213':
systrace for audio
aaf249522ab16636afe23c65e829e1ee31ff03c3 21-May-2012 Glenn Kasten <gkasten@google.com> am 2123ae8c: am 55247760: Merge "Display pipe underrun counters in dumpsys" into jb-dev

* commit '2123ae8c171250950e5e4c51ec5afe6e61760e38':
Display pipe underrun counters in dumpsys
aa014234be3c99f8de5ade596f54d674f7cf509e 21-May-2012 Glenn Kasten <gkasten@google.com> am 06d9729b: am c059bd42: Skip bad kHz values, and display them accurately

* commit '06d9729b00e9157440ea485faf2ea38e6d2eb23f':
Skip bad kHz values, and display them accurately
fbae5dae5187aca9d974cbe15ec818e9c6f56705 21-May-2012 Glenn Kasten <gkasten@google.com> Keep a copy of most recent audio played

Change-Id: I6b2f97881c39998a2fae9ab79d669af6c0a37e94
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/FastMixer.cpp
udioflinger/FastMixerState.cpp
udioflinger/FastMixerState.h
udioflinger/PipeReader.cpp
6d8aabe8a3be1ac0789d00b82c3ca8b81381f5ab 18-May-2012 Glenn Kasten <gkasten@google.com> Add throttle to have pipe fill at more stable rate

Change-Id: Ibff9ab62764e2acd04518a4a00e25f19e28aff4a
udioflinger/MonoPipe.cpp
udioflinger/MonoPipe.h
61ab9f93315ea817cd1ac110e2a95da4dab6b4d1 17-May-2012 Eino-Ville Talvala <etalvala@google.com> Camera service: Add skeleton support for camera2 devices.

- Add Camera2Client, which maps the current android.hardware.Camera
API to the new camera2 semantics
- Add Camera2Device, a C++ wrapper for the HAL camera 2 device

No functionality besides create/destroy; all client methods return
error or null.

Bug: 6243944
Change-Id: I6bd5136fa1efd8279b8cd2d9847d9b0bb2862294
amera/libcameraservice/Android.mk
amera/libcameraservice/Camera2Client.cpp
amera/libcameraservice/Camera2Client.h
amera/libcameraservice/Camera2Device.cpp
amera/libcameraservice/Camera2Device.h
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
99c99d00beb43b939dedc9ffb07adb89f6a85ba5 15-May-2012 Glenn Kasten <gkasten@google.com> systrace for audio

Trace fast track buffer fill status for underruns etc.

Move the definition of macro to Android.mk.

No overhead if disabled.

Change-Id: If0e83e21b61b059ca38f543f8a6ffb58e08c79ee
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/FastMixer.cpp
552477608b137fb66af126655c6865207a82d888 18-May-2012 Glenn Kasten <gkasten@google.com> Merge "Display pipe underrun counters in dumpsys" into jb-dev
88cbea8a918bbaf5e06e48aadd5af5e81d58d232 15-May-2012 Glenn Kasten <gkasten@google.com> Display pipe underrun counters in dumpsys

The normal mixer writes it's submix to a pipe, which is read by the fast
mixer. Now dumpsys media.audio_flinger display the raw underrun counters
when fast mixer tries to pull from the pipe but doesn't get enough frames.

Change-Id: I72505f149f9e12802784da654a651d43734e1c79
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
c059bd4246c1b3944965be921e5b334d51cd236c 15-May-2012 Glenn Kasten <gkasten@google.com> Skip bad kHz values, and display them accurately

One device reports zero CPU kHz occasionally, so skip those values.

Preserve accuracy of the low-order 4 bits of the the CPU frequency.

Change-Id: I7d934f697412277462464fca82d112d0306a214e
udioflinger/FastMixer.cpp
44631c2939369e66df7021b1f359ded319971d26 17-May-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Break out CameraClient from CameraService."
5e08d60617fc63c2e41f9069ff89f5c00db2617d 16-May-2012 Eino-Ville Talvala <etalvala@google.com> Break out CameraClient from CameraService.

To allow for different low-level implementations of the current camera
API, the Client class inside CameraService has to be inheritable. This
change breaks it up into the common section accessed by the camera
service, and the full implementation for camera device HAL version 1.

The full implementation is moved out to CameraClient.h/.cpp.

There are no functionality changes, just code reorganization.

Bug: 6243944
Change-Id: I8a79b31a3ae3617198dc6bb5576a9f2e2d9c95de
amera/libcameraservice/Android.mk
amera/libcameraservice/CameraClient.cpp
amera/libcameraservice/CameraClient.h
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
ba3c33da6a8ecda13e584c617f3ae9a06a27fbaf 17-May-2012 Eino-Ville Talvala <etalvala@google.com> Remove old fake camera.

The fake camera implementation was moved to the emulator a while back.
No reason to keep around this old broken code that's not used
anywhere.

Change-Id: I5dd87f766821d6e85c5eefb7122047d4ec4a3225
amera/libcameraservice/CameraHardwareStub.cpp
amera/libcameraservice/CameraHardwareStub.h
amera/libcameraservice/CannedJpeg.h
amera/libcameraservice/FakeCamera.cpp
amera/libcameraservice/FakeCamera.h
9017e5e0ebad9664bb7b6f2057e5bb29c852c64f 15-May-2012 Glenn Kasten <gkasten@google.com> Increase normal mixer's pipe to fast mixer

Change-Id: I330925c7d07b6adb30b773bda3657e4efef9ae9b
udioflinger/AudioFlinger.cpp
44a957f06400a338e7af20b3d16c4c4ae22a673c 16-May-2012 Eric Laurent <elaurent@google.com> Fix static track activity ref counting

When a static AudioTrack underruns, it means that playback is over.
As apps do not necessarily stop playback explicitly, AudioFlinger
should call stopOutput() to decrease activity ref count in
audio policy manager.

Bug 6486311.

Change-Id: I1ea722c443780329ded6310c958b24726e918d16
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
4adcede0dc54a85c31abaf139921aebd7a072d8e 14-May-2012 Glenn Kasten <gkasten@google.com> Reduce video frame drop rate

The video playback engine depends on having relatively precise audio
progress updates for its A/V sync and frame drop calculations. For small
audio HAL buffer sizes, this was not a problem, but when the HAL buffer
size was > 12 ms, the normal mix buffer size became > 24 ms and this
then caused video problems. The new formula tries to keep the normal
mix buffer size within a closer tolerance of 20 ms to 24 ms.

Also use consistent term: multiplier instead of multiple.

Bug: 6479613
Change-Id: I903bad74461908e8c8f0a61e99ab5e24d5c44433
udioflinger/AudioFlinger.cpp
09474df67278c0cd621b57c4aef1deaec4d8447f 10-May-2012 Glenn Kasten <gkasten@google.com> Improve underrun handling for fast tracks

Maintain more accurate accounting of type of underrun.
Automatically remove track from active list after a series of "empty" underruns.

Change-Id: If042bf80e1790dcaaf195c99dc9c0ed9b55382c1
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/FastMixer.cpp
udioflinger/FastMixer.h
d08f48c2ad2941d62b313007955c7145075d562c 02-May-2012 Glenn Kasten <gkasten@google.com> Fix stopping process for fast tracks

Previously, the state of a fast track "wiggled" back and forth at the end.

Now it goes through these transitions:
active -> stopping_1 -> stopping_2 -> stopped

This CL is only for fast tracks, and does not change how
normal tracks work.

Change-Id: Icc414f2b48c46dda63cfa6373ca22d033dd21cd4
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
808e7d16504cbe5b28bb88c31afb2542ab488965 12-May-2012 Eric Laurent <elaurent@google.com> AudioFlinger: fix global effects suspend logic

Audio effects on the output mix should not be suspended when effects
on the output stage (post processing) are enabled.

Change-Id: I2e1c08fa9358ea3cbaec68856738d504b1be54e4
udioflinger/AudioFlinger.cpp
e58ccce45598bcf4b4874b0e87cd1eb8d05ba9a9 12-May-2012 Glenn Kasten <gkasten@google.com> Fix 2 bugs in fast mixer statistics

Was losing the upper half of the bounds, and MHz was off.

Change-Id: I61c98027b35ce7c3578ea6f3acf05aa5c48a5831
udioflinger/FastMixer.cpp
d8e6fd35ec2b59ee7d873daf1f1d9d348221c7bc 07-May-2012 Glenn Kasten <gkasten@google.com> Use audio tag for system tracing

Disabled by default; uncomment ATRACE_TAG to enable

Change-Id: I99af894022a859ee5644bd853cfd8a48e4735ff9
udioflinger/AudioFlinger.cpp
udioflinger/FastMixer.cpp
42d45cfd0c3d62357a6549c62f535e4d4fe08d91 02-May-2012 Glenn Kasten <gkasten@google.com> Update fast mixer statistics

Compute statistics on fast mixer elapsed time and CPU load per cycle using a
simple moving average rather than by fixed blocks. This has a couple advantages:
- remove burstiness of CPU usage due to former floating-point calculations in fast mixer
- gives us flexibility in how to report (e.g. could report over just the last 1 second)

Disadvantage is increased RAM, and since the samples are not updated
atomically, it is possible to have an error in the statistics. This
should not be much of an issue due to the relatively large number of samples.

Also add CPU raw ns and adjusted MHz statistics.

Change-Id: Iaa2cd13f18250c3162aff40409b3694b769d9505
udioflinger/FastMixer.cpp
udioflinger/FastMixer.h
e213c86d36414a8fc75e37c52999522fe09c7328 25-Apr-2012 Glenn Kasten <gkasten@google.com> dumpsys fCnt and flags

Previously displayed TrackBase::mFrameCount but not control block frameCount.
Now displays both.

Also display the track flags in control block.

Change-Id: Ie53781d4784633d78b6f928d69ebd494d8f110ec
udioflinger/AudioFlinger.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
udioflinger/AudioFlinger.cpp
810280460da5000785662f6c5b0c7ff3ee0a4cb3 01-May-2012 Glenn Kasten <gkasten@google.com> Temporary fix for both normal tracks & fast tracks

If there is at least one active fast track, it forces a mixer
status of ready, which messes up the logic for normal track underruns.

Change-Id: I9de2fcaef090e2c2f99682333af3d3dd618b0d6b
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
288ed2103d96f3aabd7e6bea3c080ab6db164049 26-Apr-2012 Glenn Kasten <gkasten@google.com> Fix race condition for non-started fast tracks

This required re-implementing how fast tracks are considered active.
Now, they use the same logic as normal tracks, except underrun is ignored.

Other changes:
- add framesReady() to AudioBufferProvider interface
- rebased
- add track underrun counter state to fast mixer dump state
- move dumpsys header to Track::appendDumpHeader()
so it closer to where tracks are dumped
- display track state in dumpsys as a character code
- measure and display warmup time and cycles in dumpsys
- copy in the presentation complete code
- add ExtendedAudioBufferProvider for framesReady() which returns size_t
- simplify underrun tracking
- deferred reset track after stop()
- add comments

Change-Id: I7db8821bc565230ec76da1f9380fe3fb09735e5b
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/ExtendedAudioBufferProvider.h
udioflinger/FastMixer.cpp
udioflinger/FastMixer.h
udioflinger/FastMixerState.h
udioflinger/SourceAudioBufferProvider.cpp
udioflinger/SourceAudioBufferProvider.h
83faee053cfd4251dbb591b62039f563ffdac399 28-Apr-2012 Eric Laurent <elaurent@google.com> AudioFlinger: fix stop detection for static tracks

The end of playback and end of presentation detection was broken for
static AudioTracks (tracks using shared memory buffers passed by client).

The mixer should not wait for a minimal amount of frames to be available to mix
a static track otherwise the last frames might never be consumed.

A static track should be removed from active list in case of underrun even if not
stopped().

Issue 6411521.

Change-Id: I66a2c1a77e98149e5049a223a6f04c3b8c5ad11a
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
300a2ee9327c05fbf9d3a5fd595b558097c7c5e8 25-Apr-2012 Glenn Kasten <gkasten@google.com> Fast mixer configuration

Add compile-time option for when to use fast mixer.

Double HAL frame count for fast tracks due to SRC, and make the normal
frame count multiplier an even number for compatibility. Sample rate
conversion can result in underruns if the HAL frame count is used as is,
due to jitter.

Change-Id: Ia1f8da1b8ac247d9807acfce3c318161db000905
udioflinger/AudioFlinger.cpp
da747447c1d4b5205469b4e94485b8769df57a97 26-Apr-2012 Eric Laurent <elaurent@google.com> AudioFlinger: fix tracks ready for mixing logic.

Commit fec279f5 broke the logic allowing to wait for an application
to provide frames for mixing in the case of several active tracks.

This was causing audio gaps when playing music and superposing a
sound Fx (keyboard clicks...).

Issue 6185007.

Change-Id: Id0fad150d0b615646d6b1387c0de8ca944d228f6
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
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
udioflinger/AudioFlinger.cpp
1dc28b794587be22c90a97070d928f94586db638 24-Apr-2012 Glenn Kasten <gkasten@google.com> Use scheduling policy service

Change-Id: I3c09da1dc0de5039d0c15ce7fb2bc373fa398712
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/ISchedulingPolicyService.cpp
udioflinger/ISchedulingPolicyService.h
udioflinger/SchedulingPolicyService.cpp
udioflinger/SchedulingPolicyService.h
58912562617941964939a4182cda71eaeb153d4b 03-Apr-2012 Glenn Kasten <gkasten@google.com> AudioFlinger normal mixer uses FastMixer

Change-Id: I3131bb22d2d057e9197a2ebfa6aa1cfaab9e5321
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/Soaker.h
3acbd053c842e76e1a40fc8a0bf62de87eebf00f 28-Feb-2012 Glenn Kasten <gkasten@google.com> Configure policy of mediaserver threads

Change-Id: Ifd825590ba36996064a458f64453a94b84722cb0
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
c95cfbb87d0ac5e773037019a96bfc29972d4b4e 12-Apr-2012 John Grossman <johngro@google.com> TimedAudioTrack: Optimize the queue trim operation.

Hand merge from ics-aah

> TimedAudioTrack: Optimize the queue trim operation.
>
> Don't perform the end PTS calculation for each buffer during trimming.
> Instead, only calculate the ending PTS of a buffer if there is no next
> buffer in the queue. This optimization assumes that the buffers being
> queued are in monotonic media time order (a fair assumption for now)
> and that the timestamps in the audio are contiguous (not a requirement
> for this API, but a reality of how it is being used right now).
>
> In the case where the audio is discontinuous on purpose, it is
> that this optimization will cause the system hold one extra buffer
> which it could have safely trimmed. It should not be much of an issue
> since in real life the audio is almost always contiguous, and as long
> as the media clock is running and the mixer is mixing, the buffer will
> be used up and discard as part of the normal flow anyway.
>
> Change-Id: I00061e85ee7d5651fcf80751646c7d7415894a14
> Signed-off-by: John Grossman <johngro@google.com>

Change-Id: I0054b58e1389fa005aa990cb5710caf4af7b706a
Signed-off-by: John Grossman <johngro@google.com>
udioflinger/AudioFlinger.cpp
8d314b709fdd81bb64bdaa8d72a0b19c355cefb9 19-Apr-2012 John Grossman <johngro@google.com> TimedAudioTrack: Fix continuity threshold handling.

Hand merge from ics-aah

> TimedAudioTrack: Fix continuity threshold handling.
>
> Fix issues with continuity threshold handling; notably
> + If the steady-state continuity threshold is exceeded, be sure to
> clear the on-time flag. Failure to do this will result in the
> system picking a new mix point which simply satisfies the
> steady-state continuity threshold instead of the startup threshold.
> Since we are putting a discontinuity in presentation anyway, we
> really want to pick a perfect point, not just an OK point.
> + Tighten the steady-state continuity threshold. It was currently set
> to 100mSec which is enormous. 4mSec (the new setting) is much more
> appropriate. On systems with a VCXO (like tungsten) this should
> never be wrong by more than a sample. If TimedAudioTracks are ever
> to be used on VCXO-less systems, this threshold should probably be a
> a parameter configurable by applications on a track by track basis
> so they can make the tradeoff between allowed error and frequency of
> disruptive corrections.
> + Reset the on-time flag if the mixer provides no PTS during a mix
> operation. This makes for a convenient way for the HAL to reset
> timed tracks when it makes changes for delay compensation across
> multiple outputs.
>
> Change-Id: I2cb23de5a3d1f75618abc1c8ab903db883837aa8
> Signed-off-by: John Grossman <johngro@google.com>

Change-Id: Ibd28c9d290494b0b19eb01caf2d9bfdef606a9b4
Signed-off-by: John Grossman <johngro@google.com>
udioflinger/AudioFlinger.cpp
21e8c50bd13ebe44f3088e26c9c6df0e163c469c 12-Apr-2012 Glenn Kasten <gkasten@google.com> FastMixer update

Updates:
- Add support for mono fast tracks
- Add support for optional sample rate conversion on fast tracks
- Log sample rate and frame count
- Enable statistics

Change-Id: Ife014edf4f452da361f3eaaae19209ef6ff6958b
udioflinger/Android.mk
udioflinger/FastMixer.cpp
udioflinger/FastMixer.h
udioflinger/FastMixerState.cpp
udioflinger/FastMixerState.h
08ad5efcef90e24db2863c0f85972ed05fe848a2 18-Apr-2012 Wu-cheng Li <wuchengli@google.com> Remove new camera connect API.

Applications are not resumed under the lock screen now.
This API is not needed anymore.

bug:5584464
Change-Id: I115daf6b647348617ec0fc05b626878c945b9b29
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
9bd23229fdec1657398abc682ccccfce1c95f8aa 16-Apr-2012 Jean-Michel Trivi <jmtrivi@google.com> Fix multichannel downmix pause bug on video player

Pausing a video player will cause the track audio mixer to be
disabled, which causes the downmixer to be deleted. When reenabled,
the track channel mask hasn't changed but the downmixer is there
anymore.
Fixed by:
- instanciating a downmixer when the AudioMixer track
gets initialized (in getTrackName(), now taking a channel mask
as input), and deleted when in deleteTrackName().
- when the channel changes on a track, check whether it
needs a downmixer or not. Preparing a track for downmix
automatically removes the old downmixer if there was one.

Also: initialize the track downmixerBufferProvider field
when AudioMixer is instanciated, so we can safely call
delete on it in AudioMixer's destructor, in case
deleteTrackName() wasn't called before the mixer was
destroyed.

Change-Id: I589b0781cda5b3c82f85b561c52b08546cac21f8
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/FastMixer.cpp
0ca3cf94c0dfc173ad7886ae162c4b67067539f6 18-Apr-2012 Eric Laurent <elaurent@google.com> rename audio policy output flags

Change-Id: I27c46bd1d1b2b5f96b87af7d05b951fef18a1312
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
acb86cccbd9d245439a04cef0bcefa589addaa4c 16-Apr-2012 Jean-Michel Trivi <jmtrivi@google.com> Configure the resampler with the correct channel count when downmixing

When a track needs to be downmixed and resampled, it gets downmixed
first before being resampled. Therefore the resampler needs to
be configured with the channel count of the output of the downmixer
instead of that of the track.
Removed frame size checks that don't apply anymore now that we support
frame sizes that are not powers of 2 (e.g. 12 for 5.1 16bits), and
changed test performed for every buffer during playback into an
assert.

Change-Id: Ia220f00ee382f4f7848b661c58555bdca664e194
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.cpp
97b5d0d5b5ef766eb5dd680d05a5d199662d4ae0 24-Mar-2012 Glenn Kasten <gkasten@google.com> Fast mixer

Change-Id: I61552f83507e08e4c706076b9fb15362869e6265
udioflinger/Android.mk
udioflinger/FastMixer.cpp
udioflinger/FastMixer.h
udioflinger/FastMixerState.cpp
udioflinger/FastMixerState.h
udioflinger/StateQueueInstantiations.cpp
0845682ff93c9765b74b53dc404d0954efc28c2e 18-Apr-2012 Glenn Kasten <gkasten@google.com> Merge "Add template class StateQueue"
dc998c809e084b617990b281e2ed5271830cc2e0 24-Mar-2012 Glenn Kasten <gkasten@google.com> Add template class StateQueue

Change-Id: Iccc5eb42bc295a22b2e429a4551f083cd7b6831a
udioflinger/Android.mk
udioflinger/StateQueue.cpp
udioflinger/StateQueue.h
f7ffb8bf0a58037f0bc9662c5275005a4e539948 14-Apr-2012 Eric Laurent <elaurent@google.com> audioflinger: update to new audio HAL.

Updated audio flinger to new function prototypes
for open_output_stream() and open_input_stream().

Check audio hw device version when loading a module and
reject devices with a version different from current one.

Change-Id: I9d4c81a1f59a15db78b3989417c2a411c638fe88
udioflinger/AudioFlinger.cpp
4e2293f29f2e719af1245d365747ea06d074b345 12-Apr-2012 Glenn Kasten <gkasten@google.com> AudioMixer new cmd: remove sample rate converter

Add a new command REMOVE to remove any sample rate converter
on a track, without having to delete the track name.
Add comments.
Remove some dead code.
Fix whitespace and comparison to NULL.

Change-Id: Id55a23ab5ee673189e99675b4e6fa5df7b617987
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
a5e821439996de6005b2fa36b3bdd31f003ce23f 16-Apr-2012 Eric Laurent <elaurent@google.com> AudioMixer: fix crash in destructor

Commit deeb1282 made that track->resampler is only set to NULL when
getTrackName() is called. It remains uninitialized for all unused tracks
causing a crash when deleted by Audiomixer destructor.

Issue 6309441.

Change-Id: I49451387a6afe81299b8368ef206524df32f74c4
udioflinger/AudioMixer.cpp
b388e531613730572067e193b6b66afb5d042233 14-Apr-2012 Eric Laurent <elaurent@google.com> Fix ALOG_ASSERT in AudioFlinger

Fix broken ALOG_ASSERT in updateFramesPendingAfterTrim_l() introduced by
commit 1c345196.

Change-Id: Ie1b2653069283f23ff0367f2628828e37fb0749c
udioflinger/AudioFlinger.cpp
d3030da2ac3c0ebb8b7bdf38418263caf405b863 12-Apr-2012 John Grossman <johngro@google.com> Fix the build

forgot to upload final fixup during merge. sry about that

Change-Id: I2ddd2c08d8efa83c0a8d1e378ae4c28686145154
udioflinger/AudioFlinger.cpp
1c345196edc61694f29307a1826a64a0d26028dc 27-Mar-2012 John Grossman <johngro@google.com> TimedAudio: Track of the number of pending frames.

This is a manual merge from ics-aah

> TimedAudio: Track of the number of pending frames.
>
> Keep track of the number of frames pending in the timed audio queue so
> we can implement framesReady in O(1) time instead of O(N). This
> change partially addresses bug 6020970; the bug will be completely
> addressed once this change has been up-integrated into master.
>
> Change-Id: I599eb15ea1f6d715b97b30e65214fb6fadd169df
> Signed-off-by: John Grossman <johngro@google.com>

Change-Id: I6cbbbc3afc8efd066fe94865326ede0c6b3db2bd
Signed-off-by: John Grossman <johngro@google.com>
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
9fbdee13d09447550dd22ae72c2dbabdce7f0a80 27-Mar-2012 John Grossman <johngro@google.com> TimedAudio: Fix a cause of audio popping.

This is a manual merge from ics-aah

> TimedAudio: Fix a cause of audio popping.
>
> Fix an issue with buffer lifecycle management which could cause audio
> pops on timed outputs. There were two issues at work here.
>
> 1) During trim operations for the queued timed audio data, buffers
> were being trimmed based on their starting PTS instead of when the
> chunk of audio data actually ended. This means that if you have a
> very large chunk of audio data (larger than the mixer lead time),
> then a buffer at the head of the queue could be eligible to be
> trimmed before its data had been completely mixed into the output
> stream, even though the output stream was fully buffered and in no
> danger of underflow.
> 2) The implementation of getNextBuffer and releaseBuffer for timed
> audio tracks was not keeping anything like a reference to the data
> that it handed out to the mixer. The original architecture here
> seemed to be expecting a ring buffer design, but timed audio tracks
> use a packet based design. Pieces of packets are handed out to the
> mixer which then frequently will hold onto that chunk of data
> across two mix operations, using the first part of the chunk to
> finish a mix buffer and then using the end of the chunk for the
> start of the next mix buffer. If the buffer that the mixer is
> holding a piece of got trimmed before the start of the next mix
> operation, it would return to its heap and could be filled with who
> knows what by the time it actually got mixed. On debug builds,
> they seem to get zero'ed out as they go back to the heap causing
> obvious pops in presentation.
>
> This change addresses both issues. Trim operations are now based on
> ending presentation time for a chunk of audio, not the start. Also,
> when the head of the queue is in flight to the mixer, it can no longer
> be trimmed immediately, merely flagged for trim by the mixer when the
> mixer finally does call releaseBuffer.
>
> Signed-off-by: John Grossman <johngro@google.com>
> Change-Id: Ia1ba08cb9dea35a698723ab2d9bcbf804f1682fe

Change-Id: I2c5e2f0375c410f0de075886aac56ff6317b144c
Signed-off-by: John Grossman <johngro@google.com>
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
3f9c84c0a5af83fceb8669390e2d71b75ec7b550 04-Apr-2012 Eric Laurent <elaurent@google.com> audio pre processing: test code for dual mic

Added functional test code to validate effect API for
multi mic simplementations.

Also fixed warning in AudioFlinger.

Change-Id: I07be4d2e4d17791d3626c804ba3e9f87ff26d05a
udioflinger/AudioFlinger.cpp
7d5b26230a179cd7bcc01f6578cd80d8c15a92a5 05-Apr-2012 Jean-Michel Trivi <jmtrivi@google.com> AudioMixer uses downmix effect for multichannel content

In the AudioMixer structure associated with each track, add an object
that acts as the buffer provider when the track has more than two
channels of input in the mixer. This object, DownmixerBufferProvider,
gets audio from the actual buffer provider of the track, and applies
a downmix effect on it.
The downmix effect is created and configured when the track gets
created in AudioFlinger, which causes AudioMixer::getTrackName()
to be called with the new track's channel mask. It is released
when the track is disabled in the mixer.

Change-Id: I05281ed5f61bef663a8af7ca7d5ceac3517c82db
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
3f502bfc6d04d08369cf147284c5c4c2ac7c9a0e 06-Apr-2012 Glenn Kasten <gkasten@google.com> Merge "Non-blocking audio I/O interface, WIP"
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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioPolicyService.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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioPolicyService.cpp
73d227557ba5192735356bacab9f77b44980793b 19-Mar-2012 Glenn Kasten <gkasten@google.com> AudioFlinger track flags and server's fast policy

Change-Id: I72358c8e6829d173b3e60ced8a8babc089869fac
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
0bf65bdde04b8e66c998ff37e2b2afafddddfa33 29-Feb-2012 Glenn Kasten <gkasten@google.com> const methods and comments

Change-Id: Ifd16750174fdb15b72507787502b587562ffc99e
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
010662326b9c43c703725f933e95e0897f8a6bdd 27-Feb-2012 Glenn Kasten <gkasten@google.com> Non-blocking audio I/O interface, WIP

Yet another abstraction similar to AudioTrack::Buffer and AudioBufferProvider,
but with support for streaming, non-blocking, and eventually PTS.

This is intended to be used as follows:
- primary HAL output stream implements a Sink
- primary HAL input stream implements a Source
- Pipe implements a Sink
- PipeReader implements a Source or TimedSource (not shown yet),
which supports "read at PTS"
- fast AudioTrack on server side will implement a Source using cblk
- normal AudioTrack on server side will not be changed initially
- fast AudioRecord on server side will implement a Sink using cblk
- normal AudioRecord on server side will not be changed initially
- fast mixer thread will read from Sources and write to a Sink,
or (unlikely) implement a Source and multiple Sinks
- Visualization and PCM logger will read from Source or TimedSource
- A2DP normal mixer will be connected directly to its output stream
and there will be a kind of OutputTrack for duplication that will
read from a Sink with non-blocking write fed by the fast mixer.

Patch set 3 changes:
- Add more implementations of NBAIO interfaces:
added SourceAudioBufferProvider, MonoPipe, MonoPipeReader.
- Added Format_sampleRate and Format_channelCount.
- Extract out the roundUp() method.
- Respond to most comments from previous code review.
- The new classes are untested.

Patch set 4 changes:
- Fix bugs in MonoPipe::write() and MonoPipeReader::read()
- Fix bug initializing mFrameBitShift too early
- renamed roundUp() to roundup()
- Fix Android.mk
- Add LOG_TAG an LOG_NDEBUG, use ALOG_ASSERT and utils/Log.h instead of assert
- Fix build warnings
- Move constructor and destructor bodies from .h to .cpp
- Line length 100
- Following naming conventions for #include double-include protector macros
- Include what you use
- More NBAIO logging
- MonoPipe write can be blocking

Patch set 5 changes:
- Address code review comments
- Use a static library so unused implementations don't take memory
- Comment out libsndfile dependency
- Remove debugging LOGV and LOG_NDEBUG

Patch set 6 changes (would be 6 at old location, actually 2 at new location):
- Address code review comments on patchset 5
- For MonoPipe, allow the full pipe to be used, no need to omit one slot
- Don't do atomic releasing stores unless needed

Still to do:
- I'm not happy with the Pipe class names
- Update build/ for new static library?

Change-Id: Ie6c61f05ce06b676b033be448a8ef9025a2ffcfd
udioflinger/Android.mk
udioflinger/AudioBufferProviderSource.cpp
udioflinger/AudioBufferProviderSource.h
udioflinger/AudioStreamInSource.cpp
udioflinger/AudioStreamInSource.h
udioflinger/AudioStreamOutSink.cpp
udioflinger/AudioStreamOutSink.h
udioflinger/LibsndfileSink.cpp
udioflinger/LibsndfileSink.h
udioflinger/LibsndfileSource.cpp
udioflinger/LibsndfileSource.h
udioflinger/MonoPipe.cpp
udioflinger/MonoPipe.h
udioflinger/MonoPipeReader.cpp
udioflinger/MonoPipeReader.h
udioflinger/NBAIO.cpp
udioflinger/NBAIO.h
udioflinger/Pipe.cpp
udioflinger/Pipe.h
udioflinger/PipeReader.cpp
udioflinger/PipeReader.h
udioflinger/SourceAudioBufferProvider.cpp
udioflinger/SourceAudioBufferProvider.h
udioflinger/roundup.c
udioflinger/roundup.h
deeb1282621f3177ad667360b40eef8e4fedb298 25-Mar-2012 Glenn Kasten <gkasten@google.com> AudioMixer default track parameters

Move the default initialization of track parameters from the AudioMixer
constructor to getTrackName(). This fixes a bug where the defaults were
only valid the first time a name was allocated.

Also added a switch case for parameter FORMAT.

Change-Id: I07abd3aaf7f4efe9825a761d2bc662aaee2c6db0
udioflinger/AudioMixer.cpp
a1472d9883e35edd280201c8be3191695007dfd4 30-Mar-2012 Marco Nelissen <marcone@google.com> Make AudioTrack/AudioRecord handle more than 2^32 frames

b/6160363
Change-Id: I471815012c6a113ec2c4dd7676e8fa288a70bc76
udioflinger/AudioFlinger.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
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
d8973a71a3d1dd670e5dcdf6e94ec0cd45444eec 28-Mar-2012 Keun young Park <keunyoung@google.com> Fix deadlock in camera destruction after client app's crash

* why deadlock happened: when an app (CTS camera test) crashes while using
camera, its binder is closed and reference counter is decreased. If camera
is inside callback, sp<Client> inside callback will hold the Client instance,
and Client instance is destroyed when the callback ends as sp<Client> to hold
it no longer exists. The destructor of Client instance tries to clean up
camera H/W which tries to stop threads created by camera HAL including the
thread context where the callback is running. This causes deadlock where the
callback thread itself is waiting for itself to terminate.
Note that the deadlock will not happen if camera callback is not active. In
that case, closing of binder will force the destruction of Client instance,
and the destruction happens in binder thread.

* Fix: Forces Client descruction in binder thread
- remove sp<Client> from callbacks to prevent destruction in callback context
- add client lock to allow callback to use raw pointer safely. This prevents
the destructor from deleting the instance while callback is using it.
- add status change inside destructor with client lock to safely destroy Client

Bug: 6214383
Change-Id: Ic6d6396d4d95ce9e72a16ec2480ae65c100fe806
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
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
amera/tests/CameraServiceTest/Android.mk
b83d38feeeb88a8a2a6219e1fca2480b5a14fb0d 26-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "IAudioFlinger::createTrack and openRecord flags"
d12c68ad699ce0ed822a4d4db86e8e02324c6b03 23-Mar-2012 Glenn Kasten <gkasten@google.com> Revert "AudioFlinger does not need libmedia any more"

This reverts commit c920dee060ac69684be33210ee44b99a5fc3e8b2
udioflinger/Android.mk
4f5da11df06802856bf526f16563df7d5755f653 22-Mar-2012 Glenn Kasten <gkasten@google.com> AudioFlinger does not need libmedia any more

Change-Id: Ifd2c61882109ec36ca68072a2bf6506e08c8cf34
udioflinger/Android.mk
c5c49398584f2399af905a931e556ed6e0a29cd4 21-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "Clean up Track constructor"
ccf89b54f973f11082150d02ed957f7e967fbc8b 21-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "AudioMixer can be configured for fewer max tracks"
63c1faa8dea7feb90255d31ef2a133d8f2818844 21-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "Update comments"
7153494670bdac8b650cb10b8b1838651e0ca418 21-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "Whitespace"
a26ff6f22f4e86d09514c2819237bd9748455018 21-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "new doesn't fail on Android"
9a5f413a21b320fea0607e653bc75b1a4f0e7a2e 21-Mar-2012 Eric Laurent <elaurent@google.com> am a48285c4: am 165ee4c5: am 14958e21: Merge "audioflinger: fix issue with camcorder and A2DP" into ics-mr1

* commit 'a48285c4f22ffc43f1771ebd1ff35dcec48db2c7':
audioflinger: fix issue with camcorder and A2DP
5c94b6c7689a335e26a86e8a0d04b56dc627738e 21-Mar-2012 Glenn Kasten <gkasten@google.com> AudioMixer can be configured for fewer max tracks

Change-Id: I371b17cef071d083eecf35cd3627a3adff907a33
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
f99590187e2e3f1cf6f093063170edec269cac5d 19-Mar-2012 Glenn Kasten <gkasten@google.com> Clean up Track constructor

The 'thread' parameter can never be NULL.
Use constructor initialization list when possible.
Make more members const.
Only put the relevant code under "if (mCblk != NULL)".
Add comment about track name leak.

Change-Id: Ib963390a69bed1999638cc982a759edd1d5f4712
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
ea7939a079b3600cab955760839b021326f8cfc3 14-Mar-2012 Glenn Kasten <gkasten@google.com> Whitespace

Fix indentation, and add blank lines in key places for clarity

Change-Id: I57a0a8142394f83203161aa9b8aa9276abf3ed7c
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.cpp
2ee367e444e7b62e02bde8a2e47603a9ad342c6e 20-Mar-2012 Glenn Kasten <gkasten@google.com> Add libmedia_native

Change-Id: I3ac357c78fb89f108d15c6e5b9fa317de0e9fb9a
udioflinger/Android.mk
amera/libcameraservice/Android.mk
17a736c3e1d062d7fc916329eb32aef8935614af 14-Feb-2012 Glenn Kasten <gkasten@google.com> Update comments

Change-Id: I327663a020670d0a72ff57bd0b682e2ce0528650
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
a03567676e8766828ff970b87e13bc4c97b23473 19-Mar-2012 Glenn Kasten <gkasten@google.com> new doesn't fail on Android

Change-Id: I5079a3bf31097dd0807b2d806d5f8d3cff2077ab
udioflinger/AudioFlinger.cpp
a075db4ff9b086ac2885df77bb6da0869293df92 06-Mar-2012 Glenn Kasten <gkasten@google.com> IAudioFlinger::createTrack and openRecord flags

createTrack and openRecord don't need the "old" flags parameter,
which was either audio_policy_output_t or audio_in_acoustics_t
shifted left by 16 bits. But they do need "new" flags, which
are defined by the application use case. Initially, the only
application use case flag is timed output, but others are planned.

For output, the audio_policy_output_t flags are passed to
AudioSystem::getOutput, which returns an audio_io_handle_t, and that
handle is then passed to createTrack. So createTrack doesn't need the
old flags parameter.

For input, the audio_in_acoustics_t flags are passed to
AudioSystem::getInput, which returns an audio_io_handle_t, and that
handle is then passed to openRecord. So openRecord doesn't need the
old flags parameter.

Change-Id: I18a9870911846cca69d420c19fe6a9face2fe8c4
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
9d7b4c074205609271f61e1a4741ac0c524a1795 19-Mar-2012 Eric Laurent <elaurent@google.com> am 14958e21: Merge "audioflinger: fix issue with camcorder and A2DP" into ics-mr1

* commit '14958e21c12f922d7501d32c3bec05109eb342d5':
audioflinger: fix issue with camcorder and A2DP
89d94e79dad032fb18ddc655e6068e4231d3f0aa 17-Mar-2012 Eric Laurent <elaurent@google.com> audioflinger: fix issue with camcorder and A2DP

Some audio HALs do not support well a device selection of 0 (no device)
received on an input stream.

This can happen because of a problem in the audioflinger code that handles
the forwarding of the output device selection to the record thread for use by
the pre processing modules that need it. If the output device is 0 (meaning
no op, which happens when stopping playback over A2DP) audioflinger could not
detect it was an output device selection and would forward it to the input
stream (see AudioFlinger::setParameters() and RecordThread::checkForNewParameters_l().

Issue 6179641.

Change-Id: Idae534521866538e0d12ba259a2834f402a922e2
udioflinger/AudioFlinger.cpp
b12153e36ae5e514d96c77d660b327d1a8f5000f 16-Mar-2012 Glenn Kasten <gkasten@google.com> Add libmedia_native

Change-Id: Ib8cff8abd73723b793f08da99ad59549f219e0e7
udioflinger/Android.mk
amera/libcameraservice/Android.mk
49f306f863b14f8bfc3b405ebfd3a2fb2b403c15 16-Mar-2012 Wu-cheng Li <wuchengli@google.com> Merge "Add a new camera open API that allows taking the ownership."
2fd2440d0175ca3e196b01b7541a9e0d4ed9a694 24-Feb-2012 Wu-cheng Li <wuchengli@google.com> Add a new camera open API that allows taking the ownership.

The purpose is to let face unlock always get the camera
successfully. What happened was the camera applications may
have opened the camera in onResume under the lock screen.
This API lets face unlock take the camera from the camera
application. A new permission will be added, so other
applicatoins won't be able to take the camera from the face
unlock.

bug:5584464

Change-Id: Ib3d9dcbc2161815b68db42327dc01148453704c6
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
33b383948e8f270bff30378476f00dce289004eb 13-Mar-2012 Glenn Kasten <gkasten@google.com> Remove dependency on audio_* location

Change-Id: I4bc66115fcb9ba22b057bd72db3f561dcb18a0d8
udioflinger/Android.mk
dfaf549e3e310bc22444f4404b19f4907b24c286 15-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "AudioFlinger playback thread CPU measurement in Hz"
190a46f7c84e160386610c0c4cecb9767fb5503b 06-Mar-2012 Glenn Kasten <gkasten@google.com> AudioFlinger playback thread CPU measurement in Hz

Log statistics on CPU usage in Hz in addition to wall clock time

Use CPU statistics for all playback threads, not just MIXER
(but they are disabled by default by a compile-time debug macro).

ThreadCpuUsage library:
- Move statistics out of the library and leave that up to the caller
- Add API to determine a CPU's frequency

Change-Id: Ia1011123146e641fcf210ef26e78ae2b4d3b64ad
udioflinger/AudioFlinger.cpp
3b229ed97c0dfc85a8cf881341e29e595e0edea7 14-Mar-2012 Eric Laurent <elaurent@google.com> Merge "audioflinger: more info in dumpsys"
612bbb57c59397a540e96f06bdd16e437a583af5 14-Mar-2012 Eric Laurent <elaurent@google.com> audioflinger: more info in dumpsys

Added TID and io handle to AudioFlinger threads dump.

Change-Id: Ib1a856f3bad55c73e4c395b5e59d57435f4b9a4c
udioflinger/AudioFlinger.cpp
d3cee2f0f649c01e1153d593cbe723887b8e0ba0 14-Mar-2012 Glenn Kasten <gkasten@google.com> Break circular dependency on media player service

Bug: 6165157
Change-Id: I3c85bbcaf31f3cb9a009e273f7b6284015eb3bd8
udioflinger/AudioFlinger.cpp
e53b9ead781c36e96d6b6f012ddffc93a3d80f0d 13-Mar-2012 Glenn Kasten <gkasten@google.com> Whitespace and indentation

Fix indentation to be multiple of 4.
Make it easier to search:
sp< not sp < to
"switch (...)" instead of "switch(...)" (also "if" and "while")
Remove redundant blank line at start or EOF.
Remove whitespace at end of line.
Remove extra blank lines where they don't add value.

Use git diff -b or -w to verify.

Change-Id: I966b7ba852faa5474be6907fb212f5e267c2874e
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
udioflinger/AudioResampler.cpp
udioflinger/AudioResampler.h
udioflinger/AudioResamplerCubic.h
udioflinger/AudioResamplerSinc.cpp
fd83fbf5ead098070bae674b20e6f87f45ab5d4c 13-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "Clean up assertion checks"
aa4397f07c43bd83bc3100b749401dc3d15e7622 13-Mar-2012 Glenn Kasten <gkasten@google.com> Fix bug where mMixerStatus was set to IDLE

Change-Id: I55df1738fb7ba17ba6caeea6a17557526eac17a7
udioflinger/AudioFlinger.cpp
5798d4ebf236357a4b13246f40e52b90a34d09a4 08-Mar-2012 Glenn Kasten <gkasten@google.com> Clean up assertion checks

Use ALOG_ASSERT instead of assert.
Use compile-time asserts where appropriate.
Fix typo in an ALOGV.

Change-Id: I58f1c1ffc14319a022c88b5a88b8d0368660da8b
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.cpp
73f4bc33e0d458933460250a47c64aa868c05f97 09-Mar-2012 Glenn Kasten <gkasten@google.com> Inline applyVolume() into threadLoop_mix()

Also the declaration of applyVolume in PlaybackThread was dead.

Change-Id: I4b1a9848d07d3d7f340baea05b17f667c78df868
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
470aa50c36089fbe0427557f7cf4464dd26a1c52 12-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "Remove unnecessary friend declarations"
2d6ef93773465cd3e66146fac35050a472c589f7 12-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "Remove virtual from methods that don't need it"
66fcab972e9218d47c58a915f391b2f48a09903a 24-Feb-2012 Glenn Kasten <gkasten@google.com> Merge dup code at thread entry and param change

This CL is mostly just cleanup, but there are a couple of fixes marked
"FIX" below.

Merge the duplicate code that was at the beginning of threadLoop() and
after a parameter change. cacheParameters_l() is now called at entry to
threadLoop() and after any parameter change. It re-calculates all values
that are derived from parameters, and caches them in instance variables.

updateWaitTime_l():
- FIX activeSleepTime depends on mWaitTimeMs, which was initially set
to infinity. updateWaitTime_l() was not called at entry to
threadLoop(), so activeSleepTime was not set correctly before the
first parameter change.

- FIX reversed the order of calls after parameter change
for the same reason so that updateWaitTime_l() is called before
calculating values that are derived from wait time.

- marked it private since now it's only called from DuplicatingThread

Change-Id: If2607d2ed66c6893d910433e48208a93c41fb7e9
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
18868c5db2f90309c6d11e5837822135e4a0c0fa 07-Mar-2012 Glenn Kasten <gkasten@google.com> Use audio_policy_output_flags_t consistently

This affects:
- IAudioFlinger::openOutput
- AudioTrack::AudioTrack
- AudioTrack::set
- apps that call these

Change-Id: I26fb281bac6cb87593d17697bc9cb37a835af205
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
d69549665d412f1f6ebad48ad8cd05133ada8728 09-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "Replace hard-coded 3 by FCC_2 to simplify searches"
688aac7675f18bdd7bff13334759e20bc4e6c390 09-Mar-2012 Glenn Kasten <gkasten@google.com> Remove virtual from methods that don't need it

Change-Id: I30e17e61aae25b036436c0e270313c80c43e5f06
udioflinger/AudioFlinger.h
1998661fdb6b0b5ae103e047e3d653c5da1b99e3 09-Mar-2012 Glenn Kasten <gkasten@google.com> Remove unnecessary friend declarations

Add comments to the remaining friends, so we know what is left if we
decide to remove them later.

Change-Id: I1de929257dc4700960f77902cda3d303177c72cf
udioflinger/AudioFlinger.h
083c154162c88a9f63aeaa10a4b52dd454bda9ff 09-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "Don't ask policy manager about invalid stream type"
b3dfcf483a96816fe2e949dd86fed26e52ad7404 09-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "AudioPolicyService InputDesc minor cleanup"
a19ffb656616feec70613ba67ddfe15a504a4e76 09-Mar-2012 Eric Laurent <elaurent@google.com> Merge "audio policy: use audio_devices_t when appropriate"
81872a2ce65653ae980621ba2907da56a83ba9a7 08-Mar-2012 Glenn Kasten <gkasten@google.com> AudioPolicyService InputDesc minor cleanup

Add a non-default constructor to set the mSessionId, and make mSessionId const.

Remove explicit clear on mEffects - it is automatically cleared by the destructor.

AudioPolicyService::setPreProcessorEnabled:
- parameter is const *
- use an alias instead of making a Vector copy

Destructor doesn't need to be virtual since there are no subclasses.

Change-Id: Ibc3c3bea8259839430b1cf5356186c7d96f1082f
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
53d76dbe7c55821e89d9da02e7a563f7fb45de87 08-Mar-2012 Glenn Kasten <gkasten@google.com> Replace hard-coded 3 by FCC_2 to simplify searches

Change-Id: I92881d04e8378307f849fb343071a58d181a68b4
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
6374252107fd6539397598195ea6defd5870fafb 08-Mar-2012 Eric Laurent <elaurent@google.com> audio policy: use audio_devices_t when appropriate

Change-Id: I1b3a5879e81c789fb53d356af3d3a1ee2dca955f
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
fec279f5a0bfaa2a42e91ab6dfa0282baeee308b 08-Mar-2012 Glenn Kasten <gkasten@google.com> Mixer status cleanup

Use mPrevMixerStatus for DirectOutputThread also.
Remove the MIXER_CONTINUE logic and use MIXER_IDLE instead.
Rename the field mixerStatus to mMixerStatus.
Rename local variable back to mixerStatus.

Change-Id: I0a8145fc856c6c5ff8b784b6176ef3c4d8eb7408
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
b071e9bc248865ef87a339044c0c5cbabfac175c 08-Mar-2012 Glenn Kasten <gkasten@google.com> Cleanup DirectOutputThread::mActiveTrack

Rename activeTrack to mActiveTrack.
Release the reference earlier, at the end of threadLoop_mix().
This allows the field to be made private and to
move the declaration from PlaybackThread to DirectOutputThread.

Change-Id: I02be7a254638f7d85e92aaf0002d20ca0092a5c3
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
639dbee79140956c43926344c23af765f6e0c9a5 07-Mar-2012 Glenn Kasten <gkasten@google.com> Don't ask policy manager about invalid stream type

Change-Id: If50fbff9d34045d1398984da48da7e6428a74491
udioflinger/AudioFlinger.cpp
b279312a9038b9c5b9b05b31b1b1db86f748efd8 08-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "IAudioFlingerClient::ioConfigChanged param2 const"
fa26a859bacb597587a8f49acfc3127351fa688c 06-Mar-2012 Glenn Kasten <gkasten@google.com> Isolate references to outputTracks/mOutputTracks

Move all references to DuplicatingThread::outputTracks and
DuplicatingThread::mOutputTracks from the common threadLoop() into
virtual methods. This allows them to be moved from PlaybackThread to
DuplicatingThread, and to be marked private.

Also use vector assignment to copy mOutputTracks to outputTracks.

Change-Id: Ieb1cf1ad36b8a65143e61e6c92a65fb43427e5e2
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
a13ad6e84db128eadf23b154d3346f0bb473a5f7 07-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "Make applyVolume private to DirectOutputThread"
d4513b09123deebf8023b73a82d2d46d35806cea 07-Mar-2012 Glenn Kasten <gkasten@google.com> Make applyVolume private to DirectOutputThread

Change-Id: I7ca4a59505857cbd106b6f274c66e9580dead271
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
a3707a280177e934a1e0a15660d9176663b7fc17 07-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "Add comments about sequence for setting parameters"
1465f0c3df04c3166155a852a6a5c10069c1fd0a 06-Mar-2012 Glenn Kasten <gkasten@google.com> Merge the calls to prepareTracks_l

Change-Id: I1dd759581333e2908d980180d44db7bf5ed6591d
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
b81cc8c6f3eec9edb255ea99b6a6f243585b1e38 01-Mar-2012 Glenn Kasten <gkasten@google.com> IAudioFlingerClient::ioConfigChanged param2 const

The 3rd parameter (param2) to AudioFlingerClient::ioConfigChanged
is used as an input. So changed it from void * to const void *.
It is then cast to const OutputDescriptor *
or const audio_stream_type_t * depending on the event.

Change-Id: Ieec0d284f139b74b3389b5ef69c7935a8e5650ee
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
f8edf68a1e39da273eafe8c85bdbedc26636c4ec 07-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "Rename fields of AudioSessionRef"
cbc52bfb3b51c81c945b1e35990324bde892829a 01-Mar-2012 Glenn Kasten <gkasten@google.com> Add comments about sequence for setting parameters

Change-Id: Iffa59a34c3c47bdc1d3234cdcb4d8ff99c102825
udioflinger/AudioFlinger.h
92b8360fe9c3174dc0edaaab4b746d8a3d3f831f 07-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "Fix indentation for re-organized code"
438b036deaf4413503567a75a2861c000d21da5b 06-Mar-2012 Glenn Kasten <gkasten@google.com> Rename updateWaitTime since a lock is held

Change-Id: I9bb978cbd0debf5b21676467060f72eebafea3e6
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
952eeb27682a9b2ddfa761f24b6eb5e18fe5d814 06-Mar-2012 Glenn Kasten <gkasten@google.com> Fix indentation for re-organized code

Change-Id: I63471cebdbd095b7ad4e481611b785f9b02c7941
udioflinger/AudioFlinger.cpp
012ca6b4f69fb24385025c0e84b8f816525a3032 06-Mar-2012 Glenn Kasten <gkasten@google.com> Rename fields of AudioSessionRef

Change-Id: I9f2a66094135c4ac6bec2d3e9db3ac5fbf988ede
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
000f0e39b4d0c88441297a05ab5f8da6832c1640 02-Mar-2012 Glenn Kasten <gkasten@google.com> threadLoop merge

Change-Id: Id8e6330ac6be76f9c2debba94f856de87e2d98f7
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
3030fcefcfcfc48789612659206b957cd0489a54 01-Mar-2012 Eric Laurent <elaurent@google.com> renamed audio policy output flag.

Renamed AUDIO_POLICY_OUTPUT_FLAG_INDIRECT to AUDIO_POLICY_OUTPUT_FLAG_NONE
which is more appropriate.

Change-Id: Ia14d60397df0f2dcd9bea0186400a09da35bc104
udioflinger/AudioPolicyService.h
e8286332f3817a8b7cc4cfd8f6450a3913533660 29-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Shorten thread names"
3e07470f3b122097cacfe5b85cdb1359279a2f33 29-Feb-2012 Glenn Kasten <gkasten@google.com> Prepare for threadLoop merge - active tracks

Continued work on making the copies of threadLoop more similar:
- Remove alias for mActiveTracks in MixerThread and DuplicatingThread.
- Pull in declaration of activeTrack in DirectOutputThread.
- Remove redundant parameter of prepareTracks_l().
- Comment prepareTracks_l().

Change-Id: If1087c1902b454acec01ddfdd9f055f0ca7abf04
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
bc4b08ba67a0245e092aee8f08ba30ef22d421bf 29-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Update AudioFlinger comments"
91cda8bdf8358a8b977a44e016b60a70bc1a5ee9 29-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Pull in declaration of effectChains to inner block"
73ca0f5837d5448f7a5eb159a09cd0ebe82b4de9 29-Feb-2012 Glenn Kasten <gkasten@google.com> Pull in declaration of effectChains to inner block

Change-Id: I09eacf72124942abd604132b9f4e774b1236fcf3
udioflinger/AudioFlinger.cpp
c455fe9727d361076b7cead3efdac2d32a1a1d6d 29-Feb-2012 Glenn Kasten <gkasten@google.com> mSuspend comments and usage

Emphasize that playbackthread::mSuspend is a counter, not a bool

Change-Id: I7188e56814e1c54dbc65e560f3627f138257d644
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
688a64030834ea2f52cc9765676ddf6aa34df767 29-Feb-2012 Glenn Kasten <gkasten@google.com> Mark similar and different sections in threadLoop

Most of these comments will be removed after the threadLoop merge.

Note: the trivial change in assignments to mixBufferSize, and the
comments about "tracks to remove" is to make them all identical.

Change-Id: I3b1a33a7f2cd12ad557a1986bb71f6171161974a
udioflinger/AudioFlinger.cpp
d805b718b1fd2d5407ef665c8d4bb42e63dc71a9 25-Feb-2012 Glenn Kasten <gkasten@google.com> Update AudioFlinger comments

Add comments to enum mixer_state
Note side-effect of lockEffectChains_l
Fix a typo

Change-Id: Ibd51678bac2193201cbcbe081ff5664046fbc494
udioflinger/AudioFlinger.h
480b46802bef1371d5caa16ad5454fce04769c57 28-Feb-2012 Glenn Kasten <gkasten@google.com> Shorten thread names

prctl(PR_SET_NAME) limits to 15 characters. Before we had names like
"Binder Thread #" and the counter was cut off :-( Also remove redundant
"thread" at end of name; it's always a thread.

Change-Id: I1f99c2730ba0787ed9b59c15914356cddf698e2f
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioPolicyService.cpp
a3873833d518e032138cf70188b6f33cd7acec3d 28-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Unlock effect chains in the middle of two if's"
3e9c3a1d34960cd258f294d31135ab6bf76179d5 28-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Simplify removeNotificationClient"
a17c820c556fddf7ddd96b82b3e9874e340ffafd 28-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "AudioFlinger const methods and parameters"
cfbd62616ab2b12f0fee603658f04e5827cc7f8f 28-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Fix theoretical race condition in addOutputTrack"
fadb2c73fce479205432652530663e1e90fd546c 28-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "AudioBufferProvider comments and cleanup"
843a12d146bd64642bf85a4e56c274246e3893a6 27-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Fix tracking of hardware state for dump"
df712ea86e6350f7005a02ab0e1c60c28a343ed0 26-Feb-2012 Mathias Agopian <mathias@google.com> fix libgui header location

Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
amera/libcameraservice/CameraHardwareInterface.h
amera/libcameraservice/CameraService.cpp
amera/tests/CameraServiceTest/CameraServiceTest.cpp
e628d515888baadba75442128678e747e930ed58 27-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Make threadLoop() logs identical"
d3cee0b1f77baa4fb7a049eb757e9f5006890726 27-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Move declaration of mixerStatus to inner block"
1843df5b4f8f8f8394a96bcaeb5836d720ae9cf5 25-Feb-2012 Mathias Agopian <mathias@google.com> Merge "remove dependency on android_native{s_priv|buffer}.h"
9eeafeb52fecf90882e9b44eeefcb7c3e16aa915 25-Feb-2012 Mathias Agopian <mathias@google.com> remove dependency on android_native{s_priv|buffer}.h

Change-Id: Ie4b95f7061c240f37c504414259f92d72c4ffc89
amera/libcameraservice/CameraHardwareInterface.h
a3b09254d44cd8d66ec947abe547538c4cfeaa89 20-Jan-2012 Glenn Kasten <gkasten@google.com> Simplify removeNotificationClient

No need to check for presence of item before removing
(but we do lose the log of the previous value).

Change-Id: I2838430824de5f257f2ee15db0c22b1920c67d08
udioflinger/AudioFlinger.cpp
02fe1bf923bbe5789202dbd5810e2c04794562e6 25-Feb-2012 Glenn Kasten <gkasten@google.com> AudioFlinger const methods and parameters

Change-Id: I93ec28024005ed23aa141518092a012a4a7c44c5
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
c0b52836d07f823732f0ff98ca5ca9d7f5730cb8 24-Feb-2012 Glenn Kasten <gkasten@google.com> Make threadLoop() logs identical

Change the wording of the logs in the various copies of threadLoop()
to be identical. This will make it easier to merge them soon.

Change-Id: Idfa181e437738712c784dc7f746cac79f83d2931
udioflinger/AudioFlinger.cpp
5d4eeeaf76ebe177b43e87b2a9df5e55e39021f0 24-Feb-2012 Glenn Kasten <gkasten@google.com> Move declaration of mixerStatus to inner block

mixerStatus was being declared (and initialized) too early,
which also resulted in a duplicate initialization. Moved
the declaration into the block where it is actually used.

Change-Id: Ifdcfefe362a5efe3493dd616cdb44645c6f9aed5
udioflinger/AudioFlinger.cpp
37d825e72a6c606553a745da1212590a425996d3 24-Feb-2012 Glenn Kasten <gkasten@google.com> Pull out duplicated copies of silent mode check

Also fix the error handling for the property_get.

This is part of preparation for the threadLoop() merge.

Change-Id: I6405190ea18146d1271575e1dfe9f279e8f36b17
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
04743e99e71c0da012508c7119f414027654ee94 24-Feb-2012 Glenn Kasten <gkasten@google.com> Unlock effect chains in the middle of two if's

As part of the upcoming threadLoop() merge, this CL makes it clearer
what are the similar and different parts before and after unlocking
effect chains.

In each threadLoop(), the old code was:

if (sleepTime == 0) {
// A
unlockEffectChains(effectChains);
// B
} else {
unlockEffectChains(effectChains);
// C
}

The new code is:

if (sleepTime == 0) {
// A
}
unlockEffectChains(effectChains);
if (sleepTime == 0) {
// B
} else {
// C
}

Also this is slightly slower by one "if", it has the advantage of making
it much more obvious about what is done before and after the unlock,
and also to see the similarities and differences among the various
copies of threadLoop().

Change-Id: I7bf4369d2dcb072573ec43b7e52c637f0097dc00
udioflinger/AudioFlinger.cpp
5ce96d97feafc6989f6141bb2633eae3d87ddf28 24-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Pull CPU statistics code out of threadLoop()"
b6b740629c9f11535086e744465bada03f26df11 24-Feb-2012 Glenn Kasten <gkasten@google.com> Fix theoretical race condition in addOutputTrack

This is not a real race, because addOutputTrack was only called in two
places, and in both places there could be no other threads referencing
the DuplicatingThread instance.

Those two places are:
- the DuplicatingThread constructor, which is of course safe
- openDuplicateOutput - this is safe because it's called immediately
after the new DuplicatingThread, and there are no sp<> either in the
constructor or here which could cause onFirstRef() to do Thread::run().

But for safety in case addOutputTrack is ever called somewhere else,
or there are sp<> created earlier, it is safer to take the thread lock.

Change-Id: I1502d014fa37ec5dbf4bf40d3e2884af311cd5e9
udioflinger/AudioFlinger.cpp
83efdd0fc08cd5aedf50b45741a8a87be8dc4b41 24-Feb-2012 Glenn Kasten <gkasten@google.com> Pull CPU statistics code out of threadLoop()

This is to prepare for the threadLoop() merge

Change-Id: I118c7d5c6b011b5d5b95ec7d63fb03feb166a9cf
udioflinger/AudioFlinger.cpp
01c4ebf6b794493898114a502ed36de13137f7e5 22-Feb-2012 Glenn Kasten <gkasten@google.com> AudioBufferProvider comments and cleanup

Add comments about which methods implement the AudioBufferProvider interface.

Simplified the definition of kInvalidPts. <stdint.h> is very hard to work
with, there seems to be no way to use it reliably to get INT64_MAX without
having a separate source file, which is ugly because it means kInvalidPts
is not a compile-time constant. So I just deleted AudioBufferProvider.cpp
and used a hard-coded constant instead.

Added a default constructor for Buffer so that the fields aren't random
(especially .raw which is used to determine if the buffer is valid).

Make the pts for getNextBuffer default to kInvalidPTS so code that
doesn't need a pts doesn't have to specify a value.

Rename the parameter to AudioMixer::setBufferProvider to make it clearer.

Change-Id: I87e7290884d4ed975b019f62d1ab6ae2bc5065a5
udioflinger/Android.mk
udioflinger/AudioBufferProvider.cpp
udioflinger/AudioBufferProvider.h
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
8abf44d2f2bcd20a2835570efe89d89c19db426a 02-Feb-2012 Glenn Kasten <gkasten@google.com> Fix tracking of hardware state for dump

At end of AudioFlinger::onFirstRef(), the hardware status was being left
in wrong state. It should be AUDIO_HW_IDLE but was AUDIO_HW_INIT.

mHardwareStatus was being set to AUDIO_HW_OUTPUT_OPEN too early, and so
a return would leave it in the wrong state until next hardware operation.

Take the hardware lock for dev->get_parameters, and update mHardwareStatus
before and after.

Keep hardware lock only for the duration of the dev->set_parameters.

Rename two constants in enum hardware_call_state to have the prefix
AUDIO_HW so they follow the naming conventions.

Add comments.

Change-Id: I6c7450b11f9b13adaeef9cec874333e478a58fc0
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
5cf034d92d901169ca6e36c90475f40715827fcd 21-Feb-2012 Glenn Kasten <gkasten@google.com> Remove TrackBase::mFlags

The bit-field TrackBase::mFlags was supposed to have track-specific
flags in the upper 16 bits, and system flags in the lower 16 bits.

The upper 16 bits of mFlags were initialized in the TrackBase
constructor from the flags parameter of IAudioFlinger::createTrack()
and IAudioFlinger::openRecord(), and the lower 16 bits were cleared.

However, the upper 16 bits of mFlags were never acccessed again.
So really there are no track-specific flags. I left the flags
in the parameter list of createTrack() and openRecord() but made a
note that these should be removed eventually as they are dead.

This leaves only the one system flag "step server failed". I replaced
the bit-field mFlags by bool mStepServerFailed, which is simpler and
slightly faster.

Change-Id: I6650f5487be72791b4a67d73adcd10ffa04e2aa5
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
d6fd85a157ce2054b2304e6d171fa87ae09c363d 22-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Avoid wp<>::unsafe_get() with a few exceptions"
9eaa55756c5b245970447019250ce852f5189525 20-Jan-2012 Glenn Kasten <gkasten@google.com> Avoid wp<>::unsafe_get() with a few exceptions

Avoid using wp<>::unsafe_get() except in a log, and other specific cases
when it's known to be safe.

Use more specific subclass types for parameters to avoid down-casts.

When a constructor or method parameter is "this" of an object that is
currently being constructed, it's better to use a raw pointer rather
than either sp<> or wp<>.

Using the raw pointer is safe, provided either:
- it is "this" of an object being constructed (which has sp<> refcount of 0),
- or the caller already holds an sp<>

The raw pointer is simpler and faster, and it avoids the problem of the
sp<> reference count being incremented and then decremented to zero on
scope exit, which would cause the object's destructor to run while the
object is still being constructed.

Also removed some dead code per a review comment.

Change-Id: I7375f64da3aec11b928c33cb01faff186252ef5e
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
f063b49e95c28d63a58215ebda892a5fee4204cc 18-Feb-2012 Glenn Kasten <gkasten@google.com> Fix build warning

warning: pointer of type 'void *' used in arithmetic
warning: enumeral and non-enumeral type in conditional expression

Change-Id: I7b8d626a636145ef648e3b5d0e77068216dd012e
udioflinger/AudioFlinger.cpp
3b81acab52b7140c1b8b20be2d67be3e221637e7 28-Jan-2012 Glenn Kasten <gkasten@google.com> Remove bit fields to improve performance

uint16_t enabled is (mostly) changed to bool in a separate CL

Change-Id: Ied9f8c034b2479cee9a8778cee7b8ff92ae75b7b
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
1b094ee8f7fe7eca65bf3d2f983ba95eef6db93d 17-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Simplify code"
a111792f1314479c649d1d44c30c2caf70c00c2a 26-Jan-2012 Glenn Kasten <gkasten@google.com> Simplify code

Use DefaultKeyedVector::valueFor to avoid extra test
Make local variables as local as possible
No double parentheses
No typedef for single use
No parentheses around indirect function call
No AudioFlinger:: prefix when not needed
Remove unnecessary casts
Remove block with only one line

Saves 128 bytes

Change-Id: I3a87430eeb01b81e7b81a1c38f6fdd3274ec48f3
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/AudioPolicyService.cpp
29dcfcd66d884801e9907d04e81d407ee770802c 17-Feb-2012 Mike Lockwood <lockwood@google.com> Merge "Put a bandaid on a segfault in timed audio track handling."
fe5b3ba4b332d5fc9aa4f453434329b9f38768c2 13-Feb-2012 John Grossman <johngro@google.com> Put a bandaid on a segfault in timed audio track handling.

Add a bandaid to prevent a segfault which can occur while handling
timed audio buffers. There is a deeper problem which should
eventually be addressed, but for now this fix should prevent any
crashing.

The deeper problem is as follows.

When the AudioFlinger mixer gets data to mix from an AudioTrack, it
ends up getting a structure filled out which points into an IMemory
region owned by the AudioTrack. Unfortunately, this structure is not
holding a refcount on the IMemory which it points into. If the
IMemory refcount hits 0 and the chunk of RAM is retuned to the binder
heap it came from, there can still be a Buffer object being held by
the AudioFlinger mixer which points into the region of memory which
was retuned to the binfer heap. If AF reads from this buffer, it
could read corrupt data (if the region of memory gets handed back out
to a writer), or it could segfault (if the heap has been freed and the
pages unmapped). Similar problems could happen if AF attempts to
write to the buffer, heap corruption in one case, segfaulting in the
other.

In the past, this has not been an issue for AF, because tracks
allocate a single IMemory (which serves as a ring buffer) and the
IMemory lives for as long as the track lives. As an artifact of the
way the code came out, the mixer cannot be holding a Buffer structure
pointing into the IMemory which used to be owned by a track if the
track no longer exists. Tracks cannot come into or out of existence
during a mix operation, which is the only thing which makes this safe.

TimedTracks work differently, however. Timed tracks each allocate a
small binder heap, and then hand out IMemory instances broken out of
this heap. The heap lives as long as the track, so the worst which
could happen here is that a TimedTrack's IMemory gets returned to the
heap while there is still a buffer structure in flight pointing into
the memory region, then the region gets handed out again and
overwritten by new data causing the mixer to mix the wrong audio. The
timing to cause this to happen is very difficult to encounter, and you
to generate the timing conditions required, you need to be in a pretty
bad failure state where audio is already breaking up and skipping, so
its unlikely that anyone would notice (which is why I'm band-aiding
the segfault and letting the deeper issue slide for now).

In general, however, it might be a good idea to revisit this buffering
design. On principal, if someone is going to hold pointers into a
refcounted object, they should be holding a ref on the object at the
same time. Failure to do this will usually lead to a situation where
there are corruption or segfault issues, or to a system where the
refcounted object's lifetime must be implicitly managed very carefully
in ways which are usually non-obvious and are easy to break by new
engineers on a project.

Change-Id: Ib391075395ed0ef46a03c37aa38a82d09e88abeb
udioflinger/AudioFlinger.cpp
9fda4b87441fe17d90d8144639c9de6d9022c3c0 02-Feb-2012 Glenn Kasten <gkasten@google.com> Fixed possible heap corruption in EffectDesc

"EffectDesc *effect = new EffectDesc(*effects[i]);" was relying on the
default copy constructor for EffectDesc, but the default copy constructor
does a member-by-member copy. This works OK for mUuid, but a member
copy of mName and mParams shares pointers. This could result in heap
corruption later on due to a double free. Changed to add an explicit
copy constructor that does a deep copy of both mName and mParams.

A malloc() and strdup() were being freed by delete, but the correct
matching API for these is free(). Fortunately our current memory runtime
implementation ignores the difference. Changed to use free().

EffectDesc and InputSourceDesc member fields were being torn down by
the code that does delete. Changed to do the tear-down in ~EffectDesc()
and ~InputSourceDesc().

Added constructor EffectDesc() with name and UUID parameters, rather
than having caller fill in the object after construction.

Made ~EffectDesc() and ~InputSourceDesc() non-virtual to save memory,
since they have no subclasses.

Change-Id: Ibb5cc2e6760d72e0c4cf537068ac4432c717bafd
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
ef7740be67a4d7b6b033ebed59c3d4a9c74a2c18 09-Feb-2012 John Grossman <johngro@google.com> Fix a segfault in AudioFlinger.

Check the string returned by a HAL's implementation of get_parameters
for NULL before attempting to make use of it. That way, we won't
bring down the mediaserver because of a poorly written HAL.

Change-Id: Ic99d7b004520d7d6347842a681c0595e889b68ea
Signed-off-by: John Grossman <johngro@google.com>
udioflinger/AudioFlinger.cpp
4ff14bae91075eb274eb1c2975982358946e7e63 09-Feb-2012 John Grossman <johngro@google.com> Upintegrate Audio Flinger changes from ICS_AAH

Bring in changes to audio flinger made to support timed audio tracks
and HW master volume control.

Change-Id: Ide52d48809bdbed13acf35fd59b24637e35064ae
Signed-off-by: John Grossman <johngro@google.com>
udioflinger/Android.mk
udioflinger/AudioBufferProvider.cpp
udioflinger/AudioBufferProvider.h
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/AudioResampler.cpp
udioflinger/AudioResampler.h
udioflinger/AudioResamplerCubic.cpp
udioflinger/AudioResamplerSinc.cpp
6dad4378f2a78d967defc8912ecf47f6ed117584 14-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Fix races related to volume and mute"
d9b9b8d09e7471b0ffa21cfa9f944ef4ad300a71 14-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Update comments"
99e53b86eebb605b70dd7591b89bf61a9414ed0e 19-Jan-2012 Glenn Kasten <gkasten@google.com> Update comments

We no longer put the filename at start of file.

Change-Id: Ic435b159a23105681e3d4a6cb1ac097bc853302e
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
8d6a2449a91f5116d7243ab039393195ebd663fe 08-Feb-2012 Glenn Kasten <gkasten@google.com> Use size_t and ssize_t with Vector

Use size_t with size() and ssize_t with indexOfKey(). Exception:
use ssize_t for backwards loops, and indices that are overloaded as a
marker or error code.

Change-Id: Ibf2a360af4539b72b09c818dda22ea2a0de92431
udioflinger/AudioFlinger.cpp
udioflinger/AudioPolicyService.cpp
6dbc1359f778575d09d6da722b060a6d72c2e7c5 02-Feb-2012 Glenn Kasten <gkasten@google.com> AudioRecord and AudioTrack client tid

Inform AudioFlinger of the tid of the callback thread.

Change-Id: I670df92dd06749b057238b48ed1094b13aab720b
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
44deb053252a3bd2f57a007ab9560f4924f62394 06-Feb-2012 Glenn Kasten <gkasten@google.com> Factor out and speed up permission-checking code

Use the caching permission check for dump to save IPC.

Cache getpid() to save kernel call for other permission checks.

The C runtime library getpid() can't cache due to a fork
race condition, but we know that mediaserver doesn't fork.

Don't construct String16 on the stack.

Change-Id: I6be6161dae5155d39ba6ed6228e7683e67be34ed
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioPolicyService.cpp
udioflinger/ServiceUtilities.cpp
udioflinger/ServiceUtilities.h
2b213bc220768d2b984239511cd4554a96bc0079 02-Feb-2012 Glenn Kasten <gkasten@google.com> mAudioHwDevs and related cleanup

Inline AudioFlinger::initCheck and remove unnecessary lock.

Remove redundant check of mAudioHwDevs.size().

No need to lock mHardwareLock for each device separately
during initialization.

Use size_t not int to loop through Vector, since size() returns size_t.

Add missing hardware lock for get_mic_mute() and get_input_buffer_size().

Add comments.

Change-Id: Iafae78ef78bbf65f703d99fcc27c2f4ff221aedc
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
b6333aa8317ce5162ab006c4baed6b0890936dc7 11-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Simplify ThreadBase::exit() aka requestExitAndWait"
3a144d08b713e3c0f6b7b8e95bc42cef5886f4fa 11-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Disable HQ resamplers for now until qualified"
0d9302d7830b46542821b3e5f3e4f96942bd3cb3 11-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Move header declarations around for clarity"
858df80948ee64f478782a6a6c06533ba1651ef1 11-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Camel case readability & private disconnect(bool)"
95a87908ddf240760e8e8b35a6cafcc149c7f33f 11-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Remove aliasing"
c8ad36bbb30e99e49026cba78e5e0f83db5cb0f6 11-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Use mul from audioutils"
31f0acff69efd46897221d847becca79ab15105f 11-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Mark fields const if only set in constructor"
b28686f95daee16edeb5f39af2cd5274ac3dc99f 06-Jan-2012 Glenn Kasten <gkasten@google.com> Simplify ThreadBase::exit() aka requestExitAndWait

We can remove mExiting and use Thread::exitPending() instead.

The local sp<> on "this" in exit() is not needed, since the caller must
also hold an sp<> in order to be calling us. (Unless it was using a raw
pointer, but that would be dangerous for other reasons.)

Add comment explaining the mLock in exit().

Change-Id: I319e5107533a1a7cdbd13c292685f3e2be60f6c4
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
9d1f02d74fd395ec4de6861147da289423f0ab6f 09-Feb-2012 Glenn Kasten <gkasten@google.com> Follow raw pointer and sp<> conventions

Unconditional delete for raw pointers.
Use "if (sp != 0)" not "if (sp.get() != 0)" or "if (sp != NULL)".
Use "if (raw != NULL)" not "if (raw)".

Change-Id: I531a8da7c37149261ed2f34b862ec4896a4b785b
udioflinger/AudioPolicyService.cpp
0ba18ec1b343a8de70924f87630dd1f329b00fe6 10-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "No newline or space at end of ALOG format string"
12018d80add66f5558675614d73fa6549150806e 10-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Move declaration of stream_type_t up earlier"
8b5980798ca06e57b1284e6e23fa220e1207bf41 10-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Fix typos in ALOG for pid vs tid"
cdf2158f3b9498d6cd0eb228d8bee16e32399e16 02-Feb-2012 Glenn Kasten <gkasten@google.com> Disable HQ resamplers for now until qualified

This saves about 6500 bytes.

Change-Id: I87102fe561c95c19c9e615dea3de914f96639257
udioflinger/Android.mk
udioflinger/AudioResampler.cpp
2f732eb768004c6362fae8a02c60b69c9400b032 26-Jan-2012 Glenn Kasten <gkasten@google.com> Move header declarations around for clarity

Put IAudioFlinger methods in binder opcode order.
Move hardware call state closer to where it is used.
getMode() and btNrecIsOff() are private.

Change-Id: Ie50340b396c39c763f2b155cbc08da8a0d0f2424
udioflinger/AudioFlinger.h
004f719467c498942c40de9f260be601ee45e630 30-Jan-2012 Glenn Kasten <gkasten@google.com> Mark fields const if only set in constructor

Change-Id: Iacd06bb9efaf708cf965033be1f2297b58f7f75c
udioflinger/AudioResampler.h
d198b61603d5fa9298edea4ddb5852ea45159906 02-Feb-2012 Glenn Kasten <gkasten@google.com> Remove aliasing

Code was aliasing mBuffer as buffer, but continuing to use both buffer
and mBuffer after that point. This was at best misleading, and at worst
could confuse the compiler into generating bad code. There was no
performance advantage to the alias, in fact removing it saves 16 bytes.

Change-Id: I55023ddba465d9be82f66745b088d18af658ac60
udioflinger/AudioResamplerSinc.cpp
58123c3a8b5f34f9d1f70264a3c568ed90288501 03-Feb-2012 Glenn Kasten <gkasten@google.com> Camel case readability & private disconnect(bool)

Change-Id: If66516ed2703e048c5e6ccc6cd431446a024f4a1
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
5b9ff43995f6a6b819d9ad37dd8cdc5ad4a088d7 09-Feb-2012 Glenn Kasten <gkasten@google.com> Use mul from audioutils

I verified that the disassembled output is identical.

Change-Id: I34a76f0842ebc4aef2c923e079e38d0bc1f98b5c
udioflinger/AudioFlinger.cpp
23d82a9bc9a43b49ba684ba40875b91db310d3b9 03-Feb-2012 Glenn Kasten <gkasten@google.com> Fix typos in ALOG for pid vs tid

Change-Id: I6dc70f137d0ff8a86427ab8882a81886e1de0782
udioflinger/AudioFlinger.cpp
udioflinger/AudioPolicyService.cpp
90bebef5669a9385c706b042d146a31dca2e5d9b 28-Jan-2012 Glenn Kasten <gkasten@google.com> No newline or space at end of ALOG format string

Change-Id: I0bef580cbc818cb7c87aea23919d26f1446cec32
udioflinger/AudioFlinger.cpp
udioflinger/AudioResampler.cpp
udioflinger/AudioResamplerCubic.cpp
6637baae4244aec731c4014da72418d330636ae1 09-Jan-2012 Glenn Kasten <gkasten@google.com> Fix races related to volume and mute

Fix race conditions when setting master volume, master mute, stream
volume, stream mute for a playback thread, and when reading stream
volume of a playback thread. Lock order is AudioFlinger, then thread.

Rename streamVolumeInternal to streamVolume_l, comment, and use it to
implement streamVolume().

Code size reduction:
- Remove dead code: AudioFlinger::PlaybackThread::masterVolume, masterMute, streamMute.
- Change return type of non-binder methods that always succeed from status_t to void.
- Remove virtual from volume and mute methods that don't need it.

This change saves 228 bytes but decreases performance of binder operations
due to the added locks.

Change-Id: Iac75abc1f54784873a667d1981b2e08f8f31e5c9
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
b7bf796b758e144f94f6ed4d16c21bf22a118fb3 08-Feb-2012 Glenn Kasten <gkasten@google.com> Move declaration of stream_type_t up earlier

stream_type_t is used by AudioFlinger class, so it should be declared there.
This way we don't have to peek into PlaybackThread to get the declaration.

Change-Id: Ie08bab1604699214d1e8df2d48d3fbfbbc436e96
udioflinger/AudioFlinger.h
02bbd20cece1785c223ac4ca2ddc635931a80673 08-Feb-2012 Glenn Kasten <gkasten@google.com> Rename type() to streamType()

This avoids possible confusion with thread's type().
Also remove redundant cast "(audio_stream_type_t)".

Change-Id: I320b9177b6c267a102d215f002228bcf988c437a
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
98ec94c5854daccc3474758524e7f4adfe535ce0 25-Jan-2012 Glenn Kasten <gkasten@google.com> Combine duplicate code & document wp<> in mClients

Change-Id: Iea8cfe8e57563337fb2484a1246ef79d6ad3db18
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
72ef00de10fa95bfcb948ed88ab9b7a177ed0b48 17-Jan-2012 Glenn Kasten <gkasten@google.com> Use audio_io_handle_t consistently instead of int

Other:
- add a comment to nextUniqueId
- made ThreadBase::mId const, since it is only assigned in constructor.

Change-Id: I4e8b7bec4e45badcde6274d574b8a9aabd046837
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
dbfafaffe2e97eaf8d74ec6b6c468418a1ad2443 26-Jan-2012 Glenn Kasten <gkasten@google.com> Simplify destructors

Remove explicit clear() when the order doesn't matter.

Change-Id: I5931bc7ef5f681c7ce329aa9ec0a6e46d34a56c5
udioflinger/AudioFlinger.cpp
5e92a7861196ddae14638d4b7a63fc4892b7ef59 30-Jan-2012 Glenn Kasten <gkasten@google.com> Effect UUID inputs passed by pointer are const

Change-Id: I1f5c338bcb7368e3dd8cd5f804b2e6d9fbe087f8
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
0a20fa9c41c96e31fa20e071074a4b6e7f6c41c3 08-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Use pid_t not int"
b61ec89bb0c701b3bd06eb658f854230681f8b39 08-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Don't double destruct audio_track_cblk_t"
63d2daed17ab749baa80bc808fb5083b688b771b 08-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "AudioFlinger methods const and inline"
86feafe15b3f9609e1e9f64184688c2b6f2e4834 08-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Use virtual destructors"
e616d4e6de6d53ddebbc3d7fb381af94589c2232 08-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Improve performance for sp<> on stack"
1579d7948117e3e6541b0cfda02cc5234a3280ea 08-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Use 0 not NULL for sp<> and wp<>"
b5a66e15f371143f48665bbd462d75309582845d 08-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Use bool instead of int"
e98bbd36d67243fe987b09904956550a68af1cc7 08-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Declare more IAudioFlinger methods const"
1a0ae5be3d1273cba12584b33830d859510fbf82 03-Feb-2012 Glenn Kasten <gkasten@google.com> Don't double destruct audio_track_cblk_t

Fortunately audio_track_cblk_t doesn't have a destructor, but for clarity
remove the double destruction.

Also add warning not to add any virtuals to audio_track_cblk_t.

Change-Id: I70ebe1a70460c7002145b2cdf10f9f137396e6f3
udioflinger/AudioFlinger.cpp
bb001926447d0b7dc71ca8bb3c9856f3136d8f4c 03-Feb-2012 Glenn Kasten <gkasten@google.com> Use pid_t not int

Change-Id: Iad1c2fd4152e94080ad8c65c13ddf4519fc2ed27
udioflinger/AudioFlinger.cpp
d5e54f7a36daedc3b2a642d1499c262da04e6280 26-Jan-2012 Glenn Kasten <gkasten@google.com> Remove dead code

mFormat is unused in resampler
mClientTid is unused
local variable pid is unused in dump

Change-Id: Ib156e38029366620bfeff2a13e73471867155a5b
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioResampler.cpp
udioflinger/AudioResampler.h
f587ba5b991c7cd91e4df093d0d796bd419e5d67 27-Jan-2012 Glenn Kasten <gkasten@google.com> Declare more IAudioFlinger methods const

This is just documentation, as C++ method const-ness doesn't mean anything
for a binder API. Instead, here const means "no side effects".

Change-Id: Iaa9cd2fe477db10ae9a40cac4f79f0faa9b4e5e6
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
4c340c6521b634f159d2d6bc4e9359226fd8edf8 27-Jan-2012 Glenn Kasten <gkasten@google.com> Use bool instead of int

The .h is not modified to avoid increasing data size.

Change-Id: Ide4a821a5b16424ffa03471dfff98dc3e9b5f751
udioflinger/AudioMixer.cpp
c59c004a3a6042c0990d71179f88eee2ce781e3c 02-Feb-2012 Glenn Kasten <gkasten@google.com> AudioFlinger methods const and inline

This saves 1063 bytes and probably improves performance.

Change-Id: I11cf0dfd925fbaec75e3d1b806852a538eae5518
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/AudioResampler.h
c19e22450e6e3d07594c935c7a9522e85e909e82 30-Jan-2012 Glenn Kasten <gkasten@google.com> Use virtual destructors

It turns out to be just a comment, as all except AudioMixer are RefBase.

There are only a few performance-sensitive cases where it's worth thinking
about whether you need a virtual destructor, and the headache usually
outweighs the benefit.

Change-Id: I716292f9556ec17c29ce8c76ac8ae602cb496533
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.h
udioflinger/AudioResamplerSinc.h
7378ca506e4e20c2b2d4e94a131cf1b95831adb5 20-Jan-2012 Glenn Kasten <gkasten@google.com> Use 0 not NULL for sp<> and wp<>

Change-Id: Id1f0c89acefaceed6cb9ca7c165fce895e46d85b
udioflinger/AudioFlinger.cpp
udioflinger/AudioPolicyService.cpp
787bae0578fbaab6219ebf23494866b224d01438 03-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Use audio_in_acoustics_t consistently"
ff3c83e04ae459c4252b86dd4440b4e37ee92c16 03-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Use ToneGenerator::tone_type consistently"
a0d68338a88c2ddb4502f95017b546d603ef1ec7 28-Jan-2012 Glenn Kasten <gkasten@google.com> Use NULL not 0 for raw pointers

Use if (p != NULL) instead of if (ptr)

Change-Id: Iaec3413a59ccbf233c98fcd918cc7d70ac5da9fa
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.cpp
udioflinger/AudioPolicyService.cpp
87f155d6655b2d3b27e69281a29e85c6407e4d26 03-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "For performance, return large objects by reference"
f81e97e4ec8b01965a5b36987f886cf5001f71ff 03-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "No need to check a wp<> for 0 before promote()"
84afa3b51ac48f84ed62489529ce78cba7fca00e 26-Jan-2012 Glenn Kasten <gkasten@google.com> Constructor initialization and const fields

In constructors, initialize member fields in the initialization list
rather than constructor body where possible. This allows more fields
to be const, provided they are never modified.

Also initialize POD fields in constructor, unless it's obvious they
don't need to be initialized. In that case, put a comment instead.

Remove explicit clear() in destructors on fields that are now const.

Give AudioSessionRef a default constructor, so it's immutable fields can
be marked const.

Add comment about ~TrackBase() trick.

Initialize fields in declaration order to make it easier to confirm that
all fields are set.

Move initialization of mHardwareStatus from onFirstRef() to constructor.

Use NULL not 0 to initialize raw pointers in initialization list.

Rename field mClient to mAudioFlingerClient, and getter from client()
to audioFlingerClient().

Change-Id: Ib36cf6ed32f3cd19003f40a5d84046eb4c122052
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
5c0ad10b14ec2287f90f95912d98e66eef006e2a 03-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Cleanup thread types"
62da7fbd60bee2dd57f503126266e9f04311d400 03-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Make AudioTrack control block volume field private"
d45ee9d9d61af0791c7c3c51f8d4fe6794ef02a5 02-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Fix const sp<>& in parameter list and return value"
d05397144be774f2f3623c754e865f51753e4e31 30-Jan-2012 Glenn Kasten <gkasten@google.com> For performance, return large objects by reference

Change-Id: Ibf737018ef1d3c7d717584615dcb2d4ecdb50c99
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
090f01963e215f895020a31e22368cd44e086ce3 30-Jan-2012 Glenn Kasten <gkasten@google.com> Improve performance for sp<> on stack

Combine default constructor for sp<> immediately followed by assignment,
as the reference-counting is relatively slow. Also return sp<> directly
rather than via local variable, for the same reason.

Change-Id: If55931f1e407994f6591ddde41b53db72fb4fc40
udioflinger/AudioFlinger.cpp
435dbe6c3ecd04bcb4bd80584064e287ebccd720 30-Jan-2012 Glenn Kasten <gkasten@google.com> Fix const sp<>& in parameter list and return value

EffectModule::addHandle and Client::heap() were declared incorrectly.

As a parameter, an sp<> should be & for efficiency, and for input
parameters it should also be const to protect the caller's value.

But as a return value, an sp<> should have neither const or &. The "e"
in "return e;" might be located on the stack, and if there is "&" then
the caller would see the address of a variable which no longer exists.
Also, an & would make it hard to do "return 0;".
A "const" without & is meaningless in the return type.
(In this particular case, the "e" is a member field, so it was safe.)

Change-Id: I3df5f294214eb15a9d4d596c6d5ef29de97b5c27
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
e9dd0176933d6233916c84e18f3e8c0d644ca05d 28-Jan-2012 Glenn Kasten <gkasten@google.com> Unconditional delete

Don't check that pointer is non-NULL before delete.

Don't leave deleted member fields non-NULL, except in a destructor,
since it could be misleading in a dump or debugger. (mRsmpOutBuffer)

Change-Id: Ic0492a6b752f74a67f4c96dfb89ca2de4e69eecf
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.cpp
udioflinger/AudioPolicyService.cpp
77c1119ea0b5cb32287088ceeeb7e3b6bd14a85d 25-Jan-2012 Glenn Kasten <gkasten@google.com> No need to check a wp<> for 0 before promote()

Also remove unnecessary wp<> local variable.

Change-Id: I620e67b5d559d28616f8e00609a525cfe19c5ddc
udioflinger/AudioFlinger.cpp
3d2f877c1cb4e4ae4ddde7f57f4353de9341f11b 28-Jan-2012 Glenn Kasten <gkasten@google.com> Use ToneGenerator::tone_type consistently

Also remove defaults in startToneCommand(), they're not needed and the
default for tone type was nonsense.

Change-Id: I70fa8cee4f3dbb8c66ceb3719c8d3d2f447f05b9
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
de9719b3ec71472e6bf75117152176af51d1a515 27-Jan-2012 Glenn Kasten <gkasten@google.com> Use audio_in_acoustics_t consistently

Change-Id: I0a9dd668fb2e57b1c3ece3190588194974b99062
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
fd267d7cf640225bb57f0ed1af44efc153275f6d 27-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Use audio_source_t consistently"
a3a2cd4072aaa2d93c91251a786eb7323f8d2c27 27-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "AudioStreamIn and AudioStreamOut"
6f5980b75df837231365d238c1b0d6f386363fbb 27-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Declare methods in binder opcode order"
28f52c84c22e129063a576e1269a39ae0cc0bfb3 27-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Use enum effect_state consistently"
114c458f2b80a252ec627add1d5fda2093c79068 27-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Use enum track_state consistently"
eba51fb3a361f67a6a64d5a16eba6084fe27d60e 23-Jan-2012 Glenn Kasten <gkasten@google.com> Use audio_source_t consistently

Was a mix of audio_source_t, uint8_t, and int.

Related fixes:
- fix comments in MediaRecorder.java
- AudioPolicyService server side was not checking source parameter at
all, so if the client wrapper was bypassed, invalid values could be
passed into audio HAL
- JNI android_media_AudioRecord_setup was checking source for positive
values, but not negative values. This test is redundant, since already
checked at Java and now checked by AudioPolicyService also, but might
as well make it correct.

Change-Id: Ie5e25d646dcd59a86d7985aa46cfcb4a1ba64a4a
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
aed850d0d3b3c8cf3feaf1438076f33db2a60946 26-Jan-2012 Glenn Kasten <gkasten@google.com> AudioStreamIn and AudioStreamOut

These are immutable, so make the fields const.
getOutput() and getInput() methods are now const.

Change-Id: I128246ebd56ea50b3e542be43f2aa1bcb55f1373
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
23bb8becff20449a9b1647d5a1a99b14c83f0cce 26-Jan-2012 Glenn Kasten <gkasten@google.com> Cleanup thread types

Use type_t instead of int for thread types.
Initialize ThreadBase::mType in constructor and make it const.

Change-Id: I43d141388b9639e4783c30b97dbda5688bf7555f
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
90716c5728b37637b2d0a730a721bfc9fad299e0 26-Jan-2012 Glenn Kasten <gkasten@google.com> Declare methods in binder opcode order

This makes it easier to compare interface and implementation.

Change-Id: Ie060e43dec348902abcf40f5a610cec639d6d0d3
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
29c23c3aee5ae799b3480dc6876a46c46b019710 26-Jan-2012 Glenn Kasten <gkasten@google.com> Use enum mixer_state consistently

Change-Id: I5b71ed20f939dfc4b98143334b7aa064d282f584
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
28243dd563fee1c82f0fff6cc27b5cbf21fa2585 26-Jan-2012 Glenn Kasten <gkasten@google.com> Use enum effect_state consistently

Also fix indentation

Change-Id: I393ef9e37ffceed5ad4a78df439726ae1fe139df
udioflinger/AudioFlinger.h
b853e986caf43408ad95b9014f194aadff385e3c 26-Jan-2012 Glenn Kasten <gkasten@google.com> Use enum track_state consistently

Change-Id: Ie5ebb7befa092e1de1e4df9c6e2d51e6bcfd176a
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
9365ea9bf2e439b3e71abbabe22ce7382ebc4b3a 25-Jan-2012 Eric Laurent <elaurent@google.com> am 535b0264: am 7eeaf3f0: Merge "AudioFlinger: refine mixer sleep time logic" into ics-mr1

* commit '535b0264a4cfa790e549bd9cd09980788f1375f4':
AudioFlinger: refine mixer sleep time logic
84e19873fde204d73628ba1b5ca9e3f5778574fa 24-Jan-2012 Eric Laurent <elaurent@google.com> am 7eeaf3f0: Merge "AudioFlinger: refine mixer sleep time logic" into ics-mr1

* commit '7eeaf3f07aa6fb10639d9f96c1367eb98c3e8839':
AudioFlinger: refine mixer sleep time logic
7c5aea0a8d9b422999483f96a2566f77ff11abf2 24-Jan-2012 Eric Laurent <elaurent@google.com> am 41773d46: Merge "DO NOT MERGE Revert "Revert "AudioFlinger: mix track only when really ready (2)""" into ics-mr1

* commit '41773d46556aa47d4322ff89fdaf7d1345c2d1f2':
DO NOT MERGE Revert "Revert "AudioFlinger: mix track only when really ready (2)""
21e4b6ed00e814bffc70895847a4944d7a190020 24-Jan-2012 Eric Laurent <elaurent@google.com> AudioFlinger: refine mixer sleep time logic

When an AudioTrack is in underrun state, the AudioFlinger mixer will
sleep for a short period of time to give the app a chance to fill the
AudioTrack buffer. If the AudioTrack is still not ready during next mixing round,
the mixer will proceed with other tracks.

If an application keeps a steady underrun condition, the AudioFlinger mixer will
alternate between ready and not ready states. In the longer term this will cause the
audio HAL to underrun.
There is a mechanism to reduce the sleep period if the mixer is not ready several times in a
row but this mechanism is defeated by the alternating ready/not ready conditions.

The fix consists in only increasing sleep time if the mixer is ready for at least two
consecutive times.

Issue 5904527.

Change-Id: Id0139bca9be8c4e425ec6d428515c4d8f718e8c9
udioflinger/AudioFlinger.cpp
eaa0b5cc2f7723e9b25298126d0dcb48c56d5dac 24-Jan-2012 Eric Laurent <elaurent@google.com> DO NOT MERGE Revert "Revert "AudioFlinger: mix track only when really ready (2)""

This reverts commit b918035d34422a2041b6ec8c09c566bb93345b40.

Change-Id: I093bcfa56ad54a080b930208b6b79169d33581fb
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
15dfda272eec983508b89fb8bc9ca6f2bb825496 24-Jan-2012 Justin Ho <justinho@google.com> am fee5a860: Merge "DO NOT MERGE Revert "AudioFlinger: mix track only when really ready (2)"" into ics-mr1

* commit 'fee5a860a8355cda071ff23644e943414ba7f65d':
DO NOT MERGE Revert "AudioFlinger: mix track only when really ready (2)"
7baf7894bc2f1a62440f381eeb50143f210a5d61 23-Jan-2012 Justin Ho <justinho@google.com> DO NOT MERGE Revert "AudioFlinger: mix track only when really ready (2)"

This reverts commit 71c4496a9757438afd30b4404824f296f6158a49.

Change-Id: Iff10c49ea728bb10023ddeb50a3b708db770fff2
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
335787fe43596f38ea2fa50b24c54d0823a3fb1d 21-Jan-2012 Glenn Kasten <gkasten@google.com> Remove AudioFlinger dependencies on client

Change-Id: Ibb591e41a3ca5d7015e2b66b98b8fef5f415fb37
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
83d86538c4c479a9225c75ab27938e8f05abb9c8 17-Jan-2012 Glenn Kasten <gkasten@google.com> Make AudioTrack control block volume field private

This is part of the process of abstracting the control block
to make it easier to maintain.

Change-Id: Idb8f461e68dab3bcf268159cc0781651c6fb7094
udioflinger/AudioFlinger.cpp
58f30210ea540b6ce5aa6a46330cd3499483cb97 12-Jan-2012 Glenn Kasten <gkasten@google.com> Use audio_format_t consistently, continued

Was int or uint32_t.

When AudioFlinger::format can't determine the correct format,
return INVALID rather than DEFAULT.

Init mFormat to INVALID rather than DEFAULT in the constructor.
Subclass constructors will set mFormat to the correct value.

Change-Id: I9b62640aa107d24d2d27925f5563d0d7407d1b73
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
9bf3a2f69bbfa2562664181b779941e776b7e835 20-Jan-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Add ANativeWindow timestamp support to camera service."
d967f0a099db2b71597a3127134afd4a46287a4a 20-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Remove redundant get()"
7fc9a6fdf146ded90b51c52f4a05d797294dcb85 10-Jan-2012 Glenn Kasten <gkasten@google.com> Remove redundant get()

get() is almost always unnecessary, except in a LOG.
Also no need to check for != 0 before calling get().

Change-Id: Ib06e7a503f86cf102f09acc1ffb2ad085025516d
udioflinger/AudioFlinger.cpp
ea3cc3bca949139e401b77f2ac0cce7ac6e76f8f 20-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Remove dead setRingerMode(mode, mask)"
a3db30f7c53936a3acb87d2c44807ee2f0cfa16e 20-Jan-2012 Jean-Baptiste Queru <jbq@google.com> am 9d25b82d: Merge "Rename LOG_ASSERT to ALOG_ASSERT"

* commit '9d25b82d280c2d979d500e7da4447148f32f820b':
Rename LOG_ASSERT to ALOG_ASSERT
d746737921074e2a6c39c52b06022c5166689df5 20-Jan-2012 Jean-Baptiste Queru <jbq@google.com> am 6df477be: Merge "Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)"

* commit '6df477be186233e36fc370c4d2db6c1ed928a740':
Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)
daef36f5d4934bd055c694a8d54b86e2b50a6159 20-Jan-2012 Jean-Baptiste Queru <jbq@google.com> am a826f9e2: Merge "Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF)"

* commit 'a826f9e2c4f6329d8d48c927f6e942e78ffaf92f':
Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF)
3734cbca25c6d902677cfb5e59dff7a1cb17a45d 20-Jan-2012 Jean-Baptiste Queru <jbq@google.com> am 4f367f33: Merge "Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF)"

* commit '4f367f3387887c538c81c34cc8becaea6fa5e430':
Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF)
e744a90eb52bf9547848c08380cfb7ba7e63ffbc 20-Jan-2012 Jean-Baptiste Queru <jbq@google.com> am ba7f0d2a: Merge "Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF)"

* commit 'ba7f0d2a03643ce429421b81febf18fd50473070':
Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF)
ca05a87f4c69670a06bdee4b4f98bcdcd838beda 20-Jan-2012 Jean-Baptiste Queru <jbq@google.com> Merge ee4618bc

Change-Id: Ie1dc6ad38e7c30636d80f6caef11cf6673144940
39fd8eb956dea32692d3d72b10b64a8597df0a40 09-Jan-2012 Steve Block <steveblock@google.com> Rename LOG_ASSERT to ALOG_ASSERT

Change-Id: Ie2c7ea6560656d65bad791a61996174c75677517
udioflinger/AudioResampler.cpp
udioflinger/AudioResamplerCubic.cpp
9a8ded7348c5b2302dd27b285b395416bc842c49 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)

Change-Id: I1de629b4632a4b3187ca1a28d6416daccd35f924
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.cpp
udioflinger/AudioPolicyService.cpp
udioflinger/AudioResampler.cpp
amera/libcameraservice/CameraHardwareInterface.h
amera/libcameraservice/CameraHardwareStub.cpp
amera/libcameraservice/CameraService.cpp
amera/tests/CameraServiceTest/CameraServiceTest.cpp
aa70226152d2084f85a96b52359dbc8476a86a45 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF)

Change-Id: I8fbdfa7a7581f481968dbb65aa40f7042936d7cb
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.cpp
udioflinger/AudioPolicyService.cpp
udioflinger/AudioResamplerCubic.cpp
amera/libcameraservice/CameraService.cpp
53feeb42c721e8fc9285e35e679906a951f3277c 04-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF)

Change-Id: I26f76452ac49e2890b14d133c065493d8df0fb4a
udioflinger/AudioFlinger.cpp
udioflinger/AudioPolicyService.cpp
amera/libcameraservice/CameraHardwareInterface.h
amera/libcameraservice/CameraService.cpp
52546c0ef96aa3e7e21482e0f9b6e982557c8da9 20-Dec-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF)

Change-Id: I44f267700356967dc51e8f85ebf457dc85cfb229
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.cpp
udioflinger/AudioResampler.cpp
amera/libcameraservice/CameraHardwareStub.cpp
amera/libcameraservice/CameraService.cpp
amera/tests/CameraServiceTest/CameraServiceTest.cpp
3812256de32e73e38ba16e50ac0451c10223d4eb 20-Oct-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF)

Change-Id: I5321ebd12e9c6248a108529e82c4e1af2a4405e3
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.cpp
udioflinger/AudioPolicyService.cpp
udioflinger/AudioResampler.cpp
amera/libcameraservice/CameraHardwareInterface.h
amera/libcameraservice/CameraHardwareStub.cpp
aeeb7e219e34d2d657d829913659a4e10e976375 19-Jan-2012 Eric Laurent <elaurent@google.com> resolved conflicts for merge of 05683c85 to master

Change-Id: I7846b7da8c5813b7a9b1f3f71aede0229689ff0d
86905f445c96743b037eed6360afa956a85b019c 19-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Add units to time periods"
ca42b286a162f5cd6a4a916bfe429abe95780730 19-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Use const const strings for arrays and pointers to strings"
22ecc912a87099cff8cadc424cd12f85c118673f 09-Jan-2012 Glenn Kasten <gkasten@google.com> Add units to time periods

Change-Id: Ib980e2676cecf5d9b0c2e388da6dc8e370df8abb
udioflinger/AudioPolicyService.cpp
8dad0e31c2366c501bd1d600261d0af35a6ca786 09-Jan-2012 Glenn Kasten <gkasten@google.com> Use const const strings for arrays and pointers to strings

Change-Id: I0a073e17ebf6ad59e7edbedac104c6fa4bcaf9c9
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
f1d4592d4c3c99ebab55559e164ff102e825283e 14-Jan-2012 Glenn Kasten <gkasten@google.com> For booleans, use ! instead of == false

Change-Id: Ibc115936d2d0b0b7744ebe9b52839ea5b42c4edd
udioflinger/AudioFlinger.cpp
udioflinger/AudioPolicyService.cpp
0b07b8085d7b837b4dd5f09e0c8c39408f6bdbf7 18-Jan-2012 Glenn Kasten <gkasten@google.com> Remove dead setRingerMode(mode, mask)

Change-Id: Ia4cc8be8424a40b3dcb7ebd0264fdff4e5247f7f
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
2774144fa8283f1a7b43e17a53c97dec0c366dd3 18-Jan-2012 Eric Laurent <elaurent@google.com> AudioFlinger: mix track only when really ready (2)

This problem due to the way audio buffers are mixed when
low power mode is active was addressed by commits 19ddf0eb
and 8a04fe03 but only partially. As a matter of fact, when more
than one audio track is playing, the problem is still present.
This is most noticeable when playing music with screen off
and a notification or navigation instruction is played: in this case,
the music or notification is likely to skip.

The fix consists in declaring the mixer ready if all active tracks
are ready. Previous behavior was to declare ready if at least one track was
ready. To avoid that one application failing to fill the track buffer blocks other
tracks indefinitely, this condition is respected only if the mixer was ready
in the previous round.

Issue 5799167.

Change-Id: Iabd4ca08d3d45f563d9824c8a03c2c68a43ae179
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
04eaf3e5f20d7faa956c0d672024ffb5117f4c26 18-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Track volume cleanup"
63ad6aacc6ce6b729bf25f41376cfea731a2c1eb 18-Jan-2012 Eric Laurent <elaurent@google.com> Merge "audio framework: manage stream volume per device"
b1cf75c4935001f61057989ee3cf27bbf09ecd9c 17-Jan-2012 Glenn Kasten <gkasten@google.com> Track volume cleanup

Always read and write track volumes atomically. In most places this was
already being done, but there were a couple places where the left and
right channels were read independently.

Changed constant MAX_GAIN_INT to be a uint32_t instead of a float.
It is always used as a uint32_t in comparisons and assignments.
Use MAX_GAIN_INT in more places.

Now that volume is always accessed atomically, removed the union
and alias for uint16_t volume[2], and kept only volumeLR.

Removed volatile as it's meaningless.

In AudioFlinger, clamp the track volumes read from shared memory
before applying master and stream volume.

Change-Id: If65e2b27e5bc3db5bf75540479843041b58433f0
udioflinger/AudioFlinger.cpp
83844cc2f95dc279015b47fd1e18c7cb4eabe9a1 19-Nov-2011 Eric Laurent <elaurent@google.com> audio framework: manage stream volume per device

Improve volume management by keeping track of volume for each type
of device independently.
Volume for each stream (MUSIC, RINGTONE, VOICE_CALL...) is now maintained
per device.

The main changes are:
- AudioService now keeps tracks of stream volumes per device:
volume indexes are kept in a HashMap < device , index>.
active device is queried from policy manager when a volume change request
is received
initalization, mute and unmute happen on all device simultaneously
- Settings: suffixes is added to volume keys to store each device
volume independently.
- AudioSystem/AudioPolicyService/AudioPolicyInterface: added a device argument
to setStreamVolumeIndex() and getStreamVolumeIndex() to address each
device independently.
- AudioPolicyManagerBase: keep track of stream volumes for each device
and apply volume according to current device selection.

Change-Id: I61ef1c45caadca04d16363bca4140e0f81901b3f
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
ad0f6cc5e115ca167ff122c83451b46d85c590ac 17-Jan-2012 Glenn Kasten <gkasten@google.com> Remove dead setVolume() and mVolume[2]

Change-Id: I94b835434093e920432614eb5007101e87758f32
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
0696400a6bb9abbed62b3b9c6aa105495dc600a2 17-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Use audio_mode_t consistently"
263709e7be37c7040aaef385bc5c9389a9b5f514 06-Jan-2012 Glenn Kasten <gkasten@google.com> Check stream type in AudioFlinger::createTrack

A bad parameter to AudioFlinger::createTrack could cause mediaserver to crash.

Other AudioFlinger stream type cleanup:
- Simplify range check for audio_stream_type_t
- Add comment about mStreamTypes array initialization.

Change-Id: Ia33aa1cce0fdd694b08d9288816ffc097a9543d0
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioPolicyService.cpp
3944e0326a286bcb931551e61e79c033b10d09d4 17-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Fix locking for mMasterVolume and mMute"
613882293184e575a44bff681a3decaefe889e69 17-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Use size_t for frame size"
0107954f72153db747a3727dc1157e9236dfed90 17-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Use audio_stream_type_t consistently"
9806710f5d6722cfc5783c7eca3512451a0f2035 13-Dec-2011 Glenn Kasten <gkasten@google.com> Fix locking for mMasterVolume and mMute

mMasterVolume and mMute are both protected by mutex in AudioFlinger class, but
there were two places where they were accessed without a mutex.

Also make AudioFlinger::mMasterMute private not protected.

Change-Id: Ia3897daeb5c50313df5bcc071824357526237f3e
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
05632a5fa4b88ca474294887fc92a9fcdf0e2352 03-Jan-2012 Glenn Kasten <gkasten@google.com> AudioTrack and AudioFlinger send level cleanup

Add an API to control block for getting/setting send level.
This allow us to make the mSendLevel field private.

Document the lack of barriers.

Use 0.0f to initialize floating-point values (for doc only).

Change-Id: I59f83b00adeb89eeee227e7648625d9a835be7a4
udioflinger/AudioFlinger.cpp
b9980659501d0428d65d8292f3c32da69d37fbd2 11-Jan-2012 Glenn Kasten <gkasten@google.com> Use size_t for frame size

except in the control block, where we don't have room.

In AudioFlinger::ThreadBase::TrackBase::getBuffer,
read the frame size from control block only once.

Change-Id: Id6c4bccd4ed3e07d91df6bbea43bae45524f9f4e
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
fff6d715a8db0daf08a50634f242c40268de3d49 13-Jan-2012 Glenn Kasten <gkasten@google.com> Use audio_stream_type_t consistently

At native level it was a mixture of audio_stream_type_t, int, uint32_t,
and uint8_t. Java is still int. Also fixed a couple of hard-coded -1
instead of AUDIO_STREAM_DEFAULT, and in startToneCommand a hard-coded 0
instead of AUDIO_STREAM_VOICE_CALL.

Change-Id: Ia33bfd70edca8c2daec9052984b369cd8eee2a83
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
f78aee70d15daf4690de7e7b4983ee68b0d1381d 04-Jan-2012 Glenn Kasten <gkasten@google.com> Use audio_mode_t consistently

It was int or uint32_t.
Also make getMode() const.

Change-Id: Ibe45aadbf413b9158e4dd17f2b3bcc6355288d37
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
e3a067f8bc98134941ee1a4da8c2a92a15aaa9cc 11-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Simplify range check for audio_mode_t"
c40256146bee58bff09e1c16ef99ea06d31f89f9 11-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Use correct type for hardware call state"
2ea3410d0d3d592ce30c3ba0ce3e0e63b1244057 11-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Use consistent style of & reference for AutoMutex"
9770988e61961d34033fd2c12f0de85a267df68f 11-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "AudioFlinger new can't fail"
02b2d2dddc9be339cf7647d4ead53cecd1c51038 11-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Fix build warning"
9f3d5919b45c360f88510f7455279aebe810d56b 26-Jul-2011 Eino-Ville Talvala <etalvala@google.com> Add ANativeWindow timestamp support to camera service.

This allows the camera HAL to set ANativeWindow timestamps, which
are used by SurfaceTexture.

Bug-Id: 5081132
Change-Id: I123ea4c9d1824fb72146fad81ad03d1491e0a7f8
amera/libcameraservice/CameraHardwareInterface.h
930f4caa1e311ef7ff538c421a324396157eb24f 07-Jan-2012 Glenn Kasten <gkasten@google.com> Simplify range check for audio_mode_t

AudioSystem::setMode previously allowed negative modes, but these were
then rejected by AudioFlinger.

Now negative modes (including AUDIO_MODE_INVALID and AUDIO_MODE_CURRENT)
are explicitly disallowed.

Change-Id: I0bac8fea737c8eb1f5b6afbb893e48739f88d745
udioflinger/AudioFlinger.cpp
udioflinger/AudioPolicyService.cpp
c1dc1cb1d1eaf84e88669f1a5f22579a0d9237c2 09-Jan-2012 Steve Block <steveblock@google.com> Rename LOG_ASSERT to ALOG_ASSERT DO NOT MERGE

See https://android-git.corp.google.com/g/157519

Bug: 5449033
Change-Id: I8ceb2dba1b031a0fd68d15d146960d9ced62bbf3
udioflinger/AudioFlinger.cpp
udioflinger/AudioResampler.cpp
udioflinger/AudioResamplerCubic.cpp
5f29ca38b71506ad7c7cb9925efbddf588e9655b 09-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "By convention const goes before the type specifier"
25b248eb52a0a16adaef6b79c9d92cb88b9a2bc2 04-Jan-2012 Glenn Kasten <gkasten@google.com> Use cached reference to media.player service

This save unnecessary binder calls

Change-Id: I93a60efc54d9c8fb8fab706cd4477bbfd00ffec8
udioflinger/AudioFlinger.cpp
879bc64e43d62f2690c77a3282cef2e45d1b76e9 09-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Replace loop by __builtin_ctz"
febdbfec3b1ed0e20aa4f10bfdd82702d3e41f4b 09-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "suspended() and isSuspended() are const"
29357bc2c0dd7c43ad3bd0c8e3efa4e6fd9bfd47 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.cpp
udioflinger/AudioPolicyService.cpp
udioflinger/AudioResampler.cpp
amera/libcameraservice/CameraHardwareInterface.h
amera/libcameraservice/CameraHardwareStub.cpp
amera/libcameraservice/CameraService.cpp
amera/tests/CameraServiceTest/CameraServiceTest.cpp
0e5ace70ca8067fc2c3259fe041352d1dab7e1e2 07-Jan-2012 Eino-Ville Talvala <etalvala@google.com> am 4bc873e6: am 7944704e: Merge "Switch camera sounds to always use the system enforced audio stream." into ics-mr1

* commit '4bc873e6ff73200af866f8c9efca66ad8ed23682':
Switch camera sounds to always use the system enforced audio stream.
4a6f02833d8421b7d9b20f89729d8bb03b8b8102 07-Jan-2012 Glenn Kasten <gkasten@google.com> AudioFlinger new can't fail

Change-Id: I7dae05a5ea1c962a9975386eab1fedbbe106ffba
udioflinger/AudioFlinger.cpp
a7d8d6fc5e102a08b262a1b78aa1abeeb097d9e4 06-Jan-2012 Glenn Kasten <gkasten@google.com> Use consistent style of & reference for AutoMutex

AutoMutex, which is a typedef for Mutex::Autolock, is overloaded for
either a reference (&) or pointer (*) parameter, but we prefer to use
the reference form when the mutex is known at compile time.

Change-Id: I3515e6d6ab7959b2356a27fa3b04fd49e42cb31e
udioflinger/AudioFlinger.cpp
a4454b4765c5905f14186893b0688be375642283 04-Jan-2012 Glenn Kasten <gkasten@google.com> Use correct type for hardware call state

Change-Id: Ic6d98b129e3ec653df1d8f7e829adf8dccb4f378
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
60a78ac9535878984b0777788760b9ee7465c5e6 06-Jan-2012 Eino-Ville Talvala <etalvala@google.com> Switch camera sounds to always use the system enforced audio stream.

Instead of picking between the music stream and the enforced audio
stream, change the camera service to always play sounds through
enforced system stream. Also update the currently-hidden CameraSound
API to match.

Bug: 5778365
Change-Id: I3cc64b1d1ff567dbac8020a665d5b19846197ff3
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
54c3b66444ebfb9f2265ee70ac3b76ccefa0506a 06-Jan-2012 Glenn Kasten <gkasten@google.com> By convention const goes before the type specifier

Change-Id: I70203abd6a6f54e5bd9f1412800cc01212157e58
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
f9a27779634ce3a01e5957f234cd04eba74fa07f 06-Jan-2012 Glenn Kasten <gkasten@google.com> Fix build warning

Change-Id: Ic99608d0c14ed56c02f036e0bbaaae1b16bab8ba
udioflinger/AudioMixer.cpp
5ff1dd576bb93c45b44088a51544a18fc43ebf58 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.cpp
udioflinger/AudioPolicyService.cpp
udioflinger/AudioResamplerCubic.cpp
amera/libcameraservice/CameraService.cpp
98dd542ffcd3424b1da58bd273c0c1ff5b8c8960 15-Dec-2011 Glenn Kasten <gkasten@google.com> Replace loop by __builtin_ctz

Using the builtin is faster on some platforms, for example on ARM it's
19 instructions instead of 13, and is O(1) instead of O(n). Of course,
track creation is an inherently slow operation, so this doesn't matter
much now. But if we add support for virtual tracks, then physical tracks
will be allocated/freed more frequently. Also just on principle ...

Change-Id: I3f590934092bd7a1869cbedbc7357928aa5cc8ff
udioflinger/AudioMixer.cpp
8a08dcc0a5de19a904e77d5f31bed3dff9a59890 05-Jan-2012 Steve Block <steveblock@google.com> Merge "Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE"
a3a854868a80fd9b9b8720e06a172754943f9417 04-Jan-2012 Glenn Kasten <gkasten@google.com> suspended() and isSuspended() are const

Change-Id: I04b95970b5a645b64e7e64fffd46d868354dda66
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
88592eccaf6afcddd5f985955be92fe25205c680 05-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Remove the notion of "active track" from mixer"
a2a0a5d7d56baa831870f4bf2a0d942a477d92ef 05-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Use the standard CC_LIKELY and CC_UNLIKELY macros"
f6b1678f8f508b447155a81b44e214475ab634a8 15-Dec-2011 Glenn Kasten <gkasten@google.com> Use the standard CC_LIKELY and CC_UNLIKELY macros

Several source files privately defined macros LIKELY and UNLIKELY in terms
of __builtin_expect. But <cutils/compiler.h> already has CC_LIKELY and
CC_UNLIKELY which are intended for this purpose. So rename the private
uses to use the standard names.

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

Change-Id: I2494e087a0c0cac0ac998335f5e9c8ad02955873
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
7ab41c9f773ba599646f1b0d00955c1be80f92fd 05-Jan-2012 Eric Laurent <elaurent@google.com> resolved conflicts for merge of 1a4b9939 to master

Change-Id: I0c910d391a38a916d8431f7d1f5b82e39e1a66c2
df64d15042bbd5e0e4933ac49bf3c177dd94752c 04-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
udioflinger/AudioFlinger.cpp
udioflinger/AudioPolicyService.cpp
amera/libcameraservice/CameraHardwareInterface.h
amera/libcameraservice/CameraService.cpp
b8a805261bf0282e992d3608035e47d05a898710 20-Dec-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.cpp
udioflinger/AudioResampler.cpp
amera/libcameraservice/CameraHardwareStub.cpp
amera/libcameraservice/CameraService.cpp
amera/tests/CameraServiceTest/CameraServiceTest.cpp
071ccd5a9702500f3f7d62ef881300914926184d 23-Dec-2011 Eric Laurent <elaurent@google.com> audioflinger: fix clicks on 48kHz audio.

The calculation done in prepareTracks_l() for the minimum amount
off frames needed to mix one output buffer had 2 issues:
- the additional sample needed for interpolation was not included
- the fact that the resampler does not acknowledge the frames consumed
immediately after each mixing round but only once all frames requested have been used
was not taken into account.
Thus the number of frames available in track buffer could be considered sufficient although
it was not and the resampler would abort producing a short silence perceived as a click.

Issue 5727099.

Change-Id: I7419847a7474c7d9f9170bedd0a636132262142c
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/AudioResampler.h
9c56d4ae6212c21ce5fd71ed534eb195983a07c1 20-Dec-2011 Glenn Kasten <gkasten@google.com> Remove the notion of "active track" from mixer

This is a first step towards making the mixer more object-oriented.

Change-Id: Ifd445d0e471023a7f5c82e934736ffc95ba1b05b
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
12d9702773c8a3242a44dd6528126c9ff0dade43 20-Dec-2011 Glenn Kasten <gkasten@google.com> Merge "Remove dead code"
bbaf8673f1d1dd79d1b7f474ca7111da58e84aff 20-Dec-2011 Eric Laurent <elaurent@google.com> Merge "audio effects: rename configure command"
3d5188bd6abe55898f10a0edf3c05aff8aa2ef67 17-Dec-2011 Eric Laurent <elaurent@google.com> audio effects: rename configure command

Renamed audio effect library interface command for audio format
configuration from EFFECT_CMD_CONFIGURE to EFFECT_CMD_SET_CONFIG.
This makes the naming more consistent with other exixsting commands
and allow adding a new command to get the configuration (EFFECT_CMD_GET_CONFIG).
Same change for reverse channel configuration renamed from
EFFECT_CMD_CONFIGURE_REVERSE to EFFECT_CMD_SET_CONFIG_REVERSE.

Implemented EFFECT_CMD_GET_CONFIG in exisitng effect libraries.

Change-Id: Ia7b1c620f13797fe5aceb3b0b4acbacce09fb067
udioflinger/AudioFlinger.cpp
81a028fef62bcadf13fc8550067a3d29c918b3ca 15-Dec-2011 Glenn Kasten <gkasten@google.com> Remove dead code

Change-Id: Icf23f7f90fdeb660f4015f22cf239e6d05f5d03c
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
f602a5f7f29e694a7da4c143737b74501c00477d 17-Dec-2011 Glenn Kasten <gkasten@google.com> Merge "Use constants for 2 and 32"
d1e672acd8fa1af899f85ee2321327237028adf8 17-Dec-2011 Glenn Kasten <gkasten@google.com> Merge "Extract out audio DSP code to utility library"
bf71f1e7948406492376c6cbd5e6a30c8cb670e4 13-Dec-2011 Glenn Kasten <gkasten@google.com> Use constants for 2 and 32

Change-Id: If820dfd58b6df258570750610a07af99598d9e53
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
b92bc47a05925c29efef0d66711b6d3f17f406e7 16-Dec-2011 Glenn Kasten <gkasten@google.com> Merge "Use switch in AudioMixer::setParameter"
788040c5189bbdaf567ce4b29ffd1db08ea1020c 05-May-2011 Glenn Kasten <gkasten@google.com> Use switch in AudioMixer::setParameter

Replace series of if/then/elses by easier-to-read switch. Also return
void instead of status_t, since callers weren't checking it. Assert on
bad input parameters.

Change-Id: Ie1f0a297977b28501d20e1af819afed9b4750616
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
237a624f674800d2300806b115eee8c9bb7db033 16-Dec-2011 Glenn Kasten <gkasten@google.com> deleteTrackName now asserts on bad input parameter

This is safe, as the input parameter is always track->name(),
which must be valid.

Change-Id: Iea8ea3a5706c27026335526ba8851030d00681f8
udioflinger/AudioMixer.cpp
3b21c50ef95fe4e7ac3426ca14b365749e66ff08 15-Dec-2011 Glenn Kasten <gkasten@google.com> Extract out audio DSP code to utility library

Change-Id: Ib8ce72028a7ea30e82baa518e381370e820ebbd0
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
6d4bf6eda04888144ec59cba4816a2cbb79b9e5c 16-Dec-2011 Glenn Kasten <gkasten@google.com> Merge "setActiveTrack and setBufferProvider can't fail"
b87c068727a15a3d3f0bfdcb758c76a097f5e869 16-Dec-2011 Glenn Kasten <gkasten@google.com> Merge "Simplify enable/disable mixing"
079123ee3d2e20bbc17a7ddbd96ca46bed27898f 16-Dec-2011 Glenn Kasten <gkasten@google.com> Merge "Improve resistance to leaks for ConfigEvent"
26fa039c3752eaaf74d1be53d9795f48e9f43de3 16-Dec-2011 Glenn Kasten <gkasten@google.com> Merge "Use NULL not 0 for pointers"
fba380a0b2c62684ce4272a05165965bae29d6a1 16-Dec-2011 Glenn Kasten <gkasten@google.com> setActiveTrack and setBufferProvider can't fail

Return void, not status_t, from setActiveTrack and setBufferProvider.

These methods returned status_t, but the callers never checked the
return value. Since these aren't externally visible APIs, they now
return void, and assert on bad input parameters.

Change-Id: I530ed29484596ae41e8659826ca425149c51c2a1
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
1c48c3c61970527b97892ab6a2daae8eaac26964 15-Dec-2011 Glenn Kasten <gkasten@google.com> Simplify enable/disable mixing

The MIXING enum isn't needed, and now returns void instead of status_t.

Change-Id: Ibe4ec24081d75ad4ab78b9c7191fc9077959c4e9
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
f3990f2cc8fd824ae52a880a7b22248e1bdfb192 13-Dec-2011 Glenn Kasten <gkasten@google.com> Improve resistance to leaks for ConfigEvent

A Vector of pointers is risky, as there is no ownership (and the
ThreadBase destructor was not deleting them, so if there were any left
over at end it would leak). Replaced by a Vector of values.

Change-Id: Iddde72dc30134adfcf724dec26cbe0a742509b8c
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
e0feee3da22beeffbd9357540e265f13b2119cbb 13-Dec-2011 Glenn Kasten <gkasten@google.com> Use NULL not 0 for pointers

Change-Id: Iab3f9abbdab617dc5a599e657ec46a0b0a002eef
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
42968939dfce0954d6540011199045ec4ed7de80 15-Dec-2011 Glenn Kasten <gkasten@google.com> Merge "Fix indentation and whitespace"
a06a9a50b37d60e9c43c9de9f8ea3a8649cd5691 15-Dec-2011 Glenn Kasten <gkasten@google.com> Merge "Improve AudioFlinger error logging"
53a166cabc956529d2336b04c26b9c03b550ab38 15-Dec-2011 Glenn Kasten <gkasten@google.com> Merge "AudioMixer uninitialized simple fields"
0cfd8231e4c489392809bf44c174315df2690145 13-Dec-2011 Glenn Kasten <gkasten@google.com> AudioMixer uninitialized simple fields

Change-Id: I47e3849f048d4d990c9634f9c8a2ca2de0339e93
udioflinger/AudioMixer.cpp
d879601ace079e3c0aed79cf3fa5fb4db6ad4a9f 28-Oct-2011 Glenn Kasten <gkasten@google.com> Improve AudioFlinger error logging

Change-Id: I8ce9aff4038cd7fa0067600faa8080b137db1939
udioflinger/AudioFlinger.cpp
2eda60a8485cfe70a60e72156beffdc470ecb093 15-Dec-2011 Glenn Kasten <gkasten@google.com> Merge "Audio C++ comments"
c5ac4cb3a5124860ccfc7e4ff66251c55a5595ca 12-Dec-2011 Glenn Kasten <gkasten@google.com> Fix indentation and whitespace

Use git diff -w to verify.

Change-Id: Ib65be0a1ecf65d6cad516110604e3855bf68a638
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.cpp
c23bd9b5b9e4be9c395789810fdd8522296fc50c 15-Dec-2011 Glenn Kasten <gkasten@google.com> Merge "Use const char correctly in AudioFlinger"
e5dfcd8c6792c4b64120fd03708729b70a887f2a 15-Dec-2011 Glenn Kasten <gkasten@google.com> Merge "Use units after all times"
b299dc4ded29a226daac07f195d1558e660d2f9f 15-Dec-2011 Glenn Kasten <gkasten@google.com> Merge "Remove redundant clear()"
362c4e697d8e9c034e964ac7b40227e054491547 14-Dec-2011 Glenn Kasten <gkasten@google.com> Audio C++ comments

Change-Id: I84906ebb9dfcfa5b96b287d18364b407f02a30c1
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.h
d1d8f23dde239289ba8c0de0944baaca3586c880 08-Jul-2011 Glenn Kasten <gkasten@google.com> Fix includes

Remove unused #include dlfcn.h

Add #include String8.h
Forward class declaration is only for references and pointers.
In this case, we need the full class declaration,
and were incorrectly depending on another header file to do it.

Change-Id: Iff65cceb3982698cc1ebaeec405695fc190c03ff
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
91eb8bfbe253a6b6fe1aa23fb884a601c28991c4 13-Dec-2011 Glenn Kasten <gkasten@google.com> Remove redundant clear()

Change-Id: Ie5e4e63cbc8fa85ef50451dddf8f149fa864b132
udioflinger/AudioFlinger.cpp
ec1d6b5e17281a066d618f7fcd2b63b3ce11f421 12-Dec-2011 Glenn Kasten <gkasten@google.com> Use const char correctly in AudioFlinger

Use const char [] instead of const char * to eliminate unnecessary pointer.
Make the array audio_interfaces also const, in addition to the strings.

Change-Id: I31f33d1dcb9a657ee136f4280fd2d46492496831
udioflinger/AudioFlinger.cpp
7dede876998ff56351d495ec3a798c1b131193e8 13-Dec-2011 Glenn Kasten <gkasten@google.com> Use units after all times

Change-Id: I48d3f29c37228b5d03189e4c9600824c9360cac9
udioflinger/AudioFlinger.cpp
2013d4d159bfc29b4143d3b5fd4735f51a03684c 06-Dec-2011 Eric Laurent <elaurent@google.com> am 5433e25f: am 7b6aff23: Merge "audioflinger: fix audio skipping over A2DP" into ics-mr1

* commit '5433e25f6ce013860ff2a074ad8d1158cc39ab91':
audioflinger: fix audio skipping over A2DP
162b40bbaf3c3a24f61a6636bef6f80a9c0a31dd 05-Dec-2011 Eric Laurent <elaurent@google.com> audioflinger: fix audio skipping over A2DP

The maximum sleep time allowed in the mixer thread when audio tracks
are enabled but not ready for mixing is derived from the latency
reported by the output stream.
This does not work for A2DP where the latency also reflects encoding, decoding
and transfer time.

Modified activeSleepTimeUs() to take A2DP case into account.

Issue 5682206.

Change-Id: I3784ac01fb6f836b5a6ce6f764fb15347586de35
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
37a153f450cb8550fe64a1bf62366cf5e944d6ab 30-Nov-2011 Wu-cheng Li <wuchengli@google.com> Merge "Add camera focus move callback."
d620506220a15177942a8168d09c517740e908d0 14-Nov-2011 Wu-cheng Li <wuchengli@google.com> Add camera focus move callback.

bug:5534973
Change-Id: Iaadcb2738ad040f94849be30ee531326f6199431
amera/libcameraservice/CameraService.cpp
926798f8c21ab002d9797ef8973852a2612c1f75 23-Nov-2011 Eric Laurent <elaurent@google.com> am f6422f5f: am 20398fac: Merge "audioflinger: reduce sleep time to avoid underrun" into ics-mr1

* commit 'f6422f5f5d04aab47f8f36a0ea92e2140bed0105':
audioflinger: reduce sleep time to avoid underrun
7cafbb32999049873d4746ba83bd20c88abe6ce6 23-Nov-2011 Eric Laurent <elaurent@google.com> audioflinger: reduce sleep time to avoid underrun

Progressively reduce the sleep time applied in MixerThread::threadLoop()
in case of consecutive application underruns to avoid starving the audio HAL.
As the default sleep time is longer than the duration of an audio buffer
we ended up writing less data than needed by the audio HAL if
the condition persisted.

Issue 5553055.

Change-Id: I2b23ee79c032efa945025db228beaecd1e07a2e5
udioflinger/AudioFlinger.cpp
c23e2f2464eb3748599d47af7d8986b856f3c179 17-Nov-2011 Glenn Kasten <gkasten@google.com> Bug 5522189 re-enable ARM opts but disable inline

PIE did not work together with inlining. This change combines (almost
all of) the performance benefits of ARM optimizations together with PIE.

Change-Id: I4594d33ae5a0a7bac327ae08e30fb35343a06256
udioflinger/AudioResampler.cpp
c4795ecad4e5a0b3ec54862a40c82ef1ba53cd59 14-Nov-2011 Eric Laurent <elaurent@google.com> am 25924f8f: am 030bb998: Merge "audioflinger: fix noise when skipping to next song" into ics-mr1

* commit '25924f8f6c0a4ca4a2eb257b72d9625f69d2525e':
audioflinger: fix noise when skipping to next song
544fe9b6e9325701df4ab8c1d29774fc13c4cf6c 12-Nov-2011 Eric Laurent <elaurent@google.com> audioflinger: fix noise when skipping to next song

When audio effects are enabled, a noise can be heard at the
beginning of the new song when skipping to next song in music app.

This is because some effects (especially virtualizer) have a tail.
This tail was not played when previous song was stopped because effects were
not processed when no tracks were present on a given session. This is to
reduce CPU load when effects are enabled but no audio is playing.
The tail was then rendered when the new song was started.

Added a delay before stopping effect process after all tracks have been removed from a session.

Issue 5584880.

Change-Id: I815e0f7441f9302e8dfe413dc269a94e4cc6fd95
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
6977ca7d5ffdbc1610a95c74653b1fbe6a665f32 10-Nov-2011 Eric Laurent <elaurent@google.com> am db7d79e6: am 2b7f91b9: Merge "Fix regression for SoundPool playback" into ics-mr1

* commit 'db7d79e6f1e1860a9bfe4756a03c753435fd0ddf':
Fix regression for SoundPool playback
a47b69c6f7c6fe0044ebcb2d0790ce3548de56fd 09-Nov-2011 Eric Laurent <elaurent@google.com> Fix regression for SoundPool playback

Commit 19ddf0eb introduced a problem with applications (like SoundPool)
relying on an underrun condition to detect end of playback instead of
stopping the track when all data is written.
AudioFlinger would keep waiting for new data in case of partial buffer
filling and never reach the underrun condition.

Added a mechanism to wait no more than once if not enough frames are present
in the track buffer.

Issue 5585490.

Change-Id: I131e605ff6070831a01ddf734e68459e3bf2354b
udioflinger/AudioFlinger.cpp
3b86c964df855a9740c446e984309b719c3ec37c 08-Nov-2011 Eric Laurent <elaurent@google.com> am f3a892ab: Merge "AudioFlinger: mix track only when really ready" into ics-mr1

* commit 'f3a892ab9347ce733b81ccb4913a91c586f8f367':
AudioFlinger: mix track only when really ready
3dbe3201479828e84abe02e1fdd0a5d414c0ddb8 03-Nov-2011 Eric Laurent <elaurent@google.com> AudioFlinger: mix track only when really ready

The addition of low power audio playback mode made that audio buffer consumption
by audio HAL can now happen in bursts. This makes that requesting audio data
from an AudioTrack for mixing can happen at much shorter intervals than before.
This revealed an existing problem where AudioFlinger would consider a track ready
for mixing although not enough frames were ready to completely fill one output buffer,
thus creating short periods of silence.

The fix consists in waiting for enough frames to be ready in AudioTrack buffer before
declaring a track ready for mixing. This minimum is not applied when the track is stopped
to allow the buffer to be emptied completely.

Change-Id: I6d04f9b65db5af85b0b53f0a5674be7ec02f9e9f
udioflinger/AudioFlinger.cpp
305f4b6dabe500b97062e72049a296d0699243d7 28-Oct-2011 Glenn Kasten <gkasten@google.com> Bug 5522189 temporary workaround

Change-Id: I21d91d7a24df7bb6e7fc3d0fbc4786d55391fc0e
udioflinger/AudioResampler.cpp
3856b090cd04ba5dd4a59a12430ed724d5995909 20-Oct-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.cpp
udioflinger/AudioPolicyService.cpp
udioflinger/AudioResampler.cpp
amera/libcameraservice/CameraHardwareInterface.h
amera/libcameraservice/CameraHardwareStub.cpp
8888a75f01d904541e409e858d23e4150ace34b6 20-Oct-2011 Chih-Chung Chang <chihchung@google.com> Fix 5487571: Make sure shutter sound is played when it's enforced

Change-Id: I0c7adf452217b8308243836b40b1fba8f2029240
amera/libcameraservice/CameraService.cpp
a85a74a8219c03f2b1d1ef98f3f02e55f89f89a3 19-Oct-2011 Eric Laurent <elaurent@google.com> Fix issue 381905: BassBoostTest CTS tests fail...

When AudioEffectTest is executed, an Equalizer is created
and enabled on a MediaPlayer session. Effects on the output
mix are therefore suspended.
Then the MediaPlayer is released with the effect still enabled.
In this case, Audioflinger::purgeStaleEffects_l() fails to restore
the suspended effects when the effect attached to the released audio session
is removed.
When subsequent tests are executed on output mix effects, these effects cannot be
enabled as they are still suspended.

Fixed purgeStaleEffects_l() to restore suspended effects if the effect removed is enabled.

Also fixed EffectHandle::disconnect() to only restore suspended effects if the disconnected
handle actually has control over the effect.

Change-Id: I67232e7c34680b0cc01abfd57d5d510a524e5d4f
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
5c4e818c39ac2d2739675fe907904a874f7623c5 19-Oct-2011 Eric Laurent <elaurent@google.com> Limit AudioFlinger log.

AudioFlinger logs a warning when a write to the audio HAL
takes too long to return. The threshold for this warning is
a rule of thumb based on the assumption that the audio HAL will consume
buffers at a regular pace.
The introduction of low power audio mode with larger buffers and writes
occuring in bursts makes that this threshold is often exceeded resulting
in excessive and misleading warnings.

The threshold is raised to remove unwanted warnings but we should reconsider
the usefulness of this warning altogether.

Change-Id: I5ef6898ea28d879cede3e47da542a64092a3cca4
udioflinger/AudioFlinger.cpp
ff4f55c8d77e276dbcceedb4e560ca1d91ba38ba 17-Oct-2011 Chih-Chung Chang <chihchung@google.com> Fix 5468644: Use the proper audio stream type to play sound.

Change-Id: I80dd37da277b1810959a2dbdd852078b26f70cf5
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
5861a9a98c641261c4807c976c750e4611b3a57d 06-Oct-2011 Tyler Luu <tluu@ti.com> Add initialize method to CameraHardwareInterface

Add intialize() method to CameraHardwareInterface so we can
return a proper error value to CameraService if open of camera
hardware module fails.

b/5405235

Change-Id: I09c627034ddd22a5753c5163392c4fcff301e0b9
Signed-off-by: Tyler Luu <tluu@ti.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
amera/libcameraservice/CameraHardwareInterface.h
amera/libcameraservice/CameraService.cpp
6c904e26d4cd7a79f589e613fa7b2866a9fccb15 07-Oct-2011 Chih-Chung Chang <chihchung@google.com> Merge "Allow shutter/recording sound to be adjusted unless it's forced."
3e754efaddf3e221bcae6fe836d7553185d01944 07-Oct-2011 Wu-cheng Li <wuchengli@google.com> Merge "Allow Camera.setDisplayOrientation to be called when preview is active."
b9f588677910cac6ffc0346092bfcfe1c6620b90 07-Oct-2011 Wu-cheng Li <wuchengli@google.com> Allow Camera.setDisplayOrientation to be called when preview is active.

bug:5422679

Change-Id: I4c936ab00428fc158b5947fe8f10b1028869bbdb
amera/libcameraservice/CameraService.cpp
90f4bc2a3d361252df898fa31a99f4120aeefb27 07-Oct-2011 Chih-Chung Chang <chihchung@google.com> Allow shutter/recording sound to be adjusted unless it's forced.

Change-Id: I7080d5f50a87f92c8e9395d4cf8f927a6760fa70
amera/libcameraservice/CameraService.cpp
ec35a1416472865dbebc22b10199ad718ed2cc95 06-Oct-2011 Eric Laurent <elaurent@google.com> Fix issue 5381089: problem with A2DP music volume

This problem only occurs when audio effects are present and
the music volume is applied by one effect engine.
When connecting or disconnecting A2DP, audio effects are moved from
one mixer thread to another. When removed from the source thread,
the effect is stopped but it is not restarted when added to the
destination thread.
This regression was introduced by commit 21b5c47e.

Change-Id: I4cc578d8d760ec65b185032b6fda98c739d331bc
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
9d18ec574f5d847a86a21594ac39394ef5b108fc 27-Sep-2011 Eric Laurent <elaurent@google.com> Fix issue 5373658: memory leak in AudioFlinger.

Unlink PowerManagerService binder interface death recipient
in ThreadBase destructor.

Change-Id: Iab06ae9a8a6737bb002b6416a157b0fb50c11ad5
udioflinger/AudioFlinger.cpp
6bffdb8b598a2399e57f6ca48660fb7bdb2490b5 23-Sep-2011 Eric Laurent <elaurent@google.com> Fix issue 5355047: Automated effect tests fail.

Fixed several regressions in automated audio effect tests due
to changes in effect framework and visualizer FFT output range.

- Do not suspend Volume effect on session 0 when effects are
enabled on specific sessions.
- Adapt energy detection thresholds to new visualizer FFT range.
- Leave more time for BassBoost and Virtualizer effects to ramp up
before measuring the effect.
- Removed second insert reverb left by mistake on the player session
in preset reverb test.

Change-Id: I7a1ad1372d783fa7900eb9dd1d3b47f54d8d766f
udioflinger/AudioFlinger.cpp
eb8b914ad9d4331e1cdf4346731770ce69fd0e77 16-Sep-2011 Nick Kralevich <nnk@google.com> AudioResampler: use relative instead of absolute labels

This change is needed to allow Android to compile with -fPIE
Bug: 5328392

Change-Id: I84d947975776800a7b79c6ac75a881af461a631c
udioflinger/AudioResampler.cpp
60cd0a0d488e604d27fc7dbb02b00348693dfde2 13-Sep-2011 Eric Laurent <elaurent@google.com> Issue 4345021: Audio routed to multiple devices...

There is a possiblility that the condition on which RecordThread::checkForNewParameters_l()
waits after updating the command completion status is never signalled.
This happens if the thread executing ThreadBase::setParameters() has timed out waiting
for the status (for instance if the audio HAL takes too long to execute the setParameters()
command. Then the RecordThread is stuck forever.

The fix consists in waiting for the condition with a timeout in RecordThread::checkForNewParameters_l().

Change-Id: I7fc671bc2fc43ba4acb65a2beb33ee05742f091e
udioflinger/AudioFlinger.cpp
a8e409f8f9b40737d0b03355894b5e141d0aff6b 30-Aug-2011 Wu-cheng Li <wuchengli@google.com> Add video snapshot camera parameter.

The API is still hidden.

bug:5187868

Change-Id: I59e1b5774ca32be049723d1a0887faa90d8884bb
amera/libcameraservice/CameraService.cpp
b76e90de3c64626fe07a68469d0a59a31c8efb6b 30-Aug-2011 Eric Laurent <elaurent@google.com> Merge "226483: A2DP connected, but music out to speaker"
9f6530f53ae9eda43f4e7c1cb30d2379db00aa00 30-Aug-2011 Eric Laurent <elaurent@google.com> 226483: A2DP connected, but music out to speaker

When the A2DP headset is connected, there is a possible
race condition when the audio tracks are moved from
the mixer thread attached to the speaker output to the thread
attached to A2DP output.
As the request to clear the stream type to output mapping cache in
the client process is asynchronous, it is possible that the flag
indicating to the client audio track to re-create the IAudioTrack
on the new thread is processed before the cache is invalidated.
In this case, the track will be attached to the old thread and
music will continue playing over the device speaker instead of being
redirected to A2DP headset.

Change-Id: Ib2ce1eb5320eaff83287b93779061bf4e7a330df
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
bee5337da7659b3b7128622ba1f42618b11df5be 29-Aug-2011 Eric Laurent <elaurent@google.com> Audioflinger: reverse logic of BT NREC indication

The interpretation of BT NREC by AudioFlinger to enable
or disable AEC and NS was wrong: NREC to ON (default) means
the phone (Audio Gateway) must enable local AEC and NS.

Change-Id: I88a264e7fc9831c43bbace4f6b585baec73f2006
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
a1884f9e9ec3836683efd7eb333ee442e8bc9d56 23-Aug-2011 Eric Laurent <elaurent@google.com> AudioFlinger: add check for audio HAL init failure

Do not call audio HAL functions on the primary HW interface
if it could not be initialized properly.

Change-Id: If54059c8fd188d6c1686f9e0439994fe9411478a
udioflinger/AudioFlinger.cpp
a5cc7cce9b8aee73b08f6532710e186c02fdd1c0 03-Aug-2011 Eric Laurent <elaurent@google.com> Issue 5081351: isWiredHeadsetOn() permission.

AudioManager.isWiredHeadsetOn() should not require permission MODIFY_AUDIO_SETTINGS.
Remove permission checks on all getters in audio policy manager as permission enforcement
is really usefull for setters.
Also deprecate AudioManager.isWiredHeadsetOn() which name and implementation are deceptive.

Change-Id: I38f8df7c26c0d417bf0e2b74e4c11c2d143f2ecd
udioflinger/AudioPolicyService.cpp
0270b188aa3929cc512ec6869caba1d6b60cc08c 12-Aug-2011 Marco Nelissen <marcone@google.com> Don't remove effects on session 0

b/5159902
Change-Id: Id6f29fb1c687069f7480dd81d4745a558f202226
udioflinger/AudioFlinger.cpp
db7c079f284f6e91266f6653ae0ec198b1c5006e 10-Aug-2011 Eric Laurent <elaurent@google.com> Audio effects: track CPU and memory use separately

Before this change, CPU and memory usage for an audio effect were
registered and checked against the limit by audio policy manager
upon effect instantiation. Even if an effect was not enabled
it would prevent another effect to be created if the CPU load budget
was exceeded, which was too restrictive.

This change adds a method to register/unregister CPU load only when
an effect is enabled or disabled.
It also adds a mechanism to place all effects on the global output mix
in suspend state (disabled) when an effect is enabled on a specific session.
This will allow applications using session effects to have the priority
over others using global effects.

Also fixes some issues with suspend/restore mechanism:
- avoid taking actions when an effect is disconnected and was not enabled.
- do not remove a session from the suspended sessions list when corresponding
effect chain is destroyed.

Change-Id: I5225278aba1ae13d0d0997bfe26a0c9fb46b17d3
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
3a34befc6fb04a4945a849e8bda8b84e4bf973fe 02-Aug-2011 Marco Nelissen <marcone@google.com> Keep effects sessions active when the caller dies.

Don't remove effects until the session they are in goes away or all
AudioEffects have been explicitly released. This allows the control
panel process to die without stopping the effects.

Change-Id: I4496e5df080230ca1af149dec95c1309ab8ea888
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
c3e6572e0ff535932b1f6ffb7bcf5acd891675fb 08-Aug-2011 Eric Laurent <elaurent@google.com> Merge "AudioFlinger: protect input/output stream access"
b8ba0a979067a4efb0b3819bf17770793e41c15e 08-Aug-2011 Eric Laurent <elaurent@google.com> AudioFlinger: protect input/output stream access

Some methods would not check that the output orinput stream of a thread
was still valid before calling functions on its interface.
This could cause a crash if those methods where called while the output or
input was being closed by another thread.

Make sure that the output or input stream pointer is cleared before closing the
stream.
Always check that the output or input pointer is not null before calling
functions at the stream interface.
Generalize the use of initCheck() method to verify that the output or input
stream is not null.

Change-Id: I9d9ca6b744d011bcf3a7bbacb4a581ac1477bfa5
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
59bd0da8373af0e5159b799495fda51e03120ea4 01-Aug-2011 Eric Laurent <elaurent@google.com> AudioFlinger: disable AEC and NS with BT headsets

Disable AEC and NS when the Bluetooth SCO headset in use indicates it
implements those pre processings.

Change-Id: I93f3d10b0a27243d5dbff7182639576fc0c6d862
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
59255e4fc7d8ff52874b85b1988dc0785140cf81 28-Jul-2011 Eric Laurent <elaurent@google.com> Audio Effect Framework: add effect suspend/restore

Add the possibility for the effect framework to suspend
(temporarily disable process) and restore audio effects.
This feature will be usefull to disable pre processing under certain
conditions and better control coexistence of audio effects
on output mix and specific sources.

Change-Id: I79b195982cc48748d5708308fb1647b9c3c34cc6
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
57c86189bc07d9ccb0fd044e66df736d0bf19639 29-Jul-2011 Wu-cheng Li <wuchengli@google.com> Pass camera frame metadata from camera service to Java.

bug:4460717
Change-Id: I2fae6e1dfca6b8f3a5ee5716fc7817f5417bf657
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
c3da3434cb57f47284ea06bb9065eaa2fe033efb 30-Jul-2011 Mathias Agopian <mathias@google.com> connect/disconnect is now called from our EGL wrapper

the original connect/disconnect hooks are deprecated
and replace by api_connect/api_disconnect. the original
hooks are no no-ops.
api_connect/api_disconnect is now only called from the
android framework.

Bug: 5057915
Change-Id: I8ca64cd1acd6cabf915bf54689ec2e5f6dfa495a
amera/libcameraservice/CameraService.cpp
0065ef783eca9b5e0abb230c422e05ac73d2eff7 29-Jul-2011 Wu-cheng Li <wuchengli@google.com> Merge "Add frame metadata parameter to camera data_callback."
ff09ef8f18eed29bce50c7817df2fd52d2b50cf6 27-Jul-2011 Wu-cheng Li <wuchengli@google.com> Add frame metadata parameter to camera data_callback.

bug:4460717
Change-Id: Ib47d7d7df20af8155a719f3dabefe030893bfebc
amera/libcameraservice/CameraHardwareInterface.h
amera/libcameraservice/CameraHardwareStub.cpp
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
6dbe883644940badc684957cfc381bfd115f205e 28-Jul-2011 Eric Laurent <elaurent@google.com> Fix issue 5090721: audio record broken

Commit 6dbdc40 introduced a deadlock when exiting the
AudioFlinger RecordThread.

Change-Id: I1f63e54c5aeff05da4e4d028b53f734c62c78677
udioflinger/AudioFlinger.cpp
85fb61eb8b39d4d3fcebc796c3f7ade1d58567aa 27-Jul-2011 Iliyan Malchev <malchev@google.com> libcameraservice: call put_parameters on camera HAL

Change-Id: I492d1034ade50f9e157141debaa9783a90a04a91
Signed-off-by: Iliyan Malchev <malchev@google.com>
amera/libcameraservice/CameraHardwareInterface.h
a7280a59259018d997896c043fd2db95f631f12e 27-Jul-2011 Eric Laurent <elaurent@google.com> Merge "AudioFlinger: fix crash when deleting pre process."
ec437d8d3db79459d7b19e1734e6fe309bd621e8 27-Jul-2011 Eric Laurent <elaurent@google.com> AudioFlinger: fix crash when deleting pre process.

If a pre processing effect is detroyed while enabled and capture is active,
there was a possibility that the effect engine is released by the framework
while still processed by the audio HAL.

The fix consists in not releasing the engine in EffectModule::removeHandle()
but just flag the effect as being detroyed to avoid further calls to functions
on the engine effect interface.
The effect interface is then removed from the audio HAL safely in
EffectChain::removeEffect_l() while holding the EffectChain mutex.

Change-Id: I71fab30d9145062af8644f545a1f1d4d3e7e7f02
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
feb0db689c17dced50afaee54c659f1676e2d505 22-Jul-2011 Eric Laurent <elaurent@google.com> Fix issue 4604090: notification sound interrupted.

The problem is that the audio HAL fails to acquire the wake lock when playing the notification.
This is because of a change that removed the mediaserver process form the system group for honeycomb.

The fix consists in requesting the wake lock from PowerManagerService when AudioFlinger mixer
wakes up.

A consequence of this change is that audio HALs or pcm drivers do not have to hold wake locks
anymore as in the past.

Change-Id: I4fb3cc84816c9c408ab7fec75886baf801e1ecb5
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
57dae99c9fcd6becd2b5ed0c53f277ba4d7dbcfc 24-Jul-2011 Eric Laurent <elaurent@google.com> Added APIs for audio preprocessing

Added APIs to control pre processes applied on captured audio.
Those APIs are still hidden until reviewed by API council.

Three types of standard pre processes are supported:
- Automatic Gain Control (AGC) by AutomaticGainControl class
- Acoustic Echo Cancellation (AEC) by AcousticEchoCanceler class
- Noise Suppression (NS) by NoiseSuppressor class

A method is added to AudioEffect class to query audio pre processings
applied by default by the platform on a given AudioRecord session ID.

Change-Id: I0b9fceeb8c704dd06319c3b52b85c96fe871d51d
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
1d2bff0e588afe183a1baaae731519b4e957bbdb 25-Jul-2011 Eric Laurent <elaurent@google.com> AudioFlinger: add dump of audio pre processing.

Dump of media.audio_flinger service was only listing effects on output threads.
Moved the dump of effect chains from PlaybackThread to ThreadBase class so that
pre processings on RecordThread are also listed.

Change-Id: If8bc74023c12b9c2371f1b300743b156ceca7b87
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
edc15ad8fcde12dc4f642d80d077239b1532eeca 22-Jul-2011 Eric Laurent <elaurent@google.com> Fix issue 4988574: 8 bit PCM audio playback broken.

Fixed regression in audio track control block frame size
calculation introduced by commit c310dcb.

Change-Id: Ia731b946ae4e43316b98d80229e3b08a696e47d6
udioflinger/AudioFlinger.cpp
0cd7889d37cc60300dceaa975dab041fd35e34fd 21-Jul-2011 Eric Laurent <elaurent@google.com> Merge "Audio framework: support for audio pre processing"
2cd60e3069e93c11676019c8405d3941cd2ac5b7 19-Jul-2011 Wu-cheng Li <wuchengli@google.com> Merge "Disconnect the native window in CameraService::Client::disconnect."
7574da5a501fc9289fee49fdaf1fdb9d47dae2b6 19-Jul-2011 Wu-cheng Li <wuchengli@google.com> Disconnect the native window in CameraService::Client::disconnect.

bug:5048372
Change-Id: I6886907a672ddf5580b988ca5bc13e3dc26d4385
amera/libcameraservice/CameraService.cpp
9bc7af17974f448291a44912566ec7472a0d798b 19-Jul-2011 Mathias Agopian <mathias@google.com> use SurfaceTexture new scaling mode in SF

SF now obeys SurfaceTexture's scaling mode instead
of inferring it from the buffer's size

Change-Id: I4d50e9851abedd7e64bfcfc8af9eefb9fb668529
amera/libcameraservice/CameraService.cpp
630e65cc858d7592446c5f9174e713e29d58588b 19-Jul-2011 Jamie Gennis <jgennis@google.com> Merge "CameraService: (dis)connect from preview windows"
7c7f10bd4fda9a084e5e7f0eb3a040dfcbf01745 18-Jun-2011 Eric Laurent <elaurent@google.com> Audio framework: support for audio pre processing

Audio effect framework is extended to suport effects on
output and input audio path.

AudioFlinger: Support for audio effects and effect chains is
moved from PlaybackThread class to ThreadBase class so that
RecordThread can manage effects.
Effects of type pre processing are allowed on record thread
only. When a pre processing is enabled, the effect interface handle is
passed down to the input stream so that the audio HAL can call the
process function. The record thread loop calls the effect chain process
function that will only manage the effect state and commands and skip the
process function.

AudioRecord: The audio session is allocated before calling getInput() into
audio policy serice so that the session is known before the input theead is
created and pre processings can be created on the correct session.

AudioPolicyService: default pre processing for a given input source are
loaded from audio_effects.conf file.
When an input is created, corresponding effects are created and enabled.

Change-Id: Id17119e0979b4dcf189b5c7957fec30dc3478790
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
e0b5bb23f0a26d248275d203885b820659da7320 16-Jul-2011 Glenn Kasten <gkasten@google.com> Merge "Log CPU usage"
4d8d0c30abfa4b8d75866d42094cc797e05068fa 09-Jul-2011 Glenn Kasten <gkasten@google.com> Log CPU usage

Change-Id: Ie447e59be139153e526b7ad467c46c659d26816f
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
0ed3ec00d0242c9dc77532fe0cf0082645b6662c 14-Jul-2011 Jamie Gennis <jgennis@google.com> CameraService: (dis)connect from preview windows

This change makes CameraService connect and disconnect from preview
windows (Surfaces and SurfaceTextures) that get set.

Change-Id: I726971688367d5ce0d9aa90c44168037bce33deb
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
81eedd1746be590d5d506dfb9ff23619f9d9898f 13-Jul-2011 Mike Lockwood <lockwood@android.com> Remove some #ifdef HAVE_ANDROID_OS that were needed for the simulator build

Change-Id: I13d9f251f86c05ae5405f37adbf6b8e9660935ba
Signed-off-by: Mike Lockwood <lockwood@android.com>
udioflinger/AudioPolicyService.cpp
319d2e3f4e17a14c9af55ee0a7bcd180d1ce68a5 13-Jul-2011 Mathias Agopian <mathias@google.com> get rid of overlay HAL

Change-Id: I461f633d172ab10e05326ef10544c67dea664c0e
amera/tests/CameraServiceTest/CameraServiceTest.cpp
5e0067b486c3862316aa1f293cf9690c0cf54bda 12-Jul-2011 Jeff Brown <jeffbrown@google.com> Remove the simulator target from all makefiles.
Bug: 5010576

Change-Id: I04d722f258951a3078fe07899f5bbe8aac02a8e8
udioflinger/Android.mk
619d29fa1f5efab134441418d82a82a573b4de46 09-Jul-2011 Jeff Brown <jeffbrown@google.com> Eliminate single-process mode.
Bug: 5010576

Change-Id: Id450dc83efed4897d1e4ff451530fed14457aace
amera/libcameraservice/CameraHardwareStub.h
6c21234e3d254fc58227cd2063500a0dcd173689 08-Jul-2011 Glenn Kasten <gkasten@google.com> Merge "Fix build warning; LOG_TAG was misplaced"
5159c7ec97b575c0486159f0543d2da90c3c3b68 08-Jul-2011 Glenn Kasten <gkasten@google.com> Fix build warning; LOG_TAG was misplaced

Change-Id: I4fb0590f626445188f9053367707878b2fa0fa30
udioflinger/AudioResamplerCubic.cpp
6d8b694d999e9be7d5dcc336535832a80fb6f61f 24-Jun-2011 Eric Laurent <elaurent@google.com> Moved and renamed effect API header files

Moved specific effect header files to
system/media/audio_effects/include/audio_effects
and renamed to lower case (effect_xxx.h).

Change-Id: Icfc2264bfd013cab0395d7e310ada636b9fe3621
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
1e06f435434681f8750cc21763868fd025e8480e 17-Jun-2011 Sundar Raman <sunds@ti.com> CameraService: Decouple dequeue and lock

Decouple lockBuffer from dequeueBuffer. Add lock_buffer to preview_stream_ops,
so HALs will be fully in charge of managing buffers.

Change-Id: I7b53487d618bdf08ba904c5a0f41af462a7ca773
Signed-off-by: Iliyan Malchev <malchev@google.com>
amera/libcameraservice/CameraHardwareInterface.h
4ca2c7c913f8bd4ada13aca56d36045d42d1e00f 01-Jun-2011 Wu-cheng Li <wuchengli@google.com> Add framework support for camcorder zoom.

The purpose of ICameraRecordingProxy and ICameraRecordingProxyListener is to
allow applications using the camera during recording.

Camera service allows only one client at a time. Since camcorder application
needs to own the camera to do things like zoom, the media recorder cannot
access the camera directly during recording. So ICameraRecordingProxy is a proxy
of ICamera, which allows the media recorder to start/stop the recording and
release recording frames. ICameraRecordingProxyListener is an interface that
allows the recorder to receive video frames during recording.

ICameraRecordingProxy
startRecording()
stopRecording()
releaseRecordingFrame()

ICameraRecordingProxyListener
dataCallbackTimestamp()

The camcorder app opens the camera and starts the preview. The app passes
ICamera and ICameraRecordingProxy to the media recorder by
MediaRecorder::setCamera(). The recorder uses ICamera to setup the camera in
MediaRecorder::start(). After setup, the recorder disconnects from camera
service. The recorder calls ICameraRecordingProxy::startRecording() and
passes a ICameraRecordingProxyListener to the app. The app connects back to
camera service and starts the recording. The app owns the camera and can do
things like zoom. The media recorder receives the video frames from the
listener and releases them by ICameraRecordingProxy::releaseRecordingFrame.
The recorder calls ICameraRecordingProxy::stopRecording() to stop the
recording.

The call sequences are as follows:
1. The app: Camera.unlock().
2. The app: MediaRecorder.setCamera().
3. Start recording
(1) The app: MediaRecorder.start().
(2) The recorder: ICamera.unlock() and ICamera.disconnect().
(3) The recorder: ICameraRecordingProxy.startRecording().
(4) The app: ICamera.reconnect().
(5) The app: ICamera.startRecording().
4. During recording
(1) The recorder: receive frames from ICameraRecordingProxyListener.dataCallbackTimestamp()
(2) The recorder: release frames by ICameraRecordingProxy.releaseRecordingFrame().
5. Stop recording
(1) The app: MediaRecorder.stop()
(2) The recorder: ICameraRecordingProxy.stopRecording().
(3) The app: ICamera.stopRecording().

bug:2644213

Change-Id: I15269397defc25cbbcae16abc071c8349c123122
amera/libcameraservice/CameraService.cpp
671a636931295d9c33ffca74551a804479d01241 17-Jun-2011 Eric Laurent <elaurent@google.com> Added audio_bytes_per_sample() helper function

Change-Id: Ibfcd75c4c241a53d5f052c25ada091904991048a
udioflinger/AudioFlinger.cpp
01bded1246cd770b54b8011527f5c29e1b5663e3 16-Jun-2011 Wu-cheng Li <wuchengli@google.com> Merge "Allow camera to be disabled via Device Policy Manager"
7394a4f358fa9908a9f0a7c954b65c399f4268e6 14-Jun-2011 Dima Zavin <dima@android.com> audio: update for audio/audio_policy header names/locations

Change-Id: I36c49352eee57559403cd1597f56a8485a360289
Signed-off-by: Dima Zavin <dima@android.com>
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
afcedc9e6f17d8213d9bd8f6c36643dcc816d0ef 11-Jun-2011 Iliyan Malchev <malchev@google.com> CameraService: return stide when dequeueing a buffer

Change-Id: I11c7f0b57f7d619cdc392b2d34c538ae898de7ac
Signed-off-by: Iliyan Malchev <malchev@google.com>
amera/libcameraservice/CameraHardwareInterface.h
26adde897188059057b3ffcfde1d60171fc6888c 07-Jun-2011 Iliyan Malchev <malchev@google.com> frameworks/base: updates for camera HAL memory management

-- when the camera HAL allocates memory
-- it requests is as N buffers by S bytes each
-- it may specify a file descriptor to get mmapped; if -1, then we use ashmem
-- when issuing data and data-timestamp callbacks, the camera HAL specifies a
buffer index
-- range checking is performed on the buffer indices
-- memory requested by a camera HAL is not incStrong'ed, and needs to be
expliciftly released by the camera HAL (by calling the release method on the
camera_memory_t handle)

Change-Id: I0f09603aa786c238590e7288388ab673787e6032
Signed-off-by: Iliyan Malchev <malchev@google.com>
amera/libcameraservice/CameraHardwareInterface.h
0512ab559d4670c2204078470d7ef5d376811c57 05-May-2011 Glenn Kasten <gkasten@google.com> Remove dead code related to gettid

The gettid system call is always available now.

Change-Id: Ib78b41781eda182dc8605daf456bbea7ff7c2dc0
udioflinger/AudioFlinger.cpp
udioflinger/AudioPolicyService.cpp
0d255b2d9061ba31f13ada3fc0f7e51916407176 25-May-2011 Jean-Michel Trivi <jmtrivi@google.com> Use channel mask instead of channel count for track creation

Record and playback objects (resp AudioRecord and AudioTrack)
are created using a channel mask, but this information is lost
in the mixer because only the channel count is known to
AudioFlinger. A channel count can always be derived from a
channel mask.

The change consists in:
- disambiguiting variable names for channel masks and counts
- passing the mask information from the client to AudioFlinger
and the mixer.
- when using the DIRECT ouput, only verifying the format of
the track is compatible with the output's for PCM.

Change-Id: I50d87bfb7d7afcabdf5f12d4ab75ef3a54132c0e
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
a3355430a36bbfa7b2c0d90eb30834f1c5dac337 20-May-2011 Wu-cheng Li <wuchengli@google.com> Allow camera to be disabled via Device Policy Manager

bug:4185309

Change-Id: I8be89d892b8f540fd05913c93f97b92346a0a282
amera/libcameraservice/CameraService.cpp
65580f9adf6c4d98449ad0716488f9fe3869aa5a 28-May-2011 Eric Laurent <elaurent@google.com> Removed interface to load audio effects libraries

Removed unused functions allowing dynamic loading of audio effects libraries
from effects factory API.

Change-Id: I06cc5a51dc10aca87c7a8687bbb874babd711eca
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
e1315cf0b63b4c14a77046519e6b01f6f60d74b0 18-May-2011 Eric Laurent <elaurent@google.com> New effect library API

Moved and renamed media/EffectApi.h to hardware/audio_effect.h
Modified the effect library API to expose a library info structure
containing an interface functions table.
Also removed enums for audio channels, audio format and devices
from effect API and use values from system/audio.h instead.

Modified effects factory to support new library interface format and
load libraries and efffects listed in audio_effects.conf file.
The file audio_effects.conf is first loaded from /vendor/etc and
then from /system/etc/audio_effects.conf if not found.

Modified existing effect libraries to implement the new library interface.

Change-Id: Ie52351e071b6d352fa2fbc06c3846686f8c45df9
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
162f7d15ac5c8c23d1c3de171239f3a4e6e06b2a 23-May-2011 Glenn Kasten <gkasten@google.com> Merge "HAVE_ANDROID_OS AUDIOFLINGER_SECURITY_ENABLED dead"
6708b9a3fb654f5623ba5a696288fdba310a5e1a 13-May-2011 Eric Laurent <elaurent@google.com> Merge "Fix audio effect framework issues"
b469b9490b3cd9e0f0466d9b9ab228f6c793b82e 09-May-2011 Eric Laurent <elaurent@google.com> Fix audio effect framework issues

Fix two issues in audio effect framework reported by partners.

1 - Fixed duplicated audio buffer sent to effect process function when
pausing a track.
Modified Effectchain::process_l() function to clear the effect chain
input buffer before calling the effect process functions when no track
is active on the session. Previous code was clearing the buffer after
calling the process functions and when transitioning from active
to inactive, the last processed buffer was passed again once to effect
process function before being cleared.

2 - Fixed potential mutex cross deadlock when disconnecting an effect
while playback is active. This is because EffectChain::process_l()
was calling PlaybackThread::hasAudioSession() thus creating an inversion
in the mutex lock order (EffectChain mutex locked before ThreadBase mutex).
The fix consists in removing the call to hasAudioSession() from process_l()
and requires each effect chain to keep count of the number of audio tracks
attached to it (previously only the active tracks were accounted for).

Change-Id: Iee4246694ea8c7a66c012120c629d72dd38f9c35
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
64760240f931714858a59c1579f07264d7182ba2 11-May-2011 Dima Zavin <dima@android.com> update for new audio.h header location

Change-Id: Ic4c62c4037800802427eb7d3c7f5eb8b25d18876
Signed-off-by: Dima Zavin <dima@android.com>
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
249c6a61f21bc90e25e4b77f18c98af1ac363e69 05-May-2011 Glenn Kasten <gkasten@google.com> HAVE_ANDROID_OS AUDIOFLINGER_SECURITY_ENABLED dead

Remove dead code from the days when Android ran in emulator.

Change-Id: Ibadbbde0538239ad9b2811a3a2e8f8a6d3b6389c
udioflinger/AudioFlinger.cpp
8ce2364512f7c32c824f5ec5719688830ba72427 01-May-2011 Iliyan Malchev <malchev@google.com> frameworks/base: android_native_buffer_t -> ANativeWindowBuffer

Change-Id: Idc2eabaa805bb6d308ebb315872623f28d428417
Signed-off-by: Iliyan Malchev <malchev@google.com>
amera/libcameraservice/CameraHardwareInterface.h
8951a97b1f8462c37e740ea5082eea0445d2c501 15-Apr-2011 Iliyan Malchev <malchev@google.com> frameworks/base: switch CameraService to a HAL module

This patch changes CameraService to load a camera HAL module, instead of
linking directly against a library that implements the CameraHardwareInterface
class.

CameraHardwareInterface no longer defines the API to the camera HAL. Instead,
this is now in HAL header hardware/camera.h. We keep CamerHardwareInterface as
a class local to CameraService, which wraps around the new HAL calls. In the
future, we may remove this class entirely and have CameraService call the HAL
methods directly.

Change-Id: I5c61ac40078fc0b50bbac5881a556fe6c8837641
Signed-off-by: Iliyan Malchev <malchev@google.com>
amera/libcameraservice/Android.mk
amera/libcameraservice/CameraHardwareInterface.h
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
9e626526453f91999bdf3de4c2ec8e55c5d90511 15-Apr-2011 Iliyan Malchev <malchev@google.com> frameworks/base: include system/core header camera.h in Camera.h

We define struct CameraInfo in this camera/Camera.h, even though an identical
struct camera_info is defined in hardware/camera.h (but not in
hardware/camera_defs.h). We may not export struct definitions from the HAL
into headers which may find their way into the NDK.

This commit also renames FRAME_CALLBACK_FLAG_xxx to CAMERA_FRAME_CALLBACK_xxx.

Change-Id: I3e2ddd01d61bf5371ff2fc1a397995e0f1ee11f8
Signed-off-by: Iliyan Malchev <malchev@google.com>
amera/libcameraservice/CameraService.cpp
amera/tests/CameraServiceTest/CameraServiceTest.cpp
5a61d2f277af3098fc10b2881babca16391362da 20-Apr-2011 Dima Zavin <dima@android.com> audioflinger: don't do work in constructor, instead do it in onFirstRef

Change-Id: I22d9e01821816c3beb52b014330386c7fd2f0411
Signed-off-by: Dima Zavin <dima@android.com>
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
799a70e7028a4d714436c3a744a775acfbd31aae 19-Apr-2011 Dima Zavin <dima@android.com> audioflinger: enumerate all the possible audio interfaces

Keep track of the primary interface that handles the master volume,
etc.

Change-Id: Ib0701fccff8d8783a99035a241ab7c8ec75c00ac
Signed-off-by: Dima Zavin <dima@android.com>
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
fce7a473248381cc83a01855f92581077d3c9ee2 20-Apr-2011 Dima Zavin <dima@android.com> audio/media: convert to using the audio HAL and new audio defs

Change-Id: Ibc637918637329e4f2b62f4ac7781102fbc269f5
Signed-off-by: Dima Zavin <dima@android.com>
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
amera/libcameraservice/CameraService.cpp
6b80e0be94d3f92ec4aa2b7cace816780d3f338d 20-Apr-2011 Dima Zavin <dima@android.com> audioflinger: move legacy audio hw/policy out to libhardware_legacy

Change-Id: I4adcec73d3c08bcbe15bb19e1ba2ff18b195af45
Signed-off-by: Dima Zavin <dima@android.com>
udioflinger/A2dpAudioInterface.cpp
udioflinger/A2dpAudioInterface.h
udioflinger/Android.mk
udioflinger/AudioDumpInterface.cpp
udioflinger/AudioDumpInterface.h
udioflinger/AudioHardwareGeneric.cpp
udioflinger/AudioHardwareGeneric.h
udioflinger/AudioHardwareInterface.cpp
udioflinger/AudioHardwareStub.cpp
udioflinger/AudioHardwareStub.h
udioflinger/AudioPolicyManagerBase.cpp
dab0bea38ab2c2d6b52907b7f5684834c4979251 26-Apr-2011 Eric Laurent <elaurent@google.com> am 48dca4de: am 969357e3: am 223995dc: Fix issue 4335692: HDMI media volume

* commit '48dca4de70890d324b5830a58bb9fa273164151a':
Fix issue 4335692: HDMI media volume
5bfdfd1e7b4514c6f6143b6b97ef37013f6e53a9 26-Apr-2011 Eric Laurent <elaurent@google.com> am 969357e3: am 223995dc: Fix issue 4335692: HDMI media volume

* commit '969357e31c93e168e7a4cb3b41c33a6ec26f4a26':
Fix issue 4335692: HDMI media volume
023eeac54c428d78b755fa3c856f20d17abb8a40 25-Apr-2011 Eric Laurent <elaurent@google.com> Fix issue 4335692: HDMI media volume

Forced music stream volume to max when not muted and output device is HDMI.

Change-Id: Ibd287cea8ae1d3f36fea6651a113bd5cf2dbad13
udioflinger/AudioPolicyManagerBase.cpp
5820e52f9bf3c40839d33457975b6c9629ab1c79 12-Apr-2011 Brad Fitzpatrick <bradfitz@android.com> am 07c25b65: am 4430670f: am ca7ad44a: Merge "audioflinger: Enable ARMv5TE optimized resampler"

* commit '07c25b651216daac884bd503c02b788418165b50':
audioflinger: Enable ARMv5TE optimized resampler
4d0243980123378e9dd69022bf4ddca729d84126 12-Apr-2011 Brad Fitzpatrick <bradfitz@android.com> am 4430670f: am ca7ad44a: Merge "audioflinger: Enable ARMv5TE optimized resampler"

* commit '4430670f48f75661293371dab8db55865f5f56e0':
audioflinger: Enable ARMv5TE optimized resampler
0c0a1c0c37dbd2646a732da706d6777283c83e44 06-Apr-2011 Jim Huang <jim.huang@linaro.org> audioflinger: Enable ARMv5TE optimized resampler

Previously, the optimized asm option is only enabled when
__ARM_ARCH_5E__ is defined, which is assigned in armv5te.mk
rather than armv7-a series targets. This patch checks the ARM CPU
feature about half-word multiply instructions to enable ARMv5TE
resampler optimization routines properly.

Change-Id: I4c5a5d8c932416f23bedb0b389db958349f21ea4
udioflinger/AudioResampler.cpp
c30268b9d118309a0514bcf280a03ee69f81403f 06-Apr-2011 Glenn Kasten <gkasten@google.com> Merge "Miscellaneous code cleanup in audio framework"
9d91771564c264903363d7879d052f2427b78aa0 06-Apr-2011 Mathias Agopian <mathias@google.com> Merge "remove more unused references to ISurface"
4bcae82f9b07d1a39956c45a6f5bec0b696c4dd1 04-Apr-2011 Glenn Kasten <gkasten@google.com> Miscellaneous code cleanup in audio framework

Changes:
- Move declaration of kClassPathName to top of file so it can be used
in more than one place, instead of "android/media/AudioSystem".
- Make private methods static.
- Add comment to stream_type, audio_mode, force_use types that they must match
values in AudioSystem.java.
- Add comment about unused types mp3_sub_format and vorbis_sub_format.
- Fix typos.
- Use @ in javadoc comments.
- Delete dead APIs setMode, getMode, setRouting, getRouting in AudioSystem.java
(they are all hidden, deprecated, and unused by rest of framework)
- Delete unused private log method.
- Fix pathname for android_media_AudioSystem.cpp.
- Improve code formatting for space after == and !=.
- Add logging of delta for changing audio policy manager ref count.

Change-Id: I18037c7beb8ab76d1fda08c11e589f6e591d36e1
udioflinger/AudioFlinger.cpp
udioflinger/AudioPolicyManagerBase.cpp
8b1027d3f873fc15c70f8645f1856936b69241a4 06-Apr-2011 Mathias Agopian <mathias@google.com> remove more unused references to ISurface

Change-Id: I2201f1ca2bb8f203a081d94a0134f798778dfbef
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
38ccae2c0324daa305f3fe77d25fdf5edec0b0e1 29-Mar-2011 Eric Laurent <elaurent@google.com> New fix for issue 4111672: control block flags

The first fix (commit 913af0b4) is problematic because it makes threads
in mediaserver process block on the cblk mutex. This is not permitted
as it can cause audio to skip or worse have a malicious application
prevent all audio playback by keeping the mutex locked.

The fix consists in using atomic operations when modifying the control
block flags.

Also fixed audio_track_cblk_t::framesReady() so that it doesn't block
when called from AudioFlinger (only applies when a loop is active).

Change-Id: Ibf0abb562ced3e9f64118afdd5036854bb959428
udioflinger/AudioFlinger.cpp
108dddf924d714c811dd565b8f4c7a0178cca2f2 29-Mar-2011 Iliyan Malchev <malchev@google.com> frameworks/base: some camera-interface cleanup

Methods getNumberOfVideoBuffers() and getVideoBuffer() as well as struct
image_rect_struct are no longer used (instead, the necessary information is
passed through ANativeWindow.)

Change-Id: If4b11446fc9ccbde1f6b45bc70c0d0b8e54376eb
Signed-off-by: Iliyan Malchev <malchev@google.com>
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
5f7fcf29a7475a20cf38bf72da67746135d504c3 26-Mar-2011 Mathias Agopian <mathias@google.com> merge libsurfaceflinger_client into libgui

this is the first step in unifying surfacetexture and surface.
for this reason the header files were not moved, as most of them
will eventually go away.

NOTE: currently we keep libsurfaceflinger_client.so as an empty
library to workaround prebuilt binaries wrongly linking against
it.

Change-Id: I130f0de2428e8579033dc41394d093f4e1431a00
amera/libcameraservice/Android.mk
amera/tests/CameraServiceTest/Android.mk
1caf58cd652edab4e05bfef8ccaa1497c450f5e9 18-Mar-2011 Eric Laurent <elaurent@google.com> Merge "Fix issue 4111672: AudioTrack control block flags"
33797ea64d067dfeaacbfd7ebe7f3383b73961b5 17-Mar-2011 Eric Laurent <elaurent@google.com> Fix issue 4111672: AudioTrack control block flags

Make sure that all read/modify/write operations on the AudioTrack
and AudioRecord control block flags field are protected by the
control block's mutex.

Also fix potential infinite loop in AudioTrack::write() if the
written size is not a multiple of frame size.

Change-Id: Ib3d557eb45dcc3abeb32c9aa56058e2873afee27
udioflinger/AudioFlinger.cpp
8eb69d60c09c1c4683066a94c889df28d0e9d233 17-Mar-2011 James Dong <jdong@google.com> Fix missing AOSP copyright headers for more files

o Update the copyright date on InputDispatcher_test.cpp and InputReader_test.cpp
because these two files were moved from other places to the current location,
and were actually created in 2010.

bug - 4119349

Change-Id: Ic93b81ddafb58e9e72a2e9e02ca3d9f173d6dca7
amera/libcameraservice/CannedJpeg.h
amera/tests/CameraServiceTest/CameraServiceTest.cpp
ce80563f6fb49b0c40281f9a527e288799b4a577 15-Mar-2011 Eric Laurent <elaurent@google.com> Improvement for issue 3489986: BT SCO volume

This change makes sure that the VOICE_CALL stream volume tracks
the BLUETOOTH_SCO stream volume when SCO audio is enabled.
The down link audio volume now reflects what is being displayed
when pressing volume hard keys on the device while in a video chat
with a BT SCO headset.

Volume settings on the headset and the device are still independent as
we do not support handsfree profile yet.

Change-Id: Ie0d2714730ea359b9318b9cbe6f0b2557ef0f976
udioflinger/AudioPolicyManagerBase.cpp
4f46fed004b76d462ef859aa94a3c056b0e79b60 03-Mar-2011 Gloria Wang <gwang@google.com> Merge "- To track the usage of all audio output devices - To track the currently used audio device - The devices are separated as speaker and other audio devices - Provide the collected data to battery application through pullBatteryData()"
9ee159b79022b2e1a050acb3890ce948e99e9ccb 24-Feb-2011 Gloria Wang <gwang@google.com> - To track the usage of all audio output devices
- To track the currently used audio device
- The devices are separated as speaker and other audio devices
- Provide the collected data to battery application through pullBatteryData()

Change-Id: I374c755266b5ac6b1c6c630400f4daf901ea8acc
udioflinger/AudioFlinger.cpp
1c4967155109ab083a4149347596f7ebd3662a67 03-Mar-2011 Eric Laurent <elaurent@google.com> Merge "Fix issue 3388775."
c0bff9b96152179650dc9508799a38e35ef2a321 01-Mar-2011 Eric Laurent <elaurent@google.com> Merge "Fix issue 3479042."
532492cd60a3ee2613cd3d664c9f4581d9929bc5 01-Mar-2011 Eric Laurent <elaurent@google.com> Fix issue 3388775.

Do not select A2DP output for media strategy when it is suspended because
BT SCO is active. Media audio will be routed to speakers or SCO HS
(depending on phone state and activity on stream VOICE_CALL) which is less
confusing than not hearing anything while music progress bar is moving.

Change-Id: Iff8cc1ea9bf9bde0b33035c4d91398db0934b836
udioflinger/AudioPolicyManagerBase.cpp
243f5f91755c01614a8cafe90b0806396e22d553 01-Mar-2011 Eric Laurent <elaurent@google.com> Fix issue 3479042.

The problem is that when an AudioRecord using the resampler is restarted,
the resampler state is not reset (as there is no reset function in the resampler).
The consequence is that the first time the record thread loop runs, it calls the resampler
which consumes the remaining data in the input buffer and when this buffer is released
the input index is incremented over the limit.

The fix consists in implementing a reset function in the resampler.

A similar problem was also present for playback but unoticed because the track buffer is always
drained by the mixer when a track stops. The only problem for playback was that the initial
phase fraction was wrong when restarting a track after stop (it was correct after a pause).

Change-Id: Ifc2585d685f4402d29f4afc63f6efd1d69265de3
udioflinger/AudioFlinger.cpp
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/AudioResampler.cpp
udioflinger/AudioResampler.h
043b22dbe3b98a8fdd6b0ea77df4089ff44b6539 28-Feb-2011 Jean-Michel Trivi <jmtrivi@google.com> Fix bug 3376700 Volume too loud at lowest setting

Change volume attenuation curve to provide more attenuation at
low volume settings, and finer steps at high volume.
See bug entry for link to doc with curve values.

Change-Id: I750548b2161a4c550ef982ba793156e4518119e8
udioflinger/AudioPolicyManagerBase.cpp
e468ac57f6e8afc6078c76d4eb1ac327112a3de0 18-Feb-2011 James Dong <jdong@google.com> Application-managed callback buffer support for raw image

bug - 3292153

Change-Id: I9789f7c5cde3a3889d7375e881181e9152d95fc2
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
586b21780680c4d19723b5a9484e55ec47464c5f 11-Feb-2011 Eric Laurent <elaurent@google.com> Fix issue 3400751.

Add a delay before restoring output path when a notification ends so that
short sounds can be heard on proper device before the path is actualy switched.

Change-Id: I1d2dd8e7e28e15fbcab344256f88499b26297372
udioflinger/AudioPolicyManagerBase.cpp
727a6f859841a1d421b680f56d4d4ca5ff8c6e4b 11-Feb-2011 Eric Laurent <elaurent@google.com> Merge "Fix issue 3425342."
12932bfdc7163e654d5ef25f1cb1802ded2704f1 11-Feb-2011 Eric Laurent <elaurent@google.com> Fix issue 3425342.

Change the device selection order as follows to enable easier use of
A2DP while the device is docked:
1 - wired Headset
2 - A2DP Headset
3 - SPDIF/HDMI
4 - Dock

Also do not limit notifications volume when on dock.

Change-Id: I55ea6bea9f2d9ff284b54023e541b2788d0f1eb8
udioflinger/AudioPolicyManagerBase.cpp
6b2718c67aa7b1a8e3b0f25a73a0d5f72c59ffc3 04-Feb-2011 Glenn Kasten <gkasten@google.com> Bug 3352047 Wrong message when adjusting volume

Add hidden AudioManager.getDevicesForStream and output device codes.

Change-Id: I4d1c1d3b6a077cd117720817d1f733dda557b947
udioflinger/AudioPolicyManagerBase.cpp
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
8473bb556421ac08f4e03abd5d149852114c9238 07-Feb-2011 Brad Fitzpatrick <bradfitz@android.com> am be806fe8: am cc8f87e9: am f664d6f9: am b083d3b8: Merge "Initialize resampling buffer per track."

* commit 'be806fe8c1c7bb3ae70ae27dce41d672410af26a':
Initialize resampling buffer per track.
802da7bc462f6f9df6e681cc75c51dc0a056a4a1 04-Feb-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 3366668 Use BinderService template"
e08d819989d394ed171ba6f1e6d0fa14c29fc42d 04-Feb-2011 Brad Fitzpatrick <bradfitz@android.com> am cc8f87e9: am f664d6f9: am b083d3b8: Merge "Initialize resampling buffer per track."

* commit 'cc8f87e9410dd4de9a2fda4738429e6c6087c789':
Initialize resampling buffer per track.
e26308ad434c575b2985ac442d2990bb1bc19f5d 04-Feb-2011 Brad Fitzpatrick <bradfitz@android.com> am b083d3b8: Merge "Initialize resampling buffer per track."

* commit 'b083d3b816378ef3b9dceb33b2c2e20510b2632b':
Initialize resampling buffer per track.
2151d7b8c2dd77c9887691db30396937be778141 04-Feb-2011 Yuuhi Yamaguchi <yuuhi.x.yamaguchi@sonyericsson.com> Initialize resampling buffer per track.

When resampling too short sound, AudioMixer uses previous
tracks buffer. So we re-initialize the temporary buffer per
loop to avoid it.

Change-Id: I55a59a3b14faa8445e09c450478fe79cef704760
udioflinger/AudioMixer.cpp
117cd9286424888c1c5bf202ebf1e08ae1e6affe 04-Feb-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 3366885 Remove LVMX switch"
8782cb4dc783cdcac8498148ab1894b4780c18df 04-Feb-2011 Eric Laurent <elaurent@google.com> am 6f1bd261: am 9c0a1003: Merge "Fix issue 3371080" into honeycomb

* commit '6f1bd261b7fd86ac7817ca061dfb55b95150b836':
Fix issue 3371080
db130fbd3ccd37e247e49494a84f8a9841ecd593 04-Feb-2011 Glenn Kasten <gkasten@google.com> Bug 3366885 Remove LVMX switch

Change-Id: I0bf98c6f85f00b3296874571e1c049dcc4e2fcca
udioflinger/Android.mk
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
d2dcb08808aed82218b258726fa66f8e095a3f9c 04-Feb-2011 Glenn Kasten <gkasten@google.com> Bug 3366668 Use BinderService template

Change-Id: I93d7f3fc9dc9b6a365723d8a51a73a5aabdb4f93
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
eda6c364c253ba97ee45a3adeb8c2b45db1f81db 02-Feb-2011 Eric Laurent <elaurent@google.com> Fix issue 3371080

Modified default volume control logic in AudioService:
1 IN_CALL volume if in video/audio chat
2 NOTIFICATION if notification is playing or was playing less than 5s ago.
3 MUSIC

Modified silent mode:
- now also affect MUSIC stream type
- entering silent mode when VOL- hard key is pressed once while selected
stream volume is already at 0 (except for VOICE_CALL stream).
- exiting silent mode when pressing VOL+ hard key while in silent mode

Play sound FX (audible selections, keyboard clicks) at a fixed volume.

Modified audio framework:
- isStreamActive() method now implemented in AudioPolicyManagerBase (previously AudioFlinger)
- iStreamActive() now specifies a time window during which the stream is considered
active after it actually stopped.

Change-Id: I7e5a0724099450b9fc90825224180ac97322785f
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioPolicyManagerBase.cpp
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
2a30be33a39b07bf4f945d9506ffda0fd076e6c2 29-Jan-2011 Jean-Baptiste Queru <jbq@google.com> Merge 0ef57993 from gingerbread

Change-Id: If10fee1ae387a8130356dd62fe678495402d5edf
144f78906f1eefaf8cbde9298a1422fcea094447 29-Jan-2011 Jean-Baptiste Queru <jbq@google.com> am 4eeb1047: Merge 13212f83 from gingerbread-plus-aosp

* commit '4eeb10470ffafe8c508027f363ac66b58da5bf00':
Fix issue 2988031.
2ef89309d41daac3d69fa78b31cd09cb2c262ca1 29-Jan-2011 Jean-Baptiste Queru <jbq@google.com> Merge 13212f83 from gingerbread-plus-aosp

Change-Id: I9a8ee0c7e7896aea85e7a7c18ee82927091cb670
5092d8c066a1a98343bbc16e33a6753e577b5e7f 27-Jan-2011 Eric Laurent <elaurent@google.com> Fix issue 2988031.

Limit SYSTEM stream volume when a headset is connected and music is playing.

Change-Id: Ieb44ae5bb53ffa9cd5fe8e317798eed279b78df8
udioflinger/AudioPolicyManagerBase.cpp
bfa2f13fd3f463dbceea4d3a18c3124e70df0a05 15-Nov-2010 Jean-Michel Trivi <jmtrivi@google.com> do not merge bug 3370834 Cherrypick from master

Cherripick from master CL 79833, 79417, 78864, 80332, 87500

Add new audio mode and recording source for audio communications
other than telelphony.

The audio mode MODE_IN_CALL signals the system the device a phone
call is currently underway. There was no way for audio video
chat or VoIP applications to signal a call is underway, but not
using the telephony resources. This change introduces a new mode
to address this. Changes in other parts of the system (java
and native) are required to take this new mode into account.
The generic AudioPolicyManager is updated to not use its phone
state variable directly, but to use two new convenience methods,
isInCall() and isStateInCall(int) instead.

Add a recording source used to designate a recording stream for
voice communications such as VoIP.

Update the platform-independent audio policy manager to pass the
nature of the audio recording source to the audio policy client
interface through the AudioPolicyClientInterface::setParameters()
method.

SIP calls should set the audio mode to MODE_IN_COMMUNICATION,
Audio mode MODE_IN_CALL is reserved for telephony.

SIP: Enable built-in echo canceler if available.
1. Always initialize AudioRecord with VOICE_COMMUNICATION.
2. If echo canceler is available, disable our echo suppressor.

Note that this CL is intentionally not correcting the
getAudioSourceMax() return value in MediaRecorder.java as the
new source is hidden here.

Change-Id: Ie68cd03c50553101aa2ad838fe9459b2cf151bc8
udioflinger/AudioFlinger.cpp
udioflinger/AudioHardwareInterface.cpp
udioflinger/AudioPolicyManagerBase.cpp
61dca6702ce50d937fc764c55bb0842b40dcd0e4 25-Jan-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 3376700 Add support in APM for stream-specific volume curves

The stream volume was handled the same way for all different stream,
the only potential difference between each of them being the number
of steps available to the user to change the volume. This was
mapped to 99 steps of 0.5dB amplitude, offering a maximum attenuation
of -49.5dB.
This change consists in defining for each stream a curve with two
knees (3 segments) for conversion from volume index to attenuation.
This curve is defined in the AudioPolicyManager in
initializeVolumeCurves(), and can therefore be overridden by the
platform.
Note that this change doesn't modify the volume curves: this CL
enables the curves to be changed by overriding this default
behavior.

Change-Id: I575b66799c52df2906db248943b15120b8a79ea2
udioflinger/AudioPolicyManagerBase.cpp
b517e006b51c95db9c44bf5f104f562d431ae597 20-Jan-2011 Eric Laurent <elaurent@google.com> do not merge - Fix issue 3371096.

EffectModule::process() was copying effect chain input buffer to
output buffer if no effect was active instead of accumulating it.

Change-Id: If4ca75601ea69a088d0f71d88aec53e90a1dec89
udioflinger/AudioFlinger.cpp
73337489229cc9b50371c7a9fcd86e9f00ea46d0 20-Jan-2011 Eric Laurent <elaurent@google.com> Fix issue 3371096.

EffectModule::process() was copying effect chain input buffer to
output buffer if no effect was active instead of accumulating it.

Change-Id: I2838af2e7b6654d0a76547625929a5453da68d02
udioflinger/AudioFlinger.cpp
935752053ef2691dbb6d5a6d149e0e362c6e3c74 19-Jan-2011 Eric Laurent <elaurent@google.com> Tentative fix for issue 3362362.

The problem is likely that one method is called on the AudioPolicyManagerBase
instance while it is still being constructed by AudioPolicyService.

To avoid this, the AudioPolicyService mutex is held by the constructor until the
platform specific AudioPolicyManager is constructed and the member
mpPolicyManager initialized.

Also added an initCheck() method to AudioPolicyInterface to verify successful
initialization of AudioPolicyManager.

A similar change is done in AudioFlinger constructor.
Also added some missing protections in AudioFlinger methods where the
playback thread list is parsed.

Change-Id: I006b244ec057e1bb0aa5ebe426ef006e3b171056
udioflinger/AudioFlinger.cpp
udioflinger/AudioPolicyManagerBase.cpp
udioflinger/AudioPolicyService.cpp
eb0d0c48ebfcee5e8141ae25fe42a9eac6aae230 10-Jan-2011 Eric Laurent <elaurent@google.com> Fix issue 3317627.

The fix consists in selecting the digital audio device (SPDIF/HDMI)
when available if the routing strategy is STRATEGY_PHONE.

Change-Id: Ie500ae92f5c01f2511988543852ba559c6e5994b
udioflinger/AudioPolicyManagerBase.cpp
bfa33aae4f54c0020a0568b16a3acb7b30b6ca3d 20-Dec-2010 Jamie Gennis <jgennis@google.com> Add camera service support for SurfaceTexture.

This change enables the use of a SurfaceTexture in place of a Surface as
the destination of camera preview frames.

Change-Id: Ic70d404c8fe261e9d5da6f1de93d6babb5b191cb
amera/libcameraservice/Android.mk
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
626c85f3a9ec8e34a1e4af31eddf118d75ee6416 17-Dec-2010 Eric Laurent <elaurent@google.com> Fix issue 3217707.

The problem is that when the A2DP headset is disconnected, there is a transition
period during which the A2DP sink pumps data at a very high pace.
This makes that:
1 the audio flinger mixer thread spins and starves binder threads thus delaying
the completion of the A2DP output stream shutdown
2 we read the audio http audio stream faster than normal and we reach the end of stream
for audio while video is still playing if the streamed file is small enough.

The fix consists in detecting abnormal short write intervals and sleep to restore
a normal write pace.

Change-Id: Iab127882494ab0e26266371dc0ce5c2ff6fa476e
udioflinger/A2dpAudioInterface.cpp
udioflinger/A2dpAudioInterface.h
0b456a6a33de8cb7c641724579382a31a1beaa2c 16-Dec-2010 Eric Laurent <elaurent@google.com> Fix speakerphone routing to analog dock

The audio routing policy when speakerphone is on and a dock with built-in
speakers is connected should be to output audio to teh dock speakers

Also removed route to SCO car kit if forced usage is not SCO as the SCO
socket might not be established.

Change-Id: I1aa2954092e28de935304b90f7a7a64d661934c7
udioflinger/AudioPolicyManagerBase.cpp
f3a8d32fd475ec68d966fa6f12a4c975ba80b659 15-Dec-2010 Eric Laurent <elaurent@google.com> Change audio routing policy for HDMI

HDMI device should have a higher priority than analog dock audio but a lower priority
than wired headsets.
Also modified AudioService so that HDMI is mapped to DEVICE_OUT_AUX_DIGITAL device and not
DEVICE_OUT_DGTL_DOCK_HEADSET as before to enable discrimination between SPDIF going to
digital dock and SPIDF going to HDMI.

Change-Id: I887d0c73479784dd2edaf41ce1a7d8d0bdcbb4bd
udioflinger/AudioPolicyManagerBase.cpp
b3fd981d5f8bbf629dd8a07b06b4b656b70cb944 10-Dec-2010 Eric Laurent <elaurent@google.com> Fix audio mode log.

Since the new audio mode IN_COMMUNICATION was added, the audio mode log
was broken.

Change-Id: I4fdafc3b98a1b0ceb55058a9e47fed99b3dbe6ad
udioflinger/AudioHardwareInterface.cpp
986ef2ad4c96952711d87af481f3afb40aa10775 09-Dec-2010 James Dong <jdong@google.com> We requires camera hal's implementation should not track the ref count of any outstanding video frames and ignore
releaseRecordingFrame() call after it receives disableMsgType(CAMERA_MSG_VIDEO_FRAME).

Change-Id: I2ecb9b3b11dab6bf868ccf8effda1b8df5bcde3c
amera/libcameraservice/CameraService.cpp
03dfce9672b36c1a334959a602f909b8410bec50 08-Dec-2010 Mathias Agopian <mathias@google.com> remove support for PUSH_BUFFER surfaces and overlays

the same functionality is now supported through
the h/w composer HAL, and YUV support in the GPU.

Change-Id: I8146605449954b8e8fd7f78810b7d873c2d8f5bf
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
6baa5de62a91b151af7a19036706b3d45143a32e 07-Dec-2010 James Dong <jdong@google.com> Don't drop video frames but to release them.

bug - 3259009

Change-Id: Ib7634f10a7fe7b7ce7014b79b07957d194bae1a7
amera/libcameraservice/CameraService.cpp
ed7c671a57f89d389c9d6cd67e0698f160f69916 01-Dec-2010 Eric Laurent <elaurent@google.com> Fix issue 2641884: Bluetooth volume is dependent on in call volume.

The problem is that the code in AudioPolicyManagerBase::checkAndSetVolume() that forces
voice volume to max when setting bluetooth SCO volume is not called if the bluetooth stream
volume did not actually change. So even if we re apply volumes when switching to bluetooth
device, the volume voice volume is not changed and remains what it was when routed to earpiece
What makes things worse on Passion is that stream volumes are limited when connected to bluetooth
and their actual value does not change as soon as they exceed the limit threshold.

Change-Id: Id7c317db45b392a1c20dca2859678e3c64a371ed
udioflinger/AudioPolicyManagerBase.cpp
094b148b8587a67c19585e2af2cc7b53868bfb89 01-Dec-2010 Eric Laurent <elaurent@google.com> resolved conflicts for merge of 0d28be68 to master

Change-Id: Iec5f810c366d3e1c14a6f6294b0aea4ffb30ae3e
075a1f660b77fe47b165db1aff97cdd05e300391 02-Nov-2010 Eric Laurent <elaurent@google.com> Fix issue 3142808.

There is a bug in the way audio policy manager handles A2DP interface suspend/restore
when SCO is used. This bug is not new but has been triggered by a change in the timing
of the events received by audio policy manager when a call is setup and torn down
introduced by commit 164a8f86c7e48992691368c4895709c3bdb835a4.

The fix consists in grouping the control of A2DP suspended state in a single function
that is called systematically when conditions affecting this state are changed:
- call state change
- device connection/disconnection
- change in forced usage.

Change-Id: I46ee2399ee5547b60511fc6cfd32e2720091b0f8
udioflinger/AudioPolicyManagerBase.cpp
e4db265e478bdac2381d85cf3dd41bbda14271b4 23-Nov-2010 Eric Laurent <elaurent@google.com> Revert "Temporary workaround for issue 3187563"

This reverts commit 065299b58d1c00cd24e442fa192561decf7b1fec.

The work around for issue 3187563 is not needed any more since the new kernel
DMA driver implementation (commit 7953250be7c9a1c3417e21b20032b571d495d218)
fixes the root cause.

Change-Id: Ibaac2826b63c8e5825ae2e5cab2fb2f0e51ab7b4
amera/libcameraservice/CameraService.cpp
32cb1ba657a1094bb815f4d39f3e4bf12ce8437e 24-Nov-2010 Eric Laurent <elaurent@google.com> Fix issue 3225810.

Take a wake lock whenever A2DP output stream is active.

Change-Id: Ie50e6d4cb34c8a1ba97b301ef25e10aeb153d8f3
udioflinger/A2dpAudioInterface.cpp
udioflinger/A2dpAudioInterface.h
f5aafb209d01ba2ab6cb55d1a12cfc653e2b4be0 18-Nov-2010 Eric Laurent <elaurent@google.com> Fix issue 3157123.

Use a Mutex wherever atomic operations were used in AudioTrack,
AudioRecord, AudioFlinger and AudioEffect classes.

Change-Id: I6f55b2cabdcd93d64ef19446735b8f33720f8dbc
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
f1fb01a7f00b8da90a36268aba8584a872e99175 15-Nov-2010 Jean-Michel Trivi <jmtrivi@google.com> Add new audio mode for audio communications other than telelphony.

The audio mode MODE_IN_CALL signals the system the device a phone
call is currently underway. There was no way for audio video
chat or VoIP applications to signal a call is underway, but not
using the telephony resources. This change introduces a new mode
to address this. Changes in other parts of the system (java
and native) are required to take this new mode into account.
The generic AudioPolicyManager is updated to not use its phone
state variable directly, but to use two new convenience methods,
isInCall() and isStateInCall(int) instead.

Change-Id: Id744cd26520ea1d1a4795eabe6a1f0c58789af76
udioflinger/AudioFlinger.cpp
udioflinger/AudioPolicyManagerBase.cpp
56ecd20263d7f63476f756fc5d8b043b325c7bfb 09-Nov-2010 Jean-Michel Trivi <jmtrivi@google.com> Add support for audio recording source in generic audio policy mgr.

Update the platform-independent audio policy manager to pass the
nature of the audio recording source to the audio policy client
interface through the AudioPolicyClientInterface::setParameters()
method.

Change-Id: I6b4fd0f8a3acea0d7d30bbad98edd1977dc012bf
udioflinger/AudioPolicyManagerBase.cpp
e3aac34f9e0d825aaad597f70e2b3dcb615ef313 12-Nov-2010 Eric Laurent <elaurent@google.com> Temporary workaround for issue 3187563

The audio HAL does not always handle properly simultaneous input and output stream
state changes. This happens in particular when starting video record because output
stream starts and stops while input is active.

Temporary disable the video record jingle the time the audio HAL issues are solved.

Change-Id: I3b923d81af543a335deae9e22d7f396bb5791d91
amera/libcameraservice/CameraService.cpp
c643d77a099b0e86ad12de9b498f6f780e03184e 09-Nov-2010 Jean-Michel Trivi <jmtrivi@google.com> Add recording source for voice communication

Add a recording source used to designate a recording stream for
voice communications such as VoIP.

Change-Id: I4091d67069b1a0170c1a5ca5e6acd51eb0aa08f9
udioflinger/AudioPolicyManagerBase.cpp
b235dee7be544a6c990ba4f8d89ab03e38c826f8 06-Oct-2010 Praveen Bharathi <pbharathi@motorola.com> Added support for dock headset observer

Change-Id: I06b2e65e3bfa10735e6c7fd3349afa9ae7d45292
Signed-off-by: Praveen Bharathi <pbharathi@motorola.com>
udioflinger/AudioPolicyManagerBase.cpp
e09591eff55fdff1868b32c3e046c62f800330fc 14-Oct-2010 Wu-cheng Li <wuchengli@google.com> Mirror the camera preview if the camera is front-facing.

bug:3095272
Change-Id: Ib1c1d1edc06a33e9d4d2dcb42bc1dd2c25b1310c
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
b2ee05b6c453b7da24b23139489ad92bb2c79621 20-Oct-2010 Wu-cheng Li <wuchengli@google.com> Remove the FLIP_H/ROT_90 workaround from CameraService.do not merge

Now overlay does flip before rotation.
bug:3114236
Change-Id: I1780e56154566435a0ceeb2f101de7ed0a0613cb
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
95b18cb9224f79a781c827e0da45c58a644acece 19-Oct-2010 Wu-cheng Li <wuchengli@google.com> Mirror the preview for front-facing cameras. do not merge

Now overlay does ROT_90 before FLIP_V or FLIP_H. It should be FLIP_V
or FLIP_H first. The formula should be changed after overlay is fixed.

bug:3059865
Change-Id: Ie4366bf7f1fcac7383e8dfc74b1b865997bbbcc6
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
e2ad6734eccc4b9ea7857c747ff9469a9c11ba09 19-Oct-2010 James Dong <jdong@google.com> Camera framework change required for 0-memcpy recording

bug - 3042125

Change-Id: I46eb7a10b5394086b353fd73e4503beceeed76f1
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
012716a857641a977afd16ff6be4bf66fc403884 08-Oct-2010 Wu-cheng Li <wuchengli@google.com> Fix camera display orientation.

bug:3036262
Change-Id: I6fc3dc381fcfaceba09fd5bd14afb85045b3d676
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
173e75df12ad5398f3650a30e430dcac0cbcf278 07-Oct-2010 Eric Laurent <elaurent@google.com> am ce2e2184: am 37947afe: Merge "Fixed AudioFlinger not always pausing tracks" into gingerbread

Merge commit 'ce2e2184bbc5530f4fac3220fdf3d1b3fc08a4c3'

* commit 'ce2e2184bbc5530f4fac3220fdf3d1b3fc08a4c3':
Fixed AudioFlinger not always pausing tracks
af59ce2407fa4e6e5d8f1664a4df2daf1badd407 05-Oct-2010 Eric Laurent <elaurent@google.com> Fixed AudioFlinger not always pausing tracks

If the pause request is received before the AudioTrack buffer was
completelly filled and the track ready for mixing, the pause is
not executed: the track just underruns and stays in pausing state.

The fix consists in considering the track ready for mixing immediately
if pausing.

Change-Id: Ia6cb4703fee2126e41011a6400ea8eeb3a3e5456
udioflinger/AudioFlinger.cpp
9ad6e8bd9fab860e639f6ce95479e4b2a9b03ff5 01-Oct-2010 Eric Laurent <elaurent@google.com> am de12c3cf: am 220ab887: Merge "Issue 3032913: improve AudioTrack recovery time" into gingerbread

Merge commit 'de12c3cf56e3f27b2efc60eeae8b5e422747f2b9'

* commit 'de12c3cf56e3f27b2efc60eeae8b5e422747f2b9':
Issue 3032913: improve AudioTrack recovery time
44d9848d6656777a18019223e0d35f2fcc67719a 01-Oct-2010 Eric Laurent <elaurent@google.com> Issue 3032913: improve AudioTrack recovery time

This issue showed that when an AudioTrack underruns during a too long period
of time and is therefore disabled by audioflinger mixer, it takes an additional
delay of up to 3 seconds to recover.
This fix adds a simple mechanism to recover immediately when the client application
is ready to write data again in the AudioTrack buffer

Also throttle warnings on record overflows

Change-Id: I8b2c71578dd134b9e60a15ee4d91b70f3799cb3d
udioflinger/AudioFlinger.cpp
9e2e2d2bc86372bde4673c31ef416b2f29d87ac2 29-Sep-2010 Eric Laurent <elaurent@google.com> am b047e3cd: am aeb2c62e: Merge "Fix several audio effects problems." into gingerbread

Merge commit 'b047e3cdf24b32e26f366fcd4cd0eee8ae6c592c'

* commit 'b047e3cdf24b32e26f366fcd4cd0eee8ae6c592c':
Fix several audio effects problems.
dac69110ed1073bf0a9827a3f78698896dd05d97 28-Sep-2010 Eric Laurent <elaurent@google.com> Fix several audio effects problems.

Fixed the following issues in LVM effect bundle wrapper:
- memory leaks in EffectCreate() in case effect creation fails at various stages
- Added saturation when accumulating to output buffer
- Fixed problems with enabled effects count when an effect is released while enabled
- Do not allocate temporary buffer for accumulation each time process() is called

Fixed the following issues in effects framework (AudioFlinger)
- Release effect synchronously in the library when deleted from effect chain
- Do not call the effect process function if no tracks are present in the same
audio session

Change-Id: Ifbd80a163415cfb3c0a337c12082853ea45d9c91
udioflinger/AudioFlinger.cpp
b36f2df1daf7e733be7c51f93792f8fc4252544c 28-Sep-2010 Wu-cheng Li <wuchengli@google.com> resolved conflicts for merge of 191a25e1 to master

Change-Id: I6f4940e337a992bf84e50bc1d22432593937499c
4a73f3da3501db6e95473a4a653d6319c6d618e2 24-Sep-2010 Wu-cheng Li <wuchengli@google.com> The old overlay should be destroyed if orientation changes.

Previously the orientation was wrong after suspend and resume.
When the camera app is resumed behide the lock screen, it
orinteation is portrait. When users slide to unlock the screen,
surfaceChanged is called and the orientation is landscape.
The camera app stops the preview, sets the display orientation,
and starts the preview. Overlay should be destroyed if the
orientation has changed.

bug:3031640
Change-Id: I38b527f9ea78c91b538463292152c023383b4695
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
f43c92f8d7b1d81cc7248031970d68dc65579be0 24-Sep-2010 Eric Laurent <elaurent@google.com> am 692dfafe: am 880dfe4f: Merge "Fix issue 3007862" into gingerbread

Merge commit '692dfafe02d04cdbab5367546e166580c92e4d2e'

* commit '692dfafe02d04cdbab5367546e166580c92e4d2e':
Fix issue 3007862
84e9a10fde8a4ae3da4f88d7911c154933aa457f 24-Sep-2010 Eric Laurent <elaurent@google.com> Fix issue 3007862

Removed a cross deadlock condition between audioflinger and audio policy
service mutexes.
Audioflinger::createEffect() locks audioflinger mutex and then calls
AudioSystem::getOutputForEffect() which ends up in
AudioPolicyService::getOutputForEffect() which locks audio policy service
mutex. If at the same time, the command thread in audio policy service is
processing a command(set volume, set route...), the mutex is locked and the
command will call one audioflinger method which in turn will attempt to
lock audioflinger mutex.
The fix consists in releasing audioflinger mutex before calling
getOutputForEffect().

Change-Id: Id44e7feb36e0a295731f6aa97cf32d022edd34d0
udioflinger/AudioFlinger.cpp
cc08406f74b67b1b7e532ef8ed534c0476ced636 23-Sep-2010 Eric Laurent <elaurent@google.com> am 11746caa: am 08959c63: Merge "Request permission for global audio effects." into gingerbread

Merge commit '11746caaa852984ff186bf5b8807e2c14cd7c1bc'

* commit '11746caaa852984ff186bf5b8807e2c14cd7c1bc':
Request permission for global audio effects.
fac4895de4ae63928ff0cf2ccece106eb6d33f72 22-Sep-2010 Eric Laurent <elaurent@google.com> Request permission for global audio effects.

Applications creating an audio effect on the output mix must
have the MODIFY_AUDIO_SETTINGS permission.

Change-Id: I57d88533f91ad0d33680107d79abcec28f7263b5
udioflinger/AudioFlinger.cpp
3b7b358d1a45844ca427626554ff81f472fd1583 15-Sep-2010 Nipun Kwatra <nkwatra@google.com> Added command type to play recording sound.

Added CAMERA_CMD_PLAY_RECORDING_SOUND command type to play recording
sound through sendCommand. This is currently needed by time lapse
recording using still mode capture, which disables the shutter sound
but needs to play the recording sound.

Change-Id: I376aa40f45b6064fd862abc065456b06fc338020
amera/libcameraservice/CameraService.cpp
b5ca4618a722a21f084fe8bfc1c2992749ccd3f0 12-Sep-2010 Nipun Kwatra <nkwatra@google.com> Adding enable/disable option for sendCommand()

- Added enum CAMERA_CMD_ENABLE_SHUTTER_SOUND which corresponds to
command type for enabling/disabling shutter sound.
- The implementation checks if it is legal to disable shutter sound.
If it is, then any process can disable the sound. If not, then only
the mediaserver process is allowed to do this. Currently time lapse
capture needs this functionality to disable shutter sound when still
mode is used to capture time lapse video.

Change-Id: Id147a3bcc6a345c2c6a6d52bf98fd8292386bb19
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
d20b4cfde2848052cf93ed13df14d75347ec64fd 13-Sep-2010 Eric Laurent <elaurent@google.com> am 4d987850: am bd2e9ec6: Merge "Fix volume problems with insert revert" into gingerbread

Merge commit '4d9878502f7661ed34540a485a5942d859e209c7'

* commit '4d9878502f7661ed34540a485a5942d859e209c7':
Fix volume problems with insert revert
e0aed6ddcb4e3c301b80aa26706b6052dab42c41 11-Sep-2010 Eric Laurent <elaurent@google.com> Fix volume problems with insert revert

- Use a constant input level to the reverb engine and implement volume control in the
insert reverb. This avoids the volume spikes when an effect that was inserted after
the reverb is disabled or removed.
- Fix clicks (one silent buffer) at the end of the reverb disable period.
- Modified volume management in audioflinger so that the volume ramp is also done by
the insert effect if present when the track is paused (avoids clicks).
- Increased room level for all presets.

Also fixed problems with output stage session (-1):
- effect bundle wrapper was not designed to support session -1
- the permission check in audioflinger for using session -1 failed due to a wrong usage of
getCallingPid()

Change-Id: Id1ff51327263364bf71d3f2668fa5cde4311d84f
udioflinger/AudioFlinger.cpp
0667de7038238c31af77865eb6d83c5ae9ca1b1e 04-Sep-2010 Wu-cheng Li <wuchengli@google.com> Only enable CAMERA_MSG_PREVIEW_FRAME when necessary.

Now camera driver uses ANativeWindow for display.
CameraService should not request preview callback from
camera hardware if applications have not requested it.

bug:2951018
Change-Id: I85f74ea4a61104feca018867bc9d6dfe3a9479f5
amera/libcameraservice/CameraService.cpp
e5fe2601b25e3220c3c4cfb79695ddb8a2f817ac 02-Sep-2010 Eric Laurent <elaurent@google.com> am 937056c1: am 32ec1ad1: Merge "Fix problem in AudioEffect::command() status." into gingerbread

Merge commit '937056c1a7ce71e6881305a31f76e62a76685f24'

* commit '937056c1a7ce71e6881305a31f76e62a76685f24':
Fix problem in AudioEffect::command() status.
aeae3de947fa0b1e670c8472b32288962f97b4f5 02-Sep-2010 Eric Laurent <elaurent@google.com> Fix problem in AudioEffect::command() status.

The *pReplyData argument of the command() function was left unitialized by EffectHandle::command()
when command was EFFECT_CMD_ENABLE, EFFECT_CMD_DISABLE and EFFECT_CMD_SET_PARAM_COMMIT.

Change-Id: I91a19817ead2a8cfbdd8e2d77ca270c7ce9d5bd4
udioflinger/AudioFlinger.cpp
84284e7a4e8d7f781f3a90605047aea1bb21dbf6 01-Sep-2010 Wu-cheng Li <wuchengli@google.com> Merge "Remove setPreviewDisplay in CameraService::Client::~Client()."
3abe8d29864d3e8a9f40be43e5faa10e57a4fac5 01-Sep-2010 Wu-cheng Li <wuchengli@google.com> Remove setPreviewDisplay in CameraService::Client::~Client().

mSurface is released in destructor and setPreviewWindow(0) is
called in Client::disconnect(). setPreviewDisplay is not needed
in destructor.

bug:2964479
Change-Id: I329901659a2af407816c34e02f37143b28183a89
amera/libcameraservice/CameraService.cpp
1040127473ee48c1c3b8c279ae05d38dbfb6e4c2 01-Sep-2010 Eric Laurent <elaurent@google.com> am 55e79374: am f560ceab: Merge "Audio Effects: fix problems in volume control." into gingerbread

Merge commit '55e7937462d107b469a58651d3d51e15086f8e9e'

* commit '55e7937462d107b469a58651d3d51e15086f8e9e':
Audio Effects: fix problems in volume control.
8f45bd725549436eeacd12ee69349e2332ed8da5 31-Aug-2010 Eric Laurent <elaurent@google.com> Audio Effects: fix problems in volume control.

- Fixed click when re-enabling effect during the turn off phase:
make sure the effect states where effect is processed are the same
where volume control is delegated to effect.
- Fixed click when effect is deleted while still active: do not apply
volume ramp if an effect having volume control was just removed from the
effect chain.

Also fixed a crash when PCM dump is enabled in effect bundle wrapper.

Change-Id: Ib562f5cf75c69af75df0e862536262e2514493e4
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
ea798dd9f37b34acfa3cf8d945dbe7f7e90e7196 31-Aug-2010 Eric Laurent <elaurent@google.com> am 44217848: am ae6bdc23: Merge "Fix issue 2952766." into gingerbread

Merge commit '4421784895a58bb7bcf90236a9e443b372b5b80e'

* commit '4421784895a58bb7bcf90236a9e443b372b5b80e':
Fix issue 2952766.
c1c88e27a6f07a530fca184f515c16d51e46d56f 28-Aug-2010 Eric Laurent <elaurent@google.com> Fix issue 2952766.

The problem is that the audio policy manager does not handle the input devices
when forced use for telephony is changed.
The problem does not appear in a call over PSTN becasue only teh output devices drives the
routing of in call audio to/from the base band.

The fix consists in modifying AudioPolicyManagerBase::setForceUse() to check for active inputs
and update the input device if needed.

Change-Id: I0d36d1f5eef1cce527929180c29b025439902f10
udioflinger/AudioPolicyManagerBase.cpp
8f3e6aa2951358c0dea593a2448171a3f97cc0eb 24-Aug-2010 Jamie Gennis <jgennis@google.com> Add the setPreviewWindow camera HAL API to the camera stub.

Change-Id: Ic669f9d5f5ae8f1fe5bd055f55aa4a18fa6d84cd
amera/libcameraservice/CameraHardwareStub.cpp
amera/libcameraservice/CameraHardwareStub.h
4b79168835965cf0fc41ebe2a367e22b4cb20d08 11-Aug-2010 Jamie Gennis <jgennis@google.com> Change the framework to use the new camera preview path.

This change makes the camera HAL interface take an ANativeWindow interface from
which all the camera preview buffers will be allocated. The framework code
running in application processes now passes a Surface object rather than an
ISurface to the camera server via Binder when setting the preview surface. The
camera server then forwards that Surface object (which implements the
ANativeWindow interface) to the camera HAL, which uses it to communicate with
SurfaceFlinger to allocate the camera preview buffers.

Change-Id: Ie438f721559cd7de5e4f848a26d96360dda07b5f
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
011df6ab59853b5e2f5654031d842fb1231198c0 23-Aug-2010 Wu-cheng Li <wuchengli@google.com> am caaf7fe3: am 271c1bfd: Merge "Handle the camera open failure better." into gingerbread

Merge commit 'caaf7fe3a407c764f643585d050c16f5fb56503c'

* commit 'caaf7fe3a407c764f643585d050c16f5fb56503c':
Handle the camera open failure better.
69e0b8c5556df1d4db1a730db1c13409a96749c7 21-Aug-2010 Eric Laurent <elaurent@google.com> am 3a899b85: am 0b9a12bf: Merge "Fix issue 2929440" into gingerbread

Merge commit '3a899b85102f6d51585b3d46ced3038c8602f202'

* commit '3a899b85102f6d51585b3d46ced3038c8602f202':
Fix issue 2929440
b7a67942823e8339eb298238f117aaa6d7b63111 18-Aug-2010 Wu-cheng Li <wuchengli@google.com> Handle the camera open failure better.

Check if camera hardware is NULL to avoid mediaserver crash.

Change-Id: Ibde0251f30bdb6b36a5d5380222d7be25ec9449c
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
25cbe0ecd6df8be7e40537c5d85c82f105038479 19-Aug-2010 Eric Laurent <elaurent@google.com> Fix issue 2929440

Fixed regression introduced by change a54d7d3d7dd691334189aab20d23c65710092869 in audioflinger mixer thread:
When the output stream is suspended, the sleep time between two writes must match the actual duration
of one output stream buffer otherwise the playback rate is not respected.

Change-Id: Ic5bebe890290d1f44aeff9dd3c142d18e26fff2a
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
a1a6cba3664a04d214b372526658ba227e4d5366 14-Aug-2010 Eric Laurent <elaurent@google.com> am f28608cd: am c8d0d630: Merge "Fix issue 2909189: System property ro.audio.silent no longer mutes system." into gingerbread

Merge commit 'f28608cdf4f6a0075d0811ccd32123baf4daec31'

* commit 'f28608cdf4f6a0075d0811ccd32123baf4daec31':
Fix issue 2909189: System property ro.audio.silent no longer mutes system.
571d49c1c316f5e07b74ed7b5df6bdec7cbc1a14 11-Aug-2010 Eric Laurent <elaurent@google.com> Fix issue 2909189: System property ro.audio.silent no longer mutes system.

Fixed regression introduced by commit 2a6b80bc65c4782b5a7168b300e1dc5ec9f617ee:
master mute was not working if no effect chains were present on session 0.

Change-Id: I66d107e045d159cb94d29c7476fa1e12d92f2ae7
udioflinger/AudioFlinger.cpp
bc417c0531332635df9525df4683274a08fb987f 10-Aug-2010 Eric Laurent <elaurent@google.com> am 1ece7d68: am 2a6b80bc: Fixed several audio effects problems.

Merge commit '1ece7d6873027068a3e7b055597045e9387b217c'

* commit '1ece7d6873027068a3e7b055597045e9387b217c':
Fixed several audio effects problems.
8569f0d3bf4c6787707e348a7cf73b9c4199cb32 30-Jul-2010 Eric Laurent <elaurent@google.com> Fixed several audio effects problems.

- Fixed constant inversions in AudioEffect.java
- Do not return error when enabling an already enabled effect
- Update cached effect state in native AudioEffect class when effect is enabled/disabled by command() method
- Remove click when restarting effect during disable sequence
- Fixed problem in master mute management when volume control is delegated to effect.

Change-Id: I6df4ce9fcc54fdc7345df858f639d20d802d6712
udioflinger/AudioFlinger.cpp
9da2070b6d6d20550de7da61478c325f0928d020 30-Jul-2010 Jean-Baptiste Queru <jbq@google.com> resolved conflicts for merge of 27eecb70 to gingerbread

Change-Id: If064f2f4950fc1a4ff38e6927fe2120af76b26f1
bc286dce1af6670824fba4167e0750b631168d72 30-Jul-2010 Jean-Baptiste Queru <jbq@google.com> am 0c51c98f: am 4506c62a: fix inaccurate copyrights

Merge commit '0c51c98fd9edf0bdc8f2c567470fc332b5ae3adf'

* commit '0c51c98fd9edf0bdc8f2c567470fc332b5ae3adf':
fix inaccurate copyrights
0319aaecb03aa83924ab4e3d9c9bc657c2e8bc06 30-Jul-2010 Jean-Baptiste Queru <jbq@google.com> am 4506c62a: fix inaccurate copyrights

Merge commit '4506c62abd5767d6d42a97e8e87793a1b3bcb625' into gingerbread-plus-aosp

* commit '4506c62abd5767d6d42a97e8e87793a1b3bcb625':
fix inaccurate copyrights
01cff464978aa0f749f42650180b45ea56cb17de 30-Jul-2010 Jean-Baptiste Queru <jbq@google.com> fix inaccurate copyrights

Change-Id: I33b0f68f2da34ca4728211d83159cf32a127f6dd
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
e679114b6c7e087a59c2b2c3b55603c43da4ef38 29-Jul-2010 Eric Laurent <elaurent@google.com> am ba676a00: am a54d7d3d: Fixed underrun in audioflinger mixer.

Merge commit 'ba676a00c1b9ba59b30fe805b83d03d1768fffbd'

* commit 'ba676a00c1b9ba59b30fe805b83d03d1768fffbd':
Fixed underrun in audioflinger mixer.
60e182437228312cc28469a5b0dfde77ac848e1a 29-Jul-2010 Eric Laurent <elaurent@google.com> Fixed underrun in audioflinger mixer.

When all audio tracks have been disabled and the mixer is running idle before the output stream is placed in standby,
the mixer sometimes fails to write to the output stream on time to avoid underrun.

This is because the sleep period used to wait before the next write to output stream is too close to the actual buffer duration.
In fact this sleep time is not critical as if we write too early to the output stream, the kernel driver will wait for free buffers
from the audio DSP DMA and we will sleep anyways.

The fix consists in dividing the calculated wait period by 2 to increase the margin.

Change-Id: I5730887dc2ccce2a511bc858494a6f7da6b392a0
udioflinger/AudioFlinger.cpp
cc759794489c2c39aaef229fba4ace32e394bb81 29-Jul-2010 Eric Laurent <elaurent@google.com> am 45dc4f82: am 493941b8: Allow creation of an audio effect on a session with no audio tracks.

Merge commit '45dc4f82a00e52b12389b22a7cfbbee5609e8e28'

* commit '45dc4f82a00e52b12389b22a7cfbbee5609e8e28':
Allow creation of an audio effect on a session with no audio tracks.
39e94f8f723d445447fdee0822291e664b631f60 28-Jul-2010 Eric Laurent <elaurent@google.com> Allow creation of an audio effect on a session with no audio tracks.

This is necessary to allow creating and enabling an effect attached to a particular player
session before the playback is started. As a matter of fact, the implementation of the mediaplayer
does not create the AudioTrack before playback starts.

Change-Id: I1266e8885f9d756acc949303321aaac0fbf83e34
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
ed0de3c123aaa86147993721d4794648a65aab75 28-Jul-2010 Eric Laurent <elaurent@google.com> am 6fa88882: am 62d83a0c: Merge "Audio effects: modified command() parameter types." into gingerbread

Merge commit '6fa8888254deb4961dc64c6ac03dc103c9cd8bcf'

* commit '6fa8888254deb4961dc64c6ac03dc103c9cd8bcf':
Audio effects: modified command() parameter types.
25f4395b932fa9859a6e91ba77c5d20d009da64a 28-Jul-2010 Eric Laurent <elaurent@google.com> Audio effects: modified command() parameter types.

The type of the cmd, cmdSize and *pReplySize parameters of the effect control interface command()
function have been modified from int to uint32_t. This is more consistent with their role.

Change-Id: I84d289fc262d6753747910f06f485597dfee6591
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
ccaa41429d2afc47f0fb828a0146a1b1936188fe 23-Jul-2010 Mathias Agopian <mathias@google.com> move native services under services/

moved surfaceflinger, audioflinger, cameraservice

all native services should now reside in this location.

Change-Id: Icd7336f7289db35df9c8c1857a5122bb8a6f1c86
udioflinger/A2dpAudioInterface.cpp
udioflinger/A2dpAudioInterface.h
udioflinger/Android.mk
udioflinger/AudioBufferProvider.h
udioflinger/AudioDumpInterface.cpp
udioflinger/AudioDumpInterface.h
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioHardwareGeneric.cpp
udioflinger/AudioHardwareGeneric.h
udioflinger/AudioHardwareInterface.cpp
udioflinger/AudioHardwareStub.cpp
udioflinger/AudioHardwareStub.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/AudioPolicyManagerBase.cpp
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
udioflinger/AudioResampler.cpp
udioflinger/AudioResampler.h
udioflinger/AudioResamplerCubic.cpp
udioflinger/AudioResamplerCubic.h
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
amera/libcameraservice/Android.mk
amera/libcameraservice/CameraHardwareStub.cpp
amera/libcameraservice/CameraHardwareStub.h
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/CannedJpeg.h
amera/libcameraservice/FakeCamera.cpp
amera/libcameraservice/FakeCamera.h
amera/tests/CameraServiceTest/Android.mk
amera/tests/CameraServiceTest/CameraServiceTest.cpp
8184a5734690b30f4de0f6b6c16daf1e089f67df 20-Jul-2010 Eric Laurent <elaurent@google.com> resolved conflicts for merge of dd206093 to master

Change-Id: I21dd2321a4839d034d49092baccbf40986f17dae
de070137f11d346fba77605bd76a44c040a618fc 13-Jul-2010 Eric Laurent <elaurent@google.com> Audio policy manager changes for audio effects

Added methods for audio effects management by audio policy manager.
- control of total CPU load and memory used by effect engines
- selection of output stream for global effects
- added audio session id in parameter list for startOutput() and stopOutput().
this is not used in default audio policy manager implementation.

Modifications of audio effect framework in AudioFlinger to allow moving and reconfiguring
effect engines from one output mixer thread to another when audio tracks in the same session
are moved or when requested by audio policy manager.
Also fixed mutex deadlock problem with effect chains locks.

Change-Id: Ida43484b06e9b890d6b9e53c13958d042720ebdb
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioPolicyManagerBase.cpp
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
bbf6dcd2aa8eb877e6412aaade25a077f62a6284 19-Jul-2010 Eric Laurent <elaurent@google.com> am 3c6ea955: am 7203272f: Merge "Fixed problems in audio effect volume control." into gingerbread

Merge commit '3c6ea95553d3a0e416874c583a41efff3f6fbc57'

* commit '3c6ea95553d3a0e416874c583a41efff3f6fbc57':
Fixed problems in audio effect volume control.
f997cabca292d70d078ae828e21c28e6df62995f 19-Jul-2010 Eric Laurent <elaurent@google.com> Fixed problems in audio effect volume control.

Fixed the following problems in audio effect volume control in AudioFlinger:
- Make sure that the volumes returned by EffectChain::setVolume_l() are correct even is
no change is detected since last call
- Do not use isEnabled() to validate volume control but mState >= ACTIVE instead as the volume control
must be also active in STOPPING and STOPPED states.

Change-Id: Id62da3164fad500ee8a5efd6cd78c77e8fdcb541
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
521bcb0ff5054e5be40f5194026da3463504ae3b 16-Jul-2010 Eric Laurent <elaurent@google.com> am f16b3f10: am b0374a0e: Merge "Several improvements in audio effects volume control." into gingerbread

Merge commit 'f16b3f104f60738447db60bcf2c44c7610e17199'

* commit 'f16b3f104f60738447db60bcf2c44c7610e17199':
Several improvements in audio effects volume control.
cab112421da6e8eac19ffddbbe3d76067cffee78 15-Jul-2010 Eric Laurent <elaurent@google.com> Several improvements in audio effects volume control.

- Fixed crash when deleting an effect chained before an effect having volume control
- Changed EFFECT_FLAG_VOLUME_CTRL to implicitely include EFFECT_FLAG_VOLUME_IND
(not need to set both in effect descriptor).
- Volume control changes from one effect to another if needed according to effect enable state
- EFFECT_CMD_SET_VOLUME is only sent when their is an actual change in volume

Change-Id: Ieebaf09157e2627366023569d95516646e03e26c
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
c0b9c87b2581af430e143822918935d15ac69911 15-Jul-2010 Mathias Agopian <mathias@google.com> am c74034b6: am 24651682: added BinderService<> template to help creating native binder services

Merge commit 'c74034b6bf0940dc80c4d4efa1e677ad0d2dfd6c'

* commit 'c74034b6bf0940dc80c4d4efa1e677ad0d2dfd6c':
added BinderService<> template to help creating native binder services
094c96da874d84eae46f76cc036fa7b7993eb999 15-Jul-2010 Mathias Agopian <mathias@google.com> am 78983a91: am 4055b780: Merge "move native services under services/" into gingerbread

Merge commit '78983a9133d3dd3f08b1ec462a7e2f9e7bfa9e2f'

* commit '78983a9133d3dd3f08b1ec462a7e2f9e7bfa9e2f':
move native services under services/
5462fc9a38fa8c9dff434cd53fa5fb1782ae3042 15-Jul-2010 Mathias Agopian <mathias@google.com> added BinderService<> template to help creating native binder services

Change-Id: Id980899d2647b56479f8a27c89eaa949f9209dfe
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
65ab47156e1c7dfcd8cc4266253a5ff30219e7f0 15-Jul-2010 Mathias Agopian <mathias@google.com> move native services under services/

moved surfaceflinger, audioflinger, cameraservice

all native services should now reside in this location.

Change-Id: Iee42b83dd2a94c3bf5107ab0895fe2dfcd5337a8
udioflinger/A2dpAudioInterface.cpp
udioflinger/A2dpAudioInterface.h
udioflinger/Android.mk
udioflinger/AudioBufferProvider.h
udioflinger/AudioDumpInterface.cpp
udioflinger/AudioDumpInterface.h
udioflinger/AudioFlinger.cpp
udioflinger/AudioFlinger.h
udioflinger/AudioHardwareGeneric.cpp
udioflinger/AudioHardwareGeneric.h
udioflinger/AudioHardwareInterface.cpp
udioflinger/AudioHardwareStub.cpp
udioflinger/AudioHardwareStub.h
udioflinger/AudioMixer.cpp
udioflinger/AudioMixer.h
udioflinger/AudioPolicyManagerBase.cpp
udioflinger/AudioPolicyService.cpp
udioflinger/AudioPolicyService.h
udioflinger/AudioResampler.cpp
udioflinger/AudioResampler.h
udioflinger/AudioResamplerCubic.cpp
udioflinger/AudioResamplerCubic.h
udioflinger/AudioResamplerSinc.cpp
udioflinger/AudioResamplerSinc.h
amera/libcameraservice/Android.mk
amera/libcameraservice/CameraHardwareStub.cpp
amera/libcameraservice/CameraHardwareStub.h
amera/libcameraservice/CameraService.cpp
amera/libcameraservice/CameraService.h
amera/libcameraservice/CannedJpeg.h
amera/libcameraservice/FakeCamera.cpp
amera/libcameraservice/FakeCamera.h
amera/tests/CameraServiceTest/Android.mk
amera/tests/CameraServiceTest/CameraServiceTest.cpp