libcamera/include
Hans de Goede c05e45ac77 pipeline_handler: Add acquireDevice() function to mirror releaseDevice()
libcamera always keeps all /dev/video# and /dev/v4l2_subdev# nodes for a
pipeline open after enumerating the camera.

This is a problem for the uvcvideo pipeline handler. Keeping /dev/video#
open stops the UVC USB device from being able to enter runtime-suspend
causing significant unnecessary power-usage.

Add a stub acquireDevice() function to the PipelineHandler class which
pipeline handlers can override.

The uvcvideo pipeline handler will use this to delay opening /dev/video#
until the device is acquired. This is a special case because the kernel
uvcvideo driver powers on the USB device as soon as /dev/video# is
opened. This behavior should *not* be copied by other pipeline handlers.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Harvey Yang <chenghaoyang@chromium.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2024-08-30 15:15:06 +03:00
..
android android: Add missing SPDX headers to Android headers 2022-09-30 21:51:18 +03:00
libcamera pipeline_handler: Add acquireDevice() function to mirror releaseDevice() 2024-08-30 15:15:06 +03:00
linux include: linux: Update headers for rkisp1 extensible parameters 2024-08-27 12:28:42 +03:00
meson.build libcamera: tracing: fix header generation when built as subproject 2022-11-24 14:52:00 +00:00