Coder Social home page Coder Social logo

initbasti / nanopc-t4_armbian_configuration Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 255 KB

My configuration for Linux Kernel development on the FriendlyElec NanoPC-T4 with the latest kernel version.

License: GNU Affero General Public License v3.0

Shell 100.00%
armbian nanopc-t4 kernel-development

nanopc-t4_armbian_configuration's Introduction

My setup for kernel development (Media subsystem) on the NanoPC-T4

Last update: 2021-02-06

There is currently a bug in the debootstrap step of the armbian build for arm64 with this setup. Which means that it is currently not possible to create a full image with it, but you can create a kernel with the KERNEL_ONLY='yes' option.
The workaround works like this:

  • Build the full image with a stable version of the armbian build
  • Add the patches from this project and build the latest kernel
  • Use rsync to move the finished *.deb files from output/debs/ to the NanoPC-T4
  • Install the new kernel with sudo dpkg -i /path/to/*.deb
  • Reboot

Introduction

This is a summary of steps, that I have performed in order to have a running upstream kernel on my NanoPC-T4. I had to spend some time to figure out how to do it properly and would like to make this a little easier for anyone interested in working with this SBC (Single Board Computer), as well as myself in the future ;).

Build system

There are a couple of build systems available: Armbian, Buildroot, Yocto Project. I have picked Armbian for its simplicity and speed and also because I didn't require too much customization.

Here are the steps required to build the image:

  1. Get the armbian build script

  2. Prepare the kernel configuration

  3. Adjust the specific set of patches that are required but not upstream

  4. Configure the armbian script

  5. Build the image and install it onto the SBC

  6. Test the image
    6.1 Check if the fan works
    6.2 Test if the camera works properly
    6.3 Check if all subdevices of the camera pipeline exist
    6.4 Set up the camera pipeline
    6.5 Start a test recording
    6.6 Record to a file and convert to a viewable format

  7. Additional topics
    7.1 Install additional packages with Ansible


Get the armbian build script

git clone [email protected]:armbian/build.git
cd build

This project contains multiple sub-folders, the most important for us are: userpatches (here we do the configuration of the image building script), output (the destination for the image and possible debug messages), and cache (the compiled kernel sources are placed here). For more details look here.

Prepare the kernel configuration

This step depends heavily on your needs, I removed WLAN, Bluetooth, Virtualization, Touchscreen, USB-Webcams, DVB stuff, Video tuner, hardware video decoder and encoder drivers, Light sensors, and some other stuff, where I was sure that I wouldn't need it and where I felt confident enough to know that I don't cause damage. You can start out with the configuration from armbian (under config/kernel/linux-rockchip64-dev.config) and then optimize it to your needs. My current version is located in this project under userpatches/linux-rockchip64-dev.config, this is the required name format for the config. source

Adjust the specific set of patches that are required but not upstream

If you take a look into patch/kernel/rockchip64-dev, you will find multiple patches, which are maintained by the armbian team to make sure that the hardware on your board works properly. There are device tree changes to declare certain hardware to your operating system and configure it, and a few tweaks and backports to drivers or core parts of the kernel. This is the biggest drawback, that I encountered due to using the latest kernel sources, you are responsible for making sure that these tweaks keep working. When there are changes within a patched file, you will have to look into the source code and find out if the tweak is still needed and if so you will have to manually apply the change and create a new patch out of it.

I approached this problem by first making sure, that the amount of patches I have to maintain is as small as possible. So at first, I filtered out all patches unrelated to rk3399 in general, then I moved on to patches that work on features I excluded in my configuration like WLAN, etc. Every patch, that I do not require is copied into userpatches/kernel/rockchip64-dev/, and the content is deleted, this will cause the armbian script to skip it. source

I will do my best to keep this repository up-to-date, in which case that work is probably done by me (at least as long as you have the same requirements). My current patch set is located in this repository under: userpatches/kernel/rockchip64-dev/. (Note, that these also include my personal patches, that may or may not be part of the upstream kernel)

As a good habit: Only install changes that you understand at least to the extent that you can be sure that they will not harm your system.

Configure the armbian script

There are mandatory and optional configurations:

Mandatory

We have to declare the source repository and the target branch, within the lib.config file in userpatches/.
I use the following:

KERNELSOURCE="https://git.linuxtv.org/media_tree.git/"
KERNELBRANCH="branch:master"

Within the config-*.conf, we declare the following:

Choose the board to configure the image correctly, pick a branch to base your work on (dev).

BOARD="nanopct4"
BRANCH="dev"

Optional

I do not need a desktop for my purposes, all I need is a console, and so I disable the desktop environment. Additionally, I don't want a big badge of application that I never use, so I build the minimal version and pick the pre-installed application directly within the lib.config file.

config-*.conf:

BUILD_MINIMAL="yes"
BUILD_DESKTOP="no"
EXTERNAL_NEW="prebuilt"

Skip the interactive mode and go straight to the build, choose whether to build a whole new image (bootloader, pre-installed apps, etc) or just the kernel. Additionally, pick the Debian/Ubuntu release you want to run on the NanoPC-T4.

KERNEL_ONLY="yes"
KERNEL_CONFIGURE="no"
RELEASE="bullseye"

Disable special sets of patches for features that I don't need.

EXTRAWIFI="no"
WIREGUARD="no"
AUFS="no"

Keyboard language setting:

DEST_LANG="en_US.UTF-8"			# sl_SI.UTF-8, en_US.UTF-8

Update (2021-01-12):
Currently the package list additional option does not work as intended for me (look here for more information)
Pre-install applications on the image within the lib.config file:

lib.config:
PACKAGE_LIST_ADDITIONAL="$PACKAGE_LIST_ADDITIONAL python3 python3-dev python3-pip"
Make sure that the packages you choose are available on the Debian release picked within the RELEASE option.

Further customization of the image from the host machine

The userpatches/customize-image.sh script can be utilized to prepare your environment even more. For example, I use it to install applications from PyPi. You can do a lot more with this script. Ask in the Armbian Forum, when you are unsure about a certain step.

Main() {
	case $RELEASE in
		stretch)
			# your code here
			# InstallOpenMediaVault # uncomment to get an OMV 4 image
			;;
		buster)
			# your code here
			;;
		bullseye)
                        # Install a recent version of meson for the root user
			python3 -m pip install meson --user --upgrade
			;;
		bionic)
			# your code here
			;;
		focal)
			# your code here
			;;
	esac
} # Main

Build the image and install it onto the SBC

Once, you have finished the steps above building the image is actually quite easy.

Building and burning to the SD-card

sudo ./compile.sh

If you added most of the configuration options mentioned above, you shouldn't see any interactive setup. The script now updates your system gets the latest sources for the bootloader and kernel, applies the patches to those sources, builds them and depending on your choice at the KERNEL_ONLY option builds the image.

In order to write the finished image from output/image/Armbian_20.11.0-trunk_Nanopct4_{RELEASE}_{BRANCH}_{KERNELVERSION}_minimal.img to the SD-card, I prefer to use Balena Etcher, but there are multiple alternatives.

Boot on NanoPC-T4

The first thing you will have to do, is to set up the root password, the user login & password, and your full name. I usually quickly attach a USB-keyboard and a monitor for this step. But you can also log in directly via SSH, just be patient the first boot sometimes needs a bit of time. The login for the first boot with root is: ssh root@{IP-address} and the password is: 1234. In order to find out, which IP address was assigned to your NanoPC-T4, you could do the following:

ip -a
# Example output
# 2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
#     inet 192.168.198.4/24 brd 192.168.198.255 scope global dynamic noprefixroute enp1s0
# Look at your IP address: Let's say it is '192.168.198.4',
# take the first three parts: '192.168.198' and add a '0' followed by the '/24'
sudo apt-get install nmap
sudo nmap -sn 192.168.198.0/24
# Locate an entry, which contains nanopct4 in its name and take the IP address.

Test the image

At this point, you have a running system, with a secure user and root password, as well as a running ssh connection. One of the first commands, I run to check if the patching went well is: sudo dmesg, here I check for any error/warning messages, any drivers that were not able to load, missing device tree nodes, etc. The next step is to check if the hardware behaves like expected, this includes the fan, a camera, the different USB ports, the HDMI port, the audio jack, and the NVME PCIe port for an external SSD, that is located on the backside of the board.

Check if the fan works

This is in my opinion one of the most crucial checks because you probably don't want to damage your board unexpectedly. A simple way to test if the fan works is by increasing the CPU temperature, here is a simple bash script, that repeatedly prints 'yes' to /dev/null, while using all processor cores of the system: source

for i in $(seq $(getconf _NPROCESSORS_ONLN)); do yes > /dev/null & done

You can stop all those processes with: killall yes

The fan should start to spin quite rapidly within a short amount of time. If it doesn't, you should begin your investigation, the most obvious test is to check if the fan is connected properly. I noticed that the official fan by FriendlyElec twitches sometimes without actually starting to spin, if you nudge the fan a little, it may start spinning. After those simple tests, the first thing you might want to do is to configure the fan manually as described here.

The easiest way to check the CPU temperature on RK3399 computers that I've discovered so far is with the hardinfo command. (sudo apt-get install hardinfo).

hardinfo -ma devices.so | grep Temperature

Testing the camera

This part of the system is not crucial, but it is the area I am working on, so I take a closer look at it.

In order to perform those tests, I utilized the v4l-utils applications and the libcamera project. To install both on the armbian you will have to execute the following commands:

# Install dependencies
sudo apt-get install debhelper dh-autoreconf autotools-dev autoconf-archive doxygen\
                     graphviz libasound2-dev libtool libjpeg-dev libudev-dev libx11-dev\
                     pkg-config udev make gcc git python3-yaml python3-ply python3-jinja2\
                     ninja-build pkg-config libgnutls28-dev openssl libevent-dev g++ python3-pip

# Install recent version of meson
python3 -m pip install meson --user --upgrade
# Install meson for the root user as well (needed for the libcamera installation)
sudo python3 -m pip install meson --user --upgrade
# Add the meson command to the PATH
export PATH=/home/$USER/.local/bin:$PATH

# Install v4l-utils
git clone https://git.linuxtv.org//v4l-utils.git
cd v4l-utils
./bootstrap.sh
./configure --disable-doxygen-doc --disable-qv4l2 --disable-qvidcap --disable-libdvbv5
make
sudo make install

# Install libcamera
git clone git://linuxtv.org/libcamera.git
cd libcamera
meson build
sudo ninja -C build install

# Make it possible to find the shared libraries
export PKG_CONFIG_PATH=/usr/local/lib/aarch64-linux-gnu:$PKG_CONFIG_PATH
sudo ldconfig
Check if the sub-devices are detected

If you look into /dev, you will find a couple of video related devices, for me it looks like this:

basti@nanopct4:~$ ls /dev/ | grep "video\|v4l\|media"
media0
media1
media2
v4l
v4l-subdev0
v4l-subdev1
v4l-subdev2
v4l-subdev3
video0
video1
video2
video3
video4
video5
video6
video7

But that doesn't help us yet, to find out if all the necessary parts have been set up properly.

This is where the media-ctl command kicks in, it's basically an interface to the media controller API, that is used to present complex camera pipelines in form of a graph, where the different entities have pads that are connected with each other through data links.

With media-ctl -p you can print out the device topology:

...
driver          rkisp1
- entity 1: rkisp1_isp (4 pads, 5 links)
...
- entity 6: rkisp1_resizer_mainpath (2 pads, 2 links)
...
- entity 9: rkisp1_resizer_selfpath (2 pads, 2 links)
...
- entity 12: rkisp1_mainpath (1 pad, 1 link)
...
- entity 16: rkisp1_selfpath (1 pad, 1 link)
...
- entity 20: rkisp1_stats (1 pad, 1 link)
...
- entity 24: rkisp1_params (1 pad, 1 link)
...
- entity 28: ov13850 1-0010 (1 pad, 1 link)
...

In this reduced example, you can see that the camera pipeline consists of an ISP (Image Signal Processor), which processes the captured frames from the camera (ov13850) and provides two entities, that write the refined frames to memory after resizing them (mainpath & selfpath(preview)). Additionally, it contains a stats and a params video node, which are used together with special algorithms (3A), to configure the parameters of the ISP based on the statistics data it spills out.

Your output should look similar to mine, if you want to proceed with the next steps.

Build a camera pipeline

We can manually configure a camera pipeline using the media-ctl command. For example, the following command activates the link from the 2nd pad of the ISP to pad 0 of the mainpath entity:

"media-ctl" "--device" "platform:rkisp1" "--links" "'rkisp1_isp':2 -> 'rkisp1_resizer_mainpath':0 [1]"

Here is an example of a complete pipeline with explaination, the order of instruction matters:

# recent all current links
media-ctl --device "platform:rkisp1" --reset
# connect pad 0 (sink) of the ISP with pad 0 of the camera and enable the link
media-ctl --device "platform:rkisp1" --links "'ov13850 1-0010':0 -> 'rkisp1_isp':0 [1]"
# create a link between the selfpath (preview) and the ISP output on pad 2 (source), but keep it deactivated
media-ctl --device "platform:rkisp1" --links "'rkisp1_isp':2 -> 'rkisp1_resizer_selfpath':0 [0]"
# create a link between the mainpath and the ISP output on pad 2 (source) and enable the link
media-ctl --device "platform:rkisp1" --links "'rkisp1_isp':2 -> 'rkisp1_resizer_mainpath':0 [1]"

# Set the video format on the camera (this is very dependent on your camera)
media-ctl --device "platform:rkisp1" --set-v4l2 '"ov13850 1-0010":0 [fmt:SBGGR10_1X10/2112x1568]'
# Set the input video format for the ISP, this must match the video format of the camera, crop it down to 1920x1080
media-ctl --device "platform:rkisp1" --set-v4l2 '"rkisp1_isp":0 [fmt:SBGGR10_1X10/2112x1568 crop: (0,0)/1920x1080]'
# Set the output video format of the ISP, the maximum size was propagated from the sink pad, and the format size is taken from the crop format
media-ctl --device "platform:rkisp1" --set-v4l2 '"rkisp1_isp":2 [fmt:YUYV8_2X8/1920x1080 crop: (0,0)/1920x1080]'

# Set the input format for the mainpath resizer
media-ctl --device "platform:rkisp1" --set-v4l2 '"rkisp1_resizer_mainpath":0 [fmt:YUYV8_2X8/1920x1080]'
# Set the output format for the mainpath resizer
media-ctl --device "platform:rkisp1" --set-v4l2 '"rkisp1_resizer_mainpath":1 [fmt:YUYV8_2X8/1280x720]'

# Configure the format at the mainpath DMA-engine, which is the point that is accessed by user-space
v4l2-ctl --media-bus-info "platform:rkisp1" --device "rkisp1_mainpath" --set-fmt-video "width=1280,height=720,pixelformat=422P"

Check the output of media-ctl -p to check if the entities were set up properly.

(If you get this error: Unable to parse link: Invalid argument (22), then that probably means that the entity you try to link up is not found in the list of entities for the ISP instance. In this case please use --device /dev/media0 or --device /dev/media1 (depending on the camera-ISP instance combination))

Make a test capture

With a fully configured pipeline, we can now try to make a little test recording to memory only.

# Test stream
v4l2-ctl --media-bus-info "platform:rkisp1" --device "rkisp1_mainpath" --stream-mmap --stream-count=10

In case your pipeline is not configured correctly (when there is a mismatch between two linked pads), you will get the following error:

VIDIOC_STREAMON returned -1 (Broken pipe)

And if it worked you will see something like this:

<<<<<<<<<<
Record to a file and convert to a viewable format

Alright, the camera works as a little bonus, I will now quickly show how to watch the recorded video.
The application I use for this step is the cam command from libcamera, at the moment of writing this, there is no way of working with the statistics data from the ISP to configure the ISP properly with the correct parameters for stuff like auto white balance, exposure, etc.
Images recorded with v4l2-ctl will therefore be completely dark and greenish. While those algorithms are not implemented in the libcamera yet, it at least configures the controls of the sensor to make the image a little better, and additionally it is also a lot simpler.
I do those steps on my laptop as the NanoPC-T4 is configured without a GUI environment, so I wouldn't be able to watch the video.

NOTICE: The cam command currently doesn't work out of the box with the OV13850 camera, as there is a mismatch of image formats between the camera and the Image Signal Processor (the camera sensor uses a resolution that is bigger than the maximum allowed resolution of the ISP and libcamera can't handle this). I am currently working on a patch that fixes the issue, the patch is not merged yet, but you can already use it. Just download the patch and apply it to your libcamera tree with: cd /path/to/libcamera_tree && git am /path/to/patch.patch. Afterward, build: ninja -C build and install sudo ninja -C build install.

Here is a small script, which records with the standard settings of libcamera, moves the data to the host, and converts to mp4. Depends on: sudo apt-get install ffmpeg mpv You can locate the script on the root directory of the project as well.

#!/bin/bash

#INPUT: [remote-user] [remote-ip-address] [number of frames]

if [ "$#" -ne 3 ]; then
    echo "Usage: {script} [remote-user] [remote-ip] [number of frames to be captured]"
fi

remote_user=$1
ip=$2
remote="ssh $remote_user@$ip"

remote_in=/home/$remote_user/lib_stream.raw
local_in=/home/$USER/lib_stream.raw
local_out=/home/$USER/lib_out.mp4

# Start the recording and move the finished data from the NanoPC-T4 to the host
$remote cam --camera=1 --capture=$3 --file=$remote_in
rsync --progress $remote_user@$ip:$remote_in $local_in
$remote rm $remote_in

if ! [[ -f $local_in ]]; then
    echo "Capture or rsync failed."
fi

# Convert using the standard settings
ffmpeg -f rawvideo -vcodec rawvideo -s 1920x1920 -r 30 -pix_fmt nv21 -i $local_in -c:v libx264 -preset ultrafast -qp 0 -y -hide_banner $local_out
rm $local_in

# Watch the movie
mpv $local_out
rm $local_out

Additional topics

Installing additional packages

As of late, I was not able to build an armbian image using the PACKAGE_LIST_ADDITIONAL configuration option within the userpatches/lib.config file. link to forum post
The error message that I recieved looks like this:

[ o.k. ] Installing base system [ Stage 2/2 ]
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
W: Failure trying to run:  /sbin/ldconfig
W: See //debootstrap/debootstrap.log for details
[ error ] ERROR in function create_rootfs_cache [ debootstrap.sh:177 ]
[ error ] Debootstrap base system second stage failed 
[ o.k. ] Process terminated 
[ o.k. ] Unmounting [ /home/basti/Kernel/build/.tmp/rootfs-dev-nanopct4-bullseye-no-yes/ ]
[ error ] ERROR in function unmount_on_exit [ image-helpers.sh:66 ]
[ error ] debootstrap-ng was interrupted 

I have switched to Ansible for this job now, I have added my ansible playbook to this project and will briefly explain how it works below. Install ansible on ubuntu/debian:

sudo apt-get install ansible

In order to install the dependencies and set up a development setup, Ansible requires you to specify the host on which you want to work. Simply add the following line to your /etc/ansible/hosts file (Use the IP address of your NanoPC-T4 and the username of the created user):

sudo sh -c "echo '[SBC]\nnanopct4 ansible_host={IP_ADDRESS} ansible_user={REMOTE_USER} ansible_connection=ssh' >> /etc/ansible/hosts"

The line above does the following:

  • Add a host group SBC, which can later be used to perform a certain action on multiple devices at once
  • Add a alias nanopct4 for the ssh-connection to the device with ip address ansible_host and the user ansible_user.

And now run execute the playbook:

# Add your ssh public key to the device
ssh-copy-id {REMOTE_USER}@{IP_ADDRESS}
# Add a ssh key agent and add the ssh key to it
eval $(ssh-agent)
ssh-add
# Run the playbook, with sudo access (-kK), Enter the password of the {REMOTE_USER}
ansible-playbook /path/to/setup_nanopct4.yml -kK

Obviously, the Ansible playbook provided within this project is specifically crafted for my needs, but you should be able to adjust it according to your desired outcome.

nanopc-t4_armbian_configuration's People

Contributors

initbasti avatar

Stargazers

 avatar  avatar

Watchers

 avatar

nanopc-t4_armbian_configuration's Issues

Add support for OV13850 DUAL camera

Hi @initBasti

I have added support for a dual camera that seems to be OK but I can not figure out how to configure the cameras.

Here is the device tree for the second camera:

rk3399.dtsi:

    isp1: isp1@ff920000 {
        compatible = "rockchip,rk3399-cif-isp";
        reg = <0x0 0xff920000 0x0 0x4000>;
        interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH 0>;
        clocks = <&cru SCLK_ISP1>,
             <&cru ACLK_ISP1_WRAPPER>,
             <&cru HCLK_ISP1_WRAPPER>;
        clock-names = "isp", "aclk", "hclk";
        iommus = <&isp1_mmu>;
        phys = <&mipi_dphy_rx0>;
        phy-names = "dphy";
        power-domains = <&power RK3399_PD_ISP1>;
        status = "disabled";

        ports {
            #address-cells = <1>;
            #size-cells = <0>;

            port@0 {
                reg = <0>;
                #address-cells = <1>;
                #size-cells = <0>;
            };
        };
    };

rk3399-nanopi-*:

&i2c2 {
    status = "okay";
    ov13850p1: ov13850@10 {
        compatible = "ovti,ov13850";
        status = "okay";
        reg = <0x10>;
        clocks = <&cru 0x89>;
        clock-names = "xvclk";
        avdd-supply = <&ov13850_avdd_2p8v>;
        dovdd-supply = <&ov13850_dovdd_1p8v>;
        dvdd-supply = <&ov13850_dvdd_1p2v>;

        reset-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
        pwdn-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
        pinctrl-names = "rockchip,camera_default", "rockchip,camera_sleep";
        pinctrl-0 = <&cam1_default_pins &cif_clkout_a>;
        pinctrl-1 = <&cam1_default_pins>;

        port {
            ucam_out1b: endpoint {
                remote-endpoint = <&mipi_in_ucam1b>;
                data-lanes = <1 2>;
            };
        };
    };
};


&isp1_mmu {
    status = "okay";
};

&isp1 {
    status = "okay";

    ports {
        port@0 {
            mipi_in_ucam1b: endpoint@0 {
                reg = <0>;
                remote-endpoint = <&ucam_out1b>;
                data-lanes = <1 2>;
            };
        };
    };
};

In theory, both OV13850 are loaded and available:

ubuntu@nanopi-m4:~$ cat /sys/dev/char/*/device/name
gpio-keys
SIGMACHIP USB Keyboard
SIGMACHIP USB Keyboard Consumer Control
SIGMACHIP USB Keyboard System Control
USB Optical Mouse
USB Optical Mouse
ov13850
ov13850
rk3x-i2c
rk3x-i2c
rk3x-i2c
rk3x-i2c
rk3x-i2c
ubuntu@nanopi-m4:~$ 

and

ubuntu@nanopi-m4:~$ ls -d /dev/video*
/dev/video0  /dev/video10  /dev/video2  /dev/video4  /dev/video6  /dev/video8
/dev/video1  /dev/video11  /dev/video3  /dev/video5  /dev/video7  /dev/video9

Do you have another camera? Anyway below is all information that I think is relevant, can you spot how it should be configured?

ubuntu@nanopi-m4:~$ /usr/local/bin/v4l2-ctl -d /dev/video0 --all
Driver Info:
	Driver name      : rockchip-rga
	Card type        : rockchip-rga
	Bus info         : platform:rga
	Driver version   : 5.11.0
	Capabilities     : 0x84208000
		Video Memory-to-Memory
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x04208000
		Video Memory-to-Memory
		Streaming
		Extended Pix Format
Priority: 2
Format Video Capture:
	Width/Height      : 100/100
	Pixel Format      : 'BA24' (32-bit ARGB 8-8-8-8)
	Field             : None
	Bytes per Line    : 400
	Size Image        : 40000
	Colorspace        : Default
	Transfer Function : Default (maps to Rec. 709)
	YCbCr/HSV Encoding: Default (maps to ITU-R 601)
	Quantization      : Default (maps to Full Range)
	Flags             : 
Format Video Output:
	Width/Height      : 100/100
	Pixel Format      : 'BA24' (32-bit ARGB 8-8-8-8)
	Field             : None
	Bytes per Line    : 400
	Size Image        : 40000
	Colorspace        : Default
	Transfer Function : Default (maps to Rec. 709)
	YCbCr/HSV Encoding: Default (maps to ITU-R 601)
	Quantization      : Default (maps to Full Range)
	Flags             : 
Selection Video Capture: compose, Left 0, Top 0, Width 100, Height 100, Flags: 
Selection Video Capture: compose_default, Left 0, Top 0, Width 100, Height 100, Flags: 
Selection Video Capture: compose_bounds, Left 0, Top 0, Width 100, Height 100, Flags: 
Selection Video Output: crop, Left 0, Top 0, Width 100, Height 100, Flags: 
Selection Video Output: crop_default, Left 0, Top 0, Width 100, Height 100, Flags: 
Selection Video Output: crop_bounds, Left 0, Top 0, Width 100, Height 100, Flags: 

User Controls

                horizontal_flip 0x00980914 (bool)   : default=0 value=0
                  vertical_flip 0x00980915 (bool)   : default=0 value=0
                         rotate 0x00980922 (int)    : min=0 max=270 step=90 default=0 value=0 flags=modify-layout
               background_color 0x00980923 (int)    : min=0 max=16777215 step=1 default=0 value=0
ubuntu@nanopi-m4:~$ /usr/local/bin/v4l2-ctl -d /dev/video1 --all
Driver Info:
	Driver name      : rkvdec
	Card type        : rkvdec
	Bus info         : platform:rkvdec
	Driver version   : 5.11.0
	Capabilities     : 0x84204000
		Video Memory-to-Memory Multiplanar
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x04204000
		Video Memory-to-Memory Multiplanar
		Streaming
		Extended Pix Format
Media Driver Info:
	Driver name      : rkvdec
	Model            : rkvdec
	Serial           : 
	Bus info         : platform:rkvdec
	Media version    : 5.11.0
	Hardware revision: 0x00000000 (0)
	Driver version   : 5.11.0
Interface Info:
	ID               : 0x0300000c
	Type             : V4L Video
Entity Info:
	ID               : 0x00000001 (1)
	Name             : rkvdec-source
	Function         : V4L2 I/O
	Pad 0x01000002   : 0: Source
	  Link 0x02000008: to remote pad 0x1000004 of entity 'rkvdec-proc': Data, Enabled, Immutable
Priority: 2
Format Video Capture Multiplanar:
	Width/Height      : 48/48
	Pixel Format      : 'NV12' (Y/CbCr 4:2:0)
	Field             : None
	Number of planes  : 1
	Flags             : 
	Colorspace        : Rec. 709
	Transfer Function : Default
	YCbCr/HSV Encoding: Default
	Quantization      : Default
	Plane 0           :
	   Bytes per Line : 48
	   Size Image     : 4608
Format Video Output Multiplanar:
	Width/Height      : 48/48
	Pixel Format      : 'S264' (H.264 Parsed Slice Data)
	Field             : None
	Number of planes  : 1
	Flags             : 
	Colorspace        : Rec. 709
	Transfer Function : Default
	YCbCr/HSV Encoding: Default
	Quantization      : Default
	Plane 0           :
	   Bytes per Line : 0
	   Size Image     : 4608

Codec Controls

                     h264_level 0x00990a67 (menu)   : min=0 max=15 default=0 value=0 (1)
				0: 1
				1: 1b
				2: 1.1
				3: 1.2
				4: 1.3
				5: 2
				6: 2.1
				7: 2.2
				8: 3
				9: 3.1
				10: 3.2
				11: 4
				12: 4.1
				13: 4.2
				14: 5
				15: 5.1
                   h264_profile 0x00990a6b (menu)   : min=0 max=4 default=2 value=2 (Main)
				0: Baseline
				1: Constrained Baseline
				2: Main
				4: High

Stateless Codec Controls

               h264_decode_mode 0x00a40900 (menu)   : min=1 max=1 default=1 value=1 (Frame-Based)
				1: Frame-Based
                h264_start_code 0x00a40901 (menu)   : min=1 max=1 default=1 value=1 (Annex B Start Code)
				1: Annex B Start Code
    h264_sequence_parameter_set 0x00a40902 (unknown): type=200 value=unsupported payload type flags=has-payload
     h264_picture_parameter_set 0x00a40903 (unknown): type=201 value=unsupported payload type flags=has-payload
            h264_scaling_matrix 0x00a40904 (unknown): type=202 value=unsupported payload type flags=has-payload
         h264_decode_parameters 0x00a40907 (unknown): type=204 value=unsupported payload type flags=has-payload
ubuntu@nanopi-m4:~$ /usr/local/bin/v4l2-ctl -d /dev/video2 --all
Driver Info:
	Driver name      : rkisp1
	Card type        : rkisp1
	Bus info         : platform:rkisp1
	Driver version   : 5.11.0
	Capabilities     : 0xa4201000
		Video Capture Multiplanar
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x24201000
		Video Capture Multiplanar
		Streaming
		Extended Pix Format
Media Driver Info:
	Driver name      : rkisp1
	Model            : rkisp1
	Serial           : 
	Bus info         : platform:rkisp1
	Media version    : 5.11.0
	Hardware revision: 0x00000000 (0)
	Driver version   : 5.11.0
Interface Info:
	ID               : 0x0300000d
	Type             : V4L Video
Entity Info:
	ID               : 0x0000000c (12)
	Name             : rkisp1_mainpath
	Function         : V4L2 I/O
	Pad 0x0100000f   : 0: Sink
	  Link 0x02000022: from remote pad 0x1000008 of entity 'rkisp1_resizer_mainpath': Data, Enabled, Immutable
Priority: 2
Video input : 0 (rkisp1_mainpath: ok)
Format Video Capture Multiplanar:
	Width/Height      : 1280/720
	Pixel Format      : 'YUYV' (YUYV 4:2:2)
	Field             : None
	Number of planes  : 1
	Flags             : 
	Colorspace        : Default
	Transfer Function : Default
	YCbCr/HSV Encoding: Default
	Quantization      : Default
	Plane 0           :
	   Bytes per Line : 2560
	   Size Image     : 1843200
ubuntu@nanopi-m4:~$ /usr/local/bin/v4l2-ctl -d /dev/video3 --all
Driver Info:
	Driver name      : rkisp1
	Card type        : rkisp1
	Bus info         : platform:rkisp1
	Driver version   : 5.11.0
	Capabilities     : 0xa4201000
		Video Capture Multiplanar
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x24201000
		Video Capture Multiplanar
		Streaming
		Extended Pix Format
Media Driver Info:
	Driver name      : rkisp1
	Model            : rkisp1
	Serial           : 
	Bus info         : platform:rkisp1
	Media version    : 5.11.0
	Hardware revision: 0x00000000 (0)
	Driver version   : 5.11.0
Interface Info:
	ID               : 0x03000011
	Type             : V4L Video
Entity Info:
	ID               : 0x00000010 (16)
	Name             : rkisp1_selfpath
	Function         : V4L2 I/O
	Pad 0x01000013   : 0: Sink
	  Link 0x02000026: from remote pad 0x100000b of entity 'rkisp1_resizer_selfpath': Data, Enabled, Immutable
Priority: 2
Video input : 0 (rkisp1_selfpath: ok)
Format Video Capture Multiplanar:
	Width/Height      : 1280/720
	Pixel Format      : 'YUYV' (YUYV 4:2:2)
	Field             : None
	Number of planes  : 1
	Flags             : 
	Colorspace        : Default
	Transfer Function : Default
	YCbCr/HSV Encoding: Default
	Quantization      : Default
	Plane 0           :
	   Bytes per Line : 2560
	   Size Image     : 1843200
ubuntu@nanopi-m4:~$ /usr/local/bin/v4l2-ctl -d /dev/video4 --all
Driver Info:
	Driver name      : rkisp1
	Card type        : rkisp1_stats
	Bus info         : platform:rkisp1
	Driver version   : 5.11.0
	Capabilities     : 0x84a00000
		Metadata Capture
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x04a00000
		Metadata Capture
		Streaming
		Extended Pix Format
Media Driver Info:
	Driver name      : rkisp1
	Model            : rkisp1
	Serial           : 
	Bus info         : platform:rkisp1
	Media version    : 5.11.0
	Hardware revision: 0x00000000 (0)
	Driver version   : 5.11.0
Interface Info:
	ID               : 0x03000016
	Type             : V4L Video
Entity Info:
	ID               : 0x00000014 (20)
	Name             : rkisp1_stats
	Function         : V4L2 I/O
	Pad 0x01000015   : 0: Sink
	  Link 0x0200002a: from remote pad 0x1000005 of entity 'rkisp1_isp': Data, Enabled, Immutable
Priority: 2
Format Metadata Capture:
	Sample Format   : 'RK1S' (Rockchip ISP1 3A Statistics)
	Buffer Size     : 108
ubuntu@nanopi-m4:~$ /usr/local/bin/v4l2-ctl -d /dev/video5 --all
Driver Info:
	Driver name      : rkisp1
	Card type        : rkisp1_params
	Bus info         : platform:rkisp1
	Driver version   : 5.11.0
	Capabilities     : 0x8c200000
		Metadata Output
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x0c200000
		Metadata Output
		Streaming
		Extended Pix Format
Media Driver Info:
	Driver name      : rkisp1
	Model            : rkisp1
	Serial           : 
	Bus info         : platform:rkisp1
	Media version    : 5.11.0
	Hardware revision: 0x00000000 (0)
	Driver version   : 5.11.0
Interface Info:
	ID               : 0x0300001a
	Type             : V4L Video
Entity Info:
	ID               : 0x00000018 (24)
	Name             : rkisp1_params
	Function         : V4L2 I/O
	Pad 0x01000019   : 0: Source
	  Link 0x02000028: to remote pad 0x1000003 of entity 'rkisp1_isp': Data, Enabled, Immutable
Priority: 2
Format Metadata Output:
	Sample Format   : 'RK1P' (Rockchip ISP1 3A Parameters)
	Buffer Size     : 2964
ubuntu@nanopi-m4:~$ /usr/local/bin/v4l2-ctl -d /dev/video6 --all
Driver Info:
	Driver name      : rkisp1
	Card type        : rkisp1
	Bus info         : platform:rkisp1
	Driver version   : 5.11.0
	Capabilities     : 0xa4201000
		Video Capture Multiplanar
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x24201000
		Video Capture Multiplanar
		Streaming
		Extended Pix Format
Media Driver Info:
	Driver name      : rkisp1
	Model            : rkisp1
	Serial           : 
	Bus info         : platform:rkisp1
	Media version    : 5.11.0
	Hardware revision: 0x00000000 (0)
	Driver version   : 5.11.0
Interface Info:
	ID               : 0x0300000d
	Type             : V4L Video
Entity Info:
	ID               : 0x0000000c (12)
	Name             : rkisp1_mainpath
	Function         : V4L2 I/O
	Pad 0x0100000f   : 0: Sink
	  Link 0x02000022: from remote pad 0x1000008 of entity 'rkisp1_resizer_mainpath': Data, Enabled, Immutable
Priority: 2
Video input : 0 (rkisp1_mainpath: ok)
Format Video Capture Multiplanar:
	Width/Height      : 1920/1080
	Pixel Format      : 'YUYV' (YUYV 4:2:2)
	Field             : None
	Number of planes  : 1
	Flags             : 
	Colorspace        : Default
	Transfer Function : Default
	YCbCr/HSV Encoding: Default
	Quantization      : Default
	Plane 0           :
	   Bytes per Line : 3840
	   Size Image     : 4147200
ubuntu@nanopi-m4:~$ /usr/local/bin/v4l2-ctl -d /dev/video7 --all
Driver Info:
	Driver name      : rkisp1
	Card type        : rkisp1
	Bus info         : platform:rkisp1
	Driver version   : 5.11.0
	Capabilities     : 0xa4201000
		Video Capture Multiplanar
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x24201000
		Video Capture Multiplanar
		Streaming
		Extended Pix Format
Media Driver Info:
	Driver name      : rkisp1
	Model            : rkisp1
	Serial           : 
	Bus info         : platform:rkisp1
	Media version    : 5.11.0
	Hardware revision: 0x00000000 (0)
	Driver version   : 5.11.0
Interface Info:
	ID               : 0x03000011
	Type             : V4L Video
Entity Info:
	ID               : 0x00000010 (16)
	Name             : rkisp1_selfpath
	Function         : V4L2 I/O
	Pad 0x01000013   : 0: Sink
	  Link 0x02000026: from remote pad 0x100000b of entity 'rkisp1_resizer_selfpath': Data, Enabled, Immutable
Priority: 2
Video input : 0 (rkisp1_selfpath: ok)
Format Video Capture Multiplanar:
	Width/Height      : 1280/720
	Pixel Format      : 'YUYV' (YUYV 4:2:2)
	Field             : None
	Number of planes  : 1
	Flags             : 
	Colorspace        : Default
	Transfer Function : Default
	YCbCr/HSV Encoding: Default
	Quantization      : Default
	Plane 0           :
	   Bytes per Line : 2560
	   Size Image     : 1843200
ubuntu@nanopi-m4:~$ /usr/local/bin/v4l2-ctl -d /dev/video8 --all
Driver Info:
	Driver name      : rkisp1
	Card type        : rkisp1_stats
	Bus info         : platform:rkisp1
	Driver version   : 5.11.0
	Capabilities     : 0x84a00000
		Metadata Capture
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x04a00000
		Metadata Capture
		Streaming
		Extended Pix Format
Media Driver Info:
	Driver name      : rkisp1
	Model            : rkisp1
	Serial           : 
	Bus info         : platform:rkisp1
	Media version    : 5.11.0
	Hardware revision: 0x00000000 (0)
	Driver version   : 5.11.0
Interface Info:
	ID               : 0x03000016
	Type             : V4L Video
Entity Info:
	ID               : 0x00000014 (20)
	Name             : rkisp1_stats
	Function         : V4L2 I/O
	Pad 0x01000015   : 0: Sink
	  Link 0x0200002a: from remote pad 0x1000005 of entity 'rkisp1_isp': Data, Enabled, Immutable
Priority: 2
Format Metadata Capture:
	Sample Format   : 'RK1S' (Rockchip ISP1 3A Statistics)
	Buffer Size     : 108
ubuntu@nanopi-m4:~$ /usr/local/bin/v4l2-ctl -d /dev/video9 --all
Driver Info:
	Driver name      : rkisp1
	Card type        : rkisp1_params
	Bus info         : platform:rkisp1
	Driver version   : 5.11.0
	Capabilities     : 0x8c200000
		Metadata Output
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x0c200000
		Metadata Output
		Streaming
		Extended Pix Format
Media Driver Info:
	Driver name      : rkisp1
	Model            : rkisp1
	Serial           : 
	Bus info         : platform:rkisp1
	Media version    : 5.11.0
	Hardware revision: 0x00000000 (0)
	Driver version   : 5.11.0
Interface Info:
	ID               : 0x0300001a
	Type             : V4L Video
Entity Info:
	ID               : 0x00000018 (24)
	Name             : rkisp1_params
	Function         : V4L2 I/O
	Pad 0x01000019   : 0: Source
	  Link 0x02000028: to remote pad 0x1000003 of entity 'rkisp1_isp': Data, Enabled, Immutable
Priority: 2
Format Metadata Output:
	Sample Format   : 'RK1P' (Rockchip ISP1 3A Parameters)
	Buffer Size     : 2964
ubuntu@nanopi-m4:~$ /usr/local/bin/v4l2-ctl -d /dev/video10 --all
Driver Info:
	Driver name      : hantro-vpu
	Card type        : rockchip,rk3399-vpu-enc
	Bus info         : platform: hantro-vpu
	Driver version   : 5.11.0
	Capabilities     : 0x84204000
		Video Memory-to-Memory Multiplanar
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x04204000
		Video Memory-to-Memory Multiplanar
		Streaming
		Extended Pix Format
Media Driver Info:
	Driver name      : hantro-vpu
	Model            : hantro-vpu
	Serial           : 
	Bus info         : platform: hantro-vpu
	Media version    : 5.11.0
	Hardware revision: 0x00000000 (0)
	Driver version   : 5.11.0
Interface Info:
	ID               : 0x0300000c
	Type             : V4L Video
Entity Info:
	ID               : 0x00000001 (1)
	Name             : rockchip,rk3399-vpu-enc-source
	Function         : V4L2 I/O
	Pad 0x01000002   : 0: Source
	  Link 0x02000008: to remote pad 0x1000004 of entity 'rockchip,rk3399-vpu-enc-proc': Data, Enabled, Immutable
Priority: 2
Format Video Capture Multiplanar:
	Width/Height      : 96/32
	Pixel Format      : 'JPEG' (JFIF JPEG)
	Field             : None
	Number of planes  : 1
	Flags             : 
	Colorspace        : JPEG
	Transfer Function : Default
	YCbCr/HSV Encoding: Default
	Quantization      : Default
	Plane 0           :
	   Bytes per Line : 0
	   Size Image     : 6745
Format Video Output Multiplanar:
	Width/Height      : 96/32
	Pixel Format      : 'YM12' (Planar YUV 4:2:0 (N-C))
	Field             : None
	Number of planes  : 3
	Flags             : 
	Colorspace        : JPEG
	Transfer Function : Default
	YCbCr/HSV Encoding: Default
	Quantization      : Default
	Plane 0           :
	   Bytes per Line : 96
	   Size Image     : 3072
	Plane 1           :
	   Bytes per Line : 48
	   Size Image     : 768
	Plane 2           :
	   Bytes per Line : 48
	   Size Image     : 768

JPEG Compression Controls

            compression_quality 0x009d0903 (int)    : min=5 max=100 step=1 default=50 value=50
ubuntu@nanopi-m4:~$ /usr/local/bin/v4l2-ctl -d /dev/video11 --all
Driver Info:
	Driver name      : hantro-vpu
	Card type        : rockchip,rk3399-vpu-dec
	Bus info         : platform: hantro-vpu
	Driver version   : 5.11.0
	Capabilities     : 0x84204000
		Video Memory-to-Memory Multiplanar
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x04204000
		Video Memory-to-Memory Multiplanar
		Streaming
		Extended Pix Format
Media Driver Info:
	Driver name      : hantro-vpu
	Model            : hantro-vpu
	Serial           : 
	Bus info         : platform: hantro-vpu
	Media version    : 5.11.0
	Hardware revision: 0x00000000 (0)
	Driver version   : 5.11.0
Interface Info:
	ID               : 0x0300001a
	Type             : V4L Video
Entity Info:
	ID               : 0x0000000f (15)
	Name             : rockchip,rk3399-vpu-dec-source
	Function         : V4L2 I/O
	Pad 0x01000010   : 0: Source
	  Link 0x02000016: to remote pad 0x1000012 of entity 'rockchip,rk3399-vpu-dec-proc': Data, Enabled, Immutable
Priority: 2
Format Video Capture Multiplanar:
	Width/Height      : 48/48
	Pixel Format      : 'NV12' (Y/CbCr 4:2:0)
	Field             : None
	Number of planes  : 1
	Flags             : 
	Colorspace        : JPEG
	Transfer Function : Default
	YCbCr/HSV Encoding: Default
	Quantization      : Default
	Plane 0           :
	   Bytes per Line : 48
	   Size Image     : 3456
Format Video Output Multiplanar:
	Width/Height      : 48/48
	Pixel Format      : 'MG2S' (MPEG-2 Parsed Slice Data)
	Field             : None
	Number of planes  : 1
	Flags             : 
	Colorspace        : JPEG
	Transfer Function : Default
	YCbCr/HSV Encoding: Default
	Quantization      : Default
	Plane 0           :
	   Bytes per Line : 0
	   Size Image     : 4608
        mpeg_2_slice_parameters 0x009909fa (unknown): type=103 value=unsupported payload type flags=has-payload
   mpeg_2_quantization_matrices 0x009909fb (unknown): type=104 value=unsupported payload type flags=has-payload
               vp8_frame_header 0x009910d0 (unknown): type=301 value=unsupported payload type flags=has-payload



ubuntu@nanopi-m4:~$ /usr/local/bin/media-ctl -d /dev/media0 -p
Media controller API version 5.11.0

Media device information
------------------------
driver          rkvdec
model           rkvdec
serial          
bus info        platform:rkvdec
hw revision     0x0
driver version  5.11.0

Device topology
- entity 1: rkvdec-source (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video1
	pad0: Source
		-> "rkvdec-proc":0 [ENABLED,IMMUTABLE]

- entity 3: rkvdec-proc (2 pads, 2 links)
            type Node subtype Unknown flags 0
	pad0: Sink
		<- "rkvdec-source":0 [ENABLED,IMMUTABLE]
	pad1: Source
		-> "rkvdec-sink":0 [ENABLED,IMMUTABLE]

- entity 6: rkvdec-sink (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video1
	pad0: Sink
		<- "rkvdec-proc":1 [ENABLED,IMMUTABLE]

ubuntu@nanopi-m4:~$ /usr/local/bin/media-ctl -d /dev/media1 -p
Media controller API version 5.11.0

Media device information
------------------------
driver          rkisp1
model           rkisp1
serial          
bus info        platform:rkisp1
hw revision     0x0
driver version  5.11.0

Device topology
- entity 1: rkisp1_isp (4 pads, 5 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev0
	pad0: Sink
		[fmt:SRGGB10_1X10/800x600 field:none
		 crop.bounds:(0,0)/800x600
		 crop:(0,0)/800x600]
		<- "ov13850 1-0010":0 [ENABLED]
	pad1: Sink
		[fmt:unknown/0x0 field:none]
		<- "rkisp1_params":0 [ENABLED,IMMUTABLE]
	pad2: Source
		[fmt:YUYV8_2X8/800x600 field:none
		 crop.bounds:(0,0)/800x600
		 crop:(0,0)/800x600]
		-> "rkisp1_resizer_mainpath":0 [ENABLED]
		-> "rkisp1_resizer_selfpath":0 [ENABLED]
	pad3: Source
		[fmt:unknown/0x0 field:none]
		-> "rkisp1_stats":0 [ENABLED,IMMUTABLE]

- entity 6: rkisp1_resizer_mainpath (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev1
	pad0: Sink
		[fmt:YUYV8_2X8/800x600 field:none
		 crop.bounds:(0,0)/800x600
		 crop:(0,0)/800x600]
		<- "rkisp1_isp":2 [ENABLED]
	pad1: Source
		[fmt:YUYV8_2X8/800x600 field:none]
		-> "rkisp1_mainpath":0 [ENABLED,IMMUTABLE]

- entity 9: rkisp1_resizer_selfpath (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev2
	pad0: Sink
		[fmt:YUYV8_2X8/800x600 field:none
		 crop.bounds:(0,0)/800x600
		 crop:(0,0)/800x600]
		<- "rkisp1_isp":2 [ENABLED]
	pad1: Source
		[fmt:YUYV8_2X8/800x600 field:none]
		-> "rkisp1_selfpath":0 [ENABLED,IMMUTABLE]

- entity 12: rkisp1_mainpath (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video2
	pad0: Sink
		<- "rkisp1_resizer_mainpath":1 [ENABLED,IMMUTABLE]

- entity 16: rkisp1_selfpath (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video3
	pad0: Sink
		<- "rkisp1_resizer_selfpath":1 [ENABLED,IMMUTABLE]

- entity 20: rkisp1_stats (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video4
	pad0: Sink
		<- "rkisp1_isp":3 [ENABLED,IMMUTABLE]

- entity 24: rkisp1_params (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video5
	pad0: Source
		-> "rkisp1_isp":1 [ENABLED,IMMUTABLE]

- entity 28: ov13850 1-0010 (1 pad, 1 link)
             type V4L2 subdev subtype Sensor flags 0
             device node name /dev/v4l-subdev3
	pad0: Source
		[fmt:SBGGR10_1X10/2112x1568@10000/300000 field:none]
		-> "rkisp1_isp":0 [ENABLED]

ubuntu@nanopi-m4:~$ /usr/local/bin/media-ctl -d /dev/media2 -p
Media controller API version 5.11.0

Media device information
------------------------
driver          rkisp1
model           rkisp1
serial          
bus info        platform:rkisp1
hw revision     0x0
driver version  5.11.0

Device topology
- entity 1: rkisp1_isp (4 pads, 5 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev4
	pad0: Sink
		[fmt:SBGGR10_1X10/2112x1568 field:none
		 crop.bounds:(0,0)/2112x1568
		 crop:(0,0)/1920x1080]
		<- "ov13850 2-0010":0 []
	pad1: Sink
		[fmt:unknown/0x0 field:none]
		<- "rkisp1_params":0 [ENABLED,IMMUTABLE]
	pad2: Source
		[fmt:YUYV8_2X8/1920x1080 field:none
		 crop.bounds:(0,0)/1920x1080
		 crop:(0,0)/1920x1080]
		-> "rkisp1_resizer_mainpath":0 [ENABLED]
		-> "rkisp1_resizer_selfpath":0 []
	pad3: Source
		[fmt:unknown/0x0 field:none]
		-> "rkisp1_stats":0 [ENABLED,IMMUTABLE]

- entity 6: rkisp1_resizer_mainpath (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev5
	pad0: Sink
		[fmt:YUYV8_2X8/1920x1080 field:none
		 crop.bounds:(0,0)/1920x1080
		 crop:(0,0)/800x600]
		<- "rkisp1_isp":2 [ENABLED]
	pad1: Source
		[fmt:YUYV8_2X8/1920x1080 field:none]
		-> "rkisp1_mainpath":0 [ENABLED,IMMUTABLE]

- entity 9: rkisp1_resizer_selfpath (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev6
	pad0: Sink
		[fmt:YUYV8_2X8/800x600 field:none
		 crop.bounds:(0,0)/800x600
		 crop:(0,0)/800x600]
		<- "rkisp1_isp":2 []
	pad1: Source
		[fmt:YUYV8_2X8/800x600 field:none]
		-> "rkisp1_selfpath":0 [ENABLED,IMMUTABLE]

- entity 12: rkisp1_mainpath (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video6
	pad0: Sink
		<- "rkisp1_resizer_mainpath":1 [ENABLED,IMMUTABLE]

- entity 16: rkisp1_selfpath (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video7
	pad0: Sink
		<- "rkisp1_resizer_selfpath":1 [ENABLED,IMMUTABLE]

- entity 20: rkisp1_stats (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video8
	pad0: Sink
		<- "rkisp1_isp":3 [ENABLED,IMMUTABLE]

- entity 24: rkisp1_params (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video9
	pad0: Source
		-> "rkisp1_isp":1 [ENABLED,IMMUTABLE]

- entity 28: ov13850 2-0010 (1 pad, 1 link)
             type V4L2 subdev subtype Sensor flags 0
             device node name /dev/v4l-subdev7
	pad0: Source
		[fmt:SBGGR10_1X10/2112x1568@10000/300000 field:none]
		-> "rkisp1_isp":0 []

ubuntu@nanopi-m4:~$ /usr/local/bin/media-ctl -d /dev/media3 -p
Media controller API version 5.11.0

Media device information
------------------------
driver          hantro-vpu
model           hantro-vpu
serial          
bus info        platform: hantro-vpu
hw revision     0x0
driver version  5.11.0

Device topology
- entity 1: rockchip,rk3399-vpu-enc-source (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video10
	pad0: Source
		-> "rockchip,rk3399-vpu-enc-proc":0 [ENABLED,IMMUTABLE]

- entity 3: rockchip,rk3399-vpu-enc-proc (2 pads, 2 links)
            type Node subtype Unknown flags 0
	pad0: Sink
		<- "rockchip,rk3399-vpu-enc-source":0 [ENABLED,IMMUTABLE]
	pad1: Source
		-> "rockchip,rk3399-vpu-enc-sink":0 [ENABLED,IMMUTABLE]

- entity 6: rockchip,rk3399-vpu-enc-sink (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video10
	pad0: Sink
		<- "rockchip,rk3399-vpu-enc-proc":1 [ENABLED,IMMUTABLE]

- entity 15: rockchip,rk3399-vpu-dec-source (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video11
	pad0: Source
		-> "rockchip,rk3399-vpu-dec-proc":0 [ENABLED,IMMUTABLE]

- entity 17: rockchip,rk3399-vpu-dec-proc (2 pads, 2 links)
             type Node subtype Unknown flags 0
	pad0: Sink
		<- "rockchip,rk3399-vpu-dec-source":0 [ENABLED,IMMUTABLE]
	pad1: Source
		-> "rockchip,rk3399-vpu-dec-sink":0 [ENABLED,IMMUTABLE]

- entity 20: rockchip,rk3399-vpu-dec-sink (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video11
	pad0: Sink
		<- "rockchip,rk3399-vpu-dec-proc":1 [ENABLED,IMMUTABLE]

ubuntu@nanopi-m4:~$ 

All my attempts to configure the cameras failed, although both cameras have the same bus...

[  917.236061] rkisp1 ff910000.isp0: start pipeline failed -32
[  922.718377] rkisp1 ff910000.isp0: start pipeline failed -32
[  936.024418] rkisp1 ff920000.isp1: start pipeline failed -67
[  940.989432] rkisp1 ff920000.isp1: start pipeline failed -67
[ 1018.300151] rkisp1 ff910000.isp0: start pipeline failed -32
[ 1262.466482] rkisp1 ff920000.isp1: start pipeline failed -67
[ 1729.560950] rkisp1 ff910000.isp0: start pipeline failed -32

[Q] Unable to get V4L2_SUBDEV_FORMAT_ACTIVE

Thank you for your work on the driver.

I am facing the following error with libcamera:

[0:21:28.498784457] [950]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0+2127-5988661c
[0:21:28.524573852] [951] ERROR V4L2 v4l2_subdevice.cpp:285 'ov13850 1-0010': Unable to get rectangle 2 on pad 0: Inappropriate ioctl for device
[0:21:28.524697221] [951] ERROR V4L2 v4l2_subdevice.cpp:285 'ov13850 1-0010': Unable to get rectangle 1 on pad 0: Inappropriate ioctl for device
Using camera platform/ff110000.i2c/i2c-1/1-0010 ov13850

Did you have this error?
I have tested with mainline, collabora and a backport of rkisp1 from 5.11 with the same results.
Do you have any suggestions or tips I could try?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.