Re: Restricting a particular dvb card from tuning to channels with a selected modulation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--- 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);
_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux