Lines Matching refs:vv
15 (((vv->video_status & STATUS_CAPTURE) != 0) && (vv->video_fh == fh))
18 (((vv->video_status & STATUS_OVERLAY) != 0) && (vv->video_fh == fh))
109 struct saa7146_vv *vv = dev->vv_data; in saa7146_start_preview() local
116 if (vv->ov.fh == NULL) { in saa7146_start_preview()
129 if (vv->video_fh == fh) { in saa7146_start_preview()
142 fmt.fmt.win = vv->ov.win; in saa7146_start_preview()
145 saa7146_res_free(vv->video_fh, RESOURCE_DMA1_HPS|RESOURCE_DMA2_CLP); in saa7146_start_preview()
148 vv->ov.win = fmt.fmt.win; in saa7146_start_preview()
151 vv->ov.win.w.width, vv->ov.win.w.height, in saa7146_start_preview()
152 vv->ov.win.w.left, vv->ov.win.w.top, in saa7146_start_preview()
153 vv->ov_fmt->name, v4l2_field_names[vv->ov.win.field]); in saa7146_start_preview()
157 saa7146_res_free(vv->video_fh, RESOURCE_DMA1_HPS|RESOURCE_DMA2_CLP); in saa7146_start_preview()
161 vv->video_status = STATUS_OVERLAY; in saa7146_start_preview()
162 vv->video_fh = fh; in saa7146_start_preview()
171 struct saa7146_vv *vv = dev->vv_data; in saa7146_stop_preview() local
182 if ((vv->video_status & STATUS_OVERLAY) == 0) { in saa7146_stop_preview()
187 if (vv->video_fh != fh) { in saa7146_stop_preview()
192 vv->video_status = 0; in saa7146_stop_preview()
193 vv->video_fh = NULL; in saa7146_stop_preview()
330 struct saa7146_vv *vv = dev->vv_data; in video_begin() local
337 if ((vv->video_status & STATUS_CAPTURE) != 0) { in video_begin()
338 if (vv->video_fh == fh) { in video_begin()
346 if ((vv->video_status & STATUS_OVERLAY) != 0) { in video_begin()
348 vv->ov_suspend = vv->video_fh; in video_begin()
349 …err = saa7146_stop_preview(vv->video_fh); /* side effect: video_status is now 0, video_fh is NULL … in video_begin()
356 fmt = saa7146_format_by_fourcc(dev, vv->video_fmt.pixelformat); in video_begin()
369 if (vv->ov_suspend != NULL) { in video_begin()
370 saa7146_start_preview(vv->ov_suspend); in video_begin()
371 vv->ov_suspend = NULL; in video_begin()
382 vv->video_fh = fh; in video_begin()
383 vv->video_status = STATUS_CAPTURE; in video_begin()
391 struct saa7146_vv *vv = dev->vv_data; in video_end() local
392 struct saa7146_dmaqueue *q = &vv->video_dmaq; in video_end()
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()
436 vv->video_fh = NULL; in video_end()
437 vv->video_status = 0; in video_end()
441 if (vv->ov_suspend != NULL) { in video_end()
442 saa7146_start_preview(vv->ov_suspend); in video_end()
443 vv->ov_suspend = NULL; in video_end()
476 struct saa7146_vv *vv = dev->vv_data; in vidioc_g_fbuf() local
478 *fb = vv->ov_fb; in vidioc_g_fbuf()
487 struct saa7146_vv *vv = dev->vv_data; in vidioc_s_fbuf() local
507 if (vv->video_fh != fh) { in vidioc_s_fbuf()
514 vv->ov_fb = *fb; in vidioc_s_fbuf()
515 vv->ov_fmt = fmt; in vidioc_s_fbuf()
517 if (vv->ov_fb.fmt.bytesperline < vv->ov_fb.fmt.width) { in vidioc_s_fbuf()
518 vv->ov_fb.fmt.bytesperline = vv->ov_fb.fmt.width * fmt->depth / 8; in vidioc_s_fbuf()
519 DEB_D("setting bytesperline to %d\n", vv->ov_fb.fmt.bytesperline); in vidioc_s_fbuf()
538 struct saa7146_vv *vv = dev->vv_data; in saa7146_s_ctrl() local
568 if ((vv->video_status & STATUS_CAPTURE)) in saa7146_s_ctrl()
570 vv->hflip = ctrl->val; in saa7146_s_ctrl()
574 if ((vv->video_status & STATUS_CAPTURE)) in saa7146_s_ctrl()
576 vv->vflip = ctrl->val; in saa7146_s_ctrl()
583 if ((vv->video_status & STATUS_OVERLAY) != 0) { /* CHECK: && (vv->video_fh == fh)) */ in saa7146_s_ctrl()
584 struct saa7146_fh *fh = vv->video_fh; in saa7146_s_ctrl()
596 struct saa7146_vv *vv = dev->vv_data; in vidioc_g_parm() local
601 v4l2_video_std_frame_period(vv->standard->id, in vidioc_g_parm()
609 struct saa7146_vv *vv = dev->vv_data; in vidioc_g_fmt_vid_cap() local
611 f->fmt.pix = vv->video_fmt; in vidioc_g_fmt_vid_cap()
618 struct saa7146_vv *vv = dev->vv_data; in vidioc_g_fmt_vid_overlay() local
620 f->fmt.win = vv->ov.win; in vidioc_g_fmt_vid_overlay()
627 struct saa7146_vv *vv = dev->vv_data; in vidioc_g_fmt_vbi_cap() local
629 f->fmt.vbi = vv->vbi_fmt; in vidioc_g_fmt_vbi_cap()
636 struct saa7146_vv *vv = dev->vv_data; in vidioc_try_fmt_vid_cap() local
649 maxw = vv->standard->h_max_out; in vidioc_try_fmt_vid_cap()
650 maxh = vv->standard->v_max_out; in vidioc_try_fmt_vid_cap()
659 vv->last_field = V4L2_FIELD_TOP; in vidioc_try_fmt_vid_cap()
664 vv->last_field = V4L2_FIELD_INTERLACED; in vidioc_try_fmt_vid_cap()
668 vv->last_field = V4L2_FIELD_INTERLACED; in vidioc_try_fmt_vid_cap()
702 struct saa7146_vv *vv = dev->vv_data; in vidioc_try_fmt_vid_overlay() local
709 if (NULL == vv->ov_fb.base) { in vidioc_try_fmt_vid_overlay()
713 if (NULL == vv->ov_fmt) { in vidioc_try_fmt_vid_overlay()
728 maxw = vv->standard->h_max_out; in vidioc_try_fmt_vid_overlay()
729 maxh = vv->standard->v_max_out; in vidioc_try_fmt_vid_overlay()
762 struct saa7146_vv *vv = dev->vv_data; in vidioc_s_fmt_vid_cap() local
773 vv->video_fmt = f->fmt.pix; in vidioc_s_fmt_vid_cap()
775 (char *)&vv->video_fmt.pixelformat); in vidioc_s_fmt_vid_cap()
783 struct saa7146_vv *vv = dev->vv_data; in vidioc_s_fmt_vid_overlay() local
790 vv->ov.win = f->fmt.win; in vidioc_s_fmt_vid_overlay()
791 vv->ov.nclips = f->fmt.win.clipcount; in vidioc_s_fmt_vid_overlay()
792 if (vv->ov.nclips > 16) in vidioc_s_fmt_vid_overlay()
793 vv->ov.nclips = 16; in vidioc_s_fmt_vid_overlay()
794 if (copy_from_user(vv->ov.clips, f->fmt.win.clips, in vidioc_s_fmt_vid_overlay()
795 sizeof(struct v4l2_clip) * vv->ov.nclips)) { in vidioc_s_fmt_vid_overlay()
800 vv->ov.fh = fh; in vidioc_s_fmt_vid_overlay()
813 struct saa7146_vv *vv = dev->vv_data; in vidioc_g_std() local
815 *norm = vv->standard->id; in vidioc_g_std()
840 struct saa7146_vv *vv = dev->vv_data; in vidioc_s_std() local
846 if ((vv->video_status & STATUS_CAPTURE) == STATUS_CAPTURE) { in vidioc_s_std()
851 if ((vv->video_status & STATUS_OVERLAY) != 0) { in vidioc_s_std()
852 vv->ov_suspend = vv->video_fh; in vidioc_s_std()
853 …err = saa7146_stop_preview(vv->video_fh); /* side effect: video_status is now 0, video_fh is NULL … in vidioc_s_std()
864 vv->standard = &dev->ext_vv_data->stds[i]; in vidioc_s_std()
866 dev->ext_vv_data->std_callback(dev, vv->standard); in vidioc_s_std()
870 if (vv->ov_suspend != NULL) { in vidioc_s_std()
871 saa7146_start_preview(vv->ov_suspend); in vidioc_s_std()
872 vv->ov_suspend = NULL; in vidioc_s_std()
880 DEB_EE("VIDIOC_S_STD: set to standard to '%s'\n", vv->standard->name); in vidioc_s_std()
961 struct saa7146_vv *vv = dev->vv_data; in vidioc_streamoff() local
969 if ((vv->video_status & STATUS_CAPTURE) != STATUS_CAPTURE) { in vidioc_streamoff()
974 if (vv->video_fh != fh) { in vidioc_streamoff()
1044 struct saa7146_vv *vv = dev->vv_data; in buffer_activate() local
1049 mod_timer(&vv->video_dmaq.timeout, jiffies+BUFFER_TIMEOUT); in buffer_activate()
1066 struct saa7146_vv *vv = dev->vv_data; in buffer_prepare() local
1073 if (vv->video_fmt.width < 48 || in buffer_prepare()
1074 vv->video_fmt.height < 32 || in buffer_prepare()
1075 vv->video_fmt.width > vv->standard->h_max_out || in buffer_prepare()
1076 vv->video_fmt.height > vv->standard->v_max_out) { in buffer_prepare()
1078 vv->video_fmt.width, vv->video_fmt.height); in buffer_prepare()
1082 size = vv->video_fmt.sizeimage; in buffer_prepare()
1089 vv->video_fmt.width, vv->video_fmt.height, in buffer_prepare()
1090 size, v4l2_field_names[vv->video_fmt.field]); in buffer_prepare()
1091 if (buf->vb.width != vv->video_fmt.width || in buffer_prepare()
1092 buf->vb.bytesperline != vv->video_fmt.bytesperline || in buffer_prepare()
1093 buf->vb.height != vv->video_fmt.height || in buffer_prepare()
1096 buf->vb.field != vv->video_fmt.field || in buffer_prepare()
1097 buf->fmt != &vv->video_fmt) { in buffer_prepare()
1104 buf->vb.bytesperline = vv->video_fmt.bytesperline; in buffer_prepare()
1105 buf->vb.width = vv->video_fmt.width; in buffer_prepare()
1106 buf->vb.height = vv->video_fmt.height; in buffer_prepare()
1109 buf->fmt = &vv->video_fmt; in buffer_prepare()
1110 buf->vb.field = vv->video_fmt.field; in buffer_prepare()
1123 err = videobuf_iolock(q,&buf->vb, &vv->ov_fb); in buffer_prepare()
1146 struct saa7146_vv *vv = fh->dev->vv_data; in buffer_setup() local
1151 *size = vv->video_fmt.sizeimage; in buffer_setup()
1168 struct saa7146_vv *vv = dev->vv_data; in buffer_queue() local
1172 saa7146_buffer_queue(fh->dev, &vv->video_dmaq, buf); in buffer_queue()
1199 static void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv) in video_init() argument
1201 INIT_LIST_HEAD(&vv->video_dmaq.queue); in video_init()
1203 timer_setup(&vv->video_dmaq.timeout, saa7146_buffer_timeout, 0); in video_init()
1204 vv->video_dmaq.dev = dev; in video_init()
1207 vv->standard = &dev->ext_vv_data->stds[0]; in video_init()
1210 vv->current_hps_source = SAA7146_HPS_SOURCE_PORT_A; in video_init()
1211 vv->current_hps_sync = SAA7146_HPS_SYNC_PORT_A; in video_init()
1233 struct saa7146_vv *vv = dev->vv_data; in video_close() local
1248 struct saa7146_vv *vv = dev->vv_data; in video_irq_done() local
1249 struct saa7146_dmaqueue *q = &vv->video_dmaq; in video_irq_done()
1267 struct saa7146_vv *vv = dev->vv_data; in video_read() local
1272 if ((vv->video_status & STATUS_CAPTURE) != 0) { in video_read()
1274 if (vv->video_fh == fh) { in video_read()
1296 if (vv->ov_suspend != NULL) { in video_read()
1297 saa7146_start_preview(vv->ov_suspend); in video_read()
1298 vv->ov_suspend = NULL; in video_read()