Commit graph

88 commits

Author SHA1 Message Date
Steven Moreland
a5299ee739 Fix typo in update makefiles.
Bug: 37518178
Test: pass
Change-Id: Ic401b3a473f15ca4c01e58b3072e19db7c31b653
2017-09-26 21:59:43 +00:00
Steven Moreland
26a0bb2762 Update makefiles for hidl adapter.
Bug: 37518178
Test: manual
Change-Id: I50e999907d3c64d2b039272b823971998da64d1b
2017-09-25 18:35:56 +00:00
Steven Moreland
dfd8287506 Updating all makefiles.
Bug: 64487114
Test: none
Merged-In: I8608c8f636c35f21e4246a805a9eff6d14124e0a
Merged-In: I2fa89b6661c39859ec4fb62c4bb0a05a35e645f0
Merged-In: Ifdc3c17cb2b85c18b37dac2d03bb5c8935c23180
Change-Id: I170fa1c4fe39f8109b1670db58ef99bb11afc0be
2017-08-14 20:25:09 +00:00
Yin-Chia Yeh
1ea71cc4f2 Merge "Camera: fix camera_metadata address expectation" into oc-dev
am: e812feb56f

Change-Id: I9142f4bb7a55f9c1e6547a038b21f7cbb4e5adba
2017-06-16 19:40:12 +00:00
Yin-Chia Yeh
92d885b558 Camera: fix camera_metadata address expectation
On 32bits architecture, binder driver might allocate
non-8 bytes aligned buffers.

Test: compile (problem not reproducible on 64bit SOCs)
Bug: 62637461
Change-Id: I8ef2b3ecba783a8d189ebe18733082d32cff4899
2017-06-15 14:27:13 -07:00
Chih-Hung Hsieh
d3bc681f26 Remove unused lambda capture
New clang compiler gives warning to unused lambda captures.
Apply clang-format.

Bug: 37423073
Test: Build

Change-Id: Icdf019df1a6c9dcadeb35551377d7afa09eebb3e
(cherry picked from commit 7eb57b60ab)
2017-06-07 12:57:20 -07:00
Steven Moreland
f203167814 Update makefiles. (2/2)
am: 76cfb84140

Change-Id: I24d21438a5b2f447d2160929c6ff6e17b2b66820
2017-05-22 17:15:20 +00:00
Steven Moreland
76cfb84140 Update makefiles. (2/2)
Adds default configuration for all hals.

Bug: 38415912
Test: pass
Change-Id: Idd1f3a2b7b16ad956d31784a513e93a066cdd02e
2017-05-19 15:54:03 -07:00
Steven Moreland
a32ebce372 Update makefiles for c++-sources and c++-headers. (2/2)
am: bc71124120

Change-Id: Icf36068a4d863a8520854c7a83e51f960c188e12
2017-05-11 00:48:55 +00:00
Martijn Coenen
b05e4c9414 Merge "Start processes that need real-time with CAP_SYS_NICE." into oc-dev
am: 6c062f77c1

Change-Id: I921160390dc9f90e7872729194ed1d1240ce68b7
2017-05-11 00:47:30 +00:00
Steven Moreland
4be51a8512 Merge changes from topic 'fix-hidl-generate' into oc-dev
* changes:
  Update makefiles for c++-sources and c++-headers.
  Update makefiles for c++-sources and c++-headers. (2/2)
2017-05-10 20:02:40 +00:00
Martijn Coenen
6c062f77c1 Merge "Start processes that need real-time with CAP_SYS_NICE." into oc-dev 2017-05-10 17:55:47 +00:00
Steven Moreland
bc71124120 Update makefiles for c++-sources and c++-headers. (2/2)
Test: pass
Bug: 38174080
Change-Id: Icad451f9f9ad5f46412356a4171a8a1222f8e545
2017-05-09 19:58:43 -07:00
Eino-Ville Talvala
e643da4e19 Merge "Camera: Clean up TODOs that aren't going to be addressed." into oc-dev
am: 0b3d86e05a

Change-Id: Ic0ca4e1eff6716466ef86bc6a660bc371da875d6
2017-05-09 21:32:10 +00:00
Martijn Coenen
f9b3fb49df Start processes that need real-time with CAP_SYS_NICE.
Bug: 37293077
Test: verified CAP_SYS_NICE granted in /proc/pid/status
Change-Id: If404450cbeb077d331b231bda1af2d6eae774b75
2017-05-09 09:57:00 -07:00
Eino-Ville Talvala
e0a0a1c239 Camera: Clean up TODOs that aren't going to be addressed.
These TODOs aren't in scope for the wrapper libraries.

Leave the few TODOs that have bugs tracking them, and the ones that
are from autogenerated metadata.

Test: Builds
Bug: 34108979
Change-Id: Ib28467a4fbcfaab4a0809334bc62eabb9290797a
2017-05-08 15:29:28 -07:00
Steven Moreland
5c63b11f76 Remove redundant dependencies
android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.

Test: links
Bug: 33276472
Merged-In: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
Change-Id: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
2017-05-02 15:29:30 -07:00
TreeHugger Robot
02b745ff40 Merge "Camera: use gralloc mapper for handle import" into oc-dev 2017-04-27 23:00:50 +00:00
Yin-Chia Yeh
519c1675c3 Camera: use gralloc mapper for handle import
Bug: 37540361
Test: marlin, smoke test GCA
Change-Id: I9d58d9c6af20b37c016f036bce2dcf55817c59aa
2017-04-27 14:11:07 -07:00
Emilian Peev
c9ded51848 CameraProvider: Check camera device version
Make sure we are working with supported devices.

Bug: 34392075
Test: Manual using application
Change-Id: I834612303f3e02e79924efbdcc25cff890defefb
2017-04-25 20:05:41 +01:00
Chris Forbes
58a80300aa camera: Adjust for libui gralloc flags change
Change-Id: Ia09737c28a78a8a50a9f751ed2774299ecc3d58c
Bug: b/33350696
Test: Bullhead: booted to launcher, take photo, watch youtube
2017-04-21 17:32:37 +00:00
Yifan Hong
1192e1d109 Use fmq for camera capture request.
Test: camera works.

Bug: 35788245 [Treble] Pass camera metadata using shared memory
Change-Id: I4a1585315bf448c8c57def2964237cae21bdbe03
2017-04-13 13:25:29 -07:00
Iliyan Malchev
b4488af17c android.hardware.camera.provider@2.4: set up /dev/vndbinder
The camera-HAL implementation may need to communicate with other vendor
components over /dev/vndbinder.  Route all libbinder traffic to that
node.

b/36651814
b/36651237
b/35870313
b/36683636

Test: sailfish

Change-Id: I9b80fefbcdf5ce18a2d788e8582ea8791a604435
Signed-off-by: Iliyan Malchev <malchev@google.com>
2017-04-13 00:24:39 +00:00
Steven Moreland
3b36a83a2e Update makefiles (2/2).
Test: pass
Change-Id: Ic7e6289c7b69785491708ce0acbb657f4c704229
2017-04-11 09:58:03 -07:00
Chia-I Wu
79d13ff0f5 graphics: revise gralloc interfaces
Revise IAllocator and IMapper to reduce IPC and to support gralloc0
devices.

Specifically, IAllocator is trimmed down to have essentially only

    allocate(BufferDescriptor descriptor, uint32_t count)
        generates (Error error,
                   uint32_t stride,
                   vec<handle> buffers);

The ability to allocate buffers with shared backing store is
removed.  ProducerUsage and ConsumerUsage are moved to the
graphics.common package and are merged and renamed to BufferUsage.
BufferUsage's bits follow gralloc0.

IMapper gains

    typedef vec<uint32_t> BufferDescriptor;
    createDescriptor(BufferDescriptorInfo descriptorInfo)
          generates (Error error,
                     BufferDescriptor descriptor);

where BufferDescriptor is an implementation-defined blob.  lockFlex
is replaced by lockYCbCr.  All getters are removed.

Reference counting with retain/release is replaced by
importBuffer/freeBuffer.

Most if not all gralloc1 features are not used by the runtime yet.
There is also not too much test written for them.  As such, they
tend to behave differently between implementations and cannot be
used reliably.

Bug: 36481301
Test: builds and boots on Pixel
Change-Id: I1d31105120517ea2c128c7a19297acf3bfd312bb
2017-04-10 11:15:54 -07:00
Steven Moreland
4e7a307730 Fix transitive includes.
Files relying on transitive include of utils/Log.h (and things that it
includes) from MQDescriptor.h

Test: pass
Merged-In: Iff316b21bef556bb026378b7f89e97ded3febef4
Change-Id: Iff316b21bef556bb026378b7f89e97ded3febef4
2017-04-06 22:04:05 +00:00
Greg Hartman
7b63265377 Merge "CameraProvider: Refactor legacy name regex code" into oc-dev 2017-04-05 22:20:21 +00:00
Andreas Gampe
0b171f1ff2 CameraProvider: Refactor legacy name regex code
The match will use iterators that will be invalidated when the
used string input goes out of scope. Refactor the API to return
the two components of the match.

Bug: 36871785
Test: m && m SANITIZE_TARGET=address
Change-Id: I2418541234a09e53856ea61e0fbc4b67d8036308
2017-04-05 10:34:04 -07:00
Yin-Chia Yeh
ae880e4922 Merge "Revert "camera: Map between legacy gralloc0 usage, and HIDL gralloc1 usages"" into oc-dev 2017-04-04 22:22:03 +00:00
Yin-Chia Yeh
c25c54f4b1 Revert "camera: Map between legacy gralloc0 usage, and HIDL gralloc1 usages"
This reverts commit 2d80c0d66f.

Test: fix b/36876770
Bug: b/36876770
Change-Id: Ia251ec97273d71fd5bc759aa1161960f6266358a
2017-04-04 13:19:09 -07:00
TreeHugger Robot
73bae67b5d Merge "Camera: HAL1: remove libbinder usage" into oc-dev 2017-04-04 19:24:26 +00:00
TreeHugger Robot
2fc995846c Merge "Camera: add interface to evict obsolete buffer caches" into oc-dev 2017-04-04 00:31:01 +00:00
Eino-Ville Talvala
4cea813a35 Merge "camera: Map between legacy gralloc0 usage, and HIDL gralloc1 usages" into oc-dev 2017-04-03 22:03:15 +00:00
Yin-Chia Yeh
28eebbfc41 Camera: add interface to evict obsolete buffer caches
Test: fix CTS ReprocessCaptureTest
Bug: 34461678
Change-Id: Icde654b0c8423c31d7d39d180913ffa374e7de3c
2017-04-03 14:41:23 -07:00
Yin-Chia Yeh
12b364bf8a Camera: HAL1: remove libbinder usage
Test: Angler HAL1 preview/takePicture/record
Bug: 35887419
Change-Id: I6cb37fd78a2fad1ee3b24e4cd61e3a3b2bce4744
2017-04-01 13:19:46 -07:00
Yin-Chia Yeh
1ba83a9a28 Camera: add HAL1 recording batching support
Test: Angler HAL1 + set mBatchSize to 4 locally
Bug: 35997432
Change-Id: I6baf112f9da56534ae81008bad818fba1e76a294
2017-04-01 13:12:49 -07:00
Eino-Ville Talvala
2d80c0d66f camera: Map between legacy gralloc0 usage, and HIDL gralloc1 usages
Otherwise some bits will be set incorrectly.

Also move device@1.0 to use ProducerUsageFlags instead of ProducerUsage,
and add a compatibility workaround to set the gralloc0 HW_CAMERA_ZSL flags
when ConsumerUsage::CAMERA is passed in.

Test: Camera CTS passes, updated VTS tests pass
Bug: 35215313
Change-Id: I981dc1a650f838f94d932944fe835fd267f2004d
2017-03-30 16:11:26 -07:00
Steven Moreland
54cc198022 update-makefiles for transisitive dependencies
Test: pass
Bug: 36162559
Change-Id: I4f5fddaef9811f0da1d69fa26a5d34830a1a9634
2017-03-20 07:13:46 -07:00
TreeHugger Robot
9198e7bb30 Merge "Camera: add batching support" 2017-03-20 06:13:12 +00:00
Yin-Chia Yeh
bed3a9473e Camera: add batching support
Currently only batching high speed recording request/results.

Test: GCA slow motion recording working
Bug: 34899394
Change-Id: Id83b9d1cefe011391c86a5e7e898262a169cc9e7
2017-03-19 21:36:49 -07:00
Eino-Ville Talvala
b439b10d60 camera.provider@2.4: Legacy wrapper: Run with more threads.
Each concurrent camera device in use needs 1 thread to maintain
operational semantics, plus we probably need threads for sensor service
calls, misc camera service calls, etc.

Up thread count to 6. That should be enough for everybody.

Test: Camera still works on sailfish
Change-Id: I2262c69985756fbf762034663ce24f45bf7ce2f1
2017-03-17 13:37:01 -07:00
TreeHugger Robot
0e5e908e69 Merge "Camera: Provider: Set up vendor tag before getDeviceVersion" 2017-03-16 15:26:38 +00:00
Shuzhen Wang
efb7bfa993 Camera: Provider: Set up vendor tag before getDeviceVersion
getDeviceVersion calls get_camera_info, which could contain vendor tags.
As a result, we need to set up vendor tag before that.

Test: Verify vendor tag in static metadata works.
Bug: 33641150
Change-Id: Id4cfea52235542b19170a757b4c6bea3ad1d190d
2017-03-15 18:35:42 -07:00
Emilian Peev
afc6723e86 Camera: Check for transport errors during VTS
- Check for transport errors during IPC calls.
- Some code clean up and refactoring.

BUG: 32022758
Test: compile and run the gtest binary on device
Change-Id: I71f96704f82db629d1982997940d8d1b7525ffea
2017-03-15 08:36:27 +00:00
Emilian Peev
ff8da298b9 Camera: Add Hal version 1 get-/setParameter tests
Tests are required for checking the basic camera parameters
functionality.

BUG: 32022758
Test: compile and run the gtest binary on device
Change-Id: I5725fef0bb4f5ac08ecae94def5cae66a640409a
2017-03-15 08:36:27 +00:00
Emilian Peev
9c8c26965b Camera: Add Hal version 1 sendcommand tests
Tests are needed for verifying 'sendCommand' API call.
Several new test cases will be available:
"sendCommandFaceDetection" - This will check whether face detection is
available and try to enable&disable it.
"sendCommandSmoothZoom" - Will try to verify whether smooth zoom can
be enabled&disabled in case the camera supports it.

BUG: 32022758
Test: compile and run the gtest binary on device
Change-Id: Ib56f363126907f24b1af04187b093aa6c8e8ac99
2017-03-15 08:36:27 +00:00
Emilian Peev
5a81965a10 Camera: Add Hal version 1 autofocus test cases
Tests should be available for autofocus verification. The new
cases include:
"autoFocus" - Check whether the camera supports autofocus. In case
 auto is supported it will continue and test all available modes that
allow 'autoFocus' calls.
"cancelAutoFocus" - In case auto is supported, the test will trigger
full AF scan and cancel it immediately.
'CameraParameters' functionality is also required and should be included.

BUG: 32022758
Test: compile and run the gtest binary on device
Change-Id: I3bef25c5fdb6bbfa87517e6d255e4e6e01544d7d
2017-03-15 08:36:21 +00:00
Emilian Peev
cf7b797926 Camera: Add Hal version 1 video recording test cases
Tests involving Hal version 1 video recording APIs are
required. Several cases will be available:
- 'startStopRecording' - Verifies basic video recording
functionality. Metadata support will be tested if available.
- 'startRecordingFail' - Checks that recording can be enabled
only after preview starts.

Bug: 32022758
Test: compile and run the gtest binary on device
Change-Id: Id9dd8d3a554a1aa3bbbae9b836e4d14da5c4446b
2017-03-14 18:21:34 +00:00
Emilian Peev
92c7a65133 Camera: Add Hal version 1 image capture test cases
Tests involving Hal version 1 image capture APIs are
required. Several cases cover this:
- 'takePicture' - Regular image capture after preview gets enabled.
- 'takePictureFail' - Checks correct behavior in case preview is not
running.
- 'cancelPicture' - Verifies that image capture can be cancelled.
- 'cancelPictureFail' - Checks that image capture cancel fails as
expected in case 'takePicture' didn't get called.
Switch to BufferItemConsumer instead of CpuConsumer and use GLConsumer
default usage flags.

Bug: 32022758
Test: compile and run the gtest binary on device
Change-Id: I8db60aa8a21b6f829574fc9538da5644a4051e49
2017-03-13 08:58:49 +00:00
Emilian Peev
24f09645da Camera: Add device ver. 1 preview test cases
Test cases enabling/disabling preview using version 1
camera devices are needed. Test case is also available
for "setPreviewWindow".

BUG: 32022758
Test: compile and run the gtest binary on device
Change-Id: I234881fe940309dbb6ac11bfee7d01cc76d09f59
2017-03-13 08:58:21 +00:00