summaryrefslogtreecommitdiffstats
path: root/services
Commit message (Collapse)AuthorAgeFilesLines
* fix incoming call audio start time.Eric Laurent2013-09-231-9/+10
| | | | | | | | | | | | | commit cec4abb fixing issue 6720482 had a flaw that would insert commmands at the wrong position in the audio policy service command thread queue causing other commands to be delayed more than expected. A change in track stop timing introduced by commit bfb1b83 made this issue visible when answering a call. Bug: 10860012. Change-Id: Iec769112f14e13d13b64628b808e43663e33771c
* Merge "Camera2/3: For still captures, use widest FPS range available." into ↵Eino-Ville Talvala2013-09-203-2/+43
|\ | | | | | | klp-dev
| * Camera2/3: For still captures, use widest FPS range available.Eino-Ville Talvala2013-09-203-2/+43
| | | | | | | | | | | | | | | | | | | | Instead of using the application-selected preview FPS range for still captures, select the widest FPS range advertised by the device and use it for still captures instead, to give the HAL the widest range of exposure values to choose from possible. Bug: 10842868 Change-Id: I0e24f5eb713a4f8df116cd5979a84390cc0974d7
* | Merge "audioflinger: implement getTimestamp() for offloaded tracks" into klp-devEric Laurent2013-09-203-12/+34
|\ \ | |/ |/|
| * audioflinger: implement getTimestamp() for offloaded tracksEric Laurent2013-09-203-12/+34
| | | | | | | | | | Bug: 9587132. Change-Id: Ie9d5f4cca96306d08bc9a2dbd6edd8953096702d
* | Merge "audioflinger: fix lost offload thread resume event" into klp-devEric Laurent2013-09-203-30/+37
|\ \
| * | audioflinger: fix lost offload thread resume eventEric Laurent2013-09-193-30/+37
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was possible that a resume request signaled by addTrack_l() while waiting for an async write callback is lost. This is because mSignalPending was not set and waitingAsyncCallback_l() would pause the thread loop before executing prepareTracks_l(). The fix consists in using signal_l() method to wake the thread loop o that mSignalPending is set. Also make sure that sleepTime is reset to 0 when resuming to make sure that we write any remaining bytes to the HAL. Bug: 10810347. Change-Id: If9a3b22cc3b9e6eb384a56c48c40e6258d0896ad
* | Merge "camera2: Tell all streams to ignore global device UI rotation" into ↵Igor Murashkin2013-09-192-0/+83
|\ \ | | | | | | | | | klp-dev
| * | camera2: Tell all streams to ignore global device UI rotationIgor Murashkin2013-09-182-0/+83
| |/ | | | | | | | | | | | | | | - Also use android.sensor.orientation to set the right transform flags automatically. Bug: 10804238 Change-Id: I10caf8331f19e107c461696963cc10f597c91d83
* | audioflniger: fix leaked audiosession referencesEric Laurent2013-09-181-1/+19
|/ | | | | | | | | | | | | | acquireAudioSessionId() should not create session references if the caller is not listed in the known notification clients. It happens when the MediaPlayer or AudioTrack is created by the mediaserver on behalf of a client (e.g CameraService). In this case releaseAudioSessionId() can be called from a different pid and the session reference will not be removed. Also we will not be able to remove the reference if the client process dies. Bug: 10606426. Change-Id: Ibb5e27518daeb484a2e66302e4c6221cbaca5b70
* more support for audio effect offloadEric Laurent2013-09-186-57/+136
| | | | | | | | | | | | | | | | Offloading of audio effects is now enabled for offloaded output threads. If an effect not supporting offload is enabled, the AudioTrack is invalidated so that it can be recreated in PCM mode. Fix some issues in effect proxy related to handling of effect commands to offloaded and non offloaded effects. Also fixed a bug on capture index in software Visualizer effect. Bug: 8174034. Change-Id: Ib23d3c2d5a652361b0aaec7faee09102f2b18fce
* Merge "Camera3: Always set a trigger ID for an active trigger" into klp-devEino-Ville Talvala2013-09-162-0/+51
|\
| * Camera3: Always set a trigger ID for an active triggerEino-Ville Talvala2013-09-162-0/+51
| | | | | | | | | | | | | | | | | | | | | | This is to work around HAL implementations that expect to see an ID for every trigger. Use a dummy trigger ID of 1, since 0 has special meaning for older HALs. Bug: 10720617 Change-Id: I9cb1b8dbcb113cb9e737e5adb04032fd61a54c12
* | Camera: setCallBackWindow only if callback surface is usedZhijun He2013-09-161-1/+1
| | | | | | | | | | | | | | | | | | Calling setCallBackWindow without checking the previewCallbackSurface could make the stream to be deleted during callback stream operation, which is bad because the preview is still active and the delete fails. Bug: 10730496 Change-Id: I8addac25e5aa7901bf200d730c749bee2c088090
* | Camera: Don't overwrite the error statusZhijun He2013-09-151-1/+1
|/ | | | | Bug: 10749544 Change-Id: I6096effde03e18ee1b8c63cf3b36dce0344054c5
* Merge "audioflinger: fix ro.audio.silent in offload mode" into klp-devEric Laurent2013-09-141-2/+4
|\
| * audioflinger: fix ro.audio.silent in offload modeEric Laurent2013-09-131-2/+4
| | | | | | | | Change-Id: I5a1a79000d53146689b0a198cc5419c36509703f
* | Merge "Camera: Limit supported preview sizes" into klp-devZhijun He2013-09-132-20/+61
|\ \
| * | Camera: Limit supported preview sizesZhijun He2013-09-132-20/+61
| |/ | | | | | | | | | | | | | | | | | | | | The ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES can provide sizes as large as jpeg sizes, which could cause potential issues when trying to do full size still capture and full size preview. This is not supported by many devices due to hardware limitation. This change limits the preview (as well video) size to no more than 1080p. Bug: 10625115 Change-Id: I9467ab843553ec06e8249b4a17c0ecf4c6d6f04e
* | audioflinger: longer offload thread standby delayEric Laurent2013-09-132-9/+24
|/ | | | | | | | | | | | | | - Increase offloaded output thread standby delay to 1 second to allow transition between tracks with going to stanby if reusing the same audio track (gapless) - Make sure pause/flush/resume sequence is sent to the HAL in the right order - Fix format display in track dump Bug: 8174034. Change-Id: I43ef6f8fdbf7427e4eff6cc2d0665d7d1463ea8a
* Merge "Fix AudioTrack shared memory leak" into klp-devGlenn Kasten2013-09-122-1/+14
|\
| * Fix AudioTrack shared memory leakGlenn Kasten2013-09-112-1/+14
| | | | | | | | | | Bug: 2801375 Change-Id: I50e15164fe310f69ea019dca5b49171a02bc6992
* | Merge "audioflinger: add HOTWORD audio source." into klp-devEric Laurent2013-09-126-2/+33
|\ \ | |/ |/|
| * audioflinger: add HOTWORD audio source.Eric Laurent2013-09-106-2/+33
| | | | | | | | | | | | | | | | | | | | HOTWORD is a special capture audio source that uses the same audio tuning as VOICE_RECOGNITION but allows an active capture to be preempted. Bug: 10640877. Change-Id: Iea09a11cbcdbacc8d434e5230e7559dcd1b44ac0
* | Merge "camera3: Dump latest request sent with dumpsys" into klp-devIgor Murashkin2013-09-092-1/+78
|\ \
| * | camera3: Dump latest request sent with dumpsysIgor Murashkin2013-09-062-1/+78
| | | | | | | | | | | | | | | Bug: 10606535 Change-Id: I0dd5ca3e09f45701659ab9ebd3b51939a2f6e6ba
* | | Merge "audioflinger: no effects on offloaded tracks" into klp-devEric Laurent2013-09-095-13/+83
|\ \ \
| * | | audioflinger: no effects on offloaded tracksEric Laurent2013-09-095-13/+83
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Invalidate offloaded tracks when an effect is enabled so that the track is recreated in PCM mode and the effect can be applied. This is temporary until effect offloading is implemented. Bug: 8174034. Change-Id: I77b8b54a10db6cb8334be76d863ea7e720eaad09
* | | Camera: Correct stream id typesZhijun He2013-09-088-21/+21
|/ / | | | | | | | | Bug: 10604704 Change-Id: I223ac5d200eb6439c08955fb7ad586592099fbae
* | Camera: Send VIDEO_SNAPSHOT intent for video snapshot caseZhijun He2013-09-061-0/+6
|/ | | | | Bug: 9924539 Change-Id: Ief39eff79c31f2c2aa5df2fe1a0f04c4afc74690
* audioflinger: remove async write race conditionsEric Laurent2013-09-062-53/+100
| | | | | | | | | Remove possible race conditions between async callback thread and offload thread when clearing and setting the draining and write blocked flags. Bug: 8174034. Change-Id: I7af10491f39dc0e7d7414862a9d8e763daa2e2b7
* Merge "camera: Fix race condition between setParameters() and ↵Ruben Brunk2013-09-061-0/+1
|\ | | | | | | stopPreview()." into klp-dev
| * camera: Fix race condition between setParameters() and stopPreview().Ruben Brunk2013-09-051-0/+1
| | | | | | | | | | Bug: 10414772 Change-Id: I928cb3935afb101da8a7931f88c27dccdb03b4a9
* | Fix CameraService error flag when running HAL1 with API2.Ruben Brunk2013-09-041-2/+2
|/ | | | | | Bug: 10620944 Change-Id: I44c0d09a3d313ae8f724fbe61fa5f36cf5b38b6d
* Fix miscellanous AudioTrack::getTimestamp() bugsGlenn Kasten2013-09-031-1/+5
| | | | | | | | | | | | | | Check that get_presentation_position is non-NULL before calling. AudioTrack::getTimestamp not implemented for fast tracks. Fix typo in Track::getTimestamp(). Fix bugs in AudioTrack::getTimestamp after stop: - getTimestamp while stopped is not allowed. - stop, start, getTimestamp now returns the correct value. Change-Id: Ie8d9dc1f28d8927634e04175a68b147ffc2ea8eb
* FastMixer computes presentation timestamps for fast tracksGlenn Kasten2013-09-031-1/+46
| | | | | | and forwards them to each track's ExtendedAudioBufferProvider::onTimestamp(). Change-Id: I06fb9586bb7e20d5c0289abdc8cac6cd3fd2f6e8
* Add ExtendedAudioBufferProvider::framesReleased and onTimestampGlenn Kasten2013-09-032-0/+11
| | | | | | | and implement them in SourceAudioBufferProvider using the associated NBAIO_Source, and in Track using the associated AudioTrackServerProxy. Change-Id: I60dc4adba63fc1dc452ff16caf347e4a7c8242c2
* Merge "Add NBAIO_Sink::getTimestamp()" into klp-devGlenn Kasten2013-09-031-1/+3
|\
| * Add NBAIO_Sink::getTimestamp()Glenn Kasten2013-09-031-1/+3
| | | | | | | | | | | | | | | | | | | | with a real implementation in AudioStreamOutSink for dummy implementation initially in MonoPipe. Use in AudioFlinger::PlaybackThread::threadLoop_write() to keep the input to the timestamp latch up-to-date. Change-Id: I10ef277991b63bb43d55d6f3df75116ef32246cd
* | Camera2/3: Increase precapture start timeoutEino-Ville Talvala2013-09-031-1/+1
|/ | | | | | | | | | | | | | | | Currently, we only wait 200 ms for the HAL to switch to the precapture state. This is insufficient at low preview frame rates (dark conditions, ~10 fps), where a 3-request-deep HAL pipeline will take 300 ms to produce a precapture trigger output. In those cases, we would prematurely skip the precapture sequence, causing bad quality pictures. Since this is a fallback timeout to prevent deadlock in case of a bad HAL or framework implementation, increase the timeout to 1 second. Has no impact on correctly-working implementations Bug: 10430191 Change-Id: I08e99f8e7f3beb8f15dcee32632cdebfe3dca8b3
* 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