Speed of capture on 4*64mp board

  1. Where did you get the camera module(s)?
    Arducam direct

  2. Model number of the product(s)?

  3. What hardware/platform were you working on?
    RPi 4 w/ Raspberry Pi OS

  4. Instructions you have followed. (link/manual/etc.)
    64MP Autofocus Quad Camera Kit Manual (arducam.com)

  5. Problems you were having?
    Speed of capture

  6. The dmesg log from your hardware?

[  551.036337] ------------[ cut here ]------------
[  551.036341] WARNING: CPU: 3 PID: 889 at mm/page_alloc.c:5380 __alloc_pages+0x2d0/0x330
[  551.036357] Modules linked in: cmac algif_hash aes_arm64 algif_skcipher af_alg bnep hci_uart btbcm bluetooth ecdh_generic ecc 8021q garp stp llc arducam_64mp(O) dw9807_vcm(O) snd_soc_hdmi_codec vc4 cec brcmfmac brcmutil drm_kms_helper raspberrypi_hwmon snd_soc_core bcm2835_unicam cfg80211 bcm2835_isp(C) bcm2835_codec(C) bcm2835_v4l2(C) v4l2_dv_timings snd_compress v3d v4l2_fwnode v4l2_mem2mem bcm2835_mmal_vchiq(C) snd_bcm2835(C) v4l2_async videobuf2_vmalloc i2c_mux_pinctrl videobuf2_dma_contig rfkill i2c_mux snd_pcm_dmaengine videobuf2_memops i2c_brcmstb gpu_sched videobuf2_v4l2 snd_pcm vc_sm_cma(C) videobuf2_common videodev snd_timer mc i2c_bcm2835 snd rpivid_mem syscopyarea nvmem_rmem sysfillrect sysimgblt fb_sys_fops uio_pdrv_genirq uio i2c_dev drm drm_panel_orientation_quirks fuse backlight ip_tables x_tables ipv6
[  551.036507] CPU: 3 PID: 889 Comm: libcamera-still Tainted: G         C O      5.15.32-v8+ #1538
[  551.036514] Hardware name: Raspberry Pi 4 Model B Rev 1.2 (DT)
[  551.036518] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  551.036524] pc : __alloc_pages+0x2d0/0x330
[  551.036530] lr : __dma_direct_alloc_pages+0x168/0x1b0
[  551.036537] sp : ffffffc00a1ab880
[  551.036540] x29: ffffffc00a1ab880 x28: ffffff8043f07c60 x27: ffffffc00a1abb58
[  551.036549] x26: 0000000000000001 x25: ffffffc008115144 x24: 0000000000000000
[  551.036558] x23: 0000000004bde000 x22: 0000000000000cc1 x21: ffffffc008e8a9c8
[  551.036566] x20: ffffff80401dd010 x19: ffffffc008e8a9c8 x18: 0000000000000001
[  551.036574] x17: 202c736567617020 x16: 3232343931203a65 x15: 7a69732d71657220
[  551.036582] x14: 2c64656c69616620 x13: 32312d203a746572 x12: ffffffc0093a6670
[  551.036589] x11: 0000000000000003 x10: ffffffc00938e630 x9 : ffffffc008115788
[  551.036597] x8 : 0000000000017fe8 x7 : c0000000ffffefff x6 : ffffff80f7be6908
[  551.036605] x5 : 0000000000000001 x4 : 000000000000003f x3 : 0000000000000000
[  551.036613] x2 : 0000000000000000 x1 : 000000000000000f x0 : 0000000000000cc1
[  551.036621] Call trace:
[  551.036623]  __alloc_pages+0x2d0/0x330
[  551.036629]  __dma_direct_alloc_pages+0x168/0x1b0
[  551.036635]  dma_direct_alloc+0x7c/0x330
[  551.036639]  dma_alloc_attrs+0xac/0xc0
[  551.036644]  vb2_dc_alloc+0x70/0x130 [videobuf2_dma_contig]
[  551.036656]  __vb2_queue_alloc+0x220/0x488 [videobuf2_common]
[  551.036672]  vb2_core_reqbufs+0x288/0x480 [videobuf2_common]
[  551.036685]  vb2_ioctl_reqbufs+0x8c/0xc8 [videobuf2_v4l2]
[  551.036696]  v4l_reqbufs+0x54/0x68 [videodev]
[  551.036734]  __video_do_ioctl+0x188/0x410 [videodev]
[  551.036764]  video_usercopy+0x310/0x7d0 [videodev]
[  551.036793]  video_ioctl2+0x20/0x38 [videodev]
[  551.036823]  v4l2_ioctl+0x48/0x68 [videodev]
[  551.036852]  __arm64_sys_ioctl+0xb0/0xf0
[  551.036859]  invoke_syscall+0x4c/0x110
[  551.036866]  el0_svc_common.constprop.3+0xfc/0x120
[  551.036871]  do_el0_svc+0x2c/0x90
[  551.036876]  el0_svc+0x24/0x60
[  551.036882]  el0t_64_sync_handler+0x90/0xb8
[  551.036888]  el0t_64_sync+0x1a0/0x1a4
[  551.036893] ---[ end trace b45d08f601eb9235 ]---
[  551.036900] unicam fe801000.csi: dma_alloc_coherent of size 79552512 failed
  1. Troubleshooting attempts you’ve made?
    Read manuals and changed resolution
  2. What help do you need?

I’ve got the 4 * 6MP autofocus and compiled it and everything is working fine. I can execute to get the image however it is quite slow. The output from a time command is below:

[email protected]:~ $ time libcamera-still -n --viewfinder-width 2312 --viewfinder-height 1736
[43:24:44.179766890] [3078]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3572-e13ccdd5
[43:24:44.189743458] [3079]  WARN CameraSensorProperties camera_sensor_properties.cpp:163 No static properties available for 'arducam_64mp'
[43:24:44.189825031] [3079]  WARN CameraSensorProperties camera_sensor_properties.cpp:165 Please consider updating the camera sensor properties database
[43:24:44.190445134] [3079] ERROR CameraSensor camera_sensor.cpp:591 'arducam_64mp 10-001a': Camera sensor does not support test pattern modes.
[43:24:44.231074619] [3079]  WARN RPI raspberrypi.cpp:1263 Mismatch between Unicam and CamHelper for embedded data usage!
[43:24:44.232156752] [3079] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009a090a but control is not exposed by device /dev/v4l-subdev0
[43:24:44.232487600] [3079]  INFO RPI raspberrypi.cpp:1386 Registered camera /base/soc/i2c0mux/[email protected]/[email protected] to Unicam device /dev/media0 and ISP device /dev/media3
[43:24:44.233734860] [3078]  INFO Camera camera.cpp:1029 configuring streams: (0) 2312x1736-YUV420
[43:24:44.234426462] [3079]  INFO RPI raspberrypi.cpp:764 Sensor: /base/soc/i2c0mux/[email protected]/[email protected] - Selected sensor format: 2312x1736-SBGGR10_1X10 - Selected unicam format: 2312x1736-pBAA

real    0m5.494s
user    0m0.162s
sys     0m0.127s

It seems to be a consistent ~5.5 seconds regardless of the resolution; note that I’m not writing the image to disk. I’m trying to understand where the time is taken up here; is it transferring the image to the RPi from the quad HAT or is it the Quad HAT? When running for real I’ll just be setting the camera up once and then leaving it open - would that be quicker? I’m looking for a capture rate of ~1 second, is that realistic from this device?

Thanks for your help - the device itself is great; I just need a bit more speed on the capture.



Due to the RPI CSI interface data bandwidth limit. the sensor’s source framerate is very slow in order to make sure the CSI controller can receive normally. But the 5s is too long. I want to know how do you measure the time? Which command you are using?


At first I just used a stop watch but as you can see above I used the bash ‘time’ command. Note that I’m not running libcamera-vid but using libcamera-still.



It seems if you have not set the -t parameter, the default time is 5s, Have you tried to add -t 1000 to retry?