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 07:39:18 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:04:01 -0500
commit897b842296f1285a6b58e9170f7017022e2e2603 (patch)
tree9022cc9d3215dc562dc2d702d7a521c6f961db11 /drivers/media/video/tuner-xc2028.c
parent9ca01e780f8966a7a94f88ef5c54f340e117abea (diff)
V4L/DVB (6854): xc2028: be more specific about when applying offset for 7MHz channels
We have been inserting a mystery 500kHz offset for tuning 7MHz channels, however some experimentation reveals it is only needed under certain conditions with specific firmware combinations. Document these and only apply the offset when we know it is required. 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.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/media/video/tuner-xc2028.c b/drivers/media/video/tuner-xc2028.c
index a6b05dfd6703..63a6fca1f8cf 100644
--- a/drivers/media/video/tuner-xc2028.c
+++ b/drivers/media/video/tuner-xc2028.c
@@ -875,7 +875,16 @@ static int generic_set_freq(struct dvb_frontend *fe, u32 freq /* in HZ */,
875 rc = send_seq(priv, {0x00, 0x00}); 875 rc = send_seq(priv, {0x00, 0x00});
876 } else { 876 } else {
877 offset = 2750000; 877 offset = 2750000;
878 if (priv->cur_fw.type & DTV7) 878 /*
879 * We must adjust the offset by 500kHz in two cases in order
880 * to correctly center the IF output:
881 * 1) When the ZARLINK456 or DIBCOM52 tables were explicitly
882 * selected and a 7MHz channel is tuned;
883 * 2) When tuning a VHF channel with DTV78 firmware.
884 */
885 if (((priv->cur_fw.type & DTV7) &&
886 (priv->cur_fw.scode_table & (ZARLINK456 | DIBCOM52))) ||
887 ((priv->cur_fw.type & DTV78) && freq < 470000000))
879 offset -= 500000; 888 offset -= 500000;
880 } 889 }
881 890