Commit graph

9 commits

Author SHA1 Message Date
Takashi Sakamoto ecd64ffafd udev: uaccess: remove ID_FFADO entry
The ID_FFADO environment variable comes from external FFADO project.
Now we have comprehensive and self-contained rules instead of it.
Let's remove it.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
2021-05-05 23:10:29 +09:00
Takashi Sakamoto e51d5b9c8a 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 <o-takashi@sakamocchi.jp>
2021-05-05 23:10:29 +09:00
Takashi Sakamoto 002f6e92af hwdb: ieee1394-unit-function: add entry for AV/C device with generic AV/C command set
Typical node of AV/C device has standard content of configuration ROM.
This is defined in documentation of 1394 Trading Association.

 * Configuration ROM for AV/C Devices 1.0 (Dec. 12, 2000, 1394 Trading
   Association, TA Document 1999027)

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 <o-takashi@sakamocchi.jp>
2021-05-05 23:10:29 +09:00
Takashi Sakamoto 70fb7e5da5 hwdb: ieee1394-unit-function: add entries for Point Grey cameras
Point Grey Research, inc. shipped cameras to support IIDC, however some
of them are necessarily compliant to IIDC specification in terms of the
value of software version field in unit directory of configuration ROM.

This commit adds entries for them.

Reviewed-by: Damien Douxchamps <damien@douxchamps.net>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
2021-05-05 23:10:29 +09:00
Takashi Sakamoto 78eb99c496 hwdb: ieee1394-unit-function: add IIDC generic entries
Instrumentation & Industrial Digital Camera (IIDC) specifications are
defined by 1394 Trading Association for camera device in IEEE 1394 bus.
IIDC2 specifications are defined by joint working group between Japan
Industrial Imaging Association (JIIA) and 1394 Trade Association as
bus-independent specification.

This commit adds entries for the specifications to remove existent udev
rules. Supported specifications are listed below:

 * 1394-based Digital Camera Specification Version 1.04 (Aug. 9, 1996,
   1394 Trading Association)
 * 1394-based Digital Camera Specification Version 1.20 (Jul. 23, 1998,
   1394 Trading Association)
 * IIDC Digital Camera Control Specification Ver.1.30 (Jul. 25, 2000,
   1394 Trading Association)
 * IIDC Digital Camera Control Specification Ver.1.31 (Feb. 2, 2004,
   1394 Trading Association, TA Document 2003017)
 * IIDC Digital Camera Control Specification Ver.1.32 (Jul. 24, 2008,
   1394 Trading Association, Document number 2007009)
 * IIDC2 Digital Camera Control Specification Ver.1.0.0 (Jan 26th, 2012,
   1394 Trading Association, TS2011001)
 * IIDC2 Digital Camera Control Specification Ver.1.1.0 (May 19th, 2015,
   1394 Trading Association, TS2015001)

Reviewed-by: Damien Douxchamps <damien@douxchamps.net>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
2021-05-05 23:10:29 +09:00
Takashi Sakamoto f125f8b1ba hwdb: add hardware database for unit of IEEE 1394
Current udev rules configures group owner of firewire character device
to video group, corresponding to nodes in IEEE 1394 in below cases:

1.the node with any unit for any minor version of IIDC version 1
  specification defined by 1394 Trading Association
2.the node with any unit for specification defined by Point Grey Research
3.the node with any unit for AV/C device v1.0 defined by 1394 Trading
  Association
4.the node with any unit for vendor-unique protocol defined by 1394
  Trading Association

Nevertheless, case 3 and 4 can cover the node with any unit for audio
function as well. In the cases, it's convenient to assign audio group.

Additionally, some nodes are known to have layout different from
the specification defined by 1394 Trading Association. In the case,
it's required to add rules specific to them.

Furthermore, some nodes have no fields for vendor name and model name in
configuration ROM. In the case, it's required to add entries to hardware
database for users convenience.

For the above reasons, this commit adds rules to use information in
hardware database for known units in IEEE 1394. One database entry
corresponds to one unit. Two types of key are used to match the unit;
customized key from node context, kernel modalias of unit context.
The entry has the type of function, at least. Supplementally, it has
vendor and model names.

For your information, below statements with Python pyparsing module are
expected to parse all of the custom key and module alias in the list:

```
subsystem_prefix = pp.Literal('ieee1394:').suppress()
hex_to_int = lambda a: int(a[0], 16)

node_prefix = pp.Literal('node:').suppress()
prefixed_lower_hex = pp.Combine(pp.Literal('0x') + pp.Word(pp.srange('[a-z0-9]'), exact=6)).setParseAction(hex_to_int)
ven_in_node = pp.dictOf(pp.Literal('ven'), prefixed_lower_hex)
mo_in_node = pp.dictOf(pp.Literal('mo'), prefixed_lower_hex)
unit_in_node = pp.Group(prefixed_lower_hex + pp.Literal(':').suppress() + prefixed_lower_hex)
units_in_node = pp.Group(pp.Literal('units') + pp.ZeroOrMore(pp.Literal('*')).suppress() + unit_in_node + pp.ZeroOrMore(pp.Literal('*')).suppress())
node_parser = subsystem_prefix + node_prefix + ven_in_node + pp.Optional(mo_in_node) + units_in_node

higher_hex = pp.Word(pp.srange('[A-Z0-9]'), exact=8).setParseAction(hex_to_int)
ven_in_unit = pp.dictOf(pp.Literal('ven'), higher_hex)
mo_literal_in_unit = pp.dictOf(pp.Literal('mo'), higher_hex)
mo_in_unit = pp.dictOf(pp.Literal('mo'), higher_hex ^ pp.Literal('*'))
sp_in_unit = pp.dictOf(pp.Literal('sp'), higher_hex)
ver_in_unit = pp.dictOf(pp.Literal('ver'), higher_hex)
unit_parser = subsystem_prefix + ven_in_unit + mo_in_unit + sp_in_unit + ver_in_unit

key_parser = node_parser ^ unit_parser
```

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
2021-04-07 11:49:22 +09:00
Yu Watanabe db9ecf0501 license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
Michael Biebl 055a083a47 Re-add uaccess tag for /dev/dri/renderD*
Setting an access mode != 0666 is explicitly supported via -Dgroup-render-mode
In such a case, re-add the uaccess tag.

This is basically the same change that was done for /dev/kvm in
commit fa53e24130 and
ace5e3111c
and partially reverts the changes from
4e15a7343c
2019-03-14 11:08:58 +01:00
Michael Biebl ace5e3111c Do not apply uaccess tag for /dev/kvm if mode is 0666 2018-07-13 23:38:55 +02:00
Renamed from src/login/70-uaccess.rules (Browse further)