From: Andy Furniss <adf.lists@gmail.com>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: linux-media@vger.kernel.org
Subject: Re: dvbv5-tzap with pctv 290e/292e needs EAGAIN for pat/pmt to work when recording.
Date: Wed, 10 Jun 2015 18:27:30 +0100 [thread overview]
Message-ID: <55787382.5010607@gmail.com> (raw)
In-Reply-To: <20150610095215.79e5e77e@recife.lan>
Mauro Carvalho Chehab wrote:
> Just applied a fix for it:
> http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=c7c9af17163f282a147ea76f1a3c0e9a0a86e7fa
>
> It will retry up to 10 times. This should very likely be enough if the
> driver doesn't have any bug.
>
> Please let me know if this fixes the issue.
No, it doesn't, so I reverted the above and added back my hack + a
counter as below and it seems to be retrying > a million times.
Tested both 290e and 292e.
I currently have a post on linux-usb because I am having some dvb packet
loss issues unless I spin a cpu - don't know if that's relevant or not
but thought I should mention it. The loss is relatively low level but
enough to be annoying, spinning a cpu doesn't change the eagain count.
results with below patch recording =
asr[scans-dvb]$ dvbv5-zap -a 1 -pro ~/test1.ts -t 10 -c
dvb_channel-290.conf "BBC TWO"
using demux '/dev/dvb/adapter1/demux0'
reading channels from file 'dvb_channel-290.conf'
service has pid type 05: 7270 250
tuning to 745833000 Hz
EAGAIN count = 1468127
video pid 201
dvb_set_pesfilter 201
audio pid 202
dvb_set_pesfilter 202
Lock (0x1f) Signal= 100.00% C/N= 0.20% UCB= 132 postBER= 0
Lock (0x1f) Signal= 100.00% C/N= 0.21% UCB= 138 postBER= 0
Record to file '/home/andy/test1.ts' started
copied 4581936 bytes (447 Kbytes/sec)
Lock (0x1f) Signal= 100.00% C/N= 0.43% UCB= 283 postBER= 0
asr[scans-dvb]$ dvbv5-zap -a 0 -pro ~/test2.ts -t 10 -c
dvb_channel-290.conf "BBC TWO"
using demux '/dev/dvb/adapter0/demux0'
reading channels from file 'dvb_channel-290.conf'
service has pid type 05: 7270 250
tuning to 745833000 Hz
EAGAIN count = 1285533
video pid 201
dvb_set_pesfilter 201
audio pid 202
dvb_set_pesfilter 202
Lock (0x1f) C/N= 16.75dB
Lock (0x1f) C/N= 17.00dB
Record to file '/home/andy/test2.ts' started
copied 3780116 bytes (369 Kbytes/sec)
Lock (0x1f) C/N= 34.00dB
diff --git a/lib/libdvbv5/dvb-demux.c b/lib/libdvbv5/dvb-demux.c
index 30d4eda..f435078 100644
--- a/lib/libdvbv5/dvb-demux.c
+++ b/lib/libdvbv5/dvb-demux.c
@@ -130,6 +130,7 @@ int dvb_get_pmt_pid(int patfd, int sid)
int count;
int pmt_pid = 0;
int patread = 0;
+ int eacount = 0;
int section_length;
unsigned char buft[4096];
unsigned char *buf = buft;
@@ -151,10 +152,16 @@ int dvb_get_pmt_pid(int patfd, int sid)
if (((count = read(patfd, buf, sizeof(buft))) < 0) &&
errno == EOVERFLOW)
count = read(patfd, buf, sizeof(buft));
if (count < 0) {
- perror("read_sections: read error");
- return -1;
+ if (errno == EAGAIN){ /*ADF*/
+ eacount++;
+ continue;
+ }
+ perror("read_sections: read error");
+ return -1;
}
+ fprintf(stderr, "EAGAIN count = %d\n", eacount);
+
section_length = ((buf[1] & 0x0f) << 8) | buf[2];
if (count != section_length + 3)
continue;
next prev parent reply other threads:[~2015-06-10 17:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-02 22:25 dvbv5-tzap with pctv 290e/292e needs EAGAIN for pat/pmt to work when recording Andy Furniss
2015-06-10 12:52 ` Mauro Carvalho Chehab
2015-06-10 17:27 ` Andy Furniss [this message]
2015-06-10 18:50 ` Mauro Carvalho Chehab
2015-06-10 20:17 ` Mauro Carvalho Chehab
2015-06-10 22:16 ` Andy Furniss
2015-06-10 21:35 ` Andy Furniss
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=55787382.5010607@gmail.com \
--to=adf.lists@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
/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;
as well as URLs for NNTP newsgroup(s).