Commit graph

36 commits

Author SHA1 Message Date
Eino-Ville Talvala
18782aa54e Camera: Update for service changes, part 2
- Indicate that HALv3.0 and v3.1 are no longer supported
- Update tests that reuse camera service plumbing to match
  service code changes

Test: Builds
Bug: 32991422
Change-Id: I13b800aea6f65270a2a621bd8a61705160fb2dc8
2017-01-05 15:23:54 -08:00
Yin-Chia Yeh
96621f879e Merge "Camera: add HAL 3.4 declaration" 2015-12-09 01:45:15 +00:00
Yin-Chia Yeh
3e0b5f65c6 Camera: add HAL 3.4 declaration
Bug: 26070606
Change-Id: I4768da5564eee28e24f8d7393e0544222675d833
2015-12-07 16:31:09 -08:00
Eino-Ville Talvala
d4392024d2 Camera: Mark camera HAL device v2.x as unsupported
Device HAL v2.x is obsolete, and no devices using it are still
supported. Mark it unsupported, and clean up native tests.

Bug: 25866588
Change-Id: I8e0f1448b8ae0eaaf3714f2351746af46c7657a7
2015-11-30 10:20:57 -08:00
Chien-Yu Chen
5c6230ebf6 Camera: Update for torch callbacks
Clarify that HAL shouldn't send AVAILABLE_OFF in addition to
NOT_AVAILABLE when open() is called.

Update the comments to use the right torch status enums.

Bug: 21475390
Change-Id: If9adf4bd169048fc9760ef504d3a36414cfbb196
2015-06-03 13:59:39 -07:00
Eino-Ville Talvala
aee4782839 Camera: Add HAL module init method.
For use by Camera HAL libraries to perform one-time initialization
steps after the library is loaded.

Bug: 20016050
Change-Id: Ia01ae0eafcadece9124ac2cfcc3b1c3939352843
2015-04-15 17:26:13 -07:00
Ruben Brunk
1fa09029a9 camera2: Update HAL docs on eviction behavior.
Bug: 19186859
Change-Id: Ie051f966a758c68d354250c245a87df57a4f4ae3
2015-03-11 14:52:07 -07:00
Chien-Yu Chen
8558510d59 camera_common: change torch status callback API
Update the torch status callback API so that HAL must invoke
the torch status callback whenever the torch status changes
including changes by set_torch_mode().

The problem of the previous approach was camera service needed
to invoke the callback after calling set_torch_mode() and two
sources of the torch status changes (HAL and camera service)
caused a race condition.

Add STATUS_ON and remove STATUS_AVAILABLE which isn't useful
because STATUS_OFF means torch is off and available. STATUS_ON
means torch is on and available.

Bug: 2682206
Change-Id: Ide5d289c5f485404a3ba46e6cb359fa8a52da0bb
2015-02-27 15:13:00 -08:00
Chien-Yu Chen
273def398c camera_common: add -EUSERS to set_torch_mode
To match the public API, seperate camera device in use and other
resources in use errors.

Bug: 2682206
Change-Id: Ie0451931f0c84fc65f3f6294a9f44bec10627afe
2015-02-12 17:52:27 -08:00
Chien-Yu Chen
a40a7cebcd Merge "camera_common: add TORCH_MODE_STATUS_OFF" 2015-02-03 18:27:54 +00:00
Ruben Brunk
c65319643a Merge "camera HAL: Update camera_info with simultaneous access information." 2015-01-30 22:59:40 +00:00
Zhijun He
ebdf1286e7 camera3: update reprocessing spec
Also bump the HAL version to 3.3 for reprocessing spec update

Change-Id: I37eda90970eace23c42ba9106d4db1587df8d1b4
2015-01-29 16:42:23 -08:00
Chien-Yu Chen
46edf1ac47 camera_common: add TORCH_MODE_STATUS_OFF
Add TORCH_MODE_STATUS_OFF for the case when HAL has to turn off the
torch mode that was turned on by a previous set_torch_mode() call
in order to turn on the torch mode for the current set_torch_mode()
call.

Bug: 2682206
Change-Id: Ia2f717ffaca8c4346ec5fcdf73895160f700f067
2015-01-29 16:26:24 -08:00
Ruben Brunk
0388bcd7b3 camera HAL: Update camera_info with simultaneous access information.
- Add necessary metadata to the camera_info structure to allow
  the camera service to determine which devices can be safely
  opened and used simultaneously without attempting to open
  camera devices.

Change-Id: I4250b4c7e1296ebf4cab07355d6d3be01f17ba1e
2015-01-29 16:17:37 -08:00
Zhijun He
94e23b297c camera: update HAL module API for external camera
Update camera module API 2.4 for usb camera support.

Change-Id: Id8329e31ad0622bdc06c60e87e97c742a9719b3b
2015-01-23 15:37:24 -08:00
Chien-Yu Chen
301591776f camera_common: add torch mode APIs for flashlight
Add torch mode APIs to support flashlight without opening any
camera devices.

Bug: 2682206
Change-Id: Ida46bb878962caf305f3e97051b15e0465fe8c02
2015-01-15 10:35:07 -08:00
Eino-Ville Talvala
b545983975 Camera HALs: Promote device HAL v3.2
And deprecate older HALs.

Bug: 17445920
Change-Id: I37a5e53fda3c93080e37ec848f84c702a2c9120b
2014-09-10 11:13:16 -07:00
Eino-Ville Talvala
c984be747d Camera: Define error codes for remaining camera_module methods.
Not previously documented, though already assumed to be this.

Bug: 16514157
Change-Id: I9334fdf672c9772014681a5c346a6f20b51d8213
2014-07-24 17:04:45 -07:00
Zhijun He
bcdebf37fb hardware: camera_common: add module open legacy device API
This adds the module API to open a camera device as lower HAL version legacy
device.

Change-Id: I6616aebc5ec0cef28f675e5dddb334dc6b5dfea9
2014-06-13 11:44:19 -07:00
Stewart Miles
84d35492b1 Described restrictions for common HAL object methods.
Inheritance of HAL object is performed by composing a child structure of a
single parent structure located at offset 0 followed by new data members
and function pointers in the child structure.

For example,

struct child {
  struct parent common;
  int a_data_member;
  void (*a_method)(struct child *c, int v);
};

HAL code assumes this layout when accessing child structures given a pointer
to a parent structure such that users write code like the following...

void child_method(struct *parent, int v) {
  struct child * c = (struct child*)parent;
  // do stuff with c
}

Code above will break if a member is added before "common" in "struct child".

This change adds comments that describe the restriction on the location of
parent HAL objects within a derived HAL object.  HAL objects that already
have comments that describe the required location of parent objects are not
modified.

Change-Id: Ibe4300275286ef275b2097534c84f1029d761d87
2014-05-12 12:35:37 -07:00
Ruben Brunk
61cf9eb920 camera3: Update vendor tag spec for HAL 3.2.
- Deprecates vendor tag specification in camera3 device.
- Moves vendor tag ops declaration to camera metadata library and
  cleans up definitions.
- Updates the example HAL.

Change-Id: Ifb16bb0d4bbc896bc32d33dd150e7e174af57dad
2014-01-16 18:27:08 -08:00
Alex Ray
19b2ceafe4 hardware: camera_common: add module vendor tag ops
This updates the camera module API to have vendor-specific tag support.

Vendor-specific metadata tags could be contained in static camera
characteristics, so we need a method of accessing vendor tag information
from the module level (and not just with a device open).

Bug: 10612133
Change-Id: I28e8c769f8112ff4f745f3f1b5472e8a718f1356
2013-09-06 17:46:15 -07:00
Eino-Ville Talvala
9d51856d71 Camera: Add new 3.1 device version
- Add new definition to camera_common
- Update comment in camera3.h

Change-Id: I9d8c594cfdaff40c543e8f9017091b0c06bbf022
2013-07-30 15:03:50 -07:00
Igor Murashkin
152b50fda6 camera_common.h: Add STATUS_ENUMERATING enum
Change-Id: I0986d37364a2666d493cb771fa76967aa051ca5d
2013-03-21 16:06:42 -07:00
Alex Ray
9acc74043b libhardware: Add camera_info typedef
Change-Id: I67ce80c886723d4dba7f799b6b135aa7026c2187
2013-03-05 16:19:59 -08:00
Eino-Ville Talvala
d76f8af6d4 WIP: Camera HAL module 2.1, device 2.1
- Support a simple callback from camera HAL module to framework, to
  indicate a change to module configuration or status.

- Add support for per-instance metadata to camera 2 device HAL.

Change-Id: I25699ff096c4f3578b9e54c7e6e60ce2449adc82
2013-02-15 13:44:53 -08:00
Eino-Ville Talvala
d2a877536a Camera device HAL 3.0
- High-level behavior is identical to device HAL 2.0
- Interface is cleaned up and simplified greatly

Change-Id: Ia867bbf9484be2256470f4acfab7fc3d47e408f4
2013-02-15 19:47:45 +00:00
Alex Ray
18dff4eb63 Revert "libhardware: Add camera_info typedef"
This reverts commit 71cb21980a.
2013-02-13 17:12:52 -08:00
Alex Ray
71cb21980a libhardware: Add camera_info typedef
Change-Id: Icfc0b2dc7739313a6266938f0e2b46fa823ba61e
2013-02-07 15:45:49 -08:00
Eino-Ville Talvala
b8b6439598 Camera2: Make static_camera_characteristics const.
Disallow modification to static characteristics structure, and clarify
ownership and lifetime of the structure.

Also update test code accordingly.

Bug: 6243944
Change-Id: I6921d6889937212867efb99aa3881ab3ffc4f6f9
2012-08-27 10:30:04 -07:00
Eino-Ville Talvala
dde2a9d4b5 Revert "Camera2: Make static_camera_characteristics const."
Needs a third change that's not yet done with review.

This reverts commit c9ec8a656b59912f496880d3a63c0decd490f09d

Change-Id: Ic3e465e1308cbf107a250ec17b73a59a35e52f9f
2012-08-26 14:44:38 -07:00
Eino-Ville Talvala
d959ec5297 Camera2: Make static_camera_characteristics const.
Disallow modification to static characteristics structure, and clarify
ownership and lifetime of the structure.

Also update test code accordingly.

Bug: 6243944
Change-Id: Ib8de5e9d6580187b21a5ae9a28a3d24f1d083f7b
2012-08-24 14:28:54 -07:00
Eino-Ville Talvala
e911e4c160 Merge "Add specific version number constants to Camera HAL." 2012-03-27 16:50:18 -07:00
Eino-Ville Talvala
ddc026e393 Add specific version number constants to Camera HAL.
These constants should be used by HAL implementations to indicate
which versions of the module and device APIs they support.

Change-Id: I4b6eae278481545694e6a1827833b5958c26720c
2012-03-27 16:15:25 -07:00
James Dong
d0ca70d834 Fixed an incorrect path for the include header file in a comment
Change-Id: I9c6f76279b54c2de66a31f751afc9222c345eb47
2012-03-26 16:32:23 -07:00
Eino-Ville Talvala
8bf364ef20 Reorganize camera HAL, and add versioning support.
Includes a draft of camera device HAL 2.

Change-Id: I5f56a8c54a33d0ca039360185822a9c22436cab8
2012-03-21 17:34:33 -07:00