Qualcomm平台camera移植

所需积分/C币:50 2014-07-17 10:08:44 491KB PDF

根据在Qualcomm平台的camera点亮工作过程,写的一篇简略的入门文档。如果是刚做高通平台,可以参考!
2.在日录 kernel/ drivers/ media/ platform/msm/ camera_v2/ sensor/日录新增 sensor.c文 件,主要填充 msm sensor_ power setting结构体: sensor上电的包含的引却设定和电压设定, 具体格式叮以参考同目录卜的其他文件。 3. kerne|下面的相关mk文件: 文件 例 /arch/arm/configs/msm8226 defconfi CONFIG_IMX179 SUNNY Q8NO9B=y /drivers/media/platform/msm/camera_v2/ Confi config IMX179 SUNNY 08No9B bool Sensor IMX179 (BAYER &MPY depends on MSMB CAMERA elp-- Sony MP Bayer Sensor /drivers/media/platform/msm/camera v2/sens or/Makefile obj-S(CONFIG IMX179 SUNNY_ Q8N09B) imx179 sunny_c8n09b0 图5kene目录下 camera相关配置文件 其他:如果 sensor中带有 ee prom,需要在dts文件中增加 eeprom的节点信息;同样, sensor 带有对焦功能,需要在dts文件中增加 actuator节点信息;对于带 eeprom的 sensor,还需要配 置 eeprom的时钟控制代码(有待研究)21 2,2 vendor下代码移植 endor下面的代码关系着 camera是否点亮的代码主要是两部分,个是 sensor libs目 录下的 sensor只体设定文件,另一个是 chromatix下面的sP效果文件。只体为 1. sensor ibs目录下文件:包括一个 Android. mk文件和一个c文件。其中 Android. mk文 件参考同目录下其他,mk文件修改和对应 sensor有关设定即可;,c文件中需要填充的 为一个 ensor_ibt类型的结构体(MX179填充示例) 成员介绍 chromatix array 5e050的 chromaⅸ库文件(·50)组 cs params array C相关参数 E5I xcX out info array enso莆出配置:帧率、窗口大小、 out xxo 数据格式 res settings array 5en初始化设定 start settIngs ensor开始/停止吐数据寄存器设定 stop settings 对应 exposure func_ta ble中的数据多 exposure ta ble size少,其他地方根据这个参数分配 buffer 图6 sensor ib t成员截选图 2. chromatⅸX日录下相关文件,在对应 sensor日录下包含4个日录和一个 Android文件, 总共13个文件,这些文件都会由 chromatⅸ调试工具生成。下面为MX179文件实 例 Aneroid mk common Android. mk chromatix imx179 sunny oEn09b commonc chromatix imxl79 sunny cBn09b common h Android. mk chromatix Imxl79 sunny /mm-camera/mmcamera2 c8n09b oreview c /media controller/ modules/ Chromatix imx179 sunny sensors/chromatix/0301 gEn09b_preview. h /libchromatix/ chromatix imx179 sunny_ g8n09b/ snapshot/ Android.mk chromatix imx179 sunny oSn09b snapshot c chromatix imx179 sunny t h Android. mk chromatix imxl79 sun c&n9bwce。 chromatix imx179 sunny c8 ntsb vide口h 图7 vendor下 chromatix相关文件示例图 3. vendor下还有 eeprom文件,模组自带的 eeprom数据处理相关;AF相关文件,调 试二具生成的关于AF的效果文件;配置文件,扣需要编译的模块填进配置文件中 文件类型 文什实例 actuators/0301/af main cam camcorder 5h AF相天文件 actuators/ 0301/af_main cam camera sh actuators actuator.c eeprom_libs/sunny_gBn 09b/Android. mk epro相天文件 eeprom libs/ sunny g8n 09b/sunny_o8n09b_eepr o.c vendor下配置文件 common/ config/eice ve mk 图8 vendor下其他 camera文件 附录: 1.高通关于 camera的dts节点属性值解释 Properties Description Sample c。des Suggestion for OEMs should be" qcom"followed by sensor name compatible= Same as the gcom, 55k3l1 yx sEnor nane used in the ect e g should contain i2c sleve address of the reg =E0xie xdr camera sensor and length of data fleld which Is OxD dcom, glawe-id should contain i2c slave address, device id qcom.- id=<0x6 address and expected id read value Od 0x31212 qcom, csiphy-sd- should contain csiphy instance that will com. csiphy-sd-index used to receive sensor data. 1 com, csid-sd-index should cantain csid care instance that will qcom, csid-sd-index=<0>: used to receie sensor date .0.1 qcom, led-flash-sdk- should contain handle to flash source qcom, flash-arc-index 的nd node if flash is supported for this sensor ced tlas h>. qcom.mount-angle should contain the physical mount angle af qcommaunt-angle=<t> the sensor on the target-0. 90, 180.3E0 qcom, sensor-name should contain unique sensor name to -name Same as the differentiate from other sensor 5k31 compatible field cam vdig-gupply cam wig- supply: should contain cam wig- supply The parameters regulator from which digital voltage is a& Dmag41旧> e based on the supplied Hw design cam wana-supply: should contain cam Yana- supply regulator from which analog voltage is &pm8941 117>2 supplied cam Mio-gupply =should contain regulator cam vio-supply from which Io voltage is supplled cam_no-supply m8941Ns3 cam waf-supply: should contain regulator cam vaf-supply from which AF voltage is suppled cam vaf-supp e&pm89413 you, Eam-vteg-f qcom, cam-a- qcom, cam-vreg-name: should contai cam wdig. cam names of all regulators meeded by this cam vana"cam vat sEnser qcom, cam-vreg-type"cam_vaf, cam vana,cam_vio cam vig eg-type = cD 100> gcom. cam-vreg-type: should contain regulator type for regulators mentioned In qcom,cam-wreg-name (in same order cam dig "cam wana","cam vio cam vat 0 for LDO and 1 for Lvs gcom. cam-vreg-min-voltage: should qcom, cam-vreg-mInr- qoom, cam-vreg-min- conta in minimum voltage level for wo tage s<12250000 regulators mentoned in qcom cam-vreg name property (in the same order) qcom, cam-vreg-max-I-qcom,cam-vreg-max-woitage: should quot cam-vTeg-mak roltage conta in maximum voltage level for dotage≤12250000 regulators mentioned in qcom cam-vreg-285000030000D0> name property(in the same order goom: Cam-Ys-eD qcom,cam-yreg-op-mode:should contain com. cam-vreg-op-mode optimum voltage level for regulators =≤10 5000 0 800 mentoned in gcom,cam-vreg-name 10o>; rty (in the same order) Pr。 perties Description Sample Codes Suggestion for OEMs qcom, gpio-nD-mux-qcomgpio-no-mux should contain field qcom gpio-no-mux-<0>, The parameters to indicate whether gpio mux table is are based on th available Hw design, do 1 if gpio muk is not avallable. 0 not change athene unless really gpios: should contain handle to gpio gpios= <&msmgpia 15 controller node and array ot #apia-cells specify ing specific gpio(contoller specific] <&msmgpio 90 0- pio-reser qcom.gpio-reset: should contain index to qcom. gpio-reset=<i> C o used by sensors reset n acom, gpio-reg-tbr qcom. gpio-req-tbl-num: should contain qo com apio-rea-thl-num= nul index to gpios specific to this sensor direction af gpios present in qcom.gpio-req-wwreq-thl-fiags qcom gpio-reg-tbt-gcom. gpio-req tbl-flags: should contain qcomgpit tbl-num property (in the same order qcomgpio-req-tol-abel should contain gcom, gpio-req-tbl-abel name of gpios present in qcom, gpio-reqr"CAMIF MCLK thl-num property (in the same order CAM RESET1 qcom, gpio-set-tbh gcom gpio-set-tbl-num: should contain index of gpios that need to be com, Apio-set-thl-num Dy msm qcom. gpio-set-tbl-tlags: should contain qcom, gpio-set-tbh- gcom. gpio-set世Hags value to be configured for the gpios present <02> in qcom gpio-get-tol- num property (in the same order gcom, gpio-get-tbl- qcom.gpio-ser-tbl- delay: should contain I gcom. pio-set-tb-delay mount of delay after configuring gpios as specified in gpio set tbl flags property (in the same order Properties Description sample Codes Suggestion for OEMs qcom, csl-lane-assign-qcom.csHane-assign: should contain com. csi-lane-assion E lane assignment value to map CSIPHY CDx43202 lanes to cs D lanes gcom. csh-lane-mask-qcom.csHane-mask: should contain lane mask that specifies CsIPHY lanes to be qcom, csi-lane-mask= COxIF2 enabled dcom, sensor should contain the mount angle of the com, sensor-position= canTera sensor 0-> beck camera 1- front camera qcom,sensor-mode should contain format of data that sensor gcom. sensor-mode=<ix. streams status=ok"T Camera module status status=0- 2.IMX179的 sensor lib t填充示例 staticsensor_ t sensor_ibptr =i sensor_output=&sensor _output output reg addr &output reg_ addr exp gain info &exp gain info aec info= &aec info . snapshot exp wait frames =1, sensor_num frame skip =1 exposure_tablesize =7 default lens info &default lens info csi_lane_params =&csi_ lane_params c5iCid-params imxl795unnyc8n09bcidcfg csi_cid_params_size=ARRAY SIZE(imxl79-sunny_q8n09b_cid_cfg init settings array= Einit settings_ array start settings &start settings stop settings &stop settings group groupof settings &groupof settings sensor res fg table = &imx179 sunny g8 n09b res ta ble res settings_ array = &res settings_array. out info array =&out info array crop_ params array =&crop params array, Csi params array =&csi params array, sensor_ stream_ info array =&imx179 sunny_aEn09bstream_info_array exposure func ta ble = &imx179 sunny_g&n09b exps oure tbl chrom atix array =Eimx179_sunny_-aan09b_ib chromatix array 参考资料: (1http://blog.csdn.net/21cnbao/article/details/8457546 (21http://www.niwozhi.net/democ446i72314.html

...展开详情

评论 下载该资源后可以进行评论 15

maxwell_phys 非常好的资源
2019-11-11
回复
niejc 对了解camera在高通平台下的工作还是有些帮助
2019-09-30
回复
yishuilianyi321 总结很好,对新手参考价值较大
2018-11-05
回复
孤星城 谢谢分享,还是给新手很多参考价值的
2018-01-19
回复
huhayayo 正在移植学习高通的东西,特别是Vendor 下面的camera部分, 现在基本没资料了
2017-01-16
回复
tarryzhang 总结的不错,刚好用到
2016-11-15
回复
heshimin 总结的不错,很有参考价值
2016-06-07
回复
zhangjie6055 非常不错,指的一看,学习了
2016-05-10
回复
mhnuji 这个真的不错,希望作者还能多写一些关于高通camera方面的内容
2015-10-29
回复
mavels 很有参考价值,代码还需要自己深入去看一下。
2015-09-16
回复
img
srw11

关注 私信 TA的资源

上传资源赚积分,得勋章
    最新推荐