Commit graph

100 commits

Author SHA1 Message Date
Shuzhen Wang
22f6dcec7e Camera: Use original dataspace/format for 3.5 device
Starting from CameraDeviceSession 3.5, for IMPLEMENTATION_DEFINED pixel
format, configureStreams call uses original format and dataspace instead
of the overridden value.

This makes sure the HAL interface behavior is consistent between first
and subsequent processCaptureRequest() calls.

Test: Camera CTS and partner testing
Bug: 131864007
Change-Id: Id701141d2c11089ef063fd3f32444212855f84ab
2019-06-06 07:50:50 -07:00
Shuzhen Wang
915115e381 Camera: Add support for IMapper 3.0
Use IMapper 3.0 if available. Otherwise, fall back to IMapper 2.0.

Test: Update camera VTS test passes
Bug: 128013727
Change-Id: I9bb54bbc290f1b90ef593dee9796b22b0dd49671
2019-05-14 10:39:25 -07:00
Yin-Chia Yeh
0d540b3e75 External Camera: support less thumbnail sizes
Since larger thumbnail sizes might hit the app1 size limit
of 64KB.

Test: camera CTS
Bug: 119775355
Change-Id: I9d8d21ac0784c53b42c536cfa09a8c40c4f15ea0
2019-04-25 14:55:22 -07:00
Emilian Peev
5874bba486 Camera: Avoid using an uninitialized physical camera id
'mStreamMap' entries can be inserted by several versions
of HIDL API calls. If the fields are initialized by an
older version, then make sure that newer additions are
always initialized in the respective API method.

Bug: 73885805
Test:
adb shell
/data/nativetest64/VtsHalCameraProviderV2_4TargetTest/VtsHalCameraProviderV2_4TargetTest
--hal_service_instance=android.hardware.camera.provider@2.4::ICameraProvider/legacy/0

Change-Id: Ib5bd8f608da05f628c52d288c518cebbe964182b
2019-04-04 13:27:09 -07:00
TreeHugger Robot
9cc43c58a4 Merge "Camera: cleanup external camera HAL fence FD logic" 2019-03-15 18:17:50 +00:00
TreeHugger Robot
cccae8396b Merge "Y16 format enablement for external provider" 2019-03-15 01:23:16 +00:00
Yin-Chia Yeh
965d9dd821 Camera: cleanup external camera HAL fence FD logic
Treat all non-negative integers as valid FD.

Test: webcam smoke test
Bug: N/A
Change-Id: I5fd52c0d195d2d4b63d70d66f10bd2a3ea99985c
2019-03-14 14:21:01 -07:00
Emil Jahshan
eed0040e21 Y16 format enablement for external provider
added Y16 (depth) support for the external provider.
refactored initOutputCharsKeys to support both depth and color metadata according to the connected camera.
the VTS changes will be pushed to pie-vts-dev

Test: tested on intel depth camera D415 manually in addition to the VTS tests.

Change-Id: I358686e7c4330bb180dec4a9cce3bc1cf5475260
Signed-off-by: Emil Jahshan <emil.jahshan@intel.com>
2019-03-14 14:06:17 -07:00
Eino-Ville Talvala
d1ce4e664a Camera: Centralize OWNERS
Test: Builds
Change-Id: I9b8d1675566db44b959c633c25ceaf61a6dc08db
2019-03-13 15:15:45 -07:00
Steven Moreland
7f4e21adda Merge "Update makefies: no 'types'" am: 4ee5ec1469 am: bab622f6a6
am: 7224bc9bcf

Change-Id: I434939e0770afa436c532a945542fce30a71ef7d
2019-03-04 16:05:59 -08:00
Steven Moreland
a878aee9ab Update makefies: no 'types'
Bug: 123976090
Test: N/A
Change-Id: I30fb04c81889b62775e1b764b965fdb0f893de17
2019-03-04 11:27:17 -08:00
Yin-Chia Yeh
9e3079b0de Camera: remove stream_configuration_counter from camera3.h
Handle the race issue in the wrapper HAL instead of letting HAL
implementation handing it.

Test: Pixel 3 + camera CTS + GCA
Bug: 120986771
Change-Id: Iff97fcaa969bea6668679c57642e4322c4ca5c19
2019-02-14 14:18:01 -08:00
Jayant Chowdhary
48f3952ffc Documentation updates to camera HAL interfaces.
Bug: 124248114

Test: mm -j64

Change-Id: If1cf0e2d464ac62e5897b8faaf4835d06c12edd8
Merged-In: Ibc2415531a16e42ae81e33c3bdb28aca08e6a5fe
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2019-02-12 11:16:17 -08:00
Shuzhen Wang
892e826a32 Camera: Handle binder call failure due to static metadata size
For physical camera static metadata, we should reduce its size before
passing it across binder if possible.

Test: Camera CTS
Bug: 124129552
Change-Id: I0d9129642ddcbb4c1a1c7fcf7a88bac734be4f5a
2019-02-12 08:54:45 -08:00
Yin-Chia Yeh
c2d3d1ddb5 Camera: support libhardware camera device 3.6
Add buffer management API support.

Test: VTS to be written. Need Pixel device impl to verify.
Bug: 120986771
Change-Id: Icdbc621f8cd17aa0868d3ac361867c44793a268c
2019-01-28 11:22:15 -08:00
Socrates Li
9ada649246 Camera: Document 3.4 metadata selection logic.
Bug: 119575429
Test: Ensure everything still builds.
Change-Id: I6500ab06b8c392310009ecfa0570000742fd069c
Merged-In: I6500ab06b8c392310009ecfa0570000742fd069c
(cherry picked from commit a5cbabbee9)
2019-01-22 13:46:57 -08:00
Shuzhen Wang
eaab6169b1 Camera: Clarify the FMQ read order for request/result
If there are more than one metadata entities being passed
via FMQ, specify the framework read order.

Test: Build
Bug: 119575429
Change-Id: Ia34ac69ce670b1ebeda12d92af490c347f33c15b
Merged-In: Ia34ac69ce670b1ebeda12d92af490c347f33c15b
2019-01-14 16:29:25 -08:00
Socrates Li
a5cbabbee9 Camera: Document 3.4 metadata selection logic.
Bug: 119575429
Test: Ensure everything still builds.
Change-Id: I6500ab06b8c392310009ecfa0570000742fd069c
2019-01-14 16:08:31 -08:00
Shuzhen Wang
17a371de6e Camera: Clarify the FMQ read order for request/result
If there are more than one metadata entities being passed
via FMQ, specify the framework read order.

Test: Build
Bug: 119575429
Change-Id: Ia34ac69ce670b1ebeda12d92af490c347f33c15b
2019-01-14 11:07:39 -08:00
Yin-Chia Yeh
1c30a5e375 Camera: make external camera orientation configurable
Test: webcam preview has correct aspect ratio on phones
Bug: 115774657
Change-Id: I8dcb1a55c4d63c9080f44b85e87d97c138bc5243
2019-01-08 10:54:10 -08:00
Chih-hung Hsieh
df66e3cb29 Merge "Fix performance-for-range-copy warnings" am: d01f7050ac am: 51e835ce22
am: 86fefab5e9

Change-Id: Ib139d710d47a7a51e24ba8ba582b252f5ff6e244
2018-12-17 14:09:52 -08:00
Chih-Hung Hsieh
65ab67312b Fix performance-for-range-copy warnings
Bug: 30413223
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,performance*
Change-Id: I1b76a22eab100a31e77048626e48169fe7eeaf92
2018-12-17 19:57:21 +00:00
Xin Li
5c60a30824 DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
Bug: 120502534
Change-Id: I9e51f516a0ff8cb197e9f3f927cae9e25328a1eb
2018-12-11 14:17:43 -08:00
Emilian Peev
40a8c6ed51 Camera: Add support for stream combination query
Camera devices 3.5 and later can optionally support
stream combination queries. These use the regular
'StreamConfiguration' structure however in contrast
to normal stream configuration, the query will be
much faster and will not cause any HW/SW side effects.
Additionally it will be possible to run stream
combination queries at any time after the camera
device is open.
Implement stream combination query for the external
camera provider.

Bug: 111593096
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check
--skip-preconditions --module VtsHalCameraProviderV2_4Target -l INFO
Change-Id: I59ec936d17dabc89ba49407a750df1cd2e61b145
2018-11-29 16:40:36 +00:00
TreeHugger Robot
f837fa24e6 Merge "Camera: add external camera@3.5" 2018-11-16 11:00:21 +00:00
Yin-Chia Yeh
ee23840bf8 Camera: add external camera@3.5
External camera@3.5 supports the new buffer management
API that allows HAL to request buffer when needed to
optimize the memory usage.

Test: smoke test TestingCamera
Bug: 109829698
Change-Id: Icfbb75a26d8e92e4eb82a680e94e183041a5174d
2018-11-15 10:23:08 -08:00
Chih-hung Hsieh
6e457995b6 Merge "Fix implicit fallthrough warnings." am: 591171a659 am: 9232ca3782
am: ec4022d410

Change-Id: I9489669f4797b188027ba7e3686d1e2ecfebefc4
2018-10-18 23:54:01 -07:00
Chih-hung Hsieh
ec4022d410 Merge "Fix implicit fallthrough warnings." am: 591171a659
am: 9232ca3782

Change-Id: I5f4b3377360d20c2f7adfa7d4eff4dda3b412da8
2018-10-18 23:37:43 -07:00
TreeHugger Robot
4b5ff67c52 Merge "Camera: update camera HAL owners" 2018-10-16 22:15:16 +00:00
Chih-Hung Hsieh
5daaea7cdc Fix implicit fallthrough warnings.
Test: make checkbuild
Bug: 112564944
Change-Id: Ib2b337146de86e4abe40ded5932196f1b8b698c6
2018-10-16 14:22:12 -07:00
chenhg
81ed94e40e Merge "Avoid segfaults if disconnect USB camera while preview." am: 4dce57e459 am: 86ec58ff52
am: a169023679

Change-Id: I6f1b820f87297564c54b3ee656e201ec79838d78
2018-10-16 11:30:03 -07:00
chenhg
a169023679 Merge "Avoid segfaults if disconnect USB camera while preview." am: 4dce57e459
am: 86ec58ff52

Change-Id: I748a644556eb2dd2e68a2e4e965d3b57e8ed4895
2018-10-16 10:50:39 -07:00
Yin-Chia Yeh
ccc05ec9b7 Camera: update camera HAL owners
Add OWNER file to device 3.5 default implementation and
add new owners to existing owner file.

Test: N/A
Bug: N/A
Change-Id: I09bae8a6bbdf48bd27cba8675d979c65b51a3e6b
2018-10-16 08:47:03 -07:00
chenhg
06ced051d9 Avoid segfaults if disconnect USB camera while preview.
BUG: 117575807
Test: manual test by disconnect USB camera while preview.

Change-Id: Ia74b03e7f2a672efd9e9dfd651b5894529daeeee
2018-10-12 14:17:04 -07:00
Yin-Chia Yeh
6a6fe0f47b Camera: new buffer management HIDL APIs
No actual implementations yet.

Test: compile, new VTS to be written
Bug: 109829698
Change-Id: Ibe509dd743a84b147fdfed6599d8f066adb8793b
2018-09-27 11:13:13 -07:00
Yin-Chia Yeh
8fd024c378 Merge "Camera: support torch control on external camera" am: f8007c2000 am: 361f2f9a17
am: fb5d713264

Change-Id: I5dbe1e94b8e6a49a57770717ff6f7c3702e6bb1c
2018-08-30 12:20:58 -07:00
Yin-Chia Yeh
fb5d713264 Merge "Camera: support torch control on external camera" am: f8007c2000
am: 361f2f9a17

Change-Id: I982aa7e7acb3e85c247319757516e85bf7408f82
2018-08-30 12:15:37 -07:00
Yin-Chia Yeh
bbc046ed67 Camera: support torch control on external camera
Claim torch API support though there is no device
actually has a flash unit. This is to workaround
an issue in camera service where it falls back
to legacy camera HAL1 control if the device does
not report torch API support (and external camera
HAL does not implement HAL1)

Test: CtsVerifier FlashLight test
Bug: 113336515
Change-Id: I945b35fecfed3b2698b1e9bb1d8faad8699258d2
2018-08-28 11:22:51 -07:00
Yin-Chia Yeh
4c64118f60 Camera: plumb blob buffer size from framework
Test: blob size is sent from camera service to webcam HAL
      using TestingCamera2
Bug: 72173567
Change-Id: I9937881d98dd7d984da5e6ec929118f5d8fe7c9e
2018-08-16 19:16:32 +00:00
chenhg
a7d82e577a Camera: provide thumbnail size for more jpeg aspect ratios. am: 564cdae552 am: 737cfdf4db
am: 7aa4b087f2

Change-Id: If90e3d059563d514fb69f69854739733542da691
2018-08-09 12:03:35 -07:00
chenhg
564cdae552 Camera: provide thumbnail size for more jpeg aspect ratios.
BUG: 110462045
Test: Camera CTS
Merged-In: I5f5500a5e4d02c3cbaa127cd9f222d241f047044
Change-Id: I5f5500a5e4d02c3cbaa127cd9f222d241f047044
2018-08-09 17:49:57 +00:00
chenhg
781743b4b5 Merge "Camera: allow to configure minimum stream size." am: c2f3b0bcf5 am: 8050b86a96
am: 30faec33a0

Change-Id: I3aa078a9818403d68b212f5a961b252f2c329308
2018-08-08 11:57:57 -07:00
chenhg
f2a6c47a9d Camera: allow to configure minimum stream size.
HW video encoder usually has limitation to encode very small
stream. Camera should avoid to return such streams to avoid
video encoding failure.

BUG: 110654511
Test: CTS android.hardware.camera2.cts.RecordingTest#testSupportedVideoSizes
Change-Id: I6104f2d4efcf7831d1dc6d305c82309e2fd1999d
2018-08-07 15:15:13 -07:00
Yin-Chia Yeh
dd1419ba46 Legacy camera shim: add option to free buffers earlier am: 7d1fdecea5
am: 96ab6781f5

Change-Id: I9625af8482840860aca8022862832137de912377
2018-08-03 16:45:37 -07:00
Yin-Chia Yeh
96ab6781f5 Legacy camera shim: add option to free buffers earlier
am: 7d1fdecea5

Change-Id: I175ecfd4334849886252f9d6fb29aa16f9cfb500
2018-08-03 16:10:11 -07:00
Yin-Chia Yeh
7d1fdecea5 Legacy camera shim: add option to free buffers earlier
This option allows HAL to opt in for the behavior that will free
cached buffers earlier if the libhardware HAL implementation
doesn't cache/reference the cached buffers internally.

Test: buffers are freed earlier when the property is set
Bug: 111850884
Change-Id: I3a10b288c7160c86dc7d3a30d04b5c4903917731
2018-08-03 12:38:30 -07:00
TreeHugger Robot
25cc53cc0c Merge "Camera: allow to configure minimum stream size." 2018-07-03 17:27:24 +00:00
chenhg
8765444e20 Camera: allow to configure minimum stream size.
HW video encoder usually has limitation to encode very small
stream. Camera should avoid to return such streams to avoid
video encoding failure.

BUG: 110654511
Test: CTS android.hardware.camera2.cts.RecordingTest#testSupportedVideoSizes
Change-Id: I6104f2d4efcf7831d1dc6d305c82309e2fd1999d
2018-07-02 12:09:57 -07:00
chenhg
f6d3b2fa3f Camera: provide thumbnail size for more jpeg aspect ratios.
BUG: 110462045
Test: Camera CTS
Change-Id: I5f5500a5e4d02c3cbaa127cd9f222d241f047044
2018-07-02 11:27:21 -07:00
Yin-Chia Yeh
92cd88be57 Merge "Camera: use compact copy when necessary" into pi-dev
am: 918507685e

Change-Id: I059f2a746960ae1512647d5893074b15e7f2a20b
2018-05-23 14:22:56 -07:00