libcamera/include/libcamera
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
..
base libcamera: Fix header grouping 2024-08-12 14:57:35 +03:00
internal pipeline_handler: Add acquireDevice() function to mirror releaseDevice() 2024-08-30 15:15:06 +03:00
ipa ipa: rkisp1: Pass parameters buffer size to pipeline handler 2024-08-27 12:28:51 +03:00
camera.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
camera_manager.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
color_space.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
control_ids.h.in utils: codegen: gen-controls.py: Convert to jinja2 templates 2024-08-16 00:27:54 +03:00
controls.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
fence.h libcamera: Drop remaining file name from header comment blocks 2024-05-09 23:31:15 +03:00
formats.h.in libcamera: Drop file name from header comment blocks in templates 2024-05-09 23:31:14 +03:00
framebuffer.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
framebuffer_allocator.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
geometry.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
logging.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
meson.build utils: codegen: gen-controls.py: Move helper classes to separate file 2024-08-16 00:28:32 +03:00
orientation.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
pixel_format.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
request.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
stream.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
transform.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
version.h.in libcamera: Drop file name from header comment blocks in templates 2024-05-09 23:31:14 +03:00