All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antti Palosaari <crope@iki.fi>
To: gennarone@gmail.com
Cc: linux-media@vger.kernel.org, m@bues.ch, hfvogt@gmx.net,
	mchehab@redhat.com
Subject: Re: [PATCH 3/5] tda18218: fix IF frequency for 7MHz bandwidth channels
Date: Wed, 04 Apr 2012 16:27:25 +0300	[thread overview]
Message-ID: <4F7C4C3D.1090702@iki.fi> (raw)
In-Reply-To: <4F7C4963.2060100@gmail.com>

On 04.04.2012 16:15, Gianluca Gennari wrote:
> Il 03/04/2012 12:19, Antti Palosaari ha scritto:
>> On 03.04.2012 03:44, Gianluca Gennari wrote:
>>> Il 03/04/2012 00:40, Antti Palosaari ha scritto:
>>>> On 03.04.2012 00:25, Gianluca Gennari wrote:
>>>>> This is necessary to tune VHF channels with the AVerMedia A835 stick.
>>>>>
>>>>> Signed-off-by: Gianluca Gennari<gennarone@gmail.com>
>>>>> ---
>>>>>     drivers/media/common/tuners/tda18218.c |    2 +-
>>>>>     1 files changed, 1 insertions(+), 1 deletions(-)
>>>>>
>>>>> diff --git a/drivers/media/common/tuners/tda18218.c
>>>>> b/drivers/media/common/tuners/tda18218.c
>>>>> index dfb3a83..b079696 100644
>>>>> --- a/drivers/media/common/tuners/tda18218.c
>>>>> +++ b/drivers/media/common/tuners/tda18218.c
>>>>> @@ -144,7 +144,7 @@ static int tda18218_set_params(struct dvb_frontend
>>>>> *fe)
>>>>>             priv->if_frequency = 3000000;
>>>>>         } else if (bw<= 7000000) {
>>>>>             LP_Fc = 1;
>>>>> -        priv->if_frequency = 3500000;
>>>>> +        priv->if_frequency = 4000000;
>>>>>         } else {
>>>>>             LP_Fc = 2;
>>>>>             priv->if_frequency = 4000000;
>>>>
>>>> Kwaak, I will not apply that until I have done background checking. That
>>>> driver is used only by AF9015 currently. And I did that driver as
>>>> reverse-engineering and thus there is some things guessed. I have only 8
>>>> MHz wide signal, thus I never tested 7 and 6 MHz. Have no DVB-T
>>>> modulator either... Maybe some AF9015 user can confirm? Is there any
>>>> AF9015&   TDA18218 bug reports seen in discussion forums...
>>>
>>> A friend has a AF9015+TDA18218 stick and told me that it works fine with
>>> the patch (including VHF), but to be safe I will ask him to double check
>>> with the current media_build tree, with and without the patch. In the
>>> worst case, we can add a new parameter (or an array of parameters) for
>>> the IF frequency to struct tda18218_config.
>>
>> Public short datasheet [1], page 16, says default IFs are BW=8 MHz IF=4
>> MHz, BW=7 MHz IF=3.5 MHz, BW=6 MHz IF=3 MHz. I suspect it still locks in
>> some cases even IF is off-by 0.5 MHz for BW 7 and 8 but performance is
>> reduced. So there is now something wrong, likely bug in the tda18218
>> driver.
>>
>> Could someone send me Windows sniff from success tune to 7 MHz BW channel?
>>
>> [1] http://www.nxp.com/documents/data_sheet/TDA18218HN.pdf
>
> Hi Antti,
> I did some testing with the A835 and the findings are interesting. With
> the old tda18218 driver the af9015 sticks required IF=3.5MHz to tune VHF
> channels, while the A835 required IF=4MHz.
>
> With the current driver, both the af9015 and the A835 are much more
> tolerant to IF frequency variations.
> In particular, the A835 is capable to successfully tune UHF channels
> with IF in the range [3.5,5.5] MHz, and VHF channels with IF in the
> range [3.0,6.5] MHz, inclusive.

IF frequency is frequency used between tuner and demodulator. Thus it 
should be same for the tuner, it is sender Tx, and for demodulator which 
receives it. As you can guess it is like radio channel, it will work if 
it is a little bit wrong but performance will be reduced.

IF frequency is generally more tuner characteristic than demodulator. I 
mean it is likely tuner decides which is optimal IF for signal tuner is 
transferring to demod. Earlier we used configuration option for both 
tuner and demod to set IF. But as the fact is tuner must know it always 
we added new tuner callback .get_if_frequency() demodulator can ask used 
IF from the tuner.

Recently I converted AF9013 driver to use that .get_if_frequency(). I 
think at that point I may have introduced some bug.

And one point to mention, it is sometimes used a little bit different 
IFs that are tuner defaults. It is somehow device design specific, for 
maximum performance device engineers will ran some test to find out 
optimal IF which gives best performance. One reason could be example 
there is RF noise peak (RF spurs) just in used IF which reduces 
performance => lets shift default IF a little bit for maximum performance.

> I don't know if this may be considered the symptom of a bug, but for
> sure the patch I posted is useless with the current driver.
> If you are still interested in a USB sniff of the Windows driver, just
> let me know.

I have used old SniffUSB2.0
http://www.pcausa.com/Utilities/UsbSnoop/
Works fine with Windows XP. Sniff is welcome.

regards
Antti
-- 
http://palosaari.fi/

  reply	other threads:[~2012-04-04 13:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-02 21:25 [PATCH 0/5] af9035: support for tda18218 tuner, new USB IDs and more Gianluca Gennari
2012-04-02 21:25 ` [PATCH 1/5] af9035: add USB id for 07ca:a867 Gianluca Gennari
2012-04-02 22:32   ` Antti Palosaari
2012-04-02 21:25 ` [PATCH 2/5] af9035: add support for the tda18218 tuner Gianluca Gennari
2012-04-02 22:33   ` Antti Palosaari
2012-04-02 21:25 ` [PATCH 3/5] tda18218: fix IF frequency for 7MHz bandwidth channels Gianluca Gennari
2012-04-02 22:40   ` Antti Palosaari
2012-04-03  0:44     ` Gianluca Gennari
2012-04-03  7:18       ` poma
2012-04-03 10:19       ` Antti Palosaari
2012-04-03 16:03         ` Gianluca Gennari
2012-04-04 13:15         ` Gianluca Gennari
2012-04-04 13:27           ` Antti Palosaari [this message]
2012-04-06 10:40             ` Gianluca Gennari
2012-04-02 21:25 ` [PATCH 4/5] af9035: fix warning Gianluca Gennari
2012-04-02 22:41   ` Antti Palosaari
2012-04-02 21:25 ` [PATCH 5/5] af9035: use module_usb_driver macro Gianluca Gennari
2012-04-02 22:42   ` Antti Palosaari
2012-04-06 20:19 ` Re : [PATCH 0/5] af9035: support for tda18218 tuner, new USB IDs and more Sril

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=4F7C4C3D.1090702@iki.fi \
    --to=crope@iki.fi \
    --cc=gennarone@gmail.com \
    --cc=hfvogt@gmx.net \
    --cc=linux-media@vger.kernel.org \
    --cc=m@bues.ch \
    --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.