Lines Matching refs:vv

14 	(((vv->video_status & STATUS_CAPTURE) != 0) && (vv->video_fh == fh))
17 (((vv->video_status & STATUS_OVERLAY) != 0) && (vv->video_fh == fh))
110 struct saa7146_vv *vv = dev->vv_data; in saa7146_start_preview() local
117 if (vv->ov.fh == NULL) { in saa7146_start_preview()
130 if (vv->video_fh == fh) { in saa7146_start_preview()
143 fmt.fmt.win = vv->ov.win; in saa7146_start_preview()
146 saa7146_res_free(vv->video_fh, RESOURCE_DMA1_HPS|RESOURCE_DMA2_CLP); in saa7146_start_preview()
149 vv->ov.win = fmt.fmt.win; in saa7146_start_preview()
152 vv->ov.win.w.width, vv->ov.win.w.height, in saa7146_start_preview()
153 vv->ov.win.w.left, vv->ov.win.w.top, in saa7146_start_preview()
154 vv->ov_fmt->name, v4l2_field_names[vv->ov.win.field]); in saa7146_start_preview()
158 saa7146_res_free(vv->video_fh, RESOURCE_DMA1_HPS|RESOURCE_DMA2_CLP); in saa7146_start_preview()
162 vv->video_status = STATUS_OVERLAY; in saa7146_start_preview()
163 vv->video_fh = fh; in saa7146_start_preview()
172 struct saa7146_vv *vv = dev->vv_data; in saa7146_stop_preview() local
183 if ((vv->video_status & STATUS_OVERLAY) == 0) { in saa7146_stop_preview()
188 if (vv->video_fh != fh) { in saa7146_stop_preview()
193 vv->video_status = 0; in saa7146_stop_preview()
194 vv->video_fh = NULL; in saa7146_stop_preview()
331 struct saa7146_vv *vv = dev->vv_data; in video_begin() local
338 if ((vv->video_status & STATUS_CAPTURE) != 0) { in video_begin()
339 if (vv->video_fh == fh) { in video_begin()
347 if ((vv->video_status & STATUS_OVERLAY) != 0) { in video_begin()
349 vv->ov_suspend = vv->video_fh; in video_begin()
350 …err = saa7146_stop_preview(vv->video_fh); /* side effect: video_status is now 0, video_fh is NULL … in video_begin()
357 fmt = saa7146_format_by_fourcc(dev, vv->video_fmt.pixelformat); in video_begin()
370 if (vv->ov_suspend != NULL) { in video_begin()
371 saa7146_start_preview(vv->ov_suspend); in video_begin()
372 vv->ov_suspend = NULL; in video_begin()
383 vv->video_fh = fh; in video_begin()
384 vv->video_status = STATUS_CAPTURE; in video_begin()
392 struct saa7146_vv *vv = dev->vv_data; in video_end() local
399 if ((vv->video_status & STATUS_CAPTURE) != STATUS_CAPTURE) { in video_end()
404 if (vv->video_fh != fh) { in video_end()
409 fmt = saa7146_format_by_fourcc(dev, vv->video_fmt.pixelformat); in video_end()
433 vv->video_fh = NULL; in video_end()
434 vv->video_status = 0; in video_end()
438 if (vv->ov_suspend != NULL) { in video_end()
439 saa7146_start_preview(vv->ov_suspend); in video_end()
440 vv->ov_suspend = NULL; in video_end()
473 struct saa7146_vv *vv = dev->vv_data; in vidioc_g_fbuf() local
475 *fb = vv->ov_fb; in vidioc_g_fbuf()
484 struct saa7146_vv *vv = dev->vv_data; in vidioc_s_fbuf() local
504 if (vv->video_fh != fh) { in vidioc_s_fbuf()
511 vv->ov_fb = *fb; in vidioc_s_fbuf()
512 vv->ov_fmt = fmt; in vidioc_s_fbuf()
514 if (vv->ov_fb.fmt.bytesperline < vv->ov_fb.fmt.width) { in vidioc_s_fbuf()
515 vv->ov_fb.fmt.bytesperline = vv->ov_fb.fmt.width * fmt->depth / 8; in vidioc_s_fbuf()
516 DEB_D("setting bytesperline to %d\n", vv->ov_fb.fmt.bytesperline); in vidioc_s_fbuf()
535 struct saa7146_vv *vv = dev->vv_data; in saa7146_s_ctrl() local
565 if ((vv->video_status & STATUS_CAPTURE)) in saa7146_s_ctrl()
567 vv->hflip = ctrl->val; in saa7146_s_ctrl()
571 if ((vv->video_status & STATUS_CAPTURE)) in saa7146_s_ctrl()
573 vv->vflip = ctrl->val; in saa7146_s_ctrl()
580 if ((vv->video_status & STATUS_OVERLAY) != 0) { /* CHECK: && (vv->video_fh == fh)) */ in saa7146_s_ctrl()
581 struct saa7146_fh *fh = vv->video_fh; in saa7146_s_ctrl()
593 struct saa7146_vv *vv = dev->vv_data; in vidioc_g_parm() local
598 v4l2_video_std_frame_period(vv->standard->id, in vidioc_g_parm()
606 struct saa7146_vv *vv = dev->vv_data; in vidioc_g_fmt_vid_cap() local
608 f->fmt.pix = vv->video_fmt; in vidioc_g_fmt_vid_cap()
615 struct saa7146_vv *vv = dev->vv_data; in vidioc_g_fmt_vid_overlay() local
617 f->fmt.win = vv->ov.win; in vidioc_g_fmt_vid_overlay()
624 struct saa7146_vv *vv = dev->vv_data; in vidioc_g_fmt_vbi_cap() local
626 f->fmt.vbi = vv->vbi_fmt; in vidioc_g_fmt_vbi_cap()
633 struct saa7146_vv *vv = dev->vv_data; in vidioc_try_fmt_vid_cap() local
646 maxw = vv->standard->h_max_out; in vidioc_try_fmt_vid_cap()
647 maxh = vv->standard->v_max_out; in vidioc_try_fmt_vid_cap()
656 vv->last_field = V4L2_FIELD_TOP; in vidioc_try_fmt_vid_cap()
661 vv->last_field = V4L2_FIELD_INTERLACED; in vidioc_try_fmt_vid_cap()
665 vv->last_field = V4L2_FIELD_INTERLACED; in vidioc_try_fmt_vid_cap()
699 struct saa7146_vv *vv = dev->vv_data; in vidioc_try_fmt_vid_overlay() local
706 if (NULL == vv->ov_fb.base) { in vidioc_try_fmt_vid_overlay()
710 if (NULL == vv->ov_fmt) { in vidioc_try_fmt_vid_overlay()
725 maxw = vv->standard->h_max_out; in vidioc_try_fmt_vid_overlay()
726 maxh = vv->standard->v_max_out; in vidioc_try_fmt_vid_overlay()
759 struct saa7146_vv *vv = dev->vv_data; in vidioc_s_fmt_vid_cap() local
770 vv->video_fmt = f->fmt.pix; in vidioc_s_fmt_vid_cap()
772 (char *)&vv->video_fmt.pixelformat); in vidioc_s_fmt_vid_cap()
780 struct saa7146_vv *vv = dev->vv_data; in vidioc_s_fmt_vid_overlay() local
787 vv->ov.win = f->fmt.win; in vidioc_s_fmt_vid_overlay()
788 vv->ov.nclips = f->fmt.win.clipcount; in vidioc_s_fmt_vid_overlay()
789 if (vv->ov.nclips > 16) in vidioc_s_fmt_vid_overlay()
790 vv->ov.nclips = 16; in vidioc_s_fmt_vid_overlay()
791 if (copy_from_user(vv->ov.clips, f->fmt.win.clips, in vidioc_s_fmt_vid_overlay()
792 sizeof(struct v4l2_clip) * vv->ov.nclips)) { in vidioc_s_fmt_vid_overlay()
797 vv->ov.fh = fh; in vidioc_s_fmt_vid_overlay()
810 struct saa7146_vv *vv = dev->vv_data; in vidioc_g_std() local
812 *norm = vv->standard->id; in vidioc_g_std()
837 struct saa7146_vv *vv = dev->vv_data; in vidioc_s_std() local
843 if ((vv->video_status & STATUS_CAPTURE) == STATUS_CAPTURE) { in vidioc_s_std()
848 if ((vv->video_status & STATUS_OVERLAY) != 0) { in vidioc_s_std()
849 vv->ov_suspend = vv->video_fh; in vidioc_s_std()
850 …err = saa7146_stop_preview(vv->video_fh); /* side effect: video_status is now 0, video_fh is NULL … in vidioc_s_std()
861 vv->standard = &dev->ext_vv_data->stds[i]; in vidioc_s_std()
863 dev->ext_vv_data->std_callback(dev, vv->standard); in vidioc_s_std()
867 if (vv->ov_suspend != NULL) { in vidioc_s_std()
868 saa7146_start_preview(vv->ov_suspend); in vidioc_s_std()
869 vv->ov_suspend = NULL; in vidioc_s_std()
877 DEB_EE("VIDIOC_S_STD: set to standard to '%s'\n", vv->standard->name); in vidioc_s_std()
958 struct saa7146_vv *vv = dev->vv_data; in vidioc_streamoff() local
966 if ((vv->video_status & STATUS_CAPTURE) != STATUS_CAPTURE) { in vidioc_streamoff()
971 if (vv->video_fh != fh) { in vidioc_streamoff()
1041 struct saa7146_vv *vv = dev->vv_data; in buffer_activate() local
1046 mod_timer(&vv->video_dmaq.timeout, jiffies+BUFFER_TIMEOUT); in buffer_activate()
1063 struct saa7146_vv *vv = dev->vv_data; in buffer_prepare() local
1070 if (vv->video_fmt.width < 48 || in buffer_prepare()
1071 vv->video_fmt.height < 32 || in buffer_prepare()
1072 vv->video_fmt.width > vv->standard->h_max_out || in buffer_prepare()
1073 vv->video_fmt.height > vv->standard->v_max_out) { in buffer_prepare()
1075 vv->video_fmt.width, vv->video_fmt.height); in buffer_prepare()
1079 size = vv->video_fmt.sizeimage; in buffer_prepare()
1086 vv->video_fmt.width, vv->video_fmt.height, in buffer_prepare()
1087 size, v4l2_field_names[vv->video_fmt.field]); in buffer_prepare()
1088 if (buf->vb.width != vv->video_fmt.width || in buffer_prepare()
1089 buf->vb.bytesperline != vv->video_fmt.bytesperline || in buffer_prepare()
1090 buf->vb.height != vv->video_fmt.height || in buffer_prepare()
1093 buf->vb.field != vv->video_fmt.field || in buffer_prepare()
1094 buf->fmt != &vv->video_fmt) { in buffer_prepare()
1101 buf->vb.bytesperline = vv->video_fmt.bytesperline; in buffer_prepare()
1102 buf->vb.width = vv->video_fmt.width; in buffer_prepare()
1103 buf->vb.height = vv->video_fmt.height; in buffer_prepare()
1106 buf->fmt = &vv->video_fmt; in buffer_prepare()
1107 buf->vb.field = vv->video_fmt.field; in buffer_prepare()
1120 err = videobuf_iolock(q,&buf->vb, &vv->ov_fb); in buffer_prepare()
1143 struct saa7146_vv *vv = fh->dev->vv_data; in buffer_setup() local
1148 *size = vv->video_fmt.sizeimage; in buffer_setup()
1165 struct saa7146_vv *vv = dev->vv_data; in buffer_queue() local
1169 saa7146_buffer_queue(fh->dev, &vv->video_dmaq, buf); in buffer_queue()
1196 static void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv) in video_init() argument
1198 INIT_LIST_HEAD(&vv->video_dmaq.queue); in video_init()
1200 init_timer(&vv->video_dmaq.timeout); in video_init()
1201 vv->video_dmaq.timeout.function = saa7146_buffer_timeout; in video_init()
1202 vv->video_dmaq.timeout.data = (unsigned long)(&vv->video_dmaq); in video_init()
1203 vv->video_dmaq.dev = dev; in video_init()
1206 vv->standard = &dev->ext_vv_data->stds[0]; in video_init()
1209 vv->current_hps_source = SAA7146_HPS_SOURCE_PORT_A; in video_init()
1210 vv->current_hps_sync = SAA7146_HPS_SYNC_PORT_A; in video_init()
1232 struct saa7146_vv *vv = dev->vv_data; in video_close() local
1247 struct saa7146_vv *vv = dev->vv_data; in video_irq_done() local
1248 struct saa7146_dmaqueue *q = &vv->video_dmaq; in video_irq_done()
1266 struct saa7146_vv *vv = dev->vv_data; in video_read() local
1271 if ((vv->video_status & STATUS_CAPTURE) != 0) { in video_read()
1273 if (vv->video_fh == fh) { in video_read()
1295 if (vv->ov_suspend != NULL) { in video_read()
1296 saa7146_start_preview(vv->ov_suspend); in video_read()
1297 vv->ov_suspend = NULL; in video_read()