summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tuner-xc2028.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-11-24 12:07:12 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-11-24 12:07:12 -0200
commit075efef5f74ddd588c8c1e9fdaccf92af8f33602 (patch)
tree288767c2804b361dcc9c29df3ff832630e7e76d7 /linux/drivers/media/video/tuner-xc2028.c
parent278a255e52082d5a44eb20a1457aacbad6e0a044 (diff)
downloadmediapointer-dvb-s2-075efef5f74ddd588c8c1e9fdaccf92af8f33602.tar.gz
mediapointer-dvb-s2-075efef5f74ddd588c8c1e9fdaccf92af8f33602.tar.bz2
Allow selecting the proper SCode table for DTV
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/tuner-xc2028.c')
-rw-r--r--linux/drivers/media/video/tuner-xc2028.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/linux/drivers/media/video/tuner-xc2028.c b/linux/drivers/media/video/tuner-xc2028.c
index 03f1f3a0e..241a7ce0d 100644
--- a/linux/drivers/media/video/tuner-xc2028.c
+++ b/linux/drivers/media/video/tuner-xc2028.c
@@ -929,6 +929,19 @@ static int xc2028_set_analog_freq(struct dvb_frontend *fe,
T_ANALOG_TV, type, p->std);
}
+static unsigned int demod_type [] = {
+ [XC3028_FE_DEFAULT] = 0,
+ [XC3028_FE_LG60] = LG60,
+ [XC3028_FE_ATI638] = ATI638,
+ [XC3028_FE_OREN538] = OREN538,
+ [XC3028_FE_OREN36] = OREN36,
+ [XC3028_FE_TOYOTA388] = TOYOTA388,
+ [XC3028_FE_TOYOTA794] = TOYOTA794,
+ [XC3028_FE_DIBCOM52] = DIBCOM52,
+ [XC3028_FE_ZARLINK456] = ZARLINK456,
+ [XC3028_FE_CHINA] = CHINA,
+};
+
static int xc2028_set_params(struct dvb_frontend *fe,
struct dvb_frontend_parameters *p)
{
@@ -980,6 +993,11 @@ static int xc2028_set_params(struct dvb_frontend *fe,
tuner_err("error: bandwidth not supported.\n");
};
+ if (priv->ctrl.demod < 0 || priv->ctrl.demod > ARRAY_SIZE(demod_type))
+ tuner_err("error: demod type invalid. Assuming default.\n");
+ else
+ type |= demod_type[priv->ctrl.demod];
+
return generic_set_freq(fe, p->frequency,
T_DIGITAL_TV, type, 0);
}