summaryrefslogtreecommitdiff
path: root/rules/debian/60-persistent-v4l.rules
diff options
context:
space:
mode:
Diffstat (limited to 'rules/debian/60-persistent-v4l.rules')
-rw-r--r--rules/debian/60-persistent-v4l.rules17
1 files changed, 17 insertions, 0 deletions
diff --git a/rules/debian/60-persistent-v4l.rules b/rules/debian/60-persistent-v4l.rules
new file mode 100644
index 0000000000..5a317b6c18
--- /dev/null
+++ b/rules/debian/60-persistent-v4l.rules
@@ -0,0 +1,17 @@
+ACTION!="add|change", GOTO="persistent_v4l_end"
+SUBSYSTEM!="video4linux", GOTO="persistent_v4l_end"
+
+# ignore devices without a valid "index" number
+TEST!="index", GOTO="persistent_v4l_end"
+ATTR{index}!="?*", GOTO="persistent_v4l_end"
+
+IMPORT{program}="path_id $devpath"
+
+KERNEL=="video*|vbi*", ENV{ID_PATH}=="?*", \
+ SYMLINK+="v4l/by-path/$env{ID_PATH}-video-index$attr{index}"
+
+KERNEL=="audio*", ENV{ID_PATH}=="?*", \
+ SYMLINK+="v4l/by-path/$env{ID_PATH}-audio-index$attr{index}"
+
+LABEL="persistent_v4l_end"
+