summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy/common
Commit message (Collapse)AuthorAgeFilesLines
* audiopolicy: Set sane defaults for QC audio featuresSteve Kondik2015-12-161-1/+1
| | | | Change-Id: If91536d2be0165c90effccdfa2b92722223eb905
* stagefright: Additional fixes for extended offload supportSteve Kondik2015-12-141-2/+0
| | | | | | | | | | | * Fix compilation with debug enabled * Allow FLAC offload to be enabled independent of QCOM_HARDWARE, tested with the Nexus 5X and is working! * Disable the FLACExtractor if offload is enabled since it can only output decoded PCM. This will force FFMPEG to be used, which does everything we need for FLAC offload Change-Id: I7d71c153a6a6ea7df8e32bc73f5cbe9f51cdcf64
* audiopolicy: Add voip flag to output flag listKarthik Reddy Katta2015-12-071-0/+1
| | | | | | | | | Direct output is not selected for voip usecases as AUDIO_OUTPUT_FLAG_VOIP_RX is not added to sOutputFlagNameToEnumTable. Add this flag to output flags list. Change-Id: Ifccb78a7b8579da0a65eb3ea7347756c664246a8
* audio: Changes to enable BT A2DPShreyas Nagasandra Chandrasekhar2015-11-201-0/+4
| | | | | | | | | | | | For Proxy thread to be started , a2dp state has to updated from the audiopolicy. Now , added changes to send the BT A2DP status to audio HAL. - A- Family doesn't support separate output for a2dp , removed the getA2dpOutput(). getDeviceForStrategy() is selecting the proper device using mA2dpSuspended flag. CRs-Fixed: 751090 Change-Id: I599de562a8674ee611e10575fcc85e4715707a63
* Merge branch 'LA.BF64.1.2.2_rb4.7' of ↵Steve Kondik2015-11-162-0/+8
|\ | | | | | | | | | | git://codeaurora.org/platform/frameworks/av into cm-13.0 Change-Id: Ia41df61c3ccfeb809572b63a4b1a8ca6bd85dfb2
| * audiopolicy: Add synchronization to EffectDescriptorCollectionHaynes Mathew George2015-11-092-0/+8
| | | | | | | | | | | | | | Synchronize public APIs of EffectDescriptorCollection CRs-Fixed: 920103 Change-Id: I04ccac526c6f99e61e43288776653d6b7ff325c4
* | audiopolicy: Fix call recording for legacy qcom HALnadlabak2015-11-071-0/+5
| | | | | | | | Change-Id: I774f75b493c47386ca1eaf004d663432f1041a66
* | audiopolicy: Update DeviceNametoEnumTablePavan Chikkala2015-11-071-0/+3
| | | | | | | | | | | | | | Added entry for DEVICE_IN_COMMUNICATION to support VOIP usecase. Change-Id: Ie7e5131b776d7b93c53ca0796dffa11316091805
* | audio: Change the default init value for StreamDescriptorRalph Nathan2015-11-071-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge tag 'android-6.0.0_r26' into cm-13.0Ricardo Cerqueira2015-11-052-0/+32
|\ \ | |/ |/| | | | | | | Android 6.0.0 release 26 Change-Id: I8a57007bf6efcd8b95c3cebf5e0444345bdd4cda
| * audio policy: fix preemtible capture raceEric Laurent2015-09-222-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | audio policy: move output handle to AudioOutputDescriptor base classDhananjay Kumar2015-10-202-3/+3
| | | | | | | | | | | | | | | | | | | | Output handle of AudioOutputDescriptor is required by derived implementation of some AudioPolicyManager methods. These methods need to access attributes of an output which is not accessible through AudioOutputDescriptor base class unless output handle is made available here. Change-Id: I96ef9fd1c5a94874acb897245501ba2f9c9ab0c0
* | stagefright: Add support for custom size i/p buffervivek mehta2015-10-062-0/+15
| | | | | | | | | | | | | | - handle non default input buffer size - fix issues associated with non-default buffer size Change-Id: Iad31f5c85601983b01e18e130b1c3eecb3988e30
* | audio: add support to enable Direct PCM outputvivek mehta2015-10-061-0/+1
| | | | | | | | | | | | allow effects in case outout is direct pcm Change-Id: I2ad7eacf11642a4ca9f892b61124293d0dc503a9
* | audio: add support for 5.1 channel recordingMingming Yin2015-10-061-0/+1
| | | | | | | | | | | | - Add support for 5.1 channel recording Change-Id: If060fffb2e198f516f40e85390489de2108be5d1
* | audiopolicy: fix to play 6.1 channel ALAC clipsSharad Sangle2015-10-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | For 6.1 channel ALAC clips, the compress offload profile is not found even though the channel mask is defined in the audio_policy.conf file. This is because the channel mask enum is not defined and hence the profile's channel masks are not getting enumerated properly. This change is needed for 6.1 channel ALAC clips playback. Change-Id: I6b820776c0dc6e68a402886f0931439edab24a8b
* | audio: add support for APE decoding.Sharad Sangle2015-10-062-0/+6
| | | | | | | | | | | | add support for APE decoding Change-Id: I55e8f4b3b87f4bdf1c99774d702506eb7c2f05b5
* | audio: add support for ALAC decoding.Sharad Sangle2015-10-062-0/+6
| | | | | | | | | | | | | | add support for decoding/offloading ALAC audio formats Change-Id: Id66f0cb6c140113741962e119148bf434de3d064
* | audio: add support for WMA offloadSharad Sangle2015-10-062-0/+8
| | | | | | | | | | | | Added WMA as a valid audio format in audio policy Change-Id: Iace14a011ebb89b9deeebd7fe04d0f9b1ab27c9e
* | audiopolicy: Add PCM offload formatsPreetam Singh Ranawat2015-10-061-0/+2
| | | | | | | | | | | | -add 16 and 24 bit PCM offload formats Change-Id: I23de9b6663be15971c62cba75e2476a503ef4e52
* | audiopolicy: make audio policy extensibleSharad Sangle2015-10-061-1/+4
| | | | | | | | | | | | | | | | | | | | | | make function virtual or protected so that they can be extended in custom audio policy also add flag in Android.mk so that proxy device get added in device list when proxy is enabled Change-Id: Ida7992f6b327491fab1f4ea376e85e8eb34b89ca
* | audio: add support for offload FLACSharad Sangle2015-10-062-0/+8
| | | | | | | | | | | | | | Add support for FLAC playback in compressed offload mode Change-Id: I617b41b867277272212d6cf1a6f82f646c5b1032
* | audiopolicy: Add audio proxy device in audio policyYamit Mehta2015-10-061-0/+3
|/ | | | | | Add audio policy for WFD and visualiser usecase. Change-Id: Idf3856a373eb7a05362f19d6cb117e9d4fb757ef
* audio: several fixes in audio routing callbacksEric Laurent2015-07-101-3/+7
| | | | | | | | | | | | | | | | | | | | | | - 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
* audio policy: session route: move SessionRoute to commonFrançois Gaffie2015-07-093-0/+243
| | | | | | | | | | | | 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>
* audio policy: add support for device combo with speaker safeEric Laurent2015-07-071-0/+2
| | | | | | | | | | combo devices with AUDIO_DEVICE_OUT_SPEAKER_SAFE were not supported by audio policy manager causing selection of speaker+headphone when spekaer_safe+headphone would be the right selection. Bug: 21537010. Change-Id: I9865352559c9d32c6754ad3d2b84bddfe2dc8aac
* Merge "audio: add definitions for devices connected over IP" into mnc-devEric Laurent2015-07-061-0/+4
|\
| * audio: add definitions for devices connected over IPEric Laurent2015-07-061-0/+4
| | | | | | | | | | Bug: 22068684. Change-Id: Idde0eaf7121d2e43f32eee3e6b10e99d8cff4912
* | audiopolicy: Update flag enum tables for the new flagsRavi Kumar Alamanda2015-07-021-0/+4
|/ | | | | | | | | | Without an entry in sOutputFlagNameToEnumTable or sInputFlagNameToEnumTable, a profile with specific output/input flag in the audio_policy.conf will not be detected by AudioPolicyManager. Bug: 19230391 Change-Id: I94bb3594e2eb8b57747b474a253da3551263c59a
* audio policy: fix several device descriptor issues.Eric Laurent2015-06-254-17/+9
| | | | | | | | | | | | - 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
* audiopolicy: Add AUDIO_OUTPUT_FLAG_TTS to flags enum tableRavi Kumar Alamanda2015-06-181-0/+1
| | | | | | | | Without an entry in sOutputFlagNameToEnumTable, a profile with specific output flag in the audio_policy.conf will not be detected by AudioPolicyManager. Change-Id: Id242e6819aab1a67d72c564f3cc39af3de8e1ef7
* Merge "Update sampling rate to 192kHz for devices" into mnc-devAndy Hung2015-05-122-1/+5
|\
| * Update sampling rate to 192kHz for devicesAndy Hung2015-05-122-1/+5
| | | | | | | | Change-Id: I0a83206be51d7ae18ccf85b94b2127356307be69
* | Merge "Support channel index masks for output hal" into mnc-devAndy Hung2015-05-121-0/+6
|\ \ | |/
| * Support channel index masks for output halAndy Hung2015-05-061-0/+6
| | | | | | | | Change-Id: Ib3e61ff6faf91c71b85102b5d77f90f124c08220
* | Merge "audio policy: clarify use of mName field for audio devices" into mnc-devEric Laurent2015-05-074-35/+31
|\ \
| * | audio policy: clarify use of mName field for audio devicesEric Laurent2015-05-064-35/+31
| |/ | | | | | | | | | | | | | | | | | | | | | | 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
* | Make header functions "inline" to avoid warning when unused.Chih-Hung Hsieh2015-05-061-2/+2
|/ | | | | Change-Id: Iefac44f3c0e1c3fd4b19833d9692744100f92e00 (cherry picked from commit 5e9febef197a9852c833a0aedc6bfee179c4ae9e)
* Merge "audio policy: session routes continued." into mnc-devEric Laurent2015-04-301-2/+2
|\
| * audio policy: session routes continued.Eric Laurent2015-04-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | - 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
* | AudioSystem callback for dynamic policy mix activityJean-Michel Trivi2015-04-291-2/+4
|/ | | | | | | | | | Add method to AudioPolicyServiceClient for dynamic policy mix activity notification. Propagate notification to a dedicated callback. Bug 20226914 Change-Id: I37928ed38e15ea2b8fed022cccadeca8c4d6c876
* Fix format sorting order in AudioPortAndy Hung2015-04-232-12/+22
| | | | | | | Otherwise AUDIO_FORMAT_DEFAULT (used for dynamic formats) is no longer the first entry. Change-Id: I23869a9ca2ed138759d722e7c9838497f640921a
* Add channel index record to AudioPolicyManagerAndy Hung2015-04-222-12/+87
| | | | Change-Id: Ic534bee084108a68c7818600df6e1c9dc9258a0d
* audio policy: fix AudioTrack output device selectionEric Laurent2015-04-221-0/+3
| | | | | | | | | | | | | | 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
* Merge "AudioPolicyManager: notification of dynamic policy mix activity"Jean-Michel Trivi2015-04-152-1/+23
|\
| * AudioPolicyManager: notification of dynamic policy mix activityJean-Michel Trivi2015-04-142-1/+23
| | | | | | | | | | | | | | | | | | | | 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
* | Enable 8 bit and float pcm record formats for AudioPolicyManagerAndy Hung2015-04-084-17/+79
|/ | | | | | Add capability for handling different record channel masks. Change-Id: I63f6b029aca5cefff7adf26198a3b594a7ea2d71
* Merge "Fix AudioPolicyManager dynamic policy initialization"Jean-Michel Trivi2015-04-092-28/+28
|\
| * Fix AudioPolicyManager dynamic policy initializationJean-Michel Trivi2015-04-082-28/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | audio policy: volume in dBsEric Laurent2015-04-083-4/+26
| | | | | | | | | | | | | | | | | | | | 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