History log of /frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.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
/frameworks/av/services/audiopolicy/managerdefault/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
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
7c1ec5f038e63a5eb8b04434577c25bc23f5f410 09-Jul-2015 Eric Laurent <elaurent@google.com> audio: several fixes in audio routing callbacks

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

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

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

Bug: 22381136.

Change-Id: Ieb0d9f92f563a40552eb31bc0499c8ac65f78ce4
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
54c0659b9efa72d11997c590c4d377c44789c7fd 08-Jul-2015 François Gaffie <francois.gaffie@intel.com> audio policy: session route: move SessionRoute to common

Move the SessionRoute and SessionRouteMap inner class from policy
manager to common policy pillars as initiated by the refactor.

This code was added at teh wrong place by commit aa981194.

Bug: 22376521.

Change-Id: I29aca21614e409c59aae4b7b14163552fb0bffb1
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.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
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.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
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
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
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
3fc792fe36b0b9100f74185665221b37f650ff65 18-Jun-2015 Eric Laurent <elaurent@google.com> Merge "audio policy: fix explicit routing and accessibility" 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
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
093a20cbe70d0033c085ef7be90b9f1bbacb3335 11-Jun-2015 Eric Laurent <elaurent@google.com> audio policy: fix explicit routing and accessibility

If a session has an active explicit routing request, this routing
must also be applied to accessibility prompts if accessibility
usage is currrently remapped to the strategy used by this session.

Bug: 20873151.
Change-Id: I97c6ece98cf1af9c64c2d2eb1fe382c7c0d657b4
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
72249d5b2f9f42a96c0e0825431e8f3f49b82644 08-Jun-2015 Eric Laurent <elaurent@google.com> audio policy: fix very verbose log build.

Change-Id: I94a69207059d8010ded14bce5d6e39c3f3074649
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.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
/frameworks/av/services/audiopolicy/managerdefault/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
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
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
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
c36a8897ff877f4c5b2e0580830faef8b87dd74a 25-Apr-2015 Ravi Kumar Alamanda <ralama@codeaurora.org> audiopolicy: Use AUDIO_OUTPUT_FLAG_TTS for TTS stream

Use AUDIO_OUTPUT_FLAG_TTS by default for TTS stream to see
if the HW supports a dedicated output for the same. If not,
fallback to primary output as it is done currently.

Change-Id: Ifb2ef7066e75c61fe4c1b9783c12627386a00ea5
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
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
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.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
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
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
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
466dc8ed6ca6b7f585104806c48613dd34e608c9 17-Apr-2015 Paul McLean <pmclean@google.com> Explicit routing in AudioRecord

Change-Id: I9cc5d54883a3e5c75d553fabb619fc8e49f4f9e5
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
7d7ea036436320b03bef826d78c4c035b67edbd0 24-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> Merge "AudioPolicyManager: notification of dynamic policy mix activity (input)"
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
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
2b0c1fc0d0ad3744a32d48234f255d82a5c80ded 16-Apr-2015 Jean-Michel Trivi <jmtrivi@google.com> AudioPolicyManager: notification of dynamic policy mix activity (input)

Use ref counting on start/stop inputs to notify audio policy client
of mix activity changes.

Bug 20226914

Change-Id: Ic4f9c91301d0bcbc0ff749acebdc3b2300309c38
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.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
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.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
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.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
/frameworks/av/services/audiopolicy/managerdefault/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
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.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
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
3bcf8597189c592713675ec58326ecbef0ac4ae9 03-Apr-2015 Eric Laurent <elaurent@google.com> audio flinger: improve device to device audio patches

Allow creation of audio patches between input and output
devices managed by the same audio HW module.

Change-Id: I4b83268a4d5c41f3d5905d7581202cf5193efd32
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
322b4d25387a04c9afebe998326d005bbdf17ede 04-Apr-2015 Eric Laurent <elaurent@google.com> audio policy: fix unique audio port ID.

Remove mId member from AudioPort as it was shadowed
by mId in DeviceDescriptor.

Add getters for Id, and HW module name and version to device,
output and input descriptors.

Fix DeviceDescriptor name initialization.

Change-Id: I4a69f385e40330954d9dad5f2926c521f60b2ec1
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
aa9811945f575614b3482d09e4d969792701cebb 21-Mar-2015 Paul McLean <pmclean@google.com> Adding explicit routing API to AudioTrack

Change-Id: I40c048c7644c46f4e4f7103875206c0785c4b1dc
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.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
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.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>
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.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>
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.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>
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.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>
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.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>
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.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>
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.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>
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
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>
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
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
/frameworks/av/services/audiopolicy/managerdefault/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
/frameworks/av/services/audiopolicy/managerdefault/AudioPolicyManager.cpp