Lines Matching +full:flip +full:- +full:chip
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* Subdriver for the GL860 chip with the OV2640 sensor
175 sd->vcur.backlight = 32; in ov2640_init_settings()
176 sd->vcur.brightness = 0; in ov2640_init_settings()
177 sd->vcur.sharpness = 6; in ov2640_init_settings()
178 sd->vcur.contrast = 0; in ov2640_init_settings()
179 sd->vcur.gamma = 32; in ov2640_init_settings()
180 sd->vcur.hue = 0; in ov2640_init_settings()
181 sd->vcur.saturation = 128; in ov2640_init_settings()
182 sd->vcur.whitebal = 64; in ov2640_init_settings()
183 sd->vcur.mirror = 0; in ov2640_init_settings()
184 sd->vcur.flip = 0; in ov2640_init_settings()
186 sd->vmax.backlight = 64; in ov2640_init_settings()
187 sd->vmax.brightness = 255; in ov2640_init_settings()
188 sd->vmax.sharpness = 31; in ov2640_init_settings()
189 sd->vmax.contrast = 255; in ov2640_init_settings()
190 sd->vmax.gamma = 64; in ov2640_init_settings()
191 sd->vmax.hue = 254 + 2; in ov2640_init_settings()
192 sd->vmax.saturation = 255; in ov2640_init_settings()
193 sd->vmax.whitebal = 128; in ov2640_init_settings()
194 sd->vmax.mirror = 1; in ov2640_init_settings()
195 sd->vmax.flip = 1; in ov2640_init_settings()
196 sd->vmax.AC50Hz = 0; in ov2640_init_settings()
198 sd->dev_camera_settings = ov2640_camera_settings; in ov2640_init_settings()
199 sd->dev_init_at_startup = ov2640_init_at_startup; in ov2640_init_settings()
200 sd->dev_configure_alt = ov2640_configure_alt; in ov2640_init_settings()
201 sd->dev_init_pre_alt = ov2640_init_pre_alt; in ov2640_init_settings()
202 sd->dev_post_unset_alt = ov2640_post_unset_alt; in ov2640_init_settings()
237 sd->mirrorMask = 0; in ov2640_init_pre_alt()
239 sd->vold.backlight = -1; in ov2640_init_pre_alt()
240 sd->vold.brightness = -1; in ov2640_init_pre_alt()
241 sd->vold.sharpness = -1; in ov2640_init_pre_alt()
242 sd->vold.contrast = -1; in ov2640_init_pre_alt()
243 sd->vold.saturation = -1; in ov2640_init_pre_alt()
244 sd->vold.gamma = -1; in ov2640_init_pre_alt()
245 sd->vold.hue = -1; in ov2640_init_pre_alt()
246 sd->vold.whitebal = -1; in ov2640_init_pre_alt()
247 sd->vold.mirror = -1; in ov2640_init_pre_alt()
248 sd->vold.flip = -1; in ov2640_init_pre_alt()
257 s32 reso = gspca_dev->cam.cam_mode[(s32) gspca_dev->curr_mode].priv; in ov2640_init_post_alt()
319 s32 reso = gspca_dev->cam.cam_mode[(s32) gspca_dev->curr_mode].priv; in ov2640_configure_alt()
323 gspca_dev->alt = 3 + 1; in ov2640_configure_alt()
329 gspca_dev->alt = 1 + 1; in ov2640_configure_alt()
339 s32 backlight = sd->vcur.backlight; in ov2640_camera_settings()
340 s32 bright = sd->vcur.brightness; in ov2640_camera_settings()
341 s32 sharp = sd->vcur.sharpness; in ov2640_camera_settings()
342 s32 gam = sd->vcur.gamma; in ov2640_camera_settings()
343 s32 cntr = sd->vcur.contrast; in ov2640_camera_settings()
344 s32 sat = sd->vcur.saturation; in ov2640_camera_settings()
345 s32 hue = sd->vcur.hue; in ov2640_camera_settings()
346 s32 wbal = sd->vcur.whitebal; in ov2640_camera_settings()
347 s32 mirror = (((sd->vcur.mirror > 0) ^ sd->mirrorMask) == 0); in ov2640_camera_settings()
348 s32 flip = (((sd->vcur.flip > 0) ^ sd->mirrorMask) == 0); in ov2640_camera_settings() local
350 if (backlight != sd->vold.backlight) { in ov2640_camera_settings()
351 /* No sd->vold.backlight=backlight; (to be done again later) */ in ov2640_camera_settings()
352 if (backlight < 0 || backlight > sd->vmax.backlight) in ov2640_camera_settings()
359 ctrl_out(gspca_dev, 0x40, 1, 0x601e + backlight - 10, 0x0025, in ov2640_camera_settings()
363 if (bright != sd->vold.brightness) { in ov2640_camera_settings()
364 sd->vold.brightness = bright; in ov2640_camera_settings()
365 if (bright < 0 || bright > sd->vmax.brightness) in ov2640_camera_settings()
373 if (wbal != sd->vold.whitebal) { in ov2640_camera_settings()
374 sd->vold.whitebal = wbal; in ov2640_camera_settings()
375 if (wbal < 0 || wbal > sd->vmax.whitebal) in ov2640_camera_settings()
383 if (cntr != sd->vold.contrast) { in ov2640_camera_settings()
384 sd->vold.contrast = cntr; in ov2640_camera_settings()
385 if (cntr < 0 || cntr > sd->vmax.contrast) in ov2640_camera_settings()
393 if (sat != sd->vold.saturation) { in ov2640_camera_settings()
394 sd->vold.saturation = sat; in ov2640_camera_settings()
395 if (sat < 0 || sat > sd->vmax.saturation) in ov2640_camera_settings()
403 if (sharp != sd->vold.sharpness) { in ov2640_camera_settings()
404 sd->vold.sharpness = sharp; in ov2640_camera_settings()
405 if (sharp < 0 || sharp > sd->vmax.sharpness) in ov2640_camera_settings()
413 if (hue != sd->vold.hue) { in ov2640_camera_settings()
414 sd->vold.hue = hue; in ov2640_camera_settings()
415 if (hue < 0 || hue > sd->vmax.hue) in ov2640_camera_settings()
423 sd->swapRB = 1; in ov2640_camera_settings()
425 sd->swapRB = 0; in ov2640_camera_settings()
428 if (gam != sd->vold.gamma) { in ov2640_camera_settings()
429 sd->vold.gamma = gam; in ov2640_camera_settings()
430 if (gam < 0 || gam > sd->vmax.gamma) in ov2640_camera_settings()
438 if (mirror != sd->vold.mirror || flip != sd->vold.flip) { in ov2640_camera_settings()
439 sd->vold.mirror = mirror; in ov2640_camera_settings()
440 sd->vold.flip = flip; in ov2640_camera_settings()
448 flip = 0x50 * flip + mirror; in ov2640_camera_settings()
452 ctrl_out(gspca_dev, 0x40, 1, 0x6028 + flip, 0x0004, 0, NULL); in ov2640_camera_settings()
457 if (backlight != sd->vold.backlight) { in ov2640_camera_settings()
458 sd->vold.backlight = backlight; in ov2640_camera_settings()
464 ctrl_out(gspca_dev, 0x40, 1, 0x601e + backlight - 10, 0x0025, in ov2640_camera_settings()