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 |
| 14 | |
| 15 | #include <linux/types.h> |
| 16 | #include <asm/sizes.h> |
| 17 | #include <linux/ioctl.h> |
| 18 | |
| 19 | #define MSM_CAM_IOCTL_MAGIC 'm' |
| 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 *) |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [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 *) |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [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) |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [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 *) |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [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 *) |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [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 *) |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [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 *) |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [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 *) |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [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 *) |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [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 *) |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [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 *) |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [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 *) |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [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 *) |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [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 *) |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [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 *) |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [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 *) |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [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 *) |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [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 *) |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [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 *) |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [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 *) |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [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 *) |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 62 | |
| 63 | #define MSM_CAMERA_LED_OFF 0 |
| 64 | #define MSM_CAMERA_LED_LOW 1 |
| 65 | #define MSM_CAMERA_LED_HIGH 2 |
| 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 *) |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [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) |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [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 *) |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [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 *) |
| 74 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 75 | #define MAX_SENSOR_NUM 3 |
| 76 | #define MAX_SENSOR_NAME 32 |
| 77 | |
Iliyan Malchev | 8242012 | 2009-09-11 00:29:59 -0700 | [diff] [blame] | 78 | #define PP_SNAP 1 |
| 79 | #define PP_RAW_SNAP (1<<1) |
| 80 | #define PP_PREV (1<<2) |
| 81 | #define PP_MASK (PP_SNAP|PP_RAW_SNAP|PP_PREV) |
| 82 | |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 83 | #define MSM_CAM_CTRL_CMD_DONE 0 |
| 84 | #define MSM_CAM_SENSOR_VFE_CMD 1 |
| 85 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 86 | struct msm_ctrl_cmd { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 87 | uint16_t type; |
| 88 | uint16_t length; |
| 89 | void *value; |
| 90 | uint16_t status; |
| 91 | uint32_t timeout_ms; |
| 92 | int resp_fd; |
| 93 | }; |
| 94 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 95 | struct msm_vfe_evt_msg { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 96 | unsigned short type; |
| 97 | unsigned short msg_id; |
| 98 | unsigned int len; |
| 99 | void *data; |
| 100 | }; |
| 101 | |
| 102 | #define MSM_CAM_RESP_CTRL 0 |
| 103 | #define MSM_CAM_RESP_STAT_EVT_MSG 1 |
| 104 | #define MSM_CAM_RESP_V4L2 2 |
| 105 | #define MSM_CAM_RESP_MAX 3 |
| 106 | |
| 107 | struct msm_stats_event_ctrl { |
| 108 | |
| 109 | int resptype; |
| 110 | int timeout_ms; |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 111 | struct msm_ctrl_cmd ctrl_cmd; |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 112 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 113 | struct msm_vfe_evt_msg stats_event; |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 114 | }; |
| 115 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 116 | struct msm_camera_cfg_cmd { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 117 | |
| 118 | uint16_t cfg_type; |
| 119 | |
| 120 | uint16_t cmd_type; |
| 121 | uint16_t queue; |
| 122 | uint16_t length; |
| 123 | void *value; |
| 124 | }; |
| 125 | |
| 126 | #define CMD_GENERAL 0 |
| 127 | #define CMD_AXI_CFG_OUT1 1 |
| 128 | #define CMD_AXI_CFG_SNAP_O1_AND_O2 2 |
| 129 | #define CMD_AXI_CFG_OUT2 3 |
| 130 | #define CMD_PICT_T_AXI_CFG 4 |
| 131 | #define CMD_PICT_M_AXI_CFG 5 |
| 132 | #define CMD_RAW_PICT_AXI_CFG 6 |
| 133 | #define CMD_STATS_AXI_CFG 7 |
| 134 | #define CMD_STATS_AF_AXI_CFG 8 |
| 135 | #define CMD_FRAME_BUF_RELEASE 9 |
| 136 | #define CMD_PREV_BUF_CFG 10 |
| 137 | #define CMD_SNAP_BUF_RELEASE 11 |
| 138 | #define CMD_SNAP_BUF_CFG 12 |
| 139 | #define CMD_STATS_DISABLE 13 |
Iliyan Malchev | 8242012 | 2009-09-11 00:29:59 -0700 | [diff] [blame] | 140 | #define CMD_STATS_AEC_AWB_ENABLE 14 |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 141 | #define CMD_STATS_AF_ENABLE 15 |
| 142 | #define CMD_STATS_BUF_RELEASE 16 |
| 143 | #define CMD_STATS_AF_BUF_RELEASE 17 |
Iliyan Malchev | 8242012 | 2009-09-11 00:29:59 -0700 | [diff] [blame] | 144 | #define CMD_STATS_ENABLE 18 |
| 145 | #define UPDATE_STATS_INVALID 19 |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 146 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 147 | struct msm_vfe_cfg_cmd { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 148 | int cmd_type; |
| 149 | uint16_t length; |
| 150 | void *value; |
| 151 | }; |
| 152 | |
| 153 | #define MAX_CAMERA_ENABLE_NAME_LEN 32 |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 154 | struct camera_enable_cmd { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 155 | char name[MAX_CAMERA_ENABLE_NAME_LEN]; |
| 156 | }; |
| 157 | |
| 158 | #define MSM_PMEM_OUTPUT1 0 |
| 159 | #define MSM_PMEM_OUTPUT2 1 |
| 160 | #define MSM_PMEM_OUTPUT1_OUTPUT2 2 |
Iliyan Malchev | 8242012 | 2009-09-11 00:29:59 -0700 | [diff] [blame] | 161 | #define MSM_PMEM_THUMBNAIL 3 |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 162 | #define MSM_PMEM_MAINIMG 4 |
| 163 | #define MSM_PMEM_RAW_MAINIMG 5 |
| 164 | #define MSM_PMEM_AEC_AWB 6 |
| 165 | #define MSM_PMEM_AF 7 |
| 166 | #define MSM_PMEM_MAX 8 |
| 167 | |
| 168 | #define FRAME_PREVIEW_OUTPUT1 0 |
| 169 | #define FRAME_PREVIEW_OUTPUT2 1 |
| 170 | #define FRAME_SNAPSHOT 2 |
| 171 | #define FRAME_THUMBAIL 3 |
| 172 | #define FRAME_RAW_SNAPSHOT 4 |
| 173 | #define FRAME_MAX 5 |
| 174 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 175 | struct msm_pmem_info { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 176 | int type; |
| 177 | int fd; |
| 178 | void *vaddr; |
Iliyan Malchev | 0711600 | 2009-06-23 20:08:10 -0700 | [diff] [blame] | 179 | uint32_t offset; |
| 180 | uint32_t len; |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 181 | uint32_t y_off; |
| 182 | uint32_t cbcr_off; |
Iliyan Malchev | cdcc264 | 2010-01-31 17:22:25 -0800 | [diff] [blame^] | 183 | uint8_t vfe_can_write; |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 184 | }; |
| 185 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 186 | struct outputCfg { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 187 | uint32_t height; |
| 188 | uint32_t width; |
| 189 | |
| 190 | uint32_t window_height_firstline; |
| 191 | uint32_t window_height_lastline; |
| 192 | }; |
| 193 | |
| 194 | #define OUTPUT_1 0 |
| 195 | #define OUTPUT_2 1 |
| 196 | #define OUTPUT_1_AND_2 2 |
| 197 | #define CAMIF_TO_AXI_VIA_OUTPUT_2 3 |
| 198 | #define OUTPUT_1_AND_CAMIF_TO_AXI_VIA_OUTPUT_2 4 |
| 199 | #define OUTPUT_2_AND_CAMIF_TO_AXI_VIA_OUTPUT_1 5 |
| 200 | #define LAST_AXI_OUTPUT_MODE_ENUM = OUTPUT_2_AND_CAMIF_TO_AXI_VIA_OUTPUT_1 6 |
| 201 | |
| 202 | #define MSM_FRAME_PREV_1 0 |
| 203 | #define MSM_FRAME_PREV_2 1 |
| 204 | #define MSM_FRAME_ENC 2 |
| 205 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 206 | struct msm_frame { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 207 | int path; |
| 208 | unsigned long buffer; |
| 209 | uint32_t y_off; |
| 210 | uint32_t cbcr_off; |
| 211 | int fd; |
| 212 | |
| 213 | void *cropinfo; |
| 214 | int croplen; |
| 215 | }; |
| 216 | |
| 217 | #define STAT_AEAW 0 |
| 218 | #define STAT_AF 1 |
| 219 | #define STAT_MAX 2 |
| 220 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 221 | struct msm_stats_buf { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 222 | int type; |
| 223 | unsigned long buffer; |
| 224 | int fd; |
| 225 | }; |
| 226 | |
| 227 | #define MSM_V4L2_VID_CAP_TYPE 0 |
| 228 | #define MSM_V4L2_STREAM_ON 1 |
| 229 | #define MSM_V4L2_STREAM_OFF 2 |
| 230 | #define MSM_V4L2_SNAPSHOT 3 |
| 231 | #define MSM_V4L2_QUERY_CTRL 4 |
| 232 | #define MSM_V4L2_GET_CTRL 5 |
| 233 | #define MSM_V4L2_SET_CTRL 6 |
| 234 | #define MSM_V4L2_QUERY 7 |
| 235 | #define MSM_V4L2_MAX 8 |
| 236 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 237 | struct crop_info { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 238 | void *info; |
| 239 | int len; |
| 240 | }; |
| 241 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 242 | struct msm_postproc { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 243 | int ftnum; |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 244 | struct msm_frame fthumnail; |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 245 | int fmnum; |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 246 | struct msm_frame fmain; |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 247 | }; |
| 248 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 249 | struct msm_snapshot_pp_status { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 250 | void *status; |
| 251 | }; |
| 252 | |
| 253 | #define CFG_SET_MODE 0 |
| 254 | #define CFG_SET_EFFECT 1 |
| 255 | #define CFG_START 2 |
| 256 | #define CFG_PWR_UP 3 |
| 257 | #define CFG_PWR_DOWN 4 |
| 258 | #define CFG_WRITE_EXPOSURE_GAIN 5 |
| 259 | #define CFG_SET_DEFAULT_FOCUS 6 |
| 260 | #define CFG_MOVE_FOCUS 7 |
| 261 | #define CFG_REGISTER_TO_REAL_GAIN 8 |
| 262 | #define CFG_REAL_TO_REGISTER_GAIN 9 |
| 263 | #define CFG_SET_FPS 10 |
| 264 | #define CFG_SET_PICT_FPS 11 |
| 265 | #define CFG_SET_BRIGHTNESS 12 |
| 266 | #define CFG_SET_CONTRAST 13 |
| 267 | #define CFG_SET_ZOOM 14 |
| 268 | #define CFG_SET_EXPOSURE_MODE 15 |
| 269 | #define CFG_SET_WB 16 |
| 270 | #define CFG_SET_ANTIBANDING 17 |
| 271 | #define CFG_SET_EXP_GAIN 18 |
| 272 | #define CFG_SET_PICT_EXP_GAIN 19 |
| 273 | #define CFG_SET_LENS_SHADING 20 |
| 274 | #define CFG_GET_PICT_FPS 21 |
| 275 | #define CFG_GET_PREV_L_PF 22 |
| 276 | #define CFG_GET_PREV_P_PL 23 |
| 277 | #define CFG_GET_PICT_L_PF 24 |
| 278 | #define CFG_GET_PICT_P_PL 25 |
| 279 | #define CFG_GET_AF_MAX_STEPS 26 |
| 280 | #define CFG_GET_PICT_MAX_EXP_LC 27 |
| 281 | #define CFG_MAX 28 |
| 282 | |
| 283 | #define MOVE_NEAR 0 |
| 284 | #define MOVE_FAR 1 |
| 285 | |
| 286 | #define SENSOR_PREVIEW_MODE 0 |
| 287 | #define SENSOR_SNAPSHOT_MODE 1 |
| 288 | #define SENSOR_RAW_SNAPSHOT_MODE 2 |
| 289 | |
| 290 | #define SENSOR_QTR_SIZE 0 |
| 291 | #define SENSOR_FULL_SIZE 1 |
| 292 | #define SENSOR_INVALID_SIZE 2 |
| 293 | |
| 294 | #define CAMERA_EFFECT_OFF 0 |
| 295 | #define CAMERA_EFFECT_MONO 1 |
| 296 | #define CAMERA_EFFECT_NEGATIVE 2 |
| 297 | #define CAMERA_EFFECT_SOLARIZE 3 |
| 298 | #define CAMERA_EFFECT_PASTEL 4 |
| 299 | #define CAMERA_EFFECT_MOSAIC 5 |
| 300 | #define CAMERA_EFFECT_RESIZE 6 |
| 301 | #define CAMERA_EFFECT_SEPIA 7 |
| 302 | #define CAMERA_EFFECT_POSTERIZE 8 |
| 303 | #define CAMERA_EFFECT_WHITEBOARD 9 |
| 304 | #define CAMERA_EFFECT_BLACKBOARD 10 |
| 305 | #define CAMERA_EFFECT_AQUA 11 |
| 306 | #define CAMERA_EFFECT_MAX 12 |
| 307 | |
| 308 | struct sensor_pict_fps { |
| 309 | uint16_t prevfps; |
| 310 | uint16_t pictfps; |
| 311 | }; |
| 312 | |
| 313 | struct exp_gain_cfg { |
| 314 | uint16_t gain; |
| 315 | uint32_t line; |
| 316 | }; |
| 317 | |
| 318 | struct focus_cfg { |
| 319 | int32_t steps; |
| 320 | int dir; |
| 321 | }; |
| 322 | |
| 323 | struct fps_cfg { |
| 324 | uint16_t f_mult; |
| 325 | uint16_t fps_div; |
| 326 | uint32_t pict_fps_div; |
| 327 | }; |
| 328 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 329 | struct sensor_cfg_data { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 330 | int cfgtype; |
| 331 | int mode; |
| 332 | int rs; |
| 333 | uint8_t max_steps; |
| 334 | |
| 335 | union { |
| 336 | int8_t effect; |
| 337 | uint8_t lens_shading; |
| 338 | uint16_t prevl_pf; |
| 339 | uint16_t prevp_pl; |
| 340 | uint16_t pictl_pf; |
| 341 | uint16_t pictp_pl; |
| 342 | uint32_t pict_max_exp_lc; |
| 343 | uint16_t p_fps; |
| 344 | struct sensor_pict_fps gfps; |
| 345 | struct exp_gain_cfg exp_gain; |
| 346 | struct focus_cfg focus; |
| 347 | struct fps_cfg fps; |
| 348 | } cfg; |
| 349 | }; |
| 350 | |
| 351 | #define GET_NAME 0 |
| 352 | #define GET_PREVIEW_LINE_PER_FRAME 1 |
| 353 | #define GET_PREVIEW_PIXELS_PER_LINE 2 |
| 354 | #define GET_SNAPSHOT_LINE_PER_FRAME 3 |
| 355 | #define GET_SNAPSHOT_PIXELS_PER_LINE 4 |
| 356 | #define GET_SNAPSHOT_FPS 5 |
| 357 | #define GET_SNAPSHOT_MAX_EP_LINE_CNT 6 |
| 358 | |
Iliyan Malchev | bf8709f | 2009-06-04 11:55:53 -0700 | [diff] [blame] | 359 | struct msm_camsensor_info { |
Iliyan Malchev | 94a144e | 2009-04-30 12:29:52 -0700 | [diff] [blame] | 360 | char name[MAX_SENSOR_NAME]; |
| 361 | uint8_t flash_enabled; |
| 362 | }; |
| 363 | #endif |
| 364 | |