[mythtv-users] tuner numbering

Daryl McDonald darylangela at gmail.com
Thu Feb 27 00:06:56 UTC 2014


On Wed, Feb 26, 2014 at 5:56 PM, Hika van den Hoven <hikavdh at gmail.com> wrote:
> Hoi Daryl,
>
> Wednesday, February 26, 2014, 11:36:06 PM, you wrote:
>
>> On Wed, Feb 26, 2014 at 4:14 PM, Roger Siddons <dizygotheca at ntlworld.com> wrote:
>>> On Wed, 26 Feb 2014 18:57:25 -0000, Daryl McDonald <darylangela at gmail.com>
>>> wrote:
>>>
>>>> On Mon, Feb 24, 2014 at 3:27 PM, Roger Siddons
>>>> <dizygotheca at ntlworld.com> wrote:
>>>>>
>>>>> Correct. That was my suggestion at
>>>>> http://www.gossamer-threads.com/lists/mythtv/users/562186?#562186
>>>>>
>>>>> Fixing adapter numbers is a simple solution if you don't swap tuners
>>>>> about
>>>>> and can remember what each adapter is months/years later. Personally I
>>>>> like
>>>>> to see my own symlink names in the dialog.
>>>>>
>>>
>>>>
>>>> Have you had any luck getting the symlink name to stay put in >capture
>>>> cards, for digital cards?
>>>>>
>>>
>>> I only have digital cards. And when I start mythtv-setup the capture cards
>>> still refer to the symlinks they were assigned. My guess is that when setup
>>> starts/exits, it validates the cards and resets yours to a default (first?)
>>> because it can't find the dvr0, demux0 or net0 devices.
>>>
>>> These rules are based on the information you posted previously. Change the
>>> "dig1250" and "DigKW150" to whatever you like.
>>>
>>> SUBSYSTEM=="dvb", ATTRS{vendor}=="0x14f1", ATTRS{device}=="0x8852",
>>> PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/dig1250/%%s $${K#*.};
>>> exit 0'", SYMLINK+="%c"
>>>
>>> SUBSYSTEM=="dvb", ATTRS{vendor}=="0x1131", ATTRS{device}=="0x7133",
>>> PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/DigKW150/%%s $${K#*.};
>>> exit 0'", SYMLINK+="%c"
>>>
>>> Rather than creating a single symlink to adapterN/frontend0 it uses shell
>>> script to create symlinks for all the adapter's device nodes.
>>>
>>> Your digital adapter directories should look like this. Note each line of
>>> the device node begins with a "c" meaning it's a 'character file' (a
>>> device).
>>>
>>> $ ls -l /dev/dvb/adapter0
>>> total 0
>>> drwxr-xr-x 2 root root 120 Jan 25 19:44 ./
>>> drwxr-xr-x 12 root root 240 Jan 25 19:44 ../
>>> crw-rw----+ 1 root video 212, 0 Jan 25 19:44 demux0
>>> crw-rw----+ 1 root video 212, 1 Jan 25 19:44 dvr0
>>> crw-rw----+ 1 root video 212, 7 Jan 25 19:44 frontend0
>>> crw-rw----+ 1 root video 212, 2 Jan 25 19:44 net0
>>>
>>> If your system places dig1250 on adapter0 then the udev rule will create
>>> directory dig1250 as follows. Note each line begins with "l" meaning it's a
>>> symbolic link and each file links to the similarly named device node on the
>>> appropriate adapter, so Myth should be happy.
>>>
>>> $ ls -l /dev/dvb/dig1250/
>>> total 0
>>> lrwxrwxrwx 1 root root 18 Jan 25 19:44 demux0 -> ../adapter0/demux0
>>> lrwxrwxrwx 1 root root 16 Jan 25 19:44 dvr0 -> ../adapter0/dvr0
>>> lrwxrwxrwx 1 root root 21 Jan 25 19:44 frontend0 -> ../adapter0/frontend0
>>> lrwxrwxrwx 1 root root 16 Jan 25 19:44 net0 -> ../adapter0/net0
>>>
>>> I don't know how you've configured your analog card but be careful not to
>>> disrupt it. You could even put your digital udev rules in a separate *.rules
>>> file to the analog one(s).
>>>
>>> _______________________________________________
>>> 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
>
>> I must have missed something, because after a "digital-card.rules"
>> file, that looks like:
>> SUBSYSTEM=="dvb", ATTRS{class}=="0x040000", ATTRS{device}=="0x8852",
>> PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/HP1250/%%s $${K#*.};
>> exit 0'", SYMLINK+="%c"
>
>> SUBSYSTEM=="dvb", ATTRS{class}=="0x048000", ATTRS{device}=="0x08802",
>> PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/PC800i/%%s $${K#*.};
>> exit 0'", SYMLINK+="%c"
>
>> the second card is a different one that had the same vendor "info", so
>> I substituted class "info"
>
>> daryl at daryl-A780L3C:~$ ls -l /dev/dvb/adapter*
>> /dev/dvb/adapter0:
>> total 0
>> crw-rw----+ 1 root video 212, 5 Feb 26 17:21 demux0
>> crw-rw----+ 1 root video 212, 6 Feb 26 17:21 dvr0
>> crw-rw----+ 1 root video 212, 4 Feb 26 17:21 frontend0
>> crw-rw----+ 1 root video 212, 7 Feb 26 17:21 net0
>
>> /dev/dvb/adapter6:
>> total 0
>> crw-rw----+ 1 root video 212, 1 Feb 26 17:20 demux0
>> crw-rw----+ 1 root video 212, 2 Feb 26 17:20 dvr0
>> crw-rw----+ 1 root video 212, 0 Feb 26 17:20 frontend0
>> crw-rw----+ 1 root video 212, 3 Feb 26 17:20 net0
>> daryl at daryl-A780L3C:~$
>
>> The above still look like devices, not links :-(
>
>> I am in a stable spot right now with the module options, but the
>> thought of accomplishing my goal so elegantly, with the script you're
>> suggesting, is quite tantalizing.   Thanks Daryl
>
>
>
>>>
>> _______________________________________________
>> 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
>
>
> Oh and btw that vendor is the same is no problem. They distinguish then
> on the device ID. It simply means they come from the same
> manufacturer. So if no simlinks appear put the vendorID back.
>
> 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

Thanks Hika, now I see that only the one card took the link, but I
don't know why:
daryl at daryl-A780L3C:~$ ls -l /dev/dvb*
lrwxrwxrwx 1 root root 22 Feb 26 17:20 /dev/dvbHP1250 -> dvb/adapter6/frontend0

/dev/dvb:
total 0
drwxr-xr-x 2 root root 120 Feb 26 17:21 adapter0
drwxr-xr-x 2 root root 120 Feb 26 17:20 adapter6
daryl at daryl-A780L3C:~$


More information about the mythtv-users mailing list