Hi Hans, I like your proposal, and especially how it would integrate with the requests API. Should we give the requests API a try to make sure your proposal works fine with it ? As a side note, I'll need to requests API for Renesas. The current schedule is to have a first RFC implementation by the end of October. On Monday 20 July 2015 16:31:22 Hans Verkuil wrote: > On 07/20/2015 03:52 PM, Ricardo Ribalda Delgado wrote: > > Hello > > > > I have no preference over the two implementations, but I see an issue > > with this suggestion. > > > > What happens to out out tree drivers, or drivers that don't support > > this functionality? > > > > With the ioctl, the user receives a -ENOTTY. So he knows there is > > something wrong with the driver. > > > > With this class, the driver might interpret this a simple G_VAL and > > return he current value with no way for the user to know what is going > > on. > > Drivers that implement the current API correctly will return an error > if V4L2_CTRL_WHICH_DEF_VAL was specified. Such drivers will interpret > the value as a control class, and no control classes in that range exist. > See also class_check() in v4l2-ctrls.c. > > The exception here is uvc which doesn't have this class check and it will > just return the current value :-( > > I don't see a way around this, unfortunately. The rationale for implementing VIDIOC_G_DEF_EXT_CTRLS was to get the default value of controls that don't fit in 32 bits. uvcvideo doesn't have any such control, so I don't think we really need to care. Of course newer versions of the uvcvideo driver should implement the new API. > Out-of-tree drivers that use the control framework are fine, and I don't > really care about drivers (out-of-tree or otherwise) that do not use the > control framework. > > > Regarding the new implementation.... I can make some code next week, > > this week I am 120% busy :) > > Wait until there is a decision first :-) > > It's not a lot of work, I think. I think I like your proposal better than VIDIOC_G_DEF_EXT_CTRLS, so seeing an implementation would be nice. -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html