<p dir="ltr"><br>
On Mar 8, 2014 7:03 AM, "Hika van den Hoven" <<a href="mailto:hikavdh@gmail.com">hikavdh@gmail.com</a>> wrote:<br>
><br>
> Hoi Stephen,<br>
><br>
> Saturday, March 8, 2014, 5:40:28 AM, you wrote:<br>
><br>
> > On Sat, 8 Mar 2014 14:30:04 +1100, you wrote:<br>
><br>
> >>Hi Everyone,<br>
> >><br>
> >>I've happily been running MythTV with an old Hauppauge HVR1100 pci<br>
> >>card for a couple of years and have just purchased a Nova-TD USB dual<br>
> >>tuner. I'm trying to set up appropriate udev rules so the adapter<br>
> >>numbers don't change.<br>
> >><br>
> >>From reading numerous other threads, my understanding is that I want<br>
> >>to set up a symlink to each of the adapters using udev rules to find<br>
> >>the device.<br>
> >><br>
> >>Using:<br>
> >><br>
> >>$ udevadm info -q path -n /dev/dvb/adapter2/frontend0 --attribute-walk<br>
> >><br>
> >>Udevadm info starts with the device specified by the devpath and then<br>
> >>walks up the chain of parent devices. It prints for every device<br>
> >>found, all possible attributes in the udev rules key format.<br>
> >>A rule to match, can be composed by the attributes of the device<br>
> >>and the attributes from one single parent device.<br>
> >><br>
> >> looking at device<br>
> >>'/devices/pci0000:00/0000:00:1e.0/0000:02:0c.2/dvb/dvb2.frontend0':<br>
> >> KERNEL=="dvb2.frontend0"<br>
> >> SUBSYSTEM=="dvb"<br>
> >> DRIVER==""<br>
> >><br>
> >> looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:02:0c.2':<br>
> >> KERNELS=="0000:02:0c.2"<br>
> >> SUBSYSTEMS=="pci"<br>
> >> DRIVERS=="cx88-mpeg driver manager"<br>
> >> ATTRS{irq}=="20"<br>
> >> ATTRS{subsystem_vendor}=="0x0070"<br>
> >> ATTRS{broken_parity_status}=="0"<br>
> >> ATTRS{class}=="0x048000"<br>
> >> ATTRS{consistent_dma_mask_bits}=="32"<br>
> >> ATTRS{dma_mask_bits}=="32"<br>
> >> ATTRS{local_cpus}=="ff"<br>
> >> ATTRS{device}=="0x8802"<br>
> >> ATTRS{msi_bus}==""<br>
> >> ATTRS{local_cpulist}=="0-7"<br>
> >> ATTRS{vendor}=="0x14f1"<br>
> >> ATTRS{subsystem_device}=="0x9800"<br>
> >> ATTRS{d3cold_allowed}=="1"<br>
> >><br>
> >> looking at parent device '/devices/pci0000:00/0000:00:1e.0':<br>
> >> KERNELS=="0000:00:1e.0"<br>
> >> SUBSYSTEMS=="pci"<br>
> >> DRIVERS==""<br>
> >> ATTRS{irq}=="0"<br>
> >> ATTRS{subsystem_vendor}=="0x0000"<br>
> >> ATTRS{broken_parity_status}=="0"<br>
> >> ATTRS{class}=="0x060400"<br>
> >> ATTRS{consistent_dma_mask_bits}=="32"<br>
> >> ATTRS{dma_mask_bits}=="32"<br>
> >> ATTRS{local_cpus}=="ff"<br>
> >> ATTRS{device}=="0x244e"<br>
> >> ATTRS{msi_bus}=="1"<br>
> >> ATTRS{local_cpulist}=="0-7"<br>
> >> ATTRS{vendor}=="0x8086"<br>
> >> ATTRS{subsystem_device}=="0x0000"<br>
> >> ATTRS{d3cold_allowed}=="0"<br>
> >><br>
> >> looking at parent device '/devices/pci0000:00':<br>
> >> KERNELS=="pci0000:00"<br>
> >> SUBSYSTEMS==""<br>
> >> DRIVERS==""<br>
> >><br>
> >>I can generate a rule:<br>
> >><br>
> >>KERNEL=="dvb?.frontend?", SUBSYSTEM=="dvb", ATTRS{device}=="0x8802",<br>
> >>SYMLINK+="dvb/HVR1100"<br>
> >><br>
> >>But this creates:<br>
> >><br>
> >>$ ls -l /dev/dvb<br>
> >>total 0<br>
> >>drwxr-xr-x 2 root root 120 Mar 8 13:03 adapter0<br>
> >>drwxr-xr-x 2 root root 120 Mar 8 13:03 adapter1<br>
> >>drwxr-xr-x 2 root root 120 Mar 8 13:03 adapter2<br>
> >>lrwxrwxrwx 1 root root 8 Mar 8 13:25 HVR1100 -> adapter2/frontend0<br>
> >><br>
> >>While this allows the card to be configured within Myth, it fails to<br>
> >>scan channels correctly. My understanding is that the symlink should<br>
> >>just point to the adapter, i.e.<br>
> >><br>
> >>lrwxrwxrwx 1 root root 8 Mar 8 13:25 HVR1100 -> adapter2<br>
> >><br>
> >>Manually setting this up allows the card to be configured and channels<br>
> >>scanned with EIT as the video source.<br>
> >><br>
> >>However:<br>
> >><br>
> >>$ udevadm info -q path -n /dev/dvb/adapter2 --attribute-walk<br>
> >>device node has wrong file type<br>
> >><br>
> >>So I can't see how to generate the udev rule for the adapter, rather<br>
> >>than just for frontend0.<br>
> >><br>
> >>Other info:<br>
> >><br>
> >>OS: Mythbuntu 12.04, kernel 3.11.0-18-generic<br>
> >>MythTV Version : v0.27-178-g6b14852<br>
> >>MythTV Branch : fixes/0.27<br>
> >><br>
> >>(the next problem will be how to generate rules for the USB device,<br>
> >>which has two tuners and I can't see anything to differentiate them<br>
> >>based on udevadm output, but one step at a time).<br>
> >><br>
> >>Thanks very much,<br>
> >>Alistair<br>
><br>
> > My Nova TD PCI cards are easy to fix the adapter numbers for, and my<br>
> > understanding is that the PCI card is virtually the same as the USB<br>
> > version, just with a PCI-USB chip on the front. Just create a file<br>
> > such as options-dvb.conf in /etc/modprobe.d and put something like<br>
> > this in it:<br>
><br>
> > options dvb_usb_dib0700 adapter_nr=0,1<br>
><br>
> > As long as you do not have any other DVB-T tuners using the dib0700<br>
> > driver, then that will fix the numbers for the Nova TD tuners. There<br>
> > is no need to use the complicated udev rules when the tuners will<br>
> > accept the adapter_nr option and you do not have multiple tuners using<br>
> > the same driver.<br>
><br>
> > I believe that the enumeration order is fixed for the two tuners on<br>
> > the same device, so they should not swap around using the adapter_nr<br>
> > option. But even if they do, they are identical tuners so it should<br>
> > not cause any trouble unless you have given them different aerial<br>
> > connections.<br>
><br>
> > Other adapters will get the unused numbers in order, from the lowest<br>
> > available number upwards, but will ignore the manually assigned<br>
> > numbers.<br>
><br>
> > Finding the name of the driver used for a tuner can be a bit of a pain<br>
> > - there are usually clues in dmesg and the other log files, but often<br>
> > the exact driver name is not in the log messages.<br>
> > _______________________________________________<br>
> > mythtv-users mailing list<br>
> > <a href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a><br>
> > <a href="http://www.mythtv.org/mailman/listinfo/mythtv-users">http://www.mythtv.org/mailman/listinfo/mythtv-users</a><br>
> > <a href="http://wiki.mythtv.org/Mailing_List_etiquette">http://wiki.mythtv.org/Mailing_List_etiquette</a><br>
> > MythTV Forums: <a href="https://forum.mythtv.org">https://forum.mythtv.org</a><br>
><br>
><br>
> Daryl added an item to the wiki about this. Try something like:<br>
><br>
> SUBSYSTEM=="dvb", ATTRS{device}=="0x8852", PROGRAM="/bin/sh -c 'K=%k;<br>
> K=$${K#dvb}; printf dvb/adapterHP1250/%%s $${K#*.}; exit 0'", SYMLINK+="%c"<br>
><br>
> on one line.<br>
><br>
> Tot mails,<br>
> Hika mailto:<a href="mailto:hikavdh@gmail.com">hikavdh@gmail.com</a><br>
><br>
> "Zonder hoop kun je niet leven<br>
> Zonder leven is er geen hoop<br>
> Het eeuwige dilemma<br>
> Zeker als je hoop moet vernietigen om te kunnen overleven!"<br>
><br>
> De lerende Mens<br>
> --<br>
><br>
> _______________________________________________<br>
> mythtv-users mailing list<br>
> <a href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a><br>
> <a href="http://www.mythtv.org/mailman/listinfo/mythtv-users">http://www.mythtv.org/mailman/listinfo/mythtv-users</a><br>
> <a href="http://wiki.mythtv.org/Mailing_List_etiquette">http://wiki.mythtv.org/Mailing_List_etiquette</a><br>
> MythTV Forums: <a href="https://forum.mythtv.org">https://forum.mythtv.org</a></p>
<p dir="ltr">Change "HP1250" to whatever is appropriate for you, but keep the "/dev/adapter/" part in tact.<br>
</p>