blob: 53be41c20d70b1ef79808ed0e5202b4ed61a753d [file] [log] [blame] [edit]
# Copyright 2020 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# New USB camera detected.
ACTION=="add", SUBSYSTEM=="video4linux", ENV{ID_USB_DRIVER}=="uvcvideo", \
RUN+="/bin/sh -c '/sbin/status system-services | /bin/grep -q \"start/running\" && /sbin/initctl emit --no-wait camera-device-added || true'"
# New MIPI camera sensor detected.
ACTION=="add", SUBSYSTEM=="video4linux", SUBSYSTEMS=="i2c", \
RUN+="/bin/sh -c '/sbin/status system-services | /bin/grep -q \"start/running\" && /sbin/initctl emit --no-wait camera-device-added || true'"
# Limit access to camx video nodes to the camera HAL.
ATTR{name}=="cam_sync", SUBSYSTEM=="video4linux", GROUP="camera"
ATTR{name}=="cam-req-mgr", SUBSYSTEM=="video4linux", GROUP="camera"
# Limit access to capture device nodes (cameras) to the camera HAL.
ENV{ID_V4L_CAPABILITIES}==":capture:", SUBSYSTEM=="video4linux", GROUP="camera"
# Limit access to v4l subdevices to the camera HAL.
SUBSYSTEM=="video4linux", KERNEL=="v4l-subdev*", GROUP="camera"
# Limit access to media devices to the camera HAL.
SUBSYSTEM=="media", ENV{MEDIA_DEVICE_TYPE}!="decoder", GROUP="camera"