@yahoo
Do query the data from UVC sensor or onboard CSI camera sensor? Could you share you binary if you get the problem with CSI camera sensor? If not it could be the UVC driver issue on kernel-4.4
I was testing onboard OV5693, I tried USB camera today.
There are timestamps for both OV5693 and USB camera under L4T R24.2.1 but no timestamp for either OV5693 or USB camera under L4T R28.1 when the same V4L2 code (listed in previous post) was used.
@yahoo
Just check the Tegra VI driver did report the timestamp by the driver …/kernel/kernel-4.4/drivers/media/platform/tegra/camera/vi/channel.c
Could you print some message here to check.
Timestamp in “kernel-4.4/drivers/media/platform/tegra/camera/vi/channel.c” is not filled with values.
In L4T 24.2.1 and earlier, “soc_channel_capture_done(chan, buf, &ts)” is called in “drivers/media/platform/tegra/camera/vi/channel.c” and timestamp is filled in “soc_channel_capture_done” in “/drivers/media/platform/soc_camera/tegra_camera/vi2.c”
static int vi2_channel_capture_done(struct vi2_channel *chan,
struct tegra_camera_buffer *buf)
{
........
/* Captured one frame */
do_gettimeofday(&vb->v4l2_buf.timestamp); // Fill V4L2 buffer with kernel time
vb->v4l2_buf.sequence = chan->sequence++; // Fill V4L2 buffer with frame number
vb->v4l2_buf.field = V4L2_FIELD_NONE;
vb2_buffer_done(vb, err < 0 ? VB2_BUF_STATE_ERROR : VB2_BUF_STATE_DONE);
return err;
}
@yahoo
Thanks for the finding, since the kernel-4.4 have new define /kernel/include/media/videobuf2-v4l2.h I think the user space need to change too. Could you use the vb2_v4l2_buffer instead of v4l2_buffer.
Yes, I’m trying to find the right include path to built V4L2 app on TX1 using “videobuf2-v4l2.h”.
Default include path “/usr/include” of R28.1 does not have “videobuf2-v4l2.h”, I found it in “/usr/src/linux-headers-4.4.38-tegra/include” but am still having issues using “linux-headers-4.4.38-tegra/include” (missing files and other errors).
Hi,
I’m using L4T_R28.2.1/TX2 and facing this issue (timestamp.tv_sec, timestamp.tv_us are all zero) with CSI camera using a simple v4l2 application. Any solutions?
Thanks, ShaneCCC. I can get the timestamp numbers now. Is there any way to confirm that these timestamp values are correct? Comparing these timestamps with the ones of dmesg (running parallelly), I see the dmesg values lag by around 10 secs!!
dmesg later that is should be normally, cause the console print is much low priority. The timestamp is the time vi get the start of frame from sensor I believe it should be correct.