Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Re: szap exit after tuning patch
On Mon, Dec 30, 2002 at 09:16:23PM +0100, Emard wrote:
> HI
>
> Here's my small contribution - patch for the szap to
Only in DVB/apps/szap: .depend
Only in DVB/apps/szap: czap
Only in DVB/apps/szap: czap.o
Only in DVB/apps/szap: szap
diff -u -r DVB.orig/apps/szap/szap.c DVB/apps/szap/szap.c
--- DVB.orig/apps/szap/szap.c Sun Nov 17 00:36:09 2002
+++ DVB/apps/szap/szap.c Mon Dec 30 21:07:58 2002
@@ -193,8 +193,10 @@
fe_status_t status;
uint16_t snr, signal;
uint32_t ber, uncorrected_blocks;
+ int i;
- do {
+ for(i = 0; i < 20 || dvr > 0; i++)
+ {
ioctl(fe_fd, FE_READ_STATUS, &status);
ioctl(fe_fd, FE_READ_SIGNAL_STRENGTH, &signal);
ioctl(fe_fd, FE_READ_SNR, &snr);
@@ -208,8 +210,11 @@
printf("FE_HAS_LOCK");
printf("\n");
+ if(dvr <= 0 && i > 0 && ber == 0)
+ return 1; /* successful tuning */
+
usleep(1000000);
- } while (1);
+ }
return 0;
}
Only in DVB/apps/szap: szap.o
Only in DVB/apps/szap: tzap
Only in DVB/apps/szap: tzap.o
Home |
Main Index |
Thread Index