summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy/managerdefault
Commit message (Collapse)AuthorAgeFilesLines
* audio: Remove LEGACY_ALSA_AUDIO ifdefs from AudioPolicyManager.cppArne Coucheron2016-03-171-54/+0
| | | | | | This is moved to custom policy manager in HAL sources. Change-Id: I716580f7d3399f1628c26bd3b79bd6c6a52fbbf6
* audiopolicy: Add voip flag to output flag listKarthik Reddy Katta2015-12-071-1/+2
| | | | | | | | | 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
* Merge tag 'android-6.0.1_r3' of ↵Steve Kondik2015-12-071-2/+31
|\ | | | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/av into cm-13.0 Android 6.0.1 release 3 Change-Id: I2f2a1fe1b58c828e8341556996211562d6e195ab
| * audio policy: fix transition from VoIP to voice call on USBEric Laurent2015-10-151-0/+23
| | | | | | | | | | | | | | | | | | Make sure no active capture takes place while in call and the capture device is the same as the call TX device. Bug: 23977713. Change-Id: Ia379d5e626c150ea49f0cdd581c881dbf0b8399d
| * audio policy: fix USB mic selection for VoIPEric Laurent2015-10-151-2/+8
| | | | | | | | | | | | | | | | | | When transitioning from speaker phone to normal mode and a USB headset is connected, we must force a teardown of active input as the new input device cannot be reached via current input stream. Bug: 24406915. Change-Id: I9f7c1d3f3cba285c25a6da1d54a3d15a5c1f378a
* | audio: Changes to enable BT A2DPShreyas Nagasandra Chandrasekhar2015-11-201-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | audiopolicy: Fix call recording for legacy qcom HALnadlabak2015-11-071-0/+16
| | | | | | | | Change-Id: I774f75b493c47386ca1eaf004d663432f1041a66
* | audio: Send USB connection events only for USB accessoryRamjee Singh2015-11-071-2/+2
| | | | | | | | | | | | | | | | - Send USB connected/disconnected events to Audio HAL only in case of USB AOA as these are used only in case of USB AOA Change-Id: I7db508f6eff5e8601d54f1e1bfa603358f9d6703
* | audio: Fixed Audio Source in Voice CallPavan Chikkala2015-11-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setPhoneState calls getDeviceForInputSource to check if voice_tx device is available as part of Primary Audio Module. getDeviceForInputSource always returns DEVICE_IN_COMMUNICATION for SOURCE_VOICE_COMMUNICATION on A Family and this is not added to Available devices This is leading to creation of txPatch when it is not needed Fix is to use AUDIO_SOURCE_VOICE_CALL instead of AUDIO_SOURCE_VOICE_COMMUNICATION Change-Id: I9aa7dd2139b8374ec7f06676d06ef5addea4b2a9
* | audio: Added support for USB AOA connect/disconnect eventsRamjee Singh2015-11-071-0/+16
| | | | | | | | | | | | | | | | USB AOA is supported by primary HAL on A family through customized connect/disconnect parameters.Added support for that in AudioPolicyManager Change-Id: I5212027b2711c24a9750629774f69d669a9d164f
* | Merge tag 'android-6.0.0_r26' into cm-13.0Ricardo Cerqueira2015-11-052-6/+28
|\ \ | |/ | | | | | | | | Android 6.0.0 release 26 Change-Id: I8a57007bf6efcd8b95c3cebf5e0444345bdd4cda
| * audio policy: fix preemtible capture raceEric Laurent2015-09-221-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * 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
| * 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
* | | 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-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | 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
* | | audiopolicy: make audio policy extensibleSharad Sangle2015-10-061-7/+7
|/ / | | | | | | | | | | | | | | | | | | | | 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 policy: protect capture from telephony RX path.Eric Laurent2015-08-071-0/+2
|/ | | | | | | | 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
* audio: several fixes in audio routing callbacksEric Laurent2015-07-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | - 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-092-179/+1
| | | | | | | | | | | | 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: 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
* audio policy: fix several device descriptor issues.Eric Laurent2015-06-251-3/+11
| | | | | | | | | | | | - 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
* 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 "audio policy: fix explicit routing and accessibility" into mnc-devEric Laurent2015-06-181-1/+8
|\
| * audio policy: fix explicit routing and accessibilityEric Laurent2015-06-111-1/+8
| | | | | | | | | | | | | | | | | | If a session has an active explicit routing request, this routing must also be applied to accessibility prompts if accessibility usage is currrently remapped to the strategy used by this session. Bug: 20873151. Change-Id: I97c6ece98cf1af9c64c2d2eb1fe382c7c0d657b4
* | audiopolicy: use deep buffer output by default for music streamsRavi Kumar Alamanda2015-06-111-0/+5
|/ | | | | | | | | | | | | | | | | | | | Default disabled. This is enabled by adb shell setprop audio.deep_buffer.media 1 Applications that use AudioTrack java interface for audio rendering defaults to primary output as flags indicated as FLAG_NONE. If the primary output is low latency output, it results higher power consumption than deep-buffer path if used. Make the deep buffer output as default option for music streams if flags are not specified. It may also be used for testing audio glitches from heavy CPU or DRM which may cause issues with the FastMixer. Bug: 21198655 Bug: 21785618 Change-Id: I909c296ddcf4484b9a877ef1c0230ea58537e06a
* audio policy: fix very verbose log build.Eric Laurent2015-06-081-1/+2
| | | | Change-Id: I94a69207059d8010ded14bce5d6e39c3f3074649
* Add property to control audio offload with video contentAndy Hung2015-06-011-2/+3
| | | | | | | Property audio.offload.video normally disabled (set to 1 to enable) Bug: 21198655 Change-Id: Ib1c457b1e3950f18d91b855424aa80bd23c723b0
* Merge "audio policy: add checks on primary output" into mnc-devEric Laurent2015-05-222-30/+47
|\
| * audio policy: add checks on primary outputEric Laurent2015-05-222-30/+47
| | | | | | | | | | | | | | | | | | Check if primary output has been initialized before using it. The primary output may not be initialized either due to HAL failure or on devices without telephony. Bug: 19573336. Change-Id: Id1fc3ed588268e1232b43d1e6235254d2f1a71d0
* | audio policy: fix direct output profile selectionEric Laurent2015-05-191-12/+44
|/ | | | | | | | | | | | | | | | | | Fix logic in AudioPolicyManager::getProfileForDirectOutput() to select the direct output with most matching flags and not just the first compatible one. Also fixes issue 17783395 which was fixed by commit f7bc29b02 in lmp-tv-dev branch only but in a way that caused a regression for HW A/V sync (issue 19384172). Also removed duplicated code lines in getOutputForDevice() Bug: 20819715. Bug: 17783395. Bug: 19384172. Change-Id: I7fc793b37f9b53fabd92cab6b884ef85cfdafee4
* audiopolicy: Use AUDIO_OUTPUT_FLAG_TTS for TTS streamRavi Kumar Alamanda2015-05-111-0/+3
| | | | | | | | Use AUDIO_OUTPUT_FLAG_TTS by default for TTS stream to see if the HW supports a dedicated output for the same. If not, fallback to primary output as it is done currently. Change-Id: Ifb2ef7066e75c61fe4c1b9783c12627386a00ea5
* audio policy: clarify use of mName field for audio devicesEric Laurent2015-05-061-2/+2
| | | | | | | | | | | | 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
* Merge "audio policy: session routes continued." into mnc-devEric Laurent2015-04-302-48/+162
|\
| * audio policy: session routes continued.Eric Laurent2015-04-302-48/+162
| | | | | | | | | | | | | | | | | | | | | | - 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
* | Merge "AudioSystem callback for dynamic policy mix activity" into mnc-devJean-Michel Trivi2015-04-301-2/+2
|\ \ | |/ |/|
| * AudioSystem callback for dynamic policy mix activityJean-Michel Trivi2015-04-291-2/+2
| | | | | | | | | | | | | | | | | | | | Add method to AudioPolicyServiceClient for dynamic policy mix activity notification. Propagate notification to a dedicated callback. Bug 20226914 Change-Id: I37928ed38e15ea2b8fed022cccadeca8c4d6c876
* | Explicit routing in AudioRecordPaul McLean2015-04-282-47/+127
|/ | | | Change-Id: I9cc5d54883a3e5c75d553fabb619fc8e49f4f9e5
* Merge "AudioPolicyManager: notification of dynamic policy mix activity (input)"Jean-Michel Trivi2015-04-241-0/+13
|\
| * AudioPolicyManager: notification of dynamic policy mix activity (input)Jean-Michel Trivi2015-04-211-0/+13
| | | | | | | | | | | | | | | | | | Use ref counting on start/stop inputs to notify audio policy client of mix activity changes. Bug 20226914 Change-Id: Ic4f9c91301d0bcbc0ff749acebdc3b2300309c38
* | audio policy: fix AudioTrack output device selectionEric Laurent2015-04-222-11/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | audio policy: add binder calls for audio source controlEric Laurent2015-04-152-0/+17
|/ | | | | | | Add binder methods to IAudioPolicyService to control activity of external audio sources (e.g FM tuner). Change-Id: I2008308a6a996baeae502b68a790d87281efe2ff
* Enable 8 bit and float pcm record formats for AudioPolicyManagerAndy Hung2015-04-082-31/+51
| | | | | | Add capability for handling different record channel masks. Change-Id: I63f6b029aca5cefff7adf26198a3b594a7ea2d71
* Merge "Fix AudioPolicyManager dynamic policy initialization"Jean-Michel Trivi2015-04-091-3/+3
|\
| * Fix AudioPolicyManager dynamic policy initializationJean-Michel Trivi2015-04-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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