Lines Matching +full:cam +full:- +full:if
1 // SPDX-License-Identifier: GPL-2.0-or-later
9 * Strongly based on qc-usb-messenger, which is:
10 * Copyright (c) 2001 Jean-Fredric Clere, Nikolas Zimmermann, Georg Acher
11 * Mark Cave-Ayland, Carlo E Prelz, Dick Streefland
57 container_of(ctrl->handler, struct gspca_dev, ctrl_handler); in st6422_s_ctrl()
59 int err = -EINVAL; in st6422_s_ctrl()
61 switch (ctrl->id) { in st6422_s_ctrl()
63 err = setbrightness(sd, ctrl->val); in st6422_s_ctrl()
66 err = setcontrast(sd, ctrl->val); in st6422_s_ctrl()
69 err = setgain(sd, ctrl->val); in st6422_s_ctrl()
72 err = setexposure(sd, ctrl->val); in st6422_s_ctrl()
77 if (err >= 0) in st6422_s_ctrl()
79 sd->gspca_dev.usb_err = err; in st6422_s_ctrl()
89 struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler; in st6422_init_controls()
101 return hdl->error; in st6422_init_controls()
106 if (sd->bridge != BRIDGE_ST6422) in st6422_probe()
107 return -ENODEV; in st6422_probe()
111 sd->gspca_dev.cam.cam_mode = st6422_mode; in st6422_probe()
112 sd->gspca_dev.cam.nmodes = ARRAY_SIZE(st6422_mode); in st6422_probe()
123 { 0x1432, 0x03 }, /* 0x00-0x1F brightness */ in st6422_init()
124 { 0x143a, 0xf9 }, /* 0x00-0x0F contrast */ in st6422_init()
132 { 0x1431, 0x00 }, /* 0x00-0x07 ??? */ in st6422_init()
133 { 0x1433, 0x34 }, /* 160x120, 0x00-0x01 night filter */ in st6422_init()
139 /* anti-noise? 0xa2 gives a perfect image */ in st6422_init()
142 { 0x143c, 0x00 }, /* 0x00-0x01 - ??? */ in st6422_init()
145 /* shutter time 0x0000-0x03FF */ in st6422_init()
154 /* bit 5 == button pressed and hold if 0 */ in st6422_init()
162 /* if(urb->iso_frame_desc[i].status == 0x80) { */ in st6422_init()
163 /* if(urb->iso_frame_desc[i].status == 0x88) { */ in st6422_init()
167 { 0x1500, 0x50 }, /* 0x00 - 0xFF 0x80 == compr ? */ in st6422_init()
170 /* high val-> light area gets darker */ in st6422_init()
171 /* low val -> light area gets lighter */ in st6422_init()
173 /* high val-> light area gets darker */ in st6422_init()
174 /* low val -> light area gets lighter */ in st6422_init()
176 /* high val-> light area gets darker */ in st6422_init()
177 /* low val -> light area gets lighter */ in st6422_init()
203 /* val goes from 0 -> 31 */ in setbrightness()
209 /* Val goes from 0 -> 15 */ in setcontrast()
219 if (err < 0) in setgain()
223 if (err < 0) in setgain()
227 if (err < 0) in setgain()
232 if (err < 0) in setgain()
243 if (err < 0) in setexposure()
252 struct cam *cam = &sd->gspca_dev.cam; in st6422_start() local
254 if (cam->cam_mode[sd->gspca_dev.curr_mode].priv) in st6422_start()
258 if (err < 0) in st6422_start()