Mailing List archive

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

[vdr] Re: [linux-dvb] "Video datastream brocken" - origin (maybe) found



Andreas Share wrote:

Hi,

after tons of debug-logs i have found (maybe) the reason for the "Video
datastream broken" errors (and maybe UPT errors too).

The problems, at least with my skystar2 cards, are caused by an inconsistend
timing (different runtime) between frontend and demux ioctl´s.

With an unmodified vdr and driver i have seen that opening/closing filters
is almost done during the frontend tuning phase. This gave me an runtime
beween 30 and 180min with my skystar2 cards. So i have tried to "sync" the
different ioctls (inspired by the 0.9.4 driver witch use only one ioctl and
distribute the different calls to the different driver part) a little bit.
At the moment i have done following changes, but i think some are not
nessasary:

In dvb_frontend_ioctl (dvb_frontend.c):

1. delayed the first tuning command by dvb_delay(50) to give the demux a
chance to close all filters.

case FE_SET_TONE:
if (fe->status)
dvb_call_frontend_notifiers (fe, 0);
+ if (fe->state & FESTATE_TUNED)
+ dvb_delay(50);
fe->state = FESTATE_DISEQC;
dvb_frontend_internal_ioctl (&fe->frontend, cmd, parg);
break;

2. insert FE_READ_STATUS to override the frontend status, to make shure i
could not get any "HAS_LOCK" during tuning.

case FE_GET_EVENT:
err = dvb_frontend_get_event (fe, parg, file->f_flags);
break;

+ case FE_READ_STATUS:
+ if (fe->state != FESTATE_TUNED){
+ fe->status = 0;
+ }
+ else {
+ err = dvb_frontend_internal_ioctl (&fe->frontend, cmd, parg);
+ }
+ break;

case FE_GET_FRONTEND:

1. In vdr 1.3.11 void cDvbTuner::Action(void) (dvbdevice.c): To loop more
often, (inspired by Stefan Meyknecht)

- newSet.TimedWait(mutex, (ciHandler && (time(NULL) - startTime < 20))
? 100 : 1000);

+ bool fast = (tunerStatus == tsTuned) || (ciHandler &&(time(NULL) -
startTime < 20));
+ newSet.TimedWait(mutex, fast ? 100 : 1000);
}
}

2. bool cDvbTuner::SetFrontend(void) : Disable diseqc "caching" allways the
same tuning sequence (and timing)

break;
}
}
- diseqc->Commands();
+ diseqcCommands = NULL;
}
frequency -= diseqc->Lof();
}
else {
esyslog("ERROR: no DiSEqC parameters found for channel %d",
channel.Number());
return false;
}

3. using a little modified WAIT_FOR_LOCK_AFTER_TUNING loop

#ifdef WAIT_FOR_LOCK_AFTER_TUNING
//XXX TODO preliminary fix for the "Unknown picture type" error
time_t t0 = time(NULL);
while (!dvbTuner->Locked() && time(NULL) - t0 < 5)
usleep(100);
#endif

+ time_t t0 = time(NULL);
+ while (!dvbTuner->Locked() && time(NULL) - t0 < 3){
+ usleep(500);
+ }
+
+ if (!dvbTuner->Locked()){
+ TurnOnLivePIDs = false;
+ }

With this modifikations my both skystar2 cards now run for 24h the epg-scan,
without hangs. I´m shure some (or the most) of this modifications are not
nessasary, but im not a programmer; this was only on of my tries to find out
the reason for hanging cards. In the next day i will try out my other cards
(ff 1.3 + 1.5 & Nova-CI), but i´m very shure all cards problems like video
datastream errors and UPT errors (and maybe outcom-errors) are caused by the
to early fitler setting. And, i´m think this modifications could only be a
workaround at the moment, because this slow down tuning a little bit.


Andreas

Hello,

Are the DVB-driver developers aware of this problem ?
I am surprised to see no comments here. For some VDR-users the UPT- or datastream broken error is a great pain.

--
Helmut Auer, helmut@helmutauer.de




Home | Main Index | Thread Index