Mailing List archive

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

[linux-dvb] Re: [PATCH] mt352 TPS_GIVEN shifts were wrong



Would have helped if I'd attached the patch.



On Mon, 2004-06-07 at 19:54 +1000, Nathan Hand wrote:
> Here's a patch against CVS for the mt352 driver. The TPS_GIVEN fields
> had the wrong shifts (consistently off by 1) so it wouldn't tune for
> Canberra Australia. With this patch and the recent work from Wolfgang
> and Locke my AverMedia DVB-T 771 finds channels with "scan".
> 
> 
> # scan /root/scan.in
> scanning /root/scan.in
> using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
> initial transponder 177500000 1 2 0 3 1 2 0
> initial transponder 205500000 1 2 0 3 1 2 0
> >>> tune to:
> 177500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE
> 0x0000 0x0807: pmt_pid 0x0160 SCB - Ten -- SC10 Canberra (running)
> Network Name 'SCB  '
> >>> tune to:
> 205500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_NONE:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE
> 0x0000 0x0211: pmt_pid 0x0107 ABC -- ABC TV Canberra (running)
> 0x0000 0x0212: pmt_pid 0x0108 ABC -- ABC TV 2 (running)
> 0x0000 0x0210: pmt_pid 0x0109 ABC -- ABC HDTV (running)
> 0x0000 0x0213: pmt_pid 0x010a ABC -- ABC TV 3 (running)
> 0x0000 0x0214: pmt_pid 0x010b ABC -- ABC TV 4 (running)
> 0x0000 0x0216: pmt_pid 0x0100 ABC -- ABC DiG Radio (running)
> Network Name 'ABC Southern NSW'
> >>> tune to:
> 226500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE
> 0x0000 0x0946: pmt_pid 0x0112 PRIME -- PRIME Canberra (running)
> 0x0000 0x09ad: pmt_pid 0x01cc PRIME -- PRIME View 1 (running)
> 0x0000 0x09ae: pmt_pid 0x01cd PRIME -- PRIME View 2 (running)
> Network Name 'PRIME'
> dumping lists (10 services)
> 
--- //root/t/linuxtv-dvb-1.1.1/build-2.6/mt352.c	2004-06-07 19:02:48.000000000 +1000
+++ mt352.c	2004-06-07 19:42:50.000000000 +1000
@@ -180,16 +180,16 @@
 
 	switch (op->code_rate_HP) {
 		case FEC_2_3:
-			tps |= (1 << 9);
+			tps |= (1 << 7);
 			break;
 		case FEC_3_4:
-			tps |= (2 << 9);
+			tps |= (2 << 7);
 			break;
 		case FEC_5_6:
-			tps |= (3 << 9);
+			tps |= (3 << 7);
 			break;
 		case FEC_7_8:
-			tps |= (4 << 9);
+			tps |= (4 << 7);
 			break;
 		case FEC_AUTO:
 			break;
@@ -199,16 +199,16 @@
 
 	switch (op->code_rate_LP) {
 		case FEC_2_3:
-			tps |= (1 << 6);
+			tps |= (1 << 4);
 			break;
 		case FEC_3_4:
-			tps |= (2 << 6);
+			tps |= (2 << 4);
 			break;
 		case FEC_5_6:
-			tps |= (3 << 6);
+			tps |= (3 << 4);
 			break;
 		case FEC_7_8:
-			tps |= (4 << 6);
+			tps |= (4 << 4);
 			break;
 		case FEC_AUTO:
 			break;
@@ -218,10 +218,10 @@
 
 	switch (op->constellation) {
 		case QAM_16:
-			tps |= (1 << 14);
+			tps |= (1 << 13);
 			break;
 		case QAM_64:
-			tps |= (2 << 14);
+			tps |= (2 << 13);
 			break;
 		default:
 			;
@@ -229,7 +229,7 @@
 
 	switch (op->transmission_mode) {
 		case TRANSMISSION_MODE_8K:
-			tps |= (1 << 1);
+			tps |= (1 << 0);
 			break;
 		default:
 			;
@@ -237,13 +237,13 @@
 
 	switch (op->guard_interval) {
 		case GUARD_INTERVAL_1_16:
-			tps |= (1 << 3);
+			tps |= (1 << 2);
 			break;
 		case GUARD_INTERVAL_1_8:
-			tps |= (2 << 3);
+			tps |= (2 << 2);
 			break;
 		case GUARD_INTERVAL_1_4:
-			tps |= (3 << 3);
+			tps |= (3 << 2);
 			break;
 		default:
 			;
@@ -251,13 +251,13 @@
 	
 	switch (op->hierarchy_information) {
 		case HIERARCHY_1:
-			tps |= (1 << 12);
+			tps |= (1 << 10);
 			break;
 		case HIERARCHY_2:
-			tps |= (2 << 12);
+			tps |= (2 << 10);
 			break;
 		case HIERARCHY_4:
-			tps |= (3 << 12);
+			tps |= (3 << 10);
 			break;
 		default:
 			;
@@ -269,7 +269,7 @@
 	buf[1] = msb(tps);      /* TPS_GIVEN_(1|0) */
 	buf[2] = lsb(tps);
 
-//      buf[3] = 0xf3;  /* ACQ_CTL, force parameters, automatic spectral inv */
+// 	buf[3] = 0xf3;  /* ACQ_CTL, force parameters, automatic spectral inv */
 	buf[3] = 0x50;  /* ACQ_CTL, fully automatic parameter search */
 
 	/**

Home | Main Index | Thread Index