Re: [PATCH] media/v4l2-ctrls: Always run s_ctrl on volatile ctrls

2015-02-17 Thread Jacek Anaszewski
On 02/17/2015 03:35 PM, Sakari Ailus wrote: Jacek Anaszewski wrote: On 02/17/2015 03:06 PM, Sakari Ailus wrote: Hi Jacek, Jacek Anaszewski wrote: Hi Hans, Sakari, On 02/17/2015 12:32 PM, Sakari Ailus wrote: Hi Hans, Hans Verkuil wrote: ... Unfortunately, it only works one time, because th

Re: [PATCH] media/v4l2-ctrls: Always run s_ctrl on volatile ctrls

2015-02-17 Thread Sakari Ailus
Jacek Anaszewski wrote: > On 02/17/2015 03:06 PM, Sakari Ailus wrote: >> Hi Jacek, >> >> Jacek Anaszewski wrote: >>> Hi Hans, Sakari, >>> >>> On 02/17/2015 12:32 PM, Sakari Ailus wrote: Hi Hans, Hans Verkuil wrote: ... >> Unfortunately, it only works one time, because the ne

Re: [PATCH] media/v4l2-ctrls: Always run s_ctrl on volatile ctrls

2015-02-17 Thread Jacek Anaszewski
On 02/17/2015 03:06 PM, Sakari Ailus wrote: Hi Jacek, Jacek Anaszewski wrote: Hi Hans, Sakari, On 02/17/2015 12:32 PM, Sakari Ailus wrote: Hi Hans, Hans Verkuil wrote: ... Unfortunately, it only works one time, because the next time the user writes a zero to the control cluster_changed retu

Re: [PATCH] media/v4l2-ctrls: Always run s_ctrl on volatile ctrls

2015-02-17 Thread Sakari Ailus
Hi Jacek, Jacek Anaszewski wrote: > Hi Hans, Sakari, > > On 02/17/2015 12:32 PM, Sakari Ailus wrote: >> Hi Hans, >> >> Hans Verkuil wrote: >> ... Unfortunately, it only works one time, because the next time the user writes a zero to the control cluster_changed returns false. >

Re: [PATCH] media/v4l2-ctrls: Always run s_ctrl on volatile ctrls

2015-02-17 Thread Jacek Anaszewski
Hi Hans, Sakari, On 02/17/2015 12:32 PM, Sakari Ailus wrote: Hi Hans, Hans Verkuil wrote: ... Unfortunately, it only works one time, because the next time the user writes a zero to the control cluster_changed returns false. I think on volatile controls it is safer to run s_ctrl twice than mis

Re: [PATCH] media/v4l2-ctrls: Always run s_ctrl on volatile ctrls

2015-02-17 Thread Hans Verkuil
On 02/17/15 13:21, Ricardo Ribalda Delgado wrote: > Hello Hans > > On Tue, Feb 17, 2015 at 1:03 PM, Hans Verkuil wrote: >> Should be done after the 'ctrl == NULL' check. > > Good catch. Fixed on v2 > >> >>> >>> if (ctrl == NULL) >>> continue; >>> >> >> There

Re: [PATCH] media/v4l2-ctrls: Always run s_ctrl on volatile ctrls

2015-02-17 Thread Ricardo Ribalda Delgado
Hello Hans On Tue, Feb 17, 2015 at 1:03 PM, Hans Verkuil wrote: > Should be done after the 'ctrl == NULL' check. Good catch. Fixed on v2 > >> >> if (ctrl == NULL) >> continue; >> > > There is one more change that has to be made: setting a volatile control > s

Re: [PATCH] media/v4l2-ctrls: Always run s_ctrl on volatile ctrls

2015-02-17 Thread Hans Verkuil
Hi Ricardo, I've thought about this some more and I agree that this should be allowed. But I have some comments, see below. On 02/17/15 12:02, Ricardo Ribalda Delgado wrote: > Volatile controls can change their value outside the v4l-ctrl framework. > > We should ignore the cached written value

Re: [PATCH] media/v4l2-ctrls: Always run s_ctrl on volatile ctrls

2015-02-17 Thread Sakari Ailus
Hi Hans, Hans Verkuil wrote: ... >> Unfortunately, it only works one time, because the next time the user writes >> a zero to the control cluster_changed returns false. >> >> I think on volatile controls it is safer to run s_ctrl twice than missing a >> valid s_ctrl. >> >> I know I am abusing a bi

Re: [PATCH] media/v4l2-ctrls: Always run s_ctrl on volatile ctrls

2015-02-17 Thread Ricardo Ribalda Delgado
Hello Hans I need to figure out how can you reply that fast. Thanks a lot! On Tue, Feb 17, 2015 at 12:17 PM, Hans Verkuil wrote: >> I have a control that tells the user when there has been a external trigger >> overrun. (Trigger while processing old image). This is a volatile control. > > Does

Re: [PATCH] media/v4l2-ctrls: Always run s_ctrl on volatile ctrls

2015-02-17 Thread Hans Verkuil
Hi Ricardo, On 02/17/15 12:02, Ricardo Ribalda Delgado wrote: > Volatile controls can change their value outside the v4l-ctrl framework. > > We should ignore the cached written value of the ctrl when evaluating if > we should run s_ctrl. > > Signed-off-by: Ricardo Ribalda Delgado > --- > > I h

[PATCH] media/v4l2-ctrls: Always run s_ctrl on volatile ctrls

2015-02-17 Thread Ricardo Ribalda Delgado
Volatile controls can change their value outside the v4l-ctrl framework. We should ignore the cached written value of the ctrl when evaluating if we should run s_ctrl. Signed-off-by: Ricardo Ribalda Delgado --- I have a control that tells the user when there has been a external trigger overrun.