Re: VIDIOC_QUERYCAP on v4l subdevice - v4l-subdev*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Claus,

On Tue, Nov 01, 2022 at 01:50:16PM +0100, claus.stovgaard@xxxxxxxxx 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.

>
> 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?
>

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 ?

> 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

>
> Regards
> Claus Stovgaard
>



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux