static int ioctl_querycap(struct file *file, void *fh, struct v4l2_capability *cap)
{
strcpy(cap->driver, KBUILD_MODNAME);
- strcpy(cap->card, "dummy v4l2 dev");
+ strcpy(cap->card, "Test V4L2 device");
strcpy(cap->bus_info, "nobus");
cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE | V4L2_CAP_STREAMING;
cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
spin_unlock(&blist_lock);
if(buf) {
+ struct vb2_v4l2_buffer *vvbuf;
+
memcpy(vb2_plane_vaddr(&buf->vb, 0), frame, frame_size);
- /*v4l2_get_timestamp(&buf->vb.v4l2_buf.timestamp);
- buf->vb.v4l2_buf.sequence = seqno++;
- buf->vb.v4l2_buf.field = V4L2_FIELD_NONE;*/
+ vvbuf = to_vb2_v4l2_buffer(&buf->vb);
+ buf->vb.timestamp = ktime_get_ns();
+ vvbuf->sequence = seqno++;
+ vvbuf->field = V4L2_FIELD_NONE;
vb2_buffer_done(&buf->vb, VB2_BUF_STATE_DONE);
}