diff options
author | Janne Grunau <j@jannau.net> | 2009-09-01 18:24:08 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-12 11:20:04 -0400 |
commit | f51fad85af7b296b56031747c873c309b24ff77c (patch) | |
tree | 305bd99ffc616a9320ae9826a2e7d8f952566a6b /drivers/media/dvb | |
parent | 01886255ddf440eb21d3388bfc5343c966904d0e (diff) |
V4L/DVB (12686): dvb-core: check supported QAM modulations
Check the modulation in dvb_frontend_check_parameters against
frontend's capabilties for FE_QAM devices.
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_frontend.c | 9 |
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 0cb6c09719f2..d13ebcb0c6b6 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, | |||
838 | } | 838 | } |
839 | } | 839 | } |
840 | 840 | ||
841 | /* check for supported modulation */ | ||
842 | if (fe->ops.info.type == FE_QAM && | ||
843 | (parms->u.qam.modulation > QAM_AUTO || | ||
844 | !((1 << (parms->u.qam.modulation + 10)) & fe->ops.info.caps))) { | ||
845 | printk(KERN_WARNING "DVB: adapter %i frontend %i modulation %u not supported\n", | ||
846 | fe->dvb->num, fe->id, parms->u.qam.modulation); | ||
847 | return -EINVAL; | ||
848 | } | ||
849 | |||
841 | return 0; | 850 | return 0; |
842 | } | 851 | } |
843 | 852 | ||