Lines Matching refs:dev

18 static void vivid_sliced_vbi_cap_fill(struct vivid_dev *dev, unsigned seqnr)  in vivid_sliced_vbi_cap_fill()  argument
20 struct vivid_vbi_gen_data *vbi_gen = &dev->vbi_gen; in vivid_sliced_vbi_cap_fill()
21 bool is_60hz = dev->std_cap[dev->input] & V4L2_STD_525_60; in vivid_sliced_vbi_cap_fill()
26 if (dev->loop_video) { in vivid_sliced_vbi_cap_fill()
27 if (dev->vbi_out_have_wss) { in vivid_sliced_vbi_cap_fill()
28 vbi_gen->data[12].data[0] = dev->vbi_out_wss[0]; in vivid_sliced_vbi_cap_fill()
29 vbi_gen->data[12].data[1] = dev->vbi_out_wss[1]; in vivid_sliced_vbi_cap_fill()
34 switch (tpg_g_video_aspect(&dev->tpg)) { in vivid_sliced_vbi_cap_fill()
50 } else if (dev->loop_video && is_60hz) { in vivid_sliced_vbi_cap_fill()
51 if (dev->vbi_out_have_cc[0]) { in vivid_sliced_vbi_cap_fill()
52 vbi_gen->data[0].data[0] = dev->vbi_out_cc[0][0]; in vivid_sliced_vbi_cap_fill()
53 vbi_gen->data[0].data[1] = dev->vbi_out_cc[0][1]; in vivid_sliced_vbi_cap_fill()
57 if (dev->vbi_out_have_cc[1]) { in vivid_sliced_vbi_cap_fill()
58 vbi_gen->data[1].data[0] = dev->vbi_out_cc[1][0]; in vivid_sliced_vbi_cap_fill()
59 vbi_gen->data[1].data[1] = dev->vbi_out_cc[1][1]; in vivid_sliced_vbi_cap_fill()
66 static void vivid_g_fmt_vbi_cap(struct vivid_dev *dev, struct v4l2_vbi_format *vbi) in vivid_g_fmt_vbi_cap() argument
68 bool is_60hz = dev->std_cap[dev->input] & V4L2_STD_525_60; in vivid_g_fmt_vbi_cap()
77 vbi->flags = dev->vbi_cap_interlaced ? V4L2_VBI_INTERLACED : 0; in vivid_g_fmt_vbi_cap()
82 void vivid_raw_vbi_cap_process(struct vivid_dev *dev, struct vivid_buffer *buf) in vivid_raw_vbi_cap_process() argument
87 vivid_g_fmt_vbi_cap(dev, &vbi); in vivid_raw_vbi_cap_process()
88 buf->vb.sequence = dev->vbi_cap_seq_count; in vivid_raw_vbi_cap_process()
89 if (dev->field_cap == V4L2_FIELD_ALTERNATE) in vivid_raw_vbi_cap_process()
92 vivid_sliced_vbi_cap_fill(dev, buf->vb.sequence); in vivid_raw_vbi_cap_process()
96 if (!VIVID_INVALID_SIGNAL(dev->std_signal_mode[dev->input])) in vivid_raw_vbi_cap_process()
97 vivid_vbi_gen_raw(&dev->vbi_gen, &vbi, vbuf); in vivid_raw_vbi_cap_process()
101 void vivid_sliced_vbi_cap_process(struct vivid_dev *dev, in vivid_sliced_vbi_cap_process() argument
107 buf->vb.sequence = dev->vbi_cap_seq_count; in vivid_sliced_vbi_cap_process()
108 if (dev->field_cap == V4L2_FIELD_ALTERNATE) in vivid_sliced_vbi_cap_process()
111 vivid_sliced_vbi_cap_fill(dev, buf->vb.sequence); in vivid_sliced_vbi_cap_process()
114 if (!VIVID_INVALID_SIGNAL(dev->std_signal_mode[dev->input])) { in vivid_sliced_vbi_cap_process()
118 vbuf[i] = dev->vbi_gen.data[i]; in vivid_sliced_vbi_cap_process()
126 struct vivid_dev *dev = vb2_get_drv_priv(vq); in vbi_cap_queue_setup() local
127 bool is_60hz = dev->std_cap[dev->input] & V4L2_STD_525_60; in vbi_cap_queue_setup()
132 if (!vivid_is_sdtv_cap(dev)) in vbi_cap_queue_setup()
146 struct vivid_dev *dev = vb2_get_drv_priv(vb->vb2_queue); in vbi_cap_buf_prepare() local
147 bool is_60hz = dev->std_cap[dev->input] & V4L2_STD_525_60; in vbi_cap_buf_prepare()
152 dprintk(dev, 1, "%s\n", __func__); in vbi_cap_buf_prepare()
154 if (dev->buf_prepare_error) { in vbi_cap_buf_prepare()
159 dev->buf_prepare_error = false; in vbi_cap_buf_prepare()
163 dprintk(dev, 1, "%s data will not fit into plane (%lu < %u)\n", in vbi_cap_buf_prepare()
175 struct vivid_dev *dev = vb2_get_drv_priv(vb->vb2_queue); in vbi_cap_buf_queue() local
178 dprintk(dev, 1, "%s\n", __func__); in vbi_cap_buf_queue()
180 spin_lock(&dev->slock); in vbi_cap_buf_queue()
181 list_add_tail(&buf->list, &dev->vbi_cap_active); in vbi_cap_buf_queue()
182 spin_unlock(&dev->slock); in vbi_cap_buf_queue()
187 struct vivid_dev *dev = vb2_get_drv_priv(vq); in vbi_cap_start_streaming() local
190 dprintk(dev, 1, "%s\n", __func__); in vbi_cap_start_streaming()
191 dev->vbi_cap_seq_count = 0; in vbi_cap_start_streaming()
192 if (dev->start_streaming_error) { in vbi_cap_start_streaming()
193 dev->start_streaming_error = false; in vbi_cap_start_streaming()
196 err = vivid_start_generating_vid_cap(dev, &dev->vbi_cap_streaming); in vbi_cap_start_streaming()
201 list_for_each_entry_safe(buf, tmp, &dev->vbi_cap_active, list) { in vbi_cap_start_streaming()
213 struct vivid_dev *dev = vb2_get_drv_priv(vq); in vbi_cap_stop_streaming() local
215 dprintk(dev, 1, "%s\n", __func__); in vbi_cap_stop_streaming()
216 vivid_stop_generating_vid_cap(dev, &dev->vbi_cap_streaming); in vbi_cap_stop_streaming()
221 struct vivid_dev *dev = vb2_get_drv_priv(vb->vb2_queue); in vbi_cap_buf_request_complete() local
223 v4l2_ctrl_request_complete(vb->req_obj.req, &dev->ctrl_hdl_vbi_cap); in vbi_cap_buf_request_complete()
240 struct vivid_dev *dev = video_drvdata(file); in vidioc_g_fmt_vbi_cap() local
243 if (!vivid_is_sdtv_cap(dev) || !dev->has_raw_vbi_cap) in vidioc_g_fmt_vbi_cap()
246 vivid_g_fmt_vbi_cap(dev, vbi); in vidioc_g_fmt_vbi_cap()
253 struct vivid_dev *dev = video_drvdata(file); in vidioc_s_fmt_vbi_cap() local
258 if (f->type != V4L2_BUF_TYPE_VBI_CAPTURE && vb2_is_busy(&dev->vb_vbi_cap_q)) in vidioc_s_fmt_vbi_cap()
289 struct vivid_dev *dev = video_drvdata(file); in vidioc_g_fmt_sliced_vbi_cap() local
292 if (!vivid_is_sdtv_cap(dev) || !dev->has_sliced_vbi_cap) in vidioc_g_fmt_sliced_vbi_cap()
295 vivid_fill_service_lines(vbi, dev->service_set_cap); in vidioc_g_fmt_sliced_vbi_cap()
301 struct vivid_dev *dev = video_drvdata(file); in vidioc_try_fmt_sliced_vbi_cap() local
303 bool is_60hz = dev->std_cap[dev->input] & V4L2_STD_525_60; in vidioc_try_fmt_sliced_vbi_cap()
306 if (!vivid_is_sdtv_cap(dev) || !dev->has_sliced_vbi_cap) in vidioc_try_fmt_sliced_vbi_cap()
317 struct vivid_dev *dev = video_drvdata(file); in vidioc_s_fmt_sliced_vbi_cap() local
323 if (fmt->type != V4L2_BUF_TYPE_SLICED_VBI_CAPTURE && vb2_is_busy(&dev->vb_vbi_cap_q)) in vidioc_s_fmt_sliced_vbi_cap()
325 dev->service_set_cap = vbi->service_set; in vidioc_s_fmt_sliced_vbi_cap()
331 struct vivid_dev *dev = video_drvdata(file); in vidioc_g_sliced_vbi_cap() local
336 is_60hz = dev->std_cap[dev->input] & V4L2_STD_525_60; in vidioc_g_sliced_vbi_cap()
337 if (!vivid_is_sdtv_cap(dev) || !dev->has_sliced_vbi_cap || in vidioc_g_sliced_vbi_cap()
341 is_60hz = dev->std_out & V4L2_STD_525_60; in vidioc_g_sliced_vbi_cap()
342 if (!vivid_is_svid_out(dev) || !dev->has_sliced_vbi_out || in vidioc_g_sliced_vbi_cap()