Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync src/v4l_id/v4l_id.c #202

Merged
merged 1 commit into from Oct 16, 2021
Merged

sync src/v4l_id/v4l_id.c #202

merged 1 commit into from Oct 16, 2021

Conversation

bbonev
Copy link
Member

@bbonev bbonev commented Sep 19, 2021

Author: Michael Olbrich m.olbrich@pengutronix.de
Date: Sun Feb 3 10:52:02 2019 +0100

v4l_id: use device_caps if available

According to the specification[1] the 'capabilities' describe the physical
device as a whole and the 'device_caps' describe the current device node.
The existence of 'device_caps' is indicated by the V4L2_CAP_DEVICE_CAPS
capability flag.
Use the 'device_caps' if available to generate the correct
ID_V4L_CAPABILITIES for the current device node.

This is relevant for UVC devices with current kernels: Two /dev/videoX
devices exist for those. One for video and one for metadata. The
V4L2_CAP_VIDEO_CAPTURE flag is present in the 'capabilities' for both
device nodes but only in the 'device_caps' of the video device node.

Without this, the ID_V4L_CAPABILITIES of the metadata device node
incorrectly contains 'capture'.

[1] https://www.linuxtv.org/downloads/v4l-dvb-apis-new/uapi/v4l/vidioc-querycap.html

systemd-commit: 646876105fe1799355715839477958adf1d096fd

According to the specification[1] the 'capabilities' describe the physical
device as a whole and the 'device_caps' describe the current device node.
The existence of 'device_caps' is indicated by the V4L2_CAP_DEVICE_CAPS
capability flag.
Use the 'device_caps' if available to generate the correct
ID_V4L_CAPABILITIES for the current device node.

This is relevant for UVC devices with current kernels: Two /dev/videoX
devices exist for those. One for video and one for metadata. The
 V4L2_CAP_VIDEO_CAPTURE flag is present in the 'capabilities' for both
device nodes but only in the 'device_caps' of the video device node.

Without this, the ID_V4L_CAPABILITIES of the metadata device node
incorrectly contains 'capture'.

[1] https://www.linuxtv.org/downloads/v4l-dvb-apis-new/uapi/v4l/vidioc-querycap.html

systemd-commit: 646876105fe1799355715839477958adf1d096fd
Author: Michael Olbrich <m.olbrich@pengutronix.de>
Date:   Sun Feb 3 10:52:02 2019 +0100
@bbonev bbonev merged commit 9375a4e into eudev-project:master Oct 16, 2021
@bbonev bbonev deleted the s1v4l branch April 6, 2022 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants