summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy/AudioPolicyInterfaceImpl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* audio policy: fix lockup during mediaserver restartEric Laurent2014-10-071-37/+62
| | | | | | | | | | | | | | | 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
* audio: fix stream type for accessibility usageEric Laurent2014-09-251-0/+7
| | | | | | | | | 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
* Add sound trigger control by audio policyEric Laurent2014-08-051-0/+20
| | | | | | | | | | | | | | | | | 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
* audio policy: pass session ID to capture activity methodsEric Laurent2014-07-281-8/+11
| | | | | | | | Indicate the audio session ID when calling getInput(), startInput(), stopInput(), releaseInput(). Bug: 12378680. Change-Id: I763793752f93e2f4e1445a5ab217c895af011038
* audio policy: add audio_input_flags_t and mOpenRefCountGlenn Kasten2014-07-241-2/+3
| | | | Change-Id: I5f9c7b5ebf03b9bc94efe70d3677edfabb99c194
* Remove execute bitGlenn Kasten2014-07-211-0/+0
| | | | Change-Id: I1cf0c0d9375779b3074af12f4cbf9c1ec07bf4ff
* Add audio_input_flags_t to IAudioPolicyService::getInputGlenn Kasten2014-07-171-1/+2
| | | | Change-Id: I9f37be05f8dc7b85a8827a94e76ca0f45453e170
* frameworks: av: services: audiopolicy: Added AudioPolicyEffectsbryant_liu2014-07-011-63/+24
| | | | | | Manage pre- and postprocessing effects defined in audio_effects.conf Change-Id: Idea1478e3d434f8ff66907adb3c77663db78d583
* AudioPolicyManager: return output for audio attributesJean-Michel Trivi2014-06-181-0/+16
| | | | | | | | | | 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
* audio policy: add permission for routing APIs.Eric Laurent2014-06-021-0/+18
| | | | | | | | | Add check for signature or system permission "android.permission.MODIFY_AUDIO_ROUTING" for routing APIs. Bug: 14815883. Change-Id: Iefa0b9d90127a53e03a2e6d50dc93d8f4ae63e2f
* audio policy: implement routing controlEric Laurent2014-05-291-19/+48
| | | | | | | | | | | | | | | | | | | | | | 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
* DO NOT MERGE - IAudioPolicyService interface extension for patch panelEric Laurent2014-05-281-0/+38
| | | | Change-Id: I0a62e5416edc41c3a0e816275085ab18a23066f1
* audio policy: add option to use new policy managerEric Laurent2014-03-181-81/+59
| | | | | | | | | | | | | | | | | 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
* audio policy: split implementationEric Laurent2014-03-111-0/+489
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