Hello! If short: where i can get 3A calibration files for IMX219 for correct version for this board?
If detailed… I have Rock 3A board and IMX219 Raspberry Pi 2.1 sensor. Use Debian image. Obviously, without the 3A service, I have green and dark photos, and the camera cannot be used. There is no build-in automatic 3A in this camera, unlike the ov5647 camera. My kernel version 4.19.193-56-rockchip-gf62b47f70096, In this kernel used ISP 2.1 version. And at all in kernels for RK356* CPU used ISP 2.1.
I can found 2 package in Raxda Debian repository.
rkisp-engine - here has 3A service for version 1.x, and it is not fit for 2.1, and here has calibration for IMX219 sensor, but in old format, and i do not know where i can get sources of this package (i think for RK3399 Rock Pi4 this package)?
camera-engine-rkaiq - here has also 3A service, for version 2.1, but it service not working, becouse compiled with differnt version kernel “rk-camera-module.h” header file, and seems with other differnces (i think it is for Rock Pi5), i also do not know where can i get sources of this package…
Then I started looking for something from other manufacturers, in particular FireFly.
There is a correct version of the service here, however for a newer kernel than the one used in Rock PI3 at the moment, the difference in rk-camera-module.h. Then, i replace this file in original kernel sources. Now it normal process, IOCTL RKMODULE_GET_MODULE_INFO and now it can find correct file of JSON, in correct path…
Next problem it is IOCTL call in VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL, to fix it i change call, in imx219.c:
static int imx219_enum_frame_interval(struct v4l2_subdev *sd,
struct v4l2_subdev_pad_config *cfg,
struct v4l2_subdev_frame_interval_enum *fie)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
struct imx219 *priv = to_imx219(client);
if (fie->index >= priv->cfg_num)
return -EINVAL;
// if (fie->code != MEDIA_BUS_FMT_SRGGB10_1X10)
// return -EINVAL;
fie->code = MEDIA_BUS_FMT_SRGGB10_1X10;
fie->width = supported_modes[fie->index].width;
fie->height = supported_modes[fie->index].height;
fie->interval = supported_modes[fie->index].max_fps;
fie->reserved[0] = NO_HDR;
return 0;
}
and now i have fixed both errors: Get sensor module info failed
, and this: Enum sensor frame interval failed
, errors, not happened anymore, victory!
I try this rkaiq_3A_server from FireFly rposytory/firmware (i also was able to build it from sources), with calibration gc2093_default_JX8006.json
, and it working, images is not green! (rkaiq_3A_server from camera-engine-rkaiq
- from radxa repo still not working).
But calibration is wrong, with low lights images is dark. And camera can working only in 1920x1080 resolution, because other is not supported in this calibration file.
I attach here patch to commit e1d21c3a8bea69ff0cf38f9e01b6a3e5f75fcb66 of kernel https://drive.google.com/file/d/1iqQS0OQphueTrutn5n3YntUgledsRhrK/view?usp=sharing
I also found in FireFlay repository converter from RKISP 1.0 to 2.0 and 2.1 format, tools\iqConverTer
and try to converter, but get a lot errors, in parsing imx219_rpi-camera-v2_default.xml
file and it is not success ( https://drive.google.com/file/d/1iqQS0OQphueTrutn5n3YntUgledsRhrK/view?usp=sharing )… Also here has RKISP2x_Tuner_v2.0.3_Alpha_Release
and calibration server, which would allow to calibrate the camera from scratch.
It seems to me that such camera support is a disaster. Most users will not be able to handle this. Or do I not understand something?.. Maybe someone can help me… In general, where can I get the correct imx219_rpi-camera-v2_default.json
?