Commit graph

154 commits

Author SHA1 Message Date
Andreas Huber
6fa374ad30 Changed the naming scheme for Treble java libraries (both static and dynamic)
android.hardware.foo@1.0-java => android.hardware.foo-V1.0-java

Bug: 37207894
Test: make
Change-Id: I177f4cfd42f635aaf096107af8309d1a82ed41c0
Merged-In: I8b91881dfaf507c0d852d56ebbb53ff0987e5a34
2017-04-13 15:23:46 -07: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
TreeHugger Robot
f8b85e63e4 Merge "android.hardware.camera.common@1.0-helper: vendor" into oc-dev 2017-04-13 04:12:12 +00: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
7d774e7937 android.hardware.camera.common@1.0-helper: vendor
Test: links/camera works
Bug: 33241851
Change-Id: I5bb846fabca29b789692fe8c253383fd821b8ba6
2017-04-11 20:58:31 -07: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
Andreas Huber
40d3a9bd8c Convert all comments into "doxygen-ready" comments.
Bug: 36453077
Test: mma
Change-Id: I0b1f77dfae5d2258969e33d85ecf45401ffbdfaa
2017-03-29 08:53:58 -07:00
Steven Moreland
561b602a99 Update makefiles for hwtypes.h
Test: pass
Change-Id: I8e17eb8fec5d2f04c526476a866c8dd54ccb556c
2017-03-28 15:18:20 +00:00
TreeHugger Robot
04a9f9abd6 Merge "Camera: Add doc for combined stream usage flags" 2017-03-23 03:44:35 +00:00
Shuzhen Wang
43698a2f5d Camera: Add doc for combined stream usage flags
Specify the HAL behavior when stream usage flag is combination for
multiple consumers.

Test: Compile
Bug: 33777818
Change-Id: I97e7bcc79ee36a395210c7cf8deefc4f175d3e07
2017-03-20 12:10:31 -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
4e07c744c9 Merge "Camera: Update HAL interface doc for high speed video batching" 2017-03-17 00:32:55 +00: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
TreeHugger Robot
360cad209a Merge changes from topic 'vts_camera_tests'
* changes:
  Camera: Check for transport errors during VTS
  Camera: Add Hal version 1 get-/setParameter tests
  Camera: Add Hal version 1 sendcommand tests
  Camera: Add Hal version 1 autofocus test cases
  Camera: Add Hal version 1 video recording test cases
  Camera: Add Hal version 1 image capture test cases
  Camera: Add device ver. 1 preview test cases
  Camera: Extend camera test cases for camera 1.0 devices
  Camera: Add flush test cases
  Camera: Enable and check for torch callbacks
2017-03-15 18:33:05 +00: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
TreeHugger Robot
30666ba2c6 Merge "Move camera hal imp to vendor partition" 2017-03-14 23:47:32 +00:00
Shuzhen Wang
145e135bd9 Camera: Update HAL interface doc for high speed video batching
Now cameraservice only sends one shutter notify and capture result to
the application per batch. Update the HAL interface doc to reflect this.

Test: Compiles
Bug: 35775704
Change-Id: I3a7967f0342213699989c70f485b379ccb94a1ff
2017-03-14 14:14:04 -07: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
Emilian Peev
ceb0ee8b96 Camera: Extend camera test cases for camera 1.0 devices
Test cases involving camera version 1.0 devices are
required. The API methods which overlap between 3.x and 1.0
devices should be considered in the respective test cases.

BUG: 32022758
Test: compile and run the gtest binary on device
Change-Id: I044b6586b812aed14d66867d51f97123addcd718
2017-03-13 08:57:43 +00:00
Emilian Peev
a3bba4c43c Camera: Add flush test cases
Camera should flush pending requets and buffers
correctly. Two new test cases will help with
 the verification of this method:
- 'flushPreviewRequest' - Constructs a valid camera request
and sends it to camera. The test will not wait for the request
to complete instead it will call flush immediately. The results
 and notifications that follow are checked for consistency with
expected behavior.
- 'flushEmpty' - Triggers flush without any pending request. Check
 whether the camera behaves as expected.

BUG: 32022758
Test: compile and run the gtest binary on device

Change-Id: Iab9e37b3864491f970a783a68952a9c0c1703520
2017-03-13 08:57:38 +00:00
Emilian Peev
40f6211413 Camera: Enable and check for torch callbacks
The expected torch callbacks can be verified during
 the torch set test.

BUG: 32022758
Test: compile and run the gtest binary on device
Change-Id: Idaa1a4c6eb5306f1a2e1d126f54fcb26aaa1dc7c
2017-03-13 08:57:27 +00:00
Yuexi Ma
ed2bb4e8f8 Change vts target base test class name
Test: make vts succeed, vts kernel tests and nfc hal tests passed
Change-Id: I95f10ad7a66f261c9030357edd411fe6d94150e8
2017-03-10 21:14:48 +00:00
TreeHugger Robot
ef4522aca2 Merge "camera.device@1.0: Fix minor doc bug" 2017-03-09 23:11:48 +00:00
Jiyong Park
23cd03b27f Move camera hal imp to vendor partition
In order to make generic system image, these HAL implementation need to
be moved from system to vendor partition.

Bug: 36043196
Test: make, flash and make sure that they are at /vendor/lib[64]/hw.
Change-Id: I486cd32c36143102b3923acc58fda4f8aec30cb1
2017-03-09 17:15:20 +09:00
Steven Moreland
48c52249e4 hidl_default to all targets.
find hardware/interfaces -type f -not -path "*/.git/*" \
-exec sed -i -e '/cc_[A-Za-z_]\+/ { N; s/$/\n    defaults:
\["hidl_defaults"\],/ }' {} \;
./hardware/interfaces/update-makefiles.sh

Test: pass
Bug: 35840847
Change-Id: If10c464d2f000b85c8d698fe11a4f3fc4cfad282
2017-03-08 19:31:53 -08:00
Steven Moreland
d0c5b56e29 Camera: remove unused variable
Test: pass
Change-Id: Ic382adca84ed16826fb56ebd20c573fdf8021d7b
2017-03-08 19:27:05 -08:00
Steven Moreland
40e3ea48b4 Camera: remove warning from VTS test
Test: pass
Change-Id: I8028577c5589aa7234dd55c7602aeb807f25501d
2017-03-08 19:09:09 -08:00
Eino-Ville Talvala
8a2a97a8ee camera.device@1.0: Fix minor doc bug
Refer to HALv1 parameter instead of HALv3 parameter for setTorchMode
docs.

Test: Builds
Change-Id: I20426c2b7b68b5f8fa9dbbabac264e6100478ffc
2017-03-08 11:47:51 -08:00
TreeHugger Robot
858a03292a Merge "camera/device/3.2: Add custom vendor operating modes" 2017-03-07 22:19:48 +00:00
Yin-Chia Yeh
b47ff3d67a Merge "Camera: default implementation of device 1.0" 2017-03-02 23:15:55 +00:00
Yin-Chia Yeh
248ed700fe Camera: default implementation of device 1.0
Also some updates to HIDL interface:
  - Add releaseRecordingFrameHandle to ICameraDevice
    for native handle metadata recording mode
  - Add handleCallbackTimestamp to ICameraDevieCallback
    for native handle metadata recording mode
  - Add missing face detection metadata to
    ICameraDeviceCallback::dataCallback
  - Instead of passing native handle, pass buffer ID
    in dequeueBuffer/enqueueBuffer/cancelBuffer in
    ICameraDevicePreviewCallback
  - Add CameraFrameMetadata in types.hal for face
    metadata

Test: Camera CTS passing (except FlashLightTest) on Angler
Bug: 30985004
Change-Id: Idf72a4b5f4c934845ac698f0b13536608ffd0100
2017-03-01 22:24:39 -08:00
Eino-Ville Talvala
6d1dcd309a camera/device/3.2: Add custom vendor operating modes
This fixes a perf/feature regression from the legacy HAL definitions;
previously, vendor implementations could use custom values with this
field to implement custom features on their devices.

Add several enum values that can be used for this purpose.

Test: New CTS test passes
Bug: 34853980
Change-Id: I1b37a9511326178b8eb7536ff99e14d83be3b0c2
2017-03-01 13:45:59 -08:00
Yuexi Ma
50d7e27b3c change all vts hidl tests to use VtsHalHidlTargetBaseTest (internal master)
Bug: 33385836
Test: mma
Change-Id: Ide3ebc4a9db76257f33bcfb0c1f13d2ee33eeaa8
2017-02-28 22:27:28 +00:00
TreeHugger Robot
2653620a61 Merge "Remove viral dependency on libhwbinder. (2/2)" 2017-02-24 23:25:26 +00:00
Steven Moreland
7e73d5b908 Remove viral dependency on libhwbinder. (2/2)
find hardware/interfaces -name Android.mk -exec sed -i -e '/libhwbinder
\\/d' {} \;
find hardware/interfaces -name Android.bp -exec sed -i -e
'/"libhwbinder"/d' {} \;
./hardware/interfaces/update-makefiles.sh

Note, automotive has some actual dependencies on libhwbinder, filed
b/35758626 for this.

Test: everything links
Test: (sanity) booted marlin on internal master with these changes
Bug: 35710429
Change-Id: I6d0726c8130d00684b978efbdd48e3ae396f12e5
2017-02-24 12:18:01 -08:00
Emilian Peev
5b93a77a9d Camera: Redirect dump to "/dev/null" instead of stdout
This SELinux context doesn't have permission to access stdout
in read/write mode. Doing so will result in violation and
subsequent failure when running in binderized mode. Switch to
 '/dev/null' which still can be used with SELinux enabled.

BUG: 35701060
Test: adb shell
/data/nativetest/VtsHalCameraProviderV2_4TargetTest/VtsHalCameraProviderV2_4TargetTest

Change-Id: Ib1cf2766ca41cfe3600ad8a4442a334dfab0e2c1
2017-02-23 12:00:11 +00:00
Emilian Peev
56c2e79dd1 Camera: Add camera capture request VTS tests
Use single camera capture requests to verify basic
'processCaptureRequest' functionality:
- 'processCaptureRequestSinglePreview' will generate
a valid preview capture request. The result needs to
include both valid stream Id and frame number.
- 'processCaptureRequestInvalidSinglePreview' will
omit the settings from the first capture request. Hal
should handle this by returning an appropriate error.
- 'processCaptureRequestInvalidSingleSnapshot' will
have a valid blob request but no valid output buffers.
Hal should again return appropriate error in this case.

BUG: 32022758
Test: compile and run the gtest binary on device
Change-Id: I021dd150b12d4be39fae47e13ba82d3db105bfa3
2017-02-22 10:03:39 +00:00
Emilian Peev
378f8aaec6 Camera: Extend Camera VTS testing
Further tests concerning camera configurations. The
additional tests corver:
- The available stream configurations.
- Invalid stream parameters.
- Constrained mode if available.
- ZSL mode if available.
- Stream combinations including preview and still capture.
- Stream combinations including video and snapshot.

BUG: 32022758
Test: compile and run the gtest binary on device
Change-Id: I5111ac96b4aaa7ad9f163f990f6b0d0c229993f9
2017-02-22 09:50:09 +00:00
Zhuoyao Zhang
8422f6aa04 Update the test binary and source file name on master.
* To confirm with Vts naming convention.

Bug: 35273456
Test: mma
Change-Id: I845da64085253cd02480465479618308045a52ed
2017-02-21 20:47:18 -08:00
Yin-Chia Yeh
7ddf7abff5 Merge "Camera: Fix ION buffer leaks" 2017-02-14 18:17:37 +00:00
Emilian Peev
bbdb1f6f5d Camera: Fix ION buffer leaks
Native buffer handles should always get closed
and deleted during buffer release.

BUG: 35338606
Test: Manual using application
Change-Id: I5d7a4b02a28b29b872b66843d623166f04207c2e
2017-02-14 09:30:35 +00:00
Steven Moreland
a0da1a1c3d Move hidl shims to the vendor partition. (2/2)
We need google shims on the vendor partition because they are providing
an implementation of a vendor defined interface. They were written by
google just as a courtesy/to make the transition easier. They're
basically a set for vendors to assemble their hal implementations
from.

Bug: 34135607
Test: marlin persist.hal.binderization on/off
Change-Id: I2e2af5af39264cf290259755bb9b2eb9827a21f5
2017-02-13 15:03:41 -08:00
TreeHugger Robot
5331371a3a Merge "Camera: Delete streams after successful configuration" 2017-02-13 11:18:29 +00:00
TreeHugger Robot
86fa244c12 Merge "Update makefiles to use filgroup syntax." 2017-02-10 23:25:52 +00:00
TreeHugger Robot
daa20b72c2 Merge "Camera: fix open_legacy crash" 2017-02-10 23:01:48 +00:00
Eino-Ville Talvala
305f0dd8a2 Merge "camera.provider default: Don't stop init if vendor tags are bad." 2017-02-10 22:04:47 +00:00
Eino-Ville Talvala
0f5eb837fe camera.provider default: Don't stop init if vendor tags are bad.
And definitely don't stop init if there are no vendor tags defined at
all.

Instead, just log about it.

Test: gce camera HAL init succeeds; no regression to sailfish camera
Bug: 35036220
Change-Id: I7f4481d7ec1a88df0c67a66c364f351b3321b221
2017-02-10 22:04:27 +00:00
Tri Vo
85120c9490 Update makefiles to use filgroup syntax.
Test: mmma hardware/interfaces
Change-Id: I9f4457c78b7820c242d46359f0debe05d1b3e482
2017-02-10 12:45:19 -08:00
Yin-Chia Yeh
6dc9b53abe Camera: fix open_legacy crash
If the torch callback is fired during CameraProvider
constructor, the sp will cause it being deleted
when the callback returns.

Test: fix the crash
Bug: 35216523
Change-Id: I133d866ed603d6c7e549b57d20a911af7a7e0698
2017-02-09 23:10:57 -08:00
Andreas Huber
d38f147c35 Updated makefiles
Java intermediates are now created in the common rather than the device-
specific generated sources subdirectory.

Bug: 33842609
Test: make
Change-Id: I16af4cd19bf0b24baa0ad9ebfdb86b4d959c8672
2017-02-09 17:20:45 -08:00
Emilian Peev
98014ff84d Camera: Delete streams after successful configuration
The stream resources will be released by Hal most
likely only in cases of successful configuration.
If the configuration fails keep the deleted streams
for the next call.

BUG: 34131351
Test: 'CameraTest' API1 tests using Hal3.x and ZSL
Change-Id: I68696d561258571727b35b52ff326aac27edaad3
2017-02-09 08:35:33 +00:00
Tri Vo
ce608bec74 Migrate driver/profiler to test/vts-testcase/hal.
Bug: 34893894
Test: mmma hardware/interfaces

Change-Id: Ic72716577a5f93700c5056986aff55a76b170b5d
2017-02-07 19:13:28 -08:00
Yin-Chia Yeh
db4d6813ab Merge "Camera: remove BINDERIZED flag" 2017-02-06 22:21:54 +00:00
Yin-Chia Yeh
469c67b027 Camera: remove BINDERIZED flag
No longer needed. This also enable us to switch to
defaultPassthroughImplementation.
Also rename camera device wrapper library to signal it's not a
top level HAL entry.

Test: marlin camera app with passthrough/binderzied mode
Bug: 34817742
Change-Id: I78ad5afbf78b2679be3efe0e82f430958ef6bfea
2017-02-03 14:43:08 -08:00
Zhuoyao Zhang
e9b43bbe2d Update Andriod.bp for hals.
* Add driver/profiler build rule for all hals.

Test: mma
Change-Id: I98325f7af14fec7dd1bb64b1668de8c7c20ace92
2017-02-03 10:03:01 -08:00
Yin-Chia Yeh
e466fc9c9f Merge "Camera: add a missing hidl_cb call" 2017-02-01 08:47:59 +00:00
Yin-Chia Yeh
2cee1b38c8 Merge "Camera: call setCallback before open_legacy" 2017-02-01 08:47:27 +00:00
Yin-Chia Yeh
fca2e74209 Camera: call setCallback before open_legacy
Some open_legacy implementations require a valid callback.

Test: the failing open_legacy call succeeds
Bug: 34854786
Change-Id: I461c7622bdf46a7cb7febfb7eeeb083288b4af03
2017-01-31 17:40:23 -08:00
Steven Moreland
7fd6ad80ee Camera: work with vintf toggle.
Camera is currently compiled separately in passthrough and binderized
modes. Until that is resolved, adding a call to internal hidl logic.

Bug: 34817742
Test: camera starts up and works and respects binderization toggle in
both modes on marlin.
Change-Id: I20733cbc82a68a1da1c4f1b3754aef2887ca718a
2017-01-31 16:48:52 -08:00
Yin-Chia Yeh
ff0bc02a1c Camera: add a missing hidl_cb call
Test: no fatal error from calling get_device_1_0
Bug: 30985004
Change-Id: I6f1cfce903773d22ff5bb21a6db98d3f4ffa0697
2017-01-31 16:12:35 -08:00
Eino-Ville Talvala
8f020eba8f Merge "Camera metadata: Add ENABLE_ZSL control." 2017-01-31 20:03:02 +00:00
Keun Soo Yim
b21bdc8b9f use the device's default binder/passthrough mode in vts tests
Test: mma
Change-Id: I3f2775873f5b6c091f70413adbdf7b7ae298ff44
2017-01-25 15:08:12 -08:00
Eino-Ville Talvala
92d0298ea3 Camera metadata: Add ENABLE_ZSL control.
This is a new public API feature for O, which needs to be plumbed
down to the HAL layer as well.

Test: New CTS tests pass
Bug: 30983997
Change-Id: Ie9f8a37cb0b149f7114f11fcf611a43cac60abe7
2017-01-25 12:44:35 -08:00
Yin-Chia Yeh
10d6834e6d Camera: binderize camera hal
Test: running marlin in binderized mode
Bug: 30985004
Change-Id: I9c3ab3c445e437a8a8b6f271f3c475f60563f488
2017-01-20 12:26:41 -08:00
Yin-Chia Yeh
a8f447d75c Camera: make fence import agnostic to hidl transport
This will introduce one more FD dup/close in passthrough mode, but
we have no other choice as camera server will not know whether
it is running in passthrough or binderized mode.

Test: running Camera2 API CTS
Bug: 30985004
Change-Id: I407d54a51c51fc09477dfb6236ab1b53bb1e0a21
2017-01-17 16:51:03 -08:00
Yin-Chia Yeh
d926f9334f Camera: add bufferId field to StreamBuffer
This gives each buffer a unique identifier and allow camera server
to only send one unique to HAL process once.

Bug: 30985004
Change-Id: I6aff498c5667dd71fd70b3881fd60b0ecc366e0a
2017-01-17 16:50:53 -08:00
TreeHugger Robot
a8d358fb63 Merge changes from topic 'bphwfoo'
* changes:
  Bp/nFoo -> Bp/nHwFoo.
  Bp/nFoo -> Bp/nHwFoo
2017-01-11 23:43:16 +00:00
Yifan Hong
a18049ad13 Bp/nFoo -> Bp/nHwFoo.
Test: mma
Bug: 33554989
Change-Id: I4b3f852d20fdfc49f2da671dd3c12d618ffb4140
2017-01-11 13:14:59 -08:00
Yin-Chia Yeh
7584624329 Camera: avoid double closing FD
Right now conventional HAL close the acquire_fence FD so wrapper
should not close it again. However, we might need to change this
behavior later to make camera service agnostic to passthrough or
binderized mode.

Bug: 34169301
Change-Id: I96b46521e4081b43e7a7e9c9efa98121739dda99
2017-01-09 14:29:06 -08:00
Yin-Chia Yeh
9c6dbd5979 Camera: patching treble camera HAL
Bug fixes like deadlock resolution, wrong enum usage etc.

Bug: 30985004
Test: run Camera2 API CTS tests on Angler
Change-Id: I661fa9197f66344ddecca8f68d343c891806eca1
2017-01-05 14:50:47 -08:00
Yin-Chia Yeh
2d9f144f75 Camera: add camera vts tests
Fully covered: ICameraProvider@2.4 ICameraDevice@3.2
ICameraDeviceSession@3.2 is partially covered.
(configure_stream/process_capture_request tests to be added later)

Test: compile and run the gtest binary on device
Bug: 30985004
Change-Id: I61f20d14a11bd69fc19b06062c489dd8833b09a4
2017-01-05 14:48:27 -08:00
Yin-Chia Yeh
f906b3bbbb Camera: Add default camera provider 2.4
Supports legacy camera HAL modules; also exports ICameraDevice
instances.

Test: compile
Bug: 30985004
Change-Id: I2b9624a412de95dd43979a5e6650b170010c577a
2017-01-05 14:48:27 -08:00
Yin-Chia Yeh
faef8f92c9 Camera: default implementation of device 3.2
Test: compile
Bug: 30985004
Change-Id: Ibb48673840de6a5f7c75dc6993d5457a272177a2
2017-01-05 14:48:27 -08:00
Eino-Ville Talvala
912e1b6952 camera.device@3.2: Clarify documentation
- Clarify handling of input/output buffer handles, and
  that they must be null in CaptureResults.
- Clarify handling of fence handles and when they may/must be null.

Test: Compiles; comment-only changes
Bug: 32991603
Change-Id: I70367aa490fb0027791e6e35bb34c54601a0d144
2016-12-22 11:48:15 -08:00
Eino-Ville Talvala
5e9a175bb1 camera.device@3.2: Minor updates
- All usage fields should be bitfields, as should dataspace.
- Remove Stream::maxBuffers. It was accidentally duplicated in the inbound
  stream configuration; it's only meant to be set by the HAL in the
  output HalStream structures.
- Clarify overrideFormat and usage field documentation.

Test: Compiles
Bug: 32991603
Change-Id: Iac922b439fafc6726ebb6cea5bc0b3dd8921bfa8
2016-12-20 17:28:22 -08:00
Eino-Ville Talvala
f651614c69 camera.device@3.2: Add missing field name to NotifyMsg
NotifyMsg's message union isn't actually instantiated.

Test: Compiles
Bug: 30985004
Change-Id: I214045208b624a1777ec0bd4353f268e4033166a
2016-12-19 17:18:22 -08:00
Yifan Hong
f35ee3b192 Revert "Revert "Update makefiles for Java package path.""
This reverts commit a8789f27cb.

Change-Id: I69980b580a556188ba868bb096ae1590b01759f5
2016-12-13 22:20:16 +00:00
Yifan Hong
a8789f27cb Revert "Update makefiles for Java package path."
This reverts commit ab0792ccdc.

Change-Id: I47fc272d9fa8875e3d7ccb10cb748c738fbf8135
2016-12-13 22:18:34 +00:00