On Friday, November 25, 2011 11:53:52 Mauro Carvalho Chehab wrote:
> Em 22-11-2011 08:05, Hans Verkuil escreveu:
> > From: Hans Verkuil <[email protected]>
> >
> > Signed-off-by: Hans Verkuil <[email protected]>
> > ---
> > drivers/media/video/vivi.c | 5 +++--
> > 1 files changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c
> > index 7d754fb..84ea88d 100644
> > --- a/drivers/media/video/vivi.c
> > +++ b/drivers/media/video/vivi.c
> > @@ -819,8 +819,9 @@ static int vidioc_querycap(struct file *file, void
> > *priv,
> > strcpy(cap->driver, "vivi");
> > strcpy(cap->card, "vivi");
> > strlcpy(cap->bus_info, dev->v4l2_dev.name, sizeof(cap->bus_info));
> > - cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING | \
> > - V4L2_CAP_READWRITE;
> > + cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING |
> > + V4L2_CAP_READWRITE | V4L2_CAP_DEVICE_CAPS;
> > + cap->device_caps = cap->capabilities;
>
> Hmm... should V4L2_CAP_DEVICE_CAPS be present at both device_caps and
> capabilities?
Good question. It doesn't feel right to me to add it to device_caps: it
really doesn't mean anything there.
The whole point is to have device_caps only show the capabilities
of that device node. V4L2_CAP_DEVICE_CAPS is a capability of the whole
physical device, so I don't believe it should be set in device_caps.
>
> IMHO, the better would be to do:
>
> cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING |
> V4L2_CAP_READWRITE | V4L2_CAP_DEVICE_CAPS;
> cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
>
> Btw, this ambiguity should also be solved at the V4L2 spec.
I will update the docs, once we agree on this.
Regards,
Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html