Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5075

Camera board • Re: Recording 4k with raspberry pi5 and HQ Camera

$
0
0
Dear Sirs.

I just read this thread.
We still have some inventory of IMX258 module and the board which support mipi 4lane mode.
Because the cam_helper can be ported from cam_helper_imx477.cpp by changing the gain control portion,
and the .json file can be from imx219 because they are very similar characteristics.

(cam_helper_imx258.cpp)

Code:

uint32_t CamHelperImx258::gainCode(double gain) const{        return static_cast<uint32_t>(256 - 256 / gain);        //return static_cast<uint32_t>(1024 - 1024 / gain);}double CamHelperImx258::gain(uint32_t gainCode) const{        return 256.0 / (256 - gainCode);        //return 1024.0 / (1024 - gainCode);}
With the code, I can see the image from IMX258 in 2 lane mode on RPi4.

As mentioned above, I can find imx258.dtbo in /boot/firmware/overlays, I can see the imx258 is on the list-cameras after building the libcamera and rpicam-apps on RPi5.
But I cannot see the image, the error occurs as below.

Code:

pi@Pi5BW64:~ $ libcamera-hello --list-camerasAvailable cameras-----------------0 : imx258 [4208x3120 10-bit RGGB] (/base/axi/pcie@120000/rp1/i2c@88000/imx258@10)    Modes: 'SRGGB10_CSI2P' : 1048x780 [56.85 fps - (0, 0)/4208x3120 crop]                             2104x1560 [30.14 fps - (0, 0)/4208x3120 crop]                             4208x3120 [15.08 fps - (0, 0)/4208x3120 crop]1 : t4k37 [4208x3120 10-bit RGGB] (/base/axi/pcie@120000/rp1/i2c@80000/t4k37@36)    Modes: 'SRGGB10_CSI2P' : 4208x3120 [15.08 fps - (0, 0)/4208x3120 crop]pi@Pi5BW64:~ $ libcamera-hello -t 0 --camera 0[0:00:53.464891504] [1726]  INFO Camera camera_manager.cpp:284 libcamera v0.2.0+47-46b868fe-dirty (2024-06-07T00:01:25-07:00)[0:00:53.476020615] [1727]  INFO RPI pisp.cpp:662 libpisp version v1.0.4 6e3a53d137f4 06-04-2024 (19:50:02)[0:00:53.489601726] [1727]  INFO RPI pisp.cpp:1121 Registered camera /base/axi/pcie@120000/rp1/i2c@88000/imx258@10 to CFE device /dev/media0 and ISP device /dev/media2 using PiSP variant BCM2712_C0[0:00:53.489688226] [1727]  INFO RPI pisp.cpp:662 libpisp version v1.0.4 6e3a53d137f4 06-04-2024 (19:50:02)[0:00:53.490203170] [1727]  WARN CameraSensor camera_sensor.cpp:248 't4k37 4-0036': Recommended V4L2 control 0x009a0922 not supported[0:00:53.490224004] [1727]  WARN CameraSensor camera_sensor.cpp:315 't4k37 4-0036': The sensor kernel driver needs to be fixed[0:00:53.490233578] [1727]  WARN CameraSensor camera_sensor.cpp:317 't4k37 4-0036': See Documentation/sensor_driver_requirements.rst in the libcamera sources for more information[0:00:53.490451041] [1727]  WARN CameraSensorProperties camera_sensor_properties.cpp:274 No static properties available for 't4k37'[0:00:53.490463059] [1727]  WARN CameraSensorProperties camera_sensor_properties.cpp:276 Please consider updating the camera sensor properties database[0:00:53.490473022] [1727]  WARN CameraSensor camera_sensor.cpp:463 't4k37 4-0036': Failed to retrieve the camera location[0:00:53.490481948] [1727]  WARN CameraSensor camera_sensor.cpp:485 't4k37 4-0036': Rotation control not available, default to 0 degrees[0:00:53.499418355] [1727]  INFO RPI pisp.cpp:1121 Registered camera /base/axi/pcie@120000/rp1/i2c@80000/t4k37@36 to CFE device /dev/media1 and ISP device /dev/media3 using PiSP variant BCM2712_C0Made X/EGL preview windowMode selection for 2104:1560:12:P    SRGGB10_CSI2P,1048x780/0 - Score: 4687.38    SRGGB10_CSI2P,2104x1560/0 - Score: 1000    SRGGB10_CSI2P,4208x3120/0 - Score: 1916Stream configuration adjusted[0:00:54.227350373] [1726]  INFO Camera camera.cpp:1183 configuring streams: (0) 2104x1560-YUV420 (1) 2104x1560-BGGR16_PISP_COMP1[0:00:54.227495244] [1727]  INFO RPI pisp.cpp:1405 Sensor: /base/axi/pcie@120000/rp1/i2c@88000/imx258@10 - Selected sensor format: 2104x1560-SBGGR10_1X10 - Selected CFE format: 2104x1560-PC1B[0:00:54.227547781] [1727] ERROR V4L2 v4l2_subdevice.cpp:550 'imx258 6-0010': Unable to get format on pad 1: Invalid argument[0:00:54.244482096] [1727] ERROR V4L2 v4l2_videodevice.cpp:1906 /dev/video12[16:cap]: Failed to start streaming: Invalid argumentERROR: *** failed to start camera ***
OS is Bookworm.

Code:

pi@Pi5BW64:~/libcamera/src/ipa/rpi/cam_helper $ uname -aLinux Pi5BW64 6.6.28+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.28-1+rpt1 (2024-04-22) aarch64 GNU/Linux
It would be great if 6by9-san (or someone) can tell me the root cause of this error to fix it.
After succeeding in showing the image in 2lane mode on RPi5, I think I can switch to 4lane mode because the driver supports 4lane mode.
Actually I can show the image from IMX585 in 4lane mode on RPi5 already thanks to the help by will127534 and OCTOPUS CINEMA.
https://octopuscinema.com/

sohonomura2020

Statistics: Posted by sohonomura2020 — Fri Jun 07, 2024 8:34 am



Viewing all articles
Browse latest Browse all 5075

Trending Articles