From 2ba5c37829c657a1bce3f3775fbaaf2131c1070b Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Wed, 20 Jul 2011 00:21:07 +0200 Subject: [PATCH] rules: sound - instead of ID_IFACE use standard ID_USB_INTERFACE_NUM --- rules/rules.d/60-persistent-alsa.rules | 5 ++--- rules/rules.d/78-sound-card.rules | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/rules/rules.d/60-persistent-alsa.rules b/rules/rules.d/60-persistent-alsa.rules index 39a36522..748c1bae 100644 --- a/rules/rules.d/60-persistent-alsa.rules +++ b/rules/rules.d/60-persistent-alsa.rules @@ -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}" diff --git a/rules/rules.d/78-sound-card.rules b/rules/rules.d/78-sound-card.rules index 7b821d47..1c36aeb4 100644 --- a/rules/rules.d/78-sound-card.rules +++ b/rules/rules.d/78-sound-card.rules @@ -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" -- 2.39.5