From: Gianluca Gennari <gennarone@gmail.com>
To: linux-media@vger.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Subject: Re: [PATCH 1/1] xc3028: fix center frequency calculation for DTV78 firmware
Date: Thu, 08 Dec 2011 14:00:04 +0100 [thread overview]
Message-ID: <4EE0B4D4.2020909@gmail.com> (raw)
In-Reply-To: <4EE0B419.3070604@gmail.com>
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(-)
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@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
--
1.7.0.4
next prev parent reply other threads:[~2011-12-08 13:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-08 12:56 [PATCH 0/1] xc3028: fix center frequency calculation for DTV78 firmware Gianluca Gennari
2011-12-08 13:00 ` Gianluca Gennari [this message]
2011-12-10 14:51 ` Mauro Carvalho Chehab
2011-12-10 18:01 ` Gianluca Gennari
2011-12-11 14:15 ` Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EE0B4D4.2020909@gmail.com \
--to=gennarone@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.