Re: [vdr] ERROR: video data stream broken on second dvb card , but szap works (new findings!)

2007-02-18 Thread Reinhard Nissl
Hi,

Dieter Bloms wrote:

 my primary dvb card works fine on both of my Twin-LNB connectors.
 I can switch the second card via szap and get a video stream via
 cat /dev/dvb/adapter1/dvr0  /tmp/bla on H and V channels.
 VDR doesn't get data any data from H channels, but gets data from V
 channels.
 I will try to strace vdr and szap to get any difference, maybe they do
 it in a different way.

I've had a further look into szap's source how it detects the status
FE_LOCKED. Attached is an updated tuner patch which now also reports
details for FE_READ_STATUS.

One difference between VDR and szap regarding FE_READ_STATUS is, that
VDR only honors the read status when ioctl() returns 0 while szap prints
just an error when ioctl() returns -1.

Furthermore, VDR's handling of errno == EINTR seems to be wrong due to
the do {} while (0); loop.

BTW: I still assume, that your logfile reports a tuning timeout. If this
is no longer the case, then you may want to experiment with
WAIT_FOR_TUNER_LOCK in device.c.

Bye.
-- 
Dipl.-Inform. (FH) Reinhard Nissl
mailto:[EMAIL PROTECTED]
--- ../vdr-1.4.5-orig/dvbdevice.c	2006-08-14 11:38:32.0 +0200
+++ dvbdevice.c	2007-02-18 12:23:47.0 +0100
@@ -147,6 +147,15 @@ bool cDvbTuner::Locked(int TimeoutMs)
   return tunerStatus = tsLocked;
 }
 
+#include sys/time.h
+static double now() { int e = errno; timeval t; gettimeofday(t, 0); errno = e; return t.tv_sec + t.tv_usec / 1e6; }
+static int check(int c, int r, char *a, double t) { int e = errno; fprintf(stderr, t: %.3lf, c: %d, r: %d, a: %s\n, t, c, r, a); errno = e; return r; } 
+static int check5(int status, int c, int r, char *a, double t) { int e = errno; fprintf(stderr, t: %.3lf, c: %d, r: %d, a: %s = Status: %02x\n, t, c, r, a, status); errno = e; return r; } 
+#define CHECK5(s) ::check5(Status, cardIndex, s, #s, ::now())
+#define CHECK4(s) ::check(cardIndex, 0, s, ::now())
+#define CHECK3(s) ::check(cardIndex, s, #s, ::now())
+#define CHECK2(s) CHECK(::check(cardIndex, s, #s, ::now()))
+
 bool cDvbTuner::GetFrontendStatus(fe_status_t Status, int TimeoutMs)
 {
   if (TimeoutMs) {
@@ -157,15 +166,16 @@ bool cDvbTuner::GetFrontendStatus(fe_sta
   ; // just to clear the event queue - we'll read the actual status below
 }
  }
-  do {
- int stat = ioctl(fd_frontend, FE_READ_STATUS, Status);
- if (stat == 0)
-return true;
- if (stat  0) {
-if (errno == EINTR)
-   continue;
+  while (1) {
+int stat = CHECK5(ioctl(fd_frontend, FE_READ_STATUS, Status));
+if (stat == 0)
+   return true;
+if (stat  0) {
+   if (errno == EINTR)
+  continue;
+   }
+break;
 }
- } while (0);
   return false;
 }
 
@@ -195,12 +205,12 @@ bool cDvbTuner::SetFrontend(void)
   for (char *CurrentAction = NULL; (da = diseqc-Execute(CurrentAction)) != cDiseqc::daNone; ) {
   switch (da) {
 case cDiseqc::daNone:  break;
-case cDiseqc::daToneOff:   CHECK(ioctl(fd_frontend, FE_SET_TONE, SEC_TONE_OFF)); break;
-case cDiseqc::daToneOn:CHECK(ioctl(fd_frontend, FE_SET_TONE, SEC_TONE_ON)); break;
-case cDiseqc::daVoltage13: CHECK(ioctl(fd_frontend, FE_SET_VOLTAGE, SEC_VOLTAGE_13)); break;
-case cDiseqc::daVoltage18: CHECK(ioctl(fd_frontend, FE_SET_VOLTAGE, SEC_VOLTAGE_18)); break;
-case cDiseqc::daMiniA: CHECK(ioctl(fd_frontend, FE_DISEQC_SEND_BURST, SEC_MINI_A)); break;
-case cDiseqc::daMiniB: CHECK(ioctl(fd_frontend, FE_DISEQC_SEND_BURST, SEC_MINI_B)); break;
+case cDiseqc::daToneOff:   CHECK2(ioctl(fd_frontend, FE_SET_TONE, SEC_TONE_OFF)); break;
+case cDiseqc::daToneOn:CHECK2(ioctl(fd_frontend, FE_SET_TONE, SEC_TONE_ON)); break;
+case cDiseqc::daVoltage13: CHECK2(ioctl(fd_frontend, FE_SET_VOLTAGE, SEC_VOLTAGE_13)); break;
+case cDiseqc::daVoltage18: CHECK2(ioctl(fd_frontend, FE_SET_VOLTAGE, SEC_VOLTAGE_18)); break;
+case cDiseqc::daMiniA: CHECK2(ioctl(fd_frontend, FE_DISEQC_SEND_BURST, SEC_MINI_A)); break;
+case cDiseqc::daMiniB: CHECK2(ioctl(fd_frontend, FE_DISEQC_SEND_BURST, SEC_MINI_B)); break;
 case cDiseqc::daCodes: {
  int n = 0;
  uchar *codes = diseqc-Codes(n);
@@ -208,7 +218,7 @@ bool cDvbTuner::SetFrontend(void)
 struct dvb_diseqc_master_cmd cmd;
 memcpy(cmd.msg, codes, min(n, int(sizeof(cmd.msg;
 cmd.msg_len = n;
-CHECK(ioctl(fd_frontend, FE_DISEQC_SEND_MASTER_CMD, cmd));
+CHECK2(ioctl(fd_frontend, 

Re: [vdr] ERROR: video data stream broken on second dvb card , but szap works (new findings!)

2007-02-17 Thread Dieter Bloms
Hi,

On Fri, Feb 16, bastlir wrote:

  vdr can record from senders on V polarisation like sat1, prosieben ...
  even without reloading the driver.
  vdr can not record from any sender on H polarisation like ard, zdf ...
  even with reloading the driver it doesn't work.
  This explains, that I got some recording and some not.
 
  Does anybody know what can be the different between H and V polarisation ?
 Hi,
 
 supply voltage at central wire of koax cable. It seems you have or DVB card 
 or 
 LNB damaged. Test these parts with another receiver or/and another LNB.

my primary dvb card works fine on both of my Twin-LNB connectors.
I can switch the second card via szap and get a video stream via
cat /dev/dvb/adapter1/dvr0  /tmp/bla on H and V channels.
VDR doesn't get data any data from H channels, but gets data from V
channels.
I will try to strace vdr and szap to get any difference, maybe they do
it in a different way.


-- 
Gruß

  Dieter

--
I do not get viruses because I do not use MS software.
If you use Outlook then please do not put my email address in your
address-book so that WHEN you get a virus it won't use my address in the
From field.


pgpwaWFp9hStk.pgp
Description: PGP signature
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] ERROR: video data stream broken on second dvb card , but szap works (new findings!)

2007-02-16 Thread Dieter Bloms
Hi,

On Thu, Feb 15, Dieter Bloms wrote:

 no diseqc setup works stabel for me :(
 Also the Full DiSEqC sequence from default diseqc.conf doesn't work
 a few hours after reboot and sometime it doesn't work directly after
 reboot.
 But I can switch the channel with szap and get the TS stream from
 /dev/dvb/adapter1/dvr0 every time, even vdr can't record I only stop vdr
 and do not a reload of the driver.
 
 I did some tests with szap:
 
 o I can only get the TS stream with the default lnb type or -l UNIVERSAL
 o if I use another lnb type like ENHANCED, I can switch, but don't get
   any data.
 o The ioctls are the same if I use diseqc with vdr, but as I said
   before, I didn't get any data a few hours after reboot of the system,
   and sometime I didn't get any data directly after reboot.
 o If I use szap, I can switch the channels and get the ts stream every
   time (via cat /dev/dvb/adapter1/dvr0  /tmp/bla).
 o the first status is 01 and it has no lock all others are 1f and it has
   a lock (as seen below).
 o when I call szap the second time (with the same channel) the first
   status is 01 and then 1f, too.
 o maybe vdr does have to wait a longer time ?

I can reproduce following:

vdr can record from senders on V polarisation like sat1, prosieben ...
even without reloading the driver.
vdr can not record from any sender on H polarisation like ard, zdf ...
even with reloading the driver it doesn't work.
This explains, that I got some recording and some not.

Does anybody know what can be the different between H and V polarisation ?


-- 
Gruß

  Dieter

--
I do not get viruses because I do not use MS software.
If you use Outlook then please do not put my email address in your
address-book so that WHEN you get a virus it won't use my address in the
From field.


pgpZEcm5XmBkk.pgp
Description: PGP signature
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] ERROR: video data stream broken on second dvb card , but szap works (new findings!)

2007-02-16 Thread bastlir
On Friday 16 February 2007 13:48, Dieter Bloms wrote:
 Hi,

 On Thu, Feb 15, Dieter Bloms wrote:
  no diseqc setup works stabel for me :(

 I can reproduce following:

 vdr can record from senders on V polarisation like sat1, prosieben ...
 even without reloading the driver.
 vdr can not record from any sender on H polarisation like ard, zdf ...
 even with reloading the driver it doesn't work.
 This explains, that I got some recording and some not.

 Does anybody know what can be the different between H and V polarisation ?
Hi,

supply voltage at central wire of koax cable. It seems you have or DVB card or 
LNB damaged. Test these parts with another receiver or/and another LNB.

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr