您尚未登录。

楼主 # 2024-08-05 13:20:36

542396750@qq.com
会员
注册时间: 2021-03-26
已发帖子: 163
积分: 19.5

R818添加ov5640摄像头

安卓10系统内核添加ov5640驱动后,开机ov5640不停地注册,I2C读取ID正确,dev下有video0和video1,打开相机,预览界面是黑色的,过一会弹出停止应用的提示框。

:s0 tclass=file permissive=1
[  175.759428] [ov5640]PWR_ON1!
[  175.774827] [ov5640]PWR_ON4!
[  175.824152] [ov5640]PWR_ON5!
[  175.827563] [ov5640]PWR_ON6!
[  175.831197] [ov5640]cjf[ov5640.c]: sensor_detect
[  175.836219] [VIN_DEV_I2C]cjf[cci_helper.c]:addr_width:16 data_width:8 addr:
[  175.836219]  value:[VIN_DEV_I2C]cjf[cci_helper.c]:addr_width:16 data_width:8 addr:
value:
[  175.854617] [ov5640]V4L2_IDENT_SENSOR = 5640
[  175.927461] [ov5640]PWR_OFF!
[  177.196085] audit: audit_lost=2 audit_rate_limit=5 audit_backlog_limit=64
[  177.203809] audit: rate limit exceeded
[  177.643729] init: Received control message 'interface_start' for 'android.hardware.camera.provider@2.4::ICameraProvider/legacy/0' from pid: 1611 (/system/bin/hwservicemanager)
[  177.662049] init: starting service 'vendor.camera-provider-2-4'...
[  177.671210] init: couldn't write 3394 to /dev/cpuset/camera-daemon/tasks: No such file or directory
[  177.766479] [ov5640]PWR_ON1!
[  177.781791] [ov5640]PWR_ON4!
[  177.828807] [ov5640]PWR_ON5!
[  177.832057] [ov5640]PWR_ON6!
[  177.835402] [ov5640]cjf[ov5640.c]: sensor_detect
[  177.840475] [VIN_DEV_I2C]cjf[cci_helper.c]:addr_width:16 data_width:8 addr:
[  177.840475]  value:[VIN_DEV_I2C]cjf[cci_helper.c]:addr_width:16 data_width:8 addr:
value:
[  177.858763] [ov5640]V4L2_IDENT_SENSOR = 5640
[  177.931237] [ov5640]PWR_OFF!
[  178.644934] init: Received control message 'interface_start' for 'android.hardware.camera.provider@2.4::ICameraProvider/legacy/0' from pid: 1611 (/system/bin/hwservicemanager)
[  179.200713] init: Untracked pid 3398 exited with status 0
[  179.208660] init: Service 'vendor.camera-provider-2-4' (pid 3394) received signal 11
[  179.217988] init: Sending signal 9 to service 'vendor.camera-provider-2-4' (pid 3394) process group...
[  179.228921] libprocessgroup: Successfully killed process cgroup uid 1047 pid 3394 in 0ms
[  179.239454] init: Untracked pid 3400 exited with status 0
[  179.646022] init: Received control message 'interface_start' for 'android.hardware.camera.provider@2.4::ICameraProvider/legacy/0' from pid: 1611 (/system/bin/hwservicemanager)
[  179.751456] [ov5640]PWR_ON1!
[  179.766795] [ov5640]PWR_ON4!
[  179.815311] [ov5640]PWR_ON5!
[  179.818560] [ov5640]PWR_ON6!
[  179.821809] [ov5640]cjf[ov5640.c]: sensor_detect
[  179.826902] [VIN_DEV_I2C]cjf[cci_helper.c]:addr_width:16 data_width:8 addr:
[  179.826902]  value:[VIN_DEV_I2C]cjf[cci_helper.c]:addr_width:16 data_width:8 addr:
value:
[  179.845018] [ov5640]V4L2_IDENT_SENSOR = 5640
[  179.919247] [ov5640]PWR_OFF!
[  181.173627] logd: logdr: UID=1047 GID=1005 PID=3413 n tail=50 logMask=8 pid=3408 start=0ns timeout=0ns
[  181.185830] logd: logdr: UID=1047 GID=1005 PID=3413 n tail=50 logMask=1 pid=3408 start=0ns timeout=0ns
[  181.199514] logd: logdr: UID=1047 GID=1005 PID=3413 n tail=0 logMask=8 pid=3408 start=0ns timeout=0ns
[  181.211153] logd: logdr: UID=1047 GID=1005 PID=3413 n tail=0 logMask=1 pid=3408 start=0ns timeout=0ns
[  181.735563] [ov5640]PWR_ON1!
[  181.749262] [ov5640]PWR_ON4!
[  181.797873] [ov5640]PWR_ON5!
[  181.801251] [ov5640]PWR_ON6!
[  181.804529] [ov5640]cjf[ov5640.c]: sensor_detect
[  181.809510] [VIN_DEV_I2C]cjf[cci_helper.c]:addr_width:16 data_width:8 addr:
[  181.809510]  value:[VIN_DEV_I2C]cjf[cci_helper.c]:addr_width:16 data_width:8 addr:
value:
[  181.827630] [ov5640]V4L2_IDENT_SENSOR = 5640
[  181.900144] [ov5640]PWR_OFF!

离线

楼主 #1 2024-08-05 13:23:05

542396750@qq.com
会员
注册时间: 2021-03-26
已发帖子: 163
积分: 19.5

Re: R818添加ov5640摄像头

感觉是相机的进程被系统杀死了,然后又重新启动进程

离线

#2 2024-08-06 09:27:21

varzhou
会员
注册时间: 2020-07-14
已发帖子: 108
积分: 2

Re: R818添加ov5640摄像头

542396750@qq.com 说:

感觉是相机的进程被系统杀死了,然后又重新启动进程

不用感觉,明显就是

离线

楼主 #3 2024-08-06 10:55:38

542396750@qq.com
会员
注册时间: 2021-03-26
已发帖子: 163
积分: 19.5

Re: R818添加ov5640摄像头

08-02 15:43:03.721 W/NativeCrashListener( 2070): Couldn't find ProcessRecord for pid 25755
08-02 15:43:03.728 E//system/bin/tombstoned( 1936): Tombstone written to: /data/tombstones/tombstone_08
08-02 15:43:03.739 I/BootReceiver( 2070): Copying /data/tombstones/tombstone_08 to DropBox (SYSTEM_TOMBSTONE)
08-02 15:43:03.740 I/DropBoxManagerService( 2070): add tag=SYSTEM_TOMBSTONE isTagEnabled=true flags=0x2
08-02 15:43:04.102 W/ServiceManagement( 1910): Waited one second for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0
08-02 15:43:04.103 I/ServiceManagement( 1910): getService: Trying again for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0...
08-02 15:43:04.119 I/ServiceManager(15703): Waiting for service 'media.camera' on '/dev/binder'...
08-02 15:43:04.189 I/android.hardware.camera.provider@2.4-service-lazy(25769): CameraProvider@2.4 legacy service is starting.
08-02 15:43:04.393 D/        (25769): new AWIspApi, F:AWIspApi, L:33
08-02 15:43:04.393 E/CameraHALv3_4-METADATACOMMON(25769): V4L2Control:324: Control 10094867 (Auto Exposure, Bias) is of unsupported type 9
08-02 15:43:04.394 E/CameraHALv3_4-METADATACOMMON(25769): V4L2Control:324: Control 9963800 (Power Line Frequency) is of unsupported type 3
08-02 15:43:04.394 E/CameraHALv3_4-METADATACOMMON(25769): V4L2Control:324: Control 10094871 (ISO Sensitivity) is of unsupported type 9
08-02 15:43:04.394 E/CameraHALv3_4-METADATACOMMON(25769): V4L2Control:324: Control 10094849 (Auto Exposure) is of unsupported type 3
08-02 15:43:04.394 E/CameraHALv3_4-METADATACOMMON(25769): V4L2Control:324: Control 10094868 (White Balance, Auto & Preset) is of unsupported type 3
08-02 15:43:04.394 E/CameraHALv3_4-METADATACOMMON(25769): V4L2Control:324: Control 10094874 (Scene Mode) is of unsupported type 3
08-02 15:43:04.394 E/CameraHALv3_4-METADATACOMMON(25769): V4L2Control:324: Control 9963807 (Color Effects) is of unsupported type 3
08-02 15:43:04.394 E/CameraHALv3_4-METADATACOMMON(25769): AddFormatComponents:65: YCrCb_420_SP(NV21) not supported by device.
08-02 15:43:04.410 D/        (25769): release AWIspApi, F:~AWIspApi, L:38
08-02 15:43:04.414 E/CameraHALv3_4-METADATACOMMON(25769): Connect:141: failed to open /dev/video2 (No such file or directory)
08-02 15:43:04.815 I/chatty  (25769): uid=1047(cameraserver) android.hardwar identical 2 lines
08-02 15:43:05.015 E/CameraHALv3_4-METADATACOMMON(25769): Connect:141: failed to open /dev/video2 (No such file or directory)
08-02 15:43:05.103 W/ServiceManagement( 1910): Waited one second for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0
08-02 15:43:05.104 I/ServiceManagement( 1910): getService: Trying again for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0...
08-02 15:43:05.119 W/ServiceManager(15703): Service media.camera didn't start. Returning NULL
08-02 15:43:05.119 W/CameraBase(15703): CameraService not published, waiting...
08-02 15:43:05.215 E/CameraHALv3_4-METADATACOMMON(25769): Connect:141: failed to open /dev/video2 (No such file or directory)

离线

楼主 #4 2024-08-06 17:03:19

542396750@qq.com
会员
注册时间: 2021-03-26
已发帖子: 163
积分: 19.5

Re: R818添加ov5640摄像头

varzhou 说:
542396750@qq.com 说:

感觉是相机的进程被系统杀死了,然后又重新启动进程

不用感觉,明显就是


抓了系统LOG日志,failed to open /dev/video2,系统莫名其妙去打开video2,实际上的节点只有video0和video1

离线

楼主 #5 2024-08-08 10:21:09

542396750@qq.com
会员
注册时间: 2021-03-26
已发帖子: 163
积分: 19.5

Re: R818添加ov5640摄像头

目前状况是把vinc1禁止掉就不会重复注册了,但是打开相机提示csi0 request pinctrl handle failed!

[10893.696845] [ov5640]s_fmt set width = 2592, height = 1936
[10893.704407] [VIN_ERR]__csi_pin_config:1 !
[10893.708926] [VIN_ERR]csi0 request pinctrl handle failed!
[10894.735264] [ov5640]sensor_s_stream on = 0, 2592*1936 3001
[10894.741560] [VIN_ERR]__csi_pin_config:0 !
[10894.746091] [VIN_ERR]csi0 request pinctrl handle failed!
[10894.753799] [ov5640]PWR_OFF!

关于csi0的board.dts配置
csi0:csi@0 {
                device_type = "csi0";
                compatible = "allwinner,sunxi-csi";
                reg = <0x0 0x02001000 0x0 0x1000>;
                interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
                pinctrl-names = "default", "sleep";
                //pinctrl-0 = <&csi0_pins_a>;
                //pinctrl-1 = <&csi0_pins_b>;
                device_id = <0>;
                iommus = <&mmu_aw 3 1>;
                status = "okay";
            };


原理图对应的是MCSIA,不知道哪里错了

离线

楼主 #6 2024-08-12 16:08:27

542396750@qq.com
会员
注册时间: 2021-03-26
已发帖子: 163
积分: 19.5

Re: R818添加ov5640摄像头

有个疑问,如果选择mipi_csi而不是csi parall
vinc0_csi_sel = <0xff>;
vinc0_mipi_sel = <0>;
还是
vinc0_csi_sel = <0>;
vinc0_mipi_sel = <0>;
这样?

离线

楼主 #7 2024-09-13 11:36:50

542396750@qq.com
会员
注册时间: 2021-03-26
已发帖子: 163
积分: 19.5

Re: R818添加ov5640摄像头

按照ov5640_mipi开发文档重新初始化设备,现在可以画面,但画面很暗,比如只能看到电脑显示屏内画面,周围都是黑蒙蒙一片,几乎看不见,配置参数都是按文档,不知道还需要调整哪一块

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn