[PATCH] cx24116 DVB-S modulation fix

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

 



Hi,

This patch makes cx24116 to behave like other dvb-s frontends.
This is needed especially because QAM_AUTO is used in a lot of scan files.


-- 
Christophe Thommeret
diff -r 6b6e9be35963 linux/drivers/media/dvb/frontends/cx24116.c
--- a/linux/drivers/media/dvb/frontends/cx24116.c	Mon Oct 13 18:35:50 2008 -0400
+++ b/linux/drivers/media/dvb/frontends/cx24116.c	Tue Oct 14 11:20:57 2008 +0200
@@ -1230,23 +1230,14 @@ static int cx24116_set_frontend(struct d
 	case SYS_DVBS:
 		dprintk("%s: DVB-S delivery system selected\n", __func__);
 
-		/* Only QPSK is supported for DVB-S */
-		if (c->modulation != QPSK) {
-			dprintk("%s: unsupported modulation selected (%d)\n",
-				__func__, c->modulation);
-			return -EOPNOTSUPP;
-		}
+		/* Only QPSK is supported for DVB-S,then .. */
+		state->dnxt.modulation = QPSK;
 
 		/* Pilot doesn't exist in DVB-S, turn bit off */
 		state->dnxt.pilot_val = CX24116_PILOT_OFF;
 		retune = 1;
 
-		/* DVB-S only supports 0.35 */
-		if (c->rolloff != ROLLOFF_35) {
-			dprintk("%s: unsupported rolloff selected (%d)\n",
-				__func__, c->rolloff);
-			return -EOPNOTSUPP;
-		}
+		/* DVB-S only supports 0.35, then .. */
 		state->dnxt.rolloff_val = CX24116_ROLLOFF_035;
 		break;
 
@@ -1262,6 +1253,7 @@ static int cx24116_set_frontend(struct d
 				__func__, c->modulation);
 			return -EOPNOTSUPP;
 		}
+		state->dnxt.modulation = c->modulation;
 
 		switch (c->pilot) {
 		case PILOT_AUTO:	/* Not supported but emulated */
@@ -1301,7 +1293,6 @@ static int cx24116_set_frontend(struct d
 			__func__, c->delivery_system);
 		return -EOPNOTSUPP;
 	}
-	state->dnxt.modulation = c->modulation;
 	state->dnxt.frequency = c->frequency;
 	state->dnxt.pilot = c->pilot;
 	state->dnxt.rolloff = c->rolloff;
@@ -1311,7 +1302,7 @@ static int cx24116_set_frontend(struct d
 		return ret;
 
 	/* FEC_NONE/AUTO for DVB-S2 is not supported and detected here */
-	ret = cx24116_set_fec(state, c->modulation, c->fec_inner);
+	ret = cx24116_set_fec(state, state->dnxt.modulation, c->fec_inner);
 	if (ret !=  0)
 		return ret;
 
_______________________________________________
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