summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy
Commit message (Collapse)AuthorAgeFilesLines
* Adding explicit routing API to AudioTrackPaul McLean2015-04-0812-11/+185
| | | | Change-Id: I40c048c7644c46f4e4f7103875206c0785c4b1dc
* AudioPolicy: remove extraneous parenthesesJean-Michel Trivi2015-04-031-1/+1
| | | | Change-Id: Ibcea37b90cc0aaacb3b6194745bf569edad8992a
* Updates to AudioPolicyManager refactorJean-Michel Trivi2015-04-015-13/+21
| | | | | | | | | | | | | | | | 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
* Split ManagerDefault into manager and engineFrançois Gaffie2015-04-0115-908/+1752
| | | | | | | | | | | 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>
* Create StreamDescriptor and associated collection within commonFrançois Gaffie2015-04-018-246/+473
| | | | | | | | | | | 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>
* Create SoundTriggerSession and associated collection within commonFrançois Gaffie2015-04-015-17/+86
| | | | | | | | | | 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>
* Add EffectDescriptor and associated collection to common elementsFrançois Gaffie2015-04-017-181/+288
| | | | | | | | | | | | 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>
* Add AudioMix and AudioMixCollection to common policy elementFrançois Gaffie2015-04-015-102/+307
| | | | | | | | | | 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>
* Migrate helper functions from managerdefault to commonFrançois Gaffie2015-04-0120-653/+977
| | | | | | | | | | | | | | | 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>
* Split ManagerDefault into Manager and ManagerDefinitionsFrançois Gaffie2015-04-0125-132/+233
| | | | | | | | | | | | 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>
* Audio Policy Refactor: reorganise headers inclusionFrançois Gaffie2015-04-0120-58/+159
| | | | | | | | | | | | 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>
* Merge "audio policy: fix IOProfile::isCompatibleProfile()"Eric Laurent2015-03-302-3/+11
|\
| * audio policy: fix IOProfile::isCompatibleProfile()Eric Laurent2015-03-302-3/+11
| | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "audio policy: fix DeviceVector::getDevicesFromType()"Eric Laurent2015-03-301-2/+6
|\ \
| * | audio policy: fix DeviceVector::getDevicesFromType()Eric Laurent2015-03-261-2/+6
| |/ | | | | | | | | | | | | | | 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
* | Make sure waitRelative is called when waitTime != INT64_MAXWally Yau2015-03-241-1/+1
|/ | | | | | | | b/19870971 (cherry picked from commit c600af1459c455583e071e653f0d998032aa423e) Change-Id: Ic6bb54067d76c96ff6fc45431dc2d72db9f0a3a8
* Merge "Remove mId from DeviceDescriptor."Rakesh Iyer2015-03-161-1/+0
|\
| * Remove mId from DeviceDescriptor.Rakesh Iyer2015-03-131-1/+0
| | | | | | | | | | | | | | | | | | | | 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
* | Fix warning while building mediaserverGlenn Kasten2015-03-091-0/+2
|/ | | | | | | | | | | | | | | | 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
* audiopolicy: Do not route VoIP call to HDMIEric Laurent2015-03-041-1/+1
| | | | | | | | | | | | | 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
* Refactor AudioPolicyManagerJean-Michel Trivi2015-02-1830-2811/+3232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Passing device name up through getDeviceDescriptor() method (when creating)Paul McLean2015-02-062-7/+8
| | | | Change-Id: Ibd85e37914333478fd038c3d2f52e214016c16b1
* Add additional info to AudioPort for enum/selection API.Paul McLean2015-02-056-54/+85
| | | | | | | | | | 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
* am 5d46bd54: am 3ae5f313: audiopolicy: send device connect notification to HALsEric Laurent2015-02-041-2/+15
|\ | | | | | | | | * commit '5d46bd54a279f24d0476b83947ce29e786b5c72c': audiopolicy: send device connect notification to HALs
| * audiopolicy: send device connect notification to HALsEric Laurent2015-02-041-2/+15
| | | | | | | | | | | | | | | | | | | | Device disconnect notifications are sent from audiopolicy to the HALs. Send connect notifications as well. Bug: 19249796. Bug: 17785277. Change-Id: Ia823ed154d6a0c7ceb84b0a94f0c3b78392faaf6
* | am 14a849c2: am 1bf8a210: Merge "audio policy: add fallback for output ↵Eric Laurent2015-01-301-0/+4
|\ \ | |/ | | | | | | | | | | selection" into lmp-mr1-dev * commit '14a849c267bdcf564c30f9f2ebf0d619b36f500a': audio policy: add fallback for output selection
| * Merge "audio policy: add fallback for output selection" into lmp-mr1-devEric Laurent2015-01-301-0/+4
| |\
| | * audio policy: add fallback for output selectionEric Laurent2015-01-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | am 6f4428de: am d99c6855: Merge "audio policy: match attached device to ↵Eric Laurent2015-01-302-28/+46
|\ \ \ | |/ / | | | | | | | | | | | | | | | declared devices" into lmp-mr1-dev * commit '6f4428de2b4ab10393bbac2441586ac514c8cf53': audio policy: match attached device to declared devices
| * | Merge "audio policy: match attached device to declared devices" into lmp-mr1-devEric Laurent2015-01-302-28/+46
| |\ \
| | * | audio policy: match attached device to declared devicesEric Laurent2015-01-292-28/+46
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | am f1121d96: am 0d84ba3f: Merge "Fix FLAG_BEACON regression" into lmp-mr1-devJean-Michel Trivi2015-01-291-0/+3
|\ \ \ | |/ / | | | | | | | | | * commit 'f1121d963b51c798ab28c85eeff1eedc9bb2c186': Fix FLAG_BEACON regression
| * | Merge "Fix FLAG_BEACON regression" into lmp-mr1-devJean-Michel Trivi2015-01-291-0/+3
| |\ \ | | |/ | |/|
| | * Fix FLAG_BEACON regressionJean-Michel Trivi2015-01-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | am 8c403b22: am c84bc78d: Merge "Audio policy: fix device gain ↵Eric Laurent2015-01-292-5/+15
|\ \ \ | |/ / | | | | | | | | | | | | | | | initialization" into lmp-mr1-dev * commit '8c403b2265fdef64ac4ba903e6261edd22d81909': Audio policy: fix device gain initialization
| * | Audio policy: fix device gain initializationEric Laurent2015-01-272-5/+15
| |/ | | | | | | | | | | | | | | | | | | | | 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
* | am bf2751a5: am 7ccc6b9b: Merge "fix audio patch leak." into lmp-mr1-devEric Laurent2015-01-201-2/+4
|\ \ | |/ | | | | | | * commit 'bf2751a5ea6a306c2ba51a0658ec10aa889a81fa': fix audio patch leak.
| * Merge "fix audio patch leak." into lmp-mr1-devEric Laurent2015-01-201-2/+4
| |\
| | * fix audio patch leak.Eric Laurent2015-01-151-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | am 65cb339d: am 21291a42: Merge "fix leak in audio policy effect config ↵Eric Laurent2015-01-151-0/+4
|\ \ \ | |/ / | | | | | | | | | | | | | | | parser" into lmp-mr1-dev * commit '65cb339de0f628c82bdd5c68d868b6f3dc83cf04': fix leak in audio policy effect config parser
| * | Merge "fix leak in audio policy effect config parser" into lmp-mr1-devEric Laurent2015-01-151-0/+4
| |\ \
| | * | fix leak in audio policy effect config parserEric Laurent2015-01-151-0/+4
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | Free temporary effect descriptors created in loadAudioEffectConfig(). Bug 19021726. Change-Id: Icd44216e25df3fe683a01763d7e8a7b84f367a1a
* | | am eed5e4bd: am 5b578bec: Merge " [FM]There is no sound output from BT ↵Leo Wang2015-01-151-4/+4
|\ \ \ | |/ / | | | | | | | | | | | | | | | 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
| * | [FM]There is no sound output from BT earphone while BT earphone is connectedHochi Huang2015-01-131-4/+4
| |/ | | | | | | | | | | | | | | | | | | 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
* | am 78c02ddb: am cfa5bf04: Merge "make libserviceutility a shared lib" into ↵Chong Zhang2015-01-071-3/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Merge "make libserviceutility a shared lib" into lmp-mr1-devChong Zhang2015-01-071-3/+3
| |\
| | * make libserviceutility a shared libChong Zhang2015-01-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | so that we have only one getpid_cached in mediaserver process bug: 18919657 Change-Id: Iff3cd932c9110e874b3885f79705f49bf3e3f1fc
* | | am fb5d35c0: am 7ae3dfab: Merge "fix record from default input source" into ↵Eric Laurent2015-01-072-13/+26
|\ \ \ | |/ / | | | | | | | | | | | | | | | lmp-mr1-dev * commit 'fb5d35c00d1c4d672d245b6820551808617eba46': fix record from default input source
| * | fix record from default input sourceEric Laurent2015-01-062-13/+26
| |/ | | | | | | | | | | | | | | | | 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
* | am 01310cd7: am 3190e67d: close remote submix\'s output when device is not ↵keunyoung2015-01-052-23/+10
|\ \ | |/ | | | | | | | | | | available. * commit '01310cd7adad778f8a6d0e4bc73dae068638abf2': close remote submix's output when device is not available.