libcamera/include/libcamera/internal
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
..
converter libcamera: converter: Replace usage of stream index by Stream pointer 2024-07-03 10:36:55 +05:30
software_isp libcamera: converter: Replace usage of stream index by Stream pointer 2024-07-03 10:36:55 +05:30
tracepoints libcamera: internal: tracepoints: Use correct include directive 2023-02-09 19:39:54 +05:30
bayer_format.h libcamera: formats: Add PiSP specific image and config buffer formats 2024-05-16 16:11:06 +01:00
byte_stream_buffer.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
camera.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
camera_controls.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
camera_lens.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
camera_manager.h libcamera: ipa_manager: Remove singleton requirement 2024-08-07 18:58:55 +03:00
camera_sensor.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
camera_sensor_properties.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
control_serializer.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
control_validator.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
converter.h libcamera: converter: Replace usage of stream index by Stream pointer 2024-07-03 10:36:55 +05:30
delayed_controls.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
device_enumerator.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
device_enumerator_sysfs.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
device_enumerator_udev.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
dma_buf_allocator.h libcamera: DmaBufAllocator: Support allocating from /dev/udmabuf 2024-06-04 16:19:33 +01:00
formats.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
framebuffer.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
ipa_data_serializer.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
ipa_manager.h libcamera: ipa_manager: Remove singleton requirement 2024-08-07 18:58:55 +03:00
ipa_module.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
ipa_proxy.h libcamera: ipa_proxy: Report a missing configuration as a warning 2024-08-01 08:50:36 +01:00
ipc_pipe.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
ipc_pipe_unixsocket.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
ipc_unixsocket.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
mapped_framebuffer.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
media_device.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
media_object.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
meson.build meson: Move all code generation scripts to utils/codegen/ 2024-08-15 23:59:08 +03:00
pipeline_handler.h pipeline_handler: Add acquireDevice() function to mirror releaseDevice() 2024-08-30 15:15:06 +03:00
process.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
pub_key.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
shared_mem_object.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
source_paths.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
sysfs.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
tracepoints.h.in libcamera: Drop file name from header comment blocks in templates 2024-05-09 23:31:14 +03:00
v4l2_device.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
v4l2_pixelformat.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
v4l2_subdevice.h libcamera: v4l2_subdevice: Update to the new kernel routing API 2024-06-03 12:18:25 +03:00
v4l2_videodevice.h libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
yaml_parser.h libcamera: Add missing <stdint.h> include to internal/yaml_parser.h 2024-08-12 14:57:35 +03:00