I still do not understand what is going on.
At this RPI4 + imx219, if I run
$ v4l2-ctl -d /dev/video0 -X --verbose
VIDIOC_QUERYCAP: ok
VIDIOC_G_FMT: failed: Invalid argument
that seems pretty odd, as I imagined that the v4l2-ctl would query the current sensor format consistently.
but If I change that classical v4l kernel example (media/v4l/capture.c) and add bunch of printf when it queries the format
(by adding this else part:
/* Preserve original settings as set by v4l2-ctl for example */
if (-1 == xioctl(fd, VIDIOC_G_FMT, &fmt))
errno_exit("VIDIOC_G_FMT");
else {
printf("width=%d\n", fmt.fmt.pix.width);
printf("height=%d\n", fmt.fmt.pix.height);
printf("pixelformat=%X\n", fmt.fmt.pix.pixelformat);
printf("field=%d\n", fmt.fmt.pix.field);
printf("bytesperline=%d\n", fmt.fmt.pix.bytesperline);
printf("sizeimage=%d\n", fmt.fmt.pix.sizeimage);
printf("colorspace=%d\n", fmt.fmt.pix.colorspace);
printf("flags=%d\n", fmt.fmt.pix.flags);
}
)
then it does query and report the format left by the previous rpicam-hello run:
width=1640
height=1232
pixelformat=41414270
field=1
bytesperline=2080
sizeimage=2562560
colorspace=11
flags=0
Is there now any known problem with regard to v4l2-ctl and the state of the current unicam 6.6.74 driver, or my RPI4 is acting funny for some other reason?
At this RPI4 + imx219, if I run
$ v4l2-ctl -d /dev/video0 -X --verbose
VIDIOC_QUERYCAP: ok
VIDIOC_G_FMT: failed: Invalid argument
that seems pretty odd, as I imagined that the v4l2-ctl would query the current sensor format consistently.
but If I change that classical v4l kernel example (media/v4l/capture.c) and add bunch of printf when it queries the format
(by adding this else part:
/* Preserve original settings as set by v4l2-ctl for example */
if (-1 == xioctl(fd, VIDIOC_G_FMT, &fmt))
errno_exit("VIDIOC_G_FMT");
else {
printf("width=%d\n", fmt.fmt.pix.width);
printf("height=%d\n", fmt.fmt.pix.height);
printf("pixelformat=%X\n", fmt.fmt.pix.pixelformat);
printf("field=%d\n", fmt.fmt.pix.field);
printf("bytesperline=%d\n", fmt.fmt.pix.bytesperline);
printf("sizeimage=%d\n", fmt.fmt.pix.sizeimage);
printf("colorspace=%d\n", fmt.fmt.pix.colorspace);
printf("flags=%d\n", fmt.fmt.pix.flags);
}
)
then it does query and report the format left by the previous rpicam-hello run:
width=1640
height=1232
pixelformat=41414270
field=1
bytesperline=2080
sizeimage=2562560
colorspace=11
flags=0
Is there now any known problem with regard to v4l2-ctl and the state of the current unicam 6.6.74 driver, or my RPI4 is acting funny for some other reason?
Statistics: Posted by ivannaz — Mon Mar 03, 2025 2:46 pm