summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* AudioRecord: use audio attributes instead of audio source.Eric Laurent2014-11-253-13/+18
| | | | | | | | | | | | | | | | 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
* audio policy: new getOutputForAttr() prototype.Eric Laurent2014-11-254-21/+83
| | | | | | | | | | | | | | | | | | | | | | | 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 "Fix missing loop count for static tracks." into lmp-mr1-devGlenn Kasten2014-11-201-1/+8
|\
| * Fix missing loop count for static tracks.Andy Hung2014-11-181-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | AudioSystem: fix cross deadlockEric Laurent2014-11-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | AudioSystem: Add mutex for output cacheEric Laurent2014-11-191-4/+5
| | | | | | | | | | | | | | | | | | Fix cross deadlock with AudioFlinger by adding a dedicated mutex to protect access to cached output list and parameters. Bug: 18410728. Change-Id: Ia31283b1972d8865a46e84e63695173c187eb781
* | Merge "remove AudioSystem::getOutputSamplingRateForAttr()" into lmp-mr1-devEric Laurent2014-11-141-2/+0
|\ \
| * | remove AudioSystem::getOutputSamplingRateForAttr()Eric Laurent2014-11-121-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | It is safer to query the output sampling rate once the output have been acquired by calling getOutputForAttr(). Bug: 16009464. Change-Id: Ib561facd19fba5359a6b837d75f1a1cd2dc51b29
* | | Merge "stagefright: add runtime debug support" into lmp-mr1-devLajos Molnar2014-11-142-0/+66
|\ \ \ | |_|/ |/| |
| * | stagefright: add runtime debug supportLajos Molnar2014-11-122-0/+66
| |/ | | | | | | | | Bug: 18285408 Change-Id: I56346f4652b2c5f7ef5fa3003fd8676051339384
* | Merge "Stagefright: use MediaCodec in async mode for recording" into lmp-mr1-devChong Zhang2014-11-131-4/+0
|\ \ | |/ |/|
| * Stagefright: use MediaCodec in async mode for recordingPraveen Chavan2014-11-121-4/+0
| | | | | | | | | | | | | | | | | | Async mode reduces the number of messages posted between MediaCodec and MediaCodecSource. This reduces thread wakeups and helps reduce CPU utilization. Bug: 18246026 Change-Id: I4b0837f309fdd12e323c1dfa72525f5a31971a03
* | Merge "Improve AudioTrack recovery from mediaserver death" into lmp-mr1-devGlenn Kasten2014-11-071-1/+4
|\ \
| * | Improve AudioTrack recovery from mediaserver deathGlenn Kasten2014-11-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Add a BufferItem parameter to onFrameAvailable" into lmp-mr1-devDan Stoza2014-11-072-2/+2
|\ \ \
| * | | Add a BufferItem parameter to onFrameAvailableDan Stoza2014-11-042-2/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | 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
* | | AudioSystem: remove obsolete method.Eric Laurent2014-11-061-2/+0
| |/ |/| | | | | | | Bug: 18067208. Change-Id: I9bbf9088485f5162c765ca504d9b784b956234c6
* | Merge "Pass resolution to Crypto plugin on format change" into lmp-mr1-devJeff Tinker2014-11-061-1/+2
|\ \
| * | Pass resolution to Crypto plugin on format changeJeff Tinker2014-11-031-1/+2
| | | | | | | | | | | | | | | Change-Id: I56cd557ce3525fe625db8c312d2557d3c8b51101 related-to-bug: 16034599
* | | Merge "Add missing secure stop methods" into lmp-mr1-devJeff Tinker2014-11-061-1/+2
|\ \ \ | |/ /
| * | Add missing secure stop methodsJeff Tinker2014-10-311-1/+2
| |/ | | | | | | | | | | | | b/18053197 b/18076411 Change-Id: I923dc893d48c70bf17980007b32f0ac5dfd22896
* | IAudioPolicyService: bound array size in queryDefaultPreProcessingEric Laurent2014-11-051-2/+7
|/ | | | | Bug: 18226810. Change-Id: Ib8e2bfe835a8681aac50bf23161db14e50c9a124
* do not hold mNotifyLock when calling MediaPlayer::notifyChong Zhang2014-10-271-2/+9
| | | | | Bug:18120688 Change-Id: Ia66dcfc3fd2d67d1ceba9808d21e0120cc8691d6
* Merge "stagefright: try to free codec instance if MediaCodec.release hangs" ↵Lajos Molnar2014-10-221-0/+1
|\ | | | | | | into lmp-dev
| * stagefright: try to free codec instance if MediaCodec.release hangsLajos Molnar2014-10-211-0/+1
| | | | | | | | | | Bug: 18033275 Change-Id: If86cd26566d7b75941976f37829bbec619800778
* | Stagefright: MediaCodec: shutdown allocated codec on errorPraveen Chavan2014-10-211-0/+1
|/ | | | | | | | | | | | If MediaCodec sees a fatal error and transitions to UNINITIALIZED state, The codec may still be alive (with an exception of 'mediaserver-died' error). Handle Shutdown of the codec during release(). Bug: 17784012 Bug: 18033275 Change-Id: I891e036499d9b440a57f77fb735a5ba4da9a6e43
* Merge "Fix VideoFrame class layout for 64/32 bit" into lmp-devMarco Nelissen2014-10-091-1/+4
|\
| * Fix VideoFrame class layout for 64/32 bitMarco Nelissen2014-10-091-1/+4
| | | | | | | | | | | | | | | | | | This structure is passed between 64 and 32 bit processes via shared memory, so ensure it's the same size, and that the members we care about are in the same place. Bug: 17569156 Change-Id: Id776bc825af1fbf43a6dd3407cca064f6d932902
* | Merge "stagefright: do not allocate output buffers for tunneled playback" ↵Rachad2014-10-071-0/+2
|\ \ | | | | | | | | | into lmp-dev
| * | stagefright: do not allocate output buffers for tunneled playbackRachad2014-09-281-0/+2
| | | | | | | | | | | | | | | | | | | | | Do not allocate native window buffers for tunneled video playback codecs. Bug: 17112525 Change-Id: I262d8030a9df6188938fde5d62ebce8faf7dba1f
* | | MediaRecorder: only dequeue available buffers from MediaCodecChong Zhang2014-10-031-1/+1
| |/ |/| | | | | | | Bug: 17514968 Change-Id: If232f92d163deb2440b927315c69e0c4d51ca290
* | mediarecorder: set level if setting default profileLajos Molnar2014-10-021-2/+8
| | | | | | | | | | Bug: 17676461 Change-Id: If01ccd09935945d330de0842be95c3544951b6b9
* | stagefright: move math templates into AUtils.hLajos Molnar2014-10-011-0/+65
| | | | | | | | | | | | | | add unit test for math templates Bug: 17676461 Change-Id: Ie964c5fcfcca1ec53b4538f8e577392e8fbb4319
* | Merge "add AAC audio decoder params for PCM limiter enable" into lmp-devChong Zhang2014-10-011-1/+2
|\ \
| * | add AAC audio decoder params for PCM limiter enableChong Zhang2014-10-011-1/+2
| | | | | | | | | | | | | | | Bug: 17470065 Change-Id: Ib67aa1c50e3b6c24c4b12b0f31a996cc6874abd1
* | | GenericSource: support disconnect before NuCachedSource2 is createdRobert Shih2014-10-011-1/+5
| | | | | | | | | | | | | | | Bug: 17672488 Change-Id: I96776c9679fdcfbe9a442c86447c59802b1465ac
* | | audio: fix stream type for accessibility usageEric Laurent2014-09-252-0/+4
|/ / | | | | | | | | | | | | | | | | Make sure that accessibility prompts are heard when a ringtone is active by forcing stream type to AUDIO_STREAM_RING when phone state is AUDIO_MODE_RINGTONE. Bug: 17558149. Change-Id: Ia3bead8052fca5cbf282c267f7b9b06014fef628
* | Merge "MediaCodec: Fix deallocated pointer reference when calling reset()" ↵Andy Hung2014-09-221-1/+1
|\ \ | | | | | | | | | into lmp-dev
| * | MediaCodec: Fix deallocated pointer reference when calling reset()Andy Hung2014-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The name pointer argument in MediaCodec::init() was being implicitly deallocated. Bug: 17499622 Change-Id: If9409f95674e52d1478f969f77693c4d27ff1ff2
* | | Merge "MediaBuffer: ABuffer will release MediaBuffer when it's destructed." ↵Wei Jia2014-09-223-3/+51
|\ \ \ | | | | | | | | | | | | into lmp-dev
| * | | MediaBuffer: ABuffer will release MediaBuffer when it's destructed.Wei Jia2014-09-193-3/+51
| | | | | | | | | | | | | | | | | | | | Bug: 17454455 Change-Id: Ia423bcc2e1fa39137f114eac44912ed15357bb99
* | | | Merge "AudioEffect acquires session" into lmp-devJean-Michel Trivi2014-09-181-0/+1
|\ \ \ \ | |_|/ / |/| | |
| * | | AudioEffect acquires sessionJean-Michel Trivi2014-09-181-0/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, users of audio sessions, AudioTrack and AudioRecord, are acquiring and releasing audio sessions according to their life-cycle. AudioEffect instances were not counting as users of an audio session. This caused an effect used on a session to be purged by AudioFlinger::purgeStaleEffects_l() whenever the last user of that session went away. This CL makes AudioEffect acquire and release a session when created and destroyed. Bug 15432115 Change-Id: I922532150009988d43872f9b5928044a830ae0b3
* | | Merge "NuPlayer: use getTimestamp instead of getPosition" into lmp-devLajos Molnar2014-09-171-0/+2
|\ \ \
| * | | NuPlayer: use getTimestamp instead of getPositionLajos Molnar2014-09-171-0/+2
| |/ / | | | | | | | | | | | | Bug: 14659809 Bug: 16985287 Change-Id: I59ec72fbd40a9b8d28fe548ddad082c03000c045
* | | Fix AudioTrack offloaded timestamp handling.Andy Hung2014-09-171-1/+10
|/ / | | | | | | | | | | | | | | | | | | getTimestamp for offloaded tracks now returns WOULD_BLOCK for situations where the timestamp is unavailable due to the previous track still flushing or the timestamp is stale. It is fixed for normal playback conditions. Bug: 14659809 Bug: 17428188 Change-Id: Ic9ec07ccabc604236979769db5c4ea2dec252660
* | Clean up AudioTrack position and timestamp handlingGlenn Kasten2014-09-113-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace epoch concept by observing and accumulating server delta positions. The advantage of using server deltas instead of absolute values is that they (1) are not sensitive to 32-bit wraparound, (2) are not sensitive to server behavior for stop(), and (3) prepare for future 64-bit client positions without requiring 64-bit positions on server. Add comments to AudioTrack::getTimestamp() and friends that the timestamp output parameter is undefined on error. Don't allow getTimestamp to return a negative frame position after stop(). Accumulate the client released frames, which may be useful for a future API. Bug: 11815245 Change-Id: I652940fa2db2f34a78c012a3ead0d9204fa29c6e
* | stagefright: don't use AAtomizer in AMessageLajos Molnar2014-09-101-1/+5
| | | | | | | | | | Bug: 15094301 Change-Id: Ib82fb6d8fb6b48402d81f411123b3d924368eb93
* | Merge "CamcorderProfile: Add QUALITY_HIGH_SPEED_2160P" into lmp-devZhijun He2014-09-101-1/+2
|\ \
| * | CamcorderProfile: Add QUALITY_HIGH_SPEED_2160PZhijun He2014-09-091-1/+2
| |/ | | | | | | | | Bug: 17059255 Change-Id: Ic6b272e4ceec8fc852c9eb787370f4d366dad0ac