- RAW capability can exist for multi-camera even if physical cameras are
of different sizes/capabilities.
- FOV for all processes streams must be the same regardless of logical
or physical streams.
- All metadata tags related to pixelArray/preCorrectionActiveArray/activeArray
needs to be mapped properly by the camera HAL.
- Do distortion correction mapping for physical subcamera as well.
Test: Build and read docs, camera CTS, ITS.
Bug: 118906351
Bug: 126220135
Change-Id: I29a61fc3a603561c1d74dc2261600ce4cd3d34cd
These things are ceaseless: /
code reviews, design docs - /
off-by-one errors making a mess
Test: atest CtsCameraTestCases
Bug: 129561652
Change-Id: I807d7ad4740ffe267053fe5da2080f9ecb45aa72
To improve camera launch performance, cache the proxy service
interface. System tracing indicates fetching the interface can take
up to 8-10 ms during real camera opens, which is a percent or two
of total camera startup time.
Test: atest CameraCtsTestCases
Bug: 130173970
Change-Id: Icdf5218b04f608b897dcbf2085f971b04a913f3b
For Camera1-HAL3 shim, the camera ID filtering logic is revised to
handle case of multiple logical cameras facing the same direction,
and are backed by same/different set of physical camera IDs.
Example 1 (all facing back):
ID1 = ID3 + ID4
ID2 = ID5 + ID6
Example 2 (all facing back):
ID5 = ID1 + ID2
ID6 = ID3 + ID4
In both examples, only ID1 will be advertised to camera1 app.
Test: Check cameras on devices with multiple logical cameras
Test: Camera CTS
Bug: 113705942
Change-Id: I76f370938b3311bbe7adcac8eddf8b6cf08e4571
1. Change Camera3Device logs to ALOGV
2. In Camera3OutputStream, only log before we mark stream state
to STATE_ABANDONED
3. Also changed BUFFER_ERROR log to ALOGV
Test: manually check log of GCA mode switch
Bug: 125415787
Change-Id: Ibd83b7010932a8be25d85573d9c9dce9c394f6bb
The physical camera device ID must be present as part
of the capture result extras in case of corresponding
result failure notification.
Bug: 128835627
Test: Camera CTS,
AImageReaderVendorTest
--gtest_filter=AImageReaderVendorTest.LogicalCameraPhysicalStream
Change-Id: I042af8bd85eaadd389b059c2833f352ceb2f40fc
Bug: 120407707
Test: CTS
Test: Use camera to take pictures / record videos (sanity)
Change-Id: I7b29c337d0e217d2eb6a62e2c75ccc550d795e61
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
Additionally initializey the stream id to invalid negative
value in case the Hal tries to verify it during stream
combination queries.
Bug: 128450197
Test: Camera CTS
Change-Id: Ife058e22ef72ee84be82799ed397ca49cd8ea99f
Lazy loading of sound files can speed up camera startup more than 60ms,
it gives users a great experience. Many apps do not playSound when camera
open or they may use their own audio files. so we load audio files as needed.
Bug: 128432959
Test: install wechat app,open camera,use systrace to see the uiThread wait time.
Change-Id: I3b3697cf9d0d919b88276f6d8e7fdd84578f4fcd
Fix the long (>1s) dequeueBuffer call when a stream is managed by
Camera3BufferManager and its consumer end discards free buffers.
Test: CTS, no more long dequeBuffer call in GCA mode switch
Bug: 126054873
Change-Id: I03d6526b076796bb44f15cc2c4a092ff3d04fc1d
Camera service listeners must be able to receive
information about camera access permission changes.
Bug: 121379978
Test: Camera CTS
Change-Id: I2e13fdd35a267901a3caa0e0ce78ab1cea83e7ab
Return buffers managed by HAL buffer manager in disconnect.
Test: kill HAL process and check for buffer leak in cameraserver
Bug: 126889012
Change-Id: I83173c5eaae13ee11eb3f185e7204a2dd8855b4e
Set bufferSize in @3.4::Stream::bufferSize for JPEG_APP_SEGMENTS stream.
Bug: 124999074
Test: Build
Change-Id: I6f24f4273b0d3d18b1bdbf263fc12ed48e857004
Bug: 125464062
Test: GCA (sanity)
Test: Connect to a camera device using a HAL process, change the device user and connect again;
connection is successful
Change-Id: Ia25b961baa396fd383d089e400c6d877b9875955
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
Use libyuv's optimized CopyRow function to improve performance of YUV
tiling.
Bug: 124781199
Test: Camera CTS
Test: TestingCamera2 smoke test
Change-Id: I6af6678099655b7e35ddaccf7cd9aa817ec64a9c
Depth and confidence maps require physical rotation in
case the source color image has similar physical rotation.
The EXIF orientation value will be kept consistent and
set to 0 in case of physical rotation.
Bug: 123699590
Test: Manual using application,
adb shell /data/nativetest64/cameraservice_test/cameraservice_test
--gtest_filter=DepthProcessorTest.*
Change-Id: I5cdd41c89368a1841d53f2195790aa1b55258495
Depth and confidence maps should always use the same
EXIF orientation as the main color image.
Bug: 123699590
Test: Manual using application,
Camera CTS,
adb shell /data/nativetest64/cameraservice_test/cameraservice_test
--gtest_filter=DepthProcessorTest.*
Change-Id: I0d887798e8717cdff81aba10d595dc3ccfe99197
In case the Camera3Device enters a bad state, the
RequestThread can continue to run after disconnect()
completes. This can potentially cause instabilities
because some of the Camera3Device member variables
will become invalid after disconnect() but are still
accessible in code paths triggered by RequestThread.
Avoid using potentially invalid reference by checking
the respective strong pointer.
Bug: 123293729
Test: Manual using application,
Camera CTS
Change-Id: If3305840db89537593370b7f57bccbb257e49cbd
Use static and dynamic metadata to override Exif tags.
Also added back a missing ATRACE_ASYNC_ENDs statement.
Test: Camera CTS
Test: ERROR_BUFFER of internal streams is propagated to app
Test: ERROR_RESULT only results in EXIF not being overridden
Bug: 124066183
Change-Id: Id2c69c6bee04ae724ff5f190b2dd96d0159700c9
1. Fix off by one error in signalStreamFlush call
2. Make sure signalStreamFlush is called before we toggle request
thread idle (which might cause another thread finishing
waitUntilIdle() and thus start calling configureStreams)
Test: Pixel 3 + camera CTS
Bug: 120986771
Change-Id: Ifd6f77ef628ee200c024c7c6a05bde20937c745d
onBufferReleased is no longer reliable indicator of capture
error due to HAL buffer manager feature. Switch to listen
to error callback from HAL directly.
Test: API1 CTS + Pixel 3
Bug: 123952355
Change-Id: I7362942f19356583ec66f259b01e963a1af3a205
When a composite stream is deleted, the previously connected output
surface needs to be disconnected. Otherwise when the composite stream is
re-created with the same output surface, connect() will fail.
Test: TestingCamera2, and Camera CTS
Bug: 79465976
Bug: 109735087
Bug: 124072769
Change-Id: I254238235d306f9be8152110b1c55a7ada46424a
Session parameter changes will by default trigger internal stream
reconfiguration. If possible query Hal whether this sequence
is required for specific parameter values.
Bug: 122609098
Test: Manual using application
Change-Id: I9eaa55b0a552d9753122c16f9470779e2ed8ffec
- Derive HEIC capabilities from camera HAL and media framework.
- Add HeicCompositeStream to encode camera buffers to HEIC buffers.
- Add ExifUtils to overwrite JPEG APP segments and send to media codec.
- Add NDK enums and corresponding format support.
Test: Camera CTS
Bug: 79465976
Change-Id: I0a885e76335f3eba4be0fd42241edb0b7349f284
hwservicemanager now guarantees clients will be held for ~5s before the
callback onClients(false) is called and they are allowed to exit.
Test: On walleye_svelte, manually observe camera behavior and the
lifetime of the lazy camera service process.
Change-Id: Iafbdd73f439da3a4f0fecb069e356d30aa2732b5
Add AIDL method for device-wide physical state updates (such as
folding/unfolding), and wire it up to the new camera provider HAL call.
Also clean up camera provider startup sequence - devices were being enumerated before
the new lazy HAL interface pointers were set up, resulting in many repeated calls
to getService even for a non-lazy HAL.
Also add unit test for CameraProviderManager to verify its section of
the callpath, as well as tests to check that the provider HAL and
hardware service manager aren't queried more than expected during
initialization.
Test: atest cameraservice_test
Change-Id: I5ec60fd9d93b7a2fe4d1a5854fad720a972fe8ea
Failing to add dynamic depth camera characteristics
must not have any additional side effects for the
device info constructor.
In case we encounter any issues report the failure and
try to continue with the intitialization.
Additionally fix a minor typo and remove a debug log.
Bug: 123660999
Test: Manual using application,
Camera CTS
Change-Id: I7b4e723ce3bcaf0e5d4c313ba17bca965e8964d8
We had a typo for which vector we were erase()ing from in an
error case. We fix that typo here.
Test: TreeHugger
Change-Id: Id1d38a5c1955e19415ca2e1c84a3f58763bf83c8
Move all depth photo specific processing in a separate
library and link to it dynamically.
Bug: 109735087
Test: Camera CTS
Change-Id: I00a20b26fc9a1d127ad962a36b5b554dd36f0d41
Add the necessary logic to support dynamic depth metadata.
Bug: 109735087
Test: Manual using application,
Camera CTS
Change-Id: Ic4710872dc596bc718270e1c79d4da53fb850875
Composite dynamic depth streams will be supported
in case camera devices include:
- Dense depth streams which are not exclusive.
- Jpeg/Blob output with sizes that either match depth
or are with similar aspect ratio.
Make a guesstimate regarding the dynamic depth minimum
frame and stall durations.
Bug: 109735087
Test: Manual using application,
Camera CTS
Change-Id: I8a89c7895cf57ce4408e41b1afae9c85d48c4e07
Test: Manually verified apps cannot use the camera when sensor privacy \
is enabled.
Bug: 110842805
Change-Id: Ic3fed8272e90f3f64e0f6c342569c27e1a476014
The support inclues:
- Physical camera specific stream support,
- Physical camera result metadata, and
Test: Newly added NDK CTS test pass
Test: Newly added VNDK test pass
Bug: 120566141
Bug: 115532726
Change-Id: I939b81522ca6c518c0e54ded5d3615f9973a6a65
Drop camera HAL references when unused.
Use ro.camera.enableLazyHal property to toggle behavior on or off.
* If true, the cameraserver drops references to ICameraProvider HALs
when they are not being used for either camera or torch.
* If false (or unset), stores a strong reference to each ICameraProvider
that is registered. This is the same as the old behavior.
Bug: 79374634
Test: Apply CL that lets camera HAL exit when unused. Open camera/enable
torch, close camera/disable torch, check ps -A to see if HAL exits.
Change-Id: I1842f9bf9e862ab74e4ec8aa72fc46fc47782ed0
Add new VendorTagDescriptor member to ProviderInfo, allowing it to cache
the descriptor
Test: Use torch, camera, and run cameraservice_test
Change-Id: Iba5af5dc890b3188a9e55ff5c71421aceec14cbb
In case the app doesn't provide sessionParameters, the VNDK should still
allow endConfigure() to be called to the camera service.
Test: Run test app and observe camera streams properly
Bug: 120505813
Change-Id: Ifa72dca61b8e25cd433d2c02c70b1c8e5e097228
Receive app state updates from ActivityManager and use it to implement
concurrent capture policy.
Bug: 111438757
Test: Manual test with solotester app concurrently with Camera, Duo and
Assistant
Change-Id: I979ad4ecc8b926abb64e1b321b43bd7bd442a8f1
This is to handle lazy hal, where cameraserver doesn't know HAL goes
away.
Test: Observe that the between QS Torch Tile and Camera App is correct.
Bug: 79374634
Merged-In: I2f802b1c409ba3581f0fcacfc0ac5f6059391139
Change-Id: I2f802b1c409ba3581f0fcacfc0ac5f6059391139
capture fps range depend on intent which is different between still capture and video snapshot.
Bug: 119841034
Change-Id: Ib7c653c5f32c451631f208bf7353c06340c43b18
Signed-off-by: Lei Yuan <leiyuan@asrmicro.com>
Cached 3.5 HIDL session needs to be released
in order to destroy the session implementation
on provider side.
Test: Camera CTS
Bug: 119939541
Change-Id: I8b4c403b7bb9f3ac481e240701b5aaad505fdf2e
libmediandk brings in many unneeded dependencies which results in
an abnormal increase in vss. AImageReader_getHGBPFromHandle has been
moved to libmediautils.
Test: mm -j64
Test: showmap <pid of cameraserver> vss before change: 50628
Test: showmap <pid of cameraserver> vss after change: 31256
Change-Id: I4de95d08ae514c252a1e01f3b03e0021c821b72a
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
using transaction id directly is not recommended
so remove permission check in onTransact() and add it into notifySystemEvent()
Bug: 119525871
Test: m -j
Change-Id: I0f2feb5204876fa9b56b9cdb096f25d2226025ec
Merged-In: I0f2feb5204876fa9b56b9cdb096f25d2226025ec
This is to handle lazy hal, where cameraserver doesn't know HAL goes
away.
Test: Observe that the between QS Torch Tile and Camera App is correct.
Bug: 79374634
Change-Id: I2f802b1c409ba3581f0fcacfc0ac5f6059391139
using transaction id directly is not recommended
so remove permission check in onTransact() and add it into notifySystemEvent()
Bug: 119525871
Test: m -j
Change-Id: I0f2feb5204876fa9b56b9cdb096f25d2226025ec
The old implementation only toggle idle when waitUnitlDrained
is explicitly called, but there are some cases where
application don't need to call waitUntilDrained but can still
expect the device goes into idle.
Test: CTS on Pixel3 equipped with webcam HAL
Bug: 109829698
Change-Id: I48c26abcc9c2f1263c2360611c935fc317745e59
Support runtime "SessionConfiguration" queries by camera
clients.
Bug: 111593096
Test: adb shell /data/nativetest64/camera_client_test/camera_client_test
--gtest_filter=CameraClientBinderTest.CheckBinderCameraDeviceUser,
Camera CTS
Change-Id: I1505e7bccdce468490b46ad4546e459354a4cda3
- Add dummy CFA pattern for monochrome camera.
- Handle monochrome camera in DngCreator.
- Fix up static and dynamic metadata tags related to monochrome camera
for older version of devices.
Test: Camera CTS
Test: Capture a DNG file and inspect with LightRoom
Bug: 70216652
Change-Id: I68d2b3d77b7f81bdc9e4129c2a8af10a4f18db3b
SignalPipelineDrain will be sent after the request
thread has stopped sending capture requests so
HAL can expect no more capture requests are sent
after they receive this call.
Test: CTS
Bug: 109829698
Change-Id: I6f75c28ff0998a8edc80f9af9ebe727c585ea6e9
mOutputStreams access used to be protected by mLock, but that has
changed due to:
- Treble interface switched from passing stream pointer to
stream index
- The buffer management API runs in HAL callback thread
Test: CTS
Bug: 109829698
Change-Id: I3561b197f46f07d2a15bb4f52b096f36c73a0407
For some resolutions input HeifWriter surfaces have much higher
acquired buffer count compared to the maximum Hal buffer for the
respective use case. From the tests so far shared streaming doesn't
seem to be affected by the imbalance and the splitter is able to
support this case.
Bug: 110161669
Test: Camera CTS
Change-Id: I129221b0f35e45c8b26f27f94910a6edda8d675b
In case HAL process crashes, addStates() should still send torch state
callback to the app if observer is registered.
Test: Kill HAL process and observe Flashlight icon in quicksettings
Test: Camera CTS
Bug: 117949686
Change-Id: Icee1891ef3993ebb0e7eed2dc281db8cd6106e84
Currently we always sync using the latest request id
before standard capture. The purpose is to avoid
sending triggers and 3A mode settings out of sync to
Hal. However during regular capture the precapture
trigger is not always used so we should be able to
skip the device sync in this case. This can enable
capture requests to arrive in Hal with one preview
frame earlier.
Bug: 79682338
Test: Camera CTS
Change-Id: I9ea0b03968266d5c8f1e187358f13a21d394ff90
In case the camera device supports ZSL, avoid dropping
preview buffers while video recording is active. Preview
must not get interrupted in this case.
Bug: 117640175
Test: Manual using application, Camera CTS
Change-Id: I9021b4c46428e008298ddef0a86972640b0afa41
Merged-In: I9021b4c46428e008298ddef0a86972640b0afa41
(cherry picked from commit 6c79c9aa7f)
The legacy camera shim layer currently uses various heuristics
in order to determine valid supported preview/video/snapshot
sizes and formats. This makes the code complex and in some
cases the result is not optimal in terms of power and
performance. If the camera supports recommended stream
configurations, then use the suggested stream
configurations to generate the above supported lists.
Bug: 64029608
Test: Camera CTS
Change-Id: I6ed1d50b3d1a854421f3d119be2e32211e8a4c35
The maximum acquired count of the input buffer queue during surface
sharing should be set considering the total maximum acquired count of
individual registered outputs and also the current acquired count
of the input buffer queue. The reason the two can be different is
due to the fact that individual outputs can acquire and also block
buffers from the input. The latter portion contains all buffers
which are still queued but not acquired. This can happen in case
some output acquires the maximum amount of buffers possible then
stops consuming entirely and the camera client continues to reference
it in subsequent capture requests.
To handle this, track the number of acquired buffers in the input
queue and expand (or contract) the maximum acquired count only if
possible. The maximum shouldn't change otherwise because the blocked
buffers could still be used by the unresponsive output at some
later point in time.
Bug: 117982710
Test: Camera CTS
Change-Id: Ia4e743efdf59cb0c9baaea492f78c37d0f2c95b3
In case the camera device supports ZSL, avoid dropping
preview buffers while video recording is active. Preview
must not get interrupted in this case.
Bug: 117640175
Test: Manual using application, Camera CTS
Change-Id: I9021b4c46428e008298ddef0a86972640b0afa41
Add a wrapper around calls to IPCThreadState to
account for the fact that remote HIDL calls may use binder function
implementations internally.Therefore, we need to know whether we are on
a binder / hwbinder thread and call the appropriate IPCThreadState /
hardware::IPCThreadState function internally.
Bug: 110364143
Test: GCA
Test: Third party app
Test: camera CTS (no new failures).
Change-Id: Ibad03fafd2ccc53a5352a6df45cf8f641bc7a3bf
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
Also make the timeout sleeping more granular, so that the wait
won't always be 300ms in case the initial checks fail.
Test: Camera CTS passes
Bug: 110840510
Change-Id: I3f0d09913b10526dd27cecca50c111712da82846
Merged-In: I3f0d09913b10526dd27cecca50c111712da82846
There is a race between the UID turning active and activity
being resume. The proper fix is very risky, so we temporary add
some polling which should hapen pretty rarely anyway as the race
is hard to hit.
Test: camera works fine
cts-tradefed run cts-dev -m CtsCameraTestCases
bug:77827041
Change-Id: I1768d00dc08e6e49cec0099f0a29b7889f9affad
Merged-In: I1768d00dc08e6e49cec0099f0a29b7889f9affad
'disconnectImpl' holds 'mTrackerLock' for its entire scope.
This is not needed and could lead to deadlocks in case the
request thread encounters errors and tries to clean up
any failed requests. In this scenario the request thread will
already hold 'mInflightLock' and then try to acquire
'mTrackerLock' as well. The 'disconnectImpl' context will
acquire 'mTrackerLock' first and at some later point try to
get 'mInflightLock' which will end up in a deadlock.
To avoid this, limit the scope of 'mTrackerLock' within
'disconnectImpl'. The lock purpose is to protect other threads
from accessing invalid 'mStatusTracker' instances and must not
introduce side effects.
Bug: 115784704
Test: Camera CTS, Manual test
Change-Id: I96b039cb454e0c185ecdf0c8072a9494233c1169
Depending on timing a race is possible between two
binder threads that will eventually try to disconnect
the camera device. The first is a regular disconnect call
and the second a binderDied notification in case the
connection terminates before disconnect is able to complete.
Avoid possible instabilities and skip flushing in case the
device is no longer initialized.
Bug: 116514106
Test: Camera CTS
Change-Id: I1a958b2f80d872de89275555e83ac32576cc6792
If HAL overrides stream format, use the overridden format to configure
the buffer queues.
Bug: 113326269
Test: Camera CTS, partner testing
Merged-In: I6b198e8ebfeaeafbda530722d995a12f88f0b35a
Change-Id: I6b198e8ebfeaeafbda530722d995a12f88f0b35a
Refactor code to cache logical camera related info, such that we don't
need to query the camera characteristics multiple times.
Test: Camera CTS
Bug: 79523700
Change-Id: I01733fc9165ec88aadc655491a025627fd622857
In case application sends 2 consecutive setRepeatingBurst, the first
request may be preparing the video stream, whiel the second request
fails the isPreparing check.
Fix this by distinguishing between internal and external prepare. For
internal prepare, allow new requests to come through to the request
thread.
Bug: 114422231
Bug: 109830370
Test: Camera CTS
Change-Id: I55a7271e3924f2cb8cf9c452e934b070a82bc4ca
Camera characteristics for camera clients that don't
hold the camera permission must not contain any
metadata that explicitly requires this permission.
Vendor tags must be absent in this case as well.
Bug: 112160024
Test: Manual using application,
adb shell /data/nativetest64/camera_client_test/camera_client_test
--gtest_filter=CameraCharacteristicsPermission.TestCameraPermission
Camera CTS
Change-Id: I4e34c6ef7bd4315327ca78084fa3dcc175fc8098
Support 3_5 HAL device version for querying physical camera
characteristics.
Test: Camera CTS on Pixel devices
Bug: 79523700
Change-Id: I804cdb5dc75553d6b6f9fb42187a76bd69168179
In extreme cases, HAL needs to wait until all inflight requests
are fulfilled before it can return a buffer, so extend the
getBuffer wait accordingly.
Test: partner testing, smoke test Pixel
Bug: 113660745
Change-Id: I363098004e70b75e11651fe0f1c75efcfda970f4
Decreasing timestamp shouldn't happen in non ZSL or reprocessing case.
When that happens, treat the buffer as error and return to buffer queue
directly.
Test: Camera CTS
Bug: 113670946
Change-Id: I39d3417dd9307d6cc7c90ff357a82604566a9081
Certain devices generate duplicate timestamps for cases like video
recording. So do not treat non-increasing timestamps as fatal for now.
Test: Failed camera CTS on Pixel device
Bug: 113670946
Change-Id: I3708f46111edf031f48f460e4efce9f9c46f174e
Guard against case where timestamp of stream buffers doesn't increase.
Timestamp source is either monotonic or boottime, both of which are
guaranteed to increase.
There are 2 exceptions where timestamp may go back in time:
- For requests where HAL ZSL is enabled, and
- For reprocessing requests
Test: Camera CTS
Bug: 113340974
Change-Id: I0ae9290696d651168150fa5ed7aa13c140a0294f
- Ensure the conversions between pre-correction and active array coordinates
are applied consistenly
- Only some regions were being clamped to ensure they were within the
destination region. Add more clamping, though some outputs still
need to not be clamped, such as face rectangles which may extend outside
the FOV.
- Add simple transform mode since the full transform cannot safely be used
to meet all consistency requirements in Android P
Also update the unit tests to try to check for this corner case and the
simple mode.
Test: adb shell /data/nativetest/cameraservice_tests/cameraservice_test \
--gtest_filter=*Distortion*
Bug: 109766306
Change-Id: Id6f23794d60d5ed9e04b155426741a504487e3d6
Merged-In: Id6f23794d60d5ed9e04b155426741a504487e3d6
(cherry-picked from ee080fed19)
(cherry picked from commit dccebf80ea7e90eedeb914becafc47ca725eb27f)
A non-API1 compatible camera might still has flash
unit and supports setTorchMode.
Test: partner testing
Change-Id: Ic8974afea13318624f35d17af4c4c238ee3fbf85
If HAL overrides stream format, use the overridden format to configure
the buffer queues.
Bug: 113326269
Test: Camera CTS
Change-Id: I6b198e8ebfeaeafbda530722d995a12f88f0b35a
This test was added to TEST_MAPPING but it needs to be packaged
properly in order to be utilized by TEST_MAPPING.
Bug: None
Test: TH Run
Change-Id: I86d885ef12c5725211ca1fc3123ddb10311f7372
- Add cameraservice_test to presubmit TEST_MAPPING
- Fix broken CameraProviderManager test
Test: Fixed test passes; 'atest' in frameworks/av/services/camera/libcameraservice
runs the expected test
Change-Id: Ia1ceaf526884325d56f0e273f89220fdb33493dd
Improve performance during device detach by flushing all
camera requests.
Bug: 80402005
Test: Camera CTS
Change-Id: I3a6864575b1533c77b5478c2390a908892700f6e
Merged-In: I3a6864575b1533c77b5478c2390a908892700f6e
When consumer surface is destroyed, dequeueBuffer may return
DEAD_OBJECT.
We need to treat this condition as ABANDONED so that camera service
stops repeating request. Otherwise, we may run into infinite loop.
Test: Camera CTS
Bug: 111384143
Bug: 111381452
Change-Id: If3348119521e9805085321c7f20abd7cc7f5dd43
Also make the timeout sleeping more granular, so that the wait
won't always be 300ms in case the initial checks fail.
Test: Camera CTS passes
Bug: 110840510
Change-Id: I3f0d09913b10526dd27cecca50c111712da82846
Updating of the mDevice sp<> is racy.
This change will cause the Camera3Device object lives until
the client is destructed (which can be a few seconds after
camera app closed and GC kicking in to delete the client)
The benefit is the dumpDevice can remain lock free.
Also fix a problem where we call virtual function disconnect in
Camera3Device destructor.
Test: the double free problem cannot reproduce
Bug: 112639939
Change-Id: I77762db8f59cf33891631d13fc3bdb3830ae08fb
This would allow other client modules defined in Android.bp to include
libcameraservice as a dependency.
Bug: 110364143
Test: mm -j64
Change-Id: Ia3be563e4fbb27155d6a46278931ca689b8cf8fd
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
If stream being created is a physical stream, the size check should be
against the physical stream's capability.
Test: Camera CTS
Bug: 111288509
Change-Id: Iad8814562694f16f16d9656ec482b8b21a859c44
Merged-In: Iad8814562694f16f16d9656ec482b8b21a859c44
When shutter sound is ON, even if application calls takePicture
without CAMERA_MSG_SHUTTER, the camera service should still play
shutter sound.
Also remove the code using ro.camera.sound.forced since it's
not used any more.
Test: 3rd party app on device with enforced shutter sound
Bug: 111995040
Change-Id: I0d2e888b7f17eff5e5bff8d0f3ec3da7f7ad97b7
The (right, bottom) coordinates of any input rectangles are
exclusive.
Bug: 111885753
Test: Camera CTS,
adb shell /data/nativetest64/cameraservice_test/cameraservice_test
--gtest_filter=DistortionMapperTest.*
Change-Id: Ied956bd154256a10fc4c81d27c93b0ba2e33044d
When HAL supports openLegacy, same camera id can be added more than
once.
Because we now use vector to store API1 compatible camera ids, make
sure no duplicate strings are added.
Test: Vendor camera app using openLegacy, Camera CTS
Bug: 110815837
Bug: 111963599
Change-Id: I327744e102cc75929ebcdf51661f9f4ec7f3acf9
Merged-In: I327744e102cc75929ebcdf51661f9f4ec7f3acf9
(cherry picked from commit 975a39e906)
(cherry picked from commit 258fa2669e)
When HAL supports openLegacy, same camera id can be added more than
once.
Because we now use vector to store API1 compatible camera ids, make
sure no duplicate strings are added.
Test: Vendor camera app using openLegacy, Camera CTS
Bug: 110815837
Bug: 111963599
Change-Id: I327744e102cc75929ebcdf51661f9f4ec7f3acf9
(cherry picked from commit 975a39e906)
It's possible that surface for a stream goes away after
cameraservice configures HAL stream, either during configure_streams
or when session parameters are updated.
In this case, do not put camera device in an error state.
Test: Camera CTS, GCA
Bug: 111581884
Change-Id: I7efc5aa22bc9b60ffaea23d8dae275f9a2bd026d
Improve performance during device detach by flushing all
camera requests.
Bug: 80402005
Test: Camera CTS
Change-Id: I3a6864575b1533c77b5478c2390a908892700f6e
Test: mm -j64
Test: runtest -x src/ in cts/tests/camera; no new tests fail
Change-Id: Id7a8516eb92ce7112f0200cfeaba92278541bfa7
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
HFR should send valid setting for the first request inside a batch.
Bug: 111528642
Test: Slowmo on Pixel 3
Change-Id: Id92a9e23d12b7f9dde3acfc70b656ae39bdaee5b
When consumer surface is destroyed, dequeueBuffer may return
DEAD_OBJECT.
We need to treat this condition as ABANDONED so that camera service
stops repeating request. Otherwise, we may run into infinite loop.
Test: Camera CTS
Bug: 111384143
Bug: 111381452
Change-Id: If3348119521e9805085321c7f20abd7cc7f5dd43
- Ensure the conversions between pre-correction and active array coordinates
are applied consistenly
- Only some regions were being clamped to ensure they were within the
destination region. Add more clamping, though some outputs still
need to not be clamped, such as face rectangles which may extend outside
the FOV.
- Add simple transform mode since the full transform cannot safely be used
to meet all consistency requirements in Android P
Also update the unit tests to try to check for this corner case and the
simple mode.
Test: adb shell /data/nativetest/cameraservice_tests/cameraservice_test \
--gtest_filter=*Distortion*
Bug: 109766306
Change-Id: Id6f23794d60d5ed9e04b155426741a504487e3d6
If stream being created is a physical stream, the size check should be
against the physical stream's capability.
Test: Camera CTS
Bug: 111288509
Change-Id: Iad8814562694f16f16d9656ec482b8b21a859c44
Because onDeviceStatusChanged is reenterable, in the case of camera
provider process crash, the following race condition could happen:
1. Camera provider crashes, onDeviceStatusChanged is called with
NOT_PRESENT. camera service calls disconnect to disconnect from
CameraDevice.
2. Camera provider comes back online, and onDeviceStatusChanged is
called to change the state back to PRESENT.
3. disconnect returns, and the camera state is deleted, resulting in
cameraservice to be in bad state.
This change synchronizes onRegistration and removeProvider to avoid
aforementioned race condition.
Test: Camera CTS
Test: Add delay in removeProvider and kill provider process while camera
is running.
Bug: 110837617
Change-Id: I472f1bfebf770d8eb0b2d7eb5f4a0fa26566bdea
A race condition is possible during access to status tracker
in 'disonnect' and inflight updates like 'registerInFlight' and
'removeInFlightMapEntryLocked'. To avoid this, access is serialized
using 'mLock'. However 'mLock' is also used in other contexts which
under the right conditions could result in a deadlock. One such instance
could occur during consecutive reprocess requests. The request thread
while holding the request lock will try to obtain a free input buffer.
In case the input stream doesn't have any free buffers left, it will
block on an internal condition and wait. In the meantime if another
capture request gets submitted, then the request itself will block on
the request lock within request thread while holding 'mLock' inside
submit helper. This will not allow incoming input buffer results
to get processed as they could call 'removeInFlightMapEntryLocked' and
try to acquire the already locked 'mLock'. The deadlock will continue
until the input stream timeout expires, which will fail the request.
One way to resolve this is by adding a separate lock which will only be
used for the status tracker access synchronization.
Bug: 79972865
Test: Camera CTS
Change-Id: Ic63f891202ba102f6408ed714c5eef29b41404e3
When HAL supports openLegacy, same camera id can be added more than
once.
Because we now use vector to store API1 compatible camera ids, make
sure no duplicate strings are added.
Test: Vendor camera app using openLegacy, Camera CTS
Bug: 110815837
Change-Id: I327744e102cc75929ebcdf51661f9f4ec7f3acf9
This is consistent with the default focal length set by the API1-HAL3
shim.
Test: Camera CTS, FOV test for CtsVerifier
Bug: 110445633
Change-Id: I4ecfb32c7cecdd9c56e04b25cf4d92a86122b2cb
Shared surface outputs currently re-use the transformation
from the input queue directly. However the inverse display
flag will get reset by the queue logic and needs to be set
again before the incoming buffers are sent to the registered
outputs.
Bug: 110641448
Test: Manual using application,
Camera CTS
Change-Id: I36859eb41ccab8459bbd97bad3ea0b6a8575489c
Clients using the legacy API translation layer will
default to face priority scene in case this mode is
supported by the camera device.
Bug: 110259811
Test: Manual using application,
Camera CTS
Change-Id: I370f222c73ea6e133bb6cb334ced2e33a26bb8c5
FrameProcessor will always gather the complete 3A
state before notifying clients. This could introduce
unnecessary delays for camera devices that support
partial results. To avoid this check the pending 3A
state for each algorithm individually and notify about
state changes as soon as possible.
Bug: 110058858
Test: Manual using application,
Camera CTS
Change-Id: Ie197b2adcd884f1296f621f62cef8d53c9dc99c1
There is a race between the UID turning active and activity
being resume. The proper fix is very risky, so we temporary add
some polling which should hapen pretty rarely anyway as the race
is hard to hit.
Test: camera works fine
cts-tradefed run cts-dev -m CtsCameraTestCases
bug:77827041
Change-Id: I1768d00dc08e6e49cec0099f0a29b7889f9affad
Zero weight regions have no actual effect. Skip them.
Also clamp the correction result to be within active
array.
Test: GCA smoke test
Bug: 109766306
Change-Id: I24640ffb564f30dcbc14cf8c97f8100c0bad2640
Face rectangles are actually a pair of points, not rects with
(top, left, width, height).
This is very silly but what can you do.
Test: Check metadata output with forced-on distortion correction
Bug: 74434422
Change-Id: I5c0ede9624a198f1dd68328c2dcfa6788ed2d9d9
- Make cameraserver_test test module reachable by build system
- Fix minor compilation error in CameraProviderManagerTest
- Add tests to verify:
- Initialization of DistortionMapper
- Transforms with an identity distortion function
- Round-trip transform ~1e6 points with a large distortion function
- Raw to corrected transform compared against OpenCV undistortPoints,
using python to generate the comparison coordinate lists as a C++
header
Test: atest cameraservice_test
Bug: 79885994
Change-Id: Iae3d6f9de2e6c79dd5cea5ca35ee5100b38441f4
- API1 + HAL3: Enable HIGH_QUALITY correction for still capture use
cases, FAST for others
- HAL3: When distortion correction is enabled, map coordinate metadata from
corrected to original in capture requests, and from original to corrected
in capture results.
Test: Camera CTS
Bug: 79885994
Change-Id: I79e25d278fe69099770c749f42956fc8e878f7cf
ZSL frames were getting completely discarded in case of fixed
focus camera sensors. This can have performance impact for
legacy camera clients.
Bug: 80482772
Test: Manual using application,
Camera CTS
Change-Id: Ic98c8624226e960cffdcbfcee0b3e34adaf720fb