
Manuals & Documentation – L-1029e.A1 phyCAM with phyBOARD-Pollux i.MX 8M Plus Getting Started Guide
Configure Camera and Controller Camera Interface with “media-ctl”– 17
•
•
•
•
•
•
•
•
•
•
•
•
•
•
7 Configure Camera and Controller Camera Interface with
“media-ctl”
Modern System-on-Chip (SoC) devices support a wide range of functionality in the way of internal hardware blocks
which has resulted in a variety of ways to interconnect functions within the SoC that alter the V4L device content.
The Media Controller kernel API has been designed to expose detailed information about media devices and
capture devices to userspace in a way that allows them to be interconnected in dynamic and complex ways at
runtime.
Media controller devices expose entities to the media controller framework. Each entity has one or more source
pads and one or more sink pads. You use the media controller kernel API (ie via media-ctl) to query entities, link
source pads to sink pads, and set formats of pads.
We use media-ctl to set:
the desired resolution and color format of the camera sensor
the fitting resolution and color format in the CSI interface (controller-camera-interface)
the way (and/or preprocessing) through the different hardware blocks in the controller
the resulting camera stream is made available as “/dev/videox” device
These settings are necessary:
once after restarting the system and using the camera for the first time
set a new resolution, color format, or bit-depth
set a new path through the hardware blocks
Following entities are present at the i.MX 8M Plus Image (check with “media-ctl –p”):
entity 1: mxc_isi.0 (16 pads, 2 links)
pad0: Sink
...
pad11: Sink
pad12: Source
...
pad14: Source
pad15: Sink
entity 18: mxc_isi.0.capture (1 pad, 1 link)
pad0: Sink
entity 22: mxc-mipi-csi2.0 (8 pads, 2 links)
pad0: Sink
...
pad3: Sink
pad4: Source
...
pad7: Source
entity 31: ar0144 2-0010 (1 pad, 1 link) #(depend on selected camera)
pad0: Source
To set the media-ctl, we use the following points in our demo script:
media-ctl –r: reset all links to inactive
media-ctl –l: setup the links between the hardware blocks
media-ctl –V: formats the hardware blocks
For example, we will set the VM-016-COL (AR0144) with full Resolution from CSI Port to a /dev/videox device.