[mythtv-users] UDev rules for Dual Tuner Cards

Andre mythtv-list at dinkum.org.uk
Sun Apr 4 08:13:24 UTC 2010


On 4 Apr 2010, at 06:46, Steven Ellis wrote:

> 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.

There is another way, most of the v4l-dvb modules have a option parameter to specify the adapter numbers, for example:

I have a /etc/modprobe.d/SatixS2.conf  file containing:

options ngene adapter_nr=10,11

Then you need to depmod and rebuild initrd so that the correct options are set on boot, for Ubuntu the easiest way is:

dpkg-reconfigure linux-image-2.6.31-20-generic

or similar.

modinfo modulename will tell you if your adaptor's module supports the adapter_nr parameter.

Andre


> 
> 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
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> 



More information about the mythtv-users mailing list