usb camera调试步骤

usb camera调试步骤

  1. 插入摄像头看看是否有新的dev/videoxxx出现.没有的话,kernel config没配好

  2. 检查开机logcat看看
     I FslCameraHAL: getNodeName: dev path:/dev/videox
     I FslCameraHAL: getNodeName: node name:mxc-isi
     I FslCameraHAL: getNodeNames: node name:xxxxxxx     xxxxxxx应该包含uvc字符串

    如果xxxxxxx不包含uvc字符串,改init.rc中的 setprop front_camera_name  增加xxxxxxx

 3. 然后  I FslCameraHAL: camera number is 应该是2

4.打开安卓app,看看有没有前后摄切换,如果没有就换个app,依然没有,就注掉mipi, 把front_camera_name中xxxxxxx去掉,在back_camera_name中增加xxxxxxx重试

5.如果有画面但是完全乱码,可能不该用UvcDevice,改用UvcMJPGDevice:在init.rc增加uvc_mjpg prop

还可以对比下插入usb camera之前和之后,开机logcat差异:

01-08 02:05:58.461  2948  2948 I FslCameraHAL: enumSensorSet
01-08 02:05:58.462  2948  2948 I FslCameraHAL: matchDevNodes
01-08 02:05:58.463  2948  2948 I FslCameraHAL: getNodeName: dev path:/dev/video13

01-08 02:05:58.503  2948  2948 I FslCameraHAL: getNodeName: node name:vpu encoder
01-08 02:05:58.503  2948  2948 I FslCameraHAL: getNodeName CHIP_IDENT dev path:/dev/video13 failed
01-08 02:05:58.503  2948  2948 I FslCameraHAL: getNodeNames: node name:vpu encoder,vpu encoder        video13的名字
01-08 02:05:58.504  2948  2948 I FslCameraHAL: getNodeName: dev path:/dev/video1
01-08 02:05:58.504  2948  2948 I FslCameraHAL: getNodeName: node name:mxc-isi
01-08 02:05:58.505  2948  2948 I FslCameraHAL: getNodeNames: node name:mxc-isi,imx8_max9286_mipi_1      video1的名字 
01-08 02:05:58.510  2948  2948 I FslCameraHAL: getNodeName: dev path:/dev/video12

                                                    W FslCameraHAL: getNodeName dev path:/dev/video12 is not capture
01-08 02:06:00.394  2948  2948 I FslCameraHAL: getNodeName: dev path:/dev/video0
01-08 02:06:00.395  2948  2948 I FslCameraHAL: getNodeName: node name:mxc-isi
01-08 02:06:00.396  2948  2948 I FslCameraHAL: getNodeNames: node name:mxc-isi,imx8_adv7182_0                  video0的名字

01-08 02:06:00.401  2948  2948 I FslCameraHAL: matchPropertyName: index:0, imx8_ov5640_mipi,max9286_mipi
01-08 02:06:00.401  2948  2948 I FslCameraHAL: index:0, propName:imx8_ov5640_mipi
01-08 02:06:00.402  2948  2948 I FslCameraHAL: matchNodeName
01-08 02:06:00.402  2948  2948 I FslCameraHAL: matchNodeName: sensor:vpu encoder,vpu encoder, dev:/dev/video13, node:imx8_ov5640_mipi, index:0
01-08 02:06:00.402  2948  2948 I FslCameraHAL: matchNodeName: sensor:mxc-isi,imx8_max9286_mipi_1, dev:/dev/video1, node:imx8_ov5640_mipi, index:0
01-08 02:06:00.402  2948  2948 I FslCameraHAL: matchNodeName: sensor:mxc-isi,imx8_adv7182_0, dev:/dev/video0, node:imx8_ov5640_mipi, index:0
01-08 02:06:00.402  2948  2948 I FslCameraHAL: index:0, propName:max9286_mipi
01-08 02:06:00.402  2948  2948 I FslCameraHAL: matchNodeName
01-08 02:06:00.402  2948  2948 I FslCameraHAL: matchNodeName: sensor:vpu encoder,vpu encoder, dev:/dev/video13, node:max9286_mipi, index:0
01-08 02:06:00.402  2948  2948 I FslCameraHAL: matchNodeName: sensor:mxc-isi,imx8_max9286_mipi_1, dev:/dev/video1, node:max9286_mipi, index:0    字符串一样,匹配成功,所以打印下句
01-08 02:06:00.402  2948  2948 I FslCameraHAL: Camera ID 0: name mxc-isi,imx8_max9286_mipi_1, Facing 0, orientation 0, dev path /dev/video1
01-08 02:06:00.402  2948  2948 I FslCameraHAL: matchPropertyName: index:1, imx8_ov5640,imx8_ov5640_mipi,uvc,adv7180_decoder
01-08 02:06:00.402  2948  2948 I FslCameraHAL: index:1, propName:imx8_ov5640
01-08 02:06:00.402  2948  2948 I FslCameraHAL: matchNodeName
01-08 02:06:00.402  2948  2948 I FslCameraHAL: matchNodeName: sensor:vpu encoder,vpu encoder, dev:/dev/video13, node:imx8_ov5640, index:1
01-08 02:06:00.402  2948  2948 I FslCameraHAL: matchNodeName: sensor:mxc-isi,imx8_adv7182_0, dev:/dev/video0, node:imx8_ov5640, index:1
01-08 02:06:00.402  2948  2948 I FslCameraHAL: index:1, propName:imx8_ov5640_mipi
01-08 02:06:00.402  2948  2948 I FslCameraHAL: matchNodeName
01-08 02:06:00.402  2948  2948 I FslCameraHAL: matchNodeName: sensor:vpu encoder,vpu encoder, dev:/dev/video13, node:imx8_ov5640_mipi, index:1
01-08 02:06:00.402  2948  2948 I FslCameraHAL: matchNodeName: sensor:mxc-isi,imx8_adv7182_0, dev:/dev/video0, node:imx8_ov5640_mipi, index:1
01-08 02:06:00.402  2948  2948 I FslCameraHAL: index:1, propName:uvc
01-08 02:06:00.402  2948  2948 I FslCameraHAL: matchNodeName
01-08 02:06:00.402  2948  2948 I FslCameraHAL: matchNodeName: sensor:vpu encoder,vpu encoder, dev:/dev/video13, node:uvc, index:1
01-08 02:06:00.402  2948  2948 I FslCameraHAL: matchNodeName: sensor:mxc-isi,imx8_adv7182_0, dev:/dev/video0, node:uvc, index:1
01-08 02:06:00.402  2948  2948 I FslCameraHAL: index:1, propName:adv7180_decoder
01-08 02:06:00.402  2948  2948 I FslCameraHAL: matchNodeName
01-08 02:06:00.402  2948  2948 I FslCameraHAL: matchNodeName: sensor:vpu encoder,vpu encoder, dev:/dev/video13, node:adv7180_decoder, index:1
01-08 02:06:00.402  2948  2948 I FslCameraHAL: matchNodeName: sensor:mxc-isi,imx8_adv7182_0, dev:/dev/video0, node:adv7180_decoder, index:1
01-08 02:06:00.402  2948  2948 I FslCameraHAL: create id:0 Max9286Mipi device
01-08 02:06:00.402  2948  2948 I FslCameraHAL: Camera:0: new camera device
01-08 02:06:00.403  2948  2948 I FslCameraHAL: camera number is 1

 

 

你可能感兴趣的:(Android)