summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'android-6.0.0_r26' into cm-13.0Ricardo Cerqueira2015-11-057-19/+85
|\ | | | | | | | | | | Android 6.0.0 release 26 Change-Id: I8a57007bf6efcd8b95c3cebf5e0444345bdd4cda
| * Merge "audio policy: fix preemtible capture race" into mnc-dr-devEric Laurent2015-09-243-3/+41
| |\
| | * audio policy: fix preemtible capture raceEric Laurent2015-09-223-3/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | AudioPolicyService: fix race in AudioCommandThreadEric Laurent2015-09-231-8/+16
| |/ | | | | | | | | | | | | | | | | | | | | Fixe race condition in AudioCommandThread::threadLoop() where a command can be inserted in first position in the queue after the sleep time has been calculated causing a longer delay than expected. Also fix a failure to hold a wake lock while commands are still in the queue. Bug: 22707905. Change-Id: I813626986677bf00106acb37ee20d3dd75d5cf33
| * 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
| * AudioPolicy: don't always change ACCESSIBILITY volumeJean-Michel Trivi2015-09-141-1/+3
| | | | | | | | | | | | | | | | | | Only change the volume for AUDIO_STREAM_ACCESSIBILITY when changing the media volume. Bug 23366575 Change-Id: Ic42c726ec4d47615c20500c20e4d43cef159b3c6
| * Force fixed volume for TTS streamEric Laurent2015-09-111-4/+4
| | | | | | | | | | | | | | | | Always play Transmitted Through Speaker stream at max volume instead of tracking media stream volume. Bug: 23729461. Change-Id: I61021f59617bb851a4cd7da80924e587029e96a3
| * Merge "audio policy: refine TTS stream mute management" into mnc-dr-devEric Laurent2015-08-132-2/+16
| |\
| | * audio policy: refine TTS stream mute managementEric Laurent2015-08-122-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | Do not mute the TTS stream if a dedicated output for TTS is available. Bug: 22100304. Change-Id: Ic126100ce1144f765bc0ae42c8ea87fa47cfb822
* | | 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
* | | Stagefright: Add Checks for allocationsSathishKumar Mani2015-10-062-0/+4
| | | | | | | | | | | | | | | | | | | | | Warn allocation failures explicitly rather than crash trying to access unallocated memory Change-Id: Ie86c3ac130917e1f4030eb8207ac8350cba7711d
* | | Direct_PCM: add support for effectsvivek mehta2015-10-061-0/+7
| | | | | | | | | | | | | | | | | | - add support for effects on direct pcm output Change-Id: I2fbac63c623bf51a03e5e91828369739d33329f3
* | | audiopolicy: fix for voice call to work on USB headset during concurrencyKarthik Reddy Katta2015-10-061-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an input stream is active on USB headset and if a voice call is received, the proxy_open() for voice call fails and the screen freezes. All active inputs must be closed before opening input stream for voice call and also all new requests to open input stream must be blocked. Change-Id: I3fb0d482a77495ff6fe9fcdc8a1f8915ade52c9a CRs-fixed: 876993
* | | audiopolicy: port existing fixes to AudioPolicyManagerSatya Krishna Pindiproli2015-10-064-9/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a squashed commit of the following fixes in AudioPolicyManager. Only some parts of the fixes have been ported as the custom audio policy has the other required changes. audiopolicy: Fix MT call delay Change-Id: I790479eaad9d2d6fd4204cc4cb7698761c30f7cf audiopolicy: support extended feature in audiopolicymanager Change-Id: I1925339b591cd29f11a71c287a2e53c0627e9e62 audiopolicy: additional change for extended feature Change-Id: I9bad6a294ddd7aee72f6f6a314666b892b730c8e Change-Id: I7738d4b0ac11ee6d93bfd67e2553eae8518ff719
* | | audio: add support to enable Direct PCM outputvivek mehta2015-10-061-0/+1
| | | | | | | | | | | | | | | | | | allow effects in case outout is direct pcm Change-Id: I2ad7eacf11642a4ca9f892b61124293d0dc503a9
* | | audiopolicy: do not update channelMask for voice input sourceKarthik Reddy Katta2015-10-061-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not needed to update the channel mask based on source because the source is sent to audio HAL through set_parameters() and if source equal to VOICE_CALL does not mean that two channels need to capture. If recorder app selects AMR as encoding format but source as RX+TX means both RX and TX are captured in ONE channel. So use channels set by the app and use source for the type of capture (RX only, TX only, or RX+TX). Change-Id: Iedf23318356480ba939fc06df4ae4f12906322b3
* | | 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-062-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 policy: protect capture from telephony RX path.Eric Laurent2015-08-073-0/+5
|/ | | | | | | | Add permission check if the capture device selected is telephony RX path. Bug: 23017158. Change-Id: Iaa34d836e6cf46b7cbbf2483fcd4306dcd27ce90
* audio policy: populate attributes for attached capture devicesEric Laurent2015-08-061-2/+6
| | | | | | | | | | Populate supported sampling rates, channel masks and formats when enumerating attached build in capture devices. Having this information for build-in mic is important for some applications. Bug: 22729461. Change-Id: I93f03296447a87c10f2615fa1b1c45e9879b4aa7
* Prevent notifications from muting accessibility promptsJean-Michel Trivi2015-07-211-6/+6
| | | | | | | | | | | | | | | When evaluating on which device a sound is to be played, the policy must consider which current routing strategy, if any, has priority for overriding the choice. Here the playback of notifications, when duplicated over speaker and headphones, was causing the accessibility prompt to be muted because the it was of a higher priority, and incompatible with the accessibility routing. The fix consists in assigning a higher priority to the accessbility routing strategy over the notification routing strategy. Bug 18834451 Change-Id: I8228b30a7d80bd61d1c223afb030d9421d4f33cf
* Update Policy PFW plugin makefile for PFW release 2.6.0François Gaffie2015-07-151-6/+1
| | | | | | | | | | | This patch updates the Policy PFW plugin with latest change within PFW. It makes use of the dynamic xmlserializer library and does not need anymore to link against xmlserializer library dependencies. Change-Id: Ic7b912929a69d3906a34999c1ae25ddb9ac800e5 Signed-off-by: François Gaffie <francois.gaffie@intel.com> Bug 246391
* audio: several fixes in audio routing callbacksEric Laurent2015-07-102-4/+10
| | | | | | | | | | | | | | | | | | | | | | - 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-095-179/+244
| | | | | | | | | | | | 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-072-4/+12
| | | | | | | | | | 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 policy: fix regression in incall notification management" into ↵Eric Laurent2015-07-061-2/+5
|\ | | | | | | mnc-dev
| * audio policy: fix regression in incall notification managementEric Laurent2015-07-021-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | Commit 2110e04c introduced a regression preventing ongoing alarms to be restored when exiting a call and leaving the replacement tone playing for ever. Also add missing management of accessibility prompts when entering a call. Bug: 21857005. Change-Id: I4295c791c003db42c0fba9f618e51f60438158d1
* | 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
* | Fix build warningGlenn Kasten2015-07-061-0/+1
| | | | | | | | Change-Id: I876edc37fb2093ee13c876c2af5c46512763154d
* | 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
* Merge "reduce number of binder calls from mediaserver" into mnc-devEric Laurent2015-06-272-3/+25
|\
| * reduce number of binder calls from mediaserverEric Laurent2015-06-262-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce the number of audio port, audio patch and IO config changed binder calls from mediaserver to client processes: - Do not call IO config changed callback if selected device is the same as previously selected one on a given audio flinger playback or capture thread. - Do not call the audio port or audo patch list update callback on a client if this client as no listener registered. Bug: 22045560. Change-Id: If780e105404de79b7cb5c80c27b793ceb6b1c423
* | audio policy: fix several device descriptor issues.Eric Laurent2015-06-255-20/+20
|/ | | | | | | | | | | | - 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
* Merge "Fixing no rates, chans & encodings on input devices for device enum ↵Paul McLean2015-06-192-7/+20
|\ | | | | | | API. Filtering digital attributes for non-digital audio devices." into mnc-dev
| * Fixing no rates, chans & encodings on input devices for device enum API.Paul McLean2015-06-192-7/+20
| | | | | | | | | | | | | | | | | | Filtering digital attributes for non-digital audio devices. Bug: 21876072 21903975 Change-Id: Ia5c81a8160f4b4ebf5941dd0c5dfb68d01699ca6
* | Merge "Bug fix on Engine Configurable" into mnc-devEric Laurent2015-06-184-109/+38
|\ \
| * | Bug fix on Engine ConfigurableFrançois Gaffie2015-06-184-109/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a couple of issue within audio policy engine configurable -valgrind error detected within the parsing of the configuration file -configuration file typos -start of the PFW delayed to the init in order to wait the full construction of the engine object -wrong specialization of template functions. -broadcast volume min / max init to stream collection of manager & PFW Change-Id: I08823ab4040c92b719747c60cc3fa5c8b5f172ac Signed-off-by: François Gaffie <francois.gaffie@intel.com>
* | | Merge "Add a configurable version of the policy engine based on PFW" into ↵Eric Laurent2015-06-1863-2/+20495
|\ \ \ | |/ / | | | | | | mnc-dev
| * | Add a configurable version of the policy engine based on PFWFrançois Gaffie2015-06-1863-2/+20495
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a configurable version of the policy engine based on the parameter framework. This configurable engine shall be activated with a flag USE_CONFIGURABLE_AUDIO_POLICY within BoardConfig.mk This patch provides the generic configuration as an example. This configuration provides the same user experience as the default policy engine. - Fix M Issue on configurable policy engine version. - Remove the "empty static lib include trick" hack The code was using a hack to import headers only through an empty lib. This trick was used not only by the PFW and its plugin but also internally with policy. This patch removes this hack and either links againts the real libraries if exist or point on the path of the header. However, since header directories are not recursively detected on Andoid, we need to manually add all necessary libraries. (for example libicuuc needed by libxml2) - let the build system decide which compiler and which stl is to be used - Disable by default Audio Policy Settings XML file generation at compilation time In order not to depend on python tool for the configurable policy example, this patch adds the generated Settings XML file and disables the generation from .pfw files at compile time. If the user wishes to regenerate it, he may use the pfw_rebuild_settings option. - Fix Clang issues within Configurable Audio Policy Fix compilation issues revealed when switching to CLANG compiler within the configurable version of policy engine. Change-Id: I3edc26db94c0bf8a76430ab8081bae52e9193705 Signed-off-by: François Gaffie <francois.gaffie@intel.com>
* | Merge "audiopolicy: Add AUDIO_OUTPUT_FLAG_TTS to flags enum table" into mnc-devEric Laurent2015-06-181-0/+1
|\ \ | |/ |/|
| * 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