Commit graph

822 commits

Author SHA1 Message Date
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
TreeHugger Robot
7ffb10cd86 Merge "Camera: require torch API support for Android Q" into qt-dev 2019-04-11 22:04:52 +00:00
Yin-Chia Yeh
51ea7c984b Camera: require torch API support for Android Q
Torch API was mandated on legacy libhardware camera module 2.4.
We kept the option of not supporting this API because the first
HIDL legacy wrapper needs to also support libhardware camera
module 1.0 + HAL1.0. Now that HAL 1.0 is no longer supported,
we can reenforce the torch API being supported by camera HAL as
this is critical to power usage of flashlight usecase.

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

Change-Id: I0dcf2e7a5cddadcd097caf6913625d8a607065f8
2019-04-11 10:35:17 -07:00
Jayant Chowdhary
80bed174b2 Merge "Allow android.hardware.camera.common@1.0-helper to access vendor tags" into qt-dev 2019-04-05 16:39:16 +00:00
Jayant Chowdhary
661f4410f4 Allow android.hardware.camera.common@1.0-helper to access vendor tags
This allows vendor camera clients to access provider specific vendor
tags. No expected behavior changes to camera HAL process(es).

Also fixes OWNERS file.

Bug: 129688550

Test: AImageReaderTest modified to set a vendor tag in CaptureRequest
Test: Take still pictures / record video (sanity)
Test: camera CTS tests

Change-Id: I18b678e7e0db7f1b29c3de0b762cb65e25842fa8
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2019-04-04 14:24:06 -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
70eae1d3f0 Camera: Set buffer request stream id
Additionally fix a possible issue with the buffer request index
and variable shadowing.

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

Change-Id: I34ab0285e59233c1b6d276f9167372ef3b0bbd0b
2019-04-04 13:22:25 -07:00
TreeHugger Robot
e7aeb819f8 Merge "Camera: Update VTS test for revised multi-camera requirement" 2019-04-03 00:06:55 +00: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
Shuzhen Wang
7788df304e Camera: Update VTS test for revised multi-camera requirement
Test to make sure logical multi-camera device support
isStreamCombinationSupported() for 3.5 and above devices.

Test: VtsHalCameraProviderV2_4TargetTest
Bug: 119325664
Change-Id: I734278799f10ed215ceb5dd108ac7f722f7f7925
2019-03-21 17:32:21 -07:00
TreeHugger Robot
469b3ac3d4 Merge "Camera: Add recommended low latency use case id" 2019-03-18 22:02:53 +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
Steven Moreland
785f27e892 Merge "Remove import comment on camera metadata HAL." 2019-03-14 20:42:37 +00:00
Eino-Ville Talvala
ee2fb713b7 Merge "Camera: Centralize OWNERS" 2019-03-14 17:13:47 +00:00
Eino-Ville Talvala
d1ce4e664a Camera: Centralize OWNERS
Test: Builds
Change-Id: I9b8d1675566db44b959c633c25ceaf61a6dc08db
2019-03-13 15:15:45 -07:00
Steven Moreland
41be3682a3 Remove import comment on camera metadata HAL.
No good place in generated docs.

Bug: 124382459
Test: ./update-makefiles.sh
Change-Id: I7802d12c34b33be192c83fc46ffed5a6a7385a0a
Merged-In: I7802d12c34b33be192c83fc46ffed5a6a7385a0a
2019-03-13 02:34:29 +00:00
Steven Moreland
f8230e060c Remove import comment on camera metadata HAL.
No good place in generated docs.

Bug: 124382459
Test: ./update-makefiles.sh
Change-Id: I7802d12c34b33be192c83fc46ffed5a6a7385a0a
2019-03-12 19:34:15 -07:00
Emilian Peev
7549141c38 Camera: Add recommended low latency use case id
One extra recommended id must be present for low latency
snapshot use cases.

Bug: 128450197
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check
--skip-preconditions --module VtsHalCameraProviderV2_4Target -l INFO

Change-Id: I259fec5157f1190c485a373dcaa500d02c0389be
2019-03-12 18:10:31 -07:00
Yin-Chia Yeh
c2707ebcc7 resolve merge conflicts of 00236ffa71 to master
Bug: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I07e452ffd8dbe4492489d47459eb3662c76b78dd
2019-03-12 15:32:31 -07:00
Emil Jahshan
00236ffa71 Merge "VTS tests to work with depth Y16" into pie-vts-dev am: 0e802961e2
am: cbeda28395

Change-Id: Iac2b34c3ede77f1919ddce045a92f70991ae26e9
2019-03-12 14:43:32 -07:00
Emil Jahshan
cbeda28395 Merge "VTS tests to work with depth Y16" into pie-vts-dev
am: 0e802961e2

Change-Id: I0a42e16b82c60c0c36e1809b9839b73226b22660
2019-03-12 14:39:33 -07:00
TreeHugger Robot
2dfd5ccb18 Merge "Camera: Make availablePhysicalRequestKeys ndk public" 2019-03-08 00:24:10 +00:00
TreeHugger Robot
a3f6d38187 Merge "Camera: fill in num_output_buffers" 2019-03-06 19:52:18 +00:00
Shuzhen Wang
f09054c174 Camera: Make availablePhysicalRequestKeys ndk public
Test: camera ndk CTS
Bug: 115532726
Change-Id: I6a0e6c8bc14e68bddcd0a5617a706b16520ff871
2019-03-06 02:22:01 +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
Emil Jahshan
b8524954e6 VTS tests to work with depth Y16
modified VTS tests functions to work with the Y16 format with the correct dataspace.
Y16 changes are in this patch: 847192

Test: ran and tested on intel depth camera D415 and a regular RGB camera

Change-Id: Ie40347d58d4f72ed2fc9676bdaab2d1dca5dc5bc
Signed-off-by: Emil Jahshan <emil.jahshan@intel.com>
2019-02-24 09:40:24 +00: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
Eino-Ville Talvala
fbb176e069 Merge changes from topic "camera-provider-2.5"
* changes:
  Camera: Add default 2.5 provider for legacy and external webcam HALs
  Camera: Restructure default camera.provider 2.4
  camera.provider: Add @2.5 to support notifyDeviceStatusChange
2019-02-11 01:22:52 +00:00
Eino-Ville Talvala
aa04b3ba10 Camera: Add default 2.5 provider for legacy and external webcam HALs
Add 2.5 implementations, which do not support passthrough mode and
therefore doesn't need the HIDL_Fetch methods or a specially-named
-impl library in the /hw directory.  Instead, the service directly
instantiates the necessary service.

Also add VTS tests for the new notification

Test: Verify device state changes are logged by HAL
Test: Camera starts as usual with both 2.4 and 2.5 providers on
      walleye.  Camera CTS completes.
Test: New VTS tests pass
Bug: 121379978
Change-Id: I0fc99379eb7e01c5b2efb20afb5753bb6ce8b627
2019-02-07 16:30:14 -08:00
Eino-Ville Talvala
2951804146 Camera: Restructure default camera.provider 2.4
To allow for implementation inheritance of @2.4 legacy wrapper and
@2.4 external webcamera HALs in the @2.5 implementations, restructure
the existing default provider to separate the service interface into a
thin shim that calls the implementations.

Test: Camera starts as usual after refactor, VTS tests pass
Bug: 121379978
Change-Id: Id40790ed4fb495577fd2b885c706b2ed7a96d64e
2019-02-07 16:20:35 -08:00
Eino-Ville Talvala
918a7de8d5 camera.provider: Add @2.5 to support notifyDeviceStatusChange
Sometimes, the camera service needs to notify a camera HAL that the
overall device physical state has changed, so that the HAL can
properly remap how it handles logical multicamera devices or similar.

Test: Builds, new VTS tests pass
Bug: 121379978
Change-Id: I0982fdecaf53a0529289d63c08c5a31264ee7ec7
2019-02-07 16:20:11 -08:00
Shuzhen Wang
e7b88b706b Merge "Camera: Add HAL interface change for HEIC" 2019-02-07 19:15:34 +00:00
Jayant Chowdhary
f1d79e8af3 Merge "Add SECURE camera capability." 2019-02-05 17:55:03 +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
Sasha Smundak
791b843bcb Merge "Explicitly include log/log.h or android/log.h instead of cutils/log.h" am: b5db125860 am: 4a1f714ed0
am: 1e45903dd5

Change-Id: I1a54776b7560154304573a8cd3dfeae5babf43e5
2019-02-01 13:22:37 -08:00
Sasha Smundak
769c053d7c Explicitly include log/log.h or android/log.h instead of cutils/log.h
Eliminates the warning.
Test: treehugger

Bug: 123758136
Change-Id: Ibe50261efc18d659a10129977342bc765a9ba9d5
2019-02-01 10:52:09 -08:00
TreeHugger Robot
0a742a0409 Merge "Camera: support libhardware camera device 3.6" 2019-01-30 19:24:31 +00:00
Jayant Chowdhary
1135219245 Add SECURE camera capability.
Bug: 123046494

Test: Builds

Change-Id: I8d90edc2606e535bbf8ebe4e0ebaffeba6ad17dd
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2019-01-30 10:05:18 -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
Emilian Peev
5f103998ff Camera: Add dynamic depth tags and dataspace
Add necessary metadata tags for supporting dynamic depth
streams.
Includes minor gfx fix which should help eliminate build
errors after HIDL header autogen.

Bug: 109735087
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check
    --skip-preconditions --module VtsHalCameraProviderV2_4Target -l INFO
Change-Id: Ia476b195095ae7a29bc740174331dfbfdaa6d320
2019-01-27 20:06:11 -08:00
TreeHugger Robot
8c2c8d9657 Merge "Camera: Enable external camera handling in default provider." 2019-01-26 13:39:00 +00:00
Shik Chen
758f4bb127 Camera: Enable external camera handling in default provider.
* The sCameraDeviceStatusChange() callback might be fired between
  initialize() and setCallback(), which can be easily triggered if there
  is an external camera connected at the boot time.

* The external cameras need to be excluded in the getCameraIdList().

Bug: 77833131
Bug: 122800852
Test: Reboot with an external camera is connected, and see the
      camera list is corrected probed in
      $ android-sh -c 'dumpsys media.camera'
      The testing device is Nautilus (Samsung Chromebook Plus).

Change-Id: I5cec6732ce4e26632f1bb5186331b7ce7a94a0b3
2019-01-26 05:18:46 +08:00
Pierre Lee
e233a7c98d The test failed when one of the three cameras was configured with a maximum android.scaler.availableStreamConfiguration size of 1600*1200
am: 6f6fe9a5e2

Change-Id: I037a4eb21f0eee79acf78f15a1cd5bb9fef5da7b
2019-01-23 21:44:20 -08:00
Shuzhen Wang
4ee03d1ba7 Merge "Camera: Add ACTIVE_PHYSICAL_ID metadata for logical camera" 2019-01-24 01:55:27 +00: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
Pierre Lee
62da080e00 Merge "The test failed when one of the three cameras was configured with a maximum android.scaler.availableStreamConfiguration size of 1600*1200" am: ac6175ee79 am: cb516f7cca
am: 556b049596

Change-Id: I40eb4709eaea843a06222c20baec61c150d5e3f5
2019-01-21 20:29:42 -08:00
Pierre Lee
6f6fe9a5e2 The test failed when one of the three cameras was configured with a maximum android.scaler.availableStreamConfiguration size of 1600*1200
VTS gets the name of all the cameras in the machine and check each camera, When traversal to the configuration reference of 1600*1200 camera, the outputPreviewStreams variable does not clear, save the value of the Previous camera
The outputPreviewStreams variable needs to be cleared when check next camera

Bug: 122806546
Test: ConfigureStreamsWithSessionParameters can pass when one of the three cameras was configured with a maximum android.scaler.availableStreamConfiguration size of 1600*1200
Change-Id: Ia4845d43871730e14b5ba1411ce72f8c4bb69042
Merged-In: Ia4845d43871730e14b5ba1411ce72f8c4bb69042
2019-01-22 04:13:52 +00:00
Treehugger Robot
ac6175ee79 Merge "The test failed when one of the three cameras was configured with a maximum android.scaler.availableStreamConfiguration size of 1600*1200" 2019-01-22 04:12:43 +00:00
Shuzhen Wang
cc266b1699 Camera: Add ACTIVE_PHYSICAL_ID metadata for logical camera
And update VTS test for the new tag.

Test: Compile
Bug: 77915333
Change-Id: Ib0f1d54965047c5d20bf0c6f90ddb07225d8a328
2019-01-18 00:21:10 -08:00
Pierre Lee
f234e45b20 The test failed when one of the three cameras was configured with a maximum android.scaler.availableStreamConfiguration size of 1600*1200
VTS gets the name of all the cameras in the machine and check each camera, When traversal to the configuration reference of 1600*1200 camera, the outputPreviewStreams variable does not clear, save the value of the Previous camera
The outputPreviewStreams variable needs to be cleared when check next camera

Bug: 122806546
Test: ConfigureStreamsWithSessionParameters can pass when one of the three cameras was configured with a maximum android.scaler.availableStreamConfiguration size of 1600*1200
Change-Id: Ia4845d43871730e14b5ba1411ce72f8c4bb69042
2019-01-18 11:12:37 +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
Jayant Chowdhary
6a20bda67a Merge "Add VendorTagDescriptorCache to android.hardware.camera.common@1.0-helper" 2019-01-15 23:12:48 +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
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
TreeHugger Robot
0dde018278 Merge "Camera: Clarify the FMQ read order for request/result" 2019-01-14 23:04:12 +00:00
Jayant Chowdhary
8cd3ba8fdf Add VendorTagDescriptorCache to android.hardware.camera.common@1.0-helper
Since android.hardware.camera.common@1.0-helper is a utility VNDK
library, where the implementation isn't linked to a specific version of
any HIDL interface we don't uprev the library.

Bug: 122477622

Test: builds

Change-Id: Idb7cb9569cf4490659be0090d72f91f411c8dbc8
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2019-01-14 12:39:38 -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
Emilian Peev
338a5559f3 resolve merge conflicts of fe57c318d3 to
master

Bug: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ibe64d18c0637f22032a5aedc74da5cd0a0141e2a
2019-01-14 12:33:59 +00:00
Yin-Chia Yeh
fe57c318d3 Merge "Camera: fill in bufferSize correctly" into pie-vts-dev am: d04f64ef24
am: 31ad8ce667

Change-Id: I4d560b783331836629aa57827c6391261a826504
2019-01-14 04:13:39 -08:00
Yin-Chia Yeh
dbb2211d32 Merge "Camera: fill in bufferSize correctly" into pie-vts-dev
am: d04f64ef24

Change-Id: I33583bbfda0b8f1a480df6a2fe7c88bdf504d493
2019-01-14 04:06:37 -08:00
Yin-Chia Yeh
31ad8ce667 Merge "Camera: fill in bufferSize correctly" into pie-vts-dev
am: d04f64ef24

Change-Id: I1d3a33e8bc58d0f99167f5bc3da6b6abf81d6d52
2019-01-14 04:05:42 -08:00
Yin-Chia Yeh
9d4ff706e1 Camera: fill in bufferSize correctly
Test: partner testing
Bug: 118724188
Change-Id: If21762467e6458f923d7f9b7eeef41d987c196a1
2019-01-14 10:54:11 +00: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
TreeHugger Robot
e6a12511d7 Merge "Camera: Make logical camera physical Ids to be ndk public" 2018-12-21 18:23:35 +00:00
Treehugger Robot
4ffb6e0bd8 Merge "Camera: Clarify configureStreams doc" 2018-12-17 22:47:12 +00: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
Shuzhen Wang
77c5c4e8b1 Camera: Clarify configureStreams doc
Test: Compile
Change-Id: Idbb7ed8f8dd0a1ebe1d5227446ec7170fec3ec4a
Merged-In: Idbb7ed8f8dd0a1ebe1d5227446ec7170fec3ec4a
2018-12-15 00:51:59 +00:00
Shuzhen Wang
f43ecc9c4b Camera: Make logical camera physical Ids to be ndk public
Test: Newly added NDK CTS and VNDK test pass
Bug: 115532726
Bug: 120566141
Change-Id: I55c0dff47cbaefa223c22094635055349ea59e92
2018-12-14 11:00:32 -08:00
Shuzhen Wang
49fcad2b8e Camera: Clarify configureStreams doc
Test: Compile
Change-Id: Idbb7ed8f8dd0a1ebe1d5227446ec7170fec3ec4a
2018-12-13 15:54:14 -08:00
Treehugger Robot
565fe88676 Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master" 2018-12-13 05:45:20 +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
Peter Kalauskas
0b35cb2591 Add new lazy service target to default camera HAL
Test: On walleye_svelte, reboot device and check that camera HAL is not
      running until camera app is opened
Bug: 79374634
Change-Id: Ib9968c899ce8be5a68a28b4decf0a52f96b20ec5
2018-12-07 15:43:11 -08:00
Keun Soo YIM
68ae05dd2d pack VTS cc_test binaries as general-tests
Test: make general-tests
Bug: 120093339
Merged-In: I363450d205868f900e4925ccff1430e2a569f2a4
Change-Id: I363450d205868f900e4925ccff1430e2a569f2a4
2018-12-07 10:49:56 -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
ee0ba36773 Merge "Camera: update VTS for new useHalBufManager feature" 2018-11-29 13:08:24 +00:00
TreeHugger Robot
0396331a72 Merge "Camera: Fix MONO and NIR enumeration version" 2018-11-29 06:38:47 +00:00
Yin-Chia Yeh
4d25042aef Camera: update VTS for new useHalBufManager feature
Test: updated vts pass on B1 internal/external camera HAL
Bug: 109829698
Change-Id: I09de76b93e88e88a7b67df0b22dda7f19596c8e4
2018-11-28 11:59:53 -08:00
Shuzhen Wang
a5504b86ec Camera: Fix MONO and NIR enumeration version
Test: VTS test passes
Bug: 70216652
Change-Id: I33bdc849e6655285b76a20d697fdab31cbea260d
2018-11-28 19:52:53 +00:00
Keun Soo YIM
ff84c37bc1 pack VTS cc_test binaries as general-tests
Test: make general-tests
Bug: 120093339
Change-Id: I363450d205868f900e4925ccff1430e2a569f2a4
2018-11-27 16:11:41 -08:00
TreeHugger Robot
f837fa24e6 Merge "Camera: add external camera@3.5" 2018-11-16 11:00:21 +00:00
Shuzhen Wang
4e18944aaa Camera: Vts: Add test for Y8 and monochrome camera
Add VTS test for Y8 and monochrome capabilities requirements.

Test: adb shell
/data/nativetest64/VtsHalCameraProviderV2_4TargetTest/VtsHalCameraProviderV2_4TargetTest
--hal_service_instance=android.hardware.camera.provider@2.4::ICameraProvider/legacy/0
Bug: 70216652
Bug: 117177512
Change-Id: If40f0e16c641a88eff24044a36bded0ad0e55b45
2018-11-15 14:22:32 -08: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
Shik Chen
d4b8d2179f Camera: Fix a crash in removeCamera()
mCameraInfoMap is a KeyedVector, we should use .valueFor() instead of
operator[] to get the value from a key.

Bug: 118364955
Bug: 118359878
Bug: 77833131
Test: Plug and unplug the external camera 10+ times.
Change-Id: Ibf48e5a78b16bdeba08b02242379eaf571fc76cb
2018-11-14 08:10:04 +00:00
TreeHugger Robot
9f97090ea7 Merge "Camera: Update color filter array comment about monochrome camera" 2018-11-13 15:27:10 +00:00
Emilian Peev
ee37bd5ced Camera: Add support for recommended stream configurations
Hal must be able to recommend efficient stream
configurations for common client use cases. Add the
necessary static metadata keys.

Bug: 64029608
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check
--skip-preconditions --module VtsHalCameraProviderV2_4Target -l INFO
Change-Id: I0c2306501094383af78cb7ced1fa700b259d2b08
2018-11-07 10:13:16 +00:00
Shuzhen Wang
f78be95c45 Camera: Update color filter array comment about monochrome camera
Trivial doc update.

Test: Camera CTS
Bug: 70216652
Change-Id: Icc4e5e42028ba0d86fa5ac6fabe24d16b46dd04a
2018-11-02 09:59:47 -07:00
Shuzhen Wang
2fd63a4db4 Camera: Add new metadata entries for Y8
Also add missing RAW stream types.

Test: Camera CTS
Bug: 70216652
Change-Id: Ia60f3a9c2344e3bfb7fc979b53b6910e5c6f5fca
2018-10-29 14:44:27 -07: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
TreeHugger Robot
0836578d61 Merge "Camera: implement configureStreams@3.5" 2018-10-16 15:44:09 +00:00
Yin-Chia Yeh
86a7d9610d Camera: implement configureStreams@3.5
So camera continue to work when camera service switch to use
the @3.5 session.

Test: manually check configureStream works
Bug: 109829698
Change-Id: I4c7edcf59e68a2b4f04fee8229ed5d3c9b261c9f
2018-10-15 14:23:15 -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
Shuzhen Wang
068b1c6a26 Camera: Minor doc update to fix typo
Test: Build, and manual inspection of docs
Change-Id: Ic1936b91f0b21d2c760068c841aec1f02ea448cb
2018-10-11 15:30:35 -07:00
Shuzhen Wang
6bdeaf55bf VTS: Add test for device version 3.5
Also includes:
- Add test for getPhysicalCameraCharacteristics.
- Doc update for the new HIDL API.
- Tighten boundary check for camera ID in CameraModule.

Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check
--skip-preconditions --module VtsHalCameraProviderV2_4Target -l INFO

Bug: 79523700
Bug: 115969176
Bug: 116512585
Change-Id: I051d1b0c91834781a1f8d893ed5ebfa579b03774
2018-10-04 11:56:20 -07:00
Ng Zhi An
d6c009d46f Skip hal v1 check after p on low ram devices am: a0eb7e415c am: f8f519f412
am: cab24d270d

Change-Id: I5642eb8b968849c8a60488f372e5eac8bff77637
2018-10-02 15:47:05 -07:00
Ng Zhi An
cab24d270d Skip hal v1 check after p on low ram devices am: a0eb7e415c
am: f8f519f412

Change-Id: I26555fe00a1b8adf51b42ab694238169cde49c4d
2018-10-02 14:59:58 -07:00
Ng Zhi An
f8f519f412 Skip hal v1 check after p on low ram devices
am: a0eb7e415c

Change-Id: Ice8482bd701233d382f381f6204230caebc2cb44
2018-10-02 14:19:29 -07:00
Ng Zhi An
2f5884c94c Skip hal v1 check after p on low ram devices
am: a0eb7e415c

Change-Id: I7e60e9faf24be23bf08ef65c5f0c074d4e7da2a4
2018-10-02 14:02:09 -07:00
Ng Zhi An
a0eb7e415c Skip hal v1 check after p on low ram devices
Bug: 116546417
Test: vts-tradefed run commandAndExit vts
-m VtsHalCameraProviderV2_4Target
-t VtsHalCameraProviderV2_4Target#CameraHidlTest.noHal1AfterP

Change-Id: I28782b560975b49e20d6b42d599d689f819a9383
2018-10-02 19:52:50 +00:00
Yin-Chia Yeh
8ffafc60b6 Merge "Camera: new buffer management HIDL APIs" 2018-09-28 22:50:08 +00: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
f6cde1cdcd Merge "Camera: add buffer management API support key" 2018-09-26 21:37:10 +00:00
Emilian Peev
8edae5199e Camera: Extend camera characteristics test case
Verify that device implementations do not set the
new privacy characteristics key:
ANDROID_REQUEST_CHARACTERISTIC_KEYS_NEEDING_PERMISSION
As required by API contract.

Bug: 112160024
Bug: 115969437
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check
--skip-preconditions --module VtsHalCameraProviderV2_4Target -l INFO

Change-Id: I8d8f0d0e1cdec24117d47e7ae45602f56573376f
2018-09-18 14:32:28 +01:00
Yin-Chia Yeh
9ee5d7103c Camera: add buffer management API support key
Test: compile
Bug: 109829698
Change-Id: I654e07c9c5930bcbf3357d12d97ef32d198fdcc8
2018-09-17 12:03:07 -07:00
Shuzhen Wang
c4f5402488 Merge "Camera: Add support for physical camera characteristics query" 2018-09-13 19:57:49 +00:00
Shuzhen Wang
d3feb3d62c Camera: Add support for physical camera characteristics query
- Add version 3.5 for ICameraDevice for physical camera characteristics
query.
- Add version 3.5 for ICameraDeviceSession to work around HIDL
versioning bug.

Test: Camera CTS
Bug: 79523700
Change-Id: I8df6cdd4ee6ac5755758510c0dc1ea1cec31aa73
2018-09-13 09:25:34 -07:00
Emilian Peev
019114aa89 Camera: Add camera.metadata@3.4
The initial entry includes information about
static metadata that requires camera permission.

Bug: 112160024
Test: hidl-gen, builds
Change-Id: I3aa321edbfea4c2adaaeded3fd10c8746ed07aa7
2018-09-04 16:40:58 +01: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
Treehugger Robot
f8007c2000 Merge "Camera: support torch control on external camera" 2018-08-30 19:02:26 +00:00
Emilian Peev
81221c2f6c Merge "Camera: Allow 3% ISO tolerance during ISO burst VTS" into pie-vts-dev
am: 391eb588cf

Change-Id: Id897eee2251eee92267b4e32f7d245aca3eb1e88
2018-08-30 10:23:00 -07:00
Emilian Peev
fe40b621b7 Camera: Allow 3% ISO tolerance during ISO burst VTS
The advertised ISO ranges may not be entirely supported on
some devices. Expect a 3% tolerance when comparing the applied
results versus the expected ISO value.

Bug: 80025874
Test: run vts --skip-all-system-status-check --skip-preconditions
--primary-abi-only --module VtsHalCameraProviderV2_4Target -l INFO

Merged-In: Ibd2758e48a0924e81877e35dd27433669274fdb3
Change-Id: Ibd2758e48a0924e81877e35dd27433669274fdb3
(cherry picked from commit 0fdd7cdc0e)
2018-08-29 17:57:11 +00:00
Emilian Peev
a89c2d379e Merge "Camera: Don't hold 'mLock' when closing the camera session" into pie-vts-dev
am: 75ceb36b27

Change-Id: I3b3d8c2051dd89b0993bd17af77a6a19cd7792b6
2018-08-28 12:24:48 -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
Emilian Peev
6fa94395fd Camera: Don't hold 'mLock' when closing the camera session
After flushing the camera requests don't try to close the
camera session while still holding 'mLock'. Different Hals
could still try and return additional results which then will
get blocked on 'mLock'. Closing the session could potentially
introduce a deadlock if the Hal implementation waits for any
of the result calls to return.

Bug: 111836165
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check
--skip-preconditions --module VtsHalCameraProviderV2_4Target -l INFO

Change-Id: I0f309f435cc76db3f9b6ba500da65a232b014717
Merged-In: I0f309f435cc76db3f9b6ba500da65a232b014717
(cherry picked from commit 8e92056837)
2018-08-28 18:17:55 +00:00
TreeHugger Robot
f711bd2714 Merge "Camera: plumb blob buffer size from framework" 2018-08-16 19:46:22 +00: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
Xin Li
b390ad2d90 Merge pie-vts-dev into master
Bug: 112170540
Merged-In: I48551f5469289b9fcfc47dd9fd2e455779640329
Change-Id: Icd613751ccf1dc8a0f879525f1d65b11dda7d357
2018-08-16 00:17:15 +00:00
TreeHugger Robot
5c8bb496e2 Merge "Camera: Minor doc update" 2018-08-15 23:44:23 +00:00
Steven Moreland
9dc1ccc852 Merge "Update makefiles after native handle in Java." am: 1847a2f2e7
am: fb6a66b3f7

Change-Id: Iee88bb1f9816230a1ea2373cca6a3f3bb5db2d6e
2018-08-14 15:59:59 -07:00
Steven Moreland
fb6a66b3f7 Merge "Update makefiles after native handle in Java."
am: 1847a2f2e7

Change-Id: I0f981009b2129436872e1e05a06c381c47701fdb
2018-08-14 15:53:31 -07:00
Steven Moreland
f5e4d7fb59 Update makefiles after native handle in Java.
Bug: 35098567
Test: N/A
Change-Id: I54b8d804e480cda09806f8028b966f28c4bd706e
2018-08-14 20:29:42 +00:00
Hsin-Yi Chen
68c347fa62 Fix ICameraDeviceCallback version in VTS test
Test: ./VtsHalCameraProviderV2_4TargetTest --gtest_filter=CameraHidlTest.constructDefaultRequestSettings
Bug: 111625570
Change-Id: I8ad02afb0e9c2131c240999c4a8c78a1f770e847
Merged-In: I8ad02afb0e9c2131c240999c4a8c78a1f770e847
(cherry picked from commit cccd5bf1dd)
2018-08-13 15:16:28 +08: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
7aa4b087f2 Camera: provide thumbnail size for more jpeg aspect ratios. am: 564cdae552
am: 737cfdf4db

Change-Id: Ibbf8171753825afaaf7c46758e1d7edfde0ad53a
2018-08-09 12:00:33 -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
30faec33a0 Merge "Camera: allow to configure minimum stream size." am: c2f3b0bcf5
am: 8050b86a96

Change-Id: I174457235246891dba965566fd711547c0ea2eae
2018-08-08 11:30:46 -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
Eino-Ville Talvala
5845a3f05c Camera: Minor doc update
Autogenerated from a larger set of total doc changes

Test: Builds, manual inspection of docs
Bug: 109817371
Change-Id: Ibc2415531a16e42ae81e33c3bdb28aca08e6a5fe
2018-08-06 10:57:34 -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
Emilian Peev
3aace138e9 Camera: Don't hold 'mLock' when closing the camera session am: 8e92056837
am: addc3069bb

Change-Id: I79b201eea2bc097438219eb99627e93989954655
2018-07-26 09:47:27 -07:00
Emilian Peev
addc3069bb Camera: Don't hold 'mLock' when closing the camera session
am: 8e92056837

Change-Id: I9bdda2b5fbd92f6bb0d77f9a4809766f95a8b318
2018-07-26 09:44:24 -07:00
Emilian Peev
8e92056837 Camera: Don't hold 'mLock' when closing the camera session
After flushing the camera requests don't try to close the
camera session while still holding 'mLock'. Different Hals
could still try and return additional results which then will
get blocked on 'mLock'. Closing the session could potentially
introduce a deadlock if the Hal implementation waits for any
of the result calls to return.

Bug: 111836165
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check
--skip-preconditions --module VtsHalCameraProviderV2_4Target -l INFO

Change-Id: I0f309f435cc76db3f9b6ba500da65a232b014717
2018-07-26 13:04:54 +01:00
Hsin-Yi Chen
5d367c9ee9 Fix ICameraDeviceCallback version in VTS test am: cccd5bf1dd
am: ff5bfd5b30

Change-Id: I60de4ecef004e30664e578ac8bdc1b7c2cabb541
2018-07-20 07:07:34 -07:00
Hsin-Yi Chen
ff5bfd5b30 Fix ICameraDeviceCallback version in VTS test
am: cccd5bf1dd

Change-Id: I06df275ab155ecb3cdf2e829c6253023ff23a386
2018-07-20 07:03:59 -07:00
Hsin-Yi Chen
cccd5bf1dd Fix ICameraDeviceCallback version in VTS test
Test: ./VtsHalCameraProviderV2_4TargetTest --gtest_filter=CameraHidlTest.constructDefaultRequestSettings
Bug: 111625570
Change-Id: I8ad02afb0e9c2131c240999c4a8c78a1f770e847
2018-07-20 13:02:56 +08:00
Chih-Hung Hsieh
8348116707 Merge "Fix unnecessary copy initialization warnings" am: f110ea4893 am: 820868b72e
am: 9ac8d1191a

Change-Id: Ibe0c89318d428b4c653814c7ebbad6b32cd1f39b
2018-07-13 18:03:48 -07:00
Chih-Hung Hsieh
9ac8d1191a Merge "Fix unnecessary copy initialization warnings" am: f110ea4893
am: 820868b72e

Change-Id: I15766860cf5bbfa3dd890133f4bfbb436cc4f4b7
2018-07-13 17:21:37 -07:00
Chih-Hung Hsieh
820868b72e Merge "Fix unnecessary copy initialization warnings"
am: f110ea4893

Change-Id: If17584a8ed6fc53f3681a6ac298730dfbbaf4623
2018-07-13 15:59:07 -07:00
Chih-Hung Hsieh
091880882c Fix unnecessary copy initialization warnings
Bug: 30413862
Test: build with WITH_TIDY=1
Change-Id: I5de56c163d26e7522141ca06020321c481eea233
2018-07-13 11:48:16 -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
Emilian Peev
b76a4d93e4 Merge "Camera: Allow 3% ISO tolerance during ISO burst VTS" into pi-dev
am: 8216f3df07

Change-Id: I22c33c7ec08d0ab7b6d9c664f6a18a41558fb4f6
2018-06-29 08:03:00 -07:00
Emilian Peev
0fdd7cdc0e Camera: Allow 3% ISO tolerance during ISO burst VTS
The advertised ISO ranges may not be entirely supported on
some devices. Expect a 3% tolerance when comparing the applied
results versus the expected ISO value.

Bug: 80025874
Test: run vts --skip-all-system-status-check --skip-preconditions
--primary-abi-only --module VtsHalCameraProviderV2_4Target -l INFO

Change-Id: Ibd2758e48a0924e81877e35dd27433669274fdb3
2018-06-26 09:17:33 +01:00
Emilian Peev
548f0b659f Camera: Add only physical ids during multi-camera configuration
am: e0c4c497b3

Change-Id: I37301624258c8e80eaddb21c4c7788063a17e7fd
2018-06-07 12:27:03 -07:00
Emilian Peev
e0c4c497b3 Camera: Add only physical ids during multi-camera configuration
Per API specification "physicalCameraId" must not
contain any logical camera ids. The test case
should only use the physical ids it receives from the
camera static metadata.

Bug:109874630
Test:run vts --skip-all-system-status-check --skip-preconditions
--primary-abi-only --module VtsHalCameraProviderV2_4Target -l INFO

Change-Id: I82c5bf44f4572b3a6abdbb3101a11140907b1c9e
2018-06-07 18:21:25 +01:00
Shuzhen Wang
a7a4f5bd8a Merge "Camera: Avoid Metadata re-allocation during shrinkCaptureResult" into pi-dev
am: 62e310cbfd

Change-Id: I3ef8040de1fbbf4239cb0e15e0a04f9fd0ec70b7
2018-06-06 09:41:53 -07:00
Shuzhen Wang
9b71bc20c4 Camera: Avoid Metadata re-allocation during shrinkCaptureResult
If capture result metadata is to be shrinked, reserve enough space so
that CameraMetadata isn't re-allocated when std::vector expands.

If vector expansion happens, CameraMetadata is re-allocated, causing
camera_metadata_t being re-allocated as well.

Test: Camera CTS
Bug: 109672123
Change-Id: Idaf5bf409bdbbccf617614edc96c0478260b4c30
2018-06-05 23:13:54 -07:00
Yin-Chia Yeh
7a83eaa56d Merge "Camera: add FMQ size override logic" into pi-dev
am: de680c0d0c

Change-Id: I84a2fdb5c00e976901a19c2089a944383d3d7536
2018-05-25 10:39:29 -07:00
Yin-Chia Yeh
9d32c13f0b Camera: add FMQ size override logic
Test: modify FMQ size in device.mk
Bug: 80242493
Change-Id: Ie1fb12118ad53c5bbe0cf264bffaafcd3728f8db
2018-05-24 10:53:57 -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
Yin-Chia Yeh
090872abcf Camera: use compact copy when necessary
When camera HAL sends redundant metadata (reserved space >> actual
used space), create a compact copy to save IPC overhead.

Test: Camera CTS/camera app smoke test
Bug: 79838637
Change-Id: I02657deb377c43c65d111d1fc894eb3c20ad3b8f
2018-05-23 09:43:03 -07:00
Emilian Peev
327e5312b8 Merge "Camera: Append non-partial results" into pi-dev
am: 908fd8653f

Change-Id: I4bd6b02fd8502345982d1578771cc5ef9ab9853c
2018-05-17 09:53:24 -07:00
Emilian Peev
154e66e57a Camera: Append non-partial results
Bug: 79133095
Test: run vts --skip-all-system-status-check --skip-preconditions
--primary-abi-only --module VtsHalCameraProviderV2_4Target -l INFO

Change-Id: Iac1318dfc095fb961b815d35bbff6b6a97173a05
2018-05-16 19:07:38 +01:00
Kourosh Derakshan
b9707ce0b5 camera: Adding 64-bit version of Camera Provider
am: 68995cb341

Change-Id: I59dacc8f7280aae1e7d25b876ef5ebd81512e9ed
2018-05-11 21:04:39 -07:00
Kourosh Derakshan
68995cb341 camera: Adding 64-bit version of Camera Provider
Added a secondary Camera Provider for 64bit HALs

Test: GCA and normal camera usecases, CTS
Bug: 73173997
Change-Id: I2d9b9a916edc71b73086375f541368b080f5eca9
2018-05-12 02:08:53 +00:00
android-build-team Robot
cf20daebcb Merge "Camera: Set partial results in result batcher" into pi-dev
am: 33ad1e6aa1

Change-Id: I632f43b7e378ad1bda505d8c1f06a16f3c487868
2018-05-03 10:33:09 -07:00
android-build-team Robot
33ad1e6aa1 Merge "Camera: Set partial results in result batcher" into pi-dev 2018-05-03 17:24:26 +00:00
Emilian Peev
59dd3df9eb Camera: Set partial results in result batcher
Camera device session 3.4 has a separate result batcher
instance. The partial result count needs to get initialized
in the same way as ver. 3.2 otherwise the frame batches can
get retired prematurely.

Bug: 79106874
Test: Camera CTS,
run vts --skip-all-system-status-check --skip-preconditions
--primary-abi-only --module VtsHalCameraProviderV2_4Target -l INFO

Change-Id: I36bfb5bc448154f80f4cb94edcfd119048361099
2018-05-03 13:36:49 +01:00
android-build-team Robot
bf2862e724 Merge "Camera: fix first launch api level logic" into pi-dev
am: 3d5a641122

Change-Id: I5c1d0aef8c88fb5ef0299b280cac825ef7e40035
2018-05-02 15:14:22 -07:00
Yin-Chia Yeh
ccdcb8b60f Camera: fix first launch api level logic
Fall back to sdk_int when first api property is not set.

Test: partner device
Bug: 79133095
Change-Id: Ice78e42cd25d351586d0d2b16c0b555c504b9d4a
2018-05-02 12:20:54 -07:00
Steven Moreland
c90461c738 rename hidl_enum_{iterator,range}
This is actually a range, not an iterator.

Bug: 78573628
Test: m
Change-Id: Ie824a3eabcb7d5af94a8752e1498bdc8c7032e40
2018-05-02 00:06:33 +00:00
Yin-Chia Yeh
b0140796a3 Camera: check return value of callback
Test: no crash
Bug: 78181355
Change-Id: Iaf953045b64dd7b258cf49919ccb8aa5a8a0c7d1
2018-04-27 09:32:39 -07:00
Michael Butler
23ee97e748 Update Android.bp via update-makefiles.sh
When calling update-makefiles.sh there are
some unrelated changes that were missed in
previous commits.

Bug: 68112778
Test: mma
Change-Id: I22b76f3d5bcd084afd2f06e613d2f9f37c1a0c9c
2018-04-18 19:34:10 +00:00
Jaekyun Seok
0fb4577a35 Add "vendor." prefix to ro.camera.wrapper.hal3TrebleMinorVersion
Vendor-specific property should have "vendor." prefix.

Bug: 36513925
Test: succeeded building and tested with taimen
Change-Id: I80f17fb6b8017a761122ddd2f8863e63c72e5623
2018-04-12 09:31:30 +00:00
TreeHugger Robot
6440aadab0 Merge "Camera: Allocate graphics buffers via 'IAllocator'" into pi-dev 2018-04-10 08:55:08 +00:00
Emilian Peev
9e7b2f445c Camera: Allocate graphics buffers via 'IAllocator'
Camera graphic buffers should always be allocated using the
respective HIDL API.

Bug: 77681294
Test: run vts --skip-all-system-status-check --skip-preconditions
--primary-abi-only --module VtsHalCameraProviderV2_4Target -l INFO

Change-Id: Ibef88548fc3d29df606e4f66f5f3f4e89d3bf654
2018-04-09 18:21:48 +01:00
Zhijun He
9b61e6197e camera: print the oversized result size
It's generally a bad thing to have the result exploded to exceed
the shared message max depth (1MB). Print the size when such case
occurs for better debugging output.

Bug: 77665564
Change-Id: I971fca202aa3ca0fa1863e9c658659d0775a1ad4
2018-04-06 18:44:42 -07:00
TreeHugger Robot
5d90142071 Merge "Camera: various external camera fixes" into pi-dev 2018-04-06 10:11:18 +00:00
TreeHugger Robot
aa91a992eb Merge "Camera: use finer lock in external camera OutputThread" into pi-dev 2018-04-04 13:45:39 +00:00
Emilian Peev
bc0e16519f Camera: Check external camera v4l2 buffer size
V4L2 buffer size should fall within a reasonable range
like (0. width*height*2]. Check and return appropriate
status in case the size is not within this range.

Bug: 72261912
Test: Camera CTS
Change-Id: I1945dc734afb552ecb8d4ef74c9198eca8ce00e7
2018-04-03 14:47:39 +01:00
Shuzhen Wang
448b7e398a Camera: Validate physical camera related metadata field from legacy HAL
Make sure that num_physcam_metadata, physcam_ids, and physcam_metadata
returned from process_capture_result is sane.

Test: LogicalCameraDeviceTest
Bug: 77218595
Change-Id: Ic4d9823569fb86b20ab2ab21edfc32a0e9f5c9c7
2018-03-29 23:34:51 -07:00
Shuzhen Wang
cf41ad4d69 Camera: Add Monochrome camera capability
Test: Camera CTS on a monochrome camera device
Bug: 74597035
Bug: 64691172
Change-Id: I720b29c794127ca01e658a2d9d69e3cb61adcd14
2018-03-27 13:01:30 -07:00
TreeHugger Robot
c7d15e9f51 Merge "Camera2: Add distortion correction support" into pi-dev 2018-03-27 19:26:45 +00:00
Eino-Ville Talvala
89ff1df0b4 Merge "Camera2: Deprecate LENS_RADIAL_DISTORTION, add LENS_DISTORTION" into pi-dev 2018-03-20 21:58:15 +00:00
Nathan Harold
c893754c0d Update Makefiles Missed In Previous Commits
When calling update-makefiles.sh there are
some unrelated changes that were missed in
previous commits.

Bug: 8675309
Test: compilation
Change-Id: I5bf67fbcc809de36bde1869ada7b835566a5198b
2018-03-19 16:37:46 -07:00
TreeHugger Robot
ba20b76deb Merge changes I20310606,Ic23b7fb2 into pi-dev
* changes:
  Camera: more external camera CTS fix
  Camera: various external camera CTS fixes
2018-03-19 20:06:27 +00:00
Eino-Ville Talvala
7b5fd70ca9 Camera2: Add distortion correction support
This allows camera devices to correct geometric distortion in their
optics, when requested by the application.

The correction only applies to processed (YUV, JPEG, etc) outputs,
not RAW buffers, or the result metadata.

Test: New CTS test passes
Bug: 74434422
Change-Id: I3b4807b08399e9ab18f4b20e3029fc16be662f5b
2018-03-18 18:52:23 -07:00
Eino-Ville Talvala
9171b61588 Camera2: Deprecate LENS_RADIAL_DISTORTION, add LENS_DISTORTION
LENS_RADIAL_DISTORTION is inconsistently defined: in some places, it
is documented to operate on the range [-1...1], and in others, on a
range dependent on the camera lens's intrinsic calibration and focal
length.

Since fixing just the definition will not fix any existing devices
that define this value, deprecate the old key and add a new consistent
one to make sure applications only reference the consistent
definition.

Test: Adjusted camera CTS passes
Bug: 74641761
Change-Id: Icefa3150a5804de264f9e0e98982d038b4dcdb70
2018-03-16 16:17:49 -07:00
Emilian Peev
36ad119251 Camera: Don't limit the camera provider types
Camera provider types should not be limited to a particular set
of pre-defined values. All providers will be treated equally
by camera framework regardless of their specific type.

Bug: 73738052
Test: run vts --skip-all-system-status-check --skip-preconditions
--primary-abi-only --module VtsHalCameraProviderV2_4Target -l INFO
Change-Id: I379c015d9e2fc4f68a7ad3ae7cd92b9d230dea33
2018-03-16 09:32:13 +00:00
Yin-Chia Yeh
2d61bfd2b0 Camera: various external camera fixes
1. Add EXIF MAKE/MODEL tag
2. Add retry loop for V4L2 open failure
3. Do not add external camera if ExternalCameraDevice cannot be
   initialized

Bug: 72261912
Bug: 72569850
Change-Id: I06df1fbbb4afabea1a9a74aca9e288b24966cb0b
2018-03-14 14:19:35 -07:00
Yin-Chia Yeh
0d72ef929f Camera: external camera VTS fixes
Test: VTS pass for external camera
Bug: 72261912
Change-Id: I4f1da37081d0b8c1519ecc0ecc0cc6c3850ee2bb
2018-03-13 17:41:33 +00:00
Shuzhen Wang
17d817a889 Camera: Do not forward capture_result in error condition
If HAL calls process_capture_result with invalid buffers, the HIDL
wrapper shouldn't forward it to camera service, since the CaptureResult
structure may not be completely initialized.

Test: Run GoogleCamera
Bug: 74433802
Change-Id: Iaf20b542af5b11ffbedf709e99137b69d77a9ad3
2018-03-09 16:01:06 -08:00
Yin-Chia Yeh
94f52a39c2 Camera: use finer lock in external camera OutputThread
To avoid OutputThread waiting for mLock.

Test: CTS RecordingTest + systrace
Bug: 72261744
Change-Id: If387a1d4a2b0081c4bc43cb648a98e3706864f19
2018-03-07 14:46:51 -08:00
Yin-Chia Yeh
c15a1cab6f Camera: more external camera CTS fix
Also update default external camera config to prevent
over promising peformance on lower end devices.

Test: API2 CTS tests except RecordingTest
Bug: 72261744
Change-Id: I20310606520099abf0f5173690f4aaf56a3e52a9
2018-03-06 10:35:29 -08:00
Yin-Chia Yeh
8b699aaf37 Camera: various external camera CTS fixes
1. Update the FPS range to list (0.5*fps, fps) only
   as webcams tends to skip a lot of frames and not
   able to output at stable framerate.
2. Exif: don't expect focal length to present
3. Thumbnail: allow 0x0 size for no thumbnail output
4. Allow retry some ioctl during configureStream as
   some webcams seems having problem in quick close
   reopen operation.

Test: CTS CameraTest
Bug: 72261912
Change-Id: Ic23b7fb293b7579694c59240e854d750c842886d
2018-03-06 10:35:12 -08:00
Yin-Chia Yeh
96a0da5e87 Merge "Camera: add profiling traces" 2018-03-02 19:13:44 +00:00
TreeHugger Robot
4a35fa3b54 Merge "Use std::unordered_map for mTagToTypeMap" 2018-03-01 22:18:18 +00:00
Yin-Chia Yeh
92f9063516 Merge "Camera: add external camera fps control" 2018-03-01 19:19:43 +00:00
Yin-Chia Yeh
e99cf209de Camera: add profiling traces
Bug: 72261744
Change-Id: I82e4d8ecc702c12bb7beb4f3d9979869ce6f4ac2
2018-02-28 16:00:28 -08:00
Yin-Chia Yeh
3aa9ae979c Camera: add external camera fps control
V4L2 doesn't seem to allow changing fps at runtime, so we need to
wait until pipeline is idle and reconfigure V4L2 streams.

Also update the fps filtering logic to make sure supported fps
are consistent as long as the major dimension is the same.
Ex: for 4:3 webcams, all 1280*N sizes has the same fps set, or
    for 16:9 webcams, all N*720 sizes has the same fps set.

Bug: 72261912
Change-Id: I534f09bebadb2f532a030a841633a8be7d3a87cc
2018-02-28 16:00:18 -08:00
Chris Jenneisch
356e28fdb1 Use std::unordered_map for mTagToTypeMap
In the profile we notice that  SortedVectorImpl::_indexOrderOf is
almost 1.6% which is quite high considering it is an access to
a container. We make mTagToNameMap as a std::unordered_map
to store the Tag and the types. The accesses would be in constant time.

This change removes this from the profile and give ~10% improvement.

Bug: 72526772
Change-Id: Iffd244febd093bdfec9fe4d5e846a0e59c0ecdce
2018-02-28 23:14:31 +00:00
TreeHugger Robot
0cbf96f1e2 Merge "Camera: assert no HAL1 in devices launched in P+" 2018-02-23 21:41:33 +00:00
Yin-Chia Yeh
58dd1650c7 Camera: assert no HAL1 in devices launched in P+
Also remove the length check for getCameraIdList as external
camera providers are supposed to report 0 there.

Test: atest VtsHalCameraProviderV2_4Target (on marlin)
Bug: 69473913
Change-Id: I9059a699a6c46a3aac76454e7e8673d2539d0fa1
2018-02-23 12:09:39 -08:00
TreeHugger Robot
c93fe9a9bb Merge "camera: Add OisSamples synthetic key" 2018-02-23 18:47:56 +00:00
Yin-Chia Yeh
cd17100fe6 Camera: clarify external camera device ID requirements
Bug: 64874137
Change-Id: Ibf45a0077952d2ec42cdef80659a019b6d24051f
2018-02-21 15:52:02 -08:00
Yin-Chia Yeh
8c76b8c465 Merge "Camera: avoid copying of HalRequest" 2018-02-21 21:53:22 +00:00
Yin-Chia Yeh
fa5aafbec3 Merge "Camera: implement external camera dumpState/close" 2018-02-21 18:34:22 +00:00
Yin-Chia Yeh
e086fb7b4a Camera: avoid copying of HalRequest
Bug: 64874137
Change-Id: I46ea14facf467921da633cde7e24ff9703a6a8f7
2018-02-20 16:28:55 -08:00
Yin-Chia Yeh
4a3393cd8a Camera: implement external camera dumpState/close
Also switch to v4l2 timestamp is it's MONOTONIC

Test: Cts CameraDeviceTest
Bug: 72261676
Change-Id: Iec82c254dcf16a56952ff8910d13c92782d48090
2018-02-20 16:28:50 -08:00
TreeHugger Robot
2e8bcf7a30 Merge "Camera: Add sensor sensitivity burst test" 2018-02-19 11:04:21 +00:00
Emilian Peev
a5f0207db7 Camera: Add sensor sensitivity burst test
A test is needed which will generate a burst request
that contains alternating sensor sensitiviry values.
The corresponding results need to be verified accordingly.

Bug: 37533777
Test: run vts --skip-all-system-status-check --skip-preconditions
--primary-abi-only --module VtsHalCameraProviderV2_4Target -l INFO

Change-Id: I58ccb645b83c48ba3360aae5ad44036ce213964d
2018-02-19 09:00:29 +00:00
TreeHugger Robot
d477e1e092 Merge "Camera: implement external camera flush" 2018-02-16 18:58:57 +00:00
Chien-Yu Chen
d8c3160e9d camera: Add OisSamples synthetic key
Add a synthetic OisSamples key containing timestamps and
shifts.

Test: CTS
Bug: 64847201
Change-Id: I6468136a329bcc67d087043ec8bd242bcd922e48
2018-02-15 12:40:36 -08:00
TreeHugger Robot
9c14496f2c Merge "Camera: Add support for empty physical settings optimization" 2018-02-14 20:25:38 +00:00
Yin-Chia Yeh
72eb5eea6b Merge "Camera: use rational/double for external camera framerate" 2018-02-14 18:31:02 +00:00
Yin-Chia Yeh
190e5601d6 Camera: implement external camera flush
Test: CTS abort capture test
Bug: 72261676
Change-Id: I0c3af8693a885672953ff394121c40c5ade59964
2018-02-13 18:52:42 -08:00
Yin-Chia Yeh
9eee6a9fd1 Merge "Camera: plumb external camera API1 support" 2018-02-13 22:35:06 +00:00
Yin-Chia Yeh
134093a43f Camera: use rational/double for external camera framerate
For better precision.
Ex: minFrameDuration of 30fps 333333334->333333333

Bug: 72261912
Change-Id: I830d694d34eb01426e46279c4c986d8879b9d847
2018-02-12 15:00:34 -08:00
Yin-Chia Yeh
1798249b8f Camera: plumb external camera API1 support
And also some refactoring to unify external camera
config file logics.

Bug: 72261912
Change-Id: If83d779c57540809bdaa58a5a32cf4ade734fafe
2018-02-12 12:16:23 -08:00
Eino-Ville Talvala
0a2a9fc18c camera.device@3.4/metadata@3.3: Revise MOTION_TRACKING capability
Simplify the API for the P release

- Remove new templates
- Update docs
- Also update some metadata docs from prior changes

Test: Revised Camera CTS passes
Bug: 63629224
Change-Id: I47fb170052cf6062955278ace624a91e8a0078b3
2018-02-12 11:29:25 -08:00
Emilian Peev
e0c52bb1f0 Camera: Add support for empty physical settings optimization
Empty individual physical settings should be allowed after
one initial successful request.

Bug: 72524845
Test: run vts --skip-all-system-status-check --skip-preconditions
--primary-abi-only --module VtsHalCameraProviderV2_4Target -l INFO

Change-Id: I18d22a56f5f0e6e1d81a6e8c844697c02bc343a1
2018-02-09 20:19:36 +00:00
Yuriy Romanenko
9cdd6f9516 External: Switch to legacy V4L2 buffer mapping
Required for older kernels like 3.x

Change-Id: I0680320b606727bdb0b22dab1df8c5954d623f10
2018-02-06 21:39:59 +00:00
TreeHugger Robot
fe1192ecfc Merge "External camera: add device config file" 2018-02-06 21:35:15 +00:00
TreeHugger Robot
8f8e3b2e11 Merge "camera: Update multi-camera capture VTS case" 2018-02-05 21:13:23 +00:00
Yin-Chia Yeh
1e08966178 Camera: fix external camera FD double close
Release fence close was handled by freeReleaseFences so
hidl_handle should not own the native handle.

Test: running external camera on marlin
Bug: 64874137
Change-Id: I68e76d31985380eb3c502276df07d3648f67b6f1
2018-02-02 16:00:29 -08:00
Yin-Chia Yeh
53f4cb140a External camera: add device config file
Also remove sizes cannot be cropped from maximal
size.

Bug: 72261897
Change-Id: Icb50cfa58a12e80be3cacc49569fac90be03c8e5
2018-02-02 11:50:56 -08:00
Emilian Peev
6c87861cf6 camera: Update multi-camera capture VTS case
Individual physical camera requests should only be allowed
in case the respective physical Ids are among the last
configured Hal streams.

Bug: 72524603
Test: run vts --skip-all-system-status-check --skip-preconditions
--primary-abi-only --module VtsHalCameraProviderV2_4Target -l INFO
Change-Id: Ia5715398f74f03528d7fe2e52e5b9e32ad654a2c
2018-02-02 08:36:12 +00:00
TreeHugger Robot
4c5bfc6979 Merge "Camera: add buffer size to Stream" 2018-01-30 06:05:25 +00:00
Yuriy Romanenko
e932f1b5cb Implement JPEG support in external camera HAL
* Certain tests are still failing

Change-Id: I01bb90757cd969ace30857a8d246e4701498d379
2018-01-29 12:07:34 -08:00
Yuriy Romanenko
33d5f66633 Common: Added CameraMetadata -> libexif converter
A fully-ported version of the ExifUtils class from
ChromeOS (see [chromeos]/src/platform/arc-camera/common/exif_utils.cc)

 * Made into an interface to remove libexif dependencies
   from header file
 * Rewrote ChromeOS dependencies
 * Minor fixes

Change-Id: I2e93fa3e08e6b82b26641cc736eeb1c61b04a2c0
2018-01-26 21:23:56 -08:00
Yin-Chia Yeh
b534d9bf29 Camera: add buffer size to Stream
So that HALs without device knowledge knows the maximal size
it can lock using graphics mapper API.

Bug: 64874137 72261675
Change-Id: I7363f5c63d955ab412f9570bf8e5be2a942cf381
2018-01-26 16:50:24 -08:00
Yuriy Romanenko
083de0c3c6 ExternalCameraDeviceSession: Fix request initialization
This code was exiting because of unsupported RequestTemplate::*
enum values that are now just ignored.

Change-Id: I37f79cbbfe99664ec173458721d71947f0d002ff
2018-01-26 16:11:12 -08:00
TreeHugger Robot
354db50595 Merge "External Camera: more CTS fix" 2018-01-25 23:37:41 +00:00
Yuriy Romanenko
d0bd4f11f8 Common: Added lock() to camera HandleImporter
Effectively a counterpart to lockYCbCr() but for generic single-plane
buffers

Change-Id: I73d051c085fe2b96810a1ed761deac177db2733d
2018-01-25 12:50:40 -08:00
Yin-Chia Yeh
4acd76e647 External Camera: fix aspect ratio/crop issue
Also switch to new EXTERNAL hardware level.

Test: ImageReaderTest#testAllOutputYUVResolutions pass
Bug: 72261912
Change-Id: I95f05a20827b413bfa480b0336fff395159678eb
2018-01-25 18:47:51 +00:00
Shuzhen Wang
39cf8fd9fe camera: Add physical camera metadata in CaptureResult
- When physical stream of a logical multi-camera is requested, HAL needs
to generate metadata for the physical cameras.
- In case no physical stream is requested for the logical multi-camera, no
capture result metadata is required for physical camera.
- Batch physical and logical metadata within one capture_result call.

Test: testLogicalCamera CTS test
Bug: 64691172
Change-Id: Id040620f3f0c350711d49341ab31ab88ecd94888
2018-01-24 18:14:58 -08:00
Yin-Chia Yeh
fb1c154342 External Camera: more CTS fix
Test: CameraDeviceTest, CaptureResultTest, StaticMetadataTest
      ExtendedCameraCharacteristicsTest, RobustnessTest
Bug: 72261912

Change-Id: Id99d86db99a905afcc41d3e9d297ce3533d852a2
2018-01-24 15:48:42 -08:00
Eino-Ville Talvala
658d30d3c8 camera.device@3.4: Add MOTION_TRACKING template enums
- Extend RequestTemplate with two new values
- Add legacy wrapper support for the new templates

Test: Builds, camera continues to run. CTS coverage of templates
tests new templates as expected.
Bug: 63629224
Change-Id: I2a44d86a815690798fa4b8327794c64716d134ee
2018-01-23 17:10:33 -08:00
Steven Moreland
5d1e41a8fd Update makefiles.
Bug: N/A
Test: N/A
Change-Id: Idb1d74aeed9b82ca6568c76f35552f3fcc894239
2018-01-23 19:44:19 +00:00
Yin-Chia Yeh
ab4502c707 Merge "Camera: Add external camera provider" 2018-01-23 02:54:27 +00:00
Guennadi Liakhovetski
6d2d1307e6 Merge "camera: add support for camera removal" am: cf99978291 am: 040c21f6c8
am: 3724fbedef

Change-Id: Ic32fd930f90515a74d1e44e4a3e932d20d7970ff
2018-01-23 02:52:28 +00:00
TreeHugger Robot
067a95dd28 Merge "camera.common@1.0: Add OWNERS to default/" 2018-01-23 02:37:39 +00:00
Yin-Chia Yeh
1903059507 Camera: Add external camera provider
Bug: 64874137 63873538

Change-Id: I4309874a7dedd3dd71d4bd0c2004d460421db679
2018-01-22 17:04:28 -08:00
Shuzhen Wang
30170d5590 Merge "camera: Add support for individual physical camera requests" 2018-01-23 00:36:17 +00:00
Eino-Ville Talvala
dc9c5ebb02 camera.common@1.0: Add OWNERS to default/
Test: Builds
Change-Id: I47d38789d8145cc34d74dcd8433f46f9688af88d
2018-01-22 15:25:53 -08:00
TreeHugger Robot
34c880d59a Merge "camera: Add OIS data keys" 2018-01-22 23:22:30 +00:00
Shuzhen Wang
4f3be2e3e9 Merge "camera: Add support for logical camera" 2018-01-22 20:30:15 +00:00
TreeHugger Robot
97d3c3b991 Merge "Camera: Include session parameters for 3.4 devices" 2018-01-22 20:26:32 +00:00
Guennadi Liakhovetski
eca1d45ba7 camera: add support for camera removal
Add camera removal support to CameraProvider and CameraModule.

Change-Id: I047e486d1665ba9e0b1455f77a7bbbb5e0d66653
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
2018-01-22 12:01:08 -08:00
Emilian Peev
b75aa350e7 camera: Add support for individual physical camera requests
Multi-camera devices should be able to accept and process
individual settings for all physical sensors backing the
logical camera. 'CaptureRequest' must be extended to hold
these additional physical camera settings.

Test: Manual using camera application,
camera_client_test,
run vts --skip-all-system-status-check --skip-preconditions
--primary-abi-only --module VtsHalCameraProviderV2_4Target -l INFO
Bug: 64691172
Change-Id: Ia38d1e7681a9385be7578c11e40f4e35e9101d75
2018-01-20 15:51:37 +00:00
Shuzhen Wang
82e36b3f8c camera: Add support for logical camera
- Add physical cameraId field in stream structure.
- Override processCaptureRequest due to physicalCameraId change.
- Update 3.3 metadata with logical camera characteristics.

Test: Camera CTS on Taimen, LogicalCamera CTS test on C1
Bug: 64691172
Change-Id: I65bd1ae38381ecb89fae439ae14b813c9bcc3248
2018-01-20 15:51:13 +00:00
Emilian Peev
37e1a5dcfd Camera: Include session parameters for 3.4 devices
To avoid glitches and unexpected behavior, session parameters
should be included in the stream configuration before invoking
capture requests.

Bug: 70560715
Test: run vts --skip-all-system-status-check --skip-preconditions
--primary-abi-only --module VtsHalCameraProviderV2_4Target -l INFO

Change-Id: Id4ecd40533157f1a3299099a984ffab21654548a
2018-01-20 15:47:31 +00:00
Chien-Yu Chen
5e8a1be6e6 camera: Add OIS data keys
Test: CTS
Bug: 64847201
Change-Id: I47f5d69f031ee0af8451fe87b746ca726400c55e
2018-01-19 16:22:59 -08:00
Yin-Chia Yeh
729eef72eb Camera: add new EXTERNAL hardware level
Bug: 64874137 63873538
Change-Id: I7063b3926c4ce649cba501467955a9885639f7be
2018-01-19 11:40:40 -08:00
TreeHugger Robot
32f4103dac Merge "camera: Add external flash mode key" 2018-01-19 04:19:24 +00:00
Guennadi Liakhovetski
e56eafc61d Merge "Camera: Fix hotplug" am: d7a0f2984d am: 78d88380d3
am: 99aaf673c5

Change-Id: I3e9566c4960c9f11376c7b0c8f377f9ccc1ac1ac
2018-01-18 20:20:55 +00:00
Treehugger Robot
d7a0f2984d Merge "Camera: Fix hotplug" 2018-01-18 20:11:39 +00:00
Steven Moreland
a6c5ff2c6d Update makefiles.
Some have missed being updated.

Bug: N/A
Test: N/A
Change-Id: I0925e85701f6e8b98f9b09bfafbed73469d1d185
2018-01-17 11:20:17 -08:00
Chien-Yu Chen
79f734b8f0 camera: Add external flash mode key
Test: CTS
Bug: 64847201
Change-Id: Ic99df793e4fe2b016c930c344eb64a264f004945
2018-01-11 10:58:29 -08:00
Emilian Peev
9fc7f3b467 camera: Correct 'availableSessionKeys' version
The metadata version for the available session keys should be 3.3 .

Bug: 64450664
Test: Builds, hidl-gen/hidl-doc are happy
Change-Id: Id53cfeda8c7d528d10c3dd26c64bdb56d9404cb2
2018-01-10 13:53:55 +00:00
Eino-Ville Talvala
e41911b65c Add MOTION_TRACKING capability/intent, and lens poseReference
Test: Builds, hidl-gen/hidl-doc are happy
Bug: 63629224
Change-Id: Ibf8a57c3d917f24db6ff269461d55f177ec55fcf
2018-01-05 12:02:48 -08:00
Guennadi Liakhovetski
7b7ede7ebd Camera: Fix hotplug
According to the camera_module_t::get_number_of_cameras() description
in camera_common.h, it should only return the number of "fixed"
cameras, i.e. cameras, facing to the front and to the back. Any
cameras, with the facing value of "external," i.e. externally connected
cameras, should not be reported by it, instead they should later be
reported, using the
camera_module_callbacks_t::camera_device_status_change() callback.
However, this doesn't work. When a camera is reported this way, it is
ignored as unknown. Fix this by adding a new camera, when its status
change is reported.

Change-Id: I18874ed005f477e32fb723c00c16b67a81cde6ce
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
2018-01-04 11:42:27 +01:00
Chien-Yu Chen
13cfbf07ff camera: Add device info version
Test: CTS
Bug: 64847201
Change-Id: I4e9002bb8ed47249eff00e54dfd3b31c97d28777
2018-01-03 14:39:59 -08:00
TreeHugger Robot
a557df85f0 Merge "Camera: Bump device version to 3.4" 2017-12-22 19:18:51 +00:00
TreeHugger Robot
1eab571c03 Merge "Add camera.metadata@3.3" 2017-12-22 00:16:57 +00:00
Emilian Peev
e18057b42f Camera: Bump device version to 3.4
Camera devices supporting version 3.4 will be able to receive
session parameters during the stream configuration phase.

Bug: 64450664
Test: Camera CTS
run commandAndExit vts --skip-all-system-status-check
--skip-preconditions --primary-abi-only --module
VtsHalCameraProviderV2_4Target -l INFO

Change-Id: Ifd83bfe0e512fe75b63602b4aba98f4cc1cdeb53
2017-12-20 10:44:11 +00:00
guoyin.chen
bc164e1300 Merge "openmax header files have been relocated" am: 8e0f8836d9 am: 3794336021
am: fed56a4ed9

Change-Id: I55d350c1c00b989d0e41b98646b54d1f64bf92dc
2017-12-20 00:34:42 +00:00
guoyin.chen
fed56a4ed9 Merge "openmax header files have been relocated" am: 8e0f8836d9
am: 3794336021

Change-Id: I1a1fa65280343197f2dbc100b56153b028ea0adf
2017-12-20 00:32:05 +00:00
Eino-Ville Talvala
6d3feccd88 Add camera.metadata@3.3
To be used by camera.device@3.4; unfortunately the versioning is
now skewing since no metadata additions were needed for device@3.3

Includes the earlier-added control.afSceneChange entry.

Test: hidl-gen, hidl-doc, builds
Bug: 64847201
Change-Id: I341a018a7eccf63758e356e9b426a41b575ade9f
2017-12-19 12:01:10 -08:00
TreeHugger Robot
5ccd0eb248 Merge "Camera: add hardware level check" 2017-12-19 01:17:48 +00:00
guoyin.chen
1b1f65808a openmax header files have been relocated
openmax header files relocated at headers/media_plugin/media/openmax
Build error as below:
source path frameworks/native/include/media/openmax does not exist

Change-Id: Ifb43a8b47c9ecd7adc4ef715948c52015603ba40
Signed-off-by: guoyin.chen <guoyin.chen@nxp.com>
2017-12-19 01:57:58 +08:00
Yin-Chia Yeh
13774fd5f6 Camera: add hardware level check
To disallow HAL3 device advertise itself as LEGACY.

Test: ran on walleye
Change-Id: Ib0b98f32c401566323eee546ee23c7873c00aef0
2017-12-06 13:59:28 -08:00
Eino-Ville Talvala
cc08739452 camera.metadata@3.2: Auto-generate metadata enums
Replace hand-written types.hal with one autogenerated from the
metadata definitions, like the SDK, NDK, and camera_metadata C library
definitions are.

No changes to actual definitions; only formatting changes and basic
documentation of each entry are added.

Add the new hash of camera.metadata@3.2::types to current.txt.

Bug: 33262893
Test: Manual inspection of new vs. old types.hal, builds, hidl-doc output
   is acceptable
Change-Id: Idd8c228359e45de3609bc16ac19e878b0ed0a557
2017-12-05 12:27:52 -08:00
Steven Moreland
4e1e4081e4 Updating makefiles for hidl_interface.
Bug: 64487114
Test: manual
Merged-In: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
Change-Id: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
(cherry-picked from commit c2f829a1d2)
2017-12-03 10:31:49 -08:00
Steven Moreland
e5c6548346 Remove subdirs
Removing whenever I see these in code reviews.

Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
2017-11-28 14:23:43 -08:00
Steven Moreland
8b76a6b90d Remove subdirs
Removing whenever I see these in code reviews.

Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
2017-11-28 14:22:55 -08:00
Steven Moreland
fcca4e23b7 Remove subdirs
Removing whenever I see these in code reviews.

Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
2017-11-28 14:22:43 -08:00
Xin Li
bb9e38fef9 Merge commit '1a06284b24f5eb7bb9c1fea0817da8898b3b1bff' from
oc-mr1-dev-plus-aosp into stage-aosp-master

Change-Id: I2a044eb8c9981d0a8198ffe2df55559afbd76341
Merged-In: I4fb9f18884f7ef21162015a0032c4431444f7025
2017-11-14 12:08:38 -08:00