[mythtv-users] udev on DVB adapter

Andre mythtv-list at dinkum.org.uk
Mon Nov 15 00:02:52 UTC 2010


On 14 Nov 2010, at 21:09, Josu Lazkano wrote:

> Hello list!
> 
> At least I have my DVB-S2 card working! Thanks to Pedro (mythtv-list
> user) I got it working great.
> 
> When I boot my system, there is a adapter0 device on /dev/dvb/, I want
> o change the adapter number and fix to one asigned previously. I want
> to add some DVB-T USB sticks.

Try the module option like this:

options cx88-dvb adapter_nr=2

in /etc/modprobe.d/options.conf

modinfo cx88_dvb will tell you about it and there is more about this in the wiki, I think cx88_dvb is the module for the Tevii if not I'm sure you can find out which one it is.

I find this is a better solution than complicated udev rules but you can only use numbers 0 to 7 without changing the kernel, this should be enough for most things.

Andre



> 
> I read the mythtv wiki and I read the page:
> http://www.mythtv.org/wiki/Device_Filenames_and_udev
> 
> I created this file: /etc/udev/rules.d/10-local.rules
> 
> # Create a symlink /dev/dvb/adapter102 pointing to Tevii S470
> SUBSYSTEM=="dvb", ATTRS{vendor}=="0x14f1", PROGRAM="/bin/sh -c 'K=%k;
> K=$${K#dvb}; printf dvb/adapter102/%%s $${K#*.}'", SYMLINK+="%c"
> 
> This is the DVB-S2 (Tevii S470) device info:
> 
> $ udevadm info -a -p $(udevadm info -q path -n /dev/dvb/adapter0/frontend0)
> 
> 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:16.0/0000:05:00.0/dvb/dvb0.frontend0':
>    KERNEL=="dvb0.frontend0"
>    SUBSYSTEM=="dvb"
>    DRIVER==""
> 
>  looking at parent device '/devices/pci0000:00/0000:00:16.0/0000:05:00.0':
>    KERNELS=="0000:05:00.0"
>    SUBSYSTEMS=="pci"
>    DRIVERS=="cx23885"
>    ATTRS{vendor}=="0x14f1"
>    ATTRS{device}=="0x8852"
>    ATTRS{subsystem_vendor}=="0xd470"
>    ATTRS{subsystem_device}=="0x9022"
>    ATTRS{class}=="0x040000"
>    ATTRS{irq}=="46"
>    ATTRS{local_cpus}=="ff"
>    ATTRS{local_cpulist}=="0-7"
>    ATTRS{modalias}=="pci:v000014F1d00008852sv0000D470sd00009022bc04sc00i00"
>    ATTRS{dma_mask_bits}=="32"
>    ATTRS{consistent_dma_mask_bits}=="32"
>    ATTRS{broken_parity_status}=="0"
>    ATTRS{msi_bus}==""
> 
>  looking at parent device '/devices/pci0000:00/0000:00:16.0':
>    KERNELS=="0000:00:16.0"
>    SUBSYSTEMS=="pci"
>    DRIVERS=="pcieport"
>    ATTRS{vendor}=="0x10de"
>    ATTRS{device}=="0x0ac7"
>    ATTRS{subsystem_vendor}=="0x19da"
>    ATTRS{subsystem_device}=="0xa119"
>    ATTRS{class}=="0x060400"
>    ATTRS{irq}=="42"
>    ATTRS{local_cpus}=="ff"
>    ATTRS{local_cpulist}=="0-7"
>    ATTRS{modalias}=="pci:v000010DEd00000AC7sv000019DAsd0000A119bc06sc04i00"
>    ATTRS{dma_mask_bits}=="32"
>    ATTRS{consistent_dma_mask_bits}=="32"
>    ATTRS{broken_parity_status}=="0"
>    ATTRS{msi_bus}=="1"
> 
>  looking at parent device '/devices/pci0000:00':
>    KERNELS=="pci0000:00"
>    SUBSYSTEMS==""
>    DRIVERS==""
> 
> After reboot I have 2 adapters:
> 
> $ ls -l -a /dev/dvb/
> total 0
> drwxr-xr-x  4 root root   80 2010-11-14 21:41 .
> drwxr-xr-x 18 root root 3620 2010-11-14 21:42 ..
> drwxr-xr-x  2 root root  120 2010-11-14 21:41 adapter0
> drwxr-xr-x  2 root root  120 2010-11-14 21:41 adapter102
> 
> If I add the adapter102 on myth-setup capturers and it works well, but
> I want to delete the adapter0. Is it possible?
> 
> Thanks for all your help, bye bye.
> 
> Regards.
> 
> -- 
> Josu Lazkano
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> 



More information about the mythtv-users mailing list