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