summaryrefslogtreecommitdiffstats
path: root/rules.d
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-03-01 20:05:56 +0100
committerLennart Poettering <lennart@poettering.net>2009-03-02 15:52:25 +0100
commit148ca32aed13cab9f6ae3cae08c9f1019c307eb8 (patch)
tree736a6972e35823d8f73935dedb347103987a8e82 /rules.d
parent159f5ec053836995ae28c1b0bdb0a998b69ab208 (diff)
Set numeric vendor/product ID variables
Set a unified vendor/product environemnt variable for both USB and PCI devices.
Diffstat (limited to 'rules.d')
-rw-r--r--rules.d/78-sound-card.rules3
1 files changed, 2 insertions, 1 deletions
diff --git a/rules.d/78-sound-card.rules b/rules.d/78-sound-card.rules
index a2cd5af..0f1ccb2 100644
--- a/rules.d/78-sound-card.rules
+++ b/rules.d/78-sound-card.rules
@@ -6,10 +6,11 @@ KERNEL!="card*", GOTO="sound_end"
SUBSYSTEMS=="usb", ENV{ID_MODEL}=="", IMPORT{program}="usb_id --export %p"
SUBSYSTEMS=="usb", ENV{ID_MODEL_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", GOTO="skip_pci"
SUBSYSTEMS=="pci", ENV{ID_MODEL_FROM_DATABASE}=="", IMPORT{program}="pci-db %p"
-SUBSYSTEMS=="pci", ENV{ID_BUS}="pci"
+SUBSYSTEMS=="pci", ENV{ID_BUS}="pci", ENV{ID_VENDOR_ID}="$attr{vendor}", ENV{ID_MODEL_ID}="$attr{device}"
# The values used here for $SOUND_FORM_FACTOR should be kept in sync
# with those defined for PulseAudio's src/pulse/proplist.h