[vdr] Restricting a particular dvb card from tuning to channels with a selected modulation
Petri Helin
phelin at googlemail.com
Mon Apr 5 20:55:38 CEST 2010
On 04/05/2010 12:57 PM, Klaus Schmidinger wrote:
> 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.
>
>
I used your patch as an example and created a simple test patch for
dvb-c (I think yours is for dvb-s(2) only) in order to test the
approach. I also disabled FE_CAN_QAM256 from the driver. After that VDR
no longer used Reddo for QAM256 channels as expected. The approach is
very limited: It disables QAM256 for the every TDA10023 frontend, not
just for Reddo's, and it doesn't make VDR to prefer Reddo for non QAM256
channels, which would make sense in order to keep QAM256 channels
available as much as possible. The patches are inline below:
--- dvbdevice.c.orig 2010-02-21 19:10:35.000000000 +0200
+++ dvbdevice.c 2010-04-05 17:20:06.080525344 +0300
@@ -872,8 +872,12 @@
{
if (!ProvidesSource(Channel->Source()))
return false; // doesn't provide source
- if (!cSource::IsSat(Channel->Source()))
+ if (!cSource::IsSat(Channel->Source())) {
+ cDvbTransponderParameters dtp(Channel->Parameters());
+ if (dtp.Modulation() == QAM_256 && !(frontendInfo.caps &
FE_CAN_QAM_256))
+ return false;
return DeviceHooksProvidesTransponder(Channel); // source is
sufficient for non sat
+ }
cDvbTransponderParameters dtp(Channel->Parameters());
if (frontendType == SYS_DVBS && dtp.System() == SYS_DVBS2)
return false; // requires modulation system which frontend
doesn't provide
--- v4l-dvb/linux/drivers/media/dvb/frontends/tda10023.c.orig
2010-04-05 15:28:22.605844128 +0300
+++ v4l-dvb/linux/drivers/media/dvb/frontends/tda10023.c 2010-04-05
15:27:54.934343796 +0300
@@ -553,7 +553,7 @@
#endif
.caps = 0x400 | //FE_CAN_QAM_4
FE_CAN_QAM_16 | FE_CAN_QAM_32 | FE_CAN_QAM_64 |
- FE_CAN_QAM_128 | FE_CAN_QAM_256 |
+ FE_CAN_QAM_128 | //FE_CAN_QAM_256 |
FE_CAN_FEC_AUTO
},
-Petri
More information about the vdr
mailing list