How userspace receive embedded data from vi5_fops.c?

Hi,

I have print the embedded data that vi5 received,

2025-11-19T15:00:19.835952+08:00 tegra-ubuntu-pos kernel: DMA buffer allocated at 000000009a837687, size 24576
2025-11-19T15:00:19.835954+08:00 tegra-ubuntu-pos kernel: emb_sensor_buf: 00000000: 06 00 02 02 01 01 00 00 02 20 00 00 01 01 00 01  ......... ......
2025-11-19T15:00:19.835955+08:00 tegra-ubuntu-pos kernel: emb_sensor_buf: 00000010: 00 00 01 10 32 00 00 00 00 80 a1 a3 d0 f6 00 00  ....2...........
2025-11-19T15:00:19.835957+08:00 tegra-ubuntu-pos kernel: emb_sensor_buf: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
2025-11-19T15:00:19.835958+08:00 tegra-ubuntu-pos kernel: emb_sensor_buf: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
2025-11-19T15:00:19.835959+08:00 tegra-ubuntu-pos kernel: emb_sensor_buf: 00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
2025-11-19T15:00:19.835960+08:00 tegra-ubuntu-pos kernel: emb_sensor_buf: 00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
2025-11-19T15:00:19.835962+08:00 tegra-ubuntu-pos kernel: emb_sensor_buf: 00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
2025-11-19T15:00:19.835963+08:00 tegra-ubuntu-pos kernel: emb_sensor_buf: 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
2025-11-19T15:00:19.835964+08:00 tegra-ubuntu-pos kernel: emb_isp_buf: 00000000: 00 02 00 00 00 04 00 00 00 02 00 00 00 08 00 12  ................
2025-11-19T15:00:19.835965+08:00 tegra-ubuntu-pos kernel: emb_isp_buf: 00000010: 2e 32 00 00 00 00 00 00 00 00 00 0d 00 00 00 00  .2..............
2025-11-19T15:00:19.835967+08:00 tegra-ubuntu-pos kernel: emb_isp_buf: 00000020: 00 00 00 00 1d 00 06 06 01 01 00 00 00 00 00 00  ................
2025-11-19T15:00:19.835968+08:00 tegra-ubuntu-pos kernel: emb_isp_buf: 00000030: 00 00 00 00 00 00 03 aa 5c 6c 00 00 00 00 00 00  ........\l......
2025-11-19T15:00:19.835969+08:00 tegra-ubuntu-pos kernel: emb_isp_buf: 00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
2025-11-19T15:00:19.835970+08:00 tegra-ubuntu-pos kernel: emb_isp_buf: 00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
2025-11-19T15:00:19.835972+08:00 tegra-ubuntu-pos kernel: emb_isp_buf: 00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
2025-11-19T15:00:19.835973+08:00 tegra-ubuntu-pos kernel: emb_isp_buf: 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................

and how v4l2 application receive the embedded data by v4l2 driver API whitout override the frame buffer? Thanks!

Hi @Kun_Wang,

Quick question.
What do you mean by not overriding the frame buffer?

In the past what we have done is capturing the meta-data along with the image.
It usually looks like 2 lines at the top of the frame that don not match the image.
Then we just get them with post-processing.

Is that what you mean by overriding the frame buffer?

best regards,
Andrew
Embedded Software Engineer at ProventusNova

Hi,

Yes, your understanding is correct. My need is image and meta-data are Independent transmission to v4l2 application. such as use V4L2_BUF_TYPE_META_CAPTURE or other? Can Jetson Thor support that? Thanks.

@Kun_Wang,

Thanks for the clarification.

Quick question.
Are you able to capture with nvargus ? Or do you need to capture straight with v4l2 ?

best regards,
Andrew
Embedded Software Engineer at ProventusNova

hello Kun_Wang,

there’re separate pixel parser to process embedded data and active pixels.
you may dig into VI driver, it’s chan->emb_buf; to allocates private buffer for embedded data storage.

Hi,

We are not use nvargus, and need to capture straight with v4l2, thanks!

@Kun_Wang,

Understood.

Unfortunately when using only v4l2 api, I don’t think there is a way of capturing the meta-data without having it be part of the frame.

One idea that comes to my mind is to create a custom GStreamer element to capture the frames with meta-data fro the camera, take out the meta-data and output the frame without the metadata and the metadata as part of of the GST_META.

Would something like that work for you?

best regards,
Andrew
Embedded Software Engineer at ProventusNova