summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy/AudioPolicyManager.h
Commit message (Collapse)AuthorAgeFilesLines
* Revert "audio policy: add support for ro.audio.media_deep_buffer"Vineeta Srivastava2014-10-111-2/+0
| | | | | | This reverts commit 95511add8ad4d440c67272503559f5042c4e6f1f. Change-Id: I76a8b86790b06b08d8ca0f8d374e585f964ffba8
* audio policy: add support for ro.audio.media_deep_bufferEric Laurent2014-10-101-0/+2
| | | | | Bug: 17931716. Change-Id: Ife170f20f5d02b71059fbd384bd29759fafee826
* audio policy: add hw hotword flag for inputsEric Laurent2014-09-191-4/+5
| | | | | | | | | | | | | Audio input profiles can indicate flag AUDIO_INPUT_FLAG_HW_HOTWORD meaning they allow capture from the same source as HW hotword detection. When a client requests capture with this flag, the policy will try to find an input profile matching this request first and fallback to a regular input if not found. Bug: 17575019. Change-Id: Ia463211597d7fa363527d776389f2257f0ced9a2
* audio policy: fix output stream selectionEric Laurent2014-09-081-1/+2
| | | | | | | | | Make sure that all outputs considered by selectOutput() when called from AudioPolicyManager::getOutputForDevice() support the requested audio format. Bug: 17340382. Change-Id: I76520ce60e9a8fe4d2d23125d6143bb016522754
* Merge "audio policy: remove audio patch when closing input or output" into ↵Eric Laurent2014-08-281-0/+3
|\ | | | | | | lmp-dev
| * audio policy: remove audio patch when closing input or outputEric Laurent2014-08-271-0/+3
| | | | | | | | | | | | | | | | | | Make sure that an audio patch having an output as source or input as sink is removed when this input or output is closed. Bug: 17303725. Change-Id: I234d54a25ce0b579eeeafdcfda3a0594f048768c
* | Fix memory leak in getConnectionStateMarco Nelissen2014-08-261-1/+4
|/ | | | | | | | Turns out having an sp<> point at the containing object doesn't really work so well. Bug: 17210991 Change-Id: I4bcb0c38adffc574d661f0772583357868f6c5b4
* Merge "audiopolicy: add dump for audio patches" into lmp-devJean-Michel Trivi2014-08-131-0/+2
|\
| * audiopolicy: add dump for audio patchesEric Laurent2014-08-101-0/+2
| | | | | | | | | | Bug: 10549017. Change-Id: I896c8e16c8cf7490bab75295903620a76236f571
* | Update audio ports with profile capabilitiesJean-Michel Trivi2014-08-101-1/+4
|/ | | | | | | | | When opening an output, import the profile capabilities associated with the device into the AudioPort. Bug 10549017 Change-Id: If102f5623457542d2c1407ada303c71e43d19a08
* audio policy: add support for USB devices for voice callEric Laurent2014-08-061-0/+8
| | | | | | | | | Add possibility to use sink and source devices not on the primary HW module for voice calls (e.g. USB headsets). Bug: 15520724. Change-Id: Ib27db4ba759b6d91ea1104dc2e35c87733517b30
* audio policy: support line output deviceJon Eklund2014-08-051-0/+3
| | | | Change-Id: Iddf1b6486430270d871a45c75615e54339a818e9
* Add sound trigger control by audio policyEric Laurent2014-08-051-9/+22
| | | | | | | | | | | | | | | | | 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
* Merge "Update multichannel audio policy handling" into lmp-devAndy Hung2014-07-291-4/+1
|\
| * Update multichannel audio policy handlingAndy Hung2014-07-281-4/+1
| | | | | | | | | | | | | | | | Ensure AUDIO_FORMAT_PCM_FLOAT and AUDIO_FORMAT_PCM_32_BIT have proper precedence. Allow more mixer channels than 2. Change-Id: I02af97dad6218b25cbada4d93077a213314c6725
* | audio policy: pass session ID to capture activity methodsEric Laurent2014-07-281-4/+8
| | | | | | | | | | | | | | | | Indicate the audio session ID when calling getInput(), startInput(), stopInput(), releaseInput(). Bug: 12378680. Change-Id: I763793752f93e2f4e1445a5ab217c895af011038
* | AudioFlinger: update openInput() and openOutput()Eric Laurent2014-07-281-2/+0
|/ | | | | | | | | | Add parameters to openInput() and openOutput(): device address, input source. Allow caller to specify a given I/O handle Group parameters in a struct audio_config. Bug: 12378680. Change-Id: I7e9af74c0d996561cc13cbee7d9012d2daf33025
* audio policy: compatible sample rates and channel masksGlenn Kasten2014-07-271-3/+16
| | | | Change-Id: I50d068a968aa6bd9e53e5b3111a1b09a6c2d219c
* AudioPolicyManager: handle outputs for different addressesJean-Michel Trivi2014-07-271-1/+13
| | | | | | | | | | | | | | Add the notion of device types that cause the device address to be taken into account, i.e. multiple devices of the same type but with a different address can be connected/ disconnected. AUDIO_DEVICE_OUT_REMOTE_SUBMIX is such a device type. When making those devices available / unavailable, look for all outputs with a matching address. Bug 16009464 Change-Id: I260f8248b7794c4932094e876afdf29fdea007a3
* audio policy: add audio_input_flags_t and mOpenRefCountGlenn Kasten2014-07-241-2/+5
| | | | Change-Id: I5f9c7b5ebf03b9bc94efe70d3677edfabb99c194
* audio policy: add rules to select audio parametersEric Laurent2014-07-111-4/+17
| | | | | | | | | | Added rules to select most appropriate sampling rate, format and channel mask from an input or output profile. Moved mFlags from IOProfile to its base class AudioPort. Removed bogus mChannelMask member in DeviceDescriptor class. Improveed dump of dynamic parameters in AudioPort. Change-Id: Ic09d320386002a8bafee4a28db00b1001a386678
* AudioPolicyManager: return output for audio attributesJean-Michel Trivi2014-06-181-0/+19
| | | | | | | | | | 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
* am 318cd78e: Merge "audio policy: added audio HAL version in ↵Eric Laurent2014-06-071-2/+3
|\ | | | | | | | | | | | | audio_policy.conf" into lmp-preview-dev * commit '318cd78e3b8503113919191b3711eb8be5d23d35': audio policy: added audio HAL version in audio_policy.conf
| * audio policy: added audio HAL version in audio_policy.confEric Laurent2014-06-061-2/+3
| | | | | | | | | | | | | | | | | | | | | | Each hardware module section in audio_policy.conf indicates the audio HAL version it implements. Also added a template audio_policy.conf file with examples of device and gain descriptors added for audio HAL version3.0. Bug: 14815883. Change-Id: Id219d121f81f687363f6c18f2d1684b2448dcdf4
* | Merge "Audio policy: new media volume curve for speaker with DRC"Jean-Michel Trivi2014-06-061-0/+1
|\ \ | |/ |/|
| * Audio policy: new media volume curve for speaker with DRCJean-Michel Trivi2014-06-051-0/+1
| | | | | | | | | | | | | | | | | | | | For devices with DRC on speaker (using the flag "speaker_drc_enabled" in audio_policy.conf), set the speaker media volume to use a new curve with more aggressive attenuation in the upper range. Bug 15318604 Change-Id: Ia5fb9fdd608fddad22fadfb1065d35574030bb52
* | audio policy: new setAudioPortConfig implementationEric Laurent2014-06-041-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite setAudioPortConfig() to take advantage of the new AudioPortConfig class. The configuration is now checked against AudioPort capabilities and stored in the AudioPortConfig. Fix a bug where the config mask was not set properly when calling setAudioPortConfig at the PatchPanel interface. Remove debug log in IAudioPolicyService. Bug: 14815883. Change-Id: I7eb7683a96e049581c13f2a212486507883d008d
* | audio policy: removed raw pointers.Eric Laurent2014-06-031-52/+48
|/ | | | | | | | | | | | | | | Use only RefBase objects for the following classes: - AudioOutputDescriptor - AudioInputDescriptor - HwModule - EffectDescriptor Create a common base class AudioPortConfig for: AudioOutputDescriptor, AudioInputDescriptor and DeviceDescriptor Bug: 14815883. Change-Id: I1bd193ef1020780d8b94c13142029903615aba97
* audio policy: parse device descriptors in config fileEric Laurent2014-05-291-28/+54
| | | | | | | | | | | | Implement parsing of audio_policy.conf for device and gain controller definitions. Copy audio_policy_conf.h from hardware_legacy. New syntax for devices and gain controllers description will not be parsed by legacy audio policy manager. Bug: 14815883. Change-Id: I7f1035d514dcf55fb3e45ed1f633a2f63ee398f5
* audio policy: implement routing controlEric Laurent2014-05-291-7/+57
| | | | | | | | | | | | | | | | | | | | | | 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 - audioflinger: first patch panel implementation.Eric Laurent2014-05-281-50/+96
| | | | | | | | | | | | | | | | | | | | | | | | | Added a new PatchPanel subclass to AudioFlinger to handle audio ports and audio patches configuration and connection. The first implementation does not add new functionnality. AudioPolicyManager uses patch panel interface to control device routing. AudioFlinger: - Added PatchPanel class. The first implementation does not add new functionnality. PatchPanel handles routing commands for audio HAL after 3.0 or converts to setParameters for audio HALs before 3.0. - Added config events to ThreadBase to control synchronized audio patch connection. AudioPolicyManager: - Use PatchPanel API to control device selection isntead of setParameters. - New base class AudioPort common to audio device descriptors and input output stream profiles. This class is RefBase and groups attributes common to audio ports. - Use same device selection flow for input as for outputs: getNewInputDevice -> getDeviceForInptusiource -> setInputDevice Change-Id: Idaa5a883b19a45816651c58cac697640dc717cd9
* audio policy: update from libhardware_legacyEric Laurent2014-05-061-0/+9
| | | | | | | | | | | | | Merge changes made to AudioPolicyManagerBase in libhardware_legacy since it was forked here: fd61179 Update policy handling for USB inputs c7b6e3c audio: allow compiling for 64-bit c26f454 Initial implementation of USB Audio output. a7b1bc9 Audio policy is 32-bit only 26101ad audio policy : add AUDIO_DEVICE_IN_USB_DEVICE to sDeviceNameToEnumTable Change-Id: I22bc883c20603a6598c6ee3ded636e9cc4d9ec03
* Fix the buildEric Laurent2014-03-261-1/+1
| | | | Change-Id: I2169a3d26f4e35e5cfa35a1264175aab6ac4db41
* audio policy: remove obsolete AudioPolicyManager class membersEric Laurent2014-03-261-4/+0
| | | | | | | | | | | Remove mHasA2dp, mHasUsb and mHasRemoteSubmix members from AudoPolicyManager. They are not needed any more since we use device descriptors with additional attributes. Also remove obsolete limitation on device address length (MAX_DEVICE_ADDRESS_LEN). Change-Id: Iffe760a521692a4b50be3f6b935af84afb61bb86
* audio policy: use new audio device representationEric Laurent2014-03-261-12/+54
| | | | | | | | | | | | | | | | | | | | Represent audio devices with more attributes than just the type (audio_device_t). This is in preparation for new routing APIs allowing device selection based on more criteria than just the type (address, channel mask...) A new class DeviceDescriptor is created and used by functions needing more information than just the device type. Bit fields for available and supported input or output devices are replaced by vectors of device descriptors. Each available device is allocated a unique ID for future use. Removed obsolete mA2dpDeviceAddress, mScoDeviceAddress and mUsbCardAndDevice fields replaced by address stored in DeviceDescriptor. Policy decisions like getDeviceForStrategy() are still based only on the device type. Change-Id: I5de3b3ffb12ff8dcfb746782ab1e6b15bf040d0c
* audio policy: renamed AudioPolicyManagerBase to AudioPolicyManagerEric Laurent2014-03-111-0/+582
Change-Id: Ia8b5ae9c3a9cf6ed98f162614ea331efc78e9ff2