On Mon, 19 Jan 2009, morimoto.kuninori@xxxxxxxxxxx wrote: > > > @@ -768,8 +844,17 @@ static int ov772x_set_fmt(struct soc_camera_device *icd, > > > * set COM3 > > > */ > > > val = priv->fmt->com3; > > > + if (priv->info->flags & OV772X_FLAG_VFLIP) > > > + val |= VFLIP_IMG; > > > + if (priv->info->flags & OV772X_FLAG_HFLIP) > > > + val |= HFLIP_IMG; > > > + > > > + mask = SWAP_MASK; > > > + if (IMG_MASK & val) > > > + mask |= IMG_MASK; > > > + > > > ret = ov772x_mask_set(priv->client, > > > - COM3, SWAP_MASK, val); > > > + COM3, mask, val); > > > > Do I understand it right, that this throws away any flip control settings > > performed before S_FMT? You probably want to set priv->fmt->com3 in your > > set_control and XOR instead of an OR here as well. Or was this > > intentional? > > Sorry, I can not understand what you want to say. > I think set_fmt function set default flip control. > And set_control function change flip on/off. > Therefore OR operation on set_fmt is correct I think. > And set_control use only XOR. priv->fmt->com3 is not needed here. > Do you say should I remember flip value ? I think, yes. If someone sets vertical or horizontal flip using the respective control, and then calls S_FMT, I think, flip should be preserved. S_FMT is in no way a reset, it only sets fields that are explicitly passed with it - pixel format, image size, etc. Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer -- 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