Selon Mike Isely <[EMAIL PROTECTED]>: > On Mon, 31 Mar 2008, [EMAIL PROTECTED] wrote: > > > Hi, > > > > I'm a very happy pvrusb2 user :) but I have a question: > > > > I would like to write an udev rule to set the user permission on /sys > pvrusb2 > > related directory. > > > > http://reactivated.net/writing_udev_rules.html tells me to type > > udevinfo -a -p $(udevinfo -q path -n /dev/video3) to find some relevant > info > > about the device. > > Unfortunately, I get only that: > > > > looking at device '/devices/virtual/video4linux/video3': > > KERNEL=="video3" > > SUBSYSTEM=="video4linux" > > DRIVER=="" > > ATTR{dev}=="81:3" > > ATTR{name}=="" > > > > looking at parent device '/devices/virtual/video4linux': > > KERNELS=="video4linux" > > SUBSYSTEMS=="" > > DRIVERS=="" > > > > looking at parent device '/devices/virtual': > > KERNELS=="virtual" > > SUBSYSTEMS=="" > > DRIVERS=="" > > > > Nothing useful to tell udev that it is my TVcard and not another > video4linux > > device :( > > > > If I do the same on video1 (integrated webcam), I get a lot of info: > > > > looking at device > > '/devices/pci0000:00/0000:00:1d.7/usb7/7-6/7-6:1.0/video4linux/video0': > > KERNEL=="video0" > > SUBSYSTEM=="video4linux" > > DRIVER=="" > > ATTR{dev}=="81:0" > > ATTR{name}=="Laptop Integrated Webcam" > > > > ATTR{name}=="Laptop Integrated Webcam" is enough to write an udev rule. > > ATTRS{vendor}=="0x8086" or ATTRS{device}=="0x2836" could also be used. > > > > Why do we get nothing with pvrusb2 ? > > Hmm, interesting. I've never studied this. I will have to figure out > how that name attribute can be injected. Right now I don't do anything > "special" to get udev to act, and have been assuming that V4L triggers > this as part of the process to register the device node. > > If someone can answer the "how" to do that before I figure out, I'll be > happy to add that to the driver. It would also be good to get the > device's serial number in there as well (perhaps as another attribute). > > > > > > /etc/udev/rules.d# modinfo pvrusb2 > > > > filename: > > > /lib/modules/2.6.24-12-generic/kernel/drivers/media/video/pvrusb2/pvrusb2.ko > > license: GPL > > description: Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tuner > > author: Mike Isely <[EMAIL PROTECTED]> > > srcversion: E72D8CD6A2CD1A14A1C9C05 > > Yeah, that's all stuff compiled into the module itself. I doubt that is > visible to anything in-kernel at run time after the driver has been > loaded and bound. > > > > > Cheers, > > Xavier > > I remember you from the very very beginning of this project. Good to > see you're still around :-) > > -Mike
It looks like it has something to do with /usr/share/hwdata/usb.ids but for instance there is no mention of "Laptop Integrated Webcam" in this ubs.ids. I even fail to understand where this "Laptop Integrated Webcam" comes from. I should read this small webcam driver sources in detail to find out what is going on here... Xavier _______________________________________________ pvrusb2 mailing list [email protected] http://www.isely.net/cgi-bin/mailman/listinfo/pvrusb2
