[mythtv-users] New Udev Rules

Daryl McDonald darylangela at gmail.com
Fri Nov 30 19:26:24 UTC 2018


On Thu, Nov 29, 2018 at 1:40 PM Daryl McDonald <darylangela at gmail.com>
wrote:

> # /etc/udev/rules.d/10-local.rules
>
> #
>
> # To Ientify serial nos etc for a Device call
>
> # udevadm info -a -p $(udevadm info -q path -n /dev/dvb/adapter0/frontend0)
>
> #
>
> # Create a symlink for single tuner HP1250
>
> SUBSYSTEM=="dvb", ATTRS{device}=="0x8852", PROGRAM="/bin/sh -c 'K=%k;
> K=$${K#dvb}; printf dvb/adapterHP1250/%%s $${K#*.}; exit 0'", SYMLINK+="%c"
>
>
> # Create a symlink for single tuner WinTV device
>
> SUBSYSTEM=="dvb", ATTRS{device}=="0x5b7a", PROGRAM="/bin/sh -c 'K=%k;
> K=$${K#dvb}; printf dvb/adapterHP_Win/%%s $${K#*.}; exit 0'", SYMLINK+="%c"
>
>
> # Create a symlink for each of two single tuner Pinacle devices
>
> SUBSYSTEM=="dvb", ATTRS{device}=="0x8802", PROGRAM="/bin/sh -c 'K=%k;
> K=$${K#dvb}; printf dvb/adapterPC800(i,J)/%%s $${K#*.}; exit 0'",
> SYMLINK+="%c"
>
>
> Whenever my replacement mobo gets here, I'll be putting two additional
> cards in it. The first rule works in the current setup, the second rule
> should work (since the first one does) BUT,
>
> since the second additional card is identical to one of my current cards,
> I'm wondering if the      "(i,j)" of the third rule/symlink will name two
> Pinacle cards PC800i, and PC800j.
>
>
> If not how might I modify the third rule to accomplish this?  TIA  Daryl
>

 The output from: udevadm info -a -p $(udevadm info -q path -n
/dev/dvb/adapter0/frontend0) on the original (first) Pinacle device is:

looking at device
'/devices/pci0000:00/0000:00:14.4/0000:03:05.2/dvb/dvb0.dvr0':

KERNEL=="dvb0.dvr0"

SUBSYSTEM=="dvb"

DRIVER==""


looking at parent device '/devices/pci0000:00/0000:00:14.4/0000:03:05.2':

KERNELS=="0000:03:05.2"

SUBSYSTEMS=="pci"

DRIVERS=="cx88-mpeg driver manager"

ATTRS{broken_parity_status}=="0"

ATTRS{class}=="0x048000"

ATTRS{consistent_dma_mask_bits}=="32"

ATTRS{d3cold_allowed}=="1"

ATTRS{device}=="0x8802"

ATTRS{dma_mask_bits}=="32"

ATTRS{driver_override}=="(null)"

ATTRS{enable}=="1"

ATTRS{irq}=="20"

ATTRS{local_cpulist}=="0-3"

ATTRS{local_cpus}=="0f"

ATTRS{msi_bus}=="1"

ATTRS{numa_node}=="0"

ATTRS{revision}=="0x05"

ATTRS{subsystem_device}=="0x0051"

ATTRS{subsystem_vendor}=="0x11bd"

ATTRS{vendor}=="0x14f1"


looking at parent device '/devices/pci0000:00/0000:00:14.4':

KERNELS=="0000:00:14.4"

SUBSYSTEMS=="pci"

DRIVERS==""

ATTRS{broken_parity_status}=="0"

ATTRS{class}=="0x060401"

ATTRS{consistent_dma_mask_bits}=="32"

ATTRS{d3cold_allowed}=="0"

ATTRS{device}=="0x4384"

ATTRS{dma_mask_bits}=="32"

ATTRS{driver_override}=="(null)"

ATTRS{enable}=="1"

ATTRS{irq}=="0"

ATTRS{local_cpulist}=="0-3"

ATTRS{local_cpus}=="0f"

ATTRS{msi_bus}=="1"

ATTRS{numa_node}=="0"

ATTRS{revision}=="0x00"

ATTRS{secondary_bus_number}=="3"

ATTRS{subordinate_bus_number}=="3"

ATTRS{subsystem_device}=="0x0000"

ATTRS{subsystem_vendor}=="0x0000"

ATTRS{vendor}=="0x1002"


looking at parent device '/devices/pci0000:00':

KERNELS=="pci0000:00"

SUBSYSTEMS==""

DRIVERS==""

And from the new (second) Pinacle device:


looking at device
'/devices/pci0000:00/0000:00:14.4/0000:03:05.2/dvb/dvb0.dvr0':

KERNEL=="dvb0.dvr0"

SUBSYSTEM=="dvb"

DRIVER==""


looking at parent device '/devices/pci0000:00/0000:00:14.4/0000:03:05.2':

KERNELS=="0000:03:05.2"

SUBSYSTEMS=="pci"

DRIVERS=="cx88-mpeg driver manager"

ATTRS{broken_parity_status}=="0"

ATTRS{class}=="0x048000"

ATTRS{consistent_dma_mask_bits}=="32"

ATTRS{d3cold_allowed}=="1"

ATTRS{device}=="0x8802"

ATTRS{dma_mask_bits}=="32"

ATTRS{driver_override}=="(null)"

ATTRS{enable}=="1"

ATTRS{irq}=="20"

ATTRS{local_cpulist}=="0-3"

ATTRS{local_cpus}=="0f"

ATTRS{msi_bus}=="1"

ATTRS{numa_node}=="0"

ATTRS{revision}=="0x05"

ATTRS{subsystem_device}=="0x0051"

ATTRS{subsystem_vendor}=="0x11bd"

ATTRS{vendor}=="0x14f1"


looking at parent device '/devices/pci0000:00/0000:00:14.4':

KERNELS=="0000:00:14.4"

SUBSYSTEMS=="pci"

DRIVERS==""

ATTRS{broken_parity_status}=="0"

ATTRS{class}=="0x060401"

ATTRS{consistent_dma_mask_bits}=="32"

ATTRS{d3cold_allowed}=="0"

ATTRS{device}=="0x4384"

ATTRS{dma_mask_bits}=="32"

ATTRS{driver_override}=="(null)"

ATTRS{enable}=="1"

ATTRS{irq}=="0"

ATTRS{local_cpulist}=="0-3"

ATTRS{local_cpus}=="0f"

ATTRS{msi_bus}=="1"

ATTRS{numa_node}=="0"

ATTRS{revision}=="0x00"

ATTRS{secondary_bus_number}=="3"

ATTRS{subordinate_bus_number}=="3"

ATTRS{subsystem_device}=="0x0000"

ATTRS{subsystem_vendor}=="0x0000"

ATTRS{vendor}=="0x1002"


looking at parent device '/devices/pci0000:00':

KERNELS=="pci0000:00"

SUBSYSTEMS==""

    DRIVERS==""


I thought (copied from the wiki) that this might do it:


# Create a symlink for each of two single tuner Pinacle devices

SUBSYSTEM=="dvb", ATTRS{device}=="0x8802", PROGRAM="/bin/sh -c 'K=%k;
K=$${K#dvb}; printf dvb/adapterPC800i/%%s $${K#*.}; exit 0'", SYMLINK+="%c"

SUBSYSTEM=="dvb", ATTRS{device}=="0x8802", PROGRAM="/bin/sh -c 'K=%k;
K=$${K#dvb}; printf dvb/adapterPC800j/%%s $${K#*.}; exit 0'", SYMLINK+="%c"


but then realised the example I copied from was a single card with dual
tuners. Any help greatly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20181130/9fc92607/attachment-0001.html>


More information about the mythtv-users mailing list