參考資料:極客筆記
Actuator就是AF控制模組,自動對焦的,整合在camera模組中
如下為AF的xml部分配置資訊:
<!--Actuator slave information --> <slaveInfo> <!--Name of the actuator --> <actuatorName>dw9763</actuatorName> <!--8-bit or 10-bit write slave address --> <slaveAddress>0x18</slaveAddress> <!--I2C frequency mode of slave Supported modes are: STANDARD (100 KHz), FAST (400 KHz), FAST_PLUS (1 MHz), CUSTOM (Custom frequency in DTSI) --> <i2cFrequencyMode>FAST</i2cFrequencyMode> <!--Actuator type Supported types are: VCM, BIVCM --> <actuatorType>VCM</actuatorType> <!--Data width in bits --> <dataBitWidth>10</dataBitWidth> <!--Sequence of power configuration type and configuration value required to control power to the device --> <powerUpSequence> <!--Power setting configuration Contains: configType, configValue and delay in milli seconds --> <powerSetting> <!--Power configuration type Supported types are: MCLK, VANA, VDIG, VIO, VAF, RESET, STANDBY --> <configType>VAF</configType> <!--Configuration value for the type of configuration --> <configValue>0</configValue> <!--Delay in milli seconds --> <delayMs>1</delayMs> </powerSetting> </powerUpSequence> <!--Sequence of power configuration type and configuration value required to control power to the device --> <powerDownSequence> <!--Power setting configuration Contains: configType, configValue and delay in milli seconds --> <powerSetting> <!--Power configuration type Supported types are: MCLK, VANA, VDIG, VIO, VAF, RESET, STANDBY --> <configType>VAF</configType> <!--Configuration value for the type of configuration --> <configValue>0</configValue> <!--Delay in milli seconds --> <delayMs>1</delayMs> </powerSetting> ... ...
包含四個部分:
slaveInfo // 裝置的硬體資訊,如裝置地址,上下電 registerConfig // DAC register配置資訊 initSettings // Actuator初始化配置 tunedParams // 平臺配置資訊
slaveInfo部分:
引數名
|
說明
|
actuatorName
|
eeprom型別的名字
|
slaveAddress
|
i2c address
|
i2cFrequencyMode
|
i2c操作頻率,STANDARD (100 KHz), FAST (400 KHz), FAST_PLUS (1 MHz)
|
actuatorType
|
馬達型別,比如VCM/BIVCM
|
datdaBitWidth
|
dac位寬
|
powerUpsequence-/powerUpsequence
powerDownsequence-/powerDownsequence
|
上下點控制節點,就一個VAF,電都不需要供的話就沒有
|
BIVCM可以正負兩個方向的電流
registerConfig部分:
引數名
|
說明
|
regAddrType
|
地址型別
|
regDataType
|
資料型別
|
registerAddr
|
暫存器地址
|
registerData
|
暫存器值
|
operation
|
寫dac操作,WRITE_DAC_VALUE
|
delayUs
|
延遲微妙
|
hwMask
|
未使用
|
hwShift
|
未使用
|
dataShift
|
dac值的偏移
|
initSettings部分:
引數名
|
說明
|
registerAddr
|
IC暫存器地址
|
registerData
|
IC暫存器的值
|
regAddrType
|
地址型別
|
regDataType
|
資料型別
|
operation
|
WRITE,I2C寫
|
delayUs
|
延遲微妙
|
tunedParams部分:
引數名
|
說明
|
initialCode
|
會被OTP燒錄的infinity DAC覆蓋
|
macroStepBoundary
|
Table size,一般填400,最大也是400
|
infinityStepBoundary
|
必須填0
|
codePerStep
|
未使用
|
qValue
|
未使用
|
ringingScenario
|
高通固定值,400,未使用
|
dampingStep
|
dac最大值,未使用
|
dampingDelayUs
|
延時,未使用
|
hwparams
|
移動方向,控制鏡頭移動方向
|
驗證方法:
開啟驍龍相機檢視有沒有對焦
echo "logInfoMask=0x2" >> /vendor/etc/camera/camxoverridesettings.txt adb logcat |grep "actuator"
檢視關鍵log,馬達是否移動,是否focus
Actuator裝置樹配置:
actuator_rear: qcom,actuator0 { cell-index = <0>; compatible = "qcom,actuator"; cci-master = <0>; cam_vaf-supply = <&pm8150a_l7>; regulator-names = "cam_vaf"; rgltr-cntrl-support; rgltr-min-voltage = <2856000>; rgltr-max-voltage = <3104000>; rgltr-load-current = <100000>; };
馬達沒供電,都不用寫後面六行