首页 > 编程学习 > Camera/Lens流程(2)——异常分析

Camera/Lens流程(2)——异常分析

发布时间:2022/11/10 6:56:06

1、Camera点亮错误检查

等开机差不多了输入 adb shell dmesg > ./test.log 抓取开机log或者开启mtklog后,重启手机重启后关闭mtklog,查看boot log中的kernel log。

接着在log中搜索 对应sensor IC 关键字,查看错误信息。

  • 如果是 i2c 读取失败,一般就两种可能:(1)i2c地址错误,(2)上电时序错误,如果这个平台第一次点摄像头,找基带测量摄像头三路电是否都有。
  • 如果软件检查下来都没有问题,那么可能是硬件有问题,换颗模组、换主板试试。

也可参考MTK FAQ:[FAQ18079] camera黑屏分析。

(1)以下情况表示Sensor有数据

kernel Log:

一般我们看(SOF :signal of frame)
Line 11762: <6>[ 4567.407806] .(3)[0:swapper/3][ISP]P1_SOF_11_11(0x3134002,0x3134002,0x4b0000c,0x4200000,0x0,0x3bf,0x5)
Line 11767: <6>[ 4567.507983] .(3)[0:swapper/3][ISP]P1_SOF_12_12(0x1234002,0x1234002,0x4b00010,0x4500000,0x0,0x3bf,0x6)
Line 11775: <6>[ 4567.608150] .(1)[114:kswapd0][ISP]P1_SOF_13_13(0x2334002,0x2334002,0x4b00014,0x4800000,0x0,0x3bf,0x7)
或者
Line 11818: <6>[ 4568.141296] .(0)[0:swapper/0][ISP]P1_DON_18(0x2334002,0x2334002)
Line 11822: <6>[ 4568.241384] .(2)[207:sugov:0][ISP]P1_DON_19(0x3134002,0x3134002)
Line 11827: <6>[ 4568.341478] .(0)[0:swapper/0][ISP]P1_DON_20(0x1234002,0x1234002)
说明有数据收到

main Log:

10-13 09:57:39.222497   933  5325 E ifunc_cam: [vendor/mediatek/proprietary/hardware/mtkcam/drv/src/isp/mt6765/imageio/drv/cam/isp_function_cam.pipechk.cpp, TG_CHECK, line1735] ERROR: [0x0]:seninf vertical data is small than grab window_v:8_1224
10-13 09:57:39.222497   933  5325 E ifunc_cam:  (TG_CHECK){#1735:vendor/mediatek/proprietary/hardware/mtkcam/drv/src/isp/mt6765/imageio/drv/cam/isp_function_cam.pipechk.cpp}
10-13 09:57:39.222515   933  5325 E ifunc_cam: [vendor/mediatek/proprietary/hardware/mtkcam/drv/src/isp/mt6765/imageio/drv/cam/isp_function_cam.pipechk.cpp, TG_CHECK, line1762] ERROR: [0x0]:TG is in idle status:0x1
10-13 09:57:39.222515   933  5325 E ifunc_cam:  (TG_CHECK){#1762:vendor/mediatek/proprietary/hardware/mtkcam/drv/src/isp/mt6765/imageio/drv/cam/isp_function_cam.pipechk.cpp}
10-13 09:57:39.222532   933  5325 E ifunc_cam: [vendor/mediatek/proprietary/hardware/mtkcam/drv/src/isp/mt6765/imageio/drv/cam/isp_function_cam.pipechk.cpp, TG_CHECK, line1783] ERROR: [0x0]:start dump seninf info
10-13 09:57:39.222532   933  5325 E ifunc_cam:  (TG_CHECK){#1783:vendor/mediatek/proprietary/hardware/mtkcam/drv/src/isp/mt6765/imageio/drv/cam/isp_function_cam.pipechk.cpp}

10-13 09:57:39.228468   933  5248 D SeninfDrvImp: [sendCommand]SENINF1_MUX_CTRL(0xa6df8180), SENINF1_MUX_INTSTA(0x18), SENINF1_MUX_SIZE(0x0), SENINF1_MUX_DEBUG_2(0x4f0000d), SENINF1_MUX_DEBUG_3(0x4f0000d)

以上表示ISP这边收到了数据,但是数据存在问题。

(2)以下情况表示Sensor无数据

kernel Log:

03-19 02:48:53.541784 373 2136 E iio/ifunc: [vendor/mediatek/proprietary/hardware/mtkcam/legacy/platform/mt8173/core/imageio/drv/cam/isp_function.cpp, waitBufReady, line9153] ERROR: wait p1 done fail,cause isp no response, no SOF
03-19 02:48:53.541801 373 2136 E iio/ifunc: [vendor/mediatek/proprietary/hardware/mtkcam/legacy/platform/mt8173/core/imageio/drv/cam/isp_function.cpp, waitBufReady, line9157] ERROR: wait p1 done fail,cause isp no response, no SOF
03-19 02:48:57.613215 373 2136 E iio/ifunc: [vendor/mediatek/proprietary/hardware/mtkcam/legacy/platform/mt8173/core/imageio/drv/cam/isp_function.cpp, waitBufReady, line9153] ERROR: wait p1 done fail,cause isp no response, no SOF

一般这种log 情况都会表明mipi 信号无法被decode,当然我们有理由也应该去怀疑mipi 信号是否正常,这点可以通过测量mipi 信号来查看sensor 出的mipi信号是否符合spec。

2、Lens检查

  • 打开相机apk,看预览画面是否有显示对焦框,并看画面是否有拉伸的动作,有的话说明lens正常;
  • 如果没有对焦框,抓进入相机的mtklog,在main log中 搜索 lensid,如果 lensid 显示是 0xffff 说明配置有问题,检查lens配置代码;
  • 如果有对焦框但没有拉伸画面的动作,抓进入相机的mtklog,在main log中搜索 lensid,看是否和你配置的lensid是一样的,如果一样看kernel log,搜索对应的lens名字,看log是否有i2c error,如果有的话可能lens driver的i2c地址不对,或者是lens驱动不匹配,问模组厂此模组的VCM(音圈马达)用哪个驱动代码,要使用对应模组的lens驱动;
Copyright © 2010-2022 dgrt.cn 版权所有 |关于我们| 联系方式