summaryrefslogtreecommitdiffstats
path: root/services
Commit message (Collapse)AuthorAgeFilesLines
* audioflinger: offloaded tracks flush/pause orderEric Laurent2013-08-301-4/+6
| | | | | | | Make sure that a flush received after a pause is forwarded to the HAL after the pause. Change-Id: Ib3221f70c59f8b3dbbac20b23104f6b779b75be0
* Merge "camera: Fix deadlock when sending callbacks during disconnect" into ↵Igor Murashkin2013-08-301-6/+4
|\ | | | | | | klp-dev
| * camera: Fix deadlock when sending callbacks during disconnectIgor Murashkin2013-08-291-6/+4
| | | | | | | | | | Bug: 10552448 Change-Id: Ie93ba744ae6705aa657f980ae8e08ec624feeb39
* | Merge "Camera3: Be busy as soon as work arrives." into klp-devEino-Ville Talvala2013-08-302-1/+19
|\ \
| * | Camera3: Be busy as soon as work arrives.Eino-Ville Talvala2013-08-292-1/+19
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | RequestThread's internal busy flag (mPaused) was not being immediately set when new work was submitted to it. This allowed for a race condition where a capture() followed by an immediate waitUntilDrained() would immediately return from the wait. Set the mPaused flag to false immediately in capture() and setStreamingRequest() to avoid this, instead of waiting until the end of the next RequestThread iteration. Bug: 10531739 Change-Id: I54a79fe5361d527ec717f41ad805e9b319a48cd8
* | Implement Track::getTimestamp()Glenn Kasten2013-08-293-2/+41
| | | | | | | | | | | | | | using a new timestamp latch in PlaybackThread, and AudioTrackServerProxy::framesReleased() which returns mServer. Change-Id: I1ebfba968c773faaab95648c272fd3ebd74718d6
* | Add AudioFlinger::PlaybackThread::Track::getTimestamp()Glenn Kasten2013-08-292-1/+13
| | | | | | | | | | | | | | with a dummy implementation initially, and use it in AudioFlinger::TrackHandle::getTimestamp() Change-Id: I2da88fc52a135a7f0d9fd9538986e919dc8ccd3b
* | Add IAudioTrack::getTimestamp()Glenn Kasten2013-08-292-0/+6
|/ | | | | | | | | | with dummy implementation in AudioFlinger::TrackHandle, and implement AudioTrack::getTimestamp() using IAudioTrack. Also document invariant that mAudioTrack and control block are always non-0 after successful initialization. Change-Id: I9861d1454cff7decf795d5d5898ac7999a9f3b7e
* Camera2: Add flush supportEino-Ville Talvala2013-08-237-3/+80
| | | | | | | | - On HAL2 devices, fall back to wait until idle - On HAL3 devices, call HAL flush method Bug: 9758581 Change-Id: Ie1c570a15f6590a1ee6c271e3b989c48079b468a
* Camera1: Set preview to be asynchronous, and remove dead codeEino-Ville Talvala2013-08-215-39/+15
| | | | | | | | | | | | | - Use the controlledByApp flag to make sure application-bound preview buffer queue is asynchronous as before - Remove setPreviewDisplay in service, since it is no longer in the binder interface - Rename setPreviewTexture to setPreviewTarget, to make it clear it's the only game in town now. Rename only on the binder level and service for now. Bug: 10312644 Change-Id: Icd33a462022f9729a63dc65c69b755cb7969857e
* Enforce permission for recording from remote submix.Jeff Brown2013-08-163-0/+20
| | | | | Bug: 10265163 Change-Id: I2395036bac6e10baeaf6ea4bc3093bd9dd98742d
* Refactor CameraService to handle errors properly.Ruben Brunk2013-08-162-64/+81
| | | | | | | | Bug: 10361136 -Connect calls now return status_t error flags. Change-Id: Idca453b111e5df31327f6c99ebe853bb2e332b95
* separte producer and consumer interfacesMathias Agopian2013-08-069-34/+18
| | | | | Bug: 9265647 Change-Id: Iefabc11e4bd2e2e8ffd31160476c450affe6629c
* Merge "RecordThread::createRecordTrack_l use flags for fast tracks"Glenn Kasten2013-08-062-0/+59
|\
| * RecordThread::createRecordTrack_l use flags for fast tracksGlenn Kasten2013-08-022-0/+59
| | | | | | | | | | | | | | Look at client's request for a fast track in the flags parameter, and check whether the request can be satisfied. Change-Id: I65ddaeb1b85670fe9066076f638bfed0cda01c0d
* | Merge "RecordTrack::createRecordTrack_l flags are in/out"Glenn Kasten2013-08-053-3/+3
|\ \ | |/
| * RecordTrack::createRecordTrack_l flags are in/outGlenn Kasten2013-08-023-3/+3
| | | | | | | | | | | | | | | | The flags are currently unused, but will be used for requesting a fast track. Making flags in/out will allow reporting back up to client that the request is denied. Change-Id: Ifbee57da3632ce130551065a426577fb97b1a68d
* | Merge "IAudioFlinger::openRecord track_flags_t flags is in/out"Glenn Kasten2013-08-052-3/+3
|\ \ | |/
| * IAudioFlinger::openRecord track_flags_t flags is in/outGlenn Kasten2013-08-022-3/+3
| | | | | | | | | | | | This will allow AudioFlinger to tell client it is denying a request. Change-Id: Iff2be3ad6636371bbda9c9899a283c94620c1f06
* | Merge "Camera3: Provide consumer usage flags to HAL for each stream"Eino-Ville Talvala2013-08-057-4/+42
|\ \ | |/ |/|
| * Camera3: Provide consumer usage flags to HAL for each streamEino-Ville Talvala2013-08-057-4/+42
| | | | | | | | | | | | | | | | At stream configure time, pass on the stream's consumer usage flags to the HAL, to speed up final hardware configuration. Bug: 9592202 Change-Id: Ie467be053be36a09e482f5f05cad65df42d66476
* | Merge "Report underruns for fast tracks also"Glenn Kasten2013-08-023-16/+8
|\ \
| * | Report underruns for fast tracks alsoGlenn Kasten2013-07-313-16/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a regression that was introduced earlier by commit 9f80dd223d83d9bb9077fb6baee056cee4eaf7e5 called "New control block for AudioTrack and AudioRecord". That commit broke underrun reporting for fast tracks. Also remove Track::mUnderrunCount, which counted the number of underrun events, and was only used by dumpsys media.audio_flinger. Now dumpsys media.audio_flinger reports the number of underrun frames, Isolated underrun-related control block accesses via the proxy, so that the server is not directly poking around in the control block. The new proxy APIs are AudioTrackServerProxy::getUnderrunFrames() and AudioTrackServerProxy::tallyUnderrunFrames(). getUnderrunFrames() returns a rolling counter for streaming tracks, or zero for static buffer tracks which never underrun, but do a kind of 'pause' at end of buffer. tallyUnderrunFrames() increments the counter by a specified number of frames. Change-Id: Ib31fd73eb17cbb23888ce3af8ff29f471f5bd5a2
* | | am 6d4d8790: am b687ff9f: Merge "Fix mismatched delete/new couple"Glenn Kasten2013-08-011-2/+2
|\ \ \ | | | | | | | | | | | | | | | | * commit '6d4d879037a495f9a4276a6996d1845594ce9090': Fix mismatched delete/new couple
| * \ \ am b687ff9f: Merge "Fix mismatched delete/new couple"Glenn Kasten2013-08-011-2/+2
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * commit 'b687ff9f2e02790e8a8e3964cb73e87546cd72dd': Fix mismatched delete/new couple
| | * | | Fix mismatched delete/new coupleAndrei V. FOMITCHEV2013-07-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In RecordThread::readInputParameters(), mRsmpInBuffer is allocated with new[] and should be freed with delete[] instead of delete. This error has been found by valgrind. Change-Id: I2f947abb658a21a7d1e61eebb99270cb37d2d147 Signed-off-by: Andrei V. FOMITCHEV <andreix.fomitchev@intel.com> Signed-off-by: David Wagner <david.wagner@intel.com> Signed-off-by: Jack Ren <jack.ren@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
* | | | | Merge "Camera: fix the metadate parcel write issue"Zhijun He2013-07-311-4/+4
|\ \ \ \ \ | |_|_|/ / |/| | | |
| * | | | Camera: fix the metadate parcel write issueZhijun He2013-07-311-4/+4
| | |_|/ | |/| | | | | | | | | | | | | | | | | | Also rename the frameId to requestId to make it less confusing. Change-Id: I14a20b6fcabb86294afb31fc0c56397e185c1373
* | | | Merge "Add resampler comments and fix a typo"Glenn Kasten2013-07-304-4/+16
|\ \ \ \ | |/ / / |/| | |
| * | | Add resampler comments and fix a typoGlenn Kasten2013-07-304-4/+16
| | | | | | | | | | | | | | | | Change-Id: Ie071673875f663de4212eed4a4dff89d51a5a915
* | | | Camera: Rename new API to camera2, rearrange camera serviceEino-Ville Talvala2013-07-3059-165/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Support API rename from photography to camera2 - Reorganize camera service files - API support files to api1/, api2/, api_pro/ - HAL device support files into device{1,2,3}/ - Common files into common/ - Camera service remains at top-level Change-Id: Ie474c12536f543832fba0a2dc936ac4fd39fe6a9
* | | | Move control block mName to createTrack() outputGlenn Kasten2013-07-304-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is part of a series of CLs to clean up the shared memory control block, by removing any fields that don't have to be there. Change-Id: I6e51003a1293b6800258c31b22cff2eba42162e7
* | | | Rename control block flags to mFlagsGlenn Kasten2013-07-302-11/+11
| | | | | | | | | | | | | | | | Change-Id: I7b6d31e24531954ab1ecdf3ed56c19433700bd89
* | | | Merge "AudioRecord and HAL input stream must be 16-bit PCM only"Glenn Kasten2013-07-302-7/+17
|\ \ \ \
| * | | | AudioRecord and HAL input stream must be 16-bit PCM onlyGlenn Kasten2013-07-242-7/+17
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently there are 16-bit PCM assumptions in several places for capture: - resampler API - mRsmpInBuffer and mRsmpOutBuffer - RecordThread::threadLoop upmix, downmix, and resampling - possibly other places Until those assumptions are removed, this CL enforces 16-bit PCM in both client and server at all places where a format is checked. Change-Id: I08b0570bff626ad0d341804825a72c14e61b4233
* | | | Rename control block server to mServer and add commentsGlenn Kasten2013-07-302-9/+10
| | | | | | | | | | | | | | | | Change-Id: Ieabd91acee92d0e84e66fbd358df5282b856306e
* | | | Merge "Fix theoretical race using TrackBase::sampleRate()"Glenn Kasten2013-07-302-5/+8
|\ \ \ \
| * | | | Fix theoretical race using TrackBase::sampleRate()Glenn Kasten2013-06-262-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In two places we assumed that TrackBase::sampleRate() would return the same value when it is called twice in the same function. This is not guaranteed; sampleRate() reads from the control block so the return value could change. To fix this, only call sampleRate() once and cache the return value to get a consistent value. This was only a theoretical race. In MixerThread::prepareTracks_l() it would have no bad effect. In TimedTrack::getNextBuffer() it could cause a real problem, but we don't currently support dynamic sample rate ratios for timed tracks. Change-Id: I8e5c33f0121fc058d1e70c2ab5e9135397d3e0b7
* | | | | Remove CC_LIKELY and CC_UNLIKELY where not neededGlenn Kasten2013-07-293-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only keep them in performance-sensitive code Change-Id: Ib257ddd7bc39ce9896997ffae008c524ac743d01
* | | | | Rename RecordThread::mInputBytes to the more generic mBufferSizeGlenn Kasten2013-07-292-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This prepares for using it in PlaybackThreads later Change-Id: Id90a92aa6372e4b69914b0008cef07296ca5d6a3
* | | | | Move members from ThreadBase to PlaybackThreadGlenn Kasten2013-07-292-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move mNormalFrameCount and frameCountHAL(), since they're not used by record threads. Also comment which fields are updated by readParameters(). Change-Id: I5fc0a8a89cc637976f22d49271a5a3e136dab4e1
* | | | | Merge "Use standard name and type for channel mask"Glenn Kasten2013-07-291-3/+3
|\ \ \ \ \
| * | | | | Use standard name and type for channel maskGlenn Kasten2013-07-241-3/+3
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | Former name 'channels' was ambiguous with respect to channel count. Change-Id: I716f792d95a7e0c787d27514ad6e93dbcef8a415
* | | | | Merge "camera2 api: Override default RGBx formats to IMPLEMENTATION_DEFINED"Igor Murashkin2013-07-291-2/+2
|\ \ \ \ \
| * | | | | camera2 api: Override default RGBx formats to IMPLEMENTATION_DEFINEDIgor Murashkin2013-07-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 9487482 Change-Id: I09d3b4e41454d350c4bc7b1f8e893c3dad655e73
* | | | | | Merge "Simplify getParameters()"Glenn Kasten2013-07-291-12/+6
|\ \ \ \ \ \
| * | | | | | Simplify getParameters()Glenn Kasten2013-07-251-12/+6
| | |/ / / / | |/| | | | | | | | | | | | | | | | Change-Id: Iedfeca3cd477d023c350d6d4e6eed874ee467a32
* | | | | | Treat mChannelCount as uint32_t consistentlyGlenn Kasten2013-07-293-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mChannelCount was 8-, 16-, or 32-bits Change-Id: I2cc2fedf3e33144e5c8bbd9894763282d9217f63
* | | | | | Merge "Move local variable declarations to point of first use"Glenn Kasten2013-07-292-3/+2
|\ \ \ \ \ \
| * | | | | | Move local variable declarations to point of first useGlenn Kasten2013-07-252-3/+2
| |/ / / / / | | | | | | | | | | | | | | | | | | Change-Id: Ideb83dea2c3002651c34fa646753cba598e29e93