summaryrefslogtreecommitdiffstats
path: root/services
Commit message (Collapse)AuthorAgeFilesLines
* AudioRecord: use audio attributes instead of audio source.Eric Laurent2014-11-256-94/+99
| | | | | | | | | | | | | | | | Added AudioRecord constructor with audio attributes. Replaced AudioPolicymanager::getInput() by getInputForAttr(). No new functionality for now. Also: - Fixed warnings in AudioPolicyManager - Allocate audio session ID before calling getOutputForAttr() in AudioTrack. Bug: 16006090. Change-Id: I15df21e4411db688e3096dd801cf579d76d81711
* Merge "audio policy: do not route accessibility prompts to compressed ↵Eric Laurent2014-11-261-0/+15
|\ | | | | | | output" into lmp-mr1-dev
| * audio policy: do not route accessibility prompts to compressed outputEric Laurent2014-11-251-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | When a digital output (HDMI or S/PDIF) is configured with a non linear PCM audio format it is likely that the audio HAL or HW will not be able to mix other sounds with the main media stream being played. In this case, do not condider HDMI or S/PDIF as a valid route for accessibilty strategy so that accessibility prompts are always audible. Bug: 18067208. Change-Id: If20603a1dc1dc470f206f841308bed2b87daf21c
* | Merge "audio policy: new getOutputForAttr() prototype." into lmp-mr1-devEric Laurent2014-11-269-97/+222
|\ \ | |/
| * audio policy: new getOutputForAttr() prototype.Eric Laurent2014-11-259-97/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update getOutputForAttr() prototype and group all logic dealing with audio attributes to stream type conversion in audio policy manager. getOutputForAttr(): - specifies the audio session (for future use) - returns a status code - receives either stream type (for legacy) or audio attributes - returns an updated streamtype Remove logic dealing with legacy stream types to attributes conversion from AudioTrack. Use correct type for audio sessions in other APIs (startOutput() ...). releaseOutput() specifies the audio session (for future use). Bug: 18067208. Change-Id: I1bfbe9626c04c7955d77f8a70aecfad2cb204817
* | Merge "camera: fix frame deletion logic in mInFlightMap" into lmp-mr1-devZhijun He2014-11-251-2/+6
|\ \ | |/ |/|
| * camera: fix frame deletion logic in mInFlightMapRuchit Sharma2014-11-251-2/+6
| | | | | | | | | | | | | | | | | | | | | | For per-frame error notifications, camera3.h requirements state that all the buffer handles for a failed frame capture must be returned via process_capture_result() call(s). Hence, Camera3Device needs to ensure that the frame entry is not deleted from mInFlightMap until all buffers for that frame have been returned by HAL. Bug: 17757940 Change-Id: I2579ca7980d2fd67d53abc530e2706538f7d3d3a
* | fix the build.Eric Laurent2014-11-251-8/+1
| | | | | | | | Change-Id: Iab6b65327ae1adbf0b3a6da5a23b8107468f533e
* | audio: new routing strategies and stream typesEric Laurent2014-11-2111-53/+170
|/ | | | | | | | | | | | | Added new routing strategies and stream type for internal use by audio policy manager and audio flinger: - One for accessibility to allow different routing than media - One for re-routing (remote submix) in preparation of dynamic policies - Added stream type for "internal" audio flinger tracks used for audio patches and duplication. Bug: 18067208. Change-Id: I88f884b552e51e4a49c29125e5a1204cf58ff434
* Merge "Camera2: Fix CameraParameters parse segfault." into lmp-mr1-devRuben Brunk2014-11-211-0/+1
|\
| * Camera2: Fix CameraParameters parse segfault.Ruben Brunk2014-11-201-0/+1
| | | | | | | | | | Bug: 18331142 Change-Id: I41feec93f753f97b3e6bf963deb4a42b73406421
* | Merge "SoundTrigger: allow sound model reloading" into lmp-mr1-devEric Laurent2014-11-202-0/+19
|\ \
| * | SoundTrigger: allow sound model reloadingEric Laurent2014-11-202-0/+19
| | | | | | | | | | | | | | | | | | | | | Allow reloading a sound model without unloading it before. Bug: 18308781. Change-Id: I31c83b81a03ee1c1e80f4339ca62e6d06fb1a33b
* | | Fix format conversion in DuplicatingThreadHaynes Mathew George2014-11-201-8/+8
|/ / | | | | | | | | | | | | | | | | DuplicatingThread converts PCM data from the format of the source thread to PCM_16BIT before writing to all connected output tracks. This needs to be done just once before writing to all tracks. Bug: 18461844 Change-Id: If05254f87f9198e09a0fa3c4e857afbb53ae7073
* | AudioSystem: fix cross deadlockEric Laurent2014-11-202-8/+11
|/ | | | | | | | | | | | | | | | | | | | Do not hold gLockAPS when calling AudioPolicyService::registerClient() in get_audio_policy_service(). registerClient() will need to acquire the AudioPolicyService mutex and if at the same time a method called from AudioPolicyService (with mutex held) calls back into AudioSystem and get_audio_policy_service() a cross deadlock occurs. Same preventive fix for get_audio_flinger(). Use a separate mutex for notification client list in AudioPolicyService. This prevents deadlocking if registerClient() is called as a consequence of AudioFlinger calling back into AudioPolicyManager while executing a method with AudioPolicyService locked Bug: 18403952. Bug: 18450065. Change-Id: Ia832e41aede8bc6c843fc615508fbdd74e0863b5
* Merge "Camera2Client: remove recording stream if necessary" into lmp-mr1-devYin-Chia Yeh2014-11-193-7/+56
|\
| * Camera2Client: remove recording stream if necessaryYin-Chia Yeh2014-11-183-7/+56
| | | | | | | | | | Bug: 17495165 Change-Id: I11b763fde8f9448f4bddec3fe6c81581e7699edb
* | Merge "audio policy: do not prevent routing to A2DP when suspended." into ↵Eric Laurent2014-11-181-4/+12
|\ \ | | | | | | | | | lmp-mr1-dev
| * | audio policy: do not prevent routing to A2DP when suspended.Eric Laurent2014-11-171-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow A2DP sink selection even if A2DP is suspended. It is not because use of A2DP is temporarily disabled by SCO selection that the policy rule routing a given use case to A2DP should be altered. The source will be routed to A2DP but it will remain silent until suspend condition is cleared which is the purpose of suspend mode. Also make sure that accessibility prompts are audible while in call by forcing stream type to STREAM_VOICE_CALL. Fix inconsistent logic between AudioTrack::setStreamTypeFromAttributes() and AudioPolicyManager::getStrategyForAttr() Bug: 18095151. Change-Id: I1c75dd8288ed3dd494eb942060eac9c9660dca50
* | | Merge "Prevent stopped audio tracks from mixing data" into lmp-mr1-devAndy Hung2014-11-181-8/+9
|\ \ \ | |/ / |/| |
| * | Prevent stopped audio tracks from mixing dataAndy Hung2014-11-171-8/+9
| |/ | | | | | | | | | | | | | | | | Static tracks should have zero framesReady when stopping or stopped, to prevent mixer from running potentially indefinitely with loop mode. Bug: 16070883 Change-Id: Iab9968044d1a6f8543bbcbfb246f49f27d68cace
* | Merge "audiopolicy: Update input device check in checkInputsForDevice" into ↵Eric Laurent2014-11-171-3/+6
|\ \ | | | | | | | | | lmp-mr1-dev
| * | audiopolicy: Update input device check in checkInputsForDeviceEric Laurent2014-11-171-3/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - When an input device is disconnected, checkInputsForDevice clears dynamic fields of input profiles that are supporting the disconnected device. AUDIO_DEVICE_BIT_IN mask is missing while comparing with the supported input devices of a profile which is resulting in clearing wrong fields - Fix is to include AUDIO_DEVICE_BIT_IN in this comparison - also fix two other places where comparison with input device was not masked with AUDIO_DEVICE_BIT_IN. Bug: 18367045 Change-Id: Icc94b8353bc49567d8a6d6a75293c3b0dd42d83c
* | Merge "CameraService: normalize face rectangles properly" into lmp-mr1-devChien-Yu Chen2014-11-173-73/+90
|\ \ | |/ |/|
| * CameraService: normalize face rectangles properlyChien-Yu Chen2014-11-133-73/+90
| | | | | | | | | | | | | | | | | | Use android.scaler.cropRegion reported in the capture result to normalize face rectangles instead of using the one in current capture request. Bug: 11460393 Change-Id: Id21834bf6ae1f7cc106b4dffb98f9f249a75034b
* | Merge "Camera2Device: fix camera metadata leaks" into lmp-mr1-devChien-Yu Chen2014-11-122-15/+5
|\ \ | |/ |/|
| * Camera2Device: fix camera metadata leaksChien-Yu Chen2014-11-102-15/+5
| | | | | | | | | | | | bug 11132653 Change-Id: I5445b020c3aeaac9a556c023568adac635834356
* | audioflinger: fix duplicating thread output buffers clearEric Laurent2014-11-071-1/+5
| | | | | | | | | | | | | | | | | | Also clear mix buffer in DuplicatingThread::threadLoop_mix() instead of just sink buffer when output threads are not ready. Bug: 18262127. Change-Id: I4c22bbeaccdcc8d7c10c5882dde3439eb73d6ede
* | Merge "Add a BufferItem parameter to onFrameAvailable" into lmp-mr1-devDan Stoza2014-11-0712-13/+13
|\ \
| * | Add a BufferItem parameter to onFrameAvailableDan Stoza2014-11-0412-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | Passes the BufferItem for the queued buffer to the onFrameAvailable callback so the consumer can track the BufferQueue's contents. Bug: 18111837 Change-Id: If9d07229c9b586c668e5f99074e9b63b0468feb0
* | | Merge "remove some restrictions on effect output channels" into lmp-mr1-devEric Laurent2014-11-041-1/+2
|\ \ \
| * | | remove some restrictions on effect output channelsEric Laurent2014-11-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not prevent from attaching effects to a non stereo output thread, unless the output thread is a mixer thread. Bug: 18157592. Change-Id: I6ac3187187a1b8aade7db04ea6dfbc47dacc25c3
* | | | Merge "CameraService: API1: fix picture FOV" into lmp-mr1-devChien-Yu Chen2014-11-031-0/+14
|\ \ \ \ | |_|/ / |/| | |
| * | | CameraService: API1: fix picture FOVChien-Yu Chen2014-10-281-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the wrong assumption that active array size equals to pixel array size. bug 17918247 Change-Id: Ic308f281fb677332a74e95abb473c5b13063eeca
* | | | Support speaker routing for FLAG_BEACONJean-Michel Trivi2014-10-312-9/+148
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for routing audio stream to the speaker when audio attributes carry the FLAG_BEACON value: - associate streams with FLAG_BEACON to the up-to-now unused STREAM_TTS ("Transmitted Through Speaker"). The remapping happens in AudioTrack. - AudioPolicyManager: define new strategy for handling the Beacon behavior, that only goes to speaker. Define new volume curves for STREAM_TTS that are not silence only for the speaker device category. Keep ref count of other streams and never play Beacon streams when anything else is playing: either don't start playback if something else is playing, or unmute STREAM_TTS when it's allowed to play and mute when it's done. - Take into account muting latency when starting an output. Bug 15415971 Change-Id: I26539c7ec1a486accd85bbeb1623e9c7d3a1192f
* | | audio policy: fix commit dea1541fEric Laurent2014-10-302-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix return types in early returns added by commit dea1541f in AudioPolicy binder call methods. Also fix former similar mistakes found nearby. Bug: 18001784. Bug: 18002005. Change-Id: I088c6029ca04e2c2c2f78e560c9cb6b9576dd88f
* | | Merge "audio policy: validate stream type received from binder calls." into ↵Eric Laurent2014-10-302-0/+42
|\ \ \ | | | | | | | | | | | | lmp-mr1-dev
| * | | audio policy: validate stream type received from binder calls.Eric Laurent2014-10-282-0/+42
| |/ / | | | | | | | | | | | | | | | Bug: 18001784. Bug: 18002005. Change-Id: I8efa674dceff5a6e10251b1c7a55e9bb2d532395
* | | Merge "Always use an address for remote submix" into lmp-mr1-devJean-Michel Trivi2014-10-282-6/+29
|\ \ \
| * | | Always use an address for remote submixJean-Michel Trivi2014-10-272-6/+29
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usage of remote submix device for audio rerouting (e.g. wifi display) didn't mandate the use of addresses. Use "0" as the default address when none is specificed. In logs, only use hex format for audio devices Bug 16009464 Change-Id: Ibfb1ce6881eba8b7e34420293b8a7077a6e659e6
* | | audio policy: fix output device command after clearing audio patchEric Laurent2014-10-281-4/+8
|/ / | | | | | | | | | | | | | | Make sure that a valid audio patch is created again on an output stream following the disconneciton and reconnection of the same output device. Bug: 18144611. Change-Id: I72387ad8e93f8fb2571da2a6c58a6e167ac7fc4d
* | audio policy: fix multiple device volumeEric Laurent2014-10-271-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Whem multiple devices are selected by a strategy, apply volume to all these devices when one of them is changed by setStreamVolumeIndex() API. Also only consider devices supported by current output profile in checkDeviceMuteStrategies() to avoid muting a stream because of devices connected to another output stream. Bug: 17507571. Change-Id: I83ef9fb7f294214d30f7f890db44c64ece3be387
* | am 4d8ae211: am 661c21da: CameraService: Disconnect: Release mutex while ↵Eino-Ville Talvala2014-10-231-6/+14
|\ \ | | | | | | | | | | | | | | | | | | waiting for joins. * commit '4d8ae211ae2e2a5ae464931ce41ec5b1d6e6d51f': CameraService: Disconnect: Release mutex while waiting for joins.
| * \ am 661c21da: CameraService: Disconnect: Release mutex while waiting for joins.Eino-Ville Talvala2014-10-231-6/+14
| |\ \ | | |/ | | | | | | | | | * commit '661c21da5592ca48256747ec220efb2e599eeb72': CameraService: Disconnect: Release mutex while waiting for joins.
| | * CameraService: Disconnect: Release mutex while waiting for joins.Eino-Ville Talvala2014-10-221-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The threads shutting down may have callpaths that require taking the binder interface mutex, so waiting to join them with that mutex held can lead to deadlocks. A specific instance is StreamingProcessor calling dataCallbackTimestamp, which can immediately lead to a Camera2Client::releaseRecordingFrame call, which requires the binder interface mutex. If this call happens right when shutdown is occurring, and Camera2Client::disconnect is holding the mutex, deadlock ensues. Bug: 17997578 Change-Id: I71253cd5542b5920ad205976d315110ca0043d94
* | | Merge "audioflinger: new HW A/V sync ID allocation flow" into lmp-mr1-devEric Laurent2014-10-222-9/+60
|\ \ \ | |/ / |/| |
| * | audioflinger: new HW A/V sync ID allocation flowEric Laurent2014-10-222-9/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HW A/V sync ID is now allocated by the audio HAL before the output stream is created by a call to global get_parameters() with key AUDIO_PARAMETER_HW_AV_SYNC. When the AudioTrack is created, the HW A/V sync ID is communicated to the output stream by stream set_parameters() with key AUDIO_PARAMETER_STREAM_HW_AV_SYNC. Bug: 17112525. Change-Id: Ia8bc6f3bf9f358aa89f3f56ac554e893a19811ad
* | | am 7de5ac1f: audio policy: fix effect handle leakEric Laurent2014-10-211-36/+41
|\ \ \ | | |/ | |/| | | | | | | * commit '7de5ac1f067ec61f7ea424d5534cfd40987b11fa': audio policy: fix effect handle leak
| * | audio policy: fix effect handle leakEric Laurent2014-10-211-36/+41
| | | | | | | | | | | | | | | | | | | | | | | | Fix ref counting error in AudioPolicyEffect::addInputEffects() and addOutputSessionEffects() Bug: 17675112. Change-Id: I5267d1024a585919f66ead83662e57b78ba53540
* | | am ac302143: Fix the fixMarco Nelissen2014-10-201-1/+3
|\ \ \ | |/ / | | / | |/ |/| * commit 'ac302143551a8b964f026385a524dda9ff8ea5ba': Fix the fix