summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tuner-xc2028.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-11-24 11:47:03 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-11-24 11:47:03 -0200
commit278a255e52082d5a44eb20a1457aacbad6e0a044 (patch)
treeeb39ad56579389825f1b9d35020b812cf3440c9a /linux/drivers/media/video/tuner-xc2028.c
parent245236bd3ee9bf9148640f097d6a11a9d4fcb10c (diff)
downloadmediapointer-dvb-s2-278a255e52082d5a44eb20a1457aacbad6e0a044.tar.gz
mediapointer-dvb-s2-278a255e52082d5a44eb20a1457aacbad6e0a044.tar.bz2
Add support for other DTV types
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.c42
1 files changed, 27 insertions, 15 deletions
diff --git a/linux/drivers/media/video/tuner-xc2028.c b/linux/drivers/media/video/tuner-xc2028.c
index c17950e36..03f1f3a0e 100644
--- a/linux/drivers/media/video/tuner-xc2028.c
+++ b/linux/drivers/media/video/tuner-xc2028.c
@@ -934,35 +934,47 @@ static int xc2028_set_params(struct dvb_frontend *fe,
{
struct xc2028_data *priv = fe->tuner_priv;
unsigned int type=0;
- fe_bandwidth_t bw;
+ fe_bandwidth_t bw = BANDWIDTH_8_MHZ;
tuner_dbg("%s called\n", __FUNCTION__);
- /* FIXME: Only OFDM implemented */
- if (fe->ops.info.type != FE_OFDM) {
- tuner_err("DTV type not implemented.\n");
- return -EINVAL;
- }
- bw = p->u.ofdm.bandwidth;
-
- if (bw == BANDWIDTH_7_MHZ || bw == BANDWIDTH_8_MHZ)
- type |= F8MHZ;
-
if (priv->ctrl.d2633)
type |= D2633;
else
type |= D2620;
+ switch(fe->ops.info.type) {
+ case FE_QPSK:
+ break;
+ case FE_OFDM:
+ bw = p->u.ofdm.bandwidth;
+ break;
+ case FE_QAM:
+ bw = BANDWIDTH_6_MHZ;
+ type |= QAM;
+ break;
+ case FE_ATSC:
+ bw = BANDWIDTH_6_MHZ;
+ type |= ATSC| D2633;
+ break;
+ }
+
+ bw = p->u.ofdm.bandwidth;
+
+ /* FIXME:
+ There are two Scodes that will never be selected:
+ DTV78 ZARLINK456, DTV78 DIBCOM52
+ When it should opt for DTV78 instead of DTV7 or DTV8?
+ */
switch (bw) {
case BANDWIDTH_8_MHZ:
- type |= DTV8;
+ type |= DTV8 | F8MHZ;
break;
case BANDWIDTH_7_MHZ:
- type |= DTV7;
+ type |= DTV7 | F8MHZ;
break;
case BANDWIDTH_6_MHZ:
- /* FIXME: Should allow select also ATSC */
- type |= DTV6 | QAM;
+ type |= DTV6 ;
break;
default:
tuner_err("error: bandwidth not supported.\n");