Message ID | 4BB9B41C.3010702@tvdr.de |
---|---|
State | New |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.69) (envelope-from <Klaus.Schmidinger@tvdr.de>) id 1Nyj48-0005jw-Qy for vdr@linuxtv.org; Mon, 05 Apr 2010 11:57:59 +0200 X-tubIT-Incoming-IP: 188.40.50.18 Received: from racoon.tvdr.de ([188.40.50.18]) by mail.tu-berlin.de (exim-4.69/mailfrontend-b) with esmtps [TLSv1:AES256-SHA:256] for <vdr@linuxtv.org> id 1Nyj48-0006ZH-6p; Mon, 05 Apr 2010 11:57:56 +0200 Received: from whale.cadsoft.de (whale.tvdr.de [192.168.100.6]) by racoon.tvdr.de (8.14.3/8.14.3) with ESMTP id o359vs8V011472 for <vdr@linuxtv.org>; Mon, 5 Apr 2010 11:57:54 +0200 Received: from [192.168.100.10] (hawk.cadsoft.de [192.168.100.10]) by whale.cadsoft.de (8.14.3/8.14.3) with ESMTP id o359vm4w015287 for <vdr@linuxtv.org>; Mon, 5 Apr 2010 11:57:48 +0200 Message-ID: <4BB9B41C.3010702@tvdr.de> Date: Mon, 05 Apr 2010 11:57:48 +0200 From: Klaus Schmidinger <Klaus.Schmidinger@tvdr.de> User-Agent: Thunderbird 2.0.0.24 (X11/20100302) MIME-Version: 1.0 To: vdr@linuxtv.org References: <4AE8C294.6000409@googlemail.com> <j2o469a9e61004030438r52b4bbb8u1a109002b2d99eb9@mail.gmail.com> <s2ka3ef07921004030851q36c8cfdnee0e53fd44c33941@mail.gmail.com> <m2w469a9e61004041555l6f975e1ft882380fac859ec6d@mail.gmail.com> In-Reply-To: <m2w469a9e61004041555l6f975e1ft882380fac859ec6d@mail.gmail.com> Content-Type: multipart/mixed; boundary="------------030508030405060408050304" X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (racoon.tvdr.de [188.40.50.18]); Mon, 05 Apr 2010 11:57:55 +0200 (CEST) X-tubIT-Score: 0.0 () X-PMX-Version: 5.5.4.371499, Antispam-Engine: 2.7.1.369594, Antispam-Data: 2010.4.5.95119 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MIME_TEXT_ONLY_MP_MIXED 0.05, BODY_SIZE_3000_3999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, ECARD_WORD 0, TO_NO_NAME 0, __BAT_BOUNDARY 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_URI_IN_BODY 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __CTYPE_MULTIPART_MIXED 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MOZILLA_MSGID 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __URI_NO_MAILTO 0, __URI_NO_WWW 0, __USER_AGENT 0' X-LSpam-Score: -3.3 (---) X-LSpam-Report: No, score=-3.3 required=5.0 tests=AWL=0.254, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1 autolearn=ham Subject: Re: [vdr] Restricting a particular dvb card from tuning to channels with a selected modulation X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: VDR Mailing List <vdr@linuxtv.org> List-Id: VDR Mailing List <vdr.linuxtv.org> List-Unsubscribe: <http://www.linuxtv.org/cgi-bin/mailman/options/vdr>, <mailto:vdr-request@linuxtv.org?subject=unsubscribe> List-Archive: <http://www.linuxtv.org/pipermail/vdr> List-Post: <mailto:vdr@linuxtv.org> List-Help: <mailto:vdr-request@linuxtv.org?subject=help> List-Subscribe: <http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr>, <mailto:vdr-request@linuxtv.org?subject=subscribe> X-List-Received-Date: Mon, 05 Apr 2010 09:58:00 -0000 Status: O X-Status: X-Keywords: X-UID: 22774 |
Commit Message
Klaus Schmidinger
April 5, 2010, 9:57 a.m. UTC
On 05.04.2010 00:55, Teemu Rantanen wrote: > Hi, > > There's a new version of the patch implemented as a plugin. It seems to > work, but there are few things to notice: > > - Plugin does not cache which devices are Reddo devices, instead it > probes sysfs every time QAM256 channel is being tuned into (on any > device). It would be nice if cDeviceHook added a mechanism for a hook to > store context for each device. Hooking into device probe (like full > feature card plugin does) would be much nicer way, but it would > interfere with other plugins which need the same mechanism. The proper way of doing this is to check the modulation types in cDvbDevice::ProvidesTransponder(), as in the attached patch (which will be part of VDR 1.7.15). If the "reddo" driver doesn't set the FE_CAN_QAM_256 flag correctly, it needs to be fixed there. > - VDR crashes at very late in exit() when clearing some list (most > likely cDeviceHook list), but I couldn't find a way to avoid that >From PLUGINS.html: A plugin that creates a derived cDeviceHook ... shall not delete this object. It will be automatically deleted when the program ends I have added a similar note to device.h now. > ... > - The sysfs probe code in full feature card plugin is buggy :-) Would you mind posting a patch that fixes this? Klaus > The plugin is available here: > > http://tvr.dy.fi/vdr/vdr-disablereddoqam256-0.0.1.tgz
Comments
Hi, I tried also without delete cDeviceHook but it still crashed... Well, the fixes are basically available in the plugin, as I copied the probe method (and modified slightly to suit the plugin). Those are: - The sysfs filenames are idVendor (subsystem_vendor) and idProduct (subsystem_device) - You need to set strtoul() base as 16 as the files don't have 0x in front of the hex What about making this an utility method in VDR? Give device file name and return id... Teemu 2010/4/5 Klaus Schmidinger <Klaus.Schmidinger@tvdr.de> > From PLUGINS.html: > > A plugin that creates a derived cDeviceHook ... > shall not delete this object. It will be automatically deleted when the > program ends > > I have added a similar note to device.h now. > > > ... > > - The sysfs probe code in full feature card plugin is buggy :-) > > Would you mind posting a patch that fixes this? > > Klaus > >
On 05.04.2010 12:43, Teemu Rantanen wrote: > Hi, > > I tried also without delete cDeviceHook but it still crashed... Please try creating the cReddoDeviceHook in cPluginDisableReddoQAM256::Initialize(), as suggested in PLUGINS.html. > Well, the fixes are basically available in the plugin, as I copied the > probe method (and modified slightly to suit the plugin). Those are: > - The sysfs filenames are idVendor (subsystem_vendor) and idProduct > (subsystem_device) This is what I get here: root@video:/home/kls/vdr/VDR > ls -l /sys/class/dvb/dvb0.frontend0/device/subsystem_* -r--r--r-- 1 root root 4096 2010-04-05 16:25 /sys/class/dvb/dvb0.frontend0/device/subsystem_device -r--r--r-- 1 root root 4096 2010-04-05 16:25 /sys/class/dvb/dvb0.frontend0/device/subsystem_vendor root@video:/home/kls/vdr/VDR > ls -l /sys/class/dvb/dvb0.frontend0/device/id* ls: cannot access /sys/class/dvb/dvb0.frontend0/device/id*: No such file or directory Maybe a bug in the driver? > - You need to set strtoul() base as 16 as the files don't have 0x in > front of the hex root@video:/home/kls/vdr/VDR > cat /sys/class/dvb/dvb0.frontend0/device/subsystem_device 0x0000 root@video:/home/kls/vdr/VDR > cat /sys/class/dvb/dvb0.frontend0/device/subsystem_vendor 0x13c2 Maybe the "reddo" driver behaves differently than the FuSi driver? > What about making this an utility method in VDR? Give device file name > and return id... Will do. Have you tried whether it works with my patch? In that case you wouldn't even need the whole plugin. Klaus > 2010/4/5 Klaus Schmidinger <Klaus.Schmidinger@tvdr.de > <mailto:Klaus.Schmidinger@tvdr.de>> > > From PLUGINS.html: > > A plugin that creates a derived cDeviceHook ... > shall not delete this object. It will be automatically deleted when the > program ends > > I have added a similar note to device.h now. > > > ... > > - The sysfs probe code in full feature card plugin is buggy :-) > > Would you mind posting a patch that fixes this? > > Klaus
Ok, so the sysfs names of vendor/product are driver-dependent... All my usb devices have idVendor/idProduct even though only one of them is "Reddo". Tried to create the hook on Initialize(), still crashes on exit(). Haven't tried your patch, because as far as I know the driver claims it can do QAM256, and even if that was disabled today it would take some time to get into all linux distributions... Btw it even claims to support QAM256 on the product package, but it still doesn't work. I guess that's the reason they are so inexpensive here... Teemu 2010/4/5 Klaus Schmidinger <Klaus.Schmidinger@tvdr.de> > On 05.04.2010 12:43, Teemu Rantanen wrote: > > Hi, > > > > I tried also without delete cDeviceHook but it still crashed... > > Please try creating the cReddoDeviceHook in > cPluginDisableReddoQAM256::Initialize(), > as suggested in PLUGINS.html. > > > Well, the fixes are basically available in the plugin, as I copied the > > probe method (and modified slightly to suit the plugin). Those are: > > - The sysfs filenames are idVendor (subsystem_vendor) and idProduct > > (subsystem_device) > > This is what I get here: > > root@video:/home/kls/vdr/VDR > ls -l > /sys/class/dvb/dvb0.frontend0/device/subsystem_* > -r--r--r-- 1 root root 4096 2010-04-05 16:25 > /sys/class/dvb/dvb0.frontend0/device/subsystem_device > -r--r--r-- 1 root root 4096 2010-04-05 16:25 > /sys/class/dvb/dvb0.frontend0/device/subsystem_vendor > > root@video:/home/kls/vdr/VDR > ls -l > /sys/class/dvb/dvb0.frontend0/device/id* > ls: cannot access /sys/class/dvb/dvb0.frontend0/device/id*: No such file or > directory > > Maybe a bug in the driver? > > > - You need to set strtoul() base as 16 as the files don't have 0x in > > front of the hex > > root@video:/home/kls/vdr/VDR > cat > /sys/class/dvb/dvb0.frontend0/device/subsystem_device > 0x0000 > root@video:/home/kls/vdr/VDR > cat > /sys/class/dvb/dvb0.frontend0/device/subsystem_vendor > 0x13c2 > > Maybe the "reddo" driver behaves differently than the FuSi driver? > > > What about making this an utility method in VDR? Give device file name > > and return id... > > Will do. > > > Have you tried whether it works with my patch? > In that case you wouldn't even need the whole plugin. > > Klaus > >
On 05.04.2010 18:14, Teemu Rantanen wrote: > Ok, so the sysfs names of vendor/product are driver-dependent... All my > usb devices have idVendor/idProduct even though only one of them is "Reddo". I'm not saying that what the FuSI driver does is correct, either ;-) Somebody with more knowledge should clarify this and fix the driver that is faulty. > Tried to create the hook on Initialize(), still crashes on exit(). Well, then I guess you'll need to do some debugging to find out what really goes wrong here. > Haven't tried your patch, because as far as I know the driver claims it > can do QAM256, and even if that was disabled today it would take some > time to get into all linux distributions... Btw it even claims to > support QAM256 on the product package, but it still doesn't work. I > guess that's the reason they are so inexpensive here... At any rate, these things *must* be fixed in the driver! Even if it takes a while for a fix to get into the main kernel source. Klaus > 2010/4/5 Klaus Schmidinger <Klaus.Schmidinger@tvdr.de > <mailto:Klaus.Schmidinger@tvdr.de>> > > On 05.04.2010 12:43, Teemu Rantanen wrote: > > Hi, > > > > I tried also without delete cDeviceHook but it still crashed... > > Please try creating the cReddoDeviceHook in > cPluginDisableReddoQAM256::Initialize(), > as suggested in PLUGINS.html. > > > Well, the fixes are basically available in the plugin, as I copied the > > probe method (and modified slightly to suit the plugin). Those are: > > - The sysfs filenames are idVendor (subsystem_vendor) and idProduct > > (subsystem_device) > > This is what I get here: > > root@video:/home/kls/vdr/VDR > ls -l > /sys/class/dvb/dvb0.frontend0/device/subsystem_* > -r--r--r-- 1 root root 4096 2010-04-05 16:25 > /sys/class/dvb/dvb0.frontend0/device/subsystem_device > -r--r--r-- 1 root root 4096 2010-04-05 16:25 > /sys/class/dvb/dvb0.frontend0/device/subsystem_vendor > > root@video:/home/kls/vdr/VDR > ls -l > /sys/class/dvb/dvb0.frontend0/device/id* > ls: cannot access /sys/class/dvb/dvb0.frontend0/device/id*: No such > file or directory > > Maybe a bug in the driver? > > > - You need to set strtoul() base as 16 as the files don't have 0x in > > front of the hex > > root@video:/home/kls/vdr/VDR > cat > /sys/class/dvb/dvb0.frontend0/device/subsystem_device > 0x0000 > root@video:/home/kls/vdr/VDR > cat > /sys/class/dvb/dvb0.frontend0/device/subsystem_vendor > 0x13c2 > > Maybe the "reddo" driver behaves differently than the FuSi driver? > > > What about making this an utility method in VDR? Give device file name > > and return id... > > Will do. > > > Have you tried whether it works with my patch? > In that case you wouldn't even need the whole plugin. > > Klaus > > > ------------------------------------------------------------------------ > > _______________________________________________ > vdr mailing list > vdr@linuxtv.org > http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
--- dvbdevice.c 2010/03/07 13:58:24 2.32 +++ dvbdevice.c 2010/04/04 11:15:25 2.33 @@ -889,7 +889,16 @@ if (!cSource::IsSat(Channel->Source())) return DeviceHooksProvidesTransponder(Channel); // source is sufficient for non sat cDvbTransponderParameters dtp(Channel->Parameters()); - if (frontendType == SYS_DVBS && dtp.System() == SYS_DVBS2) + if (dtp.System() == SYS_DVBS2 && frontendType == SYS_DVBS || + dtp.Modulation() == QPSK && !(frontendInfo.caps & FE_CAN_QPSK) || + dtp.Modulation() == QAM_16 && !(frontendInfo.caps & FE_CAN_QAM_16) || + dtp.Modulation() == QAM_32 && !(frontendInfo.caps & FE_CAN_QAM_32) || + dtp.Modulation() == QAM_64 && !(frontendInfo.caps & FE_CAN_QAM_64) || + dtp.Modulation() == QAM_128 && !(frontendInfo.caps & FE_CAN_QAM_128) || + dtp.Modulation() == QAM_256 && !(frontendInfo.caps & FE_CAN_QAM_256) || + dtp.Modulation() == QAM_AUTO && !(frontendInfo.caps & FE_CAN_QAM_AUTO) || + dtp.Modulation() == VSB_8 && !(frontendInfo.caps & FE_CAN_8VSB) || + dtp.Modulation() == VSB_16 && !(frontendInfo.caps & FE_CAN_16VSB)) return false; // requires modulation system which frontend doesn't provide if (!Setup.DiSEqC || Diseqcs.Get(CardIndex() + 1, Channel->Source(), Channel->Frequency(), dtp.Polarization())) return DeviceHooksProvidesTransponder(Channel);