V4L/DVB (6854): xc2028: be more specific about when applying offset for 7MHz channels
authorChris Pascoe <c.pascoe@itee.uq.edu.au>
Sun, 2 Dec 2007 12:39:18 +0000 (09:39 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 25 Jan 2008 21:04:01 +0000 (19:04 -0200)
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>
drivers/media/video/tuner-xc2028.c

index a6b05dfd670327ffc1e00e2c7b27e80738b49000..63a6fca1f8cfb91bdc4157f10a785577fcc30283 100644 (file)
@@ -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;
        }
 
This page took 0.042994 seconds and 5 git commands to generate.