VIDIOC_QUERYCAP on v4l subdevice - v4l-subdev*
Hi Folks.
I am working on a system based around the Intel Apollo Lake with an IPU4. The system is having a configuration with a number of subdevices. Going from v4l-subdev0 to v4-subdev10.
Running gst-device-monitor-1.0 results in a number of errors like.
GStreamer-CRITICAL **: 13:27:36.763:gst_element_message_full_with_details: assertion 'GST_IS_ELEMENT (element)' failed
The reason is because a VIDIOC_QUERYCAP on the subdevice fails.
Looking at the documentation
https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/vidioc-querycap.html
it states that "All V4L2 devices support the VIDIOC_QUERYCAP ioctl"
On the other hand VIDIOC_QUERYCAP is not part of the subset mentioned in documentation for V4L2 sub-device.
https://www.kernel.org/doc/html/latest/driver-api/media/v4l2-subdev.html
So is I correct that gstreamer has a bug in gst-device-monitor-1.0, and it should not try to use the VIDIOC_QUERYCAP ioctl for a sub-device?
It could be that gstreamer should just skip the sub-device.
Regards
Claus Stovgaard
Hi Claus,
Quoted 5 lines · On Tue, Nov 01, 2022 at 01:50:16PM +0100, [email protected] wrote:
Hi Folks.
I am working on a system based around the Intel Apollo Lake with an IPU4. The system is having a configuration with a number of subdevices. Going from v4l-subdev0 to v4-subdev10.
I premit that as far as I know IPU4 is not supported by mainline linux-media, the community that runs this mailing list. Your system is likely working with vendor provided drivers, hence the level of support you can get here might be limited by the fact you're running vendor's code which is not upstreamed and which we don't know much about.
Quoted 15 lines
Running gst-device-monitor-1.0 results in a number of errors like.
GStreamer-CRITICAL **: 13:27:36.763:
gst_element_message_full_with_details: assertion 'GST_IS_ELEMENT(element)' failedThe reason is because a
VIDIOC_QUERYCAPon the subdevice fails.Looking at the documentation
https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/vidioc-querycap.html
it states that "All V4L2 devices support the
VIDIOC_QUERYCAPioctl"
Quoted 8 lines
On the other hand
VIDIOC_QUERYCAPis not part of the subset mentioned in documentation for V4L2 sub-device.https://www.kernel.org/doc/html/latest/driver-api/media/v4l2-subdev.html
So is I correct that gstreamer has a bug in gst-device-monitor-1.0, and it should not try to use the
VIDIOC_QUERYCAPioctl for a sub-device?
Please provide a strace or a more complete log of the failure to help confirming what the actual issue is.
You're however correct that VIDIOC_QUERYCAP does not apply to subdevices as subdevices implement VIDIOC_SUBDEV_QUERYCAP
https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/vidioc-subdev-querycap.html
Now, the IPU4 is a complex camera system, which exposes many subdevices and cannot be operated by simply controlling only /dev/video0 as a simpler webcam does.
As far as I know gstreamer does not know how to handle the subdevices configuration and media graph linking. Could you please post the output of 'media-ctl -p' to show how many subdevs your pipeline is composed of ?
For mainline/upstream systems, libcamera is the library that handles the configuration of complex camera systems. It provides a gstreamer element as a replacement of the v4l2src element, and configures the media pipeline on behalf of applications. libcamera supports IPU3 but not IPU4 as there's no upstream driver support for these systems. I would guess that your vendor provides tools for you to operate the camera with their drivers infrastructure ?
Quoted 1 line
It could be that gstreamer should just skip the sub-device.
That I can't tell, but if you're not running some vendor specific gstreamer element I'm afraid it's quite unlikely things will work for you. Maybe, as you're not using gstreamer for capturing yet but only the device monitor, the device monitor is meant to be working regardless of the complex/non-complex camera you're operating. I suggest to check with the gstreamer community about that.
Thanks
j
Quoted 4 lines
Regards
Claus Stovgaard