[mythtv-users] udev: persistent naming of multiple PVR-* recorders

Brian J. Murrell brian at interlinx.bc.ca
Tue Jul 13 11:09:31 UTC 2010


I have multiple Hauppauge PVR-* recorders, a 150, a 250 and a 500.  I
also have a Hauppauge HVR950Q.  All of these devices
provide /dev/video[0-5] devices.

The problem is that the /dev/video[0-5] device for the HVR950Q is a dumb
framegrabber analog device, which I don't want to use.  So I thought I
was smart and created the following udev rule:

SUBSYSTEM=="video4linux", ATTR{name}=="au0828a video", NAME="950q_analog0"

Which seems to work as far as naming devices goes:

$ ls -l /dev/950q_analog0 
crw-rw---- 1 root video 81, 0 2010-07-13 06:50 /dev/950q_analog0

The problem is that that does not actually remove that device's
"video[0-5] placeholder in device database:

$ ls -l /dev/video[0-5]
crw-rw---- 1 root video 81,  1 2010-07-13 06:50 /dev/video1
crw-rw---- 1 root video 81,  5 2010-07-13 06:50 /dev/video2
crw-rw---- 1 root video 81,  9 2010-07-13 06:50 /dev/video3
crw-rw---- 1 root video 81, 14 2010-07-13 06:50 /dev/video4

As you can see, it's /dev/video0 place has still been "taken" even
though a /dev/video0 node was not created.  udevadm confirms this:

$ udevadm info -a -p `udevadm info -q path -n /dev/950q_analog0`

...

  looking at device '/devices/pci0000:00/0000:00:02.2/usb1/1-1/video4linux/video0':
    KERNEL=="video0"
    SUBSYSTEM=="video4linux"
    DRIVER==""
    ATTR{name}=="au0828a video"
    ATTR{index}=="0"

The problem still remains that the order of hardware probing among the
USB 950Q and the PCI PVR-* devices is still racy and any one of
the /dev/video[0-5] could wind up being missing and assigned to the USB
950Q, which of course causes mythbackend no end of trouble.

Anyone have any ideas how to write a rule so that all and only the PVR-*
devices get (a group of even) persistent names?

FWIW, there is also the /dev/v4l/by-path/pci-* devices on this system,
but mythbackend does not seem to like me trying to use them.

Cheers,
b.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20100713/ce66c064/attachment.pgp>


More information about the mythtv-users mailing list