Qualcomm Camera Learning note Five (actuator driver parameter resolution)

Source: Internet
Author: User

1. Overview

The Actuator driver information file refers to a $actuatorname_actuator.h file (such as Gigaset_actuator.h) in the vendor directory. This information file is a actuator_driver_ctrl_t structure. including Actuator_params and actuator_tuned_params two parts, namely driver and tunning two parts. The documentation describes the parameters as an example of the current most mainstream vcm.

2.driver Part Information--actuator_params

Act_type:actuator type, currently on three types of VCM, piezo and HVCM

Data_size: Data Length (VCM refers to the data length of the transfer lens position?)

Initialization parameters of the Init_settings:actuator

REG_TBL: Register list, used to move parameters under actuator, these parameters include some of the following parameter options

Reg_write_type: The format in which the data is written, VCM generally uses dac,10 bit representation 0~1023

REG_ADDR: Write data register address, if no specific address required, then configured to 0xFFFF

Data_shift: Shift of data corresponding registers

Hw_mask: Control settings for other bit bits, such as the Ring_ctrl of VCM

Hw_shift: Control sets the shift of the corresponding register

Some examples of reg_tbl AD5823 are as follows:

. Reg_tbl =

{

. reg_tbl_size = 1,

. Reg_params =

{

{

. Reg_write_type = Msm_actuator_write_dac,

. Hw_mask = 0x00000400,//// except data outside of the other B it Bit of Mask

. reg_addr = 0x04,// Register write address is reg04

. Hw_shift = 0,//hw_mask a definite bit has been developed position, so no shift is needed

. Data_shift = 0,//reg05[7:0] as data, so there is no need to shift

},

},

},

View the driver code in the following general:

Value = (Next_lens_position <<

Write_arr[i].data_shift) |

((Hw_dword & Write_arr[i].hw_mask) >>

Write_arr[i].hw_shift);

Finally get the I²C data code as follows:

i2c_byte1 = (value & 0xff00) >> 8; corresponds to the reg04 Register Value

I2c_byte2 = value & 0xFF; corresponds to the reg05 Register Value

The value obtained here and the values that need to be written to the register are derived from the Hw_dword parameter in the tunning parameter table Hw_params (the Hw_params value of this driver is 0x00000400). Here's a look at AD5823 's register:

Bit[3 in reg04] Sets whether Ring_ctrl mode is turned on, Bit[7:4] is zero and is set by the Hw_dword and Hw_mask mentioned earlier.

Another example DW9714 is as follows:

. Reg_params =

{

{

. Reg_write_type = Msm_actuator_write_dac,

. Hw_mask = 0x0000000f,// except data outside of the other B it Bit of Mask

. reg_addr = 0xFFFF,// No register address

. Hw_shift = 0,//hw_mask a definite bit has been developed bit, no need to shift

. Data_shift = 4,//10bit The data shift

},

},

Look again at the DW9714 specification register is described below:

Compared with the code can be seen, Byte2 s[3:0] corresponds to give the mask bit, need to according to the tunning parameter Hw_dword to determine the specific mode, the driver gives tunning parameters 0x00000004, that is, s[3:0]-0100; PD and flag are set to 0.

3. tunning Part--actuator_tuned_params

Tunning parameters are divided into the close-up direction and moving to the perspective of the two parts (Move_near&move_far), each part can be set multiple mobile scenes, each scene parameters can be set separately, in order to achieve more granular control.

Qualcomm here implements a lens position array, the specific values in the array corresponds to the actual lens position, so in the driver can see the Step_pos and lens_pos two parameters, respectively, corresponding to the index of the Word array table and the current index corresponding value ( This value is the actual location of lens). The code reflects the following:

Curr_lens_pos = a_ctrl->step_position_table[a_ctrl->curr_step_pos];

Some specific parameters are described below:

Initial_code: The position of the initial lens, corresponding to the 0~1023 range of the VCM

Scenario_size: Number of scenes moving parts in close range and prospect direction

Ringing_scenario: The maximum number of moving steps for each corresponding scene to the close range and the foreground direction

Region_size: Multiple segment partitioning of the lens movement for more granular settings (for non-linear?)

Region_params: the index range corresponding to each segment in the moving step tables, i.e. bound

Step_bound: Corresponds to the specific macro and infinity of the bound boundary value, all the sections together is the total length (corresponding to the table above mentioned length)

Code_per_step: The actual lens length of each step in the current partition that corresponds to the move

Above these parameters together the final sound field moves the array of steps, specifically implemented in the Msm_actuator_init_step_table function, the specific view of the code (MSM_ACTUATOR.C file), the key statement:

Cur_code = set_info->af_tuning_params.initial_code; Initial value

code_per_step =a_ctrl->region_params[region_index].code_per_step;// the step size of the current partition

Cur_code + = Code_per_step; Overlay One step at a

Damping: This part of the parameter is used for braking to eliminate hysteresis, echoing the previous scene parameters.

Ringing_params: Parameter settings for each specific scenario. The following three parameters are set for each section of the current scene.

Damping_step://Lens maximum step per move for scene

Damping_delay://corresponding to the scene lens delay between each move i²c command

Hw_params://Control settings for the scene actuator hardware registers

The above is written so much, summed up also the following points:

1. There is an array Lens_pos[max_bound]-----> corresponds to the number of moving steps previously mentioned in the array

2. In order to better eliminate hysteresis, set a number of moving rules, according to the maximum step for each move to determine which rule to use----> rule is the previous scenario, the largest step is the previous Ringing_scenario array in the corresponding value of each scene, This value represents the subscript of the array.

3. Divide the entire moving range into multiple intervals and subdivide each interval lens step to improve the linearization problem.

4. Set the hysteresis cancellation parameters for different zones of different scenes.

It is also important to note that the high-pass AF algorithm is issued with the parameters of the step number, not the specific lens position, the specific lens position needs to look up the table to obtain. In fact, from this part of the parameter settings can be found here mainly to drive the driver of the chip to set, the algorithm on the forward step of the judgment or in other places, as long as the control of each step length, it is equivalent to the hysteresis control, so the parameters Damping_ It is understandable that step is set to the maximum value.

For example, let's say:

. Actuator_tuned_params =

{

. scenario_size =

{

1,/* move_near */ / number of scenes, a scene is defined here

1,/* Move_far */

},

. Ringing_scenario =

{

/* Move_near */

{

,// corresponding to the maximum step of the scene, moving steps less than this value indicates that this scenario parameter is applicable. There is only one scene defined here, so set this value to the maximum number of steps ( that is, the array capacity). This value represents the step size of each move, not the specific array subscript.

},

/* Move_far */

{

400,

},

},

. Initial_code = +,// Initial Lens the location

. region_size = 1,// to Lens Are divided by multiple segments, parameter setting for different intervals of hysteresis

. Region_params =

{

{

. Step_bound =// step bound for each segment , this defines only one interval, the entire VCM The move process uses the same hysteresis processing.

{

+/ * Macro step boundary*/// end of current segment step

0,/* Infinity step boundary*/// starting step of the current section

},

. Code_per_step = 1,//step table in Lens the step length

},

},

. Damping =

{

/* Damping[move_near] */

{

/* Scenario 0 */// hysteresis parameters for the current scene

{

. Ringing_params =

{

/* Region 0 */ / hysteresis parameters of the current interval

{

. Damping_step = 0x3ff,// This is set to maximum value 1023 , which is equivalent to not doing magnetic hysteresis processing, directly set to the desired value.

. Damping_delay = 6000,

. Hw_params = 0x00000000,

},

},

},

},

/* Damping[move_near] */

{

/* Scenario 0 */

{

. Ringing_params =

{

/* Region 0 */

{

. Damping_step = 0x3ff,

. Damping_delay = 6000,

. Hw_params = 0x00000000,

},

},

},

},

},

},/* Actuator_tuned_params */

Qualcomm Camera Learning note Five (actuator driver parameter resolution)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.