[PATCH RFC] [media] dvb: remove bogus modulation check

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

 



This code is wrong as I should have coded it as SYS_DVBC, instead of
SYS_DVBS & friends. Anyway, this check has other problems

1) it does some "magic" by assuming that all QAM modulations are below
  QAM_AUTO;

2) it checks modulation parameters only for one delivery system.
   Or the core should check invalid parameters for all delivery
   systems, or it should let the frontend drivers do it;

3) frontend drivers should already be checking for invalid parameters
   (most of them do it, anyway);

4) not all modulations are mapped at fe->ops.info.caps, so it is not
   even possible to check for the valid modulations inside the core
   for some delivery systems;

5) The core check is incomplete anyway: it only checks for a few
   parameters. If moved into the core other parameters like bandwidth
   and fec should also be checked;

6) 2nd gen DVB-C uses OFDM. So, that test would fail for it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
---
 drivers/media/dvb/dvb-core/dvb_frontend.c |   23 -----------------------
 1 files changed, 0 insertions(+), 23 deletions(-)

diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index 0e079a1..a904793 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -897,29 +897,6 @@ static int dvb_frontend_check_parameters(struct dvb_frontend *fe)
 		break;
 	}
 
-	/*
-	 * check for supported modulation
-	 *
-	 * This is currently hacky. Also, it only works for DVB-S & friends,
-	 * and not all modulations has FE_CAN flags
-	 */
-	switch (c->delivery_system) {
-	case SYS_DVBS:
-	case SYS_DVBS2:
-	case SYS_TURBO:
-		if ((c->modulation > QAM_AUTO ||
-		    !((1 << (c->modulation + 10)) & fe->ops.info.caps))) {
-			printk(KERN_WARNING
-			       "DVB: adapter %i frontend %i modulation %u not supported\n",
-			       fe->dvb->num, fe->id, c->modulation);
-			return -EINVAL;
-		}
-		break;
-	default:
-		/* FIXME: it makes sense to validate othere delsys here */
-		break;
-	}
-
 	return 0;
 }
 
-- 
1.7.7.5

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux