• Home
  • History
  • Annotate
  • only in /frameworks/av/services/audiopolicy/common/managerdefinitions/src/
History log of /frameworks/av/services/audiopolicy/common/managerdefinitions/src/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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>
udioOutputDescriptor.cpp
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
udioSession.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
udioPatch.cpp
udioPort.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>
udioOutputDescriptor.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
udioInputDescriptor.cpp
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
e74bbf18a6595a914d3c771be08a72077465c51f 13-Jan-2017 Mark Salyzyn <salyzyn@google.com> liblog: use log/log.h for ALOG macros

Test: compile
Bug: 34250038
Change-Id: Ie3b92790df631dbacdd51053264dddeba66913c1
udioPatch.cpp
udioSession.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
udioPolicyMix.cpp
ypeConverter.cpp
32a5f5d53f9fe2ba584d2ecdf3edd487fb4146a7 22-Dec-2016 Mark Salyzyn <salyzyn@google.com> resolve merge conflicts of 4532a36 to master

Test: build
Change-Id: I9b93c4a703c0ee16116be2bea0e6df0606d29363
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
udioPatch.cpp
udioSession.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
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
erializer.cpp
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
udioPatch.cpp
onfigParsingUtils.cpp
eviceDescriptor.cpp
erializer.cpp
ypeConverter.cpp
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
udioPort.cpp
onfigParsingUtils.cpp
wModule.cpp
erializer.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
onfigParsingUtils.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
onfigParsingUtils.cpp
wModule.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
udioInputDescriptor.cpp
5ca8f32280377dd923e72c3c6bd3994217461b8b 11-Aug-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of fd923e7 to stage-aosp-master am: df5d9246f9
am: 63ef5a38f8

Change-Id: I516a43c5e56323e99ad7a8ca2e4811b77c9704f4
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
udioOutputDescriptor.cpp
udioPolicyMix.cpp
udioPort.cpp
eviceDescriptor.cpp
wModule.cpp
OProfile.cpp
essionRoute.cpp
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
udioOutputDescriptor.cpp
udioPolicyMix.cpp
udioPort.cpp
eviceDescriptor.cpp
wModule.cpp
OProfile.cpp
essionRoute.cpp
d91a420f234e2ec0ccc4d156a56297832e21d4a6 13-Jul-2016 Glenn Kasten <gkasten@google.com> Merge commit \'885dd7136a999d21219a4cc9034f20ef688c0625\' into manual_merge_885dd71
am: edab4257fa

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

Bug: 29627411
Change-Id: Iffe3bf69bf4b49cd76ffe00b16ebce1ab81c4631
olumeCurve.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
eviceDescriptor.cpp
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
ypeConverter.cpp
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
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
OProfile.cpp
ypeConverter.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
eviceDescriptor.cpp
wModule.cpp
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
ypeConverter.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
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
treamDescriptor.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
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
udioPatch.cpp
treamDescriptor.cpp
ypeConverter.cpp
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
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
eviceDescriptor.cpp
6820e1c04fb0a7734663b8f44f09c69fdcf36ab6 09-Apr-2016 Andy Hung <hunga@google.com> Merge "AudioPolicyManager: Tally max effects memory usage" into nyc-dev am: da65b5a
am: 85f9913

* commit '85f9913f4a9f89ad23970139141e4dd4d4a63d4f':
AudioPolicyManager: Tally max effects memory usage

Change-Id: Iec7365fa0552edd82feeb41b4072140e838e178f
da65b5a3502ae06a65f09d9983c89b7fd9369316 09-Apr-2016 Andy Hung <hunga@google.com> Merge "AudioPolicyManager: Tally max effects memory usage" into nyc-dev
5f1fa3053c87dd8e9dc528fb8c101907ff747746 06-Apr-2016 Andy Hung <hunga@google.com> AudioPolicyManager: Tally max effects memory usage

Bug: 27925014
Change-Id: I6d2596ed1b10ff193babeba7e6cbec36ee4fe074
ffectDescriptor.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
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>
udioProfile.cpp
fc732a63bd8c8c62ce75f36f03088ca6727caece 30-Mar-2016 Glenn Kasten <gkasten@google.com> Merge "Use audio_module_handle_t and audio_patch_handle_t consistently" into nyc-dev am: 54b48c3
am: b9b9fa3

* commit 'b9b9fa3d28a0436bb5e267d8fc3626ebd820fe78':
Use audio_module_handle_t and audio_patch_handle_t consistently

Change-Id: I100c4795ec6d0d9e9c23d6e850303a23f3bfb603
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
udioInputDescriptor.cpp
udioOutputDescriptor.cpp
udioPatch.cpp
udioPort.cpp
eviceDescriptor.cpp
wModule.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
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
udioPolicyMix.cpp
dd9c82ae89985ca87a087e86c7f632a29f86601b 17-Mar-2016 Jean-Michel Trivi <jmtrivi@google.com> resolve merge conflicts of 9462ca1 to master

Change-Id: I7643b8dd1a4ec40b6e8fd8c824bf03afbbeac170
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
udioOutputDescriptor.cpp
udioPolicyMix.cpp
udioSession.cpp
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
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
eviceDescriptor.cpp
wModule.cpp
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
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
udioPort.cpp
udioProfile.cpp
OProfile.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)
udioPort.cpp
eeecb980ff4c202d0a3c4b0bfe040dce2f73336d 26-Feb-2016 Glenn Kasten <gkasten@google.com> Add use for audio_unique_id_t

Bug: 25641253
Bug: 21019153
Change-Id: I65dc128e760c245f3d90559635a8981b186c87d7
udioPort.cpp
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
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
udioOutputDescriptor.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
udioInputDescriptor.cpp
udioSession.cpp
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
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
7281aa9810b33eff47b00104db26c97c77931611 18-Feb-2016 Jean-Michel Trivi <jmtrivi@google.com> Send client / device format in recording callback

Bug 26798796

Change-Id: Ib4f64159c8371d87da49a8f0cad9317a87d843c4
udioInputDescriptor.cpp
udioSession.cpp
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
ypeConverter.cpp
232f26f8b673973ffa463f80b08b731ffacc8785 18-Feb-2016 Eric Laurent <elaurent@google.com> DO NOT MERGE - audio policy: disable concurrent capture

This reverts commit 4342335fb84bfa4ec5b99e3ef82f186820c2275f.
This reverts commit 56afc7a5cc0f0bfc8021f6413b2e2267050bdc8a.
This reverts commit 313d1e7dfb4bf8e0a2f09a9adb287062dd64410c.
This reverts commit fb66dd9f95a1168698f072c4e5c2a2cf8c49a80f.

Bug: 22702906

Change-Id: I9085918f1f7b12e28430958cceb768bb29c12bdb
udioInputDescriptor.cpp
udioOutputDescriptor.cpp
udioSession.cpp
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
udioPort.cpp
udioProfile.cpp
b0a144d705a021994628d136a170a6d2bd4282e7 12-Feb-2016 Phil Burk <philburk@google.com> Merge "AudioTrack: support ENCODING_IEC61937" 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>
ypeConverter.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
udioPolicyMix.cpp
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
udioInputDescriptor.cpp
udioSession.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
wModule.cpp
fb66dd9f95a1168698f072c4e5c2a2cf8c49a80f 29-Jan-2016 Eric Laurent <elaurent@google.com> Revert "Revert "audio policy for concurrent capture.""

This reverts commit 84332aaa807037baca05340875f2d94fcc519ac4.

Bug:26841909
udioInputDescriptor.cpp
udioOutputDescriptor.cpp
udioSession.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
udioInputDescriptor.cpp
udioOutputDescriptor.cpp
udioSession.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>
erializer.cpp
ypeConverter.cpp
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>
erializer.cpp
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
udioInputDescriptor.cpp
udioOutputDescriptor.cpp
udioSession.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>
udioGain.cpp
ains.cpp
erializer.cpp
treamDescriptor.cpp
ypeConverter.cpp
olumeCurve.cpp
e0db30868d9734f95a02df516dd0dc6a7226474b 16-Jan-2016 Eric Laurent <elaurent@google.com> audio policy: fix combo device parsing

When parsing a device type entry in audio_policy.conf, do not
load device combos (e.g AUDIO_DEVICE_OUT_ALL_A2DP) in a single
DeviceDescriptor but create one descriptor for each device type
in the combo.

Bug: 24113912.
Change-Id: I3a7f43c7fc9cf516506bb3255dd2ed86564b7cd6
onfigParsingUtils.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>
udioCollections.cpp
udioPort.cpp
onfigParsingUtils.cpp
eviceDescriptor.cpp
wModule.cpp
OProfile.cpp
erializer.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
udioSession.cpp
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>
udioCollections.cpp
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>
udioCollections.cpp
udioRoute.cpp
eviceDescriptor.cpp
wModule.cpp
OProfile.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>
udioInputDescriptor.cpp
udioOutputDescriptor.cpp
udioPort.cpp
udioProfile.cpp
onfigParsingUtils.cpp
eviceDescriptor.cpp
wModule.cpp
OProfile.cpp
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
udioInputDescriptor.cpp
udioSession.cpp
7b279bbc24139ee1e01b58055ca94926ec18e2e9 14-Dec-2015 Eric Laurent <elaurent@google.com> audio policy: remove compilation warnings

Change-Id: I4d41ca903dfbe37066ef20a13ebabaff1e5b7326
wModule.cpp
ypeConverter.cpp
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
udioInputDescriptor.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>
ypeConverter.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>
treamDescriptor.cpp
1d4481fb9cb1ea149f79f2a5d22110af84fbc90b 19-Nov-2015 François Gaffie <francois.gaffie@intel.com> audio policy: clarify tag and name for device description

In preparation to introduction of topology within policy configuration
file, this patch clarifies the meaning of tag and name attributes of a
device.

Change-Id: I8db58be939823e87aa05b991e2afe0762eb741ca
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
onfigParsingUtils.cpp
eviceDescriptor.cpp
wModule.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>
udioInputDescriptor.cpp
udioOutputDescriptor.cpp
udioPatch.cpp
udioPort.cpp
onfigParsingUtils.cpp
eviceDescriptor.cpp
wModule.cpp
OProfile.cpp
ypeConverter.cpp
7a564a0e201d8ddc7cc7b7a7202adf017b4e4836 05-Nov-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: add support for external audio sources"
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
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
treamDescriptor.cpp
60d156247a7189d59af0a3643e2a786dacef734d 29-Oct-2015 Wonsik Kim <wonsik@google.com> APM: Don't copy invalid gain value

Bug: 24775316
Change-Id: I0c439a78909c03ca2b0340c67bfb969de2283166
udioPort.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
udioOutputDescriptor.cpp
udioSourceDescriptor.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
udioInputDescriptor.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>
essionRoute.cpp
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
udioPort.cpp
eviceDescriptor.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
udioPort.cpp
fedef1384d5ff758285fb19161a0348e1e32ab3f 12-May-2015 Andy Hung <hunga@google.com> Merge "Support channel index masks for output hal" 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
onfigParsingUtils.cpp
eviceDescriptor.cpp
wModule.cpp
18aa27016a94d0fee243637a80fd0741f89e08f2 06-May-2015 Andy Hung <hunga@google.com> Support channel index masks for output hal

Change-Id: Ib3e61ff6faf91c71b85102b5d77f90f124c08220
udioPort.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
udioPolicyMix.cpp
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
udioOutputDescriptor.cpp
138f77425a0956d867f078881f91628518ae8258 22-Apr-2015 Andy Hung <hunga@google.com> Fix format sorting order in AudioPort

Otherwise AUDIO_FORMAT_DEFAULT (used for dynamic formats)
is no longer the first entry.

Change-Id: I23869a9ca2ed138759d722e7c9838497f640921a
udioPort.cpp
f27e2fbfc3284c00a60fa68edc51d436f75b1e32 20-Apr-2015 Andy Hung <hunga@google.com> Add channel index record to AudioPolicyManager

Change-Id: Ic534bee084108a68c7818600df6e1c9dc9258a0d
udioPort.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
eviceDescriptor.cpp
cfdd52423cee9efea73023feeaa74279ebd45b7c 15-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> Merge "AudioPolicyManager: notification of dynamic policy mix activity"
de80105c3f2db0eabd47640c49387ea3b44d4782 15-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> AudioPolicyManager: notification of dynamic policy mix activity

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

Bug 20226914

Change-Id: Iec939cb640c58056f88947b611d23b4bb6d8a11b
udioOutputDescriptor.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
udioPort.cpp
OProfile.cpp
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
udioPolicyMix.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
udioOutputDescriptor.cpp
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
udioOutputDescriptor.cpp
udioPolicyMix.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
udioInputDescriptor.cpp
udioOutputDescriptor.cpp
udioPatch.cpp
udioPort.cpp
onfigParsingUtils.cpp
eviceDescriptor.cpp
wModule.cpp
OProfile.cpp
aa9811945f575614b3482d09e4d969792701cebb 21-Mar-2015 Paul McLean <pmclean@google.com> Adding explicit routing API to AudioTrack

Change-Id: I40c048c7644c46f4e4f7103875206c0785c4b1dc
udioOutputDescriptor.cpp
udioPort.cpp
eviceDescriptor.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
wModule.cpp
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>
udioGain.cpp
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>
udioGain.cpp
treamDescriptor.cpp
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>
oundTriggerSession.cpp
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>
ffectDescriptor.cpp
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>
udioPolicyMix.cpp
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>
udioInputDescriptor.cpp
udioOutputDescriptor.cpp
udioPatch.cpp
udioPort.cpp
onfigParsingUtils.cpp
eviceDescriptor.cpp
wModule.cpp
OProfile.cpp
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>
udioGain.cpp
udioInputDescriptor.cpp
udioOutputDescriptor.cpp
udioPatch.cpp
udioPort.cpp
onfigParsingUtils.cpp
eviceDescriptor.cpp
wModule.cpp
OProfile.cpp