mirror of
				https://github.com/DigitalDevices/dddvb.git
				synced 2025-03-01 10:35:23 +00:00 
			
		
		
		
	Merge branch 'internal'
This commit is contained in:
		| @@ -23,7 +23,7 @@ extern uint32_t dddvb_debug; | |||||||
| 	 do { if (dddvb_debug & _mask_) fprintf(stderr, __VA_ARGS__); } while (0)  | 	 do { if (dddvb_debug & _mask_) fprintf(stderr, __VA_ARGS__); } while (0)  | ||||||
| #else | #else | ||||||
| #define dbgprintf(_mask_, ...) \ | #define dbgprintf(_mask_, ...) \ | ||||||
|          do { if (dddvb_debug & _mask_) { fprintf(stderr, "[%5u] ", mtime(NULL)); \ |     do { if (dddvb_debug & _mask_) { fprintf(stderr, "[%5u] ",(unsigned int) mtime(NULL)); \ | ||||||
| 			            fprintf(stderr, __VA_ARGS__); } } while (0)  | 			            fprintf(stderr, __VA_ARGS__); } } while (0)  | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|   | |||||||
| @@ -13,6 +13,7 @@ | |||||||
| #include <fcntl.h> | #include <fcntl.h> | ||||||
| #include <string.h> | #include <string.h> | ||||||
| #include <unistd.h> | #include <unistd.h> | ||||||
|  | #include <errno.h> | ||||||
|  |  | ||||||
| #define DTV_SCRAMBLING_SEQUENCE_INDEX 70 | #define DTV_SCRAMBLING_SEQUENCE_INDEX 70 | ||||||
| #define DTV_INPUT                     71 | #define DTV_INPUT                     71 | ||||||
| @@ -651,12 +652,12 @@ static void get_stats(struct dddvb_fe *fe) | |||||||
|  |  | ||||||
| 		fe->strength = str = st.stat[0].svalue; | 		fe->strength = str = st.stat[0].svalue; | ||||||
| 		dbgprintf(DEBUG_DVB, "fe%d: str=%lld.%03llddB\n", | 		dbgprintf(DEBUG_DVB, "fe%d: str=%lld.%03llddB\n", | ||||||
| 			  fe->nr, str/1000, abs(str%1000)); | 			  fe->nr, (long long int)str/1000, (long long int)abs(str%1000)); | ||||||
| 	} | 	} | ||||||
| 	if (!get_stat(fe->fd, DTV_STAT_CNR, &st)) { | 	if (!get_stat(fe->fd, DTV_STAT_CNR, &st)) { | ||||||
| 		fe->cnr = cnr = st.stat[0].svalue; | 		fe->cnr = cnr = st.stat[0].svalue; | ||||||
| 		dbgprintf(DEBUG_DVB, "fe%d: cnr=%lld.%03llddB\n", | 		dbgprintf(DEBUG_DVB, "fe%d: cnr=%lld.%03llddB\n", | ||||||
| 			  fe->nr, cnr/1000, abs(cnr%1000)); | 			  fe->nr, (long long int)cnr/1000, (long long int)abs(cnr%1000)); | ||||||
| 	} | 	} | ||||||
| 	if (!get_stat(fe->fd, DTV_STAT_PRE_TOTAL_BIT_COUNT, &st) && | 	if (!get_stat(fe->fd, DTV_STAT_PRE_TOTAL_BIT_COUNT, &st) && | ||||||
| 	    (st.stat[0].scale == FE_SCALE_COUNTER)) { | 	    (st.stat[0].scale == FE_SCALE_COUNTER)) { | ||||||
| @@ -668,19 +669,19 @@ static void get_stats(struct dddvb_fe *fe) | |||||||
| 	    (st.stat[0].scale == FE_SCALE_COUNTER)) { | 	    (st.stat[0].scale == FE_SCALE_COUNTER)) { | ||||||
| 		uval = st.stat[0].uvalue; | 		uval = st.stat[0].uvalue; | ||||||
| 		dbgprintf(DEBUG_DVB, "fe%d: pre_error_bit_count = %llu\n", | 		dbgprintf(DEBUG_DVB, "fe%d: pre_error_bit_count = %llu\n", | ||||||
| 			  fe->nr, uval); | 			  fe->nr, (long long int)uval); | ||||||
| 	} | 	} | ||||||
| 	if (!get_stat(fe->fd, DTV_STAT_ERROR_BLOCK_COUNT, &st) && | 	if (!get_stat(fe->fd, DTV_STAT_ERROR_BLOCK_COUNT, &st) && | ||||||
| 	    (st.stat[0].scale == FE_SCALE_COUNTER)) { | 	    (st.stat[0].scale == FE_SCALE_COUNTER)) { | ||||||
| 		uval = st.stat[0].uvalue; | 		uval = st.stat[0].uvalue; | ||||||
| 		dbgprintf(DEBUG_DVB, "fe%d: error_block_count = %llu\n", | 		dbgprintf(DEBUG_DVB, "fe%d: error_block_count = %llu\n", | ||||||
| 			  fe->nr, uval); | 			  fe->nr, (long long int)uval); | ||||||
| 	} | 	} | ||||||
| 	if (!get_stat(fe->fd, DTV_STAT_TOTAL_BLOCK_COUNT, &st) && | 	if (!get_stat(fe->fd, DTV_STAT_TOTAL_BLOCK_COUNT, &st) && | ||||||
| 	    (st.stat[0].scale == FE_SCALE_COUNTER)) { | 	    (st.stat[0].scale == FE_SCALE_COUNTER)) { | ||||||
| 		uval = st.stat[0].uvalue; | 		uval = st.stat[0].uvalue; | ||||||
| 		dbgprintf(DEBUG_DVB, "fe%d: total_block_count = %llu\n", | 		dbgprintf(DEBUG_DVB, "fe%d: total_block_count = %llu\n", | ||||||
| 			  fe->nr, uval); | 			  fe->nr, (long long int)uval); | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -334,7 +334,7 @@ static void calc_lq(struct dddvb_fe *fe) | |||||||
| 	 | 	 | ||||||
| 	get_stat(fe->fd, DTV_STAT_SIGNAL_STRENGTH, &st); | 	get_stat(fe->fd, DTV_STAT_SIGNAL_STRENGTH, &st); | ||||||
| 	str = st.stat[0].svalue; | 	str = st.stat[0].svalue; | ||||||
| 	dbgprintf(DEBUG_DVB, "fe%d: str=%lld\n", fe->nr, str); | 	dbgprintf(DEBUG_DVB, "fe%d: str=%lld\n", fe->nr, (long long int)str); | ||||||
| 	fe->strength = str; | 	fe->strength = str; | ||||||
| 	str = (str * 48) / 10000 + 344; | 	str = (str * 48) / 10000 + 344; | ||||||
| 	if (str < 0) | 	if (str < 0) | ||||||
| @@ -358,7 +358,7 @@ static void calc_lq(struct dddvb_fe *fe) | |||||||
| 	ber_den = st.stat[0].uvalue; | 	ber_den = st.stat[0].uvalue; | ||||||
|  |  | ||||||
| 	dbgprintf(DEBUG_DVB, "fe%d: snr=%lld ber=%llu/%llu\n", | 	dbgprintf(DEBUG_DVB, "fe%d: snr=%lld ber=%llu/%llu\n", | ||||||
| 		  fe->nr, snr, ber_num, ber_den); | 		  fe->nr, (long long int)snr,(long long int) ber_num,(long long int) ber_den); | ||||||
| 	dbgprintf(DEBUG_DVB, "fe%d: fec=%u mod=%u\n", fe->nr, fec, mod); | 	dbgprintf(DEBUG_DVB, "fe%d: fec=%u mod=%u\n", fe->nr, fec, mod); | ||||||
| 	get_property(fe->fd, DTV_FREQUENCY, &freq); | 	get_property(fe->fd, DTV_FREQUENCY, &freq); | ||||||
| 	dbgprintf(DEBUG_DVB, "fe%d: actual frequency=%u\n", fe->nr, freq); | 	dbgprintf(DEBUG_DVB, "fe%d: actual frequency=%u\n", fe->nr, freq); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 internal
					internal