aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 a6b05dfd670..63a6fca1f8c 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 */,
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;
}