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;
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html