diff options
author | Naren Bhat <nbhat@nvidia.com> | 2012-05-16 18:49:21 -0700 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-06-14 07:40:29 -0700 |
commit | 3d567f08f468a496b4d1997151abd04896d0be7b (patch) | |
tree | 7a5e37a986367531be79f3e87e34285f9a6f20ad /include/media | |
parent | 98953006c8ee5b30bc80774ca1b14d80273d3fb8 (diff) |
media: video: tegra: ar0832: Make focuser range, slew rate tunable
The range parameters & slew rate from the blocks-camera are being passed
down to ODM and then to kernel. Generic structure added for sharing
the data between ODM and kernel instead of specific structure.
Bug 954874
Change-Id: I84656e36a5a2721c007de78aa5c20f5dfeb00361
Signed-off-by: Naren Bhat <nbhat@nvidia.com>
Reviewed-on: http://git-master/r/102077
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/ar0832_main.h | 13 | ||||
-rw-r--r-- | include/media/nvc_focus.h | 38 |
2 files changed, 41 insertions, 10 deletions
diff --git a/include/media/ar0832_main.h b/include/media/ar0832_main.h index f5e3713b46fb..fe46c228a9f1 100644 --- a/include/media/ar0832_main.h +++ b/include/media/ar0832_main.h @@ -12,6 +12,7 @@ #define __AR0832_MAIN_H__ #include <linux/ioctl.h> /* For IOCTL macros */ +#include <media/nvc_focus.h> #define AR0832_IOCTL_SET_MODE _IOW('o', 0x01, struct ar0832_mode) #define AR0832_IOCTL_SET_FRAME_LENGTH _IOW('o', 0x02, __u32) @@ -23,10 +24,11 @@ #define AR0832_IOCTL_SET_POWER_ON _IOW('o', 0x08, struct ar0832_mode) #define AR0832_IOCTL_SET_SENSOR_REGION _IOW('o', 0x09, struct ar0832_stereo_region) -#define AR0832_FOCUSER_IOCTL_GET_CONFIG _IOR('o', 0x10, struct ar0832_focuser_config) +#define AR0832_FOCUSER_IOCTL_GET_CONFIG _IOR('o', 0x10, struct nv_focuser_config) #define AR0832_FOCUSER_IOCTL_SET_POSITION _IOW('o', 0x11, __u32) #define AR0832_IOCTL_GET_SENSOR_ID _IOR('o', 0x12, __u16) +#define AR0832_FOCUSER_IOCTL_SET_CONFIG _IOW('o', 0x13, struct nv_focuser_config) #define AR0832_SENSOR_ID_8141 0x1006 #define AR0832_SENSOR_ID_8140 0x3006 @@ -85,15 +87,6 @@ struct ar0832_stereo_region { struct ar0832_point image_end; }; -struct ar0832_focuser_config { - __u32 settle_time; - __u32 actuator_range; - __u32 pos_low; - __u32 pos_high; - __u32 focal_length; - __u32 fnumber; - __u32 max_aperture; -}; #ifdef __KERNEL__ struct ar0832_platform_data { diff --git a/include/media/nvc_focus.h b/include/media/nvc_focus.h index bed9df11a34a..c6ff1fa792c1 100644 --- a/include/media/nvc_focus.h +++ b/include/media/nvc_focus.h @@ -59,5 +59,43 @@ struct nvc_focus_cap { __u32 focus_infinity; } __packed; + +#define NV_FOCUSER_SET_MAX 10 +#define NV_FOCUSER_SET_DISTANCE_PAIR 16 + +struct nv_focuser_set_dist_pairs { + __s32 fdn; + __s32 distance; +}; + +struct nv_focuser_set { + __s32 posture; + __s32 macro; + __s32 hyper; + __s32 inf; + __s32 hysteresis; + __u32 settle_time; + __s32 macro_offset; + __s32 inf_offset; + __u32 num_dist_pairs; + struct nv_focuser_set_dist_pairs dist_pair[NV_FOCUSER_SET_DISTANCE_PAIR]; +}; + +struct nv_focuser_config { + __u32 focal_length; + __u32 fnumber; + __u32 max_aperture; + __u32 actuator_range; + __u32 settle_time; + __s32 pos_working_low; + __s32 pos_working_high; + __s32 pos_actual_low; + __s32 pos_actual_high; + __u32 slew_rate; + __u32 circle_of_confusion; + struct nv_focuser_set focuser_set[NV_FOCUSER_SET_MAX]; +}; + + #endif /* __NVC_FOCUS_H__ */ |