2011-01-12 07:42:14 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2008-2009 QUALCOMM Incorporated.
|
|
|
|
*/
|
|
|
|
#ifndef __LINUX_MSM_CAMERA_H
|
|
|
|
#define __LINUX_MSM_CAMERA_H
|
|
|
|
|
|
|
|
#ifdef __KERNEL__
|
|
|
|
#include <linux/types.h>
|
|
|
|
#include <asm/sizes.h>
|
|
|
|
#include <linux/ioctl.h>
|
|
|
|
#else
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <sys/ioctl.h>
|
|
|
|
#endif
|
|
|
|
#include <linux/msm_adsp.h>
|
|
|
|
|
|
|
|
#ifdef __KERNEL__
|
|
|
|
#define CDBG_INFO(fmt, args...) printk(KERN_INFO "msm_camera: " fmt, ##args)
|
|
|
|
#define CDBG_ERR(fmt, args...) printk(KERN_INFO "msm_camera error: " fmt, ##args)
|
|
|
|
#define CDBG_WARING(fmt, args...) printk(KERN_INFO "msm_camera waring: " fmt, ##args)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define MSM_CAM_IOCTL_MAGIC 'm'
|
|
|
|
|
|
|
|
#define MSM_CAM_IOCTL_GET_SENSOR_INFO \
|
2011-08-11 22:14:16 +00:00
|
|
|
_IOR(MSM_CAM_IOCTL_MAGIC, 1, struct msm_camsensor_info *)
|
2011-01-12 07:42:14 +00:00
|
|
|
|
|
|
|
#define MSM_CAM_IOCTL_REGISTER_PMEM \
|
2011-08-11 22:14:16 +00:00
|
|
|
_IOW(MSM_CAM_IOCTL_MAGIC, 2, struct msm_pmem_info *)
|
2011-01-12 07:42:14 +00:00
|
|
|
|
|
|
|
#define MSM_CAM_IOCTL_UNREGISTER_PMEM \
|
|
|
|
_IOW(MSM_CAM_IOCTL_MAGIC, 3, unsigned)
|
|
|
|
|
|
|
|
#define MSM_CAM_IOCTL_CTRL_COMMAND \
|
2011-08-11 22:14:16 +00:00
|
|
|
_IOW(MSM_CAM_IOCTL_MAGIC, 4, struct msm_ctrl_cmd *)
|
2011-01-12 07:42:14 +00:00
|
|
|
|
|
|
|
#define MSM_CAM_IOCTL_CONFIG_VFE \
|
2011-08-11 22:14:16 +00:00
|
|
|
_IOW(MSM_CAM_IOCTL_MAGIC, 5, struct msm_camera_vfe_cfg_cmd *)
|
2011-01-12 07:42:14 +00:00
|
|
|
|
|
|
|
#define MSM_CAM_IOCTL_GET_STATS \
|
2011-08-11 22:14:16 +00:00
|
|
|
_IOR(MSM_CAM_IOCTL_MAGIC, 6, struct msm_camera_stats_event_ctrl *)
|
2011-01-12 07:42:14 +00:00
|
|
|
|
|
|
|
#define MSM_CAM_IOCTL_GETFRAME \
|
2011-08-11 22:14:16 +00:00
|
|
|
_IOR(MSM_CAM_IOCTL_MAGIC, 7, struct msm_camera_get_frame *)
|
2011-01-12 07:42:14 +00:00
|
|
|
|
|
|
|
#define MSM_CAM_IOCTL_ENABLE_VFE \
|
2011-08-11 22:14:16 +00:00
|
|
|
_IOW(MSM_CAM_IOCTL_MAGIC, 8, struct camera_enable_cmd *)
|
2011-01-12 07:42:14 +00:00
|
|
|
|
|
|
|
#define MSM_CAM_IOCTL_CTRL_CMD_DONE \
|
2011-08-11 22:14:16 +00:00
|
|
|
_IOW(MSM_CAM_IOCTL_MAGIC, 9, struct camera_cmd *)
|
2011-01-12 07:42:14 +00:00
|
|
|
|
|
|
|
#define MSM_CAM_IOCTL_CONFIG_CMD \
|
2011-08-11 22:14:16 +00:00
|
|
|
_IOW(MSM_CAM_IOCTL_MAGIC, 10, struct camera_cmd *)
|
2011-01-12 07:42:14 +00:00
|
|
|
|
|
|
|
#define MSM_CAM_IOCTL_DISABLE_VFE \
|
2011-08-11 22:14:16 +00:00
|
|
|
_IOW(MSM_CAM_IOCTL_MAGIC, 11, struct camera_enable_cmd *)
|
2011-01-12 07:42:14 +00:00
|
|
|
|
|
|
|
#define MSM_CAM_IOCTL_PAD_REG_RESET2 \
|
2011-08-11 22:14:16 +00:00
|
|
|
_IOW(MSM_CAM_IOCTL_MAGIC, 12, struct camera_enable_cmd *)
|
2011-01-12 07:42:14 +00:00
|
|
|
|
|
|
|
#define MSM_CAM_IOCTL_VFE_APPS_RESET \
|
2011-08-11 22:14:16 +00:00
|
|
|
_IOW(MSM_CAM_IOCTL_MAGIC, 13, struct camera_enable_cmd *)
|
2011-01-12 07:42:14 +00:00
|
|
|
|
|
|
|
#define MSM_CAM_IOCTL_RELEASE_FRAMEE_BUFFER \
|
2011-08-11 22:14:16 +00:00
|
|
|
_IOW(MSM_CAM_IOCTL_MAGIC, 14, struct camera_enable_cmd *)
|
2011-01-12 07:42:14 +00:00
|
|
|
|
|
|
|
#define MSM_CAM_IOCTL_RELEASE_STATS_BUFFER \
|
2011-08-11 22:14:16 +00:00
|
|
|
_IOW(MSM_CAM_IOCTL_MAGIC, 15, struct msm_stats_buf *)
|
2011-01-12 07:42:14 +00:00
|
|
|
|
|
|
|
#define MSM_CAM_IOCTL_AXI_CONFIG \
|
2011-08-11 22:14:16 +00:00
|
|
|
_IOW(MSM_CAM_IOCTL_MAGIC, 16, struct msm_camera_vfe_cfg_cmd *)
|
2011-01-12 07:42:14 +00:00
|
|
|
|
|
|
|
#define MSM_CAM_IOCTL_GET_PICTURE \
|
2011-08-11 22:14:16 +00:00
|
|
|
_IOW(MSM_CAM_IOCTL_MAGIC, 17, struct msm_camera_ctrl_cmd *)
|
2011-01-12 07:42:14 +00:00
|
|
|
|
|
|
|
#define MSM_CAM_IOCTL_SET_CROP \
|
2011-08-11 22:14:16 +00:00
|
|
|
_IOW(MSM_CAM_IOCTL_MAGIC, 18, struct crop_info *)
|
2011-01-12 07:42:14 +00:00
|
|
|
|
|
|
|
#define MSM_CAM_IOCTL_PICT_PP \
|
|
|
|
_IOW(MSM_CAM_IOCTL_MAGIC, 19, uint8_t *)
|
|
|
|
|
|
|
|
#define MSM_CAM_IOCTL_PICT_PP_DONE \
|
2011-08-11 22:14:16 +00:00
|
|
|
_IOW(MSM_CAM_IOCTL_MAGIC, 20, struct msm_snapshot_pp_status *)
|
2011-01-12 07:42:14 +00:00
|
|
|
|
|
|
|
#define MSM_CAM_IOCTL_SENSOR_IO_CFG \
|
2011-08-11 22:14:16 +00:00
|
|
|
_IOW(MSM_CAM_IOCTL_MAGIC, 21, struct sensor_cfg_data *)
|
2011-01-12 07:42:14 +00:00
|
|
|
|
|
|
|
#define MSM_CAM_IOCTL_FLASH_LED_CFG \
|
2011-08-11 22:14:16 +00:00
|
|
|
_IOW(MSM_CAM_IOCTL_MAGIC, 22, enum msm_camera_led_state *)
|
2011-01-12 07:42:14 +00:00
|
|
|
|
|
|
|
#define MAX_SENSOR_NUM 3
|
|
|
|
#define MAX_SENSOR_NAME 32
|
|
|
|
|
|
|
|
/*****************************************************
|
|
|
|
* enum
|
|
|
|
*****************************************************/
|
2011-08-11 22:14:16 +00:00
|
|
|
enum msm_camera_update {
|
2011-01-12 07:42:14 +00:00
|
|
|
MSM_CAM_CTRL_CMD_DONE,
|
|
|
|
MSM_CAM_SENSOR_VFE_CMD,
|
|
|
|
};
|
|
|
|
|
|
|
|
/*****************************************************
|
|
|
|
* structure
|
|
|
|
*****************************************************/
|
|
|
|
|
|
|
|
/* define five type of structures for userspace <==> kernel
|
|
|
|
* space communication:
|
|
|
|
* command 1 - 2 are from userspace ==> kernel
|
|
|
|
* command 3 - 4 are from kernel ==> userspace
|
|
|
|
*
|
|
|
|
* 1. control command: control command(from control thread),
|
|
|
|
* control status (from config thread);
|
|
|
|
*/
|
2011-08-11 22:14:16 +00:00
|
|
|
struct msm_ctrl_cmd {
|
2011-01-12 07:42:14 +00:00
|
|
|
int timeout_ms;
|
|
|
|
uint16_t type;
|
|
|
|
uint16_t length;
|
|
|
|
void *value;
|
|
|
|
uint16_t status;
|
|
|
|
};
|
|
|
|
|
2011-08-11 22:14:16 +00:00
|
|
|
struct msm_vfe_evt_msg {
|
2011-01-12 07:42:14 +00:00
|
|
|
unsigned short type; /* 1 == event (RPC), 0 == message (adsp) */
|
|
|
|
unsigned short msg_id;
|
|
|
|
unsigned int len; /* size in, number of bytes out */
|
|
|
|
unsigned char *data;
|
|
|
|
};
|
|
|
|
|
2011-08-11 22:14:16 +00:00
|
|
|
enum msm_camera_resp {
|
2011-01-12 07:42:14 +00:00
|
|
|
MSM_CAM_RESP_CTRL,
|
|
|
|
MSM_CAM_RESP_STAT_EVT_MSG,
|
|
|
|
MSM_CAM_RESP_V4L2,
|
|
|
|
|
|
|
|
MSM_CAM_RESP_MAX
|
|
|
|
};
|
|
|
|
|
|
|
|
/* this one is used to send ctrl/status up to config thread */
|
|
|
|
struct msm_stats_event_ctrl {
|
|
|
|
/* 0 - ctrl_cmd from control thread,
|
|
|
|
* 1 - stats/event kernel,
|
|
|
|
* 2 - V4L control or read request */
|
2011-08-11 22:14:16 +00:00
|
|
|
enum msm_camera_resp resptype;
|
2011-01-12 07:42:14 +00:00
|
|
|
int timeout_ms;
|
2011-08-11 22:14:16 +00:00
|
|
|
struct msm_ctrl_cmd ctrl_cmd;
|
2011-01-12 07:42:14 +00:00
|
|
|
/* struct vfe_event_t stats_event; */
|
2011-08-11 22:14:16 +00:00
|
|
|
struct msm_vfe_evt_msg stats_event;
|
2011-01-12 07:42:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* 2. config command: config command(from config thread); */
|
2011-08-11 22:14:16 +00:00
|
|
|
struct msm_camera_cfg_cmd {
|
2011-01-12 07:42:14 +00:00
|
|
|
/* what to config:
|
|
|
|
* 1 - sensor config, 2 - vfe config */
|
|
|
|
uint16_t cfg_type;
|
|
|
|
|
|
|
|
/* sensor config type */
|
|
|
|
uint16_t cmd_type;
|
|
|
|
uint16_t queue;
|
|
|
|
uint16_t length;
|
|
|
|
void *value;
|
|
|
|
};
|
|
|
|
|
2011-08-11 22:14:16 +00:00
|
|
|
enum cfg_cmd_type {
|
2011-01-12 07:42:14 +00:00
|
|
|
CMD_GENERAL,
|
|
|
|
CMD_AXI_CFG_OUT1,
|
|
|
|
CMD_AXI_CFG_SNAP_O1_AND_O2,
|
|
|
|
CMD_AXI_CFG_OUT2,
|
|
|
|
CMD_PICT_T_AXI_CFG,
|
|
|
|
CMD_PICT_M_AXI_CFG,
|
|
|
|
CMD_RAW_PICT_AXI_CFG,
|
|
|
|
CMD_STATS_AXI_CFG,
|
|
|
|
CMD_STATS_AF_AXI_CFG,
|
|
|
|
CMD_FRAME_BUF_RELEASE,
|
|
|
|
CMD_PREV_BUF_CFG,
|
|
|
|
CMD_SNAP_BUF_RELEASE,
|
|
|
|
CMD_SNAP_BUF_CFG,
|
|
|
|
CMD_STATS_DISABLE,
|
|
|
|
CMD_STATS_ENABLE,
|
|
|
|
CMD_STATS_AF_ENABLE,
|
|
|
|
CMD_STATS_BUF_RELEASE,
|
|
|
|
CMD_STATS_AF_BUF_RELEASE,
|
|
|
|
UPDATE_STATS_INVALID
|
|
|
|
};
|
|
|
|
|
|
|
|
/* vfe config command: config command(from config thread)*/
|
2011-08-11 22:14:16 +00:00
|
|
|
struct msm_vfe_cfg_cmd {
|
|
|
|
enum cfg_cmd_type cmd_type;
|
2011-01-12 07:42:14 +00:00
|
|
|
uint16_t length;
|
|
|
|
void *value;
|
|
|
|
};
|
|
|
|
|
2011-08-11 22:14:16 +00:00
|
|
|
struct camera_enable_cmd {
|
2011-01-12 07:42:14 +00:00
|
|
|
char *name;
|
|
|
|
uint16_t length;
|
|
|
|
};
|
|
|
|
|
2011-08-11 22:14:16 +00:00
|
|
|
enum msm_pmem {
|
2011-01-12 07:42:14 +00:00
|
|
|
MSM_PMEM_OUTPUT1,
|
|
|
|
MSM_PMEM_OUTPUT2,
|
|
|
|
MSM_PMEM_OUTPUT1_OUTPUT2,
|
|
|
|
MSM_PMEM_THUMBNAIL,
|
|
|
|
MSM_PMEM_MAINIMG,
|
|
|
|
MSM_PMEM_RAW_MAINIMG,
|
|
|
|
MSM_PMEM_AEC_AWB,
|
|
|
|
MSM_PMEM_AF,
|
|
|
|
|
|
|
|
MSM_PMEM_MAX
|
|
|
|
};
|
|
|
|
|
2011-08-11 22:14:16 +00:00
|
|
|
enum msm_camera_out_frame {
|
2011-01-12 07:42:14 +00:00
|
|
|
FRAME_PREVIEW_OUTPUT1,
|
|
|
|
FRAME_PREVIEW_OUTPUT2,
|
|
|
|
FRAME_SNAPSHOT,
|
|
|
|
FRAME_THUMBAIL,
|
|
|
|
FRAME_RAW_SNAPSHOT,
|
|
|
|
FRAME_MAX
|
|
|
|
};
|
|
|
|
|
2011-08-11 22:14:16 +00:00
|
|
|
struct msm_pmem_info {
|
|
|
|
enum msm_pmem type;
|
2011-01-12 07:42:14 +00:00
|
|
|
int fd;
|
|
|
|
void *vaddr;
|
|
|
|
uint32_t y_off;
|
|
|
|
uint32_t cbcr_off;
|
|
|
|
uint8_t active;
|
|
|
|
};
|
|
|
|
|
2011-08-11 22:14:16 +00:00
|
|
|
struct outputCfg {
|
2011-01-12 07:42:14 +00:00
|
|
|
uint32_t height;
|
|
|
|
uint32_t width;
|
|
|
|
|
|
|
|
uint32_t window_height_firstline;
|
|
|
|
uint32_t window_height_lastline;
|
|
|
|
};
|
|
|
|
|
2011-08-11 22:14:16 +00:00
|
|
|
enum vfeoutput_mode {
|
2011-01-12 07:42:14 +00:00
|
|
|
OUTPUT_1,
|
|
|
|
OUTPUT_2,
|
|
|
|
OUTPUT_1_AND_2,
|
|
|
|
CAMIF_TO_AXI_VIA_OUTPUT_2,
|
|
|
|
OUTPUT_1_AND_CAMIF_TO_AXI_VIA_OUTPUT_2,
|
|
|
|
OUTPUT_2_AND_CAMIF_TO_AXI_VIA_OUTPUT_1,
|
|
|
|
LAST_AXI_OUTPUT_MODE_ENUM = OUTPUT_2_AND_CAMIF_TO_AXI_VIA_OUTPUT_1
|
|
|
|
};
|
|
|
|
|
|
|
|
enum msm_frame_path {
|
|
|
|
MSM_FRAME_PREV_1,
|
|
|
|
MSM_FRAME_PREV_2,
|
|
|
|
MSM_FRAME_ENC,
|
|
|
|
};
|
|
|
|
|
2011-08-11 22:14:16 +00:00
|
|
|
struct msm_frame {
|
2011-01-12 07:42:14 +00:00
|
|
|
enum msm_frame_path path;
|
|
|
|
unsigned long buffer;
|
|
|
|
uint32_t y_off;
|
|
|
|
uint32_t cbcr_off;
|
|
|
|
int fd;
|
|
|
|
|
|
|
|
void *cropinfo;
|
|
|
|
int croplen;
|
|
|
|
};
|
|
|
|
|
|
|
|
enum stat_type {
|
|
|
|
STAT_AEAW,
|
|
|
|
STAT_AF,
|
|
|
|
STAT_MAX,
|
|
|
|
};
|
|
|
|
|
2011-08-11 22:14:16 +00:00
|
|
|
struct msm_stats_buf {
|
2011-01-12 07:42:14 +00:00
|
|
|
enum stat_type type;
|
|
|
|
unsigned long buffer;
|
|
|
|
int fd;
|
|
|
|
};
|
|
|
|
|
2011-08-11 22:14:16 +00:00
|
|
|
enum msm_v4l2_ctrl {
|
2011-01-12 07:42:14 +00:00
|
|
|
MSM_V4L2_VID_CAP_TYPE,
|
|
|
|
MSM_V4L2_STREAM_ON,
|
|
|
|
MSM_V4L2_STREAM_OFF,
|
|
|
|
MSM_V4L2_SNAPSHOT,
|
|
|
|
MSM_V4L2_QUERY_CTRL,
|
|
|
|
MSM_V4L2_GET_CTRL,
|
|
|
|
MSM_V4L2_SET_CTRL,
|
|
|
|
MSM_V4L2_QUERY,
|
|
|
|
|
|
|
|
MSM_V4L2_MAX
|
|
|
|
};
|
|
|
|
|
2011-08-11 22:14:16 +00:00
|
|
|
struct crop_info {
|
2011-01-12 07:42:14 +00:00
|
|
|
void *info;
|
|
|
|
int len;
|
|
|
|
};
|
|
|
|
|
2011-08-11 22:14:16 +00:00
|
|
|
struct msm_postproc {
|
2011-01-12 07:42:14 +00:00
|
|
|
int ftnum;
|
2011-08-11 22:14:16 +00:00
|
|
|
struct msm_frame fthumnail;
|
2011-01-12 07:42:14 +00:00
|
|
|
int fmnum;
|
2011-08-11 22:14:16 +00:00
|
|
|
struct msm_frame fmain;
|
2011-01-12 07:42:14 +00:00
|
|
|
};
|
|
|
|
|
2011-08-11 22:14:16 +00:00
|
|
|
struct msm_snapshot_pp_status {
|
2011-01-12 07:42:14 +00:00
|
|
|
void *status;
|
|
|
|
};
|
|
|
|
|
2011-08-11 22:14:16 +00:00
|
|
|
enum sensor_cfg {
|
2011-01-12 07:42:14 +00:00
|
|
|
CFG_SET_MODE,
|
|
|
|
CFG_SET_EFFECT,
|
|
|
|
CFG_START,
|
|
|
|
CFG_PWR_UP,
|
|
|
|
CFG_PWR_DOWN,
|
|
|
|
CFG_WRITE_EXPOSURE_GAIN,
|
|
|
|
CFG_SET_DEFAULT_FOCUS,
|
|
|
|
CFG_MOVE_FOCUS,
|
|
|
|
CFG_REGISTER_TO_REAL_GAIN,
|
|
|
|
CFG_REAL_TO_REGISTER_GAIN,
|
|
|
|
CFG_SET_FPS,
|
|
|
|
CFG_SET_PICT_FPS,
|
|
|
|
CFG_SET_BRIGHTNESS,
|
|
|
|
CFG_SET_CONTRAST,
|
|
|
|
CFG_SET_ZOOM,
|
|
|
|
CFG_SET_EXPOSURE_MODE,
|
|
|
|
CFG_SET_WB,
|
|
|
|
CFG_SET_ANTIBANDING,
|
|
|
|
CFG_SET_EXP_GAIN,
|
|
|
|
CFG_SET_PICT_EXP_GAIN,
|
|
|
|
CFG_SET_LENS_SHADING,
|
|
|
|
|
|
|
|
CFG_GET_PICT_FPS,
|
|
|
|
CFG_GET_PREV_L_PF,
|
|
|
|
CFG_GET_PREV_P_PL,
|
|
|
|
CFG_GET_PICT_L_PF,
|
|
|
|
CFG_GET_PICT_P_PL,
|
|
|
|
|
|
|
|
CFG_GET_PICT_MAX_EXP_LC,
|
|
|
|
|
|
|
|
CFG_MAX
|
|
|
|
};
|
|
|
|
|
2011-08-11 22:14:16 +00:00
|
|
|
enum sensor_move_focus {
|
2011-01-12 07:42:14 +00:00
|
|
|
MOVE_NEAR,
|
|
|
|
MOVE_FAR
|
|
|
|
};
|
|
|
|
|
2011-08-11 22:14:16 +00:00
|
|
|
enum sensor_mode {
|
2011-01-12 07:42:14 +00:00
|
|
|
SENSOR_PREVIEW_MODE,
|
|
|
|
SENSOR_SNAPSHOT_MODE,
|
|
|
|
SENSOR_RAW_SNAPSHOT_MODE
|
|
|
|
};
|
|
|
|
|
2011-08-11 22:14:16 +00:00
|
|
|
enum sensor_resolution {
|
2011-01-12 07:42:14 +00:00
|
|
|
SENSOR_QTR_SIZE,
|
|
|
|
SENSOR_FULL_SIZE,
|
|
|
|
SENSOR_INVALID_SIZE,
|
|
|
|
};
|
|
|
|
|
2011-08-11 22:14:16 +00:00
|
|
|
enum camera_effect {
|
2011-01-12 07:42:14 +00:00
|
|
|
CAMERA_EFFECT_MIN_MINUS_1,
|
|
|
|
CAMERA_EFFECT_OFF = 1, /* This list must match aeecamera.h */
|
|
|
|
CAMERA_EFFECT_MONO,
|
|
|
|
CAMERA_EFFECT_NEGATIVE,
|
|
|
|
CAMERA_EFFECT_SOLARIZE,
|
|
|
|
CAMERA_EFFECT_PASTEL,
|
|
|
|
CAMERA_EFFECT_MOSAIC,
|
|
|
|
CAMERA_EFFECT_RESIZE,
|
|
|
|
CAMERA_EFFECT_SEPIA,
|
|
|
|
CAMERA_EFFECT_POSTERIZE,
|
|
|
|
CAMERA_EFFECT_WHITEBOARD,
|
|
|
|
CAMERA_EFFECT_BLACKBOARD,
|
|
|
|
CAMERA_EFFECT_AQUA,
|
|
|
|
CAMERA_EFFECT_MAX_PLUS_1
|
|
|
|
};
|
|
|
|
|
|
|
|
struct sensor_pict_fps {
|
|
|
|
uint16_t prevfps;
|
|
|
|
uint16_t pictfps;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct exp_gain_cfg {
|
|
|
|
uint16_t gain;
|
|
|
|
uint32_t line;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct focus_cfg {
|
|
|
|
int32_t steps;
|
2011-08-11 22:14:16 +00:00
|
|
|
enum sensor_move_focus dir;
|
2011-01-12 07:42:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct fps_cfg {
|
|
|
|
uint16_t f_mult;
|
|
|
|
uint16_t fps_div;
|
|
|
|
uint32_t pict_fps_div;
|
|
|
|
};
|
|
|
|
|
2011-08-11 22:14:16 +00:00
|
|
|
enum msm_camera_led_state {
|
2011-01-12 07:42:14 +00:00
|
|
|
MSM_LED_OFF,
|
|
|
|
MSM_LED_LOW,
|
|
|
|
MSM_LED_HIGH
|
|
|
|
};
|
|
|
|
|
2011-08-11 22:14:16 +00:00
|
|
|
struct sensor_cfg_data {
|
|
|
|
enum sensor_cfg cfgtype;
|
|
|
|
enum sensor_mode mode;
|
|
|
|
enum sensor_resolution rs;
|
2011-01-12 07:42:14 +00:00
|
|
|
|
|
|
|
union {
|
|
|
|
int8_t effect;
|
|
|
|
uint8_t lens_shading;
|
|
|
|
uint16_t prevl_pf;
|
|
|
|
uint16_t prevp_pl;
|
|
|
|
uint16_t pictl_pf;
|
|
|
|
uint16_t pictp_pl;
|
|
|
|
uint32_t pict_max_exp_lc;
|
|
|
|
uint16_t p_fps;
|
|
|
|
struct sensor_pict_fps gfps;
|
|
|
|
struct exp_gain_cfg exp_gain;
|
|
|
|
struct focus_cfg focus;
|
|
|
|
struct fps_cfg fps;
|
|
|
|
} cfg;
|
|
|
|
};
|
|
|
|
|
2011-08-11 22:14:16 +00:00
|
|
|
enum sensor_get_info {
|
2011-01-12 07:42:14 +00:00
|
|
|
GET_NAME,
|
|
|
|
GET_PREVIEW_LINE_PER_FRAME,
|
|
|
|
GET_PREVIEW_PIXELS_PER_LINE,
|
|
|
|
GET_SNAPSHOT_LINE_PER_FRAME,
|
|
|
|
GET_SNAPSHOT_PIXELS_PER_LINE,
|
|
|
|
GET_SNAPSHOT_FPS,
|
|
|
|
GET_SNAPSHOT_MAX_EP_LINE_CNT,
|
|
|
|
};
|
|
|
|
|
2011-08-11 22:14:16 +00:00
|
|
|
struct msm_camsensor_info {
|
2011-01-12 07:42:14 +00:00
|
|
|
char name[MAX_SENSOR_NAME];
|
|
|
|
int8_t flash_enabled;
|
|
|
|
};
|
|
|
|
#endif /* __LINUX_MSM_CAMERA_H */
|