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))
99 struct saa7146_vv *vv = dev->vv_data;
106 if (vv->ov.fh == NULL) {
119 if (vv->video_fh == fh) {
132 fmt.fmt.win = vv->ov.win;
135 saa7146_res_free(vv->video_fh, RESOURCE_DMA1_HPS|RESOURCE_DMA2_CLP);
138 vv->ov.win = fmt.fmt.win;
141 vv->ov.win.w.width, vv->ov.win.w.height,
142 vv->ov.win.w.left, vv->ov.win.w.top,
143 vv->ov_fmt->pixelformat, v4l2_field_names[vv->ov.win.field]);
147 saa7146_res_free(vv->video_fh, RESOURCE_DMA1_HPS|RESOURCE_DMA2_CLP);
151 vv->video_status = STATUS_OVERLAY;
152 vv->video_fh = fh;
161 struct saa7146_vv *vv = dev->vv_data;
172 if ((vv->video_status & STATUS_OVERLAY) == 0) {
177 if (vv->video_fh != fh) {
182 vv->video_status = 0;
183 vv->video_fh = NULL;
319 struct saa7146_vv *vv = dev->vv_data;
326 if ((vv->video_status & STATUS_CAPTURE) != 0) {
327 if (vv->video_fh == fh) {
335 if ((vv->video_status & STATUS_OVERLAY) != 0) {
337 vv->ov_suspend = vv->video_fh;
338 err = saa7146_stop_preview(vv->video_fh); /* side effect: video_status is now 0, video_fh is NULL */
345 fmt = saa7146_format_by_fourcc(dev, vv->video_fmt.pixelformat);
359 if (vv->ov_suspend != NULL) {
360 saa7146_start_preview(vv->ov_suspend);
361 vv->ov_suspend = NULL;
372 vv->video_fh = fh;
373 vv->video_status = STATUS_CAPTURE;
381 struct saa7146_vv *vv = dev->vv_data;
382 struct saa7146_dmaqueue *q = &vv->video_dmaq;
389 if ((vv->video_status & STATUS_CAPTURE) != STATUS_CAPTURE) {
394 if (vv->video_fh != fh) {
399 fmt = saa7146_format_by_fourcc(dev, vv->video_fmt.pixelformat);
427 vv->video_fh = NULL;
428 vv->video_status = 0;
432 if (vv->ov_suspend != NULL) {
433 saa7146_start_preview(vv->ov_suspend);
434 vv->ov_suspend = NULL;
457 struct saa7146_vv *vv = dev->vv_data;
459 *fb = vv->ov_fb;
468 struct saa7146_vv *vv = dev->vv_data;
488 if (vv->video_fh != fh) {
495 vv->ov_fb = *fb;
496 vv->ov_fmt = fmt;
498 if (vv->ov_fb.fmt.bytesperline < vv->ov_fb.fmt.width) {
499 vv->ov_fb.fmt.bytesperline = vv->ov_fb.fmt.width * fmt->depth / 8;
500 DEB_D("setting bytesperline to %d\n", vv->ov_fb.fmt.bytesperline);
517 struct saa7146_vv *vv = dev->vv_data;
547 if ((vv->video_status & STATUS_CAPTURE))
549 vv->hflip = ctrl->val;
553 if ((vv->video_status & STATUS_CAPTURE))
555 vv->vflip = ctrl->val;
562 if ((vv->video_status & STATUS_OVERLAY) != 0) { /* CHECK: && (vv->video_fh == fh)) */
563 struct saa7146_fh *fh = vv->video_fh;
575 struct saa7146_vv *vv = dev->vv_data;
580 v4l2_video_std_frame_period(vv->standard->id,
588 struct saa7146_vv *vv = dev->vv_data;
590 f->fmt.pix = vv->video_fmt;
597 struct saa7146_vv *vv = dev->vv_data;
599 f->fmt.win = vv->ov.win;
606 struct saa7146_vv *vv = dev->vv_data;
608 f->fmt.vbi = vv->vbi_fmt;
615 struct saa7146_vv *vv = dev->vv_data;
628 maxw = vv->standard->h_max_out;
629 maxh = vv->standard->v_max_out;
638 vv->last_field = V4L2_FIELD_TOP;
643 vv->last_field = V4L2_FIELD_INTERLACED;
647 vv->last_field = V4L2_FIELD_INTERLACED;
681 struct saa7146_vv *vv = dev->vv_data;
688 if (NULL == vv->ov_fb.base) {
692 if (NULL == vv->ov_fmt) {
707 maxw = vv->standard->h_max_out;
708 maxh = vv->standard->v_max_out;
741 struct saa7146_vv *vv = dev->vv_data;
752 vv->video_fmt = f->fmt.pix;
754 (char *)&vv->video_fmt.pixelformat);
762 struct saa7146_vv *vv = dev->vv_data;
769 vv->ov.win = f->fmt.win;
770 vv->ov.nclips = f->fmt.win.clipcount;
771 if (vv->ov.nclips > 16)
772 vv->ov.nclips = 16;
773 if (copy_from_user(vv->ov.clips, f->fmt.win.clips,
774 sizeof(struct v4l2_clip) * vv->ov.nclips)) {
778 /* vv->ov.fh is used to indicate that we have valid overlay information, too */
779 vv->ov.fh = fh;
792 struct saa7146_vv *vv = dev->vv_data;
794 *norm = vv->standard->id;
819 struct saa7146_vv *vv = dev->vv_data;
825 if ((vv->video_status & STATUS_CAPTURE) == STATUS_CAPTURE) {
830 if ((vv->video_status & STATUS_OVERLAY) != 0) {
831 vv->ov_suspend = vv->video_fh;
832 err = saa7146_stop_preview(vv->video_fh); /* side effect: video_status is now 0, video_fh is NULL */
843 vv->standard = &dev->ext_vv_data->stds[i];
845 dev->ext_vv_data->std_callback(dev, vv->standard);
849 if (vv->ov_suspend != NULL) {
850 saa7146_start_preview(vv->ov_suspend);
851 vv->ov_suspend = NULL;
859 DEB_EE("VIDIOC_S_STD: set to standard to '%s'\n", vv->standard->name);
940 struct saa7146_vv *vv = dev->vv_data;
948 if ((vv->video_status & STATUS_CAPTURE) != STATUS_CAPTURE) {
953 if (vv->video_fh != fh) {
1023 struct saa7146_vv *vv = dev->vv_data;
1028 mod_timer(&vv->video_dmaq.timeout, jiffies+BUFFER_TIMEOUT);
1045 struct saa7146_vv *vv = dev->vv_data;
1052 if (vv->video_fmt.width < 48 ||
1053 vv->video_fmt.height < 32 ||
1054 vv->video_fmt.width > vv->standard->h_max_out ||
1055 vv->video_fmt.height > vv->standard->v_max_out) {
1057 vv->video_fmt.width, vv->video_fmt.height);
1061 size = vv->video_fmt.sizeimage;
1068 vv->video_fmt.width, vv->video_fmt.height,
1069 size, v4l2_field_names[vv->video_fmt.field]);
1070 if (buf->vb.width != vv->video_fmt.width ||
1071 buf->vb.bytesperline != vv->video_fmt.bytesperline ||
1072 buf->vb.height != vv->video_fmt.height ||
1075 buf->vb.field != vv->video_fmt.field ||
1076 buf->fmt != &vv->video_fmt) {
1083 buf->vb.bytesperline = vv->video_fmt.bytesperline;
1084 buf->vb.width = vv->video_fmt.width;
1085 buf->vb.height = vv->video_fmt.height;
1088 buf->fmt = &vv->video_fmt;
1089 buf->vb.field = vv->video_fmt.field;
1102 err = videobuf_iolock(q,&buf->vb, &vv->ov_fb);
1125 struct saa7146_vv *vv = fh->dev->vv_data;
1130 *size = vv->video_fmt.sizeimage;
1147 struct saa7146_vv *vv = dev->vv_data;
1151 saa7146_buffer_queue(fh->dev, &vv->video_dmaq, buf);
1178 static void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
1180 INIT_LIST_HEAD(&vv->video_dmaq.queue);
1182 timer_setup(&vv->video_dmaq.timeout, saa7146_buffer_timeout, 0);
1183 vv->video_dmaq.dev = dev;
1186 vv->standard = &dev->ext_vv_data->stds[0];
1189 vv->current_hps_source = SAA7146_HPS_SOURCE_PORT_A;
1190 vv->current_hps_sync = SAA7146_HPS_SYNC_PORT_A;
1212 struct saa7146_vv *vv = dev->vv_data;
1227 struct saa7146_vv *vv = dev->vv_data;
1228 struct saa7146_dmaqueue *q = &vv->video_dmaq;
1246 struct saa7146_vv *vv = dev->vv_data;
1251 if ((vv->video_status & STATUS_CAPTURE) != 0) {
1253 if (vv->video_fh == fh) {
1275 if (vv->ov_suspend != NULL) {
1276 saa7146_start_preview(vv->ov_suspend);
1277 vv->ov_suspend = NULL;