I'm interested to make a persistent name for a sound device. The output of "udevadm info -a -p $(udevadm info -q path -n /dev/... )" follows. What exactly is meant by the last sentence of the introductory paragraph? Must the first match occur in the first stanza of the info? Does "one single parent device" allow the direct parent only? Can the attributes belong to the grandparent or great-grandparent?
This is one rule I've tried. SUBSYSTEM=="sound", ATTRS{idVendor}=="0d8c", ATTRS{idProduct}=="0008", SYMLINK+="USBspeakers" None of my rules have yielded a SYMLINK. Thanks for any ideas, ... Peter E. =================================== root@dalton:/home/peter# udevadm info -a -p $(udevadm info -q path -n /dev/snd/by-id/usb-0d8c_C-Media_USB_Audio_Device-00) Udevadm info starts with the device specified by the devpath and then walks up the chain of parent devices. It prints for every device found, all possible attributes in the udev rules key format. A rule to match, can be composed by the attributes of the device and the attributes from one single parent device. looking at device '/devices/pci0000:00/0000:00:03.2/usb5/5-1/5-1:1.0/sound/card3/controlC3': KERNEL=="controlC3" SUBSYSTEM=="sound" DRIVER=="" looking at parent device '/devices/pci0000:00/0000:00:03.2/usb5/5-1/5-1:1.0/sound/card3': KERNELS=="card3" SUBSYSTEMS=="sound" DRIVERS=="" ATTRS{id}=="Device" ATTRS{number}=="3" looking at parent device '/devices/pci0000:00/0000:00:03.2/usb5/5-1/5-1:1.0': KERNELS=="5-1:1.0" SUBSYSTEMS=="usb" DRIVERS=="snd-usb-audio" ATTRS{bInterfaceNumber}=="00" ATTRS{bAlternateSetting}==" 0" ATTRS{bNumEndpoints}=="00" ATTRS{bInterfaceClass}=="01" ATTRS{bInterfaceSubClass}=="01" ATTRS{bInterfaceProtocol}=="00" ATTRS{supports_autosuspend}=="1" looking at parent device '/devices/pci0000:00/0000:00:03.2/usb5/5-1': KERNELS=="5-1" SUBSYSTEMS=="usb" DRIVERS=="usb" ATTRS{configuration}=="" ATTRS{bNumInterfaces}==" 4" ATTRS{bConfigurationValue}=="1" ATTRS{bmAttributes}=="a0" ATTRS{bMaxPower}=="100mA" ATTRS{urbnum}=="8415" ATTRS{idVendor}=="0d8c" ATTRS{idProduct}=="0008" ATTRS{bcdDevice}=="0100" ATTRS{bDeviceClass}=="00" ATTRS{bDeviceSubClass}=="00" ATTRS{bDeviceProtocol}=="00" ATTRS{bNumConfigurations}=="1" ATTRS{bMaxPacketSize0}=="64" ATTRS{speed}=="12" ATTRS{busnum}=="5" ATTRS{devnum}=="2" ATTRS{devpath}=="1" ATTRS{version}==" 1.10" ATTRS{maxchild}=="0" ATTRS{quirks}=="0x0" ATTRS{avoid_reset_quirk}=="0" ATTRS{authorized}=="1" ATTRS{product}=="C-Media USB Audio Device " looking at parent device '/devices/pci0000:00/0000:00:03.2/usb5': KERNELS=="usb5" SUBSYSTEMS=="usb" DRIVERS=="usb" ATTRS{configuration}=="" ATTRS{bNumInterfaces}==" 1" ATTRS{bConfigurationValue}=="1" ATTRS{bmAttributes}=="e0" ATTRS{bMaxPower}==" 0mA" ATTRS{urbnum}=="27" ATTRS{idVendor}=="1d6b" ATTRS{idProduct}=="0001" ATTRS{bcdDevice}=="0302" ATTRS{bDeviceClass}=="09" ATTRS{bDeviceSubClass}=="00" ATTRS{bDeviceProtocol}=="00" ATTRS{bNumConfigurations}=="1" ATTRS{bMaxPacketSize0}=="64" ATTRS{speed}=="12" ATTRS{busnum}=="5" ATTRS{devnum}=="1" ATTRS{devpath}=="0" ATTRS{version}==" 1.10" ATTRS{maxchild}=="2" ATTRS{quirks}=="0x0" ATTRS{avoid_reset_quirk}=="0" ATTRS{authorized}=="1" ATTRS{manufacturer}=="Linux 3.2.0-4-686-pae ohci_hcd" ATTRS{product}=="OHCI Host Controller" ATTRS{serial}=="0000:00:03.2" ATTRS{authorized_default}=="1" looking at parent device '/devices/pci0000:00/0000:00:03.2': KERNELS=="0000:00:03.2" SUBSYSTEMS=="pci" DRIVERS=="ohci_hcd" ATTRS{vendor}=="0x1039" ATTRS{device}=="0x7001" ATTRS{subsystem_vendor}=="0x105b" ATTRS{subsystem_device}=="0x0c56" ATTRS{class}=="0x0c0310" ATTRS{irq}=="22" ATTRS{local_cpus}=="ffffffff" ATTRS{local_cpulist}=="0-31" ATTRS{dma_mask_bits}=="32" ATTRS{consistent_dma_mask_bits}=="32" ATTRS{enable}=="1" ATTRS{broken_parity_status}=="0" ATTRS{msi_bus}=="" looking at parent device '/devices/pci0000:00': KERNELS=="pci0000:00" SUBSYSTEMS=="" DRIVERS=="" =================================== -- 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12 Tel +1 360 639 0202 http://carnot.yi.org/ **** New address Bcc: peter at easthope. ca **** -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/E1WAAtm-0001Mo-0A@dalton.invalid