summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-core/dvb_frontend.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/dvb-core/dvb_frontend.c')
-rw-r--r--drivers/media/dvb/dvb-core/dvb_frontend.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index 0cb6c09..d13ebcb 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -838,6 +838,15 @@ static int dvb_frontend_check_parameters(struct dvb_frontend *fe,
}
}
+ /* check for supported modulation */
+ if (fe->ops.info.type == FE_QAM &&
+ (parms->u.qam.modulation > QAM_AUTO ||
+ !((1 << (parms->u.qam.modulation + 10)) & fe->ops.info.caps))) {
+ printk(KERN_WARNING "DVB: adapter %i frontend %i modulation %u not supported\n",
+ fe->dvb->num, fe->id, parms->u.qam.modulation);
+ return -EINVAL;
+ }
+
return 0;
}
OpenPOWER on IntegriCloud