replace common qcom sources with samsung ones
This commit is contained in:
@@ -23,7 +23,8 @@
|
||||
#define CAM_SD_SHUTDOWN (CAM_COMMON_OPCODE_BASE + 0x7)
|
||||
#define CAM_FLUSH_REQ (CAM_COMMON_OPCODE_BASE + 0x8)
|
||||
#define CAM_QUERY_CAP_V2 (CAM_COMMON_OPCODE_BASE + 0x9)
|
||||
#define CAM_COMMON_OPCODE_MAX (CAM_COMMON_OPCODE_BASE + 0xa)
|
||||
#define CAM_FACTORY_TEST (CAM_COMMON_OPCODE_BASE + 0xa)
|
||||
#define CAM_COMMON_OPCODE_MAX (CAM_COMMON_OPCODE_BASE + 0xb)
|
||||
|
||||
#define CAM_COMMON_OPCODE_BASE_v2 0x150
|
||||
#define CAM_ACQUIRE_HW (CAM_COMMON_OPCODE_BASE_v2 + 0x1)
|
||||
@@ -707,6 +708,22 @@ struct cam_acquire_dev_cmd_v2 {
|
||||
__u32 params[5];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cam_factory_test_cmd - Control payload for factory test
|
||||
*
|
||||
* @handle_type: Resource handle type:
|
||||
* 1 = user pointer, 2 = mem handle
|
||||
* @test_status: Factory Test Status
|
||||
*
|
||||
*/
|
||||
struct cam_factory_test_cmd {
|
||||
__u32 handle_type;
|
||||
__u32 test_status;
|
||||
#if 1//defined(CONFIG_SAMSUNG_LPAI_OIS)
|
||||
__u8 payload[32];
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
* In old version, while acquiring device the num_resources in
|
||||
* struct cam_acquire_dev_cmd will be a valid value. During ACQUIRE_DEV
|
||||
|
@@ -253,11 +253,6 @@
|
||||
*/
|
||||
#define CAM_IFE_WM_RCS_EN BIT(1)
|
||||
|
||||
/*
|
||||
* to indicate if per port buffer alignment is enabled.
|
||||
*/
|
||||
#define CAM_IFE_WM_BUF_ALLIGN_EN BIT(0)
|
||||
|
||||
|
||||
/*
|
||||
* Indicates exposure orders within a frame time
|
||||
|
355
qcom/opensource/camera-kernel/include/uapi/camera/media/cam_sec_ois.h
Executable file
355
qcom/opensource/camera-kernel/include/uapi/camera/media/cam_sec_ois.h
Executable file
@@ -0,0 +1,355 @@
|
||||
#ifndef __UAPI_CAM_SEC_OIS_H__
|
||||
#define __UAPI_CAM_SEC_OIS_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/ioctl.h>
|
||||
|
||||
#define MAX_OIS_CUSTOM_PAYLOAD_SIZE (32)
|
||||
#define MAX_OIS_CUSTOM_CALDATA_PAYLOAD_SIZE (64)
|
||||
|
||||
enum ois_payload_type {
|
||||
// Custom Data Set Payload
|
||||
OIS_CMD,
|
||||
OIS_STATUS_MODE,
|
||||
OIS_DEBUG_MODE,
|
||||
OIS_CALDATA,
|
||||
OIS_FACTORY_CMD,
|
||||
// Get Status Payload
|
||||
OIS_STATIC_INFO,
|
||||
OIS_DYNAMIC_INFO,
|
||||
OIS_REGISTER_INFO,
|
||||
OIS_FACTORY_RESULT,
|
||||
OIS_PAYLOAD_MAX,
|
||||
};
|
||||
|
||||
enum ois_factory_cmd_type {
|
||||
OIS_FCT_OIS_AUTOTEST,
|
||||
OIS_FCT_GYRO_NOISE_STDEV,
|
||||
OIS_FCT_GYRO_SELFTEST,
|
||||
OIS_FCT_GYRO_CALIBRATION,
|
||||
OIS_FCT_OIS_VALID_CHECK,
|
||||
OIS_FCT_OIS_CENTER_SHIFT,
|
||||
OIS_FCT_OIS_HALL_POSITION,
|
||||
OIS_FCT_OIS_HALL_CAL_CHK,
|
||||
OIS_FCT_OIS_CROSS_TALK,
|
||||
OIS_FCT_OIS_GET_MGLESS,
|
||||
OIS_FCT_OIS_RESET_CHECK,
|
||||
OIS_FCT_OIS_GET_FW,
|
||||
OIS_FCT_OIS_GET_EXIF, // Don't need
|
||||
OIS_FCT_OIS_EXT_CLK, // Don't need
|
||||
OIS_FCT_OIS_SET_MODE,
|
||||
OIS_FCT_RUMBA_FW_UPDATE,
|
||||
OIS_FCT_MAX,
|
||||
|
||||
OIS_FCT_FORCE_KP,
|
||||
OIS_FCT_OIS_ERROR,
|
||||
};
|
||||
|
||||
struct ois_custom_cmd_t {
|
||||
__u8 payload_type;
|
||||
__u8 ois_mode;
|
||||
__u8 ois_ctrl;
|
||||
__u8 ois_sel;
|
||||
__u8 ggfade;
|
||||
__u8 reserved[27];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_custom_status_t {
|
||||
__u8 payload_type;
|
||||
__u8 status_mode;
|
||||
__u8 access_mode;
|
||||
__u8 data_type;
|
||||
__u8 total_size;
|
||||
__u16 reg_addr;
|
||||
__u8 reserved[25];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_custom_register_info_t {
|
||||
__u8 payload_type;
|
||||
__u8 access_mode;
|
||||
__u8 data_type;
|
||||
__u8 total_size;
|
||||
__u16 reg_addr;
|
||||
__u8 reg_data[26];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_custom_debug_mode_t {
|
||||
__u8 payload_type;
|
||||
__u8 data[31];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_custom_static_info_t {
|
||||
__u8 payload_type;
|
||||
__u8 algo_version[8];
|
||||
__u8 act_pid_rev[3];
|
||||
__u32 act_prod_id[3];
|
||||
__u8 act_core_info[3];
|
||||
__u16 rumba_fw_ver;
|
||||
__u8 reserved[3];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_custom_dynamic_info_t {
|
||||
__u8 payload_type;
|
||||
__u8 ois_status;
|
||||
__u16 ois_error;
|
||||
__u8 ois_mode;
|
||||
__u8 ois_outsel;
|
||||
__u8 ggfade_gain;
|
||||
__u8 ois_ctrl;
|
||||
__u8 tripod_mode;
|
||||
__u8 test_id;
|
||||
__u16 hall_xy[6];
|
||||
__u16 ext_info[5];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_custom_caldata_t {
|
||||
__u8 payload_type;
|
||||
__u8 hwid;
|
||||
__u8 hwid_sub[3];
|
||||
__u32 xgg_m1;
|
||||
__u32 ygg_m1;
|
||||
__u32 xgg_m2;
|
||||
__u32 ygg_m2;
|
||||
__u32 xgg_m3;
|
||||
__u32 ygg_m3;
|
||||
__s16 xg_zero;
|
||||
__s16 yg_zero;
|
||||
__s16 zg_zero;
|
||||
__s16 xcoffset_m3;
|
||||
__s16 ycoffset_m3;
|
||||
__u8 reserved[25];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_fct_general_t {
|
||||
__u8 payload_type;
|
||||
__u8 test_id;
|
||||
__u8 reserved[30];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_fct_autotest_t {
|
||||
__u8 payload_type;
|
||||
__u8 test_id;
|
||||
__u8 threshold;
|
||||
__u8 frequency;
|
||||
__u8 amplitude;
|
||||
__u8 moduleMask;
|
||||
__u8 reserved[26];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_fct_selftest_t {
|
||||
__u8 payload_type;
|
||||
__u8 test_id;
|
||||
__s16 gyro_zero_offset_x;
|
||||
__s16 gyro_zero_offset_y;
|
||||
__s16 gyro_zero_offset_z;
|
||||
__u8 need_cal_flag;
|
||||
__u8 reserved[23];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_fct_center_shift_t {
|
||||
__u8 payload_type;
|
||||
__u8 test_id;
|
||||
__s16 xcoffset_m1;
|
||||
__s16 ycoffset_m1;
|
||||
__s16 xcoffset_m2;
|
||||
__s16 ycoffset_m2;
|
||||
__s16 xcoffset_m3;
|
||||
__s16 ycoffset_m3;
|
||||
__u8 reserved[18];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_fct_hall_cal_chk_t {
|
||||
__u8 payload_type;
|
||||
__u8 test_id;
|
||||
__u8 module_id;
|
||||
__u8 reserved[29];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_fct_autotest_result_t {
|
||||
__u8 payload_type;
|
||||
__u8 test_id;
|
||||
__u8 test_results[3]; // BIT: MGLESS,Y2,Y1,X2,X1
|
||||
__u8 error_counts[9]; // X,Y1,Y2
|
||||
__u16 max_diffs[9]; // X,Y1,Y2
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_fct_noise_stdev_result_t {
|
||||
__u8 payload_type;
|
||||
__u8 test_id;
|
||||
__u8 test_result;
|
||||
__s16 gyro_noise_stdev_x;
|
||||
__s16 gyro_noise_stdev_y;
|
||||
__u8 reserved[25];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_fct_selftest_result_t {
|
||||
__u8 payload_type;
|
||||
__u8 test_id;
|
||||
__u8 total_result;
|
||||
__u8 offset_test_result;
|
||||
__u8 offset_test_oiserr;
|
||||
__u8 selftest_result;
|
||||
__u8 selftest_oiserr;
|
||||
__s16 gyro_zero_offset_x;
|
||||
__s16 gyro_zero_offset_y;
|
||||
__s16 gyro_zero_offset_z;
|
||||
__u8 reserved[19];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_fct_calibration_result_t {
|
||||
__u8 payload_type;
|
||||
__u8 test_id;
|
||||
__u8 test_result;
|
||||
__u8 offset_test_oiserr;
|
||||
__s16 gyro_zero_offset_x;
|
||||
__s16 gyro_zero_offset_y;
|
||||
__s16 gyro_zero_offset_z;
|
||||
__u8 reserved[22];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_fct_valid_check_result_t {
|
||||
__u8 payload_type;
|
||||
__u8 test_id;
|
||||
__u8 test_result_m1;
|
||||
__u8 test_result_m2;
|
||||
__u8 test_result_m3;
|
||||
__u8 comm_check_oiserr;
|
||||
__u8 reserved[26];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_fct_center_shift_result_t {
|
||||
__u8 payload_type;
|
||||
__u8 test_id;
|
||||
__u8 test_result;
|
||||
__s16 xcoffset_m1;
|
||||
__s16 ycoffset_m1;
|
||||
__s16 xcoffset_m2;
|
||||
__s16 ycoffset_m2;
|
||||
__s16 xcoffset_m3;
|
||||
__s16 ycoffset_m3;
|
||||
__u8 reserved[17];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_fct_hall_position_result_t {
|
||||
__u8 payload_type;
|
||||
__u8 test_id;
|
||||
__u8 test_result;
|
||||
__u8 hall_pos_oiserr;
|
||||
__u16 target_pos_x_m1;
|
||||
__u16 target_pos_y_m1;
|
||||
__u16 target_pos_x_m2;
|
||||
__u16 target_pos_y_m2;
|
||||
__u16 target_pos_x_m3;
|
||||
__u16 target_pos_y_m3;
|
||||
__u16 hall_pos_x_m1;
|
||||
__u16 hall_pos_y_m1;
|
||||
__u16 hall_pos_x_m2;
|
||||
__u16 hall_pos_y_m2;
|
||||
__u16 hall_pos_x_m3;
|
||||
__u16 hall_pos_y_m3;
|
||||
__u8 reserved[4];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_fct_hall_cal_chk_result_t {
|
||||
__u8 payload_type;
|
||||
__u8 test_id;
|
||||
__u8 test_result;
|
||||
__u8 act_slave_addr_x;
|
||||
__u8 act_slave_addr_y;
|
||||
__u8 stored_cal_mask;
|
||||
__u8 stored_af_best_pos;
|
||||
__u16 ideal_pcal_x;
|
||||
__u16 ideal_ncal_x;
|
||||
__u16 ideal_pcal_y;
|
||||
__u16 ideal_ncal_y;
|
||||
__u16 curr_pcal_x;
|
||||
__u16 curr_ncal_x;
|
||||
__u16 curr_pcal_y;
|
||||
__u16 curr_ncal_y;
|
||||
__u8 reserved[9];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_fct_ois_set_mode_t {
|
||||
__u8 payload_type;
|
||||
__u8 test_id;
|
||||
__u8 ois_mode;
|
||||
__u8 reserved[29];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_fct_cross_talk_result_t {
|
||||
__u8 payload_type;
|
||||
__u8 test_id;
|
||||
__u8 test_result;
|
||||
__u8 rumba_slave_addr;
|
||||
__u8 step_count_x;
|
||||
__u16 step_value_x;
|
||||
__u16 init_target_x;
|
||||
__u16 init_target_y;
|
||||
__u16 read_hall_step[10];
|
||||
__u8 reserved[1];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_fct_mgless_result_t {
|
||||
__u8 payload_type;
|
||||
__u8 test_id;
|
||||
__u8 test_result;
|
||||
__u8 mgless_flag;
|
||||
__u8 reserved[28];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_fct_reset_check_result_t {
|
||||
__u8 payload_type;
|
||||
__u8 test_id;
|
||||
__u8 test_result;
|
||||
__u16 ois_err;
|
||||
__u8 ois_status;
|
||||
__u8 ois_ctrl;
|
||||
__u8 ois_mode;
|
||||
__u8 ois_sel;
|
||||
__u8 reserved[23];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_fct_fw_ver_result_t {
|
||||
__u8 payload_type;
|
||||
__u8 test_id;
|
||||
__u8 version[8];
|
||||
__u8 reserved[22];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_fct_exif_result_t {
|
||||
__u8 payload_type;
|
||||
__u8 test_id;
|
||||
__u8 version[8];
|
||||
__u16 ois_err;
|
||||
__u8 ois_status;
|
||||
__u8 ois_ctrl;
|
||||
__u8 ois_mode;
|
||||
__u8 ois_sel;
|
||||
__u8 reserved[16];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_fct_rumba_fw_update_t {
|
||||
__u8 payload_type;
|
||||
__u8 test_id;
|
||||
__u8 force_update;
|
||||
__u8 reserved[29];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_fct_rumba_fw_update_result_t {
|
||||
__u8 payload_type;
|
||||
__u8 test_id;
|
||||
__u8 test_result;
|
||||
__u8 vendor_code;
|
||||
__u32 phone_bin_ver;
|
||||
__u32 module_bin_ver;
|
||||
__u8 reserved[20];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ois_fct_hwbigdata_t {
|
||||
__u8 payload_type;
|
||||
__u8 test_id;
|
||||
__u16 ois_error;
|
||||
__u8 reserved[28];
|
||||
} __attribute__((packed));
|
||||
#endif
|
||||
|
@@ -48,6 +48,13 @@
|
||||
#define CAM_SENSOR_GENERIC_BLOB_RES_INFO 0
|
||||
#define CAM_SENSOR_GENERIC_BLOB_FRAME_INFO 1
|
||||
|
||||
/* V4L event type which user space will subscribe to */
|
||||
#define V4L_EVENT_CAM_OIS_EVENT (V4L2_EVENT_PRIVATE_START + 0)
|
||||
|
||||
/* Specific event ids to get notified in user space */
|
||||
#define V4L_EVENT_CAM_OIS_FACTORY_EVENT 0
|
||||
#define V4L_EVENT_CAM_OIS_FACTORY_WITH_CAMERA_EVENT 1
|
||||
|
||||
enum camera_sensor_cmd_type {
|
||||
CAMERA_SENSOR_CMD_TYPE_INVALID,
|
||||
CAMERA_SENSOR_CMD_TYPE_PROBE,
|
||||
@@ -1284,4 +1291,43 @@ struct cam_flash_query_cap_info {
|
||||
__u32 max_current_torch[CAM_FLASH_MAX_LED_TRIGGERS];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/**
|
||||
* struct cam_ois_node_msg
|
||||
* @device_hdl : Device handle of the device reporting the error
|
||||
* @link_hdl : link hdl for real time devices
|
||||
* @event_type : Type of the event
|
||||
* @event_cause : Cause of the event
|
||||
* @timestamp : timestamp of the frame
|
||||
* @request_id : Request id
|
||||
* @custom_data : custom data
|
||||
* @reserved : Reserved field
|
||||
*/
|
||||
struct cam_ois_node_msg {
|
||||
__s32 device_hdl;
|
||||
__s32 link_hdl;
|
||||
__u32 event_type;
|
||||
__u32 event_cause;
|
||||
#if 1 //defined(CONFIG_SAMSUNG_LPAI_OIS)
|
||||
__u8 payload[32];
|
||||
#else
|
||||
__u64 timestamp;
|
||||
__u64 request_id;
|
||||
__u64 custom_data;
|
||||
__u32 reserved[2];
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cam_ois_message - 64 bytes is the max size that can be sent as v4l2 evt
|
||||
* @session_hdl: session to which the frame belongs to
|
||||
* @reserved: reserved field
|
||||
* @u: union which can be node message
|
||||
*/
|
||||
struct cam_ois_message {
|
||||
__s32 session_hdl;
|
||||
__s32 reserved;
|
||||
union {
|
||||
struct cam_ois_node_msg node_msg;
|
||||
} u;
|
||||
};
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user