[ANNOUNCE] DVB-S2 + H.264 support for VDR-1.5.12

Message ID 20080107165102.GB7672@gmail.com
State New
Headers

Commit Message

Grégoire Favre Jan. 7, 2008, 4:51 p.m. UTC
  On Mon, Jan 07, 2008 at 05:19:17PM +0100, Gregoire Favre wrote:
> On Sun, Jan 06, 2008 at 09:34:32PM +0100, Reinhard Nissl wrote:
> > Hi,
> > 
> > Please add some debug code to cDvbDevice::ProvidesTransponder()
> > to find out what's going wrong in your case, i. e. compare the
> > provided and requested modulation systems.
> 
> My cards :
> 
> 0: 101469280
> 1: 101469280
> 2: 101469280
> 
> But the card 1 : Hauppauge HVR-4000 is the dvb-s2 one ???
> 
> DVB: registering frontend 0 (ST STV0299 DVB-S)...
> DVB: registering frontend 1 (Conexant CX24116/CX24118)...
> DVB: registering frontend 2 (Conexant CX24123/CX24109)...
> Without the patch and with -D1 DVB-S2 works perfectly.

In case someone want to try to log here a small diff for it :
  

Comments

Reinhard Nissl Jan. 7, 2008, 6:27 p.m. UTC | #1
Hi,

Gregoire Favre schrieb:

>>> Please add some debug code to cDvbDevice::ProvidesTransponder()
>>> to find out what's going wrong in your case, i. e. compare the
>>> provided and requested modulation systems.
>>
>> My cards :
>>
>> 0: 101469280
>> 1: 101469280
>> 2: 101469280

Hmm, looks like you've reported the impact numbers from
GetDevice(). But I've wanted some log messages from
ProvidesTransponder().

Anyway, as the impact is the same for all devices, your driver
doesn't set DVBFE_DELSYS_DVBS2.

>> But the card 1 : Hauppauge HVR-4000 is the dvb-s2 one ???
>>
>> DVB: registering frontend 0 (ST STV0299 DVB-S)...
>> DVB: registering frontend 1 (Conexant CX24116/CX24118)...
>> DVB: registering frontend 2 (Conexant CX24123/CX24109)...
>> Without the patch and with -D1 DVB-S2 works perfectly.

I've patched multiproto with the HVR-4000 support patch you've
mentioned on the linux-dvb mailing list.

cx24116.c contains this function:
/* TODO: The hardware does DSS too, how does the kernel demux
handle this? */
static int cx24116_get_delsys(struct dvb_frontend *fe,
        enum dvbfe_delsys *fe_delsys)
{
        dprintk("%s()\n",__FUNCTION__);
        *fe_delsys = DVBFE_DELSYS_DVBS | DVBFE_DELSYS_DVBS2;

        return 0;
}

Therefore the above mentioned flag should be set. Please check
whether this function gets called when VDR reaches the end of
cDvbDevice::cDvbDevice().

In case the emulation layer of the multiproto tree kicks in, then
the function will not get called and therefore DVBFE_DELSYS_DVBS2
is not set.

Bye.
  
Grégoire Favre Jan. 7, 2008, 8:16 p.m. UTC | #2
On Mon, Jan 07, 2008 at 07:27:21PM +0100, Reinhard Nissl wrote:

Hello :-)

> I've patched multiproto with the HVR-4000 support patch you've
> mentioned on the linux-dvb mailing list.

I use this one :
http://www.mail-archive.com/linux-dvb@linuxtv.org/msg28020.html 
but it don't seems to be the same as the one you used to check your
source. It miss this function... I have to look after it in other
patch...

Thank you very much, then the problem don't seems to be your patch but
my driver, which will take some time to investigate :-)

Have a nice evening,
  

Patch

--- device.c.orig	2008-01-07 17:17:05.000000000 +0100
+++ device.c	2008-01-07 16:59:22.000000000 +0100
@@ -18,6 +18,7 @@ 
 #include "receiver.h"
 #include "status.h"
 #include "transfer.h"
+#include <iostream>
 
 // --- cLiveSubtitle ---------------------------------------------------------
 
@@ -433,6 +434,7 @@ 
              imp <<= 1; imp |= NumUsableSlots ? 0 : device[i]->HasCi();                                              // avoid cards with Common Interface for FTA channels
              imp <<= 1; imp |= device[i]->HasDecoder();                                                              // avoid full featured cards
              imp <<= 1; imp |= NumUsableSlots ? !ChannelCamRelations.CamDecrypt(Channel->GetChannelID(), j + 1) : 0; // prefer CAMs that are known to decrypt this channel
+	     std::cerr << "DVBS2-log: " << i << ": " << imp << std::endl;
              if (imp < Impact) {
                 // This device has less impact than any previous one, so we take it.
                 Impact = imp;
--- dvbdevice.c.orig	2008-01-07 17:17:58.000000000 +0100
+++ dvbdevice.c	2008-01-07 17:01:46.000000000 +0100
@@ -26,6 +26,7 @@ 
 #include "receiver.h"
 #include "status.h"
 #include "transfer.h"
+#include <iostream>
 
 #define DO_REC_AND_PLAY_ON_PRIMARY_DEVICE 1
 #define DO_MULTIPLE_RECORDINGS 1
@@ -805,12 +806,18 @@ 
 
 bool cDvbDevice::ProvidesTransponder(const cChannel *Channel) const
 {
-  if (!ProvidesSource(Channel->Source())) 
+  if (!ProvidesSource(Channel->Source())) {
+     std::cerr << "DVBS2-log: - Doesn't provide source" << std::endl;
      return false; // doesn't provide source
-  if (!cSource::IsSat(Channel->Source()))
+  }
+  if (!cSource::IsSat(Channel->Source())) {
+     std::cerr << "DVBS2-log: + source is sufficient for non sat" << std::endl;
      return true; // source is sufficient for non sat
-  if (!(frontendType & Channel->ModulationSystem()))
+  }
+  if (!(frontendType & Channel->ModulationSystem())) {
+     std::cerr << "DVBS2-log: - requires modulation system which frontend doesn't provide" << std::endl;
      return false; // requires modulation system which frontend doesn't provide
+  }
   return !Setup.DiSEqC || Diseqcs.Get(Channel->Source(), Channel->Frequency(), Channel->Polarization());
 }