hidl: camera: Allow to insert get_cam_pos function

* V1 for gtowifi
* V2 for gta4l

Co-authored-by: Han Sol Jin <hansol@hansol.ca>
Change-Id: Ia6f3e15cad28c402f6ff459949e2917ba8dcf300
urubino
Christian Hoffmann 11 months ago committed by Łukasz Patron
parent 2c901ee1ad
commit cde582d00c
  1. 8
      hidl/camera/libhardware_headers/Android.bp
  2. 33
      hidl/camera/libhardware_headers/include/hardware/camera_common.h

@ -3,6 +3,8 @@ soong_config_module_type {
module_type: "cc_defaults",
config_namespace: "samsungCameraVars",
bool_variables: [
"needs_sec_get_cam_pos_v1",
"needs_sec_get_cam_pos_v2",
"needs_sec_reserved_field",
"usage_64bit",
],
@ -12,6 +14,12 @@ soong_config_module_type {
samsung_camera3 {
name: "samsung_camera3_defaults",
soong_config_variables: {
needs_sec_get_cam_pos_v1: {
cflags: ["-DCAMERA_NEEDS_SEC_GET_CAM_POS_V1"],
},
needs_sec_get_cam_pos_v2: {
cflags: ["-DCAMERA_NEEDS_SEC_GET_CAM_POS_V2"],
},
needs_sec_reserved_field: {
cflags: ["-DCAMERA_NEEDS_SEC_RESERVED_FIELD"],
},

@ -904,6 +904,23 @@ typedef struct camera_module {
* to manage number of external cameras.
*/
int (*get_number_of_cameras)(void);
#ifdef CAMERA_NEEDS_SEC_GET_CAM_POS_V1
/**
* get_cam_pos:
*
* Unknown. Needed by prebuilt camera module from the Samsung GTO device.
*
* Return values found so far:
*
* 0: On a successful operation
*
* -EINVAL: The input arguments are invalid
*
*/
int (*get_cam_pos)(void);
#endif
/**
* get_camera_info:
*
@ -930,6 +947,22 @@ typedef struct camera_module {
*/
int (*get_camera_info)(int camera_id, struct camera_info *info);
#ifdef CAMERA_NEEDS_SEC_GET_CAM_POS_V2
/**
* get_cam_pos:
*
* Unknown. Needed by prebuilt camera module from the Samsung GTA4L device.
*
* Return values found so far:
*
* 0: On a successful operation
*
* -EINVAL: The input arguments are invalid
*
*/
int (*get_cam_pos)(void);
#endif
/**
* set_callbacks:
*

Loading…
Cancel
Save