[mythtv-users] UDEV rules

Mike Bibbings mike.bibbings at gmail.com
Wed Jan 8 20:27:58 UTC 2014


On 08/01/14 18:18, Daryl McDonald wrote:
> Greetings Mythizens, On the possibility of getting a third card
> working I've put it back in the box, but I need help setting up the
> UDEV rules. From a "lspci -vv" command the three cards are:
>
> 02:00.0 Multimedia video controller: Conexant Systems, Inc. CX23885
> PCI Video and Audio Decoder (rev 04)
> Subsystem: Hauppauge computer works Inc. Device 7911
> Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR+ FastB2B- DisINTx-
> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
> Latency: 0, Cache Line Size: 64 bytes
> Interrupt: pin A routed to IRQ 16
> Region 0: Memory at fe800000 (64-bit, non-prefetchable) [size=2M]
> Capabilities: <access denied>
> Kernel driver in use: cx23885
> Kernel modules: cx23885
>
> 04:00.0 Multimedia controller: Philips Semiconductors
> SAA7131/SAA7133/SAA7135 Video Broadcast Decoder (rev d1)
> Subsystem: KWorld Computer Co. Ltd. Device a135
> Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR+ FastB2B- DisINTx-
> Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
> Latency: 64 (63750ns min, 63750ns max)
> Interrupt: pin A routed to IRQ 20
> Region 0: Memory at febff800 (32-bit, non-prefetchable) [size=2K]
> Capabilities: <access denied>
> Kernel driver in use: saa7134
> Kernel modules: saa7134
>
> 04:01.0 Multimedia video controller: Internext Compression Inc iTVC16
> (CX23416) Video Decoder (rev 01)
> Subsystem: Hauppauge computer works Inc. WinTV PVR 150
> Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr-
> Stepping- SERR+ FastB2B- DisINTx-
> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
> Latency: 64 (32000ns min, 2000ns max), Cache Line Size: 64 bytes
> Interrupt: pin A routed to IRQ 21
> Region 0: Memory at f8000000 (32-bit, prefetchable) [size=64M]
> Capabilities: <access denied>
> Kernel driver in use: ivtv
> Kernel modules: ivtv
>
> As per the wiki when I run the command " udevadm info -a -p $(udevadm
> info -q path -n /dev/video0)" I can't identify the Philips card
> (04:00.0) I've had it in and out of two boxes and see no difference
> from this command:
>
> daryl at daryl-A780L3C:~$ udevadm info -a -p $(udevadm info -q path -n /dev/video0)
>
> 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:14.4/0000:04:01.0/video4linux/video0':
>      KERNEL=="video0"
>      SUBSYSTEM=="video4linux"
>      DRIVER==""
>      ATTR{name}=="ivtv0 encoder MPG"
>      ATTR{index}=="0"
>
>    looking at parent device '/devices/pci0000:00/0000:00:14.4/0000:04:01.0':
>      KERNELS=="0000:04:01.0"
>      SUBSYSTEMS=="pci"
>      DRIVERS=="ivtv"
>      ATTRS{irq}=="21"
>      ATTRS{subsystem_vendor}=="0x0070"
>      ATTRS{broken_parity_status}=="0"
>      ATTRS{class}=="0x040000"
>      ATTRS{consistent_dma_mask_bits}=="32"
>      ATTRS{dma_mask_bits}=="32"
>      ATTRS{local_cpus}=="00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000007"
>      ATTRS{device}=="0x0016"
>      ATTRS{msi_bus}==""
>      ATTRS{local_cpulist}=="0-2"
>      ATTRS{vendor}=="0x4444"
>      ATTRS{subsystem_device}=="0x8801"
>      ATTRS{numa_node}=="0"
>
>    looking at parent device '/devices/pci0000:00/0000:00:14.4':
>      KERNELS=="0000:00:14.4"
>      SUBSYSTEMS=="pci"
>      DRIVERS==""
>      ATTRS{irq}=="0"
>      ATTRS{subsystem_vendor}=="0x0000"
>      ATTRS{broken_parity_status}=="0"
>      ATTRS{class}=="0x060401"
>      ATTRS{consistent_dma_mask_bits}=="32"
>      ATTRS{dma_mask_bits}=="32"
>      ATTRS{local_cpus}=="00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000007"
>      ATTRS{device}=="0x4384"
>      ATTRS{msi_bus}=="1"
>      ATTRS{local_cpulist}=="0-2"
>      ATTRS{vendor}=="0x1002"
>      ATTRS{subsystem_device}=="0x0000"
>      ATTRS{numa_node}=="0"
>
>    looking at parent device '/devices/pci0000:00':
>      KERNELS=="pci0000:00"
>      SUBSYSTEMS==""
>      DRIVERS==""
>
> Nor from this command:
>
> daryl at daryl-A780L3C:~$ udevadm info -a -p $(udevadm info -q path -n
> /dev/dvb/adapter0/dvr0)
>
> 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:04.0/0000:02:00.0/dvb/dvb0.dvr0':
>      KERNEL=="dvb0.dvr0"
>      SUBSYSTEM=="dvb"
>      DRIVER==""
>
>    looking at parent device '/devices/pci0000:00/0000:00:04.0/0000:02:00.0':
>      KERNELS=="0000:02:00.0"
>      SUBSYSTEMS=="pci"
>      DRIVERS=="cx23885"
>      ATTRS{irq}=="16"
>      ATTRS{subsystem_vendor}=="0x0070"
>      ATTRS{broken_parity_status}=="0"
>      ATTRS{class}=="0x040000"
>      ATTRS{consistent_dma_mask_bits}=="32"
>      ATTRS{dma_mask_bits}=="32"
>      ATTRS{local_cpus}=="00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000007"
>      ATTRS{device}=="0x8852"
>      ATTRS{msi_bus}==""
>      ATTRS{local_cpulist}=="0-2"
>      ATTRS{vendor}=="0x14f1"
>      ATTRS{subsystem_device}=="0x7911"
>      ATTRS{numa_node}=="0"
>
>    looking at parent device '/devices/pci0000:00/0000:00:04.0':
>      KERNELS=="0000:00:04.0"
>      SUBSYSTEMS=="pci"
>      DRIVERS=="pcieport"
>      ATTRS{irq}=="41"
>      ATTRS{subsystem_vendor}=="0x1019"
>      ATTRS{broken_parity_status}=="0"
>      ATTRS{class}=="0x060400"
>      ATTRS{consistent_dma_mask_bits}=="32"
>      ATTRS{dma_mask_bits}=="32"
>      ATTRS{local_cpus}=="00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000007"
>      ATTRS{device}=="0x9604"
>      ATTRS{msi_bus}=="1"
>      ATTRS{local_cpulist}=="0-2"
>      ATTRS{vendor}=="0x1022"
>      ATTRS{subsystem_device}=="0x2285"
>      ATTRS{numa_node}=="0"
>
>    looking at parent device '/devices/pci0000:00':
>      KERNELS=="pci0000:00"
>      SUBSYSTEMS==""
>      DRIVERS==""
>
> I'm running Mythtv 0.27 fixes in an Ubuntu 12.04 desktop combined FE/BE.
> Direction for sorting this out will be greatly appreciated.
>
> Daryl

I presume you intend to fix the order the cards are assigned in the 
mythtv backend.
I gave up trying with UDEV and used a dvb-options.conf file in 
/etc/modprobe.d instead to fix the adapter numbers (adapter_nr in file).

Example file - you will need to adjust for your setup.

# Force consistent dvb adapter numbering for use with mythtv backend
# TBS 6981 dvb-s2
options cx23885 adapter_nr=4,5,6,7
# disable tbs ir i.e. set to 0, 1 =enable
options cx23885 enable_tbs_ir=0

# tbs 6280 dvb-T/T2 Freeview
options saa716x_tbs-dvb enable_ir=0
# change interrupt from old style to new MSI
options saa716x_tbs-dvb int_type=1
options saa716x_core adapter_nr=2,3

# Compro S350 (saa7134)
# options saa7134_dvb adapter_nr=4

# Kworld S100 SESE
# options cx88_dvb_core adapter_nr=5

Mike

> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users



More information about the mythtv-users mailing list