• Home
  • History
  • Annotate
  • only in /frameworks/av/services/audiopolicy/
History log of /frameworks/av/services/audiopolicy/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
87977a493692e39f42547b986175b68d83c57d10 20-Feb-2017 Eric Laurent <elaurent@google.com> added audio policy configuration files for generic target

Bug: 62524944
Test: make
Change-Id: Ifa8b523d3f1f09dfb6f8e88fab12e170b628dfb5
onfig/audio_policy_configuration_generic.xml
onfig/primary_audio_policy_configuration.xml
6aa929c9296180abac526f594137f18c38620c62 19-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "audio policy manager: do not reapply same forced usage" 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
anagerdefault/AudioPolicyManager.cpp
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>
ommon/managerdefinitions/include/AudioOutputDescriptor.h
ommon/managerdefinitions/src/AudioOutputDescriptor.cpp
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.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
anagerdefault/AudioPolicyManager.cpp
5c1b4f3a1d42f1a9eeecb20881c28d48edec4f90 19-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "audio policy: disable concurrent capture" into oc-dev
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
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.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
anagerdefault/AudioPolicyManager.cpp
cbd0e571958736a4036bcd0496d4933780af880e 12-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Configurable Audio Policy: Various fixes" 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
ommon/managerdefinitions/src/AudioSession.cpp
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>
ngineconfigurable/parameter-framework/examples/Settings/PolicyConfigurableDomains.xml
ngineconfigurable/parameter-framework/examples/Settings/device_for_strategy_accessibility.pfw
ngineconfigurable/parameter-framework/examples/Settings/device_for_strategy_sonification_respectful.pfw
ngineconfigurable/parameter-framework/examples/Settings/strategy_for_usage.pfw
ngineconfigurable/parameter-framework/examples/Structure/PolicySubsystem.xml
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
ommon/include/Volume.h
nginedefault/src/Engine.cpp
anagerdefault/AudioPolicyManager.cpp
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
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
nginedefault/src/Engine.cpp
05d19b08f3affa6fa8407e779f67e7ad1c1ca84f 01-Mar-2017 Mathias Agopian <mathias@google.com> fallout of cleaning-up libutils includes

Test: run & compile
Bug: n/a
Change-Id: I63585ed5a764b9ce7af2187b79ca0c83e683fd7f
ommon/managerdefinitions/src/AudioPatch.cpp
ommon/managerdefinitions/src/AudioPort.cpp
anagerdefault/AudioPolicyManager.cpp
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
anagerdefault/AudioPolicyManager.cpp
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
anagerdefault/AudioPolicyManager.cpp
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>
ommon/managerdefinitions/include/AudioOutputDescriptor.h
ommon/managerdefinitions/src/AudioOutputDescriptor.cpp
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
587b8dfdbc3d3b1dd9ffc1996b9a07cd9b284833 31-Jan-2017 vivek mehta <mvivek@codeaurora.org> audio: fix audioSession null check

Test: make

Change-Id: Ied514f8fb7496143bad45504151ca16226c67767
anagerdefault/AudioPolicyManager.cpp
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
ommon/managerdefinitions/include/AudioInputDescriptor.h
ommon/managerdefinitions/src/AudioInputDescriptor.cpp
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
cac8d4ea54ece7aeb4b2ffa7aafd06fbec731a62 18-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "audio policy: allows dumping Audio Policy Mix"
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
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
ommon/managerdefinitions/src/AudioPatch.cpp
ommon/managerdefinitions/src/AudioSession.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
ommon/managerdefinitions/include/AudioPolicyMix.h
ommon/managerdefinitions/include/TypeConverter.h
ommon/managerdefinitions/src/AudioPolicyMix.cpp
ommon/managerdefinitions/src/TypeConverter.cpp
anagerdefault/AudioPolicyManager.cpp
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
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
anagerdefault/AudioPolicyManager.cpp
ervice/AudioPolicyInterfaceImpl.cpp
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
nginedefault/src/Engine.cpp
anagerdefault/AudioPolicyManager.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
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
udioPolicyInterface.h
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
ervice/AudioPolicyInterfaceImpl.cpp
ervice/AudioPolicyService.h
32a5f5d53f9fe2ba584d2ecdf3edd487fb4146a7 22-Dec-2016 Mark Salyzyn <salyzyn@google.com> resolve merge conflicts of 4532a36 to master

Test: build
Change-Id: I9b93c4a703c0ee16116be2bea0e6df0606d29363
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
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
ommon/managerdefinitions/src/AudioPatch.cpp
ommon/managerdefinitions/src/AudioSession.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
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
ae2026ecfe37e92b0a2ba5084a8ab9fe07b7134d 19-Dec-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Use libxml2 as shared lib."
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
ndroid.mk
ommon/managerdefinitions/Android.mk
ngineconfigurable/Android.mk
nginedefault/Android.mk
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
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
116160d6680a0eabeea6510463c863f9afbe2956 14-Dec-2016 Andy Hung <hunga@google.com> APM::updateCallRouting: ignore for stub output hal
am: a76c7de622

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

Bug: 33463233
Change-Id: I9b6708bef087e3f4a97868b2d8f7a9b1558233d0
anagerdefault/AudioPolicyManager.cpp
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
udioPolicyInterface.h
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
ervice/AudioPolicyInterfaceImpl.cpp
ervice/AudioPolicyService.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
ervice/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>
ngineconfigurable/wrapper/ParameterManagerWrapper.cpp
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
ervice/AudioPolicyEffects.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
ndroid.mk
ngineconfigurable/Android.mk
ngineconfigurable/wrapper/Android.mk
nginedefault/Android.mk
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
ervice/AudioPolicyInterfaceImpl.cpp
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
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
onfig/a2dp_audio_policy_configuration.xml
d3c61c2c74a9a83392ccaee17b6f1dd54492a530 29-Nov-2016 Eric Laurent <elaurent@google.com> Merge "remove support for legacy audio policy manager"
8243fcd644bd4b4865c3977435bb758c981ccf65 29-Nov-2016 Eric Laurent <elaurent@google.com> remove support for legacy audio policy manager

Test: make

Change-Id: I7294a52674abadfdbc4da40a72c8fe1a229d0815
ndroid.mk
ervice/AudioPolicyClientImplLegacy.cpp
ervice/AudioPolicyInterfaceImplLegacy.cpp
ervice/AudioPolicyService.cpp
ervice/AudioPolicyService.h
382bbc8fd1617e96881693c5f747def476c5786f 28-Nov-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Do not hardcode media - a11y stream aliasing"
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
anagerdefault/AudioPolicyManager.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
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'"
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
d5eb866c536c3497e778742e5fda22ac1def9fc6 19-Nov-2016 Dan Willemsen <dwillemsen@google.com> Merge "Remove LOCAL_COPY_HEADERS from libparameter"
am: 76321a335c

Change-Id: Ie99187aa91ddb1a9fa199dcf681edd4565cc0d1b
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
ngineconfigurable/Android.mk
ngineconfigurable/wrapper/Android.mk
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
anagerdefault/AudioPolicyManager.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
ommon/managerdefinitions/src/Serializer.cpp
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
ommon/include/policy.h
300379ab01ec4c5f9f538284dbb1e49ad012de29 07-Nov-2016 Mikhail Naganov <mnaganov@google.com> Merge "Move TypeConverter into a shared library"
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
ndroid.mk
ommon/managerdefinitions/include/TypeConverter.h
ommon/managerdefinitions/src/AudioPatch.cpp
ommon/managerdefinitions/src/ConfigParsingUtils.cpp
ommon/managerdefinitions/src/DeviceDescriptor.cpp
ommon/managerdefinitions/src/Serializer.cpp
ommon/managerdefinitions/src/TypeConverter.cpp
ngineconfigurable/Android.mk
ngineconfigurable/wrapper/Android.mk
ngineconfigurable/wrapper/ParameterManagerWrapper.cpp
nginedefault/Android.mk
tilities/convert/convert.h
4ea929819e23ecd388e1edce25a10631ee53e9e3 07-Nov-2016 Marco Nelissen <marcone@google.com> Split libmedia into libmedia and libaudioclient
am: 795a2a7554

Change-Id: Ic08eddc5650d3f5d344ebcf93ad98ae5bb236c8c
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
ndroid.mk
4f197ec220d2c9634429692dd37896233273111d 04-Nov-2016 Marco Nelissen <marcone@google.com> Merge "Remove unneeded links with dynamic libraries"
am: 46d0a5b493

Change-Id: Ica6dd538c30b9aeccddad229cb24ade4d82d2e4c
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
ndroid.mk
nginedefault/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
ndroid.mk
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
ndroid.mk
nginedefault/Android.mk
bf2e61f54c7dcc37c97b4908c9ed6871cf3d2b49 24-Oct-2016 Glenn Kasten <gkasten@google.com> Merge "Use audio_patch_handle_t in startAudioSource() and stopAudioSource()"
559d439c6fe8679e3c52f1cf265d46d7d2e65b68 29-Mar-2016 Glenn Kasten <gkasten@google.com> Use audio_patch_handle_t in startAudioSource() and stopAudioSource()

Bug: 27903060
Change-Id: Iafc2095f484b74978c6f080c54f548e293bf945e
udioPolicyInterface.h
ommon/managerdefinitions/include/AudioSourceDescriptor.h
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
ervice/AudioPolicyInterfaceImpl.cpp
ervice/AudioPolicyInterfaceImplLegacy.cpp
ervice/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
ommon/managerdefinitions/include/AudioPort.h
ommon/managerdefinitions/include/HwModule.h
ommon/managerdefinitions/src/AudioPort.cpp
ommon/managerdefinitions/src/ConfigParsingUtils.cpp
ommon/managerdefinitions/src/HwModule.cpp
ommon/managerdefinitions/src/Serializer.cpp
nginedefault/src/Engine.cpp
anagerdefault/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
ndroid.mk
ervice/AudioPolicyEffects.cpp
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
ommon/managerdefinitions/include/TypeConverter.h
ommon/managerdefinitions/src/ConfigParsingUtils.cpp
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
e7557336920ca7e7d53e8ccc03d23359b41957af 18-Oct-2016 Glenn Kasten <gkasten@google.com> Remove executable bit from ordinary files

Test: builds OK
Change-Id: I7912c9c9c85dc500d33698fc174ba2a0db387407
ommon/include/Volume.h
ommon/include/policy.h
ngine/interface/AudioPolicyManagerInterface.h
ngine/interface/AudioPolicyManagerObserver.h
ngineconfigurable/Android.mk
ngineconfigurable/include/AudioPolicyEngineInstance.h
ngineconfigurable/include/EngineDefinition.h
ngineconfigurable/interface/AudioPolicyPluginInterface.h
ngineconfigurable/parameter-framework/examples/ParameterFrameworkConfigurationPolicy.xml.in
ngineconfigurable/parameter-framework/examples/Settings/strategy_for_stream.pfw
ngineconfigurable/parameter-framework/examples/Structure/PolicyClass.xml
ngineconfigurable/parameter-framework/examples/Structure/PolicySubsystem-CommonTypes.xml
ngineconfigurable/parameter-framework/examples/Structure/PolicySubsystem.xml
ngineconfigurable/parameter-framework/examples/policy_criteria.txt
ngineconfigurable/parameter-framework/plugin/Android.mk
ngineconfigurable/parameter-framework/plugin/InputSource.cpp
ngineconfigurable/parameter-framework/plugin/InputSource.h
ngineconfigurable/parameter-framework/plugin/PolicyMappingKeys.h
ngineconfigurable/parameter-framework/plugin/PolicySubsystem.cpp
ngineconfigurable/parameter-framework/plugin/PolicySubsystem.h
ngineconfigurable/parameter-framework/plugin/PolicySubsystemBuilder.cpp
ngineconfigurable/parameter-framework/plugin/Strategy.cpp
ngineconfigurable/parameter-framework/plugin/Strategy.h
ngineconfigurable/parameter-framework/plugin/Stream.cpp
ngineconfigurable/parameter-framework/plugin/Stream.h
ngineconfigurable/parameter-framework/plugin/Usage.cpp
ngineconfigurable/parameter-framework/plugin/Usage.h
ngineconfigurable/src/Collection.h
ngineconfigurable/src/Element.h
ngineconfigurable/src/Engine.cpp
ngineconfigurable/src/Engine.h
ngineconfigurable/src/EngineInstance.cpp
ngineconfigurable/src/InputSource.cpp
ngineconfigurable/src/InputSource.h
ngineconfigurable/src/Strategy.cpp
ngineconfigurable/src/Strategy.h
ngineconfigurable/src/Stream.cpp
ngineconfigurable/src/Stream.h
ngineconfigurable/src/Usage.cpp
ngineconfigurable/src/Usage.h
ngineconfigurable/wrapper/ParameterManagerWrapper.cpp
ngineconfigurable/wrapper/audio_policy_criteria_conf.h
ngineconfigurable/wrapper/config/audio_policy_criteria.conf
ngineconfigurable/wrapper/include/ParameterManagerWrapper.h
nginedefault/Android.mk
nginedefault/include/AudioPolicyEngineInstance.h
nginedefault/src/Engine.cpp
nginedefault/src/Engine.h
nginedefault/src/EngineInstance.cpp
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
udioPolicyInterface.h
ervice/AudioPolicyService.cpp
ervice/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
ommon/managerdefinitions/include/EffectDescriptor.h
anagerdefault/AudioPolicyManager.cpp
ervice/AudioPolicyClientImplLegacy.cpp
ervice/AudioPolicyEffects.cpp
ervice/AudioPolicyEffects.h
ervice/AudioPolicyService.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
ommon/managerdefinitions/include/AudioPolicyMix.h
ommon/managerdefinitions/include/StreamDescriptor.h
ommon/managerdefinitions/include/VolumeCurve.h
ommon/managerdefinitions/src/ConfigParsingUtils.cpp
ommon/managerdefinitions/src/HwModule.cpp
anagerdefault/AudioPolicyManager.cpp
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
ommon/managerdefinitions/include/AudioInputDescriptor.h
ommon/managerdefinitions/src/AudioInputDescriptor.cpp
anagerdefault/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
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
anagerdefault/AudioPolicyManager.cpp
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
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
anagerdefault/AudioPolicyManager.cpp
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
anagerdefault/AudioPolicyManager.cpp
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
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
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
e31f1491f87804595ad2f2a4a0842ffe7f35f32f 02-Sep-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "Use symbolic name for return value in legacy audio policy client"
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
anagerdefault/AudioPolicyManager.cpp
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
ommon/managerdefinitions/include/AudioRoute.h
ommon/managerdefinitions/include/IOProfile.h
7b946f1102a90dd1735b334a77243f4f8126bd70 23-Aug-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "audiopolicy: modify A2DP suspend logic"
44f13b94ec6cc55923dc350561db96b194c9bd0f 11-Aug-2016 Eric Laurent <elaurent@google.com> Merge "audiopolicy: fix very verbose logging build"
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
37ddbb43721947d6cb5246ec2cf2a6bd8fc28bcb 11-Aug-2016 Eric Laurent <elaurent@google.com> audiopolicy: fix very verbose logging build

Change-Id: I3a90ba55f85e11c9c2b986479c1dd0fda9059f81
anagerdefault/AudioPolicyManager.cpp
df5d9246f9607b1c2f8b134c46a05af06e206da3 11-Aug-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of fd923e7 to stage-aosp-master

Change-Id: I75b44b89bae41197a1fd68362d20b8ba2b4dd192
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
udioPolicyInterface.h
ommon/managerdefinitions/include/AudioInputDescriptor.h
ommon/managerdefinitions/include/AudioOutputDescriptor.h
ommon/managerdefinitions/include/AudioPolicyMix.h
ommon/managerdefinitions/include/AudioPort.h
ommon/managerdefinitions/include/DeviceDescriptor.h
ommon/managerdefinitions/include/HwModule.h
ommon/managerdefinitions/include/IOProfile.h
ommon/managerdefinitions/include/SessionRoute.h
ommon/managerdefinitions/src/AudioOutputDescriptor.cpp
ommon/managerdefinitions/src/AudioPolicyMix.cpp
ommon/managerdefinitions/src/AudioPort.cpp
ommon/managerdefinitions/src/DeviceDescriptor.cpp
ommon/managerdefinitions/src/HwModule.cpp
ommon/managerdefinitions/src/IOProfile.cpp
ommon/managerdefinitions/src/SessionRoute.cpp
nginedefault/src/Engine.h
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
ervice/AudioPolicyEffects.h
ervice/AudioPolicyInterfaceImpl.cpp
ervice/AudioPolicyInterfaceImplLegacy.cpp
ervice/AudioPolicyService.cpp
ervice/AudioPolicyService.h
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
udioPolicyInterface.h
ommon/managerdefinitions/include/AudioInputDescriptor.h
ommon/managerdefinitions/include/AudioOutputDescriptor.h
ommon/managerdefinitions/include/AudioPolicyMix.h
ommon/managerdefinitions/include/AudioPort.h
ommon/managerdefinitions/include/DeviceDescriptor.h
ommon/managerdefinitions/include/HwModule.h
ommon/managerdefinitions/include/IOProfile.h
ommon/managerdefinitions/include/SessionRoute.h
ommon/managerdefinitions/src/AudioOutputDescriptor.cpp
ommon/managerdefinitions/src/AudioPolicyMix.cpp
ommon/managerdefinitions/src/AudioPort.cpp
ommon/managerdefinitions/src/DeviceDescriptor.cpp
ommon/managerdefinitions/src/HwModule.cpp
ommon/managerdefinitions/src/IOProfile.cpp
ommon/managerdefinitions/src/SessionRoute.cpp
nginedefault/src/Engine.h
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
ervice/AudioPolicyEffects.h
ervice/AudioPolicyInterfaceImpl.cpp
ervice/AudioPolicyInterfaceImplLegacy.cpp
ervice/AudioPolicyService.cpp
ervice/AudioPolicyService.h
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
anagerdefault/AudioPolicyManager.cpp
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
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
anagerdefault/AudioPolicyManager.cpp
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
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
ervice/AudioPolicyService.cpp
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
anagerdefault/AudioPolicyManager.cpp
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
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
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
2eae53c0128428f936ea1dc6b75e583c30ef1e25 12-Jul-2016 Chris Larsen <chris.larsen@imgtec.com> Use symbolic name for return value in legacy audio policy client

Change-Id: Id27628afcbc4eb2c9bf1313c8376802a47a9596c
ervice/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
d362a52b836ebc2a12620b6f1932ae042a81d2e7 12-Jul-2016 rago <rago@google.com> Fix to usage of upper bound value in volume curve

Bug: 29627411
Change-Id: Iffe3bf69bf4b49cd76ffe00b16ebce1ab81c4631
ommon/managerdefinitions/src/VolumeCurve.cpp
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
fcddb0b73931d207b21bd281a7df3ba2f230a607 09-Jul-2016 Glenn Kasten <gkasten@google.com> Enable strict warning checks and fix

Change-Id: Id401a937911eb418e93314812f2f7c2b5ecff8d6
ndroid.mk
ommon/managerdefinitions/Android.mk
ommon/managerdefinitions/include/TypeConverter.h
ommon/managerdefinitions/src/DeviceDescriptor.cpp
anagerdefault/AudioPolicyManager.cpp
ervice/AudioPolicyService.cpp
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
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
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
ommon/managerdefinitions/src/TypeConverter.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
anagerdefault/AudioPolicyManager.cpp
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
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
anagerdefault/AudioPolicyManager.cpp
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
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
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>
ngineconfigurable/parameter-framework/examples/Settings/device_for_input_source.pfw
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
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>
ngineconfigurable/parameter-framework/examples/Android.mk
ngineconfigurable/parameter-framework/examples/Settings/PolicyConfigurableDomains.xml
ngineconfigurable/parameter-framework/examples/Settings/device_for_input_source.pfw
ngineconfigurable/parameter-framework/examples/Settings/device_for_strategy_accessibility.pfw
ngineconfigurable/parameter-framework/examples/Settings/device_for_strategy_dtmf.pfw
ngineconfigurable/parameter-framework/examples/Settings/device_for_strategy_enforced_audible.pfw
ngineconfigurable/parameter-framework/examples/Settings/device_for_strategy_media.pfw
ngineconfigurable/parameter-framework/examples/Settings/device_for_strategy_phone.pfw
ngineconfigurable/parameter-framework/examples/Settings/device_for_strategy_rerouting.pfw
ngineconfigurable/parameter-framework/examples/Settings/device_for_strategy_sonification.pfw
ngineconfigurable/parameter-framework/examples/Settings/device_for_strategy_sonification_respectful.pfw
ngineconfigurable/parameter-framework/examples/Settings/device_for_strategy_transmitted_through_speaker.pfw
ngineconfigurable/parameter-framework/examples/SettingsNoInput/device_for_input_source.pfw
ngineconfigurable/parameter-framework/examples/SettingsNoOutput/device_for_strategies.pfw
ngineconfigurable/parameter-framework/examples/Structure/PolicySubsystem-CommonTypes.xml
ngineconfigurable/parameter-framework/examples/policy_criteria.txt
ngineconfigurable/parameter-framework/plugin/InputSource.cpp
ngineconfigurable/src/InputSource.cpp
ngineconfigurable/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
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
anagerdefault/AudioPolicyManager.cpp
anagerdefault/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
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
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
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
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>
ngineconfigurable/parameter-framework/examples/Settings/PolicyConfigurableDomains.xml
ngineconfigurable/parameter-framework/examples/Settings/device_for_input_source.pfw
ngineconfigurable/parameter-framework/examples/Structure/PolicySubsystem-CommonTypes.xml
ngineconfigurable/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>
ngineconfigurable/parameter-framework/example/Android.mk
ngineconfigurable/parameter-framework/example/ParameterFrameworkConfigurationPolicy.xml.in
ngineconfigurable/parameter-framework/example/README.md
ngineconfigurable/parameter-framework/example/Settings/PolicyConfigurableDomains.xml
ngineconfigurable/parameter-framework/example/Settings/device_for_input_source.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_accessibility.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_dtmf.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_enforced_audible.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_media.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_phone.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_rerouting.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_sonification.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_sonification_respectful.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_transmitted_through_speaker.pfw
ngineconfigurable/parameter-framework/example/Settings/strategy_for_stream.pfw
ngineconfigurable/parameter-framework/example/Settings/strategy_for_usage.pfw
ngineconfigurable/parameter-framework/example/Settings/volumes.pfw
ngineconfigurable/parameter-framework/example/Structure/PolicyClass.xml
ngineconfigurable/parameter-framework/example/Structure/PolicySubsystem-CommonTypes.xml
ngineconfigurable/parameter-framework/example/Structure/PolicySubsystem.xml
ngineconfigurable/parameter-framework/example/policy_criteria.txt
ngineconfigurable/parameter-framework/examples/Android.mk
ngineconfigurable/parameter-framework/examples/ParameterFrameworkConfigurationPolicy.xml.in
ngineconfigurable/parameter-framework/examples/README.md
ngineconfigurable/parameter-framework/examples/Settings/PolicyConfigurableDomains.xml
ngineconfigurable/parameter-framework/examples/Settings/device_for_input_source.pfw
ngineconfigurable/parameter-framework/examples/Settings/device_for_strategy_accessibility.pfw
ngineconfigurable/parameter-framework/examples/Settings/device_for_strategy_dtmf.pfw
ngineconfigurable/parameter-framework/examples/Settings/device_for_strategy_enforced_audible.pfw
ngineconfigurable/parameter-framework/examples/Settings/device_for_strategy_media.pfw
ngineconfigurable/parameter-framework/examples/Settings/device_for_strategy_phone.pfw
ngineconfigurable/parameter-framework/examples/Settings/device_for_strategy_rerouting.pfw
ngineconfigurable/parameter-framework/examples/Settings/device_for_strategy_sonification.pfw
ngineconfigurable/parameter-framework/examples/Settings/device_for_strategy_sonification_respectful.pfw
ngineconfigurable/parameter-framework/examples/Settings/device_for_strategy_transmitted_through_speaker.pfw
ngineconfigurable/parameter-framework/examples/Settings/strategy_for_stream.pfw
ngineconfigurable/parameter-framework/examples/Settings/strategy_for_usage.pfw
ngineconfigurable/parameter-framework/examples/Settings/volumes.pfw
ngineconfigurable/parameter-framework/examples/Structure/PolicyClass.xml
ngineconfigurable/parameter-framework/examples/Structure/PolicySubsystem-CommonTypes.xml
ngineconfigurable/parameter-framework/examples/Structure/PolicySubsystem.xml
ngineconfigurable/parameter-framework/examples/policy_criteria.txt
9f39f8d6cc1445c338d8cb635fdbc167c4200971 25-May-2016 Eric Laurent <elaurent@google.com> Fix warning in audio policy service

Change-Id: I33b20b7007e19e8b2514ffdf2232e9c1d7314d9f
ervice/AudioPolicyInterfaceImpl.cpp
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
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
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
ervice/AudioPolicyClientImplLegacy.cpp
ervice/AudioPolicyInterfaceImpl.cpp
ervice/AudioPolicyInterfaceImplLegacy.cpp
ervice/AudioPolicyService.h
bf29173d6d63536ae9f8cfd1d02153237ee23612 18-May-2016 Chih-Hung Hsieh <chh@google.com> Fix misc-macro-parentheses warnings.

Bug: 28705665
Change-Id: I97d1dec9a4397fd7a3cab5180a833066b8abe0ab
ommon/managerdefinitions/include/ConfigParsingUtils.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
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
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
ommon/managerdefinitions/include/TypeConverter.h
ommon/managerdefinitions/src/IOProfile.cpp
ommon/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
ommon/managerdefinitions/include/DeviceDescriptor.h
ommon/managerdefinitions/include/HwModule.h
ommon/managerdefinitions/src/DeviceDescriptor.cpp
ommon/managerdefinitions/src/HwModule.cpp
anagerdefault/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
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>
anagerdefault/AudioPolicyManager.cpp
anagerdefault/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
ommon/managerdefinitions/include/TypeConverter.h
ommon/managerdefinitions/src/TypeConverter.cpp
anagerdefault/AudioPolicyManager.cpp
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
ommon/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
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
udioPolicyInterface.h
ommon/include/policy.h
ommon/managerdefinitions/include/VolumeCurve.h
ommon/managerdefinitions/src/AudioPatch.cpp
ommon/managerdefinitions/src/StreamDescriptor.cpp
ommon/managerdefinitions/src/TypeConverter.cpp
onfig/audio_policy_configuration_stub.xml
nginedefault/src/Engine.cpp
anagerdefault/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
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
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
anagerdefault/AudioPolicyManager.cpp
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
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
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
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
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.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
ommon/managerdefinitions/src/DeviceDescriptor.cpp
anagerdefault/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
ommon/managerdefinitions/Android.mk
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
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>
ngineconfigurable/parameter-framework/example/Settings/PolicyConfigurableDomains.xml
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_accessibility.pfw
ngineconfigurable/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>
ngineconfigurable/parameter-framework/example/Settings/PolicyConfigurableDomains.xml
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_dtmf.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_phone.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_sonification.pfw
ngineconfigurable/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>
ngineconfigurable/parameter-framework/example/policy_criteria.txt
ngineconfigurable/wrapper/audio_policy_criteria_conf.h
ngineconfigurable/wrapper/config/audio_policy_criteria.conf
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
ommon/managerdefinitions/include/EffectDescriptor.h
ommon/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
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
ommon/managerdefinitions/include/IVolumeCurvesCollection.h
ommon/managerdefinitions/include/StreamDescriptor.h
ommon/managerdefinitions/include/VolumeCurve.h
anagerdefault/AudioPolicyManager.cpp
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>
ommon/managerdefinitions/src/AudioProfile.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>
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
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
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
anagerdefault/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>
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
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
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
ommon/managerdefinitions/include/AudioSourceDescriptor.h
ommon/managerdefinitions/src/AudioInputDescriptor.cpp
ommon/managerdefinitions/src/AudioOutputDescriptor.cpp
ommon/managerdefinitions/src/AudioPatch.cpp
ommon/managerdefinitions/src/AudioPort.cpp
ommon/managerdefinitions/src/DeviceDescriptor.cpp
ommon/managerdefinitions/src/HwModule.cpp
anagerdefault/AudioPolicyManager.cpp
ervice/AudioPolicyClientImpl.cpp
ervice/AudioPolicyClientImplLegacy.cpp
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
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
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>
anagerdefault/AudioPolicyManager.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
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
ommon/managerdefinitions/src/AudioPolicyMix.cpp
anagerdefault/AudioPolicyManager.cpp
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()
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
nginedefault/src/Engine.cpp
nginedefault/src/Engine.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 %#
6b1255bdd3d8d941f4952a98eadf3b454f36a2a9 11-Mar-2016 Glenn Kasten <gkasten@google.com> Fix typos in use of %#

Change-Id: I5e49f89dc0e49bc3f5f2d3922d390982a3773384
anagerdefault/AudioPolicyManager.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
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
ndroid.mk
ommon/managerdefinitions/Android.mk
ngineconfigurable/Android.mk
ngineconfigurable/parameter-framework/plugin/Android.mk
ngineconfigurable/wrapper/Android.mk
nginedefault/Android.mk
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
anagerdefault/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
dd9c82ae89985ca87a087e86c7f632a29f86601b 17-Mar-2016 Jean-Michel Trivi <jmtrivi@google.com> resolve merge conflicts of 9462ca1 to master

Change-Id: I7643b8dd1a4ec40b6e8fd8c824bf03afbbeac170
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
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
anagerdefault/AudioPolicyManager.cpp
9a57e34f476d5d2400e6e8ffac303c6190e641f0 17-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Use audio_session_t consistently" 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
ommon/include/policy.h
ommon/managerdefinitions/include/AudioPolicyMix.h
ommon/managerdefinitions/src/AudioOutputDescriptor.cpp
ommon/managerdefinitions/src/AudioPolicyMix.cpp
ommon/managerdefinitions/src/AudioSession.cpp
anagerdefault/AudioPolicyManager.cpp
d848eb48c121c119e8ba7583efc75415fe102570 08-Mar-2016 Glenn Kasten <gkasten@google.com> Use audio_session_t consistently

Bug: 27562099
Change-Id: I328d8226191386b163f2ace41233607294c50dcd
udioPolicyInterface.h
ervice/AudioPolicyClientImpl.cpp
ervice/AudioPolicyClientImplLegacy.cpp
ervice/AudioPolicyEffects.cpp
ervice/AudioPolicyEffects.h
ervice/AudioPolicyInterfaceImpl.cpp
ervice/AudioPolicyInterfaceImplLegacy.cpp
ervice/AudioPolicyService.cpp
ervice/AudioPolicyService.h
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
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
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
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
ommon/managerdefinitions/src/DeviceDescriptor.cpp
ommon/managerdefinitions/src/HwModule.cpp
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
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
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
ngineconfigurable/src/Engine.cpp
nginedefault/src/Engine.cpp
nginedefault/src/Engine.h
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
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
nginedefault/src/Engine.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
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>
ngineconfigurable/parameter-framework/example/Android.mk
ngineconfigurable/parameter-framework/example/ParameterFrameworkConfigurationPolicy.xml
ngineconfigurable/parameter-framework/example/ParameterFrameworkConfigurationPolicy.xml.in
ngineconfigurable/parameter-framework/example/Settings/PolicyConfigurableDomains.xml
ngineconfigurable/parameter-framework/example/Settings/device_for_input_source.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_dtmf.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_enforced_audible.pfw
ngineconfigurable/parameter-framework/example/Structure/PolicySubsystem.xml
ngineconfigurable/parameter-framework/plugin/Android.mk
ngineconfigurable/parameter-framework/plugin/InputSource.cpp
ngineconfigurable/parameter-framework/plugin/InputSource.h
ngineconfigurable/parameter-framework/plugin/PolicySubsystem.cpp
ngineconfigurable/parameter-framework/plugin/PolicySubsystem.h
ngineconfigurable/parameter-framework/plugin/PolicySubsystemBuilder.cpp
ngineconfigurable/parameter-framework/plugin/Strategy.cpp
ngineconfigurable/parameter-framework/plugin/Strategy.h
ngineconfigurable/parameter-framework/plugin/Stream.cpp
ngineconfigurable/parameter-framework/plugin/Stream.h
ngineconfigurable/parameter-framework/plugin/Usage.cpp
ngineconfigurable/parameter-framework/plugin/Usage.h
ngineconfigurable/wrapper/ParameterManagerWrapper.cpp
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
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
0494ebbeda158681dbe0c7cf68abfd475a19d139 03-Mar-2016 Phil Burk <philburk@google.com> Merge "AudioPolicyManager: remove unnecessary device reconnection" into nyc-dev
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
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
anagerdefault/AudioPolicyManager.cpp
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>
anagerdefault/AudioPolicyManager.cpp
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>
anagerdefault/AudioPolicyManager.cpp
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
ommon/include/policy.h
ommon/managerdefinitions/include/IOProfile.h
ommon/managerdefinitions/src/AudioPort.cpp
ommon/managerdefinitions/src/AudioProfile.cpp
ommon/managerdefinitions/src/IOProfile.cpp
anagerdefault/AudioPolicyManager.cpp
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)
udioPolicyInterface.h
ommon/managerdefinitions/include/AudioPort.h
ommon/managerdefinitions/src/AudioPort.cpp
anagerdefault/AudioPolicyManager.cpp
ervice/AudioPolicyClientImpl.cpp
ervice/AudioPolicyService.h
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
eeecb980ff4c202d0a3c4b0bfe040dce2f73336d 26-Feb-2016 Glenn Kasten <gkasten@google.com> Add use for audio_unique_id_t

Bug: 25641253
Bug: 21019153
Change-Id: I65dc128e760c245f3d90559635a8981b186c87d7
udioPolicyInterface.h
ommon/managerdefinitions/include/AudioPort.h
ommon/managerdefinitions/src/AudioPort.cpp
anagerdefault/AudioPolicyManager.cpp
ervice/AudioPolicyClientImpl.cpp
ervice/AudioPolicyService.h
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
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>
nginedefault/src/Engine.cpp
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
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
ommon/managerdefinitions/include/AudioOutputDescriptor.h
ommon/managerdefinitions/src/AudioOutputDescriptor.cpp
anagerdefault/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
udioPolicyInterface.h
ommon/managerdefinitions/include/AudioInputDescriptor.h
ommon/managerdefinitions/include/AudioSession.h
ommon/managerdefinitions/include/AudioSessionInfoProvider.h
ommon/managerdefinitions/src/AudioInputDescriptor.cpp
ommon/managerdefinitions/src/AudioSession.cpp
anagerdefault/AudioPolicyManager.cpp
ervice/AudioPolicyClientImpl.cpp
ervice/AudioPolicyService.cpp
ervice/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>
ngineconfigurable/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
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
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
7281aa9810b33eff47b00104db26c97c77931611 18-Feb-2016 Jean-Michel Trivi <jmtrivi@google.com> Send client / device format in recording callback

Bug 26798796

Change-Id: Ib4f64159c8371d87da49a8f0cad9317a87d843c4
udioPolicyInterface.h
ommon/managerdefinitions/include/AudioSession.h
ommon/managerdefinitions/src/AudioInputDescriptor.cpp
ommon/managerdefinitions/src/AudioSession.cpp
ervice/AudioPolicyClientImpl.cpp
ervice/AudioPolicyService.cpp
ervice/AudioPolicyService.h
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
ommon/managerdefinitions/src/TypeConverter.cpp
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
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
ervice/AudioPolicyInterfaceImpl.cpp
ervice/AudioPolicyService.h
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
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
udioPolicyInterface.h
ommon/include/policy.h
ommon/managerdefinitions/include/AudioInputDescriptor.h
ommon/managerdefinitions/include/AudioPort.h
ommon/managerdefinitions/include/AudioSession.h
ommon/managerdefinitions/src/AudioInputDescriptor.cpp
ommon/managerdefinitions/src/AudioOutputDescriptor.cpp
ommon/managerdefinitions/src/AudioSession.cpp
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
ervice/AudioPolicyEffects.cpp
ervice/AudioPolicyEffects.h
ervice/AudioPolicyInterfaceImpl.cpp
ervice/AudioPolicyInterfaceImplLegacy.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
anagerdefault/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
ommon/include/policy.h
ommon/managerdefinitions/include/AudioPort.h
ommon/managerdefinitions/src/AudioPort.cpp
ommon/managerdefinitions/src/AudioProfile.cpp
anagerdefault/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.
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
anagerdefault/AudioPolicyManager.cpp
4b10421d8f8abb11907a4c54e4e225b6d9330ece 13-Feb-2016 Dimitry Ivanov <dimitry@google.com> Merge "Add missing liblog dependency"
am: 11c3022b6e

* commit '11c3022b6e5fcf48c8ba7c13bba899ff1b00a9e9':
Add missing liblog dependency
d1a9f491e7850136c203ba118a5f045933cd5d29 13-Feb-2016 Dimitry Ivanov <dimitry@google.com> Add missing liblog dependency

Bug: http://b/27171986
Change-Id: I5f62e39b54b7dfc0aa03992a20373a0a6daf1e2f
nginedefault/Android.mk
b0a144d705a021994628d136a170a6d2bd4282e7 12-Feb-2016 Phil Burk <philburk@google.com> Merge "AudioTrack: support ENCODING_IEC61937" into nyc-dev
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>
ommon/managerdefinitions/src/TypeConverter.cpp
anagerdefault/AudioPolicyManager.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
ommon/managerdefinitions/include/AudioPolicyMix.h
ommon/managerdefinitions/src/AudioPolicyMix.cpp
anagerdefault/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
ervice/AudioPolicyEffects.cpp
ervice/AudioPolicyEffects.h
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
anagerdefault/AudioPolicyManager.cpp
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>
ngineconfigurable/src/Engine.cpp
ngineconfigurable/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>
ngineconfigurable/parameter-framework/example/Settings/PolicyConfigurableDomains.xml
ngineconfigurable/parameter-framework/example/Settings/device_for_input_source.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_media.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_phone.pfw
ngineconfigurable/parameter-framework/example/Settings/volumes.pfw
ngineconfigurable/parameter-framework/example/Structure/PolicySubsystem-CommonTypes.xml
ngineconfigurable/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
anagerdefault/AudioPolicyManager.cpp
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
udioPolicyInterface.h
ervice/AudioPolicyInterfaceImpl.cpp
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
ommon/managerdefinitions/include/AudioInputDescriptor.h
ommon/managerdefinitions/include/AudioSession.h
ommon/managerdefinitions/src/AudioInputDescriptor.cpp
ommon/managerdefinitions/src/AudioSession.cpp
anagerdefault/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
ervice/AudioPolicyService.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
anagerdefault/AudioPolicyManager.cpp
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
anagerdefault/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
ommon/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
anagerdefault/AudioPolicyManager.cpp
fb66dd9f95a1168698f072c4e5c2a2cf8c49a80f 29-Jan-2016 Eric Laurent <elaurent@google.com> Revert "Revert "audio policy for concurrent capture.""

This reverts commit 84332aaa807037baca05340875f2d94fcc519ac4.

Bug:26841909
udioPolicyInterface.h
ommon/include/policy.h
ommon/managerdefinitions/include/AudioInputDescriptor.h
ommon/managerdefinitions/include/AudioPort.h
ommon/managerdefinitions/include/AudioSession.h
ommon/managerdefinitions/src/AudioInputDescriptor.cpp
ommon/managerdefinitions/src/AudioOutputDescriptor.cpp
ommon/managerdefinitions/src/AudioSession.cpp
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
ervice/AudioPolicyEffects.cpp
ervice/AudioPolicyEffects.h
ervice/AudioPolicyInterfaceImpl.cpp
ervice/AudioPolicyInterfaceImplLegacy.cpp
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
udioPolicyInterface.h
ommon/include/policy.h
ommon/managerdefinitions/include/AudioInputDescriptor.h
ommon/managerdefinitions/include/AudioPort.h
ommon/managerdefinitions/include/AudioSession.h
ommon/managerdefinitions/src/AudioInputDescriptor.cpp
ommon/managerdefinitions/src/AudioOutputDescriptor.cpp
ommon/managerdefinitions/src/AudioSession.cpp
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
ervice/AudioPolicyEffects.cpp
ervice/AudioPolicyEffects.h
ervice/AudioPolicyInterfaceImpl.cpp
ervice/AudioPolicyInterfaceImplLegacy.cpp
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>
ommon/managerdefinitions/include/AudioPolicyConfig.h
ommon/managerdefinitions/include/VolumeCurve.h
ommon/managerdefinitions/src/Serializer.cpp
ommon/managerdefinitions/src/TypeConverter.cpp
onfig/audio_policy_volumes.xml
onfig/default_volume_tables.xml
anagerdefault/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>
ommon/managerdefinitions/include/Serializer.h
ommon/managerdefinitions/src/Serializer.cpp
onfig/audio_policy_configuration.xml
onfig/audio_policy_volumes.xml
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
udioPolicyInterface.h
ommon/include/policy.h
ommon/managerdefinitions/include/AudioInputDescriptor.h
ommon/managerdefinitions/include/AudioPort.h
ommon/managerdefinitions/include/AudioSession.h
ommon/managerdefinitions/src/AudioInputDescriptor.cpp
ommon/managerdefinitions/src/AudioOutputDescriptor.cpp
ommon/managerdefinitions/src/AudioSession.cpp
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
ervice/AudioPolicyEffects.cpp
ervice/AudioPolicyEffects.h
ervice/AudioPolicyInterfaceImpl.cpp
ervice/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
ommon/managerdefinitions/include/AudioPort.h
ommon/managerdefinitions/include/AudioProfile.h
anagerdefault/AudioPolicyManager.cpp
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>
ndroid.mk
ommon/managerdefinitions/Android.mk
ommon/managerdefinitions/include/AudioPolicyConfig.h
ommon/managerdefinitions/include/Gains.h
ommon/managerdefinitions/include/IVolumeCurvesCollection.h
ommon/managerdefinitions/include/Serializer.h
ommon/managerdefinitions/include/StreamDescriptor.h
ommon/managerdefinitions/include/VolumeCurve.h
ommon/managerdefinitions/src/AudioGain.cpp
ommon/managerdefinitions/src/Gains.cpp
ommon/managerdefinitions/src/Serializer.cpp
ommon/managerdefinitions/src/StreamDescriptor.cpp
ommon/managerdefinitions/src/TypeConverter.cpp
ommon/managerdefinitions/src/VolumeCurve.cpp
onfig/audio_policy_configuration.xml
onfig/audio_policy_volumes.xml
onfig/default_volume_tables.xml
ngine/interface/AudioPolicyManagerInterface.h
ngine/interface/AudioPolicyManagerObserver.h
ngineconfigurable/Android.mk
ngineconfigurable/interface/AudioPolicyPluginInterface.h
ngineconfigurable/parameter-framework/example/Android.mk
ngineconfigurable/parameter-framework/example/Settings/PolicyConfigurableDomains.xml
ngineconfigurable/parameter-framework/example/Settings/volumes.pfw
ngineconfigurable/parameter-framework/example/Structure/PolicySubsystem-CommonTypes.xml
ngineconfigurable/parameter-framework/example/Structure/PolicySubsystem-Volume.xml
ngineconfigurable/parameter-framework/example/Structure/PolicySubsystem.xml
ngineconfigurable/parameter-framework/plugin/Android.mk
ngineconfigurable/parameter-framework/plugin/PolicySubsystem.cpp
ngineconfigurable/parameter-framework/plugin/PolicySubsystem.h
ngineconfigurable/parameter-framework/plugin/Stream.cpp
ngineconfigurable/parameter-framework/plugin/Stream.h
ngineconfigurable/parameter-framework/plugin/VolumeProfile.cpp
ngineconfigurable/parameter-framework/plugin/VolumeProfile.h
ngineconfigurable/src/Engine.cpp
ngineconfigurable/src/Engine.h
ngineconfigurable/src/Stream.cpp
ngineconfigurable/src/Stream.h
nginedefault/Android.mk
nginedefault/src/Engine.cpp
nginedefault/src/Engine.h
nginedefault/src/Gains.cpp
nginedefault/src/Gains.h
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
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
ommon/managerdefinitions/src/ConfigParsingUtils.cpp
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>
ndroid.mk
ommon/managerdefinitions/Android.mk
ommon/managerdefinitions/include/AudioCollections.h
ommon/managerdefinitions/include/AudioPolicyConfig.h
ommon/managerdefinitions/include/AudioPort.h
ommon/managerdefinitions/include/ConfigParsingUtils.h
ommon/managerdefinitions/include/Serializer.h
ommon/managerdefinitions/include/TypeConverter.h
ommon/managerdefinitions/include/VolumeCurve.h
ommon/managerdefinitions/src/AudioCollections.cpp
ommon/managerdefinitions/src/AudioPort.cpp
ommon/managerdefinitions/src/ConfigParsingUtils.cpp
ommon/managerdefinitions/src/DeviceDescriptor.cpp
ommon/managerdefinitions/src/HwModule.cpp
ommon/managerdefinitions/src/IOProfile.cpp
ommon/managerdefinitions/src/Serializer.cpp
onfig/a2dp_audio_policy_configuration.xml
onfig/audio_policy_configuration.xml
onfig/r_submix_audio_policy_configuration.xml
onfig/usb_audio_policy_configuration.xml
ngineconfigurable/Android.mk
nginedefault/Android.mk
anagerdefault/AudioPolicyManager.cpp
c16bf1d9e8ccdd27327e988d50f5b9640e5406f8 13-Jan-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge "AudioPolicy: callback for recording configuration change"
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
udioPolicyInterface.h
ommon/managerdefinitions/include/AudioInputDescriptor.h
ommon/managerdefinitions/include/AudioSession.h
ommon/managerdefinitions/src/AudioSession.cpp
anagerdefault/AudioPolicyManager.cpp
ervice/AudioPolicyClientImpl.cpp
ervice/AudioPolicyService.cpp
ervice/AudioPolicyService.h
64f1901bdddf464c8f29bed34e3449762873b3e9 09-Jan-2016 Andy Hung <hunga@google.com> Merge "Add setMasterMono and getMasterMono"
2ddee19245641e86bca436dda23a0f5089bf2ab5 19-Dec-2015 Andy Hung <hunga@google.com> Add setMasterMono and getMasterMono

Bug: 15283594
Bug: 22700363
Change-Id: I32dc1fcecf285967a61bd508af3bb299595db57d
udioPolicyInterface.h
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
ervice/AudioPolicyInterfaceImpl.cpp
ervice/AudioPolicyInterfaceImplLegacy.cpp
ervice/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>
ngineconfigurable/src/Engine.cpp
ngineconfigurable/src/Engine.h
ngineconfigurable/wrapper/ParameterManagerWrapper.cpp
ngineconfigurable/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>
ommon/managerdefinitions/src/AudioCollections.cpp
ngineconfigurable/parameter-framework/plugin/InputSource.cpp
ngineconfigurable/parameter-framework/plugin/InputSource.h
ngineconfigurable/parameter-framework/plugin/Strategy.cpp
ngineconfigurable/parameter-framework/plugin/Strategy.h
ngineconfigurable/parameter-framework/plugin/Usage.cpp
ngineconfigurable/parameter-framework/plugin/Usage.h
754cabcfef43f894a73bb3f7581b6cd4f48fcc95 08-Jan-2016 Eric Laurent <elaurent@google.com> Merge "audio policy: introduce audio route concept"
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>
ommon/managerdefinitions/Android.mk
ommon/managerdefinitions/include/AudioCollections.h
ommon/managerdefinitions/include/AudioPort.h
ommon/managerdefinitions/include/AudioRoute.h
ommon/managerdefinitions/include/DeviceDescriptor.h
ommon/managerdefinitions/include/HwModule.h
ommon/managerdefinitions/include/IOProfile.h
ommon/managerdefinitions/src/AudioCollections.cpp
ommon/managerdefinitions/src/AudioRoute.cpp
ommon/managerdefinitions/src/DeviceDescriptor.cpp
ommon/managerdefinitions/src/HwModule.cpp
ommon/managerdefinitions/src/IOProfile.cpp
8a397d583a4f4cf24ad88facaf2fd33990cfb811 02-Dec-2015 rago <rago@google.com> Adding UNPROCESSED to the available audio_sources

bug: 25564291
Change-Id: I86d8feda4d687352f98b640819211207a06d6b50
nginedefault/src/Engine.cpp
ervice/AudioPolicyEffects.cpp
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>
ommon/include/policy.h
ommon/managerdefinitions/Android.mk
ommon/managerdefinitions/include/AudioPolicyConfig.h
ommon/managerdefinitions/include/AudioPort.h
ommon/managerdefinitions/include/AudioProfile.h
ommon/managerdefinitions/include/ConfigParsingUtils.h
ommon/managerdefinitions/include/DeviceDescriptor.h
ommon/managerdefinitions/include/TypeConverter.h
ommon/managerdefinitions/include/audio_policy_conf.h
ommon/managerdefinitions/src/AudioInputDescriptor.cpp
ommon/managerdefinitions/src/AudioOutputDescriptor.cpp
ommon/managerdefinitions/src/AudioPort.cpp
ommon/managerdefinitions/src/AudioProfile.cpp
ommon/managerdefinitions/src/ConfigParsingUtils.cpp
ommon/managerdefinitions/src/DeviceDescriptor.cpp
ommon/managerdefinitions/src/HwModule.cpp
ommon/managerdefinitions/src/IOProfile.cpp
anagerdefault/AudioPolicyManager.cpp
anagerdefault/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
ommon/managerdefinitions/Android.mk
ommon/managerdefinitions/include/AudioInputDescriptor.h
ommon/managerdefinitions/include/AudioSession.h
ommon/managerdefinitions/src/AudioInputDescriptor.cpp
ommon/managerdefinitions/src/AudioSession.cpp
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
7b279bbc24139ee1e01b58055ca94926ec18e2e9 14-Dec-2015 Eric Laurent <elaurent@google.com> audio policy: remove compilation warnings

Change-Id: I4d41ca903dfbe37066ef20a13ebabaff1e5b7326
ommon/managerdefinitions/src/HwModule.cpp
ommon/managerdefinitions/src/TypeConverter.cpp
anagerdefault/AudioPolicyManager.cpp
fd9445e97609756e7ec2e95f66440d76f32068e5 11-Dec-2015 Andy Hung <hunga@google.com> Merge "Run audio services in audioserver instead of mediaserver"
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>
ngineconfigurable/parameter-framework/example/Android.mk
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
ervice/AudioPolicyInterfaceImpl.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
ommon/managerdefinitions/include/AudioInputDescriptor.h
ommon/managerdefinitions/src/AudioInputDescriptor.cpp
anagerdefault/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>
ngineconfigurable/src/Collection.h
ngineconfigurable/src/Stream.cpp
ebdddf82b07fa2c4134c3c00dbbbaa1ad3286726 04-Dec-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: enhancing type conversion helper"
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.
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>
ngineconfigurable/src/Stream.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>
ommon/include/policy.h
ommon/managerdefinitions/include/TypeConverter.h
ommon/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>
ommon/include/Volume.h
ommon/managerdefinitions/include/StreamDescriptor.h
ommon/managerdefinitions/src/StreamDescriptor.cpp
ngine/interface/AudioPolicyManagerInterface.h
ngineconfigurable/interface/AudioPolicyPluginInterface.h
ngineconfigurable/parameter-framework/plugin/VolumeProfile.cpp
ngineconfigurable/parameter-framework/plugin/VolumeProfile.h
ngineconfigurable/src/Engine.cpp
ngineconfigurable/src/Engine.h
ngineconfigurable/src/Stream.cpp
ngineconfigurable/src/Stream.h
nginedefault/src/Engine.cpp
nginedefault/src/Engine.h
nginedefault/src/Gains.cpp
nginedefault/src/Gains.h
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>
ommon/managerdefinitions/include/AudioPolicyConfig.h
ommon/managerdefinitions/include/AudioPort.h
ommon/managerdefinitions/include/DeviceDescriptor.h
ommon/managerdefinitions/src/ConfigParsingUtils.cpp
ommon/managerdefinitions/src/DeviceDescriptor.cpp
ommon/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>
ndroid.mk
ommon/managerdefinitions/Android.mk
ommon/managerdefinitions/include/AudioGain.h
ommon/managerdefinitions/include/AudioPolicyConfig.h
ommon/managerdefinitions/include/AudioPort.h
ommon/managerdefinitions/include/ConfigParsingUtils.h
ommon/managerdefinitions/include/DeviceDescriptor.h
ommon/managerdefinitions/include/HwModule.h
ommon/managerdefinitions/include/IOProfile.h
ommon/managerdefinitions/include/TypeConverter.h
ommon/managerdefinitions/include/audio_policy_conf.h
ommon/managerdefinitions/src/AudioInputDescriptor.cpp
ommon/managerdefinitions/src/AudioOutputDescriptor.cpp
ommon/managerdefinitions/src/AudioPatch.cpp
ommon/managerdefinitions/src/AudioPort.cpp
ommon/managerdefinitions/src/ConfigParsingUtils.cpp
ommon/managerdefinitions/src/DeviceDescriptor.cpp
ommon/managerdefinitions/src/HwModule.cpp
ommon/managerdefinitions/src/IOProfile.cpp
ommon/managerdefinitions/src/TypeConverter.cpp
anagerdefault/AudioPolicyManager.cpp
7a564a0e201d8ddc7cc7b7a7202adf017b4e4836 05-Nov-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: add support for external audio sources"
74e0f3a620bd0cdfb153728e99a17a96ca3db0de 03-Nov-2015 Bill Yi <byi@google.com> Merge commit 'f71d2618532e73db5c01e3c00595d7d2ab2cff3e' into HEAD
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
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
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
ommon/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
ommon/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
udioPolicyInterface.h
ommon/managerdefinitions/Android.mk
ommon/managerdefinitions/include/AudioOutputDescriptor.h
ommon/managerdefinitions/include/AudioSourceDescriptor.h
ommon/managerdefinitions/src/AudioOutputDescriptor.cpp
ommon/managerdefinitions/src/AudioSourceDescriptor.cpp
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
ervice/AudioPolicyInterfaceImpl.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"
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
ervice/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
ervice/AudioPolicyService.cpp
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""
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"
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
ervice/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
ervice/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
ervice/AudioPolicyInterfaceImpl.cpp
75c82b50951b21190f710a638c6a26ff7ee6d86d 27-Oct-2015 Zach Jang <zachjang@google.com> Revert "AudioPolicyService: fix race in AudioCommandThread"

This reverts commit 74ce88ff0f24a8c08fdab3a1140212183089c2b5.

Change-Id: I39114c8cdd3021951ba93716aaa0c1c03e68538d
ervice/AudioPolicyService.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
ervice/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
ervice/AudioPolicyService.cpp
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
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
anagerdefault/AudioPolicyManager.cpp
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
anagerdefault/AudioPolicyManager.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
ervice/AudioPolicyService.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
ommon/managerdefinitions/include/AudioInputDescriptor.h
ommon/managerdefinitions/src/AudioInputDescriptor.cpp
anagerdefault/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
ervice/AudioPolicyInterfaceImpl.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
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
anagerdefault/AudioPolicyManager.cpp
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
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
nginedefault/src/Gains.cpp
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
anagerdefault/AudioPolicyManager.cpp
125902529aed131abc00210c36dc9ff03d9e8120 22-Aug-2015 Eric Laurent <elaurent@google.com> audio policy service: check registerClient() input parameter

Bug: 21523339.
Change-Id: I1d1ebd54fa7b20ae01d914bb216bf3dd24fc32cd
ervice/AudioPolicyService.cpp
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
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.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
udioPolicyInterface.h
anagerdefault/AudioPolicyManager.cpp
ervice/AudioPolicyInterfaceImpl.cpp
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
anagerdefault/AudioPolicyManager.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
anagerdefault/AudioPolicyManager.cpp
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
ngineconfigurable/parameter-framework/plugin/Android.mk
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
ommon/include/policy.h
anagerdefault/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>
ommon/managerdefinitions/Android.mk
ommon/managerdefinitions/include/SessionRoute.h
ommon/managerdefinitions/src/SessionRoute.cpp
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.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
ommon/include/Volume.h
nginedefault/src/Engine.cpp
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
ommon/managerdefinitions/include/ConfigParsingUtils.h
f60b6b6c776a762827874f6f635c0577359a7ee4 06-Jul-2015 Glenn Kasten <gkasten@google.com> Fix build warning

Change-Id: I876edc37fb2093ee13c876c2af5c46512763154d
ervice/AudioPolicyService.cpp
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
anagerdefault/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
ommon/managerdefinitions/include/ConfigParsingUtils.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
ervice/AudioPolicyService.cpp
ervice/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
ommon/managerdefinitions/include/AudioPort.h
ommon/managerdefinitions/include/DeviceDescriptor.h
ommon/managerdefinitions/src/AudioPort.cpp
ommon/managerdefinitions/src/DeviceDescriptor.cpp
anagerdefault/AudioPolicyManager.cpp
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
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
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
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>
ngineconfigurable/parameter-framework/plugin/PolicySubsystem.cpp
ngineconfigurable/src/Engine.cpp
ngineconfigurable/wrapper/ParameterManagerWrapper.cpp
ngineconfigurable/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>
ndroid.mk
ngine/interface/AudioPolicyManagerInterface.h
ngineconfigurable/Android.mk
ngineconfigurable/include/AudioPolicyEngineInstance.h
ngineconfigurable/include/EngineDefinition.h
ngineconfigurable/interface/AudioPolicyPluginInterface.h
ngineconfigurable/parameter-framework/Android.mk
ngineconfigurable/parameter-framework/example/Android.mk
ngineconfigurable/parameter-framework/example/ParameterFrameworkConfigurationPolicy.xml
ngineconfigurable/parameter-framework/example/README.md
ngineconfigurable/parameter-framework/example/Settings/PolicyConfigurableDomains.xml
ngineconfigurable/parameter-framework/example/Settings/device_for_input_source.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_accessibility.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_dtmf.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_enforced_audible.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_media.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_phone.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_rerouting.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_sonification.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_sonification_respectful.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_transmitted_through_speaker.pfw
ngineconfigurable/parameter-framework/example/Settings/strategy_for_stream.pfw
ngineconfigurable/parameter-framework/example/Settings/strategy_for_usage.pfw
ngineconfigurable/parameter-framework/example/Settings/volumes.pfw
ngineconfigurable/parameter-framework/example/Structure/PolicyClass.xml
ngineconfigurable/parameter-framework/example/Structure/PolicySubsystem-CommonTypes.xml
ngineconfigurable/parameter-framework/example/Structure/PolicySubsystem-Volume.xml
ngineconfigurable/parameter-framework/example/Structure/PolicySubsystem.xml
ngineconfigurable/parameter-framework/example/policy_criteria.txt
ngineconfigurable/parameter-framework/plugin/Android.mk
ngineconfigurable/parameter-framework/plugin/InputSource.cpp
ngineconfigurable/parameter-framework/plugin/InputSource.h
ngineconfigurable/parameter-framework/plugin/PolicyMappingKeys.h
ngineconfigurable/parameter-framework/plugin/PolicySubsystem.cpp
ngineconfigurable/parameter-framework/plugin/PolicySubsystem.h
ngineconfigurable/parameter-framework/plugin/PolicySubsystemBuilder.cpp
ngineconfigurable/parameter-framework/plugin/Strategy.cpp
ngineconfigurable/parameter-framework/plugin/Strategy.h
ngineconfigurable/parameter-framework/plugin/Stream.cpp
ngineconfigurable/parameter-framework/plugin/Stream.h
ngineconfigurable/parameter-framework/plugin/Usage.cpp
ngineconfigurable/parameter-framework/plugin/Usage.h
ngineconfigurable/parameter-framework/plugin/VolumeProfile.cpp
ngineconfigurable/parameter-framework/plugin/VolumeProfile.h
ngineconfigurable/src/Collection.h
ngineconfigurable/src/Element.h
ngineconfigurable/src/Engine.cpp
ngineconfigurable/src/Engine.h
ngineconfigurable/src/EngineInstance.cpp
ngineconfigurable/src/InputSource.cpp
ngineconfigurable/src/InputSource.h
ngineconfigurable/src/Strategy.cpp
ngineconfigurable/src/Strategy.h
ngineconfigurable/src/Stream.cpp
ngineconfigurable/src/Stream.h
ngineconfigurable/src/Usage.cpp
ngineconfigurable/src/Usage.h
ngineconfigurable/wrapper/Android.mk
ngineconfigurable/wrapper/ParameterManagerWrapper.cpp
ngineconfigurable/wrapper/audio_policy_criteria_conf.h
ngineconfigurable/wrapper/config/audio_policy_criteria.conf
ngineconfigurable/wrapper/include/ParameterManagerWrapper.h
tilities/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
ommon/managerdefinitions/include/ConfigParsingUtils.h
3fc792fe36b0b9100f74185665221b37f650ff65 18-Jun-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: fix explicit routing and accessibility" into mnc-dev
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
anagerdefault/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
anagerdefault/AudioPolicyManager.cpp
e1c3cf01a58e45ec3784a1e877e16ce9ef7f6d1c 10-Jun-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: route media to BT SCO in call" into mnc-dev
72249d5b2f9f42a96c0e0825431e8f3f49b82644 08-Jun-2015 Eric Laurent <elaurent@google.com> audio policy: fix very verbose log build.

Change-Id: I94a69207059d8010ded14bce5d6e39c3f3074649
anagerdefault/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
nginedefault/src/Engine.cpp
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
anagerdefault/AudioPolicyManager.cpp
6374077319a2d060eefe5f4bf425aed37f90c5d0 22-May-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: add checks on primary output" into mnc-dev
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
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
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
anagerdefault/AudioPolicyManager.cpp
d9f493ebcd1830c76d7b1782e64c7ba9ad8ab4bd 12-May-2015 Andy Hung <hunga@google.com> Merge "Update sampling rate to 192kHz for devices" into mnc-dev
db4c031f518ae5806af73756273ff32cd8d0e4f8 06-May-2015 Andy Hung <hunga@google.com> Update sampling rate to 192kHz for devices

Change-Id: I0a83206be51d7ae18ccf85b94b2127356307be69
ommon/include/policy.h
ommon/managerdefinitions/src/AudioPort.cpp
fedef1384d5ff758285fb19161a0348e1e32ab3f 12-May-2015 Andy Hung <hunga@google.com> Merge "Support channel index masks for output hal" into mnc-dev
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
anagerdefault/AudioPolicyManager.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)
nginedefault/Android.mk
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
ommon/managerdefinitions/include/DeviceDescriptor.h
ommon/managerdefinitions/src/ConfigParsingUtils.cpp
ommon/managerdefinitions/src/DeviceDescriptor.cpp
ommon/managerdefinitions/src/HwModule.cpp
anagerdefault/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)
ommon/include/policy.h
18aa27016a94d0fee243637a80fd0741f89e08f2 06-May-2015 Andy Hung <hunga@google.com> Support channel index masks for output hal

Change-Id: Ib3e61ff6faf91c71b85102b5d77f90f124c08220
ommon/managerdefinitions/src/AudioPort.cpp
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
udioPolicyInterface.h
ommon/managerdefinitions/src/AudioPolicyMix.cpp
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
ervice/AudioPolicyInterfaceImpl.cpp
ervice/AudioPolicyInterfaceImplLegacy.cpp
ervice/AudioPolicyService.cpp
ervice/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
ommon/managerdefinitions/src/AudioOutputDescriptor.cpp
anagerdefault/AudioPolicyManager.cpp
be71aa29a3c86d2e01cd17839d2a72ab09a1bce5 28-Apr-2015 Svet Ganov <svetoslavganov@google.com> Respect the record audio app op - media

Change-Id: I3a97977b6e9a09355e2008f780d22d480fb7308b
ervice/AudioPolicyEffects.cpp
466dc8ed6ca6b7f585104806c48613dd34e608c9 17-Apr-2015 Paul McLean <pmclean@google.com> Explicit routing in AudioRecord

Change-Id: I9cc5d54883a3e5c75d553fabb619fc8e49f4f9e5
udioPolicyInterface.h
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
ervice/AudioPolicyInterfaceImpl.cpp
ervice/AudioPolicyInterfaceImplLegacy.cpp
ervice/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
ndroid.mk
ngine/interface/AudioPolicyManagerInterface.h
ngineconfigurable/Android.mk
ngineconfigurable/include/AudioPolicyEngineInstance.h
ngineconfigurable/include/EngineDefinition.h
ngineconfigurable/interface/AudioPolicyPluginInterface.h
ngineconfigurable/parameter-framework/Android.mk
ngineconfigurable/parameter-framework/example/Android.mk
ngineconfigurable/parameter-framework/example/ParameterFrameworkConfigurationPolicy.xml
ngineconfigurable/parameter-framework/example/README.md
ngineconfigurable/parameter-framework/example/Settings/device_for_input_source.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_accessibility.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_dtmf.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_enforced_audible.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_media.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_phone.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_rerouting.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_sonification.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_sonification_respectful.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_transmitted_through_speaker.pfw
ngineconfigurable/parameter-framework/example/Settings/strategy_for_stream.pfw
ngineconfigurable/parameter-framework/example/Settings/strategy_for_usage.pfw
ngineconfigurable/parameter-framework/example/Settings/volumes.pfw
ngineconfigurable/parameter-framework/example/Structure/PolicyClass.xml
ngineconfigurable/parameter-framework/example/Structure/PolicySubsystem-CommonTypes.xml
ngineconfigurable/parameter-framework/example/Structure/PolicySubsystem-Volume.xml
ngineconfigurable/parameter-framework/example/Structure/PolicySubsystem.xml
ngineconfigurable/parameter-framework/example/policy_criteria.txt
ngineconfigurable/parameter-framework/plugin/Android.mk
ngineconfigurable/parameter-framework/plugin/InputSource.cpp
ngineconfigurable/parameter-framework/plugin/InputSource.h
ngineconfigurable/parameter-framework/plugin/PolicyMappingKeys.h
ngineconfigurable/parameter-framework/plugin/PolicySubsystem.cpp
ngineconfigurable/parameter-framework/plugin/PolicySubsystem.h
ngineconfigurable/parameter-framework/plugin/PolicySubsystemBuilder.cpp
ngineconfigurable/parameter-framework/plugin/Strategy.cpp
ngineconfigurable/parameter-framework/plugin/Strategy.h
ngineconfigurable/parameter-framework/plugin/Stream.cpp
ngineconfigurable/parameter-framework/plugin/Stream.h
ngineconfigurable/parameter-framework/plugin/Usage.cpp
ngineconfigurable/parameter-framework/plugin/Usage.h
ngineconfigurable/parameter-framework/plugin/VolumeProfile.cpp
ngineconfigurable/parameter-framework/plugin/VolumeProfile.h
ngineconfigurable/src/Collection.h
ngineconfigurable/src/Element.h
ngineconfigurable/src/Engine.cpp
ngineconfigurable/src/Engine.h
ngineconfigurable/src/EngineInstance.cpp
ngineconfigurable/src/InputSource.cpp
ngineconfigurable/src/InputSource.h
ngineconfigurable/src/Strategy.cpp
ngineconfigurable/src/Strategy.h
ngineconfigurable/src/Stream.cpp
ngineconfigurable/src/Stream.h
ngineconfigurable/src/Usage.cpp
ngineconfigurable/src/Usage.h
ngineconfigurable/wrapper/Android.mk
ngineconfigurable/wrapper/ParameterManagerWrapper.cpp
ngineconfigurable/wrapper/audio_policy_criteria_conf.h
ngineconfigurable/wrapper/config/audio_policy_criteria.conf
ngineconfigurable/wrapper/include/ParameterManagerWrapper.h
tilities/Android.mk
tilities/convert/Android.mk
tilities/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>
ndroid.mk
ngine/interface/AudioPolicyManagerInterface.h
ngineconfigurable/Android.mk
ngineconfigurable/include/AudioPolicyEngineInstance.h
ngineconfigurable/include/EngineDefinition.h
ngineconfigurable/interface/AudioPolicyPluginInterface.h
ngineconfigurable/parameter-framework/Android.mk
ngineconfigurable/parameter-framework/example/Android.mk
ngineconfigurable/parameter-framework/example/ParameterFrameworkConfigurationPolicy.xml
ngineconfigurable/parameter-framework/example/README.md
ngineconfigurable/parameter-framework/example/Settings/device_for_input_source.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_accessibility.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_dtmf.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_enforced_audible.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_media.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_phone.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_rerouting.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_sonification.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_sonification_respectful.pfw
ngineconfigurable/parameter-framework/example/Settings/device_for_strategy_transmitted_through_speaker.pfw
ngineconfigurable/parameter-framework/example/Settings/strategy_for_stream.pfw
ngineconfigurable/parameter-framework/example/Settings/strategy_for_usage.pfw
ngineconfigurable/parameter-framework/example/Settings/volumes.pfw
ngineconfigurable/parameter-framework/example/Structure/PolicyClass.xml
ngineconfigurable/parameter-framework/example/Structure/PolicySubsystem-CommonTypes.xml
ngineconfigurable/parameter-framework/example/Structure/PolicySubsystem-Volume.xml
ngineconfigurable/parameter-framework/example/Structure/PolicySubsystem.xml
ngineconfigurable/parameter-framework/example/policy_criteria.txt
ngineconfigurable/parameter-framework/plugin/Android.mk
ngineconfigurable/parameter-framework/plugin/InputSource.cpp
ngineconfigurable/parameter-framework/plugin/InputSource.h
ngineconfigurable/parameter-framework/plugin/PolicyMappingKeys.h
ngineconfigurable/parameter-framework/plugin/PolicySubsystem.cpp
ngineconfigurable/parameter-framework/plugin/PolicySubsystem.h
ngineconfigurable/parameter-framework/plugin/PolicySubsystemBuilder.cpp
ngineconfigurable/parameter-framework/plugin/Strategy.cpp
ngineconfigurable/parameter-framework/plugin/Strategy.h
ngineconfigurable/parameter-framework/plugin/Stream.cpp
ngineconfigurable/parameter-framework/plugin/Stream.h
ngineconfigurable/parameter-framework/plugin/Usage.cpp
ngineconfigurable/parameter-framework/plugin/Usage.h
ngineconfigurable/parameter-framework/plugin/VolumeProfile.cpp
ngineconfigurable/parameter-framework/plugin/VolumeProfile.h
ngineconfigurable/src/Collection.h
ngineconfigurable/src/Element.h
ngineconfigurable/src/Engine.cpp
ngineconfigurable/src/Engine.h
ngineconfigurable/src/EngineInstance.cpp
ngineconfigurable/src/InputSource.cpp
ngineconfigurable/src/InputSource.h
ngineconfigurable/src/Strategy.cpp
ngineconfigurable/src/Strategy.h
ngineconfigurable/src/Stream.cpp
ngineconfigurable/src/Stream.h
ngineconfigurable/src/Usage.cpp
ngineconfigurable/src/Usage.h
ngineconfigurable/wrapper/Android.mk
ngineconfigurable/wrapper/ParameterManagerWrapper.cpp
ngineconfigurable/wrapper/audio_policy_criteria_conf.h
ngineconfigurable/wrapper/config/audio_policy_criteria.conf
ngineconfigurable/wrapper/include/ParameterManagerWrapper.h
tilities/Android.mk
tilities/convert/Android.mk
tilities/convert/convert.h
7d7ea036436320b03bef826d78c4c035b67edbd0 24-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> Merge "AudioPolicyManager: notification of dynamic policy mix activity (input)"
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
ommon/managerdefinitions/include/AudioPort.h
ommon/managerdefinitions/src/AudioPort.cpp
f27e2fbfc3284c00a60fa68edc51d436f75b1e32 20-Apr-2015 Andy Hung <hunga@google.com> Add channel index record to AudioPolicyManager

Change-Id: Ic534bee084108a68c7818600df6e1c9dc9258a0d
ommon/managerdefinitions/include/ConfigParsingUtils.h
ommon/managerdefinitions/src/AudioPort.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
ommon/managerdefinitions/src/DeviceDescriptor.cpp
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
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
anagerdefault/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
ervice/AudioPolicyInterfaceImpl.cpp
554a277d4e42a3d3df3d90ba0e7dfa2d31690e32 10-Apr-2015 Eric Laurent <elaurent@google.com> audio policy: add binder calls for audio source control

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

Change-Id: I2008308a6a996baeae502b68a790d87281efe2ff
udioPolicyInterface.h
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
ervice/AudioPolicyInterfaceImpl.cpp
ervice/AudioPolicyInterfaceImplLegacy.cpp
ervice/AudioPolicyService.h
cfdd52423cee9efea73023feeaa74279ebd45b7c 15-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> Merge "AudioPolicyManager: notification of dynamic policy mix activity"
de80105c3f2db0eabd47640c49387ea3b44d4782 15-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> AudioPolicyManager: notification of dynamic policy mix activity

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

Bug 20226914

Change-Id: Iec939cb640c58056f88947b611d23b4bb6d8a11b
udioPolicyInterface.h
ommon/managerdefinitions/include/AudioOutputDescriptor.h
ommon/managerdefinitions/src/AudioOutputDescriptor.cpp
ervice/AudioPolicyClientImpl.cpp
ervice/AudioPolicyService.cpp
ervice/AudioPolicyService.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
ervice/AudioPolicyInterfaceImpl.cpp
ervice/AudioPolicyInterfaceImplLegacy.cpp
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
ommon/managerdefinitions/include/AudioPort.h
ommon/managerdefinitions/include/IOProfile.h
ommon/managerdefinitions/src/AudioPort.cpp
ommon/managerdefinitions/src/IOProfile.cpp
anagerdefault/AudioPolicyManager.cpp
anagerdefault/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
ommon/managerdefinitions/include/AudioPolicyMix.h
ommon/managerdefinitions/src/AudioPolicyMix.cpp
anagerdefault/AudioPolicyManager.cpp
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
ommon/include/Volume.h
ommon/managerdefinitions/include/AudioOutputDescriptor.h
ommon/managerdefinitions/src/AudioOutputDescriptor.cpp
ngine/interface/AudioPolicyManagerInterface.h
nginedefault/src/Engine.cpp
nginedefault/src/Engine.h
nginedefault/src/Gains.cpp
nginedefault/src/Gains.h
anagerdefault/AudioPolicyManager.cpp
anagerdefault/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
ommon/managerdefinitions/Android.mk
ommon/managerdefinitions/include/AudioOutputDescriptor.h
ommon/managerdefinitions/include/AudioPolicyMix.h
ommon/managerdefinitions/src/AudioOutputDescriptor.cpp
ommon/managerdefinitions/src/AudioPolicyMix.cpp
ngine/interface/AudioPolicyManagerObserver.h
nginedefault/src/Engine.cpp
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
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
anagerdefault/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
ommon/managerdefinitions/include/AudioInputDescriptor.h
ommon/managerdefinitions/include/AudioOutputDescriptor.h
ommon/managerdefinitions/include/AudioPort.h
ommon/managerdefinitions/include/ConfigParsingUtils.h
ommon/managerdefinitions/include/DeviceDescriptor.h
ommon/managerdefinitions/include/IOProfile.h
ommon/managerdefinitions/src/AudioInputDescriptor.cpp
ommon/managerdefinitions/src/AudioOutputDescriptor.cpp
ommon/managerdefinitions/src/AudioPatch.cpp
ommon/managerdefinitions/src/AudioPort.cpp
ommon/managerdefinitions/src/ConfigParsingUtils.cpp
ommon/managerdefinitions/src/DeviceDescriptor.cpp
ommon/managerdefinitions/src/HwModule.cpp
ommon/managerdefinitions/src/IOProfile.cpp
nginedefault/src/Engine.cpp
anagerdefault/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
udioPolicyInterface.h
ommon/managerdefinitions/include/AudioOutputDescriptor.h
ommon/managerdefinitions/include/AudioPort.h
ommon/managerdefinitions/include/DeviceDescriptor.h
ommon/managerdefinitions/src/AudioOutputDescriptor.cpp
ommon/managerdefinitions/src/AudioPort.cpp
ommon/managerdefinitions/src/DeviceDescriptor.cpp
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
ervice/AudioPolicyInterfaceImpl.cpp
ervice/AudioPolicyInterfaceImplLegacy.cpp
ervice/AudioPolicyService.h
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>
ommon/managerdefinitions/include/ConfigParsingUtils.h
5c233f8b772719371475624edf1002ed80e1d0e8 03-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> AudioPolicy: remove extraneous parentheses

Change-Id: Ibcea37b90cc0aaacb3b6194745bf569edad8992a
nginedefault/src/Engine.cpp
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
ommon/managerdefinitions/include/DeviceDescriptor.h
ommon/managerdefinitions/include/audio_policy_conf.h
ommon/managerdefinitions/src/HwModule.cpp
anagerdefault/AudioPolicyManager.cpp
anagerdefault/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>
ndroid.mk
ommon/include/RoutingStrategy.h
ommon/managerdefinitions/include/AudioGain.h
ommon/managerdefinitions/src/AudioGain.cpp
ngine/interface/AudioPolicyManagerInterface.h
ngine/interface/AudioPolicyManagerObserver.h
nginedefault/Android.mk
nginedefault/include/AudioPolicyEngineInstance.h
nginedefault/src/Engine.cpp
nginedefault/src/Engine.h
nginedefault/src/EngineInstance.cpp
nginedefault/src/Gains.cpp
nginedefault/src/Gains.h
anagerdefault/AudioPolicyManager.cpp
anagerdefault/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>
ommon/include/Volume.h
ommon/managerdefinitions/Android.mk
ommon/managerdefinitions/include/AudioGain.h
ommon/managerdefinitions/include/StreamDescriptor.h
ommon/managerdefinitions/src/AudioGain.cpp
ommon/managerdefinitions/src/StreamDescriptor.cpp
anagerdefault/AudioPolicyManager.cpp
anagerdefault/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>
ommon/managerdefinitions/Android.mk
ommon/managerdefinitions/include/SoundTriggerSession.h
ommon/managerdefinitions/src/SoundTriggerSession.cpp
anagerdefault/AudioPolicyManager.cpp
anagerdefault/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>
ommon/include/RoutingStrategy.h
ommon/managerdefinitions/Android.mk
ommon/managerdefinitions/include/ApmImplDefinitions.h
ommon/managerdefinitions/include/AudioOutputDescriptor.h
ommon/managerdefinitions/include/EffectDescriptor.h
ommon/managerdefinitions/src/EffectDescriptor.cpp
anagerdefault/AudioPolicyManager.cpp
anagerdefault/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>
ommon/managerdefinitions/Android.mk
ommon/managerdefinitions/include/AudioPolicyMix.h
ommon/managerdefinitions/src/AudioPolicyMix.cpp
anagerdefault/AudioPolicyManager.cpp
anagerdefault/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>
ndroid.mk
ommon/include/policy.h
ommon/managerdefinitions/Android.mk
ommon/managerdefinitions/include/AudioInputDescriptor.h
ommon/managerdefinitions/include/AudioOutputDescriptor.h
ommon/managerdefinitions/include/AudioPatch.h
ommon/managerdefinitions/include/AudioPort.h
ommon/managerdefinitions/include/ConfigParsingUtils.h
ommon/managerdefinitions/include/DeviceDescriptor.h
ommon/managerdefinitions/include/HwModule.h
ommon/managerdefinitions/src/AudioInputDescriptor.cpp
ommon/managerdefinitions/src/AudioOutputDescriptor.cpp
ommon/managerdefinitions/src/AudioPatch.cpp
ommon/managerdefinitions/src/AudioPort.cpp
ommon/managerdefinitions/src/ConfigParsingUtils.cpp
ommon/managerdefinitions/src/DeviceDescriptor.cpp
ommon/managerdefinitions/src/HwModule.cpp
ommon/managerdefinitions/src/IOProfile.cpp
anagerdefault/AudioPolicyManager.cpp
anagerdefault/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>
ndroid.mk
ommon/Android.mk
ommon/managerdefinitions/Android.mk
ommon/managerdefinitions/include/ApmImplDefinitions.h
ommon/managerdefinitions/include/AudioGain.h
ommon/managerdefinitions/include/AudioInputDescriptor.h
ommon/managerdefinitions/include/AudioOutputDescriptor.h
ommon/managerdefinitions/include/AudioPatch.h
ommon/managerdefinitions/include/AudioPort.h
ommon/managerdefinitions/include/ConfigParsingUtils.h
ommon/managerdefinitions/include/DeviceDescriptor.h
ommon/managerdefinitions/include/HwModule.h
ommon/managerdefinitions/include/IOProfile.h
ommon/managerdefinitions/include/audio_policy_conf.h
ommon/managerdefinitions/src/AudioGain.cpp
ommon/managerdefinitions/src/AudioInputDescriptor.cpp
ommon/managerdefinitions/src/AudioOutputDescriptor.cpp
ommon/managerdefinitions/src/AudioPatch.cpp
ommon/managerdefinitions/src/AudioPort.cpp
ommon/managerdefinitions/src/ConfigParsingUtils.cpp
ommon/managerdefinitions/src/DeviceDescriptor.cpp
ommon/managerdefinitions/src/HwModule.cpp
ommon/managerdefinitions/src/IOProfile.cpp
anagerdefault/ApmImplDefinitions.h
anagerdefault/AudioInputDescriptor.cpp
anagerdefault/AudioInputDescriptor.h
anagerdefault/AudioOutputDescriptor.cpp
anagerdefault/AudioOutputDescriptor.h
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
anagerdefault/ConfigParsingUtils.cpp
anagerdefault/ConfigParsingUtils.h
anagerdefault/Devices.cpp
anagerdefault/Devices.h
anagerdefault/Gains.cpp
anagerdefault/Gains.h
anagerdefault/HwModule.cpp
anagerdefault/HwModule.h
anagerdefault/IOProfile.cpp
anagerdefault/IOProfile.h
anagerdefault/Ports.cpp
anagerdefault/Ports.h
anagerdefault/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>
anagerdefault/ApmImplDefinitions.h
anagerdefault/AudioInputDescriptor.cpp
anagerdefault/AudioInputDescriptor.h
anagerdefault/AudioOutputDescriptor.cpp
anagerdefault/AudioOutputDescriptor.h
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
anagerdefault/ConfigParsingUtils.cpp
anagerdefault/ConfigParsingUtils.h
anagerdefault/Devices.cpp
anagerdefault/Devices.h
anagerdefault/Gains.cpp
anagerdefault/Gains.h
anagerdefault/HwModule.cpp
anagerdefault/HwModule.h
anagerdefault/IOProfile.cpp
anagerdefault/IOProfile.h
anagerdefault/Ports.cpp
anagerdefault/Ports.h
anagerdefault/audio_policy_conf.h
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
anagerdefault/Devices.cpp
anagerdefault/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
anagerdefault/Devices.cpp
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
ervice/AudioPolicyService.cpp
ac48c28215798e4135396f09d583b22302636735 16-Mar-2015 Rakesh Iyer <rni@google.com> Merge "Remove mId from DeviceDescriptor."
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
anagerdefault/Devices.h
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
anagerdefault/ConfigParsingUtils.h
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
anagerdefault/AudioPolicyManager.cpp
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
ndroid.mk
udioPolicyClientImpl.cpp
udioPolicyClientImplLegacy.cpp
udioPolicyEffects.cpp
udioPolicyEffects.h
udioPolicyFactory.cpp
udioPolicyInterfaceImpl.cpp
udioPolicyInterfaceImplLegacy.cpp
udioPolicyManager.cpp
udioPolicyManager.h
udioPolicyService.cpp
udioPolicyService.h
udio_policy_conf.h
anager/AudioPolicyFactory.cpp
anagerdefault/ApmImplDefinitions.h
anagerdefault/AudioInputDescriptor.cpp
anagerdefault/AudioInputDescriptor.h
anagerdefault/AudioOutputDescriptor.cpp
anagerdefault/AudioOutputDescriptor.h
anagerdefault/AudioPolicyManager.cpp
anagerdefault/AudioPolicyManager.h
anagerdefault/ConfigParsingUtils.cpp
anagerdefault/ConfigParsingUtils.h
anagerdefault/Devices.cpp
anagerdefault/Devices.h
anagerdefault/Gains.cpp
anagerdefault/Gains.h
anagerdefault/HwModule.cpp
anagerdefault/HwModule.h
anagerdefault/IOProfile.cpp
anagerdefault/IOProfile.h
anagerdefault/Ports.cpp
anagerdefault/Ports.h
anagerdefault/audio_policy_conf.h
ervice/AudioPolicyClientImpl.cpp
ervice/AudioPolicyClientImplLegacy.cpp
ervice/AudioPolicyEffects.cpp
ervice/AudioPolicyEffects.h
ervice/AudioPolicyInterfaceImpl.cpp
ervice/AudioPolicyInterfaceImplLegacy.cpp
ervice/AudioPolicyService.cpp
ervice/AudioPolicyService.h
e8610ba233ecdb3f6d3259412b41738a3861ee7e 06-Feb-2015 Paul McLean <pmclean@google.com> Passing device name up through getDeviceDescriptor() method (when creating)

Change-Id: Ibd85e37914333478fd038c3d2f52e214016c16b1
udioPolicyManager.cpp
udioPolicyManager.h
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
udioPolicyInterface.h
udioPolicyInterfaceImpl.cpp
udioPolicyInterfaceImplLegacy.cpp
udioPolicyManager.cpp
udioPolicyManager.h
udioPolicyService.h
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
udioPolicyManager.cpp
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
udioPolicyManager.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
udioPolicyManager.cpp
udioPolicyManager.h
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
udioPolicyManager.cpp
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
udioPolicyManager.cpp
udioPolicyManager.h
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.
7ccc6b9baf2f568a0a8c6e27dcd4195645a6361d 20-Jan-2015 Eric Laurent <elaurent@google.com> Merge "fix audio patch leak." into lmp-mr1-dev
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
udioPolicyService.cpp
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
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
udioPolicyEffects.cpp
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
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
udioPolicyManager.h
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
ndroid.mk
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
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
udioPolicyInterfaceImplLegacy.cpp
udioPolicyManager.cpp
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
udioPolicyManager.cpp
udioPolicyManager.h
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
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
udioPolicyManager.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
udioPolicyManager.cpp
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
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>
udioPolicyManager.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
udioPolicyManager.cpp
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
udioPolicyManager.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
udioPolicyManager.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
udioPolicyClientImplLegacy.cpp
udioPolicyInterface.h
udioPolicyInterfaceImpl.cpp
udioPolicyManager.cpp
udioPolicyManager.h
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
udioPolicyManager.cpp
udioPolicyManager.h
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
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
udioPolicyManager.cpp
udioPolicyManager.h
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
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
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
udioPolicyManager.cpp
udioPolicyManager.h
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
udioPolicyInterface.h
udioPolicyInterfaceImpl.cpp
udioPolicyInterfaceImplLegacy.cpp
udioPolicyService.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
udioPolicyManager.cpp
udioPolicyManager.h
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
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
udioPolicyManager.cpp
cbbe1ccc41a86fbf009767bbdab43232e6c369c0 06-Dec-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: fix AudioPort parameter checks" into lmp-mr1-dev
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
udioPolicyManager.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>
udioPolicyManager.h
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.
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.
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
udioPolicyInterface.h
udioPolicyInterfaceImpl.cpp
udioPolicyInterfaceImplLegacy.cpp
udioPolicyManager.cpp
udioPolicyManager.h
udioPolicyService.h
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
udioPolicyManager.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
udioPolicyInterface.h
udioPolicyInterfaceImpl.cpp
udioPolicyInterfaceImplLegacy.cpp
udioPolicyManager.cpp
udioPolicyManager.h
udioPolicyService.cpp
udioPolicyService.h
0f78eabb733e1413d7febd00c0bad0f0add02314 25-Nov-2014 Eric Laurent <elaurent@google.com> fix the build.

Change-Id: Iab6b65327ae1adbf0b3a6da5a23b8107468f533e
udioPolicyManager.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
udioPolicyEffects.cpp
udioPolicyEffects.h
udioPolicyInterfaceImpl.cpp
udioPolicyInterfaceImplLegacy.cpp
udioPolicyManager.cpp
udioPolicyManager.h
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
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
udioPolicyService.cpp
udioPolicyService.h
9544a8e904955f4b96ec9f2d6f4edc2a72afd270 18-Nov-2014 Eric Laurent <elaurent@google.com> am bfa77b5c: am 8cd37d67: Merge "audio policy: do not prevent routing to A2DP when suspended." into lmp-mr1-dev

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

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

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

Bug: 18095151.
Change-Id: I1c75dd8288ed3dd494eb942060eac9c9660dca50
udioPolicyManager.cpp
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
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
udioPolicyService.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
udioPolicyManager.cpp
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.
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
udioPolicyService.cpp
udioPolicyService.h
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
udioPolicyManager.cpp
udioPolicyManager.h
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
udioPolicyInterfaceImpl.cpp
udioPolicyInterfaceImplLegacy.cpp
8e05b5f5f45b8d6931ff830969125a42428c6830 30-Oct-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: validate stream type received from binder calls." into lmp-mr1-dev
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
udioPolicyInterfaceImpl.cpp
udioPolicyInterfaceImplLegacy.cpp
6e8212b2a02685e50d0c093a6f44d9af636261d9 28-Oct-2014 Jean-Michel Trivi <jmtrivi@google.com> Merge "Always use an address for remote submix" into lmp-mr1-dev
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
udioPolicyManager.cpp
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
udioPolicyManager.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
udioPolicyManager.cpp
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
udioPolicyEffects.cpp
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
udioPolicyService.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
udioPolicyInterfaceImpl.cpp
udioPolicyInterfaceImplLegacy.cpp
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"
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
udioPolicyManager.cpp
udioPolicyManager.h
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
95511add8ad4d440c67272503559f5042c4e6f1f 11-Oct-2014 Eric Laurent <elaurent@google.com> audio policy: add support for ro.audio.media_deep_buffer

Bug: 17931716.
Change-Id: Ife170f20f5d02b71059fbd384bd29759fafee826
udioPolicyManager.cpp
udioPolicyManager.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()
f5ada6edcc83bb1b313abcd4c4fbdc4f7724f04d 10-Oct-2014 Eric Laurent <elaurent@google.com> audio policy: move intializations to onFirstRef()

Bug: 17896324.

Change-Id: I3bb74f5397142ac354bd815eb362e5ddacdcb463
udioPolicyService.cpp
udioPolicyService.h
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
udioPolicyClientImplLegacy.cpp
udioPolicyInterfaceImplLegacy.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
udioPolicyEffects.cpp
udioPolicyEffects.h
udioPolicyInterfaceImpl.cpp
udioPolicyInterfaceImplLegacy.cpp
udioPolicyService.cpp
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
udioPolicyManager.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
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
udioPolicyManager.cpp
udioPolicyManager.h
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
udioPolicyManager.cpp
a8a4eeb95988e6bb73f7a742c8dd238c1f96c5c4 27-Sep-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: favor mixed over direct output for PCM format" into lmp-dev
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
udioPolicyManager.cpp
bb6c9a05840d924b502ce0f1868fca4881ada1ed 25-Sep-2014 Eric Laurent <elaurent@google.com> audio: fix stream type for accessibility usage

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

Bug: 17558149.
Change-Id: Ia3bead8052fca5cbf282c267f7b9b06014fef628
udioPolicyInterfaceImpl.cpp
udioPolicyInterfaceImplLegacy.cpp
udioPolicyService.cpp
udioPolicyService.h
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
udioPolicyManager.cpp
udioPolicyManager.h
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
udioPolicyManager.cpp
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
udioPolicyManager.cpp
58f8eb7ae0ee400585bce6682a7212575115e758 13-Sep-2014 Eric Laurent <elaurent@google.com> audio policy: fix check in creaateAudioPatch()

Bug: 17488759.
Change-Id: I9dd2c3ca7f83de4b3573f4fb0e9934e1bc37c3bc
udioPolicyManager.cpp
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
udioPolicyManager.cpp
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
udioPolicyManager.cpp
udioPolicyManager.h
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
udioPolicyManager.cpp
cb16968f593e4d58857c693c8ec6f2d2337f5512 06-Sep-2014 Jungshik Jang <jayjang@google.com> Merge "Fix "invalid device combination" in system audio mode." 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
udioPolicyService.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
udioPolicyManager.cpp
9a63396f70880772e551e1e4c38f27c635612083 29-Aug-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: fix input source passed to openInput()" into lmp-dev
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
udioPolicyManager.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
udioPolicyManager.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
udioPolicyEffects.cpp
udioPolicyEffects.h
8962e08c4989368d2c821b64f42632b6f5fb016e 28-Aug-2014 Paul McLean <pmclean@google.com> Merge "Fix audio dropouts with multiple playback streams." into lmp-dev
47f64f2ed14839a00b3b148d490dc0394282eb54 28-Aug-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: remove audio patch when closing input or output" into lmp-dev
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
udioPolicyManager.cpp
udioPolicyManager.h
5c477aa6205e2ebafec237411900d89a510cc105 21-Aug-2014 Paul McLean <pmclean@google.com> Fix audio dropouts with multiple playback streams.

Bug 17136569

Change-Id: I7f69cb24168c7d27ce28679735f53c1ece4014c1
udioPolicyManager.cpp
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
udioPolicyManager.cpp
udioPolicyManager.h
47bf8d8f0242bbe9cfa777c96e41e5fcd5294ee4 13-Aug-2014 Jean-Michel Trivi <jmtrivi@google.com> Merge "audiopolicy: add dump for audio patches" into lmp-dev
edf103987d71f09dc2acb0a971cb40ff6608f1a5 11-Aug-2014 Jean-Michel Trivi <jmtrivi@google.com> Merge "Update audio ports with profile capabilities" into lmp-dev
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
udioPolicyManager.cpp
udioPolicyManager.h
4d41695d45e2c7211899afa94b20e32120b2b7e0 10-Aug-2014 Eric Laurent <elaurent@google.com> audiopolicy: add dump for audio patches

Bug: 10549017.
Change-Id: I896c8e16c8cf7490bab75295903620a76236f571
udioPolicyManager.cpp
udioPolicyManager.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
udioPolicyManager.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
udioPolicyManager.cpp
udioPolicyManager.h
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
udioPolicyManager.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
udioPolicyManager.cpp
a57ab8da6fe56fdb91dfc95ebd0282eb879dde53 30-Jul-2014 Eric Laurent <elaurent@google.com> policy manager: recognize AUDIO_DEVICE_IN_AMBIENT from policy.conf

Change-Id: If46b8d13f216bad4aa62598531d406d3303134f5
udioPolicyManager.cpp
ac29afacbb34b92f1948188e5353fce5a252ccb3 28-Jul-2014 Jon Eklund <jeklund@motorola.com> audio policy: support line output device

Change-Id: Iddf1b6486430270d871a45c75615e54339a818e9
udioPolicyManager.cpp
udioPolicyManager.h
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
ndroid.mk
udioPolicyClientImpl.cpp
udioPolicyInterface.h
udioPolicyInterfaceImpl.cpp
udioPolicyInterfaceImplLegacy.cpp
udioPolicyManager.cpp
udioPolicyManager.h
udioPolicyService.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>
udioPolicyManager.cpp
222260168c144cca5a4e8f1c79df8c8baa22b591 02-Aug-2014 Eric Laurent <elaurent@google.com> audio policy: fix service fuzz test crash

Bug: 13744391.
Change-Id: I2430e09ad00476b9ac28dc55466942c61fb0531d
udioPolicyManager.cpp
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
udioPolicyManager.cpp
3a0fe12fbd08b13e9f57d79b0391186be05072f5 30-Jul-2014 Andy Hung <hunga@google.com> Add Quad channel output to AudioPolicyManager

Matches some USB device configurations.

Change-Id: I2429f9de87816b4ad1d39516e3821562617c76ee
udioPolicyManager.cpp
8b685b9e56cc207d44b08d124148e7d752ef2241 30-Jul-2014 Andy Hung <hunga@google.com> Merge "Update multichannel audio policy handling" into lmp-dev
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
udioPolicyManager.cpp
udioPolicyManager.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
udioPolicyInterface.h
udioPolicyInterfaceImpl.cpp
udioPolicyInterfaceImplLegacy.cpp
udioPolicyManager.cpp
udioPolicyManager.h
udioPolicyService.h
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
udioPolicyClientImpl.cpp
udioPolicyInterface.h
udioPolicyService.h
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
udioPolicyClientImpl.cpp
udioPolicyClientImplLegacy.cpp
udioPolicyInterface.h
udioPolicyManager.cpp
udioPolicyManager.h
udioPolicyService.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
udioPolicyManager.cpp
cbd48023d0a0e3fd59955011538c0087a439f905 24-Jul-2014 Glenn Kasten <gkasten@google.com> audio policy: compatible sample rates and channel masks

Change-Id: I50d068a968aa6bd9e53e5b3111a1b09a6c2d219c
udioPolicyManager.cpp
udioPolicyManager.h
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
udioPolicyManager.cpp
udioPolicyManager.h
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
udioPolicyService.cpp
74a8e2533561f04029873446206ab407cd2e033b 24-Jul-2014 Glenn Kasten <gkasten@google.com> audio policy: clean up checking for active input

Change-Id: I85cc089df32e6d469e8aef307599f1021ea5b835
udioPolicyManager.cpp
6a8ab05f0598f4ebdd5ef82e93cf32fde0598189 24-Jul-2014 Glenn Kasten <gkasten@google.com> audio policy: add audio_input_flags_t and mOpenRefCount

Change-Id: I5f9c7b5ebf03b9bc94efe70d3677edfabb99c194
udioPolicyInterface.h
udioPolicyInterfaceImpl.cpp
udioPolicyManager.cpp
udioPolicyManager.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
udioPolicyManager.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
udioPolicyManager.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
udioPolicyManager.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
udioPolicyManager.cpp
a7e04803ffa0d8d4cc51a122f68bf5038422aabb 21-Jul-2014 Glenn Kasten <gkasten@google.com> Remove execute bit

Change-Id: I1cf0c0d9375779b3074af12f4cbf9c1ec07bf4ff
ndroid.mk
udioPolicyEffects.cpp
udioPolicyEffects.h
udioPolicyInterfaceImpl.cpp
udioPolicyInterfaceImplLegacy.cpp
udioPolicyService.cpp
udioPolicyService.h
b3b1660ecb67f61f9da54efced8677fa3a6f4863 16-Jul-2014 Glenn Kasten <gkasten@google.com> Add audio_input_flags_t to IAudioPolicyService::getInput

Change-Id: I9f37be05f8dc7b85a8827a94e76ca0f45453e170
udioPolicyInterfaceImpl.cpp
udioPolicyInterfaceImplLegacy.cpp
udioPolicyService.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
udioPolicyClientImpl.cpp
udioPolicyClientImplLegacy.cpp
udioPolicyInterface.h
udioPolicyManager.cpp
udioPolicyService.h
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
udioPolicyManager.cpp
7c5b60ae8b8793b2d601ecf459807c974120331b 15-Jul-2014 Eric Laurent <elaurent@google.com> audio policy: build with USE_LEGACY_AUDIO_POLICY

Change-Id: I9def12ea689b00c0295c670c07373dacfb186799
udioPolicyInterfaceImplLegacy.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
udioPolicyEffects.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
udioPolicyManager.cpp
udioPolicyManager.h
udioPolicyService.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
udioPolicyManager.cpp
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
udioPolicyManager.cpp
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
udioPolicyManager.cpp
72d039f007722c92ee5ea7ffd03ece19d2781103 09-Jul-2014 Terry Heo <terryheo@google.com> Merge "audio policy: add new input audio device"
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
udioPolicyManager.cpp
3c643073650f469574498c68a6c30e5098350c33 03-Jul-2014 Jungshik Jang <jayjang@google.com> Merge "Add force usage and category for System Audio Control."
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
udioPolicyManager.cpp
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
ndroid.mk
udioPolicyEffects.cpp
udioPolicyEffects.h
udioPolicyInterfaceImpl.cpp
udioPolicyInterfaceImplLegacy.cpp
udioPolicyService.cpp
udioPolicyService.h
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
udioPolicyManager.cpp
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
udioPolicyManager.cpp
beb9e30471701d7b76bc14fd0d5dd1de95edd680 19-Jun-2014 Mark Salyzyn <salyzyn@google.com> audiopolicy: 64-bit compile warnings

Change-Id: I71db11499c4b0c434df8144c633d42282f5823c2
udioPolicyManager.cpp
ab5cdbaf65ca509681d2726aacdf3ac8bfb6b3fa 10-Jun-2014 Eric Laurent <elaurent@google.com> AudioTrack: add support for compressed audio

Add support for compressed audio playback by use
of an AudioTrack attached to a direct output thread.

Bug: 9428304.

Change-Id: I4a61be9cf0e31003ca85935d6e0ee38ca8192e03
udioPolicyManager.cpp
5bd3f38638acab633d181359cc9ec27b80f84d43 14-Jun-2014 Jean-Michel Trivi <jmtrivi@google.com> AudioPolicyManager: return output for audio attributes

In AudioPolicyManager, support querying an output
or playback strategy for audio attributes,
instead of a stream type,
In AudioTrack creation, use the output returned
for the track's attributes.

Change-Id: I0fef05845ba676404775e2e338c10e6a96237268
udioPolicyInterface.h
udioPolicyInterfaceImpl.cpp
udioPolicyManager.cpp
udioPolicyManager.h
udioPolicyService.h
eb4b03cb98e38bf76ee6e6debb74e76c30cbc228 11-Jun-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: use factory to create audio policy manager"
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
ndroid.mk
udioPolicyFactory.cpp
udioPolicyService.cpp
udioPolicyService.h
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
udioPolicyService.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
udioPolicyManager.cpp
udioPolicyManager.h
udio_policy.conf
udio_policy_conf.h
6f264ac08317a27958f2b0d3c35133b368dd9f3c 06-Jun-2014 Jean-Michel Trivi <jmtrivi@google.com> Merge "Audio policy: new media volume curve for speaker with DRC"
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
udioPolicyManager.cpp
udioPolicyManager.h
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
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
udioPolicyManager.cpp
udioPolicyManager.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
udioPolicyManager.cpp
udioPolicyManager.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
udioPolicyInterfaceImpl.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
udioPolicyManager.cpp
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
udioPolicyClientImpl.cpp
udioPolicyInterface.h
udioPolicyManager.cpp
udioPolicyService.cpp
udioPolicyService.h
671714b80cad4725d07691fbd8284cb869a0c27f 30-May-2014 Eric Laurent <elaurent@google.com> am 6a94d69d: audio policy: implement routing control

* commit '6a94d69dc4f32abb53c466a96f905bb199be6417':
audio policy: implement routing control
c0008d1146ccdeda0a4eb08f8225225b1b1237dc 30-May-2014 Eric Laurent <elaurent@google.com> Merge "handle in and out audio device connection separately"
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
udioPolicyManager.cpp
udioPolicyManager.h
udio_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
udioPolicyClientImpl.cpp
udioPolicyInterface.h
udioPolicyManager.cpp
udioPolicyService.cpp
udioPolicyService.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
udioPolicyInterface.h
udioPolicyInterfaceImpl.cpp
udioPolicyManager.cpp
udioPolicyManager.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
udioPolicyManager.cpp
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
udioPolicyInterfaceImpl.cpp
udioPolicyInterfaceImplLegacy.cpp
udioPolicyService.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
udioPolicyClientImpl.cpp
udioPolicyInterface.h
udioPolicyManager.cpp
udioPolicyManager.h
udioPolicyService.cpp
udioPolicyService.h
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
ndroid.mk
41b0e2421a0cf8dc22f224ea078678d7db651bda 14-May-2014 Mike Lockwood <lockwood@google.com> Add audio policy support for A2DP sink

Change-Id: Ifcad9c1d4bdb79668e03a31d843ec46670dd0bd8
udioPolicyManager.cpp
8670c31fddbeadcf9627aa970c69a823f13939ff 01-Apr-2014 Eric Laurent <elaurent@google.com> IAudioPolicyService interface extension for patch panel

Change-Id: I0a62e5416edc41c3a0e816275085ab18a23066f1
udioPolicyInterfaceImpl.cpp
udioPolicyInterfaceImplLegacy.cpp
udioPolicyService.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
udioPolicyClientImpl.cpp
udioPolicyInterface.h
udioPolicyManager.cpp
udioPolicyManager.h
udioPolicyService.cpp
udioPolicyService.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
ndroid.mk
d83062287758be57d1d0908b30bb18aa9b367f38 22-May-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: split audio policy library"
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
ndroid.mk
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
udioPolicyManager.cpp
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
udioPolicyService.cpp
udioPolicyService.h
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
udioPolicyManager.cpp
cdedf74e34117f9834055973880ee728f11d97cd 08-May-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: cleanup AudioPolicyService destructor"
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
udioPolicyService.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
udioPolicyManager.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
udioPolicyManager.cpp
udioPolicyManager.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()
2f8a36fc8df14cba33fa7c5c1c9d5a52f8a133c2 27-Mar-2014 Eric Laurent <elaurent@google.com> Fix the build

Change-Id: I2169a3d26f4e35e5cfa35a1264175aab6ac4db41
udioPolicyManager.cpp
udioPolicyManager.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
udioPolicyManager.cpp
udioPolicyManager.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
udioPolicyManager.cpp
udioPolicyManager.h
9ac3c9a7ee931088d09027ffa09414cb0402886f 21-Mar-2014 Eric Laurent <elaurent@google.com> Merge "audio policy: add option to use new policy manager"
c7e05b0fc54f9ad22c6d219bf8cf6f10f8d9ba9c 18-Mar-2014 Glenn Kasten <gkasten@android.com> am 0c282de7: am 77658a06: Merge "AudioPolicyService: malloc/delete pair"

* commit '0c282de73240b1efce64558ab2fa0a8be1f4292b':
AudioPolicyService: malloc/delete pair
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
ndroid.mk
udioPolicyClientImpl.cpp
udioPolicyClientImplLegacy.cpp
udioPolicyInterface.h
udioPolicyInterfaceImpl.cpp
udioPolicyInterfaceImplLegacy.cpp
udioPolicyService.cpp
udioPolicyService.h
e07208765fcd5904165e425ec714a25c350a2f40 11-Mar-2014 Eric Laurent <elaurent@google.com> audio policy: renamed AudioPolicyManagerBase to AudioPolicyManager

Change-Id: Ia8b5ae9c3a9cf6ed98f162614ea331efc78e9ff2
udioPolicyManager.cpp
udioPolicyManager.h
udioPolicyManagerBase.cpp
udioPolicyManagerBase.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
udioPolicyInterface.h
udioPolicyManagerBase.cpp
udioPolicyManagerBase.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
udioPolicyInterface.h
udioPolicyManagerBase.cpp
udioPolicyManagerBase.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
ndroid.mk
udioPolicyClientImpl.cpp
udioPolicyInterfaceImpl.cpp
udioPolicyService.cpp
c7e5040aa8b8e4da86814bf560346c7571e48087 06-Mar-2014 Eric Laurent <elaurent@google.com> move audio policy service to a separate library

Change-Id: Ibc3ef07aa9860b7fd4f9aaff27b0dbe0dcbf1cbf
ndroid.mk
udioPolicyService.cpp
udioPolicyService.h