From e51d5b9c8a4cb083829f48b3e166ada4b953c704 Mon Sep 17 00:00:00 2001 From: Takashi Sakamoto Date: Wed, 5 May 2021 23:10:29 +0900 Subject: [PATCH] hwdb: ieee1394-unit-function: add entry for AV/C device with vendor unique command set In IEC 61883-1:1998, we can see some values for AV/C device with vendor unique command set in IEC 61883-1:1998. Current udev rule handles it for video. However it brings an issue that the functions in AV/C device are not distinguished just by the content of configuration ROM. In former commit, hardware database was added to describe function type of unit in the node, then udev rules are added to utilize the database. However, we have an request to obsolete existent udev rules by putting enough entries to the database. It should be done carefully. This commit adds entry into hardware database just for backward compatibility. The entry can match to some node and unit unexpectedly. Therefore this commit modifies existent entries to invalidate the effect from added entry. Signed-off-by: Takashi Sakamoto --- hwdb.d/80-ieee1394-unit-function.hwdb | 24 ++++++++++++++++++++++++ rules.d/50-udev-default.rules.in | 2 -- src/login/70-uaccess.rules.m4 | 4 +--- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/hwdb.d/80-ieee1394-unit-function.hwdb b/hwdb.d/80-ieee1394-unit-function.hwdb index 721ae24b6e..aa00711211 100644 --- a/hwdb.d/80-ieee1394-unit-function.hwdb +++ b/hwdb.d/80-ieee1394-unit-function.hwdb @@ -49,6 +49,22 @@ ieee1394:node:ven*mo*units*0x00a02d:0x010001* ieee1394:ven*mo*sp0000A02Dver00010001 IEEE1394_UNIT_FUNCTION_VIDEO=1 +# +# General entries for AV/C device with vendor unique command set: +# * IEC 61883-1:1998 +# + +# Please invalidate IEEE1394_UNIT_FUNCTION_VIDEO by adding entries if it is inconvenient. +ieee1394:node:ven*mo*units*0x00a02d:0x014000* +ieee1394:ven*mo*sp0000A02Dver00014000 + IEEE1394_UNIT_FUNCTION_VIDEO=1 + +# Just for backward compatibility. Please invalidate IEEE1394_UNIT_FUNCTION_VIDEO by adding entries +# if it is inconvenient. +ieee1394:node:ven*mo*units*0x00a02d:0x014001* +ieee1394:ven*mo*sp0000A02Dver00014001 + IEEE1394_UNIT_FUNCTION_VIDEO=1 + # # General entry for: # * 1394-based Digital Camera Specification Version 1.04 (Aug. 9, 1996, 1394 Trading Association) @@ -173,6 +189,7 @@ ieee1394:ven0000A07Emo000000A9sp0000A02Dver00014001 ID_MODEL_FROM_DATABASE=Mbox 2 Pro IEEE1394_UNIT_FUNCTION_MIDI=1 IEEE1394_UNIT_FUNCTION_AUDIO=1 + IEEE1394_UNIT_FUNCTION_VIDEO=0 ieee1394:node:ven0x0040abmo0x010048units0x00a02d:0x010001 ieee1394:ven000040ABmo00010048sp0000A02Dver00010001 @@ -240,6 +257,7 @@ ieee1394:ven00000D6Cmo00010071sp0000A02Dver00014001 ID_MODEL_FROM_DATABASE=FW 1814 IEEE1394_UNIT_FUNCTION_MIDI=1 IEEE1394_UNIT_FUNCTION_AUDIO=1 + IEEE1394_UNIT_FUNCTION_VIDEO=0 # Vendor is BridgeCo Co AG but M-Audio. ieee1394:node:ven0x0007f5mo0x010046units0x00a02d:0x014001 @@ -248,6 +266,7 @@ ieee1394:ven000007F5mo00010046sp0000A02Dver00014001 ID_MODEL_FROM_DATABASE=FW 410 IEEE1394_UNIT_FUNCTION_MIDI=1 IEEE1394_UNIT_FUNCTION_AUDIO=1 + IEEE1394_UNIT_FUNCTION_VIDEO=0 ieee1394:node:ven0x000d6cmo0x010060units0x00a02d:0x014001 ieee1394:ven00000D6Cmo00010060sp0000A02Dver00014001 @@ -255,6 +274,7 @@ ieee1394:ven00000D6Cmo00010060sp0000A02Dver00014001 ID_MODEL_FROM_DATABASE=FW Audiophile IEEE1394_UNIT_FUNCTION_MIDI=1 IEEE1394_UNIT_FUNCTION_AUDIO=1 + IEEE1394_UNIT_FUNCTION_VIDEO=0 ieee1394:node:ven0x000d6cmo0x010062units0x00a02d:0x010001 ieee1394:ven00000D6Cmo00010062sp0000A02Dver00010001 @@ -276,6 +296,7 @@ ieee1394:ven00000D6Cmo0000000Asp0000A02Dver00014001 ID_MODEL_FROM_DATABASE=Ozonic IEEE1394_UNIT_FUNCTION_MIDI=1 IEEE1394_UNIT_FUNCTION_AUDIO=1 + IEEE1394_UNIT_FUNCTION_VIDEO=0 ieee1394:node:ven0x000d6cmo0x0100a1units0x00a02d:0x014001 ieee1394:ven00000D6Cmo000100A1sp0000A02Dver00014001 @@ -283,6 +304,7 @@ ieee1394:ven00000D6Cmo000100A1sp0000A02Dver00014001 ID_MODEL_FROM_DATABASE=ProFire Lightbridge IEEE1394_UNIT_FUNCTION_MIDI=1 IEEE1394_UNIT_FUNCTION_AUDIO=1 + IEEE1394_UNIT_FUNCTION_VIDEO=0 ieee1394:node:ven0x000d6cmo0x010091units0x00a02d:0x014001 ieee1394:ven00000D6Cmo00010091sp0000A02Dver00014001 @@ -290,6 +312,7 @@ ieee1394:ven00000D6Cmo00010091sp0000A02Dver00014001 ID_MODEL_FROM_DATABASE=ProjectMix I/O IEEE1394_UNIT_FUNCTION_MIDI=1 IEEE1394_UNIT_FUNCTION_AUDIO=1 + IEEE1394_UNIT_FUNCTION_VIDEO=0 # An extension card for Mackie Onyx 1220, 1620, and 1640. ieee1394:node:ven0x000ff2mo0x010065units0x00a02d:0x010001 @@ -1160,6 +1183,7 @@ ieee1394:ven00000166mo00000002sp0000A02Dver00014000 ID_VENDOR_FROM_DATABASE=TC Electronic ID_MODEL_FROM_DATABASE=PowerCore Compact IEEE1394_UNIT_FUNCTION_AUDIO=1 + IEEE1394_UNIT_FUNCTION_VIDEO=0 # Match to Adrenaline, Mojo, and V10. ieee1394:node:ven0x00a07eunits0x00a02d:0x014001 diff --git a/rules.d/50-udev-default.rules.in b/rules.d/50-udev-default.rules.in index 7ba3b70e09..53d485dabf 100644 --- a/rules.d/50-udev-default.rules.in +++ b/rules.d/50-udev-default.rules.in @@ -49,8 +49,6 @@ SUBSYSTEM=="sound", GROUP="audio", \ SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664" -SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x014001*", GROUP="video" - SUBSYSTEM=="firewire", TEST=="units", TEST=="model", \ IMPORT{builtin}="hwdb 'ieee1394:node:ven$attr{vendor}mo$attr{model}units$attr{units}'" diff --git a/src/login/70-uaccess.rules.m4 b/src/login/70-uaccess.rules.m4 index 974fcf56ca..708396dc7e 100644 --- a/src/login/70-uaccess.rules.m4 +++ b/src/login/70-uaccess.rules.m4 @@ -37,9 +37,7 @@ SUBSYSTEM=="firewire", ENV{ID_FFADO}=="1", TAG+="uaccess" SUBSYSTEM=="video4linux", TAG+="uaccess" SUBSYSTEM=="dvb", TAG+="uaccess" -# AV/C devices: camcorders, set-top boxes, TV sets, audio devices, and more -SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x014001*", TAG+="uaccess" - +# industrial cameras, some webcams, camcorders, set-top boxes, TV sets, audio devices, and more SUBSYSTEM=="firewire", TEST=="units", ENV{IEEE1394_UNIT_FUNCTION_MIDI}=="1", TAG+="uaccess" SUBSYSTEM=="firewire", TEST=="units", ENV{IEEE1394_UNIT_FUNCTION_AUDIO}=="1", TAG+="uaccess" SUBSYSTEM=="firewire", TEST=="units", ENV{IEEE1394_UNIT_FUNCTION_VIDEO}=="1", TAG+="uaccess"