summaryrefslogtreecommitdiffstats
path: root/media/libmedia
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit 'f5a968a0' into mmGlenn Kasten2014-12-102-1/+59
|\ | | | | | | Change-Id: Ifd30546c11def40ad483f27c9d7baa4008fcbac3
| * audio policy: binder calls for dynamic audio policy mixesEric Laurent2014-12-092-1/+59
| | | | | | | | | | | | | | | | | | Add binder calls to register and unregister dynamic mixes to AudioPolicyManager. Bug: 16009464. Change-Id: I4ef38166d0cfc88c984970969380d0cd6eb083ac
* | am c49d9cda: am 2dda40d6: Merge "audio policy: add support for custom mixes" ↵Eric Laurent2014-12-103-1/+125
|\ \ | |/ | | | | | | | | | | into lmp-mr1-dev * commit 'c49d9cda49dab8b7dd0376cf56476b3e1895d5c6': audio policy: add support for custom mixes
| * audio policy: add support for custom mixesEric Laurent2014-12-093-1/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for custom mixes in AudioPolicyManager. Two methods are added to register or unregister a list of custom mixes with their attributes and format. getOutputForAttr() and getInputForAttr() first look for a match in registered mixes before defaulting to normal output/input selection Remote submix device connection disconnection now takes address into account to identify the correspnoding custom mix. Bug: 16009464. Change-Id: I3f1c2a485a0fb71b1f984ed0adc9b68aa971e408
* | am c1b0d49c: am 82a69ea8: Prevent ANR when AudioTrack is paused or re-routedzunkyu.lee2014-12-091-0/+2
|\ \ | |/ | | | | | | * commit 'c1b0d49cacde26c2420528169d157d2c778a9b0d': Prevent ANR when AudioTrack is paused or re-routed
| * Prevent ANR when AudioTrack is paused or re-routedzunkyu.lee2014-12-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If ClientProxy was interrupted by AudioTrack::pause() just before futex syscall() in obtainBuffer() was called, It will not call releaseBuffer to wake up AudioTrackThread. It puts the AudioTrackThread to sleep and then a deadlock occurs. In this case, CBLK_INTERRUPT flags can't prevent a deadlock, so this patch set mFutex to FUTEX_WAKE during interrupt() to avoid deadlock. A similar problem could occur due to re-route or recovery after mediaserver death. Bug: 18641665 Change-Id: I66fcae43af9a91eb55f6cdb52c644ee6c0999772
| * Track volume should be maintained even if track is restoredseunghak.han2014-12-051-1/+5
| | | | | | | | | | | | | | | | If track is restored when it set its volume to a non-unity value (such as mute), the volume was forced to unity again. Now, the previous volume is restored. Bug: 18570664 Change-Id: I79f34c6c7d6f535baba813fd3b8ba8e55cac8ad7
* | am bde85d05: am 5458756a: Merge "Track volume should be maintained even if ↵Glenn Kasten2014-12-021-1/+5
|\ \ | | | | | | | | | | | | | | | | | | track is restored" * commit 'bde85d05414cdd3888071635dd05e9ff78679d5e': Track volume should be maintained even if track is restored
| * | Track volume should be maintained even if track is restoredseunghak.han2014-12-011-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | If track is restored when it set its volume to a non-unity value (such as mute), the volume was forced to unity again. Now, the previous volume is restored. Bug: 18570664 Change-Id: I79f34c6c7d6f535baba813fd3b8ba8e55cac8ad7
* | | am 390ef843: am f20c4356: Merge "AudioRecord: use audio attributes instead ↵Eric Laurent2014-11-274-39/+75
|\ \ \ | | |/ | |/| | | | | | | | | | | | | of audio source." into lmp-mr1-dev * commit '390ef84373b7edd1397381f780ca235326357094': AudioRecord: use audio attributes instead of audio source.
| * | AudioRecord: use audio attributes instead of audio source.Eric Laurent2014-11-254-39/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | am bf14c62e: am 72bf901c: Merge "audio policy: new getOutputForAttr() ↵Eric Laurent2014-11-264-223/+128
|\ \ \ | |/ / | | | | | | | | | | | | | | | prototype." into lmp-mr1-dev * commit 'bf14c62e7973ed793a3b00c2c67beca4484c1c7a': audio policy: new getOutputForAttr() prototype.
| * | Merge "audio policy: new getOutputForAttr() prototype." into lmp-mr1-devEric Laurent2014-11-264-223/+128
| |\ \
| | * | audio policy: new getOutputForAttr() prototype.Eric Laurent2014-11-254-223/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | am 1e18795a: am d325005e: Merge "Fix AudioTrack loop mode to play audio from ↵Andy Hung2014-11-262-4/+9
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | buffer start" into lmp-mr1-dev * commit '1e18795a4847e9368baa7ecee146d3901b283cd0': Fix AudioTrack loop mode to play audio from buffer start
| * | | Merge "Fix AudioTrack loop mode to play audio from buffer start" into ↵Andy Hung2014-11-252-4/+9
| |\ \ \ | | |/ / | |/| | | | | | lmp-mr1-dev
| | * | Fix AudioTrack loop mode to play audio from buffer startAndy Hung2014-11-242-4/+9
| | | | | | | | | | | | | | | | | | | | Bug: 18217633 Change-Id: Ica77acf0a32832d9b04eb657ef2f4f5329f8fbda
* | | | am 1a475921: am 223fd5c9: audio: new routing strategies and stream typesEric Laurent2014-11-261-1/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | * commit '1a475921c0577a4650d1bbe40a85b732d1766939': audio: new routing strategies and stream types
| * | | audio: new routing strategies and stream typesEric Laurent2014-11-211-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | am f8c2d166: am a7cf01da: Merge "Fix missing loop count for static tracks." ↵Glenn Kasten2014-11-211-22/+38
|\ \ \ | |/ / | | | | | | | | | | | | | | | into lmp-mr1-dev * commit 'f8c2d1665393d8e0620a7129ef3865f34489e6ef': Fix missing loop count for static tracks.
| * | Merge "Fix missing loop count for static tracks." into lmp-mr1-devGlenn Kasten2014-11-201-22/+38
| |\ \
| | * | Fix missing loop count for static tracks.Andy Hung2014-11-181-22/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | StaticAudioTrackServerProxy::framesReady() previously returned only the contiguous frames, update to return the total available frames. This resolves short-count looping in SoundPool for FastTracks. Also (1) Removes the racy condition of reading two variables and (2) Fixes buffer->mNonContig to return the correct value and (3) Restores behavior that loop count of 1 goes back to loopStart once during playback. Bug: 11830751 Bug: 12070295 Bug: 17456842 Change-Id: I64906e6036bb00a1d7375b03efe6deb69d6478ca
* | | | am 568689b1: am 3a2a32b5: Merge "AudioSystem: fix cross deadlock" into ↵Eric Laurent2014-11-211-43/+58
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | lmp-mr1-dev * commit '568689b169d8b0ae2cc252b88602db5e5acaa604': AudioSystem: fix cross deadlock
| * | | AudioSystem: fix cross deadlockEric Laurent2014-11-201-43/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | am cd370c79: am de14fae7: Merge "Use standard syntax to initialize fields."Glenn Kasten2014-11-191-712/+712
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | * commit 'cd370c790a9017560874a2588da46d4538087cad': Use standard syntax to initialize fields.
| * | | Merge "Use standard syntax to initialize fields."Glenn Kasten2014-11-191-712/+712
| |\ \ \
| | * | | Use standard syntax to initialize fields.Chih-Hung Hsieh2014-11-141-712/+712
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clang compiler gives warning to old gnu syntax. BUG: 18193625 Change-Id: I1b5237d60866fc357fc808f6a6955ab20418a7d8
* | | | | am 4fd641be: am bbda5ce4: Merge "AudioSystem: Add mutex for output cache" ↵Eric Laurent2014-11-191-37/+47
|\ \ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | into lmp-mr1-dev * commit '4fd641be9fed70743ca4fe823b69e74c258ce275': AudioSystem: Add mutex for output cache
| * | | | Merge "AudioSystem: Add mutex for output cache" into lmp-mr1-devEric Laurent2014-11-191-37/+47
| |\ \ \ \
| | * | | | AudioSystem: Add mutex for output cacheEric Laurent2014-11-191-37/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix cross deadlock with AudioFlinger by adding a dedicated mutex to protect access to cached output list and parameters. Bug: 18410728. Change-Id: Ia31283b1972d8865a46e84e63695173c187eb781
* | | | | | am bfa77b5c: am 8cd37d67: Merge "audio policy: do not prevent routing to ↵Eric Laurent2014-11-181-0/+5
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A2DP when suspended." into lmp-mr1-dev * commit 'bfa77b5c687f217e26267693306aaa6cc8a63672': audio policy: do not prevent routing to A2DP when suspended.
| * | | | | audio policy: do not prevent routing to A2DP when suspended.Eric Laurent2014-11-171-0/+5
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | am 26d92768: am 34c55e3e: Merge "No need to #include atomic-inline.h if you ↵Elliott Hughes2014-11-171-1/+0
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | have atomic.h." * commit '26d92768d6dac505903c96e842673ee9a57a0989': No need to #include atomic-inline.h if you have atomic.h.
| * | | | No need to #include atomic-inline.h if you have atomic.h.Elliott Hughes2014-11-171-1/+0
| | | | | | | | | | | | | | | | | | | | Change-Id: I79f9a53b95dcf84dff62ed4b3c0661c7c1e1fc64
* | | | | am 2716969d: resolved conflicts for merge of 3bc345f5 to stage-aosp-masterElliott Hughes2014-11-171-12/+0
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | * commit '2716969d2b88e85a6ed5a766b54a0a34dc137118': libcutils no longer requires that its users configure ANDROID_SMP.
| * | | | libcutils no longer requires that its users configure ANDROID_SMP.Elliott Hughes2014-11-171-2/+0
| | | | | | | | | | | | | | | | | | | | Change-Id: Ib91ff0696ab2472c62168eb5261bbda5d22f623e
* | | | | resolved conflicts for merge of e78a27ca to lmp-mr1-dev-plus-aospMarco Nelissen2014-11-1719-60/+60
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | Change-Id: If10a9cc17245f95d5e10b1507445abbb4020670e
| * \ \ \ \ am 9b77083e: Merge "Update calls to IInterface::asBinder()"Marco Nelissen2014-11-1719-60/+60
| |\ \ \ \ \ | | |/ / / / | | | | | | | | | | | | | | | | | | * commit '9b77083e582a8b6088ac6a2cb4151dfbdd324557': Update calls to IInterface::asBinder()
| | * | | | Update calls to IInterface::asBinder()Marco Nelissen2014-11-1719-60/+60
| | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to use the new static version. Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a Conflicts: media/libmedia/IAudioFlinger.cpp media/libmedia/IMediaPlayer.cpp media/libstagefright/CameraSource.cpp
| | * | | Resolve conflictThe Android Open Source Project2014-11-0636-2010/+5622
| | |\ \ \
* | | \ \ \ am 990dad99: Merge "remove AudioSystem::getOutputSamplingRateForAttr()" into ↵Eric Laurent2014-11-142-28/+15
|\ \ \ \ \ \ | | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lmp-mr1-dev automerge: 0e8a328 * commit '0e8a3284c6828e561f58e66a014c3b7ee37325cf': remove AudioSystem::getOutputSamplingRateForAttr()
| * | | | | remove AudioSystem::getOutputSamplingRateForAttr()Eric Laurent2014-11-122-28/+15
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is safer to query the output sampling rate once the output have been acquired by calling getOutputForAttr(). Bug: 16009464. Change-Id: Ib561facd19fba5359a6b837d75f1a1cd2dc51b29
* | | | | am b177468b: Merge "Improve AudioTrack recovery from mediaserver death" into ↵Glenn Kasten2014-11-072-19/+31
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | lmp-mr1-dev automerge: e662cd5 * commit 'b177468bb1647c79ba48cd0a172cf3306b31ad69': Improve AudioTrack recovery from mediaserver death
| * | | | Merge "Improve AudioTrack recovery from mediaserver death" into lmp-mr1-devGlenn Kasten2014-11-072-19/+31
| |\ \ \ \
| | * | | | Improve AudioTrack recovery from mediaserver deathGlenn Kasten2014-11-052-19/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Fix race condition in handling of binder death notifications. AudioSystem has a mixture of APIs for both ordinary app clients, and the AudioFlinger and AudioPolicy services within mediaserver. Due to this mix of uses, it is possible for there to be "surprising" sequences of calls on the call stack. Previously, we used a single mutex for all global variables, but this caused a deadlock. To avoid the deadlock, we unlocked the mutex during the critical sequence of calls. But this was a a crucial place where it should have stayed locked; see Change-Id I315c1c5066f62b05e1c13b04fae1272b5fbce977 Now we use separate mutexes for the AudioFlinger, AudioPolicy, and audio port related global variables. This allows us to correctly hold each mutex throughout the atomic region, even when AudioFlinger calls AudioPolicy via AudioSystem, or vice-versa. 2. AudioSystem::clearAudioConfigCache now clears the IAudioFlinger reference. 3. Make AudioSystem::get_audio_policy_service more like get_audio_flinger. Bug: 18242291 Change-Id: I9761443d8337df5bf66d4ca2316a9fd0bd11be94
* | | | | | am 7e88fac0: Merge "AudioSystem: remove obsolete method." into lmp-mr1-dev ↵Eric Laurent2014-11-071-15/+0
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | automerge: c339a92 * commit '7e88fac080e3bb1cdc95667f82727ea6c19fb173': AudioSystem: remove obsolete method.
| * | | | | Merge "AudioSystem: remove obsolete method." into lmp-mr1-devEric Laurent2014-11-071-15/+0
| |\ \ \ \ \
| | * | | | | AudioSystem: remove obsolete method.Eric Laurent2014-11-061-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 18067208. Change-Id: I9bbf9088485f5162c765ca504d9b784b956234c6
* | | | | | | am 113adbbc: resolved conflicts for merge of bcf093bf to stage-aosp-masterNarayan Kamath2014-11-071-1/+13
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | / / / | | |_|/ / / | |/| | | | * commit '113adbbc652874360332caa0c9df68e6b1e25fde': Fix definining of ANDROID_SMP.
| * | | | | resolved conflicts for merge of bcf093bf to stage-aosp-masterNarayan Kamath2014-11-071-1/+13
| |\ \ \ \ \ | | | |_|/ / | | |/| | / | | |_|_|/ | |/| | | Change-Id: I545e15dde7774624139717e0b23bd96c444cb1bc