Commit graph

267 commits

Author SHA1 Message Date
George Burgess IV
2ea148804a camera: fix two potential null pointer uses
Caught by the static analyzer:
hardware/interfaces/camera/device/1.0/default/CameraDevice.cpp:401:9:
warning: Called C++ object pointer is null
[clang-analyzer-core.CallAndMessage]

Bug: None
Test: TreeHugger
Change-Id: Ia6d0a2ab4b4d04cfc171629c7dbf60ead181625d
2019-11-01 13:31:25 -07:00
Nick Desaulniers
e1e932ea20 [hardware][interfaces][camera] fix -Wreorder-init-list
C++20 will require members in a designated initializer to be in order
unlike C99.

Bug: 139945549
Test: mm
Change-Id: I387d30e993719014da50207c7114b0003b9450c5
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2019-10-14 11:05:30 -07:00
Steven Moreland
b3a4d3832e Remove libhwbinder/libhidltransport deps
Since these were combined into libhidlbase.

Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I075670b64eebbbbd6a6ae0e84ad51bf1c6f5ba36
2019-09-06 01:07:02 +00:00
Shuzhen Wang
9d2ea958a6 Camera: Use original dataspace/format for 3.5 device
am: 22f6dcec7e

Change-Id: Iedb4e97abf10be30a257202f6d967b0e807dd0f8
2019-06-06 17:12:37 -07:00
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
d31d87a4d0 Merge "Camera: Add support for IMapper 3.0" into qt-dev
am: 057de3759f

Change-Id: I27626fd07bd275d28a14eeee332e9498a85e9673
2019-05-20 21:56:22 -07:00
TreeHugger Robot
057de3759f Merge "Camera: Add support for IMapper 3.0" into qt-dev 2019-05-21 04:35:47 +00:00
Shuzhen Wang
9d4b457285 Merge "Camera: Allow out-of-order ZSL shutter notify" into qt-dev
am: e4be4c9765

Change-Id: I112efe45e7dcc7d3bb3dd880d1596cb09534a24e
2019-05-17 14:56:12 -07:00
TreeHugger Robot
e4be4c9765 Merge "Camera: Allow out-of-order ZSL shutter notify" into qt-dev 2019-05-17 21:20:43 +00:00
Emilian Peev
c22d6eed67 Merge "Camera: Add fall back properties for FMQ size override" into qt-dev
am: a07b613b59

Change-Id: I1865a18a7bf1078d38bdc01db5916da8a68024d0
2019-05-16 14:48:42 -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
Emilian Peev
5ec377b430 Camera: Add fall back properties for FMQ size override
All system properties in the vendor partition must
start with either "vendor" or "ro.vendor".
Older devices should not be affected but newer
implementations may not be able to override the
FMQ size if needed.
Keep this functionality and provide fall back
properties using "ro.vendor.camera".

Bug: 77865891
Test: Manual using application and modified device configuration.
Change-Id: I23d0ba7a10eaafe98a708277c26579e8a0fec614
2019-05-09 17:13:08 -07:00
Shuzhen Wang
098720bc2c Camera: Allow out-of-order ZSL shutter notify
- Allow shutter notifies of zero-shutter-lag requests with STILL_CAPTURE
intent to be out of order compared to other kinds of requests.
- Shutter notifies of same kind of requests must be in order.

Test: BurstJpegCapture CTS test
Bug: 120604717
Change-Id: Ia31f0d17322cb9b850614413feb1134e16d69552
2019-04-29 14:18:55 -07:00
Yin-Chia Yeh
299d87a167 Merge "External Camera: support less thumbnail sizes" into qt-dev
am: 70e106d961

Change-Id: Id8b8a8e6dde98e1098a4c4d8d187543da1044dc5
2019-04-29 10:43:09 -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
Steven Moreland
99712c08cc Update hidl makefiles for bpfmt
hidl-generated makefiles are now generated such that bpfmt(file) == file.

Bug: 67417008
Test: enable bpfmt hook
Change-Id: I53e5bf67a0d314e1b10c0ba0c7172a7af358ddcc
2019-04-18 18:13:05 -07:00
Steven Moreland
6d494b2346 Merge "Update hidl makefiles for bpfmt" am: ff0bd741ca
am: 96f40f7b02

Change-Id: Idbf030e4993067bdb8181321bca2de00c9b6f7ef
2019-04-18 14:34:45 -07:00
Steven Moreland
1ae4615d9f Update hidl makefiles for bpfmt
hidl-generated makefiles are now generated such that bpfmt(file) == file.

Bug: 67417008
Test: enable bpfmt hook
Change-Id: I1f69d292bc23a7cc293a66110cb02d597e1019ad
2019-04-17 09:38:50 -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
Emilian Peev
22ba924404 Camera: Update 'ERROR_RESULT' documentation
Extend "ERROR_RESULT" documentation and describe how Hal
must notify about physical device result failures and
logical device result failures.

Bug: 128835627
Test: Successful build
Change-Id: Iac5642f333634d9cc820eb727f8ff3534a47a583
2019-03-28 10:04:31 -07:00
Treehugger Robot
44968dc629 Merge "Y16 format enablement for external provider" 2019-03-25 20:19:44 +00: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
Emil Jahshan
a759713ca1 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
Merged-In: I358686e7c4330bb180dec4a9cce3bc1cf5475260
Signed-off-by: Emil Jahshan <emil.jahshan@intel.com>
2019-03-14 14:27:07 -07: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
TreeHugger Robot
a3f6d38187 Merge "Camera: fill in num_output_buffers" 2019-03-06 19:52:18 +00:00
Yin-Chia Yeh
0388c2bc1c Camera: fill in num_output_buffers
And also assert fence import should never fail.

Test: none
Bug: 125472550
Change-Id: Ib9bcc0234108ed0c752d5245d75fca6972e0c8ed
2019-03-05 15:29:39 -08:00
Steven Moreland
87f43604b9 Merge "Update makefies: no 'types' internal" 2019-03-05 17:40:03 +00: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
b91ac5c6a0 Update makefies: no 'types' internal
Bug: 123976090
Test: N/A
Change-Id: I84b659b163b63d39535b462a3df8a9c19f680976
2019-03-04 14:09:25 -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
Shuzhen Wang
2f06e17122 Camera: Document bufferSize for JPEG_APP_SEGMENTS stream
Doc update to clarify that @3.4::Stream::bufferSize is updated by camera
framework.

Test: Build
Bug: 124999074
Change-Id: I818f75eabd613cc5f6d9b7e73b2b1a894b511afe
2019-02-20 16:23:31 -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
Yin-Chia Yeh
71e6298ea6 Camera: fix per stream error code for HAL buffer manager
Also some refactoring to make the code more readable and less
indent.
Also clarify the unknown error case that per stream error code
might still be provided.

Test: GCA smoke test and camera CTS
Bug: 120986771
Change-Id: I3b7d3eadfe3895a3fdf3888735a3932d5c6c03bc
2019-02-14 14:17:33 -08:00
Emilian Peev
332467b8bf Merge "Camera: Enable session parameter reconfiguration queries" 2019-02-13 21:54:22 +00:00
Emilian Peev
22eac5f667 Camera: Enable session parameter reconfiguration queries
Check with Hal whether stream reconfiguration is required
in case of session parameter updates.

Bug: 122609098
Test: Manual using application,
vts-tradefed run commandAndExit vts --skip-all-system-status-check
--skip-preconditions --module VtsHalCameraProviderV2_4Target -l INFO
Change-Id: Ic02525871aa079393b28b2da53764093f95f881d
2019-02-12 14:54:00 -08:00
Steven Moreland
907c8ccc2b Merge "Update makefiles." 2019-02-12 22:20:43 +00: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
Steven Moreland
f8a47b7f01 Update makefiles.
Bug: 123976090
Test: N/A
Change-Id: I5fb6c126a090a3fe0fa4829ea9224564133dc1ae
2019-02-11 21:14:16 -08:00
Shuzhen Wang
e7b88b706b Merge "Camera: Add HAL interface change for HEIC" 2019-02-07 19:15:34 +00:00
Shuzhen Wang
55386823a3 Camera: Add HAL interface change for HEIC
- Add new usage flag to indicate the consumer of the buffer is HEIC
encoder.
- Add new data space to indicate that the BLOB buffer is HEIC encoded.
- Add new BlobId to specify JPEG APPs segments.

Test: testHeic CTS test
Bug: 79465976
Change-Id: Iaa6a1d017223e84fc1c5dd0a9d90d9f09240e827
2019-02-04 16:44:16 -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
TreeHugger Robot
207f2b51c6 Merge "Camera: Document 3.4 metadata selection logic." 2019-01-17 23:59:40 +00:00
TreeHugger Robot
3ed0179295 Merge "Camera: Extend stream combination query documentation" 2019-01-17 09:53:41 +00:00
Emilian Peev
06c07730de Camera: Extend stream combination query documentation
Stream combination queries differ from regular stream
configuration in several ways. Extend documentation
and mention any fields that Hal implementations must
ignore when checking the input arguments.

Bug: 111593096
Test: Android builds successfully
Change-Id: Iab97d2cf8aebc29c9ec4c34a382893299a9b9752
2019-01-16 11:21:00 +00: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