在QCOM SDM670/845等平台,存在一种chi-cdk类型的camera接口层
CHI功能的官方解释:
CHI allows customers to have the choice of enhancing their camera product by adding external components without changing the Qualcomm code.
Following are external components supported by CHI:
−Custom Node
−Custom Algorithm
−CHI override ->for adding custom use-cases
−Topology
CHI使得用户可以在不更改高通代码的情况下,通过添加外围元件,来增强camera
支持的外围元件:
−Custom Node
−Custom Algorithm 算法
−CHI override ->for adding custom use-cases
−Topology 拓扑
这个代码架构于普通架构完全不同,整理对应的camera bring up资料
文件修改:
The files at the following locations are modified during build compilation.
Sensor driver XML files are at
chi-cdk/vendor/sensor/default/<sensor_name>/<sensor_name)_sensor.xml
Module configuration files
chi-cdk/vendor/module/<module_name>_module.xml
Kernel dts files are at
kernel/msm-4.9/arch/arm64/boot/dts/qcom/<target_name>-camera-sensor-<platform>.dtsi
Submodule driver XML files are at
chi-cdk/vendor/sensor/default/<sub-module_name>/< sub-module _name_sub-module>.xml
Example: chi-cdk/vendor/sensor/default/actuator/<actuator_name>_actuator.xml
The driver binary in the device vendor makefile to be included in the build is at
vendor/qcom/proprietary/common/config/device-vendor.mk
Example: MM_CAMERA += com.qti.sensormodule.<sensor_name>.bin
chi-cdk/vendor/module/<module_name>_module.xml文件功能是配置module的基础信息,功能雨vendor/qcom/proprietory/mm-camera/mm-camera2/media-controller/modules/sensors/configs/xxx_camera.xml类似,但是是每个module独立成一个xml文件
例如:
<cameraModuleData
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="..\..\cdk\sensor\camxmoduleconfig.xsd">
<module_version major_revision="1" minor_revision="0" incr_revision="0"/>
<moduleGroup>
<moduleConfiguration description="Module configuration">
<cameraId>0</cameraId> //camera id
<moduleName>XXXX</moduleName> //module name
<sensorName>xxxx</sensorName> //sensor name
<actuatorName>xxxxx</actuatorName> //acturator name
<oisName>xxxxxx</oisName>
<eepromName>xxxxx</eepromName> //eeprom name
<flashName>xxxxx</flashName> //flash name
<chromatixName>xxxxx</chromatixName> //chromatix
<position>REAR</position>
<CSIInfo description="CSI Information">
<laneAssign>0x3210</laneAssign>
<isComboMode>0</isComboMode>
</CSIInfo>
<lensInfo description="Lens Information">
<focalLength>4.288</focalLength>
<fNumber>1.8</fNumber>
<minFocusDistance>0.1</minFocusDistance>
<maxFocusDistance>3.496</maxFocusDistance>
<horizontalViewAngle>65.7</horizontalViewAngle>
<verticalViewAngle>51.7</verticalViewAngle>
<maxRollDegree>360</maxRollDegree>
<maxPitchDegree>360</maxPitchDegree>
<maxYawDegree>360</maxYawDegree>
</lensInfo>
<pdafName>imx363_pdaf</pdafName>
</moduleConfiguration>
</moduleGroup>
</cameraModuleData>
具体的submodule目录则在
chi-cdk/vendor/<sub-module_name>/default/< sub-module _name_sub-module>.xml
例如sensor的xml文件:
xml文件中配置各个submodule的对应信息(即驱动文件文件)。功能类似于vendor/qcom/proprietory/mm-camera/mm-camera2/media-controller/modules/sensors/sensor/libs/xxx/xxx.h
sensor xml文件中包含多个模块:
slaveinfo 包含用于probe的sensor 信息
regAddrInfo
resolutionInfo
exposureControlInfo
streamOnSettings
groupHoldOnSettings
initSettings等
具体对应配置可以参考高通官方文档 80-P9301-97 C Camera Sensor Driver Bringup Guide