mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
rules: Add more firewire properties for sound, to be closer to USB and PCI
USB and PCI soundcards have a nice set of ID_* properties. It would be handy for firewire soundcards to have the same. Note that this removes the explicit setting of ID_ID in the firewire conditional. Because we are now setting ID_SERIAL, ID_ID will come from later in the file.
This commit is contained in:
parent
0414af1dfe
commit
5c0b72de3a
@ -41,14 +41,17 @@ IMPORT{builtin}="hwdb"
|
||||
SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id"
|
||||
SUBSYSTEMS=="usb", GOTO="skip_pci"
|
||||
|
||||
SUBSYSTEMS=="firewire", ATTRS{vendor_name}=="?*", ATTRS{model_name}=="?*", \
|
||||
ENV{ID_BUS}="firewire", ENV{ID_VENDOR}="$attr{vendor_name}", ENV{ID_MODEL}="$attr{model_name}"
|
||||
SUBSYSTEMS=="firewire", ATTRS{guid}=="?*", ENV{ID_ID}="firewire-$attr{guid}"
|
||||
SUBSYSTEMS=="firewire", ATTRS{guid}=="?*", \
|
||||
ENV{ID_BUS}="firewire", ENV{ID_SERIAL}="$attr{guid}", ENV{ID_SERIAL_SHORT}="$attr{guid}", \
|
||||
ENV{ID_VENDOR_ID}="$attr{vendor}", ENV{ID_MODEL_ID}="$attr{model}", \
|
||||
ENV{ID_VENDOR}="$attr{vendor_name}", ENV{ID_MODEL}="$attr{model_name}"
|
||||
SUBSYSTEMS=="firewire", GOTO="skip_pci"
|
||||
|
||||
SUBSYSTEMS=="pci", ENV{ID_BUS}="pci", ENV{ID_VENDOR_ID}="$attr{vendor}", ENV{ID_MODEL_ID}="$attr{device}"
|
||||
LABEL="skip_pci"
|
||||
|
||||
# Define ID_ID if ID_BUS and ID_SERIAL are set. This will work for both
|
||||
# USB and firewire.
|
||||
ENV{ID_SERIAL}=="?*", ENV{ID_USB_INTERFACE_NUM}=="?*", ENV{ID_ID}="$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_USB_INTERFACE_NUM}"
|
||||
ENV{ID_SERIAL}=="?*", ENV{ID_USB_INTERFACE_NUM}=="", ENV{ID_ID}="$env{ID_BUS}-$env{ID_SERIAL}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user