Sorry to jump in thread, but since I’ve encountered the same kind of issue I’d rather share my experience.
I use a Raspberry Pi 4 Model B 2GB RAM, with the latest bullseye OS (based on Debian 11) installed with Raspbery Pi imager.
I followed the instructions from Arducam documentation.
In the first place, I’m pretty sure trying to capture a jpeg at 64 MP with libcamera-still was giving me a 16 MP image resolution. However navigating the forum and trying distinct content for /boot/config.txt
, it seems to finally capture a 64 MP jpeg with the following /boot/config.txt
content:
[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1
[all]
[pi4]
# Run as fast as firmware / board allows
arm_boost=1
dtoverlay=vc4-kms-v3d,cma-512
[all]
dtoverlay=arducam_64mp
And the following command:
libcamera-still -t 5000 --viewfinder-width 4576 --viewfinder-height 3472 --width 9152 --height 6944 --nopreview --denoise cdn_off -o test.jpg --autofocus
64 MP viewfinder frame (--viewfinder-width 9152 --viewfinder-height 6944
) fails to allocate buffers with the following output:
$ libcamera-still -t 5000 --viewfinder-width 9152 --viewfinder-height 6944 --width 9152 --height 6944 --nopreview --denoise cdn_off -o test.jpg --autofocus
[0:31:02.660908408] [2841] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3896-6019b245
[0:31:02.714240680] [2843] WARN CameraSensorProperties camera_sensor_properties.cpp:174 No static properties available for 'arducam_64mp'
[0:31:02.714298505] [2843] WARN CameraSensorProperties camera_sensor_properties.cpp:176 Please consider updating the camera sensor properties database
[0:31:02.735071052] [2843] WARN RPI raspberrypi.cpp:1280 Mismatch between Unicam and CamHelper for embedded data usage!
[0:31:02.736131444] [2843] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009a090a but control is not exposed by device /dev/v4l-subdev0
[0:31:02.736408123] [2843] INFO RPI raspberrypi.cpp:1404 Registered camera /base/soc/i2c0mux/i2c@1/arducam_64mp@1a to Unicam device /dev/media4 and ISP device /dev/media0
[0:31:02.737262565] [2841] INFO Camera camera.cpp:1035 configuring streams: (0) 9152x6944-YUV420
[0:31:02.737766265] [2843] INFO RPI raspberrypi.cpp:765 Sensor: /base/soc/i2c0mux/i2c@1/arducam_64mp@1a - Selected sensor format: 9152x6944-SBGGR10_1X10 - Selected unicam format: 9152x6944-pBAA
[0:31:02.944423332] [2843] ERROR V4L2 v4l2_videodevice.cpp:1234 /dev/video0[14:cap]: Unable to request 4 buffers: Cannot allocate memory
[0:31:02.944533389] [2843] ERROR RPI raspberrypi.cpp:1029 Failed to allocate buffers
ERROR: *** failed to start camera ***
And trying to output PNG (with 16 MP viewfinder frame) also fails to allocate buffers as well:
$ libcamera-still -t 5000 --viewfinder-width 4576 --viewfinder-height 3472 --width 9152 --height 6944 --nopreview --denoise cdn_off -e png -o test.png --autofocus
[0:34:55.114626972] [2960] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3896-6019b245
[0:34:55.176934723] [2962] WARN CameraSensorProperties camera_sensor_properties.cpp:174 No static properties available for 'arducam_64mp'
[0:34:55.176992253] [2962] WARN CameraSensorProperties camera_sensor_properties.cpp:176 Please consider updating the camera sensor properties database
[0:34:55.197377956] [2962] WARN RPI raspberrypi.cpp:1280 Mismatch between Unicam and CamHelper for embedded data usage!
[0:34:55.198388070] [2962] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009a090a but control is not exposed by device /dev/v4l-subdev0
[0:34:55.198656199] [2962] INFO RPI raspberrypi.cpp:1404 Registered camera /base/soc/i2c0mux/i2c@1/arducam_64mp@1a to Unicam device /dev/media4 and ISP device /dev/media0
[0:34:55.199411650] [2960] INFO Camera camera.cpp:1035 configuring streams: (0) 4576x3472-YUV420
[0:34:55.199940980] [2962] INFO RPI raspberrypi.cpp:765 Sensor: /base/soc/i2c0mux/i2c@1/arducam_64mp@1a - Selected sensor format: 4624x3472-SBGGR10_1X10 - Selected unicam format: 4624x3472-pBAA
[0:35:00.700270037] [2960] INFO Camera camera.cpp:1035 configuring streams: (0) 9152x6944-BGR888 (1) 9152x6944-SBGGR10_CSI2P
[0:35:00.724261634] [2962] INFO RPI raspberrypi.cpp:765 Sensor: /base/soc/i2c0mux/i2c@1/arducam_64mp@1a - Selected sensor format: 9152x6944-SBGGR10_1X10 - Selected unicam format: 9152x6944-pBAA
[0:35:01.118908858] [2962] ERROR V4L2 v4l2_videodevice.cpp:1234 /dev/video0[14:cap]: Unable to request 1 buffers: Cannot allocate memory
[0:35:01.119047904] [2962] ERROR RPI raspberrypi.cpp:1029 Failed to allocate buffers
ERROR: *** failed to start camera ***
I tried the alloc_in_cma_threshold=16
in /boot/cmdline.txt
and reboot but it does not fix the issue. However I think I obtained my first 64 MP resolution JPEG image after I added this option, but it still works although I removed it and reboot so…
Because it seems to work as I need I’ll not touch the config anymore. But I’ll have to setup 3 more Raspberry Pi 4 Model B 8GB RAM (with more RAM) with 3 others 64 MP arducam. So I’ll see how it goes and let you know.