From 00ab6c90dc98d2413de98eebf8638f1f38a365af Mon Sep 17 00:00:00 2001 From: Chris Pascoe Date: Sun, 2 Dec 2007 22:39:18 +1000 Subject: xc2028: be more specific about when applying offset for 7MHz channels From: Chris Pascoe 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 --- linux/drivers/media/video/tuner-xc2028.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/video/tuner-xc2028.c b/linux/drivers/media/video/tuner-xc2028.c index 819cf2e5d..71756cabf 100644 --- a/linux/drivers/media/video/tuner-xc2028.c +++ b/linux/drivers/media/video/tuner-xc2028.c @@ -890,7 +890,16 @@ static int generic_set_freq(struct dvb_frontend *fe, u32 freq /* in HZ */, rc = send_seq(priv, {0x00, 0x00}); } else { offset = 2750000; - if (priv->cur_fw.type & DTV7) + /* + * We must adjust the offset by 500kHz in two cases in order + * to correctly center the IF output: + * 1) When the ZARLINK456 or DIBCOM52 tables were explicitly + * selected and a 7MHz channel is tuned; + * 2) When tuning a VHF channel with DTV78 firmware. + */ + if (((priv->cur_fw.type & DTV7) && + (priv->cur_fw.scode_table & (ZARLINK456 | DIBCOM52))) || + ((priv->cur_fw.type & DTV78) && freq < 470000000)) offset -= 500000; } -- cgit v1.2.3