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()
319 struct saa7146_vv *vv = dev->vv_data; in video_begin() local
326 if ((vv->video_status & STATUS_CAPTURE) != 0) { in video_begin()
327 if (vv->video_fh == fh) { in video_begin()
335 if ((vv->video_status & STATUS_OVERLAY) != 0) { in video_begin()
337 vv->ov_suspend = vv->video_fh; in video_begin()
338 …err = saa7146_stop_preview(vv->video_fh); /* side effect: video_status is now 0, video_fh is NULL … in video_begin()
345 fmt = saa7146_format_by_fourcc(dev, vv->video_fmt.pixelformat); in video_begin()
359 if (vv->ov_suspend != NULL) { in video_begin()
360 saa7146_start_preview(vv->ov_suspend); in video_begin()
361 vv->ov_suspend = NULL; in video_begin()
372 vv->video_fh = fh; in video_begin()
373 vv->video_status = STATUS_CAPTURE; in video_begin()
381 struct saa7146_vv *vv = dev->vv_data; in video_end() local
382 struct saa7146_dmaqueue *q = &vv->video_dmaq; in video_end()
389 if ((vv->video_status & STATUS_CAPTURE) != STATUS_CAPTURE) { in video_end()
394 if (vv->video_fh != fh) { in video_end()
399 fmt = saa7146_format_by_fourcc(dev, vv->video_fmt.pixelformat); in video_end()
427 vv->video_fh = NULL; in video_end()
428 vv->video_status = 0; in video_end()
432 if (vv->ov_suspend != NULL) { in video_end()
433 saa7146_start_preview(vv->ov_suspend); in video_end()
434 vv->ov_suspend = NULL; in video_end()
457 struct saa7146_vv *vv = dev->vv_data; in vidioc_g_fbuf() local
459 *fb = vv->ov_fb; in vidioc_g_fbuf()
468 struct saa7146_vv *vv = dev->vv_data; in vidioc_s_fbuf() local
488 if (vv->video_fh != fh) { in vidioc_s_fbuf()
495 vv->ov_fb = *fb; in vidioc_s_fbuf()
496 vv->ov_fmt = fmt; in vidioc_s_fbuf()
498 if (vv->ov_fb.fmt.bytesperline < vv->ov_fb.fmt.width) { in vidioc_s_fbuf()
499 vv->ov_fb.fmt.bytesperline = vv->ov_fb.fmt.width * fmt->depth / 8; in vidioc_s_fbuf()
500 DEB_D("setting bytesperline to %d\n", vv->ov_fb.fmt.bytesperline); in vidioc_s_fbuf()
517 struct saa7146_vv *vv = dev->vv_data; in saa7146_s_ctrl() local
547 if ((vv->video_status & STATUS_CAPTURE)) in saa7146_s_ctrl()
549 vv->hflip = ctrl->val; in saa7146_s_ctrl()
553 if ((vv->video_status & STATUS_CAPTURE)) in saa7146_s_ctrl()
555 vv->vflip = ctrl->val; in saa7146_s_ctrl()
562 if ((vv->video_status & STATUS_OVERLAY) != 0) { /* CHECK: && (vv->video_fh == fh)) */ in saa7146_s_ctrl()
563 struct saa7146_fh *fh = vv->video_fh; in saa7146_s_ctrl()
575 struct saa7146_vv *vv = dev->vv_data; in vidioc_g_parm() local
580 v4l2_video_std_frame_period(vv->standard->id, in vidioc_g_parm()
588 struct saa7146_vv *vv = dev->vv_data; in vidioc_g_fmt_vid_cap() local
590 f->fmt.pix = vv->video_fmt; in vidioc_g_fmt_vid_cap()
597 struct saa7146_vv *vv = dev->vv_data; in vidioc_g_fmt_vid_overlay() local
599 f->fmt.win = vv->ov.win; in vidioc_g_fmt_vid_overlay()
606 struct saa7146_vv *vv = dev->vv_data; in vidioc_g_fmt_vbi_cap() local
608 f->fmt.vbi = vv->vbi_fmt; in vidioc_g_fmt_vbi_cap()
615 struct saa7146_vv *vv = dev->vv_data; in vidioc_try_fmt_vid_cap() local
628 maxw = vv->standard->h_max_out; in vidioc_try_fmt_vid_cap()
629 maxh = vv->standard->v_max_out; in vidioc_try_fmt_vid_cap()
638 vv->last_field = V4L2_FIELD_TOP; in vidioc_try_fmt_vid_cap()
643 vv->last_field = V4L2_FIELD_INTERLACED; in vidioc_try_fmt_vid_cap()
647 vv->last_field = V4L2_FIELD_INTERLACED; in vidioc_try_fmt_vid_cap()
681 struct saa7146_vv *vv = dev->vv_data; in vidioc_try_fmt_vid_overlay() local
688 if (NULL == vv->ov_fb.base) { in vidioc_try_fmt_vid_overlay()
692 if (NULL == vv->ov_fmt) { in vidioc_try_fmt_vid_overlay()
707 maxw = vv->standard->h_max_out; in vidioc_try_fmt_vid_overlay()
708 maxh = vv->standard->v_max_out; in vidioc_try_fmt_vid_overlay()
741 struct saa7146_vv *vv = dev->vv_data; in vidioc_s_fmt_vid_cap() local
752 vv->video_fmt = f->fmt.pix; in vidioc_s_fmt_vid_cap()
754 (char *)&vv->video_fmt.pixelformat); in vidioc_s_fmt_vid_cap()
762 struct saa7146_vv *vv = dev->vv_data; in vidioc_s_fmt_vid_overlay() local
769 vv->ov.win = f->fmt.win; in vidioc_s_fmt_vid_overlay()
770 vv->ov.nclips = f->fmt.win.clipcount; in vidioc_s_fmt_vid_overlay()
771 if (vv->ov.nclips > 16) in vidioc_s_fmt_vid_overlay()
772 vv->ov.nclips = 16; in vidioc_s_fmt_vid_overlay()
773 memcpy(vv->ov.clips, f->fmt.win.clips, in vidioc_s_fmt_vid_overlay()
774 sizeof(struct v4l2_clip) * vv->ov.nclips); in vidioc_s_fmt_vid_overlay()
776 /* vv->ov.fh is used to indicate that we have valid overlay information, too */ in vidioc_s_fmt_vid_overlay()
777 vv->ov.fh = fh; in vidioc_s_fmt_vid_overlay()
790 struct saa7146_vv *vv = dev->vv_data; in vidioc_g_std() local
792 *norm = vv->standard->id; in vidioc_g_std()
817 struct saa7146_vv *vv = dev->vv_data; in vidioc_s_std() local
823 if ((vv->video_status & STATUS_CAPTURE) == STATUS_CAPTURE) { in vidioc_s_std()
828 if ((vv->video_status & STATUS_OVERLAY) != 0) { in vidioc_s_std()
829 vv->ov_suspend = vv->video_fh; in vidioc_s_std()
830 …err = saa7146_stop_preview(vv->video_fh); /* side effect: video_status is now 0, video_fh is NULL … in vidioc_s_std()
841 vv->standard = &dev->ext_vv_data->stds[i]; in vidioc_s_std()
843 dev->ext_vv_data->std_callback(dev, vv->standard); in vidioc_s_std()
847 if (vv->ov_suspend != NULL) { in vidioc_s_std()
848 saa7146_start_preview(vv->ov_suspend); in vidioc_s_std()
849 vv->ov_suspend = NULL; in vidioc_s_std()
857 DEB_EE("VIDIOC_S_STD: set to standard to '%s'\n", vv->standard->name); in vidioc_s_std()
938 struct saa7146_vv *vv = dev->vv_data; in vidioc_streamoff() local
946 if ((vv->video_status & STATUS_CAPTURE) != STATUS_CAPTURE) { in vidioc_streamoff()
951 if (vv->video_fh != fh) { in vidioc_streamoff()
1021 struct saa7146_vv *vv = dev->vv_data; in buffer_activate() local
1026 mod_timer(&vv->video_dmaq.timeout, jiffies+BUFFER_TIMEOUT); in buffer_activate()
1043 struct saa7146_vv *vv = dev->vv_data; in buffer_prepare() local
1050 if (vv->video_fmt.width < 48 || in buffer_prepare()
1051 vv->video_fmt.height < 32 || in buffer_prepare()
1052 vv->video_fmt.width > vv->standard->h_max_out || in buffer_prepare()
1053 vv->video_fmt.height > vv->standard->v_max_out) { in buffer_prepare()
1055 vv->video_fmt.width, vv->video_fmt.height); in buffer_prepare()
1059 size = vv->video_fmt.sizeimage; in buffer_prepare()
1066 vv->video_fmt.width, vv->video_fmt.height, in buffer_prepare()
1067 size, v4l2_field_names[vv->video_fmt.field]); in buffer_prepare()
1068 if (buf->vb.width != vv->video_fmt.width || in buffer_prepare()
1069 buf->vb.bytesperline != vv->video_fmt.bytesperline || in buffer_prepare()
1070 buf->vb.height != vv->video_fmt.height || in buffer_prepare()
1073 buf->vb.field != vv->video_fmt.field || in buffer_prepare()
1074 buf->fmt != &vv->video_fmt) { in buffer_prepare()
1081 buf->vb.bytesperline = vv->video_fmt.bytesperline; in buffer_prepare()
1082 buf->vb.width = vv->video_fmt.width; in buffer_prepare()
1083 buf->vb.height = vv->video_fmt.height; in buffer_prepare()
1086 buf->fmt = &vv->video_fmt; in buffer_prepare()
1087 buf->vb.field = vv->video_fmt.field; in buffer_prepare()
1100 err = videobuf_iolock(q,&buf->vb, &vv->ov_fb); in buffer_prepare()
1123 struct saa7146_vv *vv = fh->dev->vv_data; in buffer_setup() local
1128 *size = vv->video_fmt.sizeimage; in buffer_setup()
1145 struct saa7146_vv *vv = dev->vv_data; in buffer_queue() local
1149 saa7146_buffer_queue(fh->dev, &vv->video_dmaq, buf); in buffer_queue()
1176 static void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv) in video_init() argument
1178 INIT_LIST_HEAD(&vv->video_dmaq.queue); in video_init()
1180 timer_setup(&vv->video_dmaq.timeout, saa7146_buffer_timeout, 0); in video_init()
1181 vv->video_dmaq.dev = dev; in video_init()
1184 vv->standard = &dev->ext_vv_data->stds[0]; in video_init()
1187 vv->current_hps_source = SAA7146_HPS_SOURCE_PORT_A; in video_init()
1188 vv->current_hps_sync = SAA7146_HPS_SYNC_PORT_A; in video_init()
1210 struct saa7146_vv *vv = dev->vv_data; in video_close() local
1225 struct saa7146_vv *vv = dev->vv_data; in video_irq_done() local
1226 struct saa7146_dmaqueue *q = &vv->video_dmaq; in video_irq_done()
1244 struct saa7146_vv *vv = dev->vv_data; in video_read() local
1249 if ((vv->video_status & STATUS_CAPTURE) != 0) { in video_read()
1251 if (vv->video_fh == fh) { in video_read()
1273 if (vv->ov_suspend != NULL) { in video_read()
1274 saa7146_start_preview(vv->ov_suspend); in video_read()
1275 vv->ov_suspend = NULL; in video_read()