Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | **************************************************************************** |
| 11 | ****************************************************************************/ |
| 12 | #ifndef __LINUX_MSM_CAMERA_H |
| 13 | #define __LINUX_MSM_CAMERA_H |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 14 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 15 | #include <linux/types.h> |
| 16 | #include <asm/sizes.h> |
| 17 | #include <linux/ioctl.h> |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 18 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 19 | #define MSM_CAM_IOCTL_MAGIC 'm' |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 20 | |
Iliyan Malchev | 0711600 | 2009-06-23 20:08:10 -0700 | [diff] [blame] | 21 | #define MSM_CAM_IOCTL_GET_SENSOR_INFO _IOR(MSM_CAM_IOCTL_MAGIC, 1, struct msm_camsensor_info *) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 22 | |
Iliyan Malchev | 0711600 | 2009-06-23 20:08:10 -0700 | [diff] [blame] | 23 | #define MSM_CAM_IOCTL_REGISTER_PMEM _IOW(MSM_CAM_IOCTL_MAGIC, 2, struct msm_pmem_info *) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 24 | |
Iliyan Malchev | 0711600 | 2009-06-23 20:08:10 -0700 | [diff] [blame] | 25 | #define MSM_CAM_IOCTL_UNREGISTER_PMEM _IOW(MSM_CAM_IOCTL_MAGIC, 3, unsigned) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 26 | |
Iliyan Malchev | 0711600 | 2009-06-23 20:08:10 -0700 | [diff] [blame] | 27 | #define MSM_CAM_IOCTL_CTRL_COMMAND _IOW(MSM_CAM_IOCTL_MAGIC, 4, struct msm_ctrl_cmd *) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 28 | |
Iliyan Malchev | 0711600 | 2009-06-23 20:08:10 -0700 | [diff] [blame] | 29 | #define MSM_CAM_IOCTL_CONFIG_VFE _IOW(MSM_CAM_IOCTL_MAGIC, 5, struct msm_camera_vfe_cfg_cmd *) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 30 | |
Iliyan Malchev | 0711600 | 2009-06-23 20:08:10 -0700 | [diff] [blame] | 31 | #define MSM_CAM_IOCTL_GET_STATS _IOR(MSM_CAM_IOCTL_MAGIC, 6, struct msm_camera_stats_event_ctrl *) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 32 | |
Iliyan Malchev | 0711600 | 2009-06-23 20:08:10 -0700 | [diff] [blame] | 33 | #define MSM_CAM_IOCTL_GETFRAME _IOR(MSM_CAM_IOCTL_MAGIC, 7, struct msm_camera_get_frame *) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 34 | |
Iliyan Malchev | 0711600 | 2009-06-23 20:08:10 -0700 | [diff] [blame] | 35 | #define MSM_CAM_IOCTL_ENABLE_VFE _IOW(MSM_CAM_IOCTL_MAGIC, 8, struct camera_enable_cmd *) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 36 | |
Iliyan Malchev | 0711600 | 2009-06-23 20:08:10 -0700 | [diff] [blame] | 37 | #define MSM_CAM_IOCTL_CTRL_CMD_DONE _IOW(MSM_CAM_IOCTL_MAGIC, 9, struct camera_cmd *) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 38 | |
Iliyan Malchev | 0711600 | 2009-06-23 20:08:10 -0700 | [diff] [blame] | 39 | #define MSM_CAM_IOCTL_CONFIG_CMD _IOW(MSM_CAM_IOCTL_MAGIC, 10, struct camera_cmd *) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 40 | |
Iliyan Malchev | 0711600 | 2009-06-23 20:08:10 -0700 | [diff] [blame] | 41 | #define MSM_CAM_IOCTL_DISABLE_VFE _IOW(MSM_CAM_IOCTL_MAGIC, 11, struct camera_enable_cmd *) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 42 | |
Iliyan Malchev | 0711600 | 2009-06-23 20:08:10 -0700 | [diff] [blame] | 43 | #define MSM_CAM_IOCTL_PAD_REG_RESET2 _IOW(MSM_CAM_IOCTL_MAGIC, 12, struct camera_enable_cmd *) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 44 | |
Iliyan Malchev | 0711600 | 2009-06-23 20:08:10 -0700 | [diff] [blame] | 45 | #define MSM_CAM_IOCTL_VFE_APPS_RESET _IOW(MSM_CAM_IOCTL_MAGIC, 13, struct camera_enable_cmd *) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 46 | |
Iliyan Malchev | 0711600 | 2009-06-23 20:08:10 -0700 | [diff] [blame] | 47 | #define MSM_CAM_IOCTL_RELEASE_FRAME_BUFFER _IOW(MSM_CAM_IOCTL_MAGIC, 14, struct camera_enable_cmd *) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 48 | |
Iliyan Malchev | 0711600 | 2009-06-23 20:08:10 -0700 | [diff] [blame] | 49 | #define MSM_CAM_IOCTL_RELEASE_STATS_BUFFER _IOW(MSM_CAM_IOCTL_MAGIC, 15, struct msm_stats_buf *) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 50 | |
Iliyan Malchev | 0711600 | 2009-06-23 20:08:10 -0700 | [diff] [blame] | 51 | #define MSM_CAM_IOCTL_AXI_CONFIG _IOW(MSM_CAM_IOCTL_MAGIC, 16, struct msm_camera_vfe_cfg_cmd *) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 52 | |
Iliyan Malchev | 0711600 | 2009-06-23 20:08:10 -0700 | [diff] [blame] | 53 | #define MSM_CAM_IOCTL_GET_PICTURE _IOW(MSM_CAM_IOCTL_MAGIC, 17, struct msm_camera_ctrl_cmd *) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 54 | |
Iliyan Malchev | 0711600 | 2009-06-23 20:08:10 -0700 | [diff] [blame] | 55 | #define MSM_CAM_IOCTL_SET_CROP _IOW(MSM_CAM_IOCTL_MAGIC, 18, struct crop_info *) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 56 | |
Iliyan Malchev | 0e24d2c | 2009-10-13 20:28:29 -0700 | [diff] [blame] | 57 | #define MSM_CAM_IOCTL_PP _IOW(MSM_CAM_IOCTL_MAGIC, 19, uint8_t *) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 58 | |
Iliyan Malchev | 0e24d2c | 2009-10-13 20:28:29 -0700 | [diff] [blame] | 59 | #define MSM_CAM_IOCTL_PP_DONE _IOW(MSM_CAM_IOCTL_MAGIC, 20, struct msm_snapshot_pp_status *) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 60 | |
Iliyan Malchev | 0711600 | 2009-06-23 20:08:10 -0700 | [diff] [blame] | 61 | #define MSM_CAM_IOCTL_SENSOR_IO_CFG _IOW(MSM_CAM_IOCTL_MAGIC, 21, struct sensor_cfg_data *) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 62 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 63 | #define MSM_CAMERA_LED_OFF 0 |
| 64 | #define MSM_CAMERA_LED_LOW 1 |
| 65 | #define MSM_CAMERA_LED_HIGH 2 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 66 | |
Iliyan Malchev | 0711600 | 2009-06-23 20:08:10 -0700 | [diff] [blame] | 67 | #define MSM_CAM_IOCTL_FLASH_LED_CFG _IOW(MSM_CAM_IOCTL_MAGIC, 22, unsigned *) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 68 | |
Iliyan Malchev | 0711600 | 2009-06-23 20:08:10 -0700 | [diff] [blame] | 69 | #define MSM_CAM_IOCTL_UNBLOCK_POLL_FRAME _IO(MSM_CAM_IOCTL_MAGIC, 23) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 70 | |
Iliyan Malchev | 0711600 | 2009-06-23 20:08:10 -0700 | [diff] [blame] | 71 | #define MSM_CAM_IOCTL_CTRL_COMMAND_2 _IOW(MSM_CAM_IOCTL_MAGIC, 24, struct msm_ctrl_cmd *) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 72 | |
Iliyan Malchev | cdcc264 | 2010-01-31 17:22:25 -0800 | [diff] [blame] | 73 | #define MSM_CAM_IOCTL_ENABLE_OUTPUT_IND _IOW(MSM_CAM_IOCTL_MAGIC, 25, uint32_t *) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 74 | |
Wu-cheng Li | 9d1f5af | 2010-07-12 10:32:11 -0700 | [diff] [blame] | 75 | #define MSM_CAM_IOCTL_AF_CTRL _IOR(MSM_CAM_IOCTL_MAGIC, 26, struct msm_ctrl_cmt_t *) |
| 76 | #define MSM_CAM_IOCTL_AF_CTRL_DONE _IOW(MSM_CAM_IOCTL_MAGIC, 27, struct msm_ctrl_cmt_t *) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 77 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 78 | #define MAX_SENSOR_NUM 3 |
| 79 | #define MAX_SENSOR_NAME 32 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 80 | |
Iliyan Malchev | 8242012 | 2009-09-11 00:29:59 -0700 | [diff] [blame] | 81 | #define PP_SNAP 1 |
| 82 | #define PP_RAW_SNAP (1<<1) |
| 83 | #define PP_PREV (1<<2) |
| 84 | #define PP_MASK (PP_SNAP|PP_RAW_SNAP|PP_PREV) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 85 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 86 | #define MSM_CAM_CTRL_CMD_DONE 0 |
| 87 | #define MSM_CAM_SENSOR_VFE_CMD 1 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 88 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 89 | struct msm_ctrl_cmd { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 90 | uint16_t type; |
| 91 | uint16_t length; |
| 92 | void *value; |
| 93 | uint16_t status; |
| 94 | uint32_t timeout_ms; |
| 95 | int resp_fd; |
| 96 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 97 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 98 | struct msm_vfe_evt_msg { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 99 | unsigned short type; |
| 100 | unsigned short msg_id; |
| 101 | unsigned int len; |
| 102 | void *data; |
| 103 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 104 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 105 | #define MSM_CAM_RESP_CTRL 0 |
| 106 | #define MSM_CAM_RESP_STAT_EVT_MSG 1 |
| 107 | #define MSM_CAM_RESP_V4L2 2 |
| 108 | #define MSM_CAM_RESP_MAX 3 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 109 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 110 | struct msm_stats_event_ctrl { |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 111 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 112 | int resptype; |
| 113 | int timeout_ms; |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 114 | struct msm_ctrl_cmd ctrl_cmd; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 115 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 116 | struct msm_vfe_evt_msg stats_event; |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 117 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 118 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 119 | struct msm_camera_cfg_cmd { |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 120 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 121 | uint16_t cfg_type; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 122 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 123 | uint16_t cmd_type; |
| 124 | uint16_t queue; |
| 125 | uint16_t length; |
| 126 | void *value; |
| 127 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 128 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 129 | #define CMD_GENERAL 0 |
| 130 | #define CMD_AXI_CFG_OUT1 1 |
| 131 | #define CMD_AXI_CFG_SNAP_O1_AND_O2 2 |
| 132 | #define CMD_AXI_CFG_OUT2 3 |
| 133 | #define CMD_PICT_T_AXI_CFG 4 |
| 134 | #define CMD_PICT_M_AXI_CFG 5 |
| 135 | #define CMD_RAW_PICT_AXI_CFG 6 |
| 136 | #define CMD_STATS_AXI_CFG 7 |
| 137 | #define CMD_STATS_AF_AXI_CFG 8 |
| 138 | #define CMD_FRAME_BUF_RELEASE 9 |
| 139 | #define CMD_PREV_BUF_CFG 10 |
| 140 | #define CMD_SNAP_BUF_RELEASE 11 |
| 141 | #define CMD_SNAP_BUF_CFG 12 |
| 142 | #define CMD_STATS_DISABLE 13 |
Iliyan Malchev | 8242012 | 2009-09-11 00:29:59 -0700 | [diff] [blame] | 143 | #define CMD_STATS_AEC_AWB_ENABLE 14 |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 144 | #define CMD_STATS_AF_ENABLE 15 |
| 145 | #define CMD_STATS_BUF_RELEASE 16 |
| 146 | #define CMD_STATS_AF_BUF_RELEASE 17 |
Iliyan Malchev | 8242012 | 2009-09-11 00:29:59 -0700 | [diff] [blame] | 147 | #define CMD_STATS_ENABLE 18 |
| 148 | #define UPDATE_STATS_INVALID 19 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 149 | |
Wu-cheng Li | 9d1f5af | 2010-07-12 10:32:11 -0700 | [diff] [blame] | 150 | #define CMD_STATS_AEC_ENABLE 20 |
| 151 | #define CMD_STATS_AWB_ENABLE 21 |
| 152 | #define CMD_STATS_AEC_AXI_CFG 22 |
| 153 | #define CMD_STATS_AWB_AXI_CFG 23 |
| 154 | #define CMD_STATS_RS_AXI_CFG 24 |
| 155 | #define CMD_STATS_CS_AXI_CFG 25 |
| 156 | #define CMD_STATS_IHIST_AXI_CFG 26 |
| 157 | #define CMD_STATS_SKIN_AXI_CFG 27 |
| 158 | #define CMD_STATS_AEC_BUF_RELEASE 28 |
| 159 | #define CMD_STATS_AWB_BUF_RELEASE 29 |
| 160 | #define CMD_STATS_RS_BUF_RELEASE 30 |
| 161 | #define CMD_STATS_CS_BUF_RELEASE 31 |
| 162 | #define CMD_STATS_IHIST_BUF_RELEASE 32 |
| 163 | #define CMD_STATS_SKIN_BUF_RELEASE 33 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 164 | |
Wu-cheng Li | 9d1f5af | 2010-07-12 10:32:11 -0700 | [diff] [blame] | 165 | #define CMD_AXI_CFG_SNAP_GEMINI 34 |
| 166 | #define CMD_AXI_CFG_SNAP 35 |
| 167 | #define CMD_AXI_CFG_PREVIEW 36 |
| 168 | #define CMD_AXI_CFG_VIDEO 37 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 169 | |
Wu-cheng Li | 9d1f5af | 2010-07-12 10:32:11 -0700 | [diff] [blame] | 170 | #define CMD_STATS_IHIST_ENABLE 38 |
| 171 | #define CMD_STATS_RS_ENABLE 39 |
| 172 | #define CMD_STATS_CS_ENABLE 40 |
Wu-cheng Li | 7ed132a | 2010-07-27 14:26:21 -0700 | [diff] [blame] | 173 | #define CMD_AXI_CFG_O1_AND_O2 41 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 174 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 175 | struct msm_vfe_cfg_cmd { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 176 | int cmd_type; |
| 177 | uint16_t length; |
| 178 | void *value; |
| 179 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 180 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 181 | #define MAX_CAMERA_ENABLE_NAME_LEN 32 |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 182 | struct camera_enable_cmd { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 183 | char name[MAX_CAMERA_ENABLE_NAME_LEN]; |
| 184 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 185 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 186 | #define MSM_PMEM_OUTPUT1 0 |
| 187 | #define MSM_PMEM_OUTPUT2 1 |
| 188 | #define MSM_PMEM_OUTPUT1_OUTPUT2 2 |
Iliyan Malchev | 8242012 | 2009-09-11 00:29:59 -0700 | [diff] [blame] | 189 | #define MSM_PMEM_THUMBNAIL 3 |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 190 | #define MSM_PMEM_MAINIMG 4 |
| 191 | #define MSM_PMEM_RAW_MAINIMG 5 |
| 192 | #define MSM_PMEM_AEC_AWB 6 |
| 193 | #define MSM_PMEM_AF 7 |
Wu-cheng Li | 9d1f5af | 2010-07-12 10:32:11 -0700 | [diff] [blame] | 194 | #define MSM_PMEM_AEC 8 |
| 195 | #define MSM_PMEM_AWB 9 |
| 196 | #define MSM_PMEM_RS 10 |
| 197 | #define MSM_PMEM_CS 11 |
| 198 | #define MSM_PMEM_IHIST 12 |
| 199 | #define MSM_PMEM_SKIN 13 |
| 200 | #define MSM_PMEM_VIDEO 14 |
| 201 | #define MSM_PMEM_PREVIEW 15 |
| 202 | #define MSM_PMEM_MAX 16 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 203 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 204 | #define FRAME_PREVIEW_OUTPUT1 0 |
| 205 | #define FRAME_PREVIEW_OUTPUT2 1 |
| 206 | #define FRAME_SNAPSHOT 2 |
Wu-cheng Li | 9d1f5af | 2010-07-12 10:32:11 -0700 | [diff] [blame] | 207 | #define FRAME_THUMBNAIL 3 |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 208 | #define FRAME_RAW_SNAPSHOT 4 |
| 209 | #define FRAME_MAX 5 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 210 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 211 | struct msm_pmem_info { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 212 | int type; |
| 213 | int fd; |
| 214 | void *vaddr; |
Iliyan Malchev | 0711600 | 2009-06-23 20:08:10 -0700 | [diff] [blame] | 215 | uint32_t offset; |
| 216 | uint32_t len; |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 217 | uint32_t y_off; |
| 218 | uint32_t cbcr_off; |
Iliyan Malchev | cdcc264 | 2010-01-31 17:22:25 -0800 | [diff] [blame] | 219 | uint8_t vfe_can_write; |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 220 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 221 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 222 | struct outputCfg { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 223 | uint32_t height; |
| 224 | uint32_t width; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 225 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 226 | uint32_t window_height_firstline; |
| 227 | uint32_t window_height_lastline; |
| 228 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 229 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 230 | #define OUTPUT_1 0 |
| 231 | #define OUTPUT_2 1 |
| 232 | #define OUTPUT_1_AND_2 2 |
| 233 | #define CAMIF_TO_AXI_VIA_OUTPUT_2 3 |
| 234 | #define OUTPUT_1_AND_CAMIF_TO_AXI_VIA_OUTPUT_2 4 |
| 235 | #define OUTPUT_2_AND_CAMIF_TO_AXI_VIA_OUTPUT_1 5 |
Wu-cheng Li | 9d1f5af | 2010-07-12 10:32:11 -0700 | [diff] [blame] | 236 | #define OUTPUT_1_AND_3 6 |
| 237 | #define LAST_AXI_OUTPUT_MODE_ENUM = OUTPUT_1_AND_3 7 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 238 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 239 | #define MSM_FRAME_PREV_1 0 |
| 240 | #define MSM_FRAME_PREV_2 1 |
| 241 | #define MSM_FRAME_ENC 2 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 242 | |
Wu-cheng Li | 9d1f5af | 2010-07-12 10:32:11 -0700 | [diff] [blame] | 243 | #define OUTPUT_TYPE_P 1 |
| 244 | #define OUTPUT_TYPE_T 2 |
| 245 | #define OUTPUT_TYPE_S 3 |
| 246 | #define OUTPUT_TYPE_V 4 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 247 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 248 | struct msm_frame { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 249 | int path; |
| 250 | unsigned long buffer; |
| 251 | uint32_t y_off; |
| 252 | uint32_t cbcr_off; |
| 253 | int fd; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 254 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 255 | void *cropinfo; |
| 256 | int croplen; |
| 257 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 258 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 259 | #define STAT_AEAW 0 |
| 260 | #define STAT_AF 1 |
Wu-cheng Li | 9d1f5af | 2010-07-12 10:32:11 -0700 | [diff] [blame] | 261 | #define STAT_AEC 2 |
| 262 | #define STAT_AWB 3 |
| 263 | #define STAT_RS 4 |
| 264 | #define STAT_CS 5 |
| 265 | #define STAT_IHIST 6 |
| 266 | #define STAT_SKIN 7 |
| 267 | #define STAT_MAX 8 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 268 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 269 | struct msm_stats_buf { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 270 | int type; |
| 271 | unsigned long buffer; |
| 272 | int fd; |
| 273 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 274 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 275 | #define MSM_V4L2_VID_CAP_TYPE 0 |
| 276 | #define MSM_V4L2_STREAM_ON 1 |
| 277 | #define MSM_V4L2_STREAM_OFF 2 |
| 278 | #define MSM_V4L2_SNAPSHOT 3 |
| 279 | #define MSM_V4L2_QUERY_CTRL 4 |
| 280 | #define MSM_V4L2_GET_CTRL 5 |
| 281 | #define MSM_V4L2_SET_CTRL 6 |
| 282 | #define MSM_V4L2_QUERY 7 |
| 283 | #define MSM_V4L2_MAX 8 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 284 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 285 | struct crop_info { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 286 | void *info; |
| 287 | int len; |
| 288 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 289 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 290 | struct msm_postproc { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 291 | int ftnum; |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 292 | struct msm_frame fthumnail; |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 293 | int fmnum; |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 294 | struct msm_frame fmain; |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 295 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 296 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 297 | struct msm_snapshot_pp_status { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 298 | void *status; |
| 299 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 300 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 301 | #define CFG_SET_MODE 0 |
| 302 | #define CFG_SET_EFFECT 1 |
| 303 | #define CFG_START 2 |
| 304 | #define CFG_PWR_UP 3 |
| 305 | #define CFG_PWR_DOWN 4 |
| 306 | #define CFG_WRITE_EXPOSURE_GAIN 5 |
| 307 | #define CFG_SET_DEFAULT_FOCUS 6 |
| 308 | #define CFG_MOVE_FOCUS 7 |
| 309 | #define CFG_REGISTER_TO_REAL_GAIN 8 |
| 310 | #define CFG_REAL_TO_REGISTER_GAIN 9 |
| 311 | #define CFG_SET_FPS 10 |
| 312 | #define CFG_SET_PICT_FPS 11 |
| 313 | #define CFG_SET_BRIGHTNESS 12 |
| 314 | #define CFG_SET_CONTRAST 13 |
| 315 | #define CFG_SET_ZOOM 14 |
| 316 | #define CFG_SET_EXPOSURE_MODE 15 |
| 317 | #define CFG_SET_WB 16 |
| 318 | #define CFG_SET_ANTIBANDING 17 |
| 319 | #define CFG_SET_EXP_GAIN 18 |
| 320 | #define CFG_SET_PICT_EXP_GAIN 19 |
| 321 | #define CFG_SET_LENS_SHADING 20 |
| 322 | #define CFG_GET_PICT_FPS 21 |
| 323 | #define CFG_GET_PREV_L_PF 22 |
| 324 | #define CFG_GET_PREV_P_PL 23 |
| 325 | #define CFG_GET_PICT_L_PF 24 |
| 326 | #define CFG_GET_PICT_P_PL 25 |
| 327 | #define CFG_GET_AF_MAX_STEPS 26 |
| 328 | #define CFG_GET_PICT_MAX_EXP_LC 27 |
| 329 | #define CFG_MAX 28 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 330 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 331 | #define MOVE_NEAR 0 |
| 332 | #define MOVE_FAR 1 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 333 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 334 | #define SENSOR_PREVIEW_MODE 0 |
| 335 | #define SENSOR_SNAPSHOT_MODE 1 |
| 336 | #define SENSOR_RAW_SNAPSHOT_MODE 2 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 337 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 338 | #define SENSOR_QTR_SIZE 0 |
| 339 | #define SENSOR_FULL_SIZE 1 |
| 340 | #define SENSOR_INVALID_SIZE 2 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 341 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 342 | #define CAMERA_EFFECT_OFF 0 |
| 343 | #define CAMERA_EFFECT_MONO 1 |
| 344 | #define CAMERA_EFFECT_NEGATIVE 2 |
| 345 | #define CAMERA_EFFECT_SOLARIZE 3 |
| 346 | #define CAMERA_EFFECT_PASTEL 4 |
| 347 | #define CAMERA_EFFECT_MOSAIC 5 |
| 348 | #define CAMERA_EFFECT_RESIZE 6 |
| 349 | #define CAMERA_EFFECT_SEPIA 7 |
| 350 | #define CAMERA_EFFECT_POSTERIZE 8 |
| 351 | #define CAMERA_EFFECT_WHITEBOARD 9 |
| 352 | #define CAMERA_EFFECT_BLACKBOARD 10 |
| 353 | #define CAMERA_EFFECT_AQUA 11 |
| 354 | #define CAMERA_EFFECT_MAX 12 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 355 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 356 | struct sensor_pict_fps { |
| 357 | uint16_t prevfps; |
| 358 | uint16_t pictfps; |
| 359 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 360 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 361 | struct exp_gain_cfg { |
| 362 | uint16_t gain; |
| 363 | uint32_t line; |
| 364 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 365 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 366 | struct focus_cfg { |
| 367 | int32_t steps; |
| 368 | int dir; |
| 369 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 370 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 371 | struct fps_cfg { |
| 372 | uint16_t f_mult; |
| 373 | uint16_t fps_div; |
| 374 | uint32_t pict_fps_div; |
| 375 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 376 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 377 | struct sensor_cfg_data { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 378 | int cfgtype; |
| 379 | int mode; |
| 380 | int rs; |
| 381 | uint8_t max_steps; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 382 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 383 | union { |
| 384 | int8_t effect; |
| 385 | uint8_t lens_shading; |
| 386 | uint16_t prevl_pf; |
| 387 | uint16_t prevp_pl; |
| 388 | uint16_t pictl_pf; |
| 389 | uint16_t pictp_pl; |
| 390 | uint32_t pict_max_exp_lc; |
| 391 | uint16_t p_fps; |
| 392 | struct sensor_pict_fps gfps; |
| 393 | struct exp_gain_cfg exp_gain; |
| 394 | struct focus_cfg focus; |
| 395 | struct fps_cfg fps; |
| 396 | } cfg; |
| 397 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 398 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 399 | #define GET_NAME 0 |
| 400 | #define GET_PREVIEW_LINE_PER_FRAME 1 |
| 401 | #define GET_PREVIEW_PIXELS_PER_LINE 2 |
| 402 | #define GET_SNAPSHOT_LINE_PER_FRAME 3 |
| 403 | #define GET_SNAPSHOT_PIXELS_PER_LINE 4 |
| 404 | #define GET_SNAPSHOT_FPS 5 |
| 405 | #define GET_SNAPSHOT_MAX_EP_LINE_CNT 6 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 406 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 407 | struct msm_camsensor_info { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 408 | char name[MAX_SENSOR_NAME]; |
| 409 | uint8_t flash_enabled; |
| 410 | }; |
| 411 | #endif |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 412 | |