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