[mythtv-users] OT: Persistent DVB node

Christer Roth mythuserlist at roth.cc
Thu Jul 19 11:02:32 UTC 2007


Razza wrote:
> Nick Rout wrote on 14 July 2007 13:52:
>   
>> Razza wrote:
>>     
>>> Unfortunately the dvb adaptors still load as 0 and 1 as opposed to 2
>>> and 3 as expected.
>>> HELP!!
>>>       
>> Just thinking aloud, is it possibe to run a script after the modules
>> have loaded that detects which is what, then sets up some symlinks, so
>> that /dev/dvb/adaptor2 is always the DVB-S card and /dev/dvb/adaptor3
>> is
>> the DVB-T, then use the 2 and 3 devices in your myth configuration.
>>
>> something like:
>>
>> IF udevinfo -a -p $(udevinfo -q path -n /dev/dvb/adapter0/frontend0)|grep
>> 01:06
>> THEN
>> ln -s /dev/dvb/adaptor0 /dev/dvb/adaptor2
>> ln -s /dev/dvb/adaptor1 /dev/dvb/adaptor3
>> ELSE
>> ln -s /dev/dvb/adaptor0 /dev/dvb/adaptor3
>> ln -s /dev/dvb/adaptor1 /dev/dvb/adaptor2
>> ENDIF
>>
>> (no thats not in any particular language, just trying to show the logic
>> :-)  )
>>     
>
> Fantastic, Nick you are a genius! The symlink concept works on the DVB-T
> card! 
> I can't test the DVB-S as we recently moved and the cabling doesn't extend
> to the study yet (apparently fixing hanging baskets and the like is
> infinitely more important). 
> Just a couple of questions (read favours)....
> 1. Can anyone provide an appropriate shell script to achieve this?
> 2. Why can I only set up 7 dvb cards in Myth? (maybe 8 as I think the
> counting starts from 0) as this will only allow for 4 sources using this
> method
> 3. Is there any way to increase the number of DVB cards Myth will accept?
>
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>   
You can change the number of DVB cards Myth will accept by editing 
mythtv/libs/libmythtv/videosource.cpp. You are correct in in assuming it 
allows for 8 cards presently; ranging from 0 to 7. Change the number in 
the line starting with "SpinBoxSettings" (see below) to one more 
suitable to your needs. Recompile and you should be good to go.

from line 868 (SVN rev 14000) of mythtv/libs/libmythtv/videosource.cpp:
class DVBCardNum : public SpinBoxSetting, public CaptureCardDBStorage
{
  public:
    DVBCardNum(const CaptureCard &parent) :
        SpinBoxSetting(this, 0, 7, 1),
        CaptureCardDBStorage(this, parent, "videodevice")
    {
        setLabel(QObject::tr("DVB Card Number"));
        setHelpText(
            QObject::tr("When you change this setting, the text below "
                        "should change to the name and type of your card. "
                        "If the card cannot be opened, an error message "
                        "will be displayed."));
    };
};


Please be aware that you may need to edit the source of your DVB drivers 
as well to allow for a greater max number than what may be set there 
already. E.g. to allow for more than 8, you have to change the suggested 
line in dvbdev.c to a greater number.

v4l-dvb/linux/drivers/media/dvb/dvb-core/dvbdev.c:#define 
DVB_MAX_ADAPTERS  8

Additionally, to allow for more than 8 cards you might have to change 
something specific to the ttpci driver as well, although I use Twinhan 
cards myself so I have not looked into that.


More information about the mythtv-users mailing list