Re: [PATCH 1/1] xc3028: fix center frequency calculation for DTV78 firmware

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 drivers/media/common/tuners/tuner-xc2028.c |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/drivers/media/common/tuners/tuner-xc2028.c
b/drivers/media/common/tuners/tuner-xc2028.c
index e531267..7653aca 100644
--- a/drivers/media/common/tuners/tuner-xc2028.c
+++ 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;

 		/*
 		 * 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@xxxxxxxxxxxxxx>
 		 */

-		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
-- 
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux