Re: [RFC v3 02/19] media/v4l2-core: add new ioctl VIDIOC_G_DEF_EXT_CTRLS

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

 



Hello Hans, Sakari and Laurent:

I am back from holidays :). Shall I prepare a new patchset with the
suggestion from Hans?

Thanks!

On Mon, Jul 20, 2015 at 4:31 PM, Hans Verkuil <hverkuil@xxxxxxxxx> 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.
>
> 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.
>
> Regards,
>
>         Hans
>
>> What do you think?
>> --
>> 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
>>
>



-- 
Ricardo Ribalda
--
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



[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