Table of Contents

GMSL & Analog Cameras

GMSL and analog cameras are local capture devices. Before an application can open one, the display's camera driver stack has to be loaded and its media graph routed. This page covers how that happens, how a port becomes a device node, and the image options each input supports.

Table of Contents

What Your Application Does

Boot-Time Bring-Up

Port Symlinks

Board Topology

The GMSL Pipeline

The Analog Pipeline

Flip and Deinterlace

Overriding the Capture Node

What Your Application Does

Nothing beyond PlayVideo and StopVideo. Bring-up is automatic, deinterlace and flip are applied from configuration, and a camera that is not attached simply reports Unavailable.

Boot-Time Bring-Up

The camera drivers are deliberately not loaded at boot. Prep Target (Developer Toolkit 5.30.0 and newer) installs /etc/modprobe.d/ahsoka-video-blacklist.conf, which stops them autoloading, and the extension loads them on demand instead:

sequenceDiagram
    participant Svc as VideoService
    participant Unit as Ahsoka.Video.service
    participant Script as ahsoka-video-setup.sh
    participant App as PlayVideo

    Svc->>Unit: systemctl start (background thread)
    Note over Svc: service startup continues immediately
    Unit->>Script: run once
    Script->>Script: check blacklist present
    Script->>Script: modprobe the driver stack
    Script->>Script: discover sensors, check firmware
    Script->>Script: route + format the media graph
    Script->>Script: publish gmslN / analogN symlinks
    App->>Svc: PlayVideo (GMSL / Analog)
    Svc->>Svc: wait for bring-up (up to 30 s)
    Svc->>Svc: symlink present? launch : Unavailable
  • VideoService starts the unit only if at least one GMSL or analog player is configured, and only on OpenViewLinuxPro.
  • It starts it on a background thread, so a slow bring-up never delays your application or other services. Only the first GMSL/analog PlayVideo waits for it, for up to 30 seconds.
  • Packaging delivers the unit and script; see Packaging & the Device.

The script refuses to run, and publishes no symlinks, when:

Condition Logged
The blacklist file is missing (device prepped with an older Toolkit) A warning in the unit's journal and in dmesg; the application log names the cause at play
No GMSL link locked (no cameras connected) "no GMSL links locked" in the unit's journal

And it skips an individual camera when its sensor is absent, its firmware version cannot be read, or the firmware is below 25.10.0.1 (the 25.3.x series had GMSL concurrency bugs).

The script logs to the unit's journal (journalctl -u Ahsoka.Video.service); warnings also go to dmesg, next to the sensor and CSI driver messages.

Port Symlinks

The bring-up's output is a stable, board-independent namespace:

/usr/local/Ahsoka/devices/video/gmsl0   -> /dev/videoM
/usr/local/Ahsoka/devices/video/gmsl1   -> /dev/videoN
/usr/local/Ahsoka/devices/video/analog0 -> /dev/videoP

A player whose videoSource is GMSL1 opens /usr/local/Ahsoka/devices/video/gmsl1 — the logical port lower-cased under that base. Only ports with a working camera get a symlink. That absence is the failover signal: the service checks for the node before launching the pipeline, and if it is not there the player reports Unavailable and logs that there is no camera on that port.

ls -l /usr/local/Ahsoka/devices/video/ on the display is the quickest way to see what the bring-up found.

Board Topology

Each GMSL port is fixed to a physical connector, so GMSL0 always means the same socket on a given board:

Board Deserializer Ports Analog
Pro (P100) MAX96716 (max96716-tevs), 2-link gmsl0, gmsl1 on /dev/media0 2 jacks on an isl7998x, separate graph on /dev/media1
Flex MAX96724, 4-link gmsl0 … gmsl3 on /dev/media0 None

The script picks the topology from $PLATFORM_QUALIFIER (Flex, otherwise Pro). Analog bring-up runs first and is self-contained, so a GMSL problem never prevents analog cameras coming up.

Note

On Flex, dmesg shows cdns-csi2rx 30121000.csi-bridge: probe ... failed with error -107. That is the second CSI receiver, which has no source on Flex. It is expected and harmless.

The GMSL Pipeline

GMSL frames are raw UYVY. The pipeline opens the port's capture node with fixed caps and renders straight to the surface on the GPU, which does the colour conversion:

v4l2src device=/usr/local/Ahsoka/devices/video/gmsl0
  ! video/x-raw,format=UYVY,width=1920,height=1200,framerate=30/1
  ! glimagesink sync=false

sync=false presents each frame as it arrives, so a camera that delivers fewer frames than the caps ask for is not penalised by clock-based frame dropping.

The caps come from the player's pixelFormat, width, height and frameRate, and must agree with the format the bring-up applied to the media graph — 1920×1200 UYVY. See Defaults the Pipelines Apply.

The Analog Pipeline

Analog video is interlaced standard definition, delivered over the same CSI transport. The caps pin width, height and frame rate (default NTSC 720×480 at 30), because during the CSI cold-boot settle the node briefly reports a bogus height and an unpinned capture fails to allocate:

v4l2src device=/usr/local/Ahsoka/devices/video/analog0
  ! video/x-raw,format=UYVY,width=720,height=480,framerate=30/1
  ! glupload ! glcolorconvert ! <deinterlace pass> ! <flip pass>
  ! glimagesink sync=false

Analog capture is NTSC only for now. PAL is not supported yet: the Toolkit writes 720×480 for analog players, and the configuration upgrade resets older files to it, leaving a hand-set 720×576 alone.

Flip and Deinterlace

Both are GPU shader passes, never CPU elements, so the capture stays zero-copy:

Option GMSL Analog Notes
deinterlace Ignored Yes Weaves the two fields into a progressive frame. Without it an analog image shows visible doubling.
horizontalFlip Yes Yes For mirrored cameras or mountings
verticalFlip Yes Yes For upside-down mountings

On analog the flip runs after deinterlacing, so a vertical flip does not disturb the field order. With neither option set, a GMSL feed goes straight from v4l2src to glimagesink.

Pipelines with shader passes are too long to pass on a command line, so the service writes them to ahsoka-pipeline-<id>.gst in the temp directory and the log's SETUP line points at that file.

Overriding the Capture Node

Two escape hatches exist for bench work, and neither is offered by the Toolkit:

  • A videoSource that starts with / is used as the capture node as-is.
  • VideoPlaybackRequest.VideoURL, when set, replaces the node for that one play.

A node opened this way still has to be routed and formatted by the bring-up, or caps negotiation fails.