When camera HAL dies and cameraserver is still alive, make sure
we update camera status after HAL re-register itself.
Test: kill hal process and run camera app, CTS
Bug: 63058983
Merged-In: Iba7e6cbebb674994c905f7feb1776acc479b612f
Change-Id: Iba7e6cbebb674994c905f7feb1776acc479b612f
Request thread may race with disconnect call when device is
disconnected in error condition. Acquire mLock when camera
device is updating status tracker to prevent that race
(status tracker being freed and then updated).
In other places where status tracker is updated, there is
a promoted sp to guarantee status tracker remain alive during
the call.
Test: CTS, manual camera testing
Bug: 62420820, 65432229
Change-Id: Id894b5d3482c64125c114f79dbe746c56048fcbe
Merged-In: Id894b5d3482c64125c114f79dbe746c56048fcbe
Due to https://bugs.llvm.org/show_bug.cgi?id=34365, the static analyzer
complains about use of copied `sp`s. In this case, the copy is entirely
unnecessary, since we're just going to destroy the copied-from sp
anyway.
Speed things up a bit + appease the analyzer by moving instead.
Bug: 27101951
Test: mma. Static analyzer no longer complains.
Change-Id: I148212e418cb3f8728383db92b564523525b633a
The size of ae regions may be zero by rounding error.
But it should be at least 1 if metering area size is not zero.
This problem causes CTS fail for
android.hardware.cts.CameraTest#testMeteringAreas on
the device which has the active array width less than 3556
if the preview size is 1920x1080.
Bug: 63795820
Test: ran Camera CTS
Change-Id: Ie3995e40aedba193393df8fd05d95f740a25ef3d
* Owners are selected from top CL approvals or owners.
They will be suggested to review/approve future CLs.
* OWNERS files are recognized by the new find-owners plugin, see .md files in
https://gerrit.googlesource.com/plugins/find-owners/+/master/src/main/resources/Documentation/
Test: build/make/tools/checkowners.py -c -v OWNERS
Change-Id: I7c848855a2d7a0d7f33123ea4ef5c2d03977b495
This change attempts to free buffers managerd by
BufferManager more aggresively to reduce memory pressure.
Also fix a small buffer accounting issue: check detachBuffer
actually returns a non-null buffer.
Test: keep taking single shot in GCA, CTS
Bug: 38483630
Change-Id: I6c64d1dc2244cec4f1300bbf3992f66f2167eed2
- BufferQueue consumer may detach buffers, and BufferManager isn't
aware. Hook up onBufferRemoved callback so that BufferManager's internal
handoutBuffer and attachedBuffer counts can be updated when a buffer
is detached.
- Deleted some code that's not exercised any more.
Test: Camera CTS and burst capture.
Bug: 38238747
Change-Id: I6861da6e013fe5609907f807639c5d691c0c3af9
Providers could have devices with same id but different
API versions. The total number of API1 compatible devices
needs to consider only the unique ids in this case.
Bug: 38237265
Test: Manual using application
Change-Id: I5a31c3cd28f00e8af3029213711505e4075a61b2
Buffers that didn't get a chance to be processed
might still hold valid acquire fences. Check and
close those if necessary.
Bug: 38229510
Test: Manual using application
Change-Id: I8e823a655cc30ed966e277ace090e96c64ba1c8c
Camera service should enumarate newly added
camera providers.
Bug: 37592461
Test: Manual using camera application
Change-Id: I4c886b99127d23148c70ce1e1e773cb8393d91b4
android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.
Test: links
Bug: 33276472
Change-Id: I1e33404a582a3707e0990634467c1fc7430c23a2
(cherry picked from commit 240b83a455)
Check for transaction errors in all calls to the HIDL interface;
return DEAD_OBJECT consistently if a transaction error occurs.
Test: Camera CTS does not regress; killing camera HAL does not kill camera service.
Bug: 37748853
Change-Id: Iab3ad08376e164db340f8f29c3cfc7fdf261cc00
CameraModule is already part of the HIDL wrapper and
is no longer needed in the service code.
Add extra logic in camera provder manager for identifying
camera API1 compatible devices.
Bug: 34392075
Test: Complete Camera CTS
Change-Id: I64a49e9091557c88859872d0c599c5be378db8b5
RAW boost value will be inserted by HIDL wrapper. The logic
needs to move there.
Bug: 34392075
Test: runtest -x
cts/tests/camera/src/android/hardware/camera2/cts/DngCreatorTest.java
Change-Id: I7d4321d728eba11b5ec1345536bb669d70f3cffc
Camera device related code should be agnostic w.r.t.
device version as much as possible. Specifically the
following requirements must hold true:
- Since support for devices 3.0&3.1 is deprecated
"ANDROID_QUIRKS_USE_PARTIAL_RESULT" is no longer considered.
- "ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS" is always
used instead of the deprecated "ANDROID_SCALER_AVAILABLE_JPEG_SIZES".
- Buffer manager for camera streams is used for dynamic buffer
allocation.
- "flush" is always used instead of waiting for buffers to drain.
- Similar to "flush" stream "tearDown" is always available.
- Dead code handling buffer registration is removed.
Bug: 34392075
Test: Manual using camera application
Change-Id: If1b215f785ba61c6991fdf163d4eb18733690471
Make sure we don't keep any stale available callback buffer
references after recording stops. This can lead to resource
leaks.
Bug: 36478361
Test: Complete Camera/Camera2 CTS tests
Change-Id: I9f72b784ba3ae1cf9f9b16064a13b7ba8a1d0394
Bufer handle hashing and comparison currently uses the buffer
'Int' section along with the Fd section. However the values there
can dynamically change after the buffer gets allocated which will
introduce side-effects in the buffer id map.
Bug: 37257356
Test: Complete Camera/Camera2 CTS
Change-Id: I2cf09ced69f155285dae67b3a2502e6b87f7d9cc
Allow shifted metadata when the buffer is allocated by
hwbinder (which might allocate buffers to 4 bytes boundary
on 32-bits CPU)
Test: compile, GCA working
Bug: 37095012
Change-Id: I404b73ac3b460f5ff03cb64001c24f7a05b91396
There could be race in application where finalizeOutputconfigurations
doesn't include any new surface. Do not fail in this case.
Test: CameraStressTest#testBackCameraSwitchPreview
Bug: 36811459
Bug: 35137641
Change-Id: Ic185e6d8bfcb8af5b81a33fbbd2fd4e49cc647ce
If the minimum duration of JPEG is less than the frame duration derived
from maximum fps, enable slowJpeg mode so that JPEG doesn't slow down
preview.
Cap the default max fps to 30 so that the switch between different
sensor modes can be minimized while still allowing the app to go higher
than 30fps.
Test: Camera1 CTS
Bug: 36692074
Change-Id: If4d367ac587c0f4d3620ca2d25063c5a12ebfceb