Skip to content

contrib: expose the Surface Laptop 1 infrared camera to PipeWire - #2405

Open
Dvaderfun wants to merge 1 commit into
linux-surface:masterfrom
Dvaderfun:contrib/sl1-infrared-camera
Open

Dvaderfun wants to merge 1 commit into
linux-surface:masterfrom
Dvaderfun:contrib/sl1-infrared-camera

Conversation

@Dvaderfun

Copy link
Copy Markdown

The first-generation Surface Laptop has a separate monochrome OV7251. Its Intel CIO2 node delivers packed 10-bit frames, but the libcamera IPU3 pipeline accepts Bayer inputs and does not publish this sensor to desktop camera apps. This adds an optional user-session PipeWire source under contrib/surface-laptop1-ir/. It installs no driver, changes no color-camera defaults, and enables no service automatically.

Passive capture is the default (640×480 at 30 fps). On a kernel with a compatible synchronized strobe driver, --illuminate delivers 15 distinct illuminated frames/s by selecting the lit exposure in each pair. The launcher checks the SL1 DMI and sensor firmware identity, discovers the media route, and takes the same controller lock as libcamera so switching sources does not interrupt an active camera. Project kernels without the strobe control can still use passive mode; explicitly requested illumination fails if the control is absent.

Tested on one physical Surface Laptop 1, Fedora 45 / 7.3.4-2.surface:

  • A GStreamer client connected to the exact staged package on a private PipeWire server received 12 timestamped 640×480 YUY2 frames per mode: 30.0 fps passive and 15.0 fps illuminated. Kernel strobe readback was 0 after both. App results, direct results.
  • With fixed gain and exposure, the raw optical test measured 20.6 off, 251.9 on lit frames, 20.7 on dark intervening frames, and 20.5 after shutdown. The exact model-scoped backport differs from the unmodified linux-media submission; the generic series is not being resubmitted here.
  • Compiled with warnings as errors; tested packed frame selection, dropped frames, both lock-ownership orders, discovery on missing/wrong hardware, and staging, unit validation and clean removal. No full suspend/resume or other model claim.

The three-page wiki proposal updates Camera Support, the SL1 device page and the SL1 feature-matrix cell to experimental / requires patches, following the wiki's existing convention. It applies to linux-surface.wiki.git at 89ead87 and is supplied separately because the wiki cannot receive a project PR. Color driver review · 7.3 build config · all patch versions and reproduction instructions.

Publish the OV7251 using its CIO2 media route and the same controller reservation as libcamera. Default to passive capture; explicitly requested illumination uses the kernel strobe control and returns one lit frame per pair. Include build, staged installation, removal and synthetic checks.

Assisted-by: OpenAI Codex
@danielzgtg

Copy link
Copy Markdown
Collaborator

expose the Surface Laptop 1 infrared camera to PipeWire

Please expose it to (pipewire-)libcamera instead, or less preferably, v4l2loopback. PipeWire is difficult to debug synchronously and not necessarily installed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants