Commit graph

518 commits

Author SHA1 Message Date
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
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
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
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
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