[PATCH v4] v4l2: Add support for interpreting remaining fields in VIDIOC_ENUMINPUT struct v4l2_input
Dmitry V. Levin
ldv at strace.io
Thu May 18 10:04:32 UTC 2023
On Thu, May 18, 2023 at 05:59:05AM +0200, Marek Vasut wrote:
> On 5/17/23 10:19, Dmitry V. Levin wrote:
> > On Wed, May 17, 2023 at 01:41:11AM +0200, Marek Vasut wrote:
> >> On 5/17/23 00:48, Dmitry V. Levin wrote:
> >>> On Sun, May 14, 2023 at 08:53:27PM +0200, Marek Vasut wrote:
> >>> [...]
> >>>> @@ -787,6 +790,19 @@ print_v4l2_input(struct tcb *const tcp, const kernel_ulong_t arg)
> >>>> tprint_struct_next();
> >>>> PRINT_FIELD_XVAL(i, type, v4l2_input_types,
> >>>> "V4L2_INPUT_TYPE_???");
> >>>> + tprint_struct_next();
> >>>> + PRINT_FIELD_X(i, audioset);
> >>>> + tprint_struct_next();
> >>>> + PRINT_FIELD_U(i, tuner);
> >>>
> >>> PRINT_FIELD_XVAL(i, tuner, v4l2_tuner_types, "V4L2_TUNER_???");
> >>
> >> I do not understand this feedback, sorry. Can you please provide any
> >> further details ?
> >>
> >> Note that the tuner field in struct v4l2_input is tuner _index_, not
> >> tuner type, in case this is what the suggestion is about .
> >
> > No problem, if struct v4l2_input.tuner is indeed an index and not an
> > enum v4l2_tuner_type, then I've just been confused by the corresponding
> > comment in include/uapi/linux/videodev2.h
>
> Which comment ? Have you got a line number for example ?
$ grep -nC5 'tuner;' include/uapi/linux/videodev2.h
1718-struct v4l2_input {
1719- __u32 index; /* Which input */
1720- __u8 name[32]; /* Label */
1721- __u32 type; /* Type of input */
1722- __u32 audioset; /* Associated audios (bitfield) */
1723: __u32 tuner; /* enum v4l2_tuner_type */
1724- v4l2_std_id std;
1725- __u32 status;
1726- __u32 capabilities;
1727- __u32 reserved[3];
1728-};
> The generated kerneldocs state the 'tuner' is an index:
> https://docs.kernel.org/userspace-api/media/v4l/vidioc-enuminput.html
--
ldv
More information about the Strace-devel
mailing list