Altek AL6100 3D Imaging Linux driver

From RidgeRun Developer Wiki





Problems running the pipelines shown on this page? Please see our GStreamer Debugging guide for help.


Driver List Information
Refer to the RidgeRun Linux Camera Drivers and V4L2_drivers available for Jetson SoCs to meet all the list of Drivers available


AL6100 Features

The Altek AL6100 is an image sensor with the following features:

  • Support RAW8, RAW10 and RAW14 image input formats
  • Type-3 PDAF/2PD pattern supporting
    • PDAF/2PD type 1: Pass-through PD via VC or DT to SoC
    • PDAF/2PD type 2: Pass-through PP via VC or DT to SoC
    • Type-3 PDAF: extract and correct phase pixel
      • Output left and right PP via VC or DT to SoC
    • Type-3 2PD: Synthesis to Bayer format (2PD in, Bayer out)
      • Output Y-left and Y-right PP via VC or DT to SoC
  • Real-time zz-HDR synthesis
    • High throughput: up to 27M 30fps(8bpp)
      • Maximal width: 8096before 2PD merge, 7168 after 2PD merge
      • Maximal height: 4992
      • Aspect ratio: 16:9 and 4:3
    • AE histogram & stats
      • With Long/Short exposure AE histogram generator
      • AE stats at linear domain
      • Included in meta data output via MIPI VC or DT
    • Dynamic range: ±2 EV (limited by sensor)
    • Exposure ratio (L:S)=1:1, 2:1, 4:1, 8:1 and 16:1
    • 14-bit to 10-bit global tone mapping curve compression
  • Real-time 720p depth map generation
    • Depth map output, resolution up to 720p/30fps@10-bit depth map and 3-bit confidence map.
    • Resolution, 1280x720@16:9 / 960x720@4:3
    • Support depth at 30fps max., frame rate will be the same as sensor’s frame rate .
  • High performance: up to 810Mpixel/sec(8bpp)
  • Support lens distortion rate: <10%
  • Frame rate: up to 480fps (PDAF only, without HDR and Depth applications)
  • Temperature Range
    • Operating, -20℃ to +85℃
  • Operating Voltage
    • Core: 0.9V
    • I/O: 1.8V
  • Application
    • Smart Phone
    • Tablet
    • IP CAM
    • Automobile
    • Drone camera
    • Wearable/Sport camera
  • Package
    • Type: FC-CSP
    • Dimension: 5x5x0.8 mm (WxLxH)

RidgeRun has developed a driver for the Jetson TX2 with the following support:

  • L4T 32.2.0 and Jetpack 4.2
  • V4L2 Media controller driver
  • Supported Formats:
    • Raw 10 bit Raw
    • Depth Stream: 16bit Raw
    • Metadata Stream: 8 bit Raw
  • Supported Resolutions:
    • Main Stream:
      • 1296x1440@15
      • 1280x720@15
      • 656x720@15
      • 656x800@15
      • 640x360@15
      • 640x400@15
    • Depth Stream:
      • 1280x720@15
      • 640x360@15
      • 640x400@15
    • Metadata Stream:
      • 128x32@15

Enabling the driver

In order to use this driver, you have to patch and compile the kernel source using JetPack:

  • Once you have the source code, apply the following patch in order to add the changes required for the AP1302 camera at the kernel and dtb level.
4.2_al6100.patch
  • Follow the instructions in (Build Kernel) for building the kernel, and then flash the image.

Make sure to enable AL6100 driver support:

make menuconfig
-> Device Drivers                                                                                                                        
  -> Multimedia support                                                                                           
    -> <*> AL6100 camera sensor support

Using the driver

V4l2-ctl examples

Capture

Main Stream:

v4l2-ctl -d /dev/video1 --set-fmt-video=width=1296,height=1440 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100

Depth:

v4l2-ctl -d /dev/video2 --set-fmt-video=width=2560,height=720 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100

Metadata:

v4l2-ctl -d /dev/video3 --set-fmt-video=width=128,height=32 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100

Performance

ARM Load

Tegrastats display the following output when capturing with all three streams:

RAM 331/7860MB (lfb 1486x4MB) SWAP 0/3930MB (cached 0MB) CPU [1%@345,off,off,0%@345,0%@345,0%@345]
RAM 331/7860MB (lfb 1486x4MB) SWAP 0/3930MB (cached 0MB) CPU [2%@345,off,off,1%@345,0%@345,1%@345]
RAM 331/7860MB (lfb 1486x4MB) SWAP 0/3930MB (cached 0MB) CPU [1%@345,off,off,0%@345,0%@345,0%@345]
RAM 331/7860MB (lfb 1486x4MB) SWAP 0/3930MB (cached 0MB) CPU [2%@345,off,off,0%@345,1%@345,0%@345]

Framerate

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 15.00 fps<
< 15.00 fps
<< 15.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 15.00 fps
< 15.00 fps
<< 15.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 15.00 fps
<< 15.00 fps
<< 15.00 fps

GStreamer examples

Capture

Depth:

gst-launch-1.0 v4l2src device=/dev/video2 ! 'video/x-raw, width=(int)2560, height=(int)720, format=(string)GRAY8' ! autovideosink

The sensor will capture in the 2560x720@15 mode

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock


For direct inquiries, please refer to the contact information available on our Contact page. Alternatively, you may complete and submit the form provided at the same link. We will respond to your request at our earliest opportunity.


Links to RidgeRun Resources and RidgeRun Artificial Intelligence Solutions can be found in the footer below.