Lines Matching +full:flip +full:- +full:chip

1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* Subdriver for the GL860 chip with the MI2020 sensor
82 {2, {0xff, 0xff, 0xff}}, /* - */
355 sd->vcur.backlight = 0; in mi2020_init_settings()
356 sd->vcur.brightness = 70; in mi2020_init_settings()
357 sd->vcur.sharpness = 20; in mi2020_init_settings()
358 sd->vcur.contrast = 0; in mi2020_init_settings()
359 sd->vcur.gamma = 0; in mi2020_init_settings()
360 sd->vcur.hue = 0; in mi2020_init_settings()
361 sd->vcur.saturation = 60; in mi2020_init_settings()
362 sd->vcur.whitebal = 0; /* 50, not done by hardware */ in mi2020_init_settings()
363 sd->vcur.mirror = 0; in mi2020_init_settings()
364 sd->vcur.flip = 0; in mi2020_init_settings()
365 sd->vcur.AC50Hz = 1; in mi2020_init_settings()
367 sd->vmax.backlight = 64; in mi2020_init_settings()
368 sd->vmax.brightness = 128; in mi2020_init_settings()
369 sd->vmax.sharpness = 40; in mi2020_init_settings()
370 sd->vmax.contrast = 3; in mi2020_init_settings()
371 sd->vmax.gamma = 2; in mi2020_init_settings()
372 sd->vmax.hue = 0 + 1; /* 200, not done by hardware */ in mi2020_init_settings()
373 sd->vmax.saturation = 0; /* 100, not done by hardware */ in mi2020_init_settings()
374 sd->vmax.whitebal = 2; /* 100, not done by hardware */ in mi2020_init_settings()
375 sd->vmax.mirror = 1; in mi2020_init_settings()
376 sd->vmax.flip = 1; in mi2020_init_settings()
377 sd->vmax.AC50Hz = 1; in mi2020_init_settings()
379 sd->dev_camera_settings = mi2020_camera_settings; in mi2020_init_settings()
380 sd->dev_init_at_startup = mi2020_init_at_startup; in mi2020_init_settings()
381 sd->dev_configure_alt = mi2020_configure_alt; in mi2020_init_settings()
382 sd->dev_init_pre_alt = mi2020_init_pre_alt; in mi2020_init_settings()
383 sd->dev_post_unset_alt = mi2020_post_unset_alt; in mi2020_init_settings()
422 sd->mirrorMask = 0; in mi2020_init_pre_alt()
423 sd->vold.hue = -1; in mi2020_init_pre_alt()
426 sd->vold.brightness = -1; in mi2020_init_pre_alt()
427 sd->vold.sharpness = -1; in mi2020_init_pre_alt()
430 sd->vold.contrast = 0; in mi2020_init_pre_alt()
431 sd->vold.gamma = 0; in mi2020_init_pre_alt()
432 sd->vold.backlight = 0; in mi2020_init_pre_alt()
442 s32 reso = gspca_dev->cam.cam_mode[(s32) gspca_dev->curr_mode].priv; in mi2020_init_post_alt()
444 s32 mirror = (((sd->vcur.mirror > 0) ^ sd->mirrorMask) > 0); in mi2020_init_post_alt()
445 s32 flip = (((sd->vcur.flip > 0) ^ sd->mirrorMask) > 0); in mi2020_init_post_alt() local
446 s32 freq = (sd->vcur.AC50Hz > 0); in mi2020_init_post_alt()
447 s32 wbal = sd->vcur.whitebal; in mi2020_init_post_alt()
459 sd->nbIm = -1; in mi2020_init_post_alt()
474 dat_hvflip2[2] = 0x6c + 2 * (1 - flip) + (1 - mirror); in mi2020_init_post_alt()
475 dat_hvflip4[2] = 0x24 + 2 * (1 - flip) + (1 - mirror); in mi2020_init_post_alt()
591 sd->nbIm = 0; in mi2020_init_post_alt()
593 sd->vold.mirror = mirror; in mi2020_init_post_alt()
594 sd->vold.flip = flip; in mi2020_init_post_alt()
595 sd->vold.AC50Hz = freq; in mi2020_init_post_alt()
596 sd->vold.whitebal = wbal; in mi2020_init_post_alt()
605 s32 reso = gspca_dev->cam.cam_mode[(s32) gspca_dev->curr_mode].priv; in mi2020_configure_alt()
609 gspca_dev->alt = 3 + 1; in mi2020_configure_alt()
615 gspca_dev->alt = 1 + 1; in mi2020_configure_alt()
624 s32 reso = gspca_dev->cam.cam_mode[(s32) gspca_dev->curr_mode].priv; in mi2020_camera_settings()
626 s32 backlight = sd->vcur.backlight; in mi2020_camera_settings()
627 s32 bright = sd->vcur.brightness; in mi2020_camera_settings()
628 s32 sharp = sd->vcur.sharpness; in mi2020_camera_settings()
629 s32 cntr = sd->vcur.contrast; in mi2020_camera_settings()
630 s32 gam = sd->vcur.gamma; in mi2020_camera_settings()
631 s32 hue = (sd->vcur.hue > 0); in mi2020_camera_settings()
632 s32 mirror = (((sd->vcur.mirror > 0) ^ sd->mirrorMask) > 0); in mi2020_camera_settings()
633 s32 flip = (((sd->vcur.flip > 0) ^ sd->mirrorMask) > 0); in mi2020_camera_settings() local
634 s32 freq = (sd->vcur.AC50Hz > 0); in mi2020_camera_settings()
635 s32 wbal = sd->vcur.whitebal; in mi2020_camera_settings()
648 /* Less than 4 images received -> too early to set the settings */ in mi2020_camera_settings()
649 if (sd->nbIm < 4) { in mi2020_camera_settings()
650 sd->waitSet = 1; in mi2020_camera_settings()
653 sd->waitSet = 0; in mi2020_camera_settings()
655 if (freq != sd->vold.AC50Hz) { in mi2020_camera_settings()
656 sd->vold.AC50Hz = freq; in mi2020_camera_settings()
664 if (wbal != sd->vold.whitebal) { in mi2020_camera_settings()
665 sd->vold.whitebal = wbal; in mi2020_camera_settings()
666 if (wbal < 0 || wbal > sd->vmax.whitebal) in mi2020_camera_settings()
691 if (mirror != sd->vold.mirror || flip != sd->vold.flip) { in mi2020_camera_settings()
692 sd->vold.mirror = mirror; in mi2020_camera_settings()
693 sd->vold.flip = flip; in mi2020_camera_settings()
695 dat_hvflip2[2] = 0x6c + 2 * (1 - flip) + (1 - mirror); in mi2020_camera_settings()
696 dat_hvflip4[2] = 0x24 + 2 * (1 - flip) + (1 - mirror); in mi2020_camera_settings()
720 if (bright != sd->vold.brightness) { in mi2020_camera_settings()
721 sd->vold.brightness = bright; in mi2020_camera_settings()
722 if (bright < 0 || bright > sd->vmax.brightness) in mi2020_camera_settings()
734 if (cntr != sd->vold.contrast || gam != sd->vold.gamma) { in mi2020_camera_settings()
735 sd->vold.contrast = cntr; in mi2020_camera_settings()
736 if (cntr < 0 || cntr > sd->vmax.contrast) in mi2020_camera_settings()
738 sd->vold.gamma = gam; in mi2020_camera_settings()
739 if (gam < 0 || gam > sd->vmax.gamma) in mi2020_camera_settings()
746 dat_multi4[2] = dat_multi2[2] = cntr * 0x10 + 2 - gam; in mi2020_camera_settings()
755 if (backlight != sd->vold.backlight) { in mi2020_camera_settings()
756 sd->vold.backlight = backlight; in mi2020_camera_settings()
757 if (backlight < 0 || backlight > sd->vmax.backlight) in mi2020_camera_settings()
771 if (sharp != sd->vold.sharpness) { in mi2020_camera_settings()
772 sd->vold.sharpness = sharp; in mi2020_camera_settings()
773 if (sharp < 0 || sharp > sd->vmax.sharpness) in mi2020_camera_settings()
780 if (hue != sd->vold.hue) { in mi2020_camera_settings()
781 sd->swapRB = hue; in mi2020_camera_settings()
782 sd->vold.hue = hue; in mi2020_camera_settings()