diff options
author | Naren Bhat <nbhat@nvidia.com> | 2012-06-21 16:48:51 -0700 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-07-11 07:25:24 -0700 |
commit | bcd0a2fc0a3b246556ad184af72e49779867e876 (patch) | |
tree | c3ac6f80f36cecc508693866abbb9e92e9f51a92 /include | |
parent | ec165877819d4b2077a3b96a070bab825a62d7cf (diff) |
media: video: tegra: sh532u: Focuser range tuning support
Support for get/set capabilities added. Focuser code has a way to
calibrate itself that results in determination of optimal working
range. This along with actual range from device ROM are returned
to the caller. Focuser has the macro at lower end and infinity at
farther end of the range, which are reversed to the user level to
keep the inf/macro positions to be consistent. Focuser range
translation is taken out.
Bug 1004816
Change-Id: I1a086ff10e99940f9ad861397bf7e71e9996c68a
Signed-off-by: Naren Bhat <nbhat@nvidia.com>
Reviewed-on: http://git-master/r/110443
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Charlie Huang <chahuang@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-by: Patrick Shehane <pshehane@nvidia.com>
Tested-by: Charlie Huang <chahuang@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/media/nvc_focus.h | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/include/media/nvc_focus.h b/include/media/nvc_focus.h index c6ff1fa792c1..e37d897d8323 100644 --- a/include/media/nvc_focus.h +++ b/include/media/nvc_focus.h @@ -33,6 +33,8 @@ #define NVC_FOCUS_CAP_VER2 2 #define NVC_FOCUS_CAP_VER 2 /* latest version */ +#define AF_POS_INVALID_VALUE INT_MAX + enum nvc_focus_sts { NVC_FOCUS_STS_UNKNOWN = 1, NVC_FOCUS_STS_NO_DEVICE, @@ -52,11 +54,13 @@ struct nvc_focus_nvc { struct nvc_focus_cap { __u32 version; - __u32 actuator_range; + __s32 actuator_range; __u32 settle_time; - __u32 focus_macro; - __u32 focus_hyper; - __u32 focus_infinity; + __s32 focus_macro; + __s32 focus_hyper; + __s32 focus_infinity; + __u32 slew_rate; + __u32 position_translate; } __packed; @@ -66,7 +70,7 @@ struct nvc_focus_cap { struct nv_focuser_set_dist_pairs { __s32 fdn; __s32 distance; -}; +} __packed; struct nv_focuser_set { __s32 posture; @@ -78,23 +82,26 @@ struct nv_focuser_set { __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_set_dist_pairs + dist_pair[NV_FOCUSER_SET_DISTANCE_PAIR]; +} __packed; struct nv_focuser_config { __u32 focal_length; __u32 fnumber; __u32 max_aperture; - __u32 actuator_range; + __s32 actuator_range; __u32 settle_time; + __u32 range_ends_reversed; __s32 pos_working_low; __s32 pos_working_high; __s32 pos_actual_low; __s32 pos_actual_high; __u32 slew_rate; __u32 circle_of_confusion; + __u32 num_focuser_sets; struct nv_focuser_set focuser_set[NV_FOCUSER_SET_MAX]; -}; +} __packed; #endif /* __NVC_FOCUS_H__ */ |