diff options
author | Ninad Patgaonkar <ninadp@codeaurora.org> | 2010-10-29 11:19:15 -0700 |
---|---|---|
committer | Ninad Patgaonkar <ninadp@codeaurora.org> | 2010-10-29 11:19:15 -0700 |
commit | b278b414e443719c8af9e7165fcb8bea095a7fb2 (patch) | |
tree | 2a7bbe3adbb15e3bb7120da49ce2dfb65b6da343 | |
parent | 30fdd981209108ac87f0e313eedabcd7a2ac0698 (diff) | |
download | bionic-b278b414e443719c8af9e7165fcb8bea095a7fb2.zip bionic-b278b414e443719c8af9e7165fcb8bea095a7fb2.tar.gz bionic-b278b414e443719c8af9e7165fcb8bea095a7fb2.tar.bz2 |
msm: camera: Support for common IOCTL call for LED & Strobe Flash
Added a single IOCT interface for LED & Strobe Flash control
operations.
Change-Id: Ic032e245782b0974be8a138474af28f765d6762c
-rw-r--r-- | libc/kernel/common/media/msm_camera.h | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/libc/kernel/common/media/msm_camera.h b/libc/kernel/common/media/msm_camera.h index f6397a2..b54e283 100644 --- a/libc/kernel/common/media/msm_camera.h +++ b/libc/kernel/common/media/msm_camera.h @@ -88,9 +88,11 @@ #define MSM_CAM_IOCTL_STROBE_FLASH_RELEASE _IO(MSM_CAM_IOCTL_MAGIC, 31) -#define MSM_CAM_IOCTL_ERROR_CONFIG _IOW(MSM_CAM_IOCTL_MAGIC, 32, uint32_t *) +#define MSM_CAM_IOCTL_FLASH_CTRL _IOW(MSM_CAM_IOCTL_MAGIC, 32, struct flash_ctrl_data *) -#define MSM_CAM_IOCTL_ABORT_CAPTURE _IO(MSM_CAM_IOCTL_MAGIC, 33) +#define MSM_CAM_IOCTL_ERROR_CONFIG _IOW(MSM_CAM_IOCTL_MAGIC, 33, uint32_t *) + +#define MSM_CAM_IOCTL_ABORT_CAPTURE _IO(MSM_CAM_IOCTL_MAGIC, 34) #define MSM_CAMERA_LED_OFF 0 #define MSM_CAMERA_LED_LOW 1 @@ -452,6 +454,30 @@ struct sensor_cfg_data { } cfg; }; +enum flash_type { + LED_FLASH, + STROBE_FLASH, +}; + +enum strobe_flash_ctrl_type { + STROBE_FLASH_CTRL_INIT, + STROBE_FLASH_CTRL_CHARGE, + STROBE_FLASH_CTRL_RELEASE +}; + +struct strobe_flash_ctrl_data { + enum strobe_flash_ctrl_type type; + int charge_en; +}; + +struct flash_ctrl_data { + int flashtype; + union { + int led_state; + struct strobe_flash_ctrl_data strobe_ctrl; + } ctrl_data; +}; + #define GET_NAME 0 #define GET_PREVIEW_LINE_PER_FRAME 1 #define GET_PREVIEW_PIXELS_PER_LINE 2 |