All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	linux-media <linux-media@vger.kernel.org>
Subject: Re: [RFC v3 02/19] media/v4l2-core: add new ioctl VIDIOC_G_DEF_EXT_CTRLS
Date: Thu, 20 Aug 2015 14:34:02 +0200	[thread overview]
Message-ID: <55D5C93A.6010405@xs4all.nl> (raw)
In-Reply-To: <1822611.kBQQQkHzQk@avalon>

On 08/20/15 00:19, Laurent Pinchart wrote:
> 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 ?

To be honest, I don't see what there is to test. Request IDs have their own range
and there is no conflict there. Easiest for me is to rebase my request patch series
on top of Ricardo's patch series that implements this. That should be pretty quick
to do.

Ricardo, just go ahead with this and I'll take care of rebasing the request patch
series on top of it once you're done. I'll probably do that as part of my review
of your new patch series once it is posted.

> 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.

Cool. I'd like to get this in! Please involve me if there are any questions you
have or work that you want me to do on the request API to improve it.

Regards,

	Hans

> 
> 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.
> 

  reply	other threads:[~2015-08-20 12:36 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-12 16:46 [RFC v3 00/19] New ioct VIDIOC_G_DEF_EXT_CTRLS Ricardo Ribalda Delgado
2015-06-12 16:46 ` [RFC v3 01/19] media/v4l2-core: Add argument def_value to g_ext_ctrl Ricardo Ribalda Delgado
2015-06-12 16:46 ` [RFC v3 02/19] media/v4l2-core: add new ioctl VIDIOC_G_DEF_EXT_CTRLS Ricardo Ribalda Delgado
2015-07-17  7:13   ` Sakari Ailus
2015-07-17  7:38     ` Hans Verkuil
2015-07-17  7:44     ` Ricardo Ribalda Delgado
2015-07-20 13:37   ` Hans Verkuil
2015-07-20 13:52     ` Ricardo Ribalda Delgado
2015-07-20 14:31       ` Hans Verkuil
2015-08-10 12:04         ` Ricardo Ribalda Delgado
2015-08-19 13:24           ` Ricardo Ribalda Delgado
2015-08-19 22:19         ` Laurent Pinchart
2015-08-20 12:34           ` Hans Verkuil [this message]
2015-06-12 16:46 ` [RFC v3 03/19] videodev2.h: Fix typo in comment Ricardo Ribalda Delgado
2015-06-12 16:46 ` [RFC v3 04/19] media/usb/uvc: Implement vivioc_g_def_ext_ctrls Ricardo Ribalda Delgado
2015-07-13 12:10   ` Hans Verkuil
2015-07-15 21:05   ` Laurent Pinchart
2015-07-16  7:38     ` Hans Verkuil
2015-07-16  8:11       ` Laurent Pinchart
2015-07-16  8:23         ` Hans Verkuil
2015-07-16  8:27           ` Laurent Pinchart
2015-07-16  8:36             ` Hans Verkuil
2015-07-16  8:41             ` Ricardo Ribalda Delgado
2015-06-12 16:46 ` [RFC v3 05/19] media/pci/saa7164-encoder: " Ricardo Ribalda Delgado
2015-06-12 16:46 ` [RFC v3 06/19] media/pci/saa7164-vbi: " Ricardo Ribalda Delgado
2015-06-12 16:46 ` [RFC v3 07/19] media/usb/prusb2: " Ricardo Ribalda Delgado
2015-06-12 16:46 ` [RFC v3 08/19] v4l2-subdev: Add g_def_ext_ctrls to core_ops Ricardo Ribalda Delgado
2015-06-12 16:46 ` [RFC v3 09/19] media/i2c/bt819: Implement g_def_ext_ctrls core_op Ricardo Ribalda Delgado
2015-06-12 16:46 ` [RFC v3 10/19] media/i2c/cs53l32a: " Ricardo Ribalda Delgado
2015-06-12 16:46 ` [RFC v3 11/19] media/i2c/cx25840/cx25840-core: " Ricardo Ribalda Delgado
2015-06-12 16:46 ` [RFC v3 12/19] media/i2c/msp3400-driver: " Ricardo Ribalda Delgado
2015-06-12 16:46 ` [RFC v3 13/19] media/i2c/saa7110: " Ricardo Ribalda Delgado
2015-06-12 16:46 ` [RFC v3 14/19] media/i2c/saa7115: " Ricardo Ribalda Delgado
2015-06-12 16:46 ` [RFC v3 15/19] media/i2c/tlv320aic23b: " Ricardo Ribalda Delgado
2015-06-12 16:46 ` [RFC v3 16/19] media/i2c/vpx3220: " Ricardo Ribalda Delgado
2015-06-12 16:46 ` [RFC v3 17/19] media/i2c/wm8775: " Ricardo Ribalda Delgado
2015-06-12 16:46 ` [RFC v3 18/19] Docbook: media: new ioctl VIDIOC_G_DEF_EXT_CTRLS Ricardo Ribalda Delgado
2015-06-12 16:46 ` [RFC v3 19/19] Documentation: media: Fix code sample Ricardo Ribalda Delgado
2015-06-16  6:09 ` [RFC v3 00/19] New ioct VIDIOC_G_DEF_EXT_CTRLS Hans Verkuil
2015-06-16  8:21   ` Ricardo Ribalda Delgado

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55D5C93A.6010405@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=g.liakhovetski@gmx.de \
    --cc=hans.verkuil@cisco.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    --cc=ricardo.ribalda@gmail.com \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.