Problem regarding raspberry pi camera on Rock pi 4b

1.) Previously i purchased Raspberry pi 1.3 camera and it was having OV5647 sensor module , i enabled OV5476 and disabled imx219 in /boot/hw_intfc.conf file but it not worked, it gave me error

linaro@linaro-alip:~$ test_camera-rkisp1.sh

Start RKISP Camera Preview!
Password:
Setting pipeline to PAUSED …
libGL error: MESA-LOADER: failed to retrieve device information
libGL error: unable to load driver: rockchip_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: rockchip
libGL error: MESA-LOADER: failed to retrieve device information
libGL error: unable to load driver: rockchip_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: rockchip
Caught SIGSEGV
exec gdb failed: No such file or directory
Spinning. Please run ‘gdb gst-launch-1.0 1893’ to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.

I was unable to solve the error , i downloaded mesa utils still getting same error , so i decided to change sensor
I purchased another Raspberry pi 1.3 version sensor , but still got the same error.
So I decided to purchase Raspberry 2.1 camera module ,with IMX219 sensor.
2.) I Purchased Raspberry pi 2.1 camera module having IMX219 sensor , I enabled IMX219 and disabled OV5476 in /boot/hw_intfc.conf file, and runned the command again test_camera-rkisp1.sh,
Here i am facing the mesa loader error again same as above but aferwards it disappear and it is just generating a dark screen and nothing else , when i close the screen i get the error

buffers are being dropped.
Additional debug info:
gstbasesink.c(2834): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage/GstGLImageSink:sink:
There may be a timestamping problem, or this computer is too slow.
WARNING: from element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage/GstGLImageSink:sink: A lot of buffers are being dropped.
Additional debug info:
gstbasesink.c(2834): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage/GstGLImageSink:sink:
There may be a timestamping problem, or this computer is too slow.
WARNING: from element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage/GstGLImageSink:sink: A lot of buffers are being dropped.
Additional debug info:
gstbasesink.c(2834): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage/GstGLImageSink:sink:
There may be a timestamping problem, or this computer is too slow.

What to do??

Hi,

Which image are you using?

I am using debian os buster version

Please try with the Debian Stretch Desktop version:

https://dl.radxa.com/rockpi4/images/debian/rockpi4c_debian_stretch_desktop_arm64_20200716_0647-gpt.img.gz

Use the imx219 first, send the boot log. if the test_camera-rkisp1.sh doesn’t work. Send the output of media-ctl -p

1 Like

I think your LINK(https://dl.radxa.com/rockpi4/images/debian/rockpi4c_debian_stretch_desktop_arm64_20200716_0647-gpt.img.gz) is for rockpi-4c-platform. Which image file should be downloaded if I’m using the 4b-platform?
And could you share us your testing environment when using raspi-camera-v1.0(ov5647) ?

Your linked img:

root@linaro-alip:/home/linaro# dmesg | grep imx
[    2.556103] imx219 4-0010: GPIO lookup for consumer pwdn
[    2.556115] imx219 4-0010: using device tree for GPIO lookup
[    2.605140] imx219 4-0010: Model ID 0x0219, Lot ID 0x1c8b77, Chip ID 0x087c

root@linaro-alip:/home/linaro# test_camera-rkisp1.sh
Start RKISP Camera Preview!
Setting pipeline to PAUSED ...
libGL error: MESA-LOADER: failed to retrieve device information
libGL error: unable to load driver: rockchip_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: rockchip
libGL error: MESA-LOADER: failed to retrieve device information
libGL error: unable to load driver: rockchip_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: rockchip
XCAM ERROR rkisp_control_loop_impl.cpp:92: get isp version failed !
XCAM ERROR rkisp_control_loop_impl.cpp:146: failed to get camera module info
XCAM ERROR rkisp_control_loop_impl.cpp:332: failed to get cam module info
XCAM ERROR rkisp_control_loop_impl.cpp:378: rkisp_cl_start: invalid cl state 0
Pipeline is live and does not need PREROLL ...
Got context from element 'autovideosink0': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0";
Setting pipeline to PLAYING ...
New clock: GstSystemClock
WARNING: from element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage/GstGLImageSink:sink: A lot of buffers are being dropped.
Additional debug info:
gstbasesink.c(2834): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage/GstGLImageSink:sink:
There may be a timestamping problem, or this computer is too slow.
WARNING: from element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage/GstGLImageSink:sink: A lot of buffers are being dropped.
Additional debug info:
gstbasesink.c(2834): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage/GstGLImageSink:sink:
There may be a timestamping problem, or this computer is too slow.
WARNING: from element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage/GstGLImageSink:sink: A lot of buffers are being dropped.
Additional debug info:
gstbasesink.c(2834): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage/GstGLImageSink:sink:
There may be a timestamping problem, or this computer is too slow.
WARNING: from element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstGLImageSinkBin:autovideosink0-actual-sink-glimage/GstGLImageSink:sink: A lot of buffers are being dropped.

but with linaro user:

linaro@linaro-alip:~$ test_camera-rkisp1.sh
Start RKISP Camera Preview!
Password:
Setting pipeline to PAUSED ...
XCAM ERROR rkisp_control_loop_impl.cpp:92: get isp version failed !
XCAM ERROR rkisp_control_loop_impl.cpp:146: failed to get camera module info
XCAM ERROR rkisp_control_loop_impl.cpp:332: failed to get cam module info
XCAM ERROR rkisp_control_loop_impl.cpp:378: rkisp_cl_start: invalid cl state 0
Pipeline is live and does not need PREROLL ...
Got context from element 'autovideosink0': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0";
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^C

Shows black screen.

You say, want media-ctl -p output:

linaro@linaro-alip:~$ media-ctl -p
-bash: media-ctl: command not found
linaro@linaro-alip:~$ sudo media-ctl -p
sudo: media-ctl: command not found
linaro@linaro-alip:~$ sudo apt-get install media-ctl
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package media-ctl is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  v4l-utils

E: Package 'media-ctl' has no installation candidate

… after install v4l-utils:

linaro@linaro-alip:~$ sudo media-ctl -p
Media controller API version 0.1.0

Media device information
------------------------
driver          rkisp1
model           rkisp1
serial
bus info
hw revision     0x0
driver version  0.0.0

Device topology
- entity 1: rkisp1-isp-subdev (4 pads, 5 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev0
        pad0: Sink
                [fmt:SBGGR10_1X10/800x600 field:none
                 crop.bounds:(0,0)/800x600
                 crop:(0,0)/800x600]
                <- "rockchip-sy-mipi-dphy":1 [ENABLED]
        pad1: Sink
                <- "rkisp1-input-params":0 [ENABLED]
        pad2: Source
                [fmt:YUYV8_2X8/800x600 field:none
                 crop.bounds:(0,0)/800x600
                 crop:(0,0)/800x600]
                -> "rkisp1_selfpath":0 [ENABLED]
                -> "rkisp1_mainpath":0 [ENABLED]
        pad3: Source
                -> "rkisp1-statistics":0 [ENABLED]

- entity 2: rkisp1_mainpath (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video0
        pad0: Sink
                <- "rkisp1-isp-subdev":2 [ENABLED]

- entity 3: rkisp1_selfpath (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video1
        pad0: Sink
                <- "rkisp1-isp-subdev":2 [ENABLED]

- entity 4: rkisp1-statistics (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video2
        pad0: Sink
                <- "rkisp1-isp-subdev":3 [ENABLED]

- entity 5: rkisp1-input-params (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video3
        pad0: Source
                -> "rkisp1-isp-subdev":1 [ENABLED]

- entity 6: rockchip-sy-mipi-dphy (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev1
        pad0: Sink
                [fmt:SRGGB10_1X10/1920x1080 field:none]
                <- "imx219 4-0010":0 [ENABLED]
        pad1: Source
                [fmt:SRGGB10_1X10/1920x1080 field:none]
                -> "rkisp1-isp-subdev":0 [ENABLED]

- entity 7: imx219 4-0010 (1 pad, 1 link)
            type V4L2 subdev subtype Sensor flags 0
            device node name /dev/v4l-subdev2
        pad0: Source
                [fmt:SRGGB10_1X10/1920x1080 field:none]
                -> "rockchip-sy-mipi-dphy":0 [ENABLED]

Default layout, with imx219 enabled:

root@linaro-alip:/home/linaro# grep "^[^#*/;]" /boot/hw_intfc.conf
intfc:pwm0=off
intfc:pwm1=off
intfc:uart2=off
intfc:uart4=off
intfc:spi1=on
intfc:spi2=off
intfc:i2c2=off
intfc:i2c6=off
intfc:i2c7=off
intfc:dtoverlay=console-on-ttyS2
intfc:dtoverlay=spi1-flash
intfc:dtoverlay=imx219

Is there a linux kernel/distrib version/status when the imx/ov camera really worked as radxa wiki says?