diff --git a/hidl/camera/libhardware_headers/Android.bp b/hidl/camera/libhardware_headers/Android.bp index 545c7aa0..4aa6f3a1 100644 --- a/hidl/camera/libhardware_headers/Android.bp +++ b/hidl/camera/libhardware_headers/Android.bp @@ -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"], }, diff --git a/hidl/camera/libhardware_headers/include/hardware/camera_common.h b/hidl/camera/libhardware_headers/include/hardware/camera_common.h index 16b44984..dc0ad25d 100644 --- a/hidl/camera/libhardware_headers/include/hardware/camera_common.h +++ b/hidl/camera/libhardware_headers/include/hardware/camera_common.h @@ -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: *