teknoraver / rpms / systemd

Forked from rpms/systemd a month ago
Clone

Blame SOURCES/0290-Add-AV-production-controllers-to-hwdb-and-add-uacces.patch

594167
From 41d06ed98ecbe4f65cfffc3877fbe4c87fadc6b4 Mon Sep 17 00:00:00 2001
594167
From: Be <be@mixxx.org>
594167
Date: Fri, 27 Aug 2021 22:30:50 -0500
594167
Subject: [PATCH] Add AV production controllers to hwdb and add uaccess
594167
594167
This adds support for AV production controller devices, such
594167
as DJ tables, music-oriented key pads, and others.
594167
594167
The USB vendor and product IDs come from Mixxx, Ctlra, and
594167
Ardour.
594167
594167
Fixes #20533
594167
594167
Co-developed-by: Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
594167
(cherry picked from commit f2c36c0e2445fa95ba109017d4b768b2fd825c43)
594167
594167
Related: #2087778
594167
---
594167
 hwdb.d/70-av-production.hwdb  | 123 ++++++++++++++++++++++++++++++++++
594167
 hwdb.d/meson.build            |   1 +
594167
 hwdb.d/parse_hwdb.py          |   1 +
594167
 src/login/70-uaccess.rules.in |   9 +++
594167
 4 files changed, 134 insertions(+)
594167
 create mode 100644 hwdb.d/70-av-production.hwdb
594167
594167
diff --git a/hwdb.d/70-av-production.hwdb b/hwdb.d/70-av-production.hwdb
594167
new file mode 100644
594167
index 0000000000..17ac1b4fb6
594167
--- /dev/null
594167
+++ b/hwdb.d/70-av-production.hwdb
594167
@@ -0,0 +1,123 @@
594167
+# This file is part of systemd.
594167
+#
594167
+# Database for AV production controllers that should be accessible to the seat owner.
594167
+#
594167
+# This covers DJ tables, and music-oriented key pads
594167
+#
594167
+# To add local entries, copy this file to
594167
+#   /etc/udev/hwdb.d/
594167
+# and add your rules there. To load the new rules execute (as root):
594167
+#   systemd-hwdb update
594167
+#   udevadm trigger
594167
+
594167
+################
594167
+# Ableton
594167
+################
594167
+# Push 2
594167
+usb:v2982p1967*
594167
+ ID_AV_PRODUCTION_CONTROLLER=1
594167
+
594167
+################
594167
+# Eks
594167
+################
594167
+# Otus
594167
+usb:v1157p0300*
594167
+ ID_AV_PRODUCTION_CONTROLLER=1
594167
+
594167
+#############################
594167
+# Hercules (Guillemot Corp)
594167
+#############################
594167
+# DJ Console MP3e2
594167
+usb:v06F8pB105*
594167
+ ID_AV_PRODUCTION_CONTROLLER=1
594167
+
594167
+# DJ Console MP3 LE / Glow
594167
+usb:v06F8pB120*
594167
+ ID_AV_PRODUCTION_CONTROLLER=1
594167
+
594167
+# DJ Console Mk2
594167
+usb:v06F8pB100*
594167
+ ID_AV_PRODUCTION_CONTROLLER=1
594167
+
594167
+# DJ Console Mk4
594167
+usb:v06F8pB107*
594167
+ ID_AV_PRODUCTION_CONTROLLER=1
594167
+
594167
+#####################
594167
+# Native Instruments
594167
+#####################
594167
+
594167
+# Maschine 2
594167
+usb:v17CCp1140*
594167
+ ID_AV_PRODUCTION_CONTROLLER=1
594167
+
594167
+# Maschine 2 Mikro
594167
+usb:v17CCp1110*
594167
+ ID_AV_PRODUCTION_CONTROLLER=1
594167
+
594167
+# Maschine 2 Studio
594167
+usb:v17CCp1300*
594167
+ ID_AV_PRODUCTION_CONTROLLER=1
594167
+
594167
+# Maschine Jam
594167
+usb:v17CCp1500*
594167
+ ID_AV_PRODUCTION_CONTROLLER=1
594167
+
594167
+# Maschine 3
594167
+usb:v17CCp1600*
594167
+ ID_AV_PRODUCTION_CONTROLLER=1
594167
+
594167
+# Traktor Kontrol D2
594167
+usb:v17CCp1400*
594167
+ ID_AV_PRODUCTION_CONTROLLER=1
594167
+
594167
+# Traktor Kontrol F1
594167
+usb:v17CCp1120*
594167
+ ID_AV_PRODUCTION_CONTROLLER=1
594167
+
594167
+# Traktor Kontrol S2 Mk2
594167
+usb:v17CCp1320*
594167
+ ID_AV_PRODUCTION_CONTROLLER=1
594167
+
594167
+# Traktor Kontrol S2 Mk3
594167
+usb:v17CCp1710*
594167
+ ID_AV_PRODUCTION_CONTROLLER=1
594167
+
594167
+# Traktor Kontrol S3
594167
+usb:v17CCp1900*
594167
+ ID_AV_PRODUCTION_CONTROLLER=1
594167
+
594167
+# Traktor Kontrol S4 Mk2
594167
+usb:v17CCp1310*
594167
+ ID_AV_PRODUCTION_CONTROLLER=1
594167
+
594167
+# Traktor Kontrol S4 Mk3
594167
+usb:v17CCp1720*
594167
+ ID_AV_PRODUCTION_CONTROLLER=1
594167
+
594167
+# Traktor Kontrol S5
594167
+usb:v17CCp1420*
594167
+ ID_AV_PRODUCTION_CONTROLLER=1
594167
+
594167
+# Traktor Kontrol S8
594167
+usb:v17CCp1370*
594167
+ ID_AV_PRODUCTION_CONTROLLER=1
594167
+
594167
+# Traktor Kontrol X1 Mk2
594167
+usb:v17CCp1220*
594167
+ ID_AV_PRODUCTION_CONTROLLER=1
594167
+
594167
+# Traktor Kontrol Z1
594167
+usb:v17CCp1210*
594167
+ ID_AV_PRODUCTION_CONTROLLER=1
594167
+
594167
+# Traktor Kontrol Z2
594167
+usb:v17CCp1130*
594167
+ ID_AV_PRODUCTION_CONTROLLER=1
594167
+
594167
+####################
594167
+# Pioneer
594167
+####################
594167
+# CDJ 2000 NXS 2
594167
+usb:v2B73p0005*
594167
+ ID_AV_PRODUCTION_CONTROLLER=1
594167
diff --git a/hwdb.d/meson.build b/hwdb.d/meson.build
594167
index fc72ebb2bd..8f6a8a4486 100644
594167
--- a/hwdb.d/meson.build
594167
+++ b/hwdb.d/meson.build
594167
@@ -28,6 +28,7 @@ hwdb_files_test = files('''
594167
         60-seat.hwdb
594167
         60-sensor.hwdb
594167
         70-analyzers.hwdb
594167
+        70-av-production.hwdb
594167
         70-cameras.hwdb
594167
         70-joystick.hwdb
594167
         70-mouse.hwdb
594167
diff --git a/hwdb.d/parse_hwdb.py b/hwdb.d/parse_hwdb.py
594167
index 194a71ac08..93179b675c 100755
594167
--- a/hwdb.d/parse_hwdb.py
594167
+++ b/hwdb.d/parse_hwdb.py
594167
@@ -135,6 +135,7 @@ def property_grammar():
594167
              ('MOUSE_WHEEL_CLICK_COUNT', INTEGER),
594167
              ('MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL', INTEGER),
594167
              ('ID_AUTOSUSPEND', Or((Literal('0'), Literal('1')))),
594167
+             ('ID_AV_PRODUCTION_CONTROLLER', Or((Literal('0'), Literal('1')))),
594167
              ('ID_PERSIST', Or((Literal('0'), Literal('1')))),
594167
              ('ID_PDA', Or((Literal('0'), Literal('1')))),
594167
              ('ID_INPUT', Or((Literal('0'), Literal('1')))),
594167
diff --git a/src/login/70-uaccess.rules.in b/src/login/70-uaccess.rules.in
594167
index 052194b6c9..a3301be1bc 100644
594167
--- a/src/login/70-uaccess.rules.in
594167
+++ b/src/login/70-uaccess.rules.in
594167
@@ -87,4 +87,13 @@ ENV{ID_SIGNAL_ANALYZER}=="?*", ENV{DEVTYPE}=="usb_device", TAG+="uaccess"
594167
 # rfkill / radio killswitches
594167
 KERNEL=="rfkill", SUBSYSTEM=="misc", TAG+="uaccess"
594167
 
594167
+# AV production controllers
594167
+# Most of these devices use HID for the knobs, faders, buttons, encoders, and jog wheels.
594167
+SUBSYSTEM=="hidraw", ENV{ID_AV_PRODUCTION_CONTROLLER}=="1", TAG+="uaccess"
594167
+
594167
+# Some devices use vendor defined protocols on USB Bulk endpoints for controllers.
594167
+# Other devices transfer graphics to screens on the device through USB Bulk endpoints.
594167
+# This also allows accessing HID devices with the libusb backend of hidapi.
594167
+SUBSYSTEM=="usb", ENV{ID_AV_PRODUCTION_CONTROLLER}=="1", TAG+="uaccess"
594167
+
594167
 LABEL="uaccess_end"