aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tuner-xc2028.c
diff options
context:
space:
mode:
authorChris Pascoe <c.pascoe@itee.uq.edu.au>2007-12-02 08:07:06 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:04:01 -0500
commit3dfefc50ff45744ffb97ce0bf9c213a3fb6d5d3d (patch)
treedc96ca91b1a41374b74b2540a518c4d1a644b9bb /drivers/media/video/tuner-xc2028.c
parent897b842296f1285a6b58e9170f7017022e2e2603 (diff)
V4L/DVB (6855): xc2028: select DTV78 firmware if tuning 7MHz VHF / 8MHz UHF
It seems that the DTV78 firmware is intended for use in locations where VHF channels have 7MHz bandwidth and UHF channels have 8MHz bandwidth. If we switch to DTV78 firmware when we detect this condition, we can avoid firmware reloads when switching between VHF and UHF transponders. Place the state for this in the control structure so that card drivers can hint to us to use DTV78 firmware from the first tuning attempt. Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/tuner-xc2028.c')
-rw-r--r--drivers/media/video/tuner-xc2028.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/media/video/tuner-xc2028.c b/drivers/media/video/tuner-xc2028.c
index 63a6fca1f8cf..0565edd224bc 100644
--- a/drivers/media/video/tuner-xc2028.c
+++ b/drivers/media/video/tuner-xc2028.c
@@ -998,20 +998,27 @@ static int xc2028_set_params(struct dvb_frontend *fe,
998 return -EINVAL; 998 return -EINVAL;
999 } 999 }
1000 1000
1001 /* FIXME:
1002 There are two Scodes that will never be selected:
1003 DTV78 ZARLINK456, DTV78 DIBCOM52
1004 When it should opt for DTV78 instead of DTV7 or DTV8?
1005 */
1006 switch (bw) { 1001 switch (bw) {
1007 case BANDWIDTH_8_MHZ: 1002 case BANDWIDTH_8_MHZ:
1008 type |= DTV8 | F8MHZ; 1003 if (p->frequency < 470000000)
1004 priv->ctrl.vhfbw7 = 0;
1005 else
1006 priv->ctrl.uhfbw8 = 1;
1007 type |= (priv->ctrl.vhfbw7 && priv->ctrl.uhfbw8) ? DTV78 : DTV8;
1008 type |= F8MHZ;
1009 break; 1009 break;
1010 case BANDWIDTH_7_MHZ: 1010 case BANDWIDTH_7_MHZ:
1011 type |= DTV7 | F8MHZ; 1011 if (p->frequency < 470000000)
1012 priv->ctrl.vhfbw7 = 1;
1013 else
1014 priv->ctrl.uhfbw8 = 0;
1015 type |= (priv->ctrl.vhfbw7 && priv->ctrl.uhfbw8) ? DTV78 : DTV7;
1016 type |= F8MHZ;
1012 break; 1017 break;
1013 case BANDWIDTH_6_MHZ: 1018 case BANDWIDTH_6_MHZ:
1014 type |= DTV6 ; 1019 type |= DTV6;
1020 priv->ctrl.vhfbw7 = 0;
1021 priv->ctrl.uhfbw8 = 0;
1015 break; 1022 break;
1016 default: 1023 default:
1017 tuner_err("error: bandwidth not supported.\n"); 1024 tuner_err("error: bandwidth not supported.\n");