Re: [REVIEW PATCH 3/3] smiapp: Use __v4l2_ctrl_grab() to grab controls

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

 



Hi Hans,

On Wed, Feb 25, 2015 at 03:14:16PM +0100, Hans Verkuil wrote:
> On 02/25/15 14:57, Sakari Ailus wrote:
> > Hi Hans,
> > 
> > On Wed, Feb 25, 2015 at 02:45:58PM +0100, Hans Verkuil wrote:
> > ...
> >>> @@ -1535,15 +1529,15 @@ static int smiapp_set_stream(struct v4l2_subdev *subdev, int enable)
> >>>  	if (sensor->streaming == enable)
> >>>  		goto out;
> >>>  
> >>> -	if (enable) {
> >>> -		sensor->streaming = true;
> >>> +	if (enable)
> >>>  		rval = smiapp_start_streaming(sensor);
> >>> -		if (rval < 0)
> >>> -			sensor->streaming = false;
> >>> -	} else {
> >>> +	else
> >>>  		rval = smiapp_stop_streaming(sensor);
> >>> -		sensor->streaming = false;
> >>> -	}
> >>> +
> >>> +	sensor->streaming = enable;
> >>> +	__v4l2_ctrl_grab(sensor->hflip, enable);
> >>> +	__v4l2_ctrl_grab(sensor->vflip, enable);
> >>> +	__v4l2_ctrl_grab(sensor->link_freq, enable);
> >>
> >> Just checking: is it really not possible to change these controls
> >> while streaming? Most devices I know of allow changing this on the fly.
> >>
> >> If it is really not possible, then you can add my Ack for this series:
> > 
> > I'm not sure what the sensors would do in practice, but the problem is that
> > changing the values of these control affect the pixel order. That's why
> > changing them has been prevented while streaming.
> 
> Ah, OK.
> 
> Can you add a comment explaining why this is done?
> 
> BTW, I understand that HFLIP will cause changes in the pixel order,
> but VFLIP and link_freq should be OK, I would expect.

Sure I can add a comment. Same for vflip, it will change the pixel order.
The flip controls will change the readout direction. For example, a 4x4
bayer sensor:

GRGR
BGBG
GRGR
BGBG

Without flipping, the readout of the first line will be GRGR while the
second is BGBG. With vertical flipping, the first line read out from the
sensor will be BGBG and the second GRGR.

The link frequency cannot be changed since this would change the sensor PLL
configuration and the CSI-2 bus frequency, neither of which are changeable
while streaming.

-- 
Regards,

Sakari Ailus
e-mail: sakari.ailus@xxxxxx	XMPP: sailus@xxxxxxxxxxxxxx
--
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