From: Josef Wolf <jw@raven.inka.de>
To: linux-dvb@linuxtv.org
Subject: [linux-dvb] Tuning problems with loss of TS packets
Date: Sat, 7 Feb 2009 02:57:44 +0100 [thread overview]
Message-ID: <20090207015744.GA19668@raven.wolf.lan> (raw)
Hello,
sometimes, I experience non-deterministic problems with tuning on some
transponders with dvb-s. For example, on astra-H-11954, I have about
50% chance to get a good tune. If I get a bad tune, I still receive
TS packets from the chosen transponder, but about 10%..20% of the
packets are lost. The (remaining) packets contain PAT/PMT/PES packets
from the chosen transponder, so it is pretty safe to assume that
actual tuning worked properly.
What I do is pretty much straight forward:
1. open frontend/dmx/dvr devices
2. send diseqc command to switch to desired input
3. use FE_SET_FRONTEND ioctl to tune to desired transponder
4. wait for FE_HAS_LOCK
5. set dmx_pesfilter_params to:
pid: 0x2000 /* yes, I want the whole transponder */
input: DMX_IN_FRONTEND
output: DMX_OUT_TS_TAP
pes_type: DMX_PES_OTHER
flags: DMX_IMMEDIATE_START
With this sequence, I have about 50% chance to receive a proper TS
stream. When the stream is not OK, I can see about 10%..20% loss
of TS packets.
I have checked signal quality, but there is no significant difference
from working to non-working:
Status:1f sig:ac80 snr:d9e0 ber:00000000 unc:fffffffe FE_HAS_LOCK
Status:1f sig:adbe snr:dac4 ber:00000000 unc:fffffffe FE_HAS_LOCK
So I have tried to narrow the problem, and I think I've come pretty
close (but still no cigar):
Once the sequence (which is listed above) is completed, I can easily
(but randomly, IOW: I have to try 1..3 times) switch from proper stream
to broken stream and vice-versa simply by repeating step 3 with _exactly_
the _same_ values.
To be precise: on an already set-up transponder, re-executing this
function:
static void tune_frequency (int ifreq, int sr)
{
struct dvb_frontend_parameters tuneto;
tuneto.frequency = ifreq*1000;
tuneto.inversion = INVERSION_AUTO;
tuneto.u.qpsk.symbol_rate = sr*1000;
tuneto.u.qpsk.fec_inner = FEC_AUTO;
if (ioctl(fefd, FE_SET_FRONTEND, &tuneto) == -1) {
fatal ("FE_SET_FRONTEND failed: %s\n", strerror (errno));
}
}
with _exactly_ the same values for ifreq and sr, is able to toggle from
good TS stream to bad TS stream or vice-versa. As long as I avoid to
call this function, the quality of the stream does _not_ change.
I have tried to use fixed values instead of *_AUTO for FEC and INVERSION,
but that did not help either.
Any ideas?
BTW:
$ lspci -v
[ ... ]
03:07.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)
Subsystem: Technotrend Systemtechnik GmbH Technotrend-Budget/Hauppauge WinTV-NOVA-CI DVB card
Flags: bus master, medium devsel, latency 32, IRQ 21
Memory at fdcfe000 (32-bit, non-prefetchable) [size=512]
Kernel driver in use: budget_ci dvb
Kernel modules: snd-aw2, budget-ci
$ uname -a
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
_______________________________________________
linux-dvb users mailing list
For V4L/DVB development, please use instead linux-media@vger.kernel.org
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
next reply other threads:[~2009-02-07 2:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-07 1:57 Josef Wolf [this message]
2009-02-07 9:12 ` [linux-dvb] Tuning problems with loss of TS packets Alex Betis
2009-02-07 10:57 ` Josef Wolf
2009-02-07 11:47 ` Alex Betis
2009-02-07 14:04 ` Josef Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090207015744.GA19668@raven.wolf.lan \
--to=jw@raven.inka.de \
--cc=linux-dvb@linuxtv.org \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox