Re: [BUG]: unitialized buf sent over i2c

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

 



On Wed, 12 Jul 2006, Mac Michaels wrote:
> The original code written for analog mode was designed to
> tune quickly by increasing the pump current then switch
> back to the more stable current value after the signal was
> acquired. This makes switching channels that are far apart

I think there is some confusion here.  It sounds like you are talking about
this code in tuner-simple.c, default_set_tv_freq():
        case TUNER_MICROTUNE_4042FI5:
                /* Set the charge pump for fast tuning */
                config |= TUNER_CHARGE_PUMP;

And then there is more code a bit later in the same function to poll the
PLL and turn the charge pump to low current after it locks.

** This is totally different code that was being discussed. **

What was being discussed was code in tuner-core.c, set_type().  This code
changes the "Aux Byte" that effects the AGC take-over-point.  Totally
different than the charge pump current.

The set_type() function has never had an existing PLL message to modify.
It's called on module load to set the tuner type, not to actually tune to
something, so having a message wouldn't even make sense.  What would the
message be?

There is very very similar code in the dvb-pll version that does the same
thing, except it is called via the function that does tuning.  It works
correctly because it takes the tuning command and modifies it to set the
aux byte.  It does this on every tune, not just on module load.

It's clear what happened.  The working dvb code was cut&pasted into the v4l
tuner driver, but put in the wrong function, and not adjusted to work
properly in this new spot (thus the use of uninitialized data).

So, there is some code in the v4l tuner driver that writes a few random
bytes to the PLL when the module loads, which doesn't actually do much of
anything to the PLL.  Just remove it.  Put something to set the aux byte on
every tune call, like the dvb code does, if you want to be totally correct.
But it's not necessary, as the tuner has been working fine all this time
without it.

_______________________________________________

linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux