Re: [ANNOUNCE] scan-s2 is available, please test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I don't know if anyone mentioned it already, but scan-s2 does not work for DVB-T.

Here is a patch which fixes DVB-T support.

Signed-off-by: Hans Werner <hwerner4@xxxxxx>

diff -r fff2d1f1fd4f scan.c
--- a/scan.c	Fri Oct 31 14:07:06 2008 +0200
+++ b/scan.c	Tue Nov 04 15:38:09 2008 +0000
@@ -1523,6 +1523,7 @@ static int __tune_to_transponder (int fr
 	int i;
 	fe_status_t s;
 	uint32_t if_freq;
+	uint32_t bandwidth_hz = 0;
 	current_tp = t;
 
 	struct dtv_property p_clear[] = {
@@ -1580,7 +1581,22 @@ static int __tune_to_transponder (int fr
 		if (verbosity >= 2)
 			dprintf(1,"DVB-S IF freq is %d\n", if_freq);
 	}
-
+	else if (t->delivery_system == SYS_DVBT) {
+		if_freq=t->frequency;
+		if (t->bandwidth == BANDWIDTH_6_MHZ)
+                        bandwidth_hz = 6000000;
+                else if (t->bandwidth == BANDWIDTH_7_MHZ)
+                        bandwidth_hz = 7000000;
+                else if (t->bandwidth == BANDWIDTH_8_MHZ)
+                        bandwidth_hz = 8000000;
+                else
+                        /* Including BANDWIDTH_AUTO */
+                        bandwidth_hz = 0;
+		if (verbosity >= 2){
+			dprintf(1,"DVB-T frequency is %d\n", if_freq);
+			dprintf(1,"DVB-T bandwidth is %d\n", bandwidth_hz);
+		}
+	}
 
 	struct dvb_frontend_event ev;
 	struct dtv_property p_tune[] = {
@@ -1591,11 +1607,12 @@ static int __tune_to_transponder (int fr
 		{ .cmd = DTV_INNER_FEC,			.u.data = t->fec },
 		{ .cmd = DTV_INVERSION,			.u.data = t->inversion },
 		{ .cmd = DTV_ROLLOFF,			.u.data = t->rolloff },
-		{ .cmd = DTV_PILOT,				.u.data = PILOT_AUTO },
+		{ .cmd = DTV_BANDWIDTH_HZ,		.u.data = bandwidth_hz },
+		{ .cmd = DTV_PILOT,			.u.data = PILOT_AUTO },
 		{ .cmd = DTV_TUNE },
 	};
 	struct dtv_properties cmdseq_tune = {
-		.num = 9,
+		.num = 10,
 		.props = p_tune
 	};
 


-- 
Release early, release often.

"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux