[mythtv-users] UDev rules for Dual Tuner Cards

Steven Ellis steven at openmedia.co.nz
Sun Apr 4 05:46:36 UTC 2010


I'm having some issues getting a UDEV rule to work correctly for a
Hauppauge HVR-2200 card. My box has multiple DVB T + S cards and I want
to make sure they get mapped to the same device numbers on each boot.

Using the tips on the MythTV Wiki
 -
http://www.mythtv.org/wiki/Device_Filenames_and_udev#Example_for_twin_tuner_cards_with_no_difference_in_udevinfo_output

I came up with the following rules

SUBSYSTEM=="dvb", ATTRS{vendor}=="0x1131", ATTRS{device}=="0x7164", ENV{hvr2200}!="two", ENV{hvr2200}="two", PROGRAM="/bin/sh -c 
'K=%k; K=$${K#dvb}; printf dvb/adapter170/%%s $${K#*.}'", SYMLINK+="%c"
SUBSYSTEM=="dvb", ATTRS{vendor}=="0x1131", ATTRS{device}=="0x7164", ENV{hvr2200}=="two", ENV{hvr2200}="one", PROGRAM="/bin/sh -c 
'K=%k; K=$${K#dvb}; printf dvb/adapter171/%%s $${K#*.}'", SYMLINK+="%c"


The idea being that the two tuners always get mapped as devices 170 and 171.

It looks like there is some sort of race condition as after a reboot I
end up with the following

/dev/dvb/adapter170:
total 0
lrwxrwxrwx 1 root root 18 2010-04-03 18:10 demux0 -> ../adapter2/demux0
lrwxrwxrwx 1 root root 16 2010-04-03 18:10 dvr0 -> ../adapter1/dvr0
lrwxrwxrwx 1 root root 21 2010-04-03 18:10 frontend0 -> ../adapter1/frontend0
lrwxrwxrwx 1 root root 16 2010-04-03 18:10 net0 -> ../adapter2/net0

/dev/dvb/adapter171:
total 0
lrwxrwxrwx 1 root root 18 2010-04-03 18:10 demux0 -> ../adapter2/demux0
lrwxrwxrwx 1 root root 16 2010-04-03 18:10 dvr0 -> ../adapter1/dvr0
lrwxrwxrwx 1 root root 21 2010-04-03 18:10 frontend0 -> ../adapter1/frontend0
lrwxrwxrwx 1 root root 16 2010-04-03 18:10 net0 -> ../adapter2/net0

With this neither of the adapters work as the symlinks are a mess.

Has anyone managed to come up with a sensible udev rule for a HVR-2200
or HVR-2250 card?

Thanks

Steve


More information about the mythtv-users mailing list