summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Declare methods in binder opcode orderGlenn Kasten2013-07-294-19/+21
| | | | Change-Id: I5f624b7a51ffe1a17a67c056cf984f74e4c56eac
* Merge "Move delete AudioMixer closer to point of re-allocation"Glenn Kasten2013-07-291-3/+1
|\
| * Move delete AudioMixer closer to point of re-allocationGlenn Kasten2013-07-251-3/+1
| | | | | | | | | | | | No need to delete AudioMixer before readOutputParameters Change-Id: Icafa785c9021bbe8d985e4f9527f8fc8c5e62622
* | Remove obsolete TrackBase::step(), mStepCount, mStepServerFailedGlenn Kasten2013-07-292-15/+6
| | | | | | | | Change-Id: I6347096f066b8b19451c6472db7b0671f0cf7702
* | Merge "Simplify RecordTrack::stop()"Glenn Kasten2013-07-293-8/+4
|\ \
| * | Simplify RecordTrack::stop()Glenn Kasten2013-07-253-8/+4
| | | | | | | | | | | | Change-Id: Ib959c1e9dc9544d12277ce11bea445118b2e0521
* | | Merge "CBLK_OVERRUN, not CBLK_UNDERRUN, is for record threads"Glenn Kasten2013-07-271-3/+0
|\ \ \ | |/ /
| * | CBLK_OVERRUN, not CBLK_UNDERRUN, is for record threadsGlenn Kasten2013-07-251-3/+0
| | | | | | | | | | | | Change-Id: I8948f76ef4717a423c37cd6ea7db4381636af612
* | | Merge "Remove obsolete TrackBase::reset()"Glenn Kasten2013-07-262-8/+0
|\ \ \ | |/ /
| * | Remove obsolete TrackBase::reset()Glenn Kasten2013-07-252-8/+0
| |/ | | | | | | Change-Id: I38100b7e28a12d7af8cb40ae3f4d9cb4a0ebe701
* | Merge "HAL stream format for mixer output threads must be stereo 16-bit PCM"Glenn Kasten2013-07-262-3/+20
|\ \
| * | HAL stream format for mixer output threads must be stereo 16-bit PCMGlenn Kasten2013-07-252-3/+20
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Direct and tunnel output threads can support various HAL stream formats, included encoded. But currently there are stereo 16-bit PCM assumptions in several places for mixer and duplicating output threads: - mMixBuffer and mixBuffer() - AudioMixer including resampler - FastMixer's mixBuffer - effects - NBAIO_Format - anywhere FCC_2 is used - possibly other places Until those assumptions are removed, this CL enforces stereo 16-bit PCM in mixer and duplicating threads at the place where the HAL format is read. It was already being checked in checkForNewParameters_l(), but not in readOutputParameters(). Change-Id: Ibe344cc922743da234299097aa1bb1f54795cc9b
* | stagefright: offload playback supportRichard Fitzgerald2013-07-268-121/+618
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Offloading of compressed audio decoding to audio DSP is implemented for audio only, non streamed content. when the datasource is AudioPlayer: - Create an offloaded sink when playing a compressed source - Send metadata to audio HAL - Return sink start error to AwesomePlayer so that a new player for PCM audio can be created in case of problem. - Forward stream end and tear down callback events to AwesomePlayer - Stop the sink and wait for stream end callback when EOS is reached. - Pause and restart the sink if needed before flushing when seeking (otherwise flush is a no op). - For current media time, directly query the render position from the sink and offset by the start position (seek to time) AwesomePlayer: - When initializing the audio decoder, check with audio policy manager if offloading is supported. If yes, create the software decoder in case a reconfiguration is needed but connect the audio track directly to the AudioPlayer. - In case of error when starting the AudioPlayer, reconnect the software decoder (OMXSource) and recreate a PCM AudioPlayer. - Handle AudioPlayer tear down event by detroying and recreating the AudioPlayer to allow transitions between situations were offloading is supported or not. - Force tear down of offloaded AudioPlayer when paused for a certain time: This will close the sink and allow the DSP to power down. Utils: - Added helper methods: - send meta data to audio ia sink setParameters - query audio policy manager if offloading is supported for a given audio content Change-Id: I115842ce424f947b966d45e253a74d3fd5df9aae Signed-off-by: Eric Laurent <elaurent@google.com>
* | libmediaplayerservice: offload playback supportRichard Fitzgerald2013-07-265-89/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Main change is to how recycled tracks are used for gapless playback. If we are playing offloaded tracks that can't be recycled we don't open a new offloaded output until we have closed the previous one. This is because offloaded tracks are a limited resource so we don't want to spuriously create unnecessary instances. If the tracks cannot be recycled this means that the formats are incompatible and so the hardware most likely will also be unable to use the existing output channel for the new track. If we already have the maximum number of hardware offload channels open (which could be only one) then creation of the next output would fail if we attempted it while the previous output was still open. Change-Id: I4f5958074e7ffd2e17108157fee86329506730ea Signed-off-by: Eric Laurent <elaurent@google.com>
* | libmedia: offloaded playback supportRichard Fitzgerald2013-07-256-57/+363
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - start() returns a status so that upper layers can recreate a non offloaded track in case of error. - Added states to handle offloaded tracks specific: - waiting for stream end (drain) notification by audio flinger - allow pause while waiting for stream end notification - getPosition() queries the render position directly from audio HAL. - disable APIs not applicable to offloaded tracks - Modified track restoring behavior for invalidated offloaded tracks: just send the callback and wait for upper layers to create a new track. - Added wait for stream end management in audio track client proxy. Similar to obtainBuffer and should be factored in. Change-Id: I0fc48117946364cb255afd653195498891f622bd Signed-off-by: Eric Laurent <elaurent@google.com>
* | AudioFlinger: offload playback, non-blocking writeEric Laurent2013-07-2513-321/+1178
|/ | | | | | | | | | | | | | | | | | | | | | | | - Added specialized playback thread class for offload playback, derived from directoutput thread. This thread type handles specific state transitions for offloaded tracks and offloading commands (pause/resume/drain/flush..) to audio HAL. As opposed to other threads, does not go to standby if the track is paused. - Added support for asynchronous write and drain operations at audio HAL. Use a thread to handle async callback events from HAL: this avoids locking playback thread mutex when executing the callback and cause deadlocks when calling audio HAL functions with the playback thread mutex locked. - Better accouting for track activity: call start/stop and release Output methods in audio policy manager when tracks are actually added and removed from the active tracks list. Added a command thread in audio policy service to handle stop/release commands asynchronously and avoid deadlocks with playback thread. - Track terminated status is not a state anymore. This condition is othogonal to state to permitted state transitions while terminated. Change-Id: Id157f4b3277620568d8eace7535d9186602564de
* Merge "Update error message"Andy McFadden2013-07-251-1/+2
|\
| * Update error messageAndy McFadden2013-07-241-1/+2
| | | | | | | | | | | | | | | | The color format used for surfaces has two different names. The one in the error message is the "native" name, which doesn't mean anything to external developers. Change-Id: Ic0561f4ad12970b0e0a60bd17b4e3997af1a9f0e
* | Merge "camera2: Implement ICameraDeviceUser::waitUntilIdle"Zhijun He2013-07-245-1/+45
|\ \
| * | camera2: Implement ICameraDeviceUser::waitUntilIdleZhijun He2013-07-235-1/+45
| | | | | | | | | | | | | | | | | | Also fixed some logging typo Change-Id: Ib254bdb137dca10b12595c23aeb1c53097423425
* | | Merge "Remove obsolete drm manager code"Jeff Tinker2013-07-248-73/+0
|\ \ \ | |_|/ |/| |
| * | Remove obsolete drm manager codeJeff Tinker2013-07-238-73/+0
| | | | | | | | | | | | | | | bug: 9545965 Change-Id: Ia6e09efa826b1349d027045e782980daeb7d7596
* | | Merge "Don't abort on unusual state transition"Andy McFadden2013-07-241-3/+5
|\ \ \
| * | | Don't abort on unusual state transitionAndy McFadden2013-07-231-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The state transition check was too strict, and we were crashing mediaserver inappropriately. Bug 9819944 Change-Id: I1482ed1cfee37088d4893ee81cf1b2b950d2e930
* | | | Merge "Prototype screen recording command"Andy McFadden2013-07-232-0/+606
|\ \ \ \
| * | | | Prototype screen recording commandAndy McFadden2013-07-232-0/+606
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This records the screen contents as a movie. It works by feeding the output of a virtual display to the video/avc encoder. Recording continues until Ctrl-C is hit. Video only, no sound. Does not track screen rotations. Change-Id: I91d5c4e781792c740699b7a83590e846295b3617
* | | | Merge "Fix typo in socket name"Geremy Condra2013-07-231-1/+1
|\ \ \ \ | |_|_|/ |/| | |
| * | | Fix typo in socket nameChad Brubaker2013-07-231-1/+1
| | | | | | | | | | | | | | | | Change-Id: I29171368f1b69333ef7eae53ada2fab94e3e28b9
* | | | Merge "Add routing sockets for the requesting user"Geremy Condra2013-07-235-0/+29
|\ \ \ \ | |/ / /
| * | | Add routing sockets for the requesting userChad Brubaker2013-07-195-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Mediaserver sockets are now routed as if the connection was in the requesting app in per user routing. Change-Id: I60f4649c3c4145a65264b54c1aa2c6c7741efaba
* | | | Camera: ProCamera connect need support HAL3 deviceZhijun He2013-07-221-0/+1
| | | | | | | | | | | | | | | | Change-Id: Iae7e5f9e6387f61f1c4bbb91f75803fc1fdf2668
* | | | Merge "Use AudioSystem::setLowRamDevice() to configure memory"Glenn Kasten2013-07-229-18/+109
|\ \ \ \
| * | | | Use AudioSystem::setLowRamDevice() to configure memoryGlenn Kasten2013-07-199-18/+109
| | | | | | | | | | | | | | | | | | | | | | | | | Bug: 9798886 Change-Id: I9321e3f369f1ed9429ae222e3926ebdeb012b8b0
* | | | | Merge "Revert "Fix Audioflinger crash when TeeSink is enabled""Glenn Kasten2013-07-221-3/+2
|\ \ \ \ \ | |/ / / /
| * | | | Revert "Fix Audioflinger crash when TeeSink is enabled"Glenn Kasten2013-07-191-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 84e391686d7eced293913d1d7993721224ee0ba1. Bug: 8834855 Change-Id: I8211ef5ea5d87d97ada115723df31c8057f38ca8
* | | | | Merge "Fix compile warning"Glenn Kasten2013-07-221-1/+1
|\ \ \ \ \ | |_|_|/ / |/| | | |
| * | | | Fix compile warningGlenn Kasten2013-07-191-1/+1
| | |_|/ | |/| | | | | | | | | | Change-Id: I80de4a013dc65eb7c532561438fd10e005354c03
* | | | Merge "camera2: Fix request ID bug"Zhijun He2013-07-201-1/+1
|\ \ \ \
| * | | | camera2: Fix request ID bugZhijun He2013-07-191-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | Wrong request id was pushed in request list. Change-Id: I55bf7ae84ca41eec79db1a81d2cde35beaa2a6b9
* | | | Merge "update to new Consumer APIs"Mathias Agopian2013-07-208-20/+13
|\ \ \ \
| * | | | update to new Consumer APIsMathias Agopian2013-07-168-20/+13
| | | | | | | | | | | | | | | | | | | | Change-Id: I3c5d4be2a2e8783fbf98b3e268fd02658f71dc7d
* | | | | am f2d744d9: (-s ours) Reconcile with jb-mr2-zeroday-release - do not mergeThe Android Open Source Project2013-07-190-0/+0
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f2d744d9535ca59be6cd878830176f81a0a8fbc6': Camera2/3: Fix deadlock when starting recording before preview.
| * \ \ \ \ Reconcile with jb-mr2-zeroday-release - do not mergeThe Android Open Source Project2013-07-190-0/+0
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Change-Id: I48e936434971feedd176c2d5eafd0fdf43b75f74
| | * | | | | Camera2/3: Fix deadlock when starting recording before preview.Eino-Ville Talvala2013-07-187-89/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move 3A notification synthesis for HAL3 devices from Camera3Device::processCaptureResult to Camera2Client's FrameProcessor. This will ensure that calls to processCaptureResult from HAL can never block on Camera2Client internal mutexes. Bug: 9923891 Change-Id: I5184649bf45c0807babe6b8c0e1239e959cd3480
* | | | | | | am b0177ff2: am 46910bdc: Camera2/3: Fix deadlock when starting recording ↵Eino-Ville Talvala2013-07-197-89/+140
|\ \ \ \ \ \ \ | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | before preview. * commit 'b0177ff25e3e620be6ebe1e2c3f645b2f05dd57e': Camera2/3: Fix deadlock when starting recording before preview.
| * | | | | | am 46910bdc: Camera2/3: Fix deadlock when starting recording before preview.Eino-Ville Talvala2013-07-197-89/+140
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '46910bdc57c35ac36bd4adcbb76f4f3a590e3f21': Camera2/3: Fix deadlock when starting recording before preview.
| | * | | | | | Camera2/3: Fix deadlock when starting recording before preview.Eino-Ville Talvala2013-07-187-89/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move 3A notification synthesis for HAL3 devices from Camera3Device::processCaptureResult to Camera2Client's FrameProcessor. This will ensure that calls to processCaptureResult from HAL can never block on Camera2Client internal mutexes. Bug: 9923891 Change-Id: I5184649bf45c0807babe6b8c0e1239e959cd3480
* | | | | | | | Merge "Make AudioFlinger::instantiate() more resilient when called from ↵Glenn Kasten2013-07-1913-21/+69
|\ \ \ \ \ \ \ \ | | |_|_|_|_|/ / | |/| | | | | | | | | | | | | | separate module"
| * | | | | | | Make AudioFlinger::instantiate() more resilient when called from separate moduleGlenn Kasten2013-07-1913-21/+69
| | |_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 8834855 Change-Id: I4cd842cdfb09d2aaaaab9df9ac3bec6179709bd3
* | | | | | | Enable support for explicitly requesting an encoded keyframe from the vp8Andreas Huber2013-07-192-2/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | encoder. Change-Id: I370d5831f7d6037faf361a92521390f19f179cbe