The apple-isp driver already exposes processed NV12 frames through a standard, single-node V4L2 capture interface. For libcamera support a pipeline handler need to explicit claim it.
The existing libcamera uvcvideo pipeline handler appears suitable for this type of firmware-processed camera. The apple-isp driver likely only needs to expose the media-entity metadata expected by that handler. That means:
- register /dev/video0 as an entity belonging to the apple-isp media device
- mark that entity with MEDIA_ENT_FL_DEFAULT so libcamera knows it is the capture node to open
- give the entity an appropriate capture sink pad
- report consistent media-device and VIDIOC_QUERYCAP information
- driver: apple-isp
- model/card: FaceTime HD Camera
- stable platform bus information
- report a coherent single-planar capture API
- V4L2_CAP_VIDEO_CAPTURE
- V4L2_CAP_STREAMING
- NV12 formats, sizes, stride and buffer sizes that agree with the queue implementation
Once that lands, libcamera could whitelist apple-isp and use the camera identification instead of USB specific metadata.
This should allow libcamera applications to use the existing processed output without implementing a complete apple specific pipeline handler. A full apple-isp handler in libcamera could be a next step once this driver is upstreamed to mainline Linux.
I currently do not have access to Apple M-series hardware. Otherwise I would be able to develop, test and submit a proper patch for this myself. I'm reaching out here since I had a user that reported a non working webcam on my libcamera only app https://github.com/cosmic-utils/cosmic-ext-camera
The apple-isp driver already exposes processed NV12 frames through a standard, single-node V4L2 capture interface. For libcamera support a pipeline handler need to explicit claim it.
The existing libcamera uvcvideo pipeline handler appears suitable for this type of firmware-processed camera. The apple-isp driver likely only needs to expose the media-entity metadata expected by that handler. That means:
Once that lands, libcamera could whitelist apple-isp and use the camera identification instead of USB specific metadata.
This should allow libcamera applications to use the existing processed output without implementing a complete apple specific pipeline handler. A full apple-isp handler in libcamera could be a next step once this driver is upstreamed to mainline Linux.
I currently do not have access to Apple M-series hardware. Otherwise I would be able to develop, test and submit a proper patch for this myself. I'm reaching out here since I had a user that reported a non working webcam on my libcamera only app https://github.com/cosmic-utils/cosmic-ext-camera