[1/1] xc3028: fix center frequency calculation for DTV78 firmware
Commit Message
Updated center frequency calculation to fix VHF band reception
with firmware DTV78.
The adjustment for DTV78 is not needed anymore with new
firmwares, since the offset is not depending anymore on the
bandwidth or the firmware version (at least for DTV7, DTV8, DTV78).
Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
---
drivers/media/common/tuners/tuner-xc2028.c | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
* xc3028 additional "magic"
@@ -979,17 +985,13 @@ static int generic_set_freq(struct dvb_frontend
*fe, u32 freq /* in HZ */,
* newer firmwares
*/
-#if 1
/*
* The proper adjustment would be to do it at s-code table.
* However, this didn't work, as reported by
* Robert Lowery <rglowery@exemail.com.au>
*/
- if (priv->cur_fw.type & DTV7)
- offset += 500000;
-
-#else
+#if 0
/*
* Still need tests for XC3028L (firmware 3.2 or upper)
* So, for now, let's just comment the per-firmware
b/drivers/media/common/tuners/tuner-xc2028.c
@@ -962,14 +962,20 @@ static int generic_set_freq(struct dvb_frontend
*fe, u32 freq /* in HZ */,
* For DTV 7/8, the firmware uses BW = 8000, so it needs a
* further adjustment to get the frequency center on VHF
*/
+
+ /*
+ * The center frequency formula above seems no more correct.
+ * The adjustment for DTV78 is not needed anymore with new
+ * firmwares, since the offset is not depending anymore on the
+ * bandwidth or the firmware version (at least for DTV78).
+ * This is probably a consequence of the SCODE table adjustments
+ * mentioned in the comment below.
+ */
+
if (priv->cur_fw.type & DTV6)
offset = 1750000;
- else if (priv->cur_fw.type & DTV7)
- offset = 2250000;
- else /* DTV8 or DTV78 */
+ else /* DTV7 or DTV8 or DTV78 */
offset = 2750000;
- if ((priv->cur_fw.type & DTV78) && freq < 470000000)
- offset -= 500000;
/*