<div dir="ltr"><div class="gmail_quote">On Sat, Feb 7, 2009 at 3:57 AM, Josef Wolf <span dir="ltr"><<a href="mailto:jw@raven.inka.de">jw@raven.inka.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
<br>
sometimes, I experience non-deterministic problems with tuning on some<br>
transponders with dvb-s. For example, on astra-H-11954, I have about<br>
50% chance to get a good tune. If I get a bad tune, I still receive<br>
TS packets from the chosen transponder, but about 10%..20% of the<br>
packets are lost. The (remaining) packets contain PAT/PMT/PES packets<br>
from the chosen transponder, so it is pretty safe to assume that<br>
actual tuning worked properly.<br>
<br>
What I do is pretty much straight forward:<br>
<br>
1. open frontend/dmx/dvr devices<br>
2. send diseqc command to switch to desired input<br>
3. use FE_SET_FRONTEND ioctl to tune to desired transponder<br>
4. wait for FE_HAS_LOCK<br>
5. set dmx_pesfilter_params to:<br>
pid: 0x2000 /* yes, I want the whole transponder */<br>
input: DMX_IN_FRONTEND<br>
output: DMX_OUT_TS_TAP<br>
pes_type: DMX_PES_OTHER<br>
flags: DMX_IMMEDIATE_START<br>
<br>
With this sequence, I have about 50% chance to receive a proper TS<br>
stream. When the stream is not OK, I can see about 10%..20% loss<br>
of TS packets.<br>
<br>
I have checked signal quality, but there is no significant difference<br>
from working to non-working:<br>
<br>
Status:1f sig:ac80 snr:d9e0 ber:00000000 unc:fffffffe FE_HAS_LOCK<br>
Status:1f sig:adbe snr:dac4 ber:00000000 unc:fffffffe FE_HAS_LOCK<br>
<br>
So I have tried to narrow the problem, and I think I've come pretty<br>
close (but still no cigar):<br>
<br>
Once the sequence (which is listed above) is completed, I can easily<br>
(but randomly, IOW: I have to try 1..3 times) switch from proper stream<br>
to broken stream and vice-versa simply by repeating step 3 with _exactly_<br>
the _same_ values.<br>
<br>
To be precise: on an already set-up transponder, re-executing this<br>
function:<br>
<br>
static void tune_frequency (int ifreq, int sr)<br>
{<br>
struct dvb_frontend_parameters tuneto;<br>
<br>
tuneto.frequency = ifreq*1000;<br>
tuneto.inversion = INVERSION_AUTO;<br>
tuneto.u.qpsk.symbol_rate = sr*1000;<br>
tuneto.u.qpsk.fec_inner = FEC_AUTO;<br>
<br>
if (ioctl(fefd, FE_SET_FRONTEND, &tuneto) == -1) {<br>
fatal ("FE_SET_FRONTEND failed: %s\n", strerror (errno));<br>
}<br>
}<br>
<br>
with _exactly_ the same values for ifreq and sr, is able to toggle from<br>
good TS stream to bad TS stream or vice-versa. As long as I avoid to<br>
call this function, the quality of the stream does _not_ change.</blockquote><div>I had exactly the same behavior of Twinhan SP-200 (1027) card until I totally gave up and bought Twinhan SP-400 (1041) card.<br>Interesting if those 2 cards have the same components.<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
I have tried to use fixed values instead of *_AUTO for FEC and INVERSION,<br>
but that did not help either.<br>
<br>
Any ideas?</blockquote><div>What driver repository you use? And what driver is loaded for that card?<br></div><div>My guess was that the tuner is not properly reset/set before the tuning.<br>But (again) since I don't have any chip specification, I didn't have much progress with that.<br>
<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
<br>
BTW:<br>
$ lspci -v<br>
[ ... ]<br>
03:07.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br>
Subsystem: Technotrend Systemtechnik GmbH Technotrend-Budget/Hauppauge WinTV-NOVA-CI DVB card<br>
Flags: bus master, medium devsel, latency 32, IRQ 21<br>
Memory at fdcfe000 (32-bit, non-prefetchable) [size=512]<br>
Kernel driver in use: budget_ci dvb<br>
Kernel modules: snd-aw2, budget-ci<br>
$ uname -a<br>
Linux raven 2.6.27.7-9-default #1 SMP 2008-12-04 18:10:04 +0100 x86_64 x86_64 x86_64 GNU/Linux<br>
<br>
_______________________________________________<br>
linux-dvb users mailing list<br>
For V4L/DVB development, please use instead <a href="mailto:linux-media@vger.kernel.org">linux-media@vger.kernel.org</a><br>
<a href="mailto:linux-dvb@linuxtv.org">linux-dvb@linuxtv.org</a><br>
<a href="http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb" target="_blank">http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb</a><br>
</blockquote></div><br></div>