Onboard Camera Kernel Specification

Hello!

I try to access the onboard camera OV5693 with Video 4 Linux Interface.
There are some control options that can be accessed by the user, but I did not find a specification for these controls. Also I expect the output image to be raw bayer, 10 bit as specified in OV5693 “Product Guide”… but I get 14 bit values in return from the driver.

Is there some specification about the driver for the onboard camera?

Best Regards
Archoran

You may install package v4l-utils and use command v4l2ctl for accessing the V4L interface:

sudo apt-get install v4l-utils

Then for example you can list the video modes that the drivers reports as supported :

v4l2-ctl --list-formats-ext -d /dev/video0

or current config showing the available controls and their current values:

v4l2-ctl --all -d /dev/video0

Or:

v4l2-compliance -d /dev/video0

You may also read this post and may install package qv4l2 for interactively trying, but be sure to keep bypass mode to 0.

Hi Honey_Patouceul.

Thank You for Your reply. I followed the same instructions from another topic. I can interface the camera from V4L2. I already have a list of all controls, their names and (max/min/cur/def) values.

But where are these controls documented?

Information of this kind I hope to find in official documents…

These are standard controls from V4L API. You can check what a driver supports or not.

Not sure how this applies for recent L4T releases, but in older releases with nvcamera-deamon it was interfering and leading to problems. So my advice, but it might be out of date.
You may have a look at Camera architecture stack(this is for Xavier, but I think it applies to Nano as well) you’ll see that the ISP for bypass is managed by libargus at user level, not through V4L interface.

The official documentation is far from being exhaustive, but searching this forum you may find most of what you need for moving forward ;-)

Controls like the “Group Hold”, “Bypass Mode”, “Override Enable” and “Write ISP format” are standard controls of V4L2-API?

I have read the documentation of V4L2 API and did not find any of these controls specified. If You have found the specifications in the official documents, can You please provide me a link to that?

It is not, the Bypass Mode=1 blocks the device if you read an image with ioctl or read(). So it also leads to timeouts in v4l2-ctl.

Control ioctls:
		test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
		test VIDIOC_QUERYCTRL: OK
		test VIDIOC_G/S_CTRL: OK
		test VIDIOC_G/S/TRY_EXT_CTRLS: OK
		test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
		test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
		Standard Controls: 1 Private Controls: 14          <---

There is only one standard (API defined) control implemented (gain I guess), all other controls are private (driver defined) controls and have to be documented to be used by an application.

hello Archoran,

you may download the [L4T Sources] and check kernel sources via Jetson Download Center,
there are TEGRA_CAMERA_CID_* to control camera sensors,
for example,

TEGRA_CAMERA_CID_GAIN,
TEGRA_CAMERA_CID_EXPOSURE,
TEGRA_CAMERA_CID_FRAME_RATE,

please also refer to Sensor Driver Programming Guide for the details.
thanks

Thanks JerryChang for Your response!

I found the kernel sources and extracted the information I need.

Maybe also noteworthy is the output pixel format from the sensor. The Parker SoC TRM describes in chapter 27.10 (PIXFMT) how the data is aligned and which bits have which purpose.