]> err.no Git - systemd/commitdiff
rules: sound - instead of ID_IFACE use standard ID_USB_INTERFACE_NUM
authorKay Sievers <kay.sievers@vrfy.org>
Tue, 19 Jul 2011 22:21:07 +0000 (00:21 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Tue, 19 Jul 2011 22:21:07 +0000 (00:21 +0200)
rules/rules.d/60-persistent-alsa.rules
rules/rules.d/78-sound-card.rules

index 39a365221eee5ea28b2df7da80de27e4ae3e2a59..748c1bae59dd6f069da08bb700ce854c2861d4af 100644 (file)
@@ -5,9 +5,8 @@ SUBSYSTEM!="sound", GOTO="persistent_alsa_end"
 KERNEL!="controlC[0-9]*", GOTO="persistent_alsa_end"
 
 SUBSYSTEMS=="usb", ENV{ID_MODEL}=="", IMPORT{program}="usb_id --export %p"
-SUBSYSTEMS=="usb", ENV{ID_IFACE}="$attr{bInterfaceNumber}"
-ENV{ID_SERIAL}=="?*", ENV{ID_IFACE}=="?*", SYMLINK+="snd/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_IFACE}"
-ENV{ID_SERIAL}=="?*", ENV{ID_IFACE}=="", SYMLINK+="snd/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
+ENV{ID_SERIAL}=="?*", ENV{ID_USB_INTERFACE_NUM}=="?*", SYMLINK+="snd/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_USB_INTERFACE_NUM}"
+ENV{ID_SERIAL}=="?*", ENV{ID_USB_INTERFACE_NUM}=="", SYMLINK+="snd/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
 
 ENV{ID_PATH}=="", IMPORT{program}="path_id %p"
 ENV{ID_PATH}=="?*", SYMLINK+="snd/by-path/$env{ID_PATH}"
index 7b821d4723661df701667389a660a6dd95936087..1c36aeb432d9fa2ce97f8991bbf45589e591474f 100644 (file)
@@ -39,8 +39,6 @@ ENV{SOUND_INITIALIZED}="1"
 
 SUBSYSTEMS=="usb", ENV{ID_MODEL}=="", IMPORT{program}="usb_id --export %p"
 SUBSYSTEMS=="usb", ENV{ID_VENDOR_FROM_DATABASE}=="", IMPORT{program}="usb-db %p"
-SUBSYSTEMS=="usb", ATTRS{idVendor}!="", ATTRS{idProduct}!="", ENV{ID_VENDOR_ID}="$attr{idVendor}", ENV{ID_MODEL_ID}="$attr{idProduct}"
-SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}!="", ENV{ID_IFACE}="$attr{bInterfaceNumber}"
 SUBSYSTEMS=="usb", GOTO="skip_pci"
 
 SUBSYSTEMS=="pci", ENV{ID_VENDOR_FROM_DATABASE}=="", IMPORT{program}="pci-db %p"
@@ -48,8 +46,8 @@ SUBSYSTEMS=="pci", ENV{ID_BUS}="pci", ENV{ID_VENDOR_ID}="$attr{vendor}", ENV{ID_
 
 LABEL="skip_pci"
 
-ENV{ID_SERIAL}=="?*", ENV{ID_IFACE}=="?*", ENV{ID_ID}="$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_IFACE}-$attr{id}"
-ENV{ID_SERIAL}=="?*", ENV{ID_IFACE}=="", ENV{ID_ID}="$env{ID_BUS}-$env{ID_SERIAL}-$attr{id}"
+ENV{ID_SERIAL}=="?*", ENV{ID_USB_INTERFACE_NUM}=="?*", ENV{ID_ID}="$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_USB_INTERFACE_NUM}-$attr{id}"
+ENV{ID_SERIAL}=="?*", ENV{ID_USB_INTERFACE_NUM}=="", ENV{ID_ID}="$env{ID_BUS}-$env{ID_SERIAL}-$attr{id}"
 
 ENV{ID_PATH}=="", IMPORT{program}="path_id %p/controlC%n"