Lines Matching full:vv
15 (((vv->video_status & STATUS_CAPTURE) != 0) && (vv->video_fh == fh))
18 (((vv->video_status & STATUS_OVERLAY) != 0) && (vv->video_fh == fh))
99 struct saa7146_vv *vv = dev->vv_data; in saa7146_start_preview() local
106 if (vv->ov.fh == NULL) { in saa7146_start_preview()
119 if (vv->video_fh == fh) { in saa7146_start_preview()
132 fmt.fmt.win = vv->ov.win; in saa7146_start_preview()
135 saa7146_res_free(vv->video_fh, RESOURCE_DMA1_HPS|RESOURCE_DMA2_CLP); in saa7146_start_preview()
138 vv->ov.win = fmt.fmt.win; in saa7146_start_preview()
141 vv->ov.win.w.width, vv->ov.win.w.height, in saa7146_start_preview()
142 vv->ov.win.w.left, vv->ov.win.w.top, in saa7146_start_preview()
143 vv->ov_fmt->pixelformat, v4l2_field_names[vv->ov.win.field]); in saa7146_start_preview()
147 saa7146_res_free(vv->video_fh, RESOURCE_DMA1_HPS|RESOURCE_DMA2_CLP); in saa7146_start_preview()
151 vv->video_status = STATUS_OVERLAY; in saa7146_start_preview()
152 vv->video_fh = fh; in saa7146_start_preview()
161 struct saa7146_vv *vv = dev->vv_data; in saa7146_stop_preview() local
172 if ((vv->video_status & STATUS_OVERLAY) == 0) { in saa7146_stop_preview()
177 if (vv->video_fh != fh) { in saa7146_stop_preview()
182 vv->video_status = 0; in saa7146_stop_preview()
183 vv->video_fh = NULL; in saa7146_stop_preview()
320 struct saa7146_vv *vv = dev->vv_data; in video_begin() local
327 if ((vv->video_status & STATUS_CAPTURE) != 0) { in video_begin()
328 if (vv->video_fh == fh) { in video_begin()
336 if ((vv->video_status & STATUS_OVERLAY) != 0) { in video_begin()
338 vv->ov_suspend = vv->video_fh; in video_begin()
339 …err = saa7146_stop_preview(vv->video_fh); /* side effect: video_status is now 0, video_fh is NULL … in video_begin()
346 fmt = saa7146_format_by_fourcc(dev, vv->video_fmt.pixelformat); in video_begin()
360 if (vv->ov_suspend != NULL) { in video_begin()
361 saa7146_start_preview(vv->ov_suspend); in video_begin()
362 vv->ov_suspend = NULL; in video_begin()
373 vv->video_fh = fh; in video_begin()
374 vv->video_status = STATUS_CAPTURE; in video_begin()
382 struct saa7146_vv *vv = dev->vv_data; in video_end() local
383 struct saa7146_dmaqueue *q = &vv->video_dmaq; in video_end()
390 if ((vv->video_status & STATUS_CAPTURE) != STATUS_CAPTURE) { in video_end()
395 if (vv->video_fh != fh) { in video_end()
400 fmt = saa7146_format_by_fourcc(dev, vv->video_fmt.pixelformat); in video_end()
428 vv->video_fh = NULL; in video_end()
429 vv->video_status = 0; in video_end()
433 if (vv->ov_suspend != NULL) { in video_end()
434 saa7146_start_preview(vv->ov_suspend); in video_end()
435 vv->ov_suspend = NULL; in video_end()
458 struct saa7146_vv *vv = dev->vv_data; in vidioc_g_fbuf() local
460 *fb = vv->ov_fb; in vidioc_g_fbuf()
469 struct saa7146_vv *vv = dev->vv_data; in vidioc_s_fbuf() local
489 if (vv->video_fh != fh) { in vidioc_s_fbuf()
496 vv->ov_fb = *fb; in vidioc_s_fbuf()
497 vv->ov_fmt = fmt; in vidioc_s_fbuf()
499 if (vv->ov_fb.fmt.bytesperline < vv->ov_fb.fmt.width) { in vidioc_s_fbuf()
500 vv->ov_fb.fmt.bytesperline = vv->ov_fb.fmt.width * fmt->depth / 8; in vidioc_s_fbuf()
501 DEB_D("setting bytesperline to %d\n", vv->ov_fb.fmt.bytesperline); in vidioc_s_fbuf()
518 struct saa7146_vv *vv = dev->vv_data; in saa7146_s_ctrl() local
548 if ((vv->video_status & STATUS_CAPTURE)) in saa7146_s_ctrl()
550 vv->hflip = ctrl->val; in saa7146_s_ctrl()
554 if ((vv->video_status & STATUS_CAPTURE)) in saa7146_s_ctrl()
556 vv->vflip = ctrl->val; in saa7146_s_ctrl()
563 if ((vv->video_status & STATUS_OVERLAY) != 0) { /* CHECK: && (vv->video_fh == fh)) */ in saa7146_s_ctrl()
564 struct saa7146_fh *fh = vv->video_fh; in saa7146_s_ctrl()
576 struct saa7146_vv *vv = dev->vv_data; in vidioc_g_parm() local
581 v4l2_video_std_frame_period(vv->standard->id, in vidioc_g_parm()
589 struct saa7146_vv *vv = dev->vv_data; in vidioc_g_fmt_vid_cap() local
591 f->fmt.pix = vv->video_fmt; in vidioc_g_fmt_vid_cap()
598 struct saa7146_vv *vv = dev->vv_data; in vidioc_g_fmt_vid_overlay() local
600 f->fmt.win = vv->ov.win; in vidioc_g_fmt_vid_overlay()
607 struct saa7146_vv *vv = dev->vv_data; in vidioc_g_fmt_vbi_cap() local
609 f->fmt.vbi = vv->vbi_fmt; in vidioc_g_fmt_vbi_cap()
616 struct saa7146_vv *vv = dev->vv_data; in vidioc_try_fmt_vid_cap() local
629 maxw = vv->standard->h_max_out; in vidioc_try_fmt_vid_cap()
630 maxh = vv->standard->v_max_out; in vidioc_try_fmt_vid_cap()
639 vv->last_field = V4L2_FIELD_TOP; in vidioc_try_fmt_vid_cap()
644 vv->last_field = V4L2_FIELD_INTERLACED; in vidioc_try_fmt_vid_cap()
648 vv->last_field = V4L2_FIELD_INTERLACED; in vidioc_try_fmt_vid_cap()
682 struct saa7146_vv *vv = dev->vv_data; in vidioc_try_fmt_vid_overlay() local
689 if (NULL == vv->ov_fb.base) { in vidioc_try_fmt_vid_overlay()
693 if (NULL == vv->ov_fmt) { in vidioc_try_fmt_vid_overlay()
708 maxw = vv->standard->h_max_out; in vidioc_try_fmt_vid_overlay()
709 maxh = vv->standard->v_max_out; in vidioc_try_fmt_vid_overlay()
742 struct saa7146_vv *vv = dev->vv_data; in vidioc_s_fmt_vid_cap() local
753 vv->video_fmt = f->fmt.pix; in vidioc_s_fmt_vid_cap()
755 (char *)&vv->video_fmt.pixelformat); in vidioc_s_fmt_vid_cap()
763 struct saa7146_vv *vv = dev->vv_data; in vidioc_s_fmt_vid_overlay() local
770 vv->ov.win = f->fmt.win; in vidioc_s_fmt_vid_overlay()
771 vv->ov.nclips = f->fmt.win.clipcount; in vidioc_s_fmt_vid_overlay()
772 if (vv->ov.nclips > 16) in vidioc_s_fmt_vid_overlay()
773 vv->ov.nclips = 16; in vidioc_s_fmt_vid_overlay()
774 if (copy_from_user(vv->ov.clips, f->fmt.win.clips, in vidioc_s_fmt_vid_overlay()
775 sizeof(struct v4l2_clip) * vv->ov.nclips)) { in vidioc_s_fmt_vid_overlay()
779 /* vv->ov.fh is used to indicate that we have valid overlay information, too */ in vidioc_s_fmt_vid_overlay()
780 vv->ov.fh = fh; in vidioc_s_fmt_vid_overlay()
793 struct saa7146_vv *vv = dev->vv_data; in vidioc_g_std() local
795 *norm = vv->standard->id; in vidioc_g_std()
820 struct saa7146_vv *vv = dev->vv_data; in vidioc_s_std() local
826 if ((vv->video_status & STATUS_CAPTURE) == STATUS_CAPTURE) { in vidioc_s_std()
831 if ((vv->video_status & STATUS_OVERLAY) != 0) { in vidioc_s_std()
832 vv->ov_suspend = vv->video_fh; in vidioc_s_std()
833 …err = saa7146_stop_preview(vv->video_fh); /* side effect: video_status is now 0, video_fh is NULL … in vidioc_s_std()
844 vv->standard = &dev->ext_vv_data->stds[i]; in vidioc_s_std()
846 dev->ext_vv_data->std_callback(dev, vv->standard); in vidioc_s_std()
850 if (vv->ov_suspend != NULL) { in vidioc_s_std()
851 saa7146_start_preview(vv->ov_suspend); in vidioc_s_std()
852 vv->ov_suspend = NULL; in vidioc_s_std()
860 DEB_EE("VIDIOC_S_STD: set to standard to '%s'\n", vv->standard->name); in vidioc_s_std()
941 struct saa7146_vv *vv = dev->vv_data; in vidioc_streamoff() local
949 if ((vv->video_status & STATUS_CAPTURE) != STATUS_CAPTURE) { in vidioc_streamoff()
954 if (vv->video_fh != fh) { in vidioc_streamoff()
1024 struct saa7146_vv *vv = dev->vv_data; in buffer_activate() local
1029 mod_timer(&vv->video_dmaq.timeout, jiffies+BUFFER_TIMEOUT); in buffer_activate()
1046 struct saa7146_vv *vv = dev->vv_data; in buffer_prepare() local
1053 if (vv->video_fmt.width < 48 || in buffer_prepare()
1054 vv->video_fmt.height < 32 || in buffer_prepare()
1055 vv->video_fmt.width > vv->standard->h_max_out || in buffer_prepare()
1056 vv->video_fmt.height > vv->standard->v_max_out) { in buffer_prepare()
1058 vv->video_fmt.width, vv->video_fmt.height); in buffer_prepare()
1062 size = vv->video_fmt.sizeimage; in buffer_prepare()
1069 vv->video_fmt.width, vv->video_fmt.height, in buffer_prepare()
1070 size, v4l2_field_names[vv->video_fmt.field]); in buffer_prepare()
1071 if (buf->vb.width != vv->video_fmt.width || in buffer_prepare()
1072 buf->vb.bytesperline != vv->video_fmt.bytesperline || in buffer_prepare()
1073 buf->vb.height != vv->video_fmt.height || in buffer_prepare()
1076 buf->vb.field != vv->video_fmt.field || in buffer_prepare()
1077 buf->fmt != &vv->video_fmt) { in buffer_prepare()
1084 buf->vb.bytesperline = vv->video_fmt.bytesperline; in buffer_prepare()
1085 buf->vb.width = vv->video_fmt.width; in buffer_prepare()
1086 buf->vb.height = vv->video_fmt.height; in buffer_prepare()
1089 buf->fmt = &vv->video_fmt; in buffer_prepare()
1090 buf->vb.field = vv->video_fmt.field; in buffer_prepare()
1103 err = videobuf_iolock(q,&buf->vb, &vv->ov_fb); in buffer_prepare()
1126 struct saa7146_vv *vv = fh->dev->vv_data; in buffer_setup() local
1131 *size = vv->video_fmt.sizeimage; in buffer_setup()
1148 struct saa7146_vv *vv = dev->vv_data; in buffer_queue() local
1152 saa7146_buffer_queue(fh->dev, &vv->video_dmaq, buf); in buffer_queue()
1179 static void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv) in video_init() argument
1181 INIT_LIST_HEAD(&vv->video_dmaq.queue); in video_init()
1183 timer_setup(&vv->video_dmaq.timeout, saa7146_buffer_timeout, 0); in video_init()
1184 vv->video_dmaq.dev = dev; in video_init()
1187 vv->standard = &dev->ext_vv_data->stds[0]; in video_init()
1190 vv->current_hps_source = SAA7146_HPS_SOURCE_PORT_A; in video_init()
1191 vv->current_hps_sync = SAA7146_HPS_SYNC_PORT_A; in video_init()
1213 struct saa7146_vv *vv = dev->vv_data; in video_close() local
1228 struct saa7146_vv *vv = dev->vv_data; in video_irq_done() local
1229 struct saa7146_dmaqueue *q = &vv->video_dmaq; in video_irq_done()
1247 struct saa7146_vv *vv = dev->vv_data; in video_read() local
1252 if ((vv->video_status & STATUS_CAPTURE) != 0) { in video_read()
1254 if (vv->video_fh == fh) { in video_read()
1276 if (vv->ov_suspend != NULL) { in video_read()
1277 saa7146_start_preview(vv->ov_suspend); in video_read()
1278 vv->ov_suspend = NULL; in video_read()