summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* DO NOT MERGE - improve audio effect framwework thread safetyEric Laurent2017-03-221-1/+4
| | | | | | | | | | | | | | | | | | | | | | - 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 CVE-2017-0479 CVE-2017-0480 CVE-2017-0499 Change-Id: Ia1098cba2cd32cc2d1c9dfdff4adc2388dfed80e (cherry picked from commit b378b73dd7480b584340b8028802c9ca2d625123) (cherry picked from commit 22e26d8ee73488c58ba3e7928e5da155151abfd0 with backport by <sultanxda@gmail.com>)
* Enforce permission for accessing fm tunerScott Mertz2016-07-081-0/+5
| | | | Change-Id: I13f3ba8fc9caaeee21597a2405a8c3629e985502
* audiopolicy: Add AudioSessionInfo APISteve Kondik2016-04-271-12/+54
| | | | | | | | | | | | | | | | * This patch introduces a new API which allows applications to query the state of the audio effects system, and receive callbacks with the necessary information to attach effects to any stream. * In the future, this may come as part of the AudioPort system, but since that's an active area of development by Google, we will dodge it for now. * The policy now simply keeps a refcounted list of objects which hold various bits of stream metadata. Callbacks are sent on stream open/close to applications which might be listening for them. Change-Id: I2d554d36e1378f4eb7b276010a3bfe8345c22ecd
* audiopolicy: Revert all session callback patches.Steve Kondik2016-04-221-23/+9
| | | | | | | | | | | | | | | | * This has been rearchitected in a better way, as this feature turns out to be more difficult than it seems. * Reverting all of this stuff and rolling it into a single commit. This reverts commit c27a16c33c78a36482336a16199b1b8be794cea4. This reverts commit 32ef0556ae58ff6b7c6fe6fb0a17d3ff7f01de31. This reverts commit 489c9fb62f02e1d23d6d6c89b22f7d19c596e65e. This reverts commit a4123803d0a0e9e0c69faa4207d357cc74a65d58. This reverts commit e13b58b988ab642d4ae5ca6d0a89013510714956. This reverts commit 47f8c7303c9e2054f1492b02b6c7472385c52dc9. This reverts commit 0479d7c79a7fd6f112e8dc7e45c009cf6602dbaa. Change-Id: Iaed9f198d806aa414c95960713e8187c98db248b
* audiopolicy: Fix notification not sent for session releaseSteve Kondik2016-04-221-0/+2
| | | | Change-Id: Ifba4025532debc50c7931d08a9bcd1593d9b1721
* audiopolicy: Clean up the messSteve Kondik2016-04-191-20/+13
| | | | | | | | | | * Since we're not using the policy directly to auto-attach, let's clean it up and remove the unused stuff. * Also fixes notifications for session release. This reverts commit 47f8c7303c9e2054f1492b02b6c7472385c52dc9. Change-Id: Ibe65f427773c6ef012dde4f289d10e4089c094ea
* audiopolicy: Be a little smarter with auto-attachSteve Kondik2016-04-071-28/+40
| | | | | | | | | | | | | | * The edge cases, ZOMG! * Instead of relying on effects to be automatically attached, let's just always notify userspace and send a bit more information. This lets the application decide if effects should be attached rather than relying on a hard-coded configuration file. * Perform the setup in getOutputForAttr, but do it on the command thread so we don't block the client. OPO-593 Change-Id: I3900b349f2e895d51fa3a3dcc2de0c4bdf6dbc08
* audio: Send effect session notifications after startOutput successSteve Kondik2016-04-051-3/+10
| | | | | | | * Because we get a hellish firestorm during offload fallback, and our effects library really dislikes this. Change-Id: I22adb55d04502eedf03ce22f35f8b9f61de1c7b0
* audiopolicy: Handle startOutput on output command threadHaynes Mathew George2015-12-231-0/+14
| | | | | | | | Handle startOutput on AudioPolicyService output command thread to serialize with concurrent releaseOutput/stopOutput calls. CRs-Fixed: 944129 Change-Id: Ie333c736750c7dfb31d3036d79dfff13cd0486fc
* AudioPolicyService: Synchronize access to AudioPolicyManagerHaynes Mathew George2015-11-071-0/+1
| | | | | | | Synchronize access to APM when getDevicesForStream is called on APM. Change-Id: I2ba6922341f035375270b02000ef5a7e078f6b5a
* audio policy: bind setMode() and setPhoneState() operationsEric Laurent2015-09-161-1/+5
| | | | | | | | | | 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
* audio policy: protect capture from telephony RX path.Eric Laurent2015-08-071-0/+2
| | | | | | | | Add permission check if the capture device selected is telephony RX path. Bug: 23017158. Change-Id: Iaa34d836e6cf46b7cbbf2483fcd4306dcd27ce90
* audio policy: session routes continued.Eric Laurent2015-04-301-3/+24
| | | | | | | | | | | - 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
* Explicit routing in AudioRecordPaul McLean2015-04-281-4/+5
| | | | Change-Id: I9cc5d54883a3e5c75d553fabb619fc8e49f4f9e5
* audio policy: remove permission check for ports and patches gettersEric Laurent2015-04-201-9/+0
| | | | | | | Remove check for MODIFY_AUDIO_ROUTING permission in audio policy methods just getting devices or patches state. Change-Id: Id3bafc5ad0d0bd96210822243139898e314327d8
* audio policy: add binder calls for audio source controlEric Laurent2015-04-151-0/+22
| | | | | | | Add binder methods to IAudioPolicyService to control activity of external audio sources (e.g FM tuner). Change-Id: I2008308a6a996baeae502b68a790d87281efe2ff
* audio polciy: remove FM audio capture permission.Eric Laurent2015-04-131-2/+1
| | | | Change-Id: I2607d89b0bd87cdd2f4084dfdb55135509a824d5
* Adding explicit routing API to AudioTrackPaul McLean2015-04-081-1/+2
| | | | Change-Id: I40c048c7644c46f4e4f7103875206c0785c4b1dc
* Refactor AudioPolicyManagerJean-Michel Trivi2015-02-181-0/+664
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