Lines Matching +full:sd +full:- +full:lines
1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * V4L2 by Jean-Francois Moine <http://moinejf.free.fr>
16 struct sd { struct
35 /* TV-8532A (ICM532A) registers (LE) */
108 gspca_dev->usb_buf[0] = value; in reg_w1()
109 usb_control_msg(gspca_dev->dev, in reg_w1()
110 usb_sndctrlpipe(gspca_dev->dev, 0), in reg_w1()
114 index, gspca_dev->usb_buf, 1, 500); in reg_w1()
121 gspca_dev->usb_buf[0] = value; in reg_w2()
122 gspca_dev->usb_buf[1] = value >> 8; in reg_w2()
123 usb_control_msg(gspca_dev->dev, in reg_w2()
124 usb_sndctrlpipe(gspca_dev->dev, 0), in reg_w2()
128 index, gspca_dev->usb_buf, 2, 500); in reg_w2()
153 cam = &gspca_dev->cam; in sd_config()
154 cam->cam_mode = sif_mode; in sd_config()
155 cam->nmodes = ARRAY_SIZE(sif_mode); in sd_config()
202 /* -- start the camera -- */
205 struct sd *sd = (struct sd *) gspca_dev; in sd_start() local
213 if (gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv) { in sd_start()
216 /* CIF - 2 lines/packet */ in sd_start()
220 /* CIF - 2 lines/packet */ in sd_start()
236 gspca_dev->empty_packet = 0; /* check the empty packets */ in sd_start()
237 sd->packet = 0; /* ignore the first packets */ in sd_start()
251 struct sd *sd = (struct sd *) gspca_dev; in sd_pkt_scan() local
255 if (gspca_dev->empty_packet) { in sd_pkt_scan()
256 gspca_dev->empty_packet = 0; in sd_pkt_scan()
257 sd->packet = gspca_dev->pixfmt.height / 2; in sd_pkt_scan()
259 } else if (sd->packet == 0) in sd_pkt_scan()
260 return; /* 2 more lines in 352x288 ! */ in sd_pkt_scan()
261 sd->packet--; in sd_pkt_scan()
262 if (sd->packet == 0) in sd_pkt_scan()
266 * - header 2 bytes in sd_pkt_scan()
267 * - RGRG line in sd_pkt_scan()
268 * - 4 bytes in sd_pkt_scan()
269 * - GBGB line in sd_pkt_scan()
270 * - 4 bytes in sd_pkt_scan()
273 data + 2, gspca_dev->pixfmt.width); in sd_pkt_scan()
275 data + gspca_dev->pixfmt.width + 5, in sd_pkt_scan()
276 gspca_dev->pixfmt.width); in sd_pkt_scan()
282 container_of(ctrl->handler, struct gspca_dev, ctrl_handler); in sd_s_ctrl()
284 gspca_dev->usb_err = 0; in sd_s_ctrl()
286 if (!gspca_dev->streaming) in sd_s_ctrl()
289 switch (ctrl->id) { in sd_s_ctrl()
291 setexposure(gspca_dev, ctrl->val); in sd_s_ctrl()
294 setgain(gspca_dev, ctrl->val); in sd_s_ctrl()
297 return gspca_dev->usb_err; in sd_s_ctrl()
306 struct v4l2_ctrl_handler *hdl = &gspca_dev->ctrl_handler; in sd_init_controls()
308 gspca_dev->vdev.ctrl_handler = hdl; in sd_init_controls()
315 if (hdl->error) { in sd_init_controls()
317 return hdl->error; in sd_init_controls()
322 /* sub-driver description */
333 /* -- module initialisation -- */
345 /* -- device connect -- */
349 return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd), in sd_probe()