Mailing List archive

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

[linux-dvb] Re: [PATCH] Resolve tuning problem on WinTV NEXUS-CA



On Wednesday 05 January 2005 05:50, Andrew de Quincey wrote:
> Do you know where it was failing? i.e. was the wait-for-partial-convergence
> loop timing out, or was it the wait-for-full-convergence loop which
> immediately follows it?
>
> Did you try putting the msleep() after the wait-for-partial-convergence -
> maybe it needs a delay between that and the wait-for-full-convergence loop?

I did a few more testings and I now know why the previous patch worked. The 
increased sleep time always caused a timeout and resulted in a 'goto 
timeout'. The remaining code in this function was never executed.

It seems like the saving of the frequency offset at the end of the function 
causes problems. With the following patch, everythings works fine for me:

--- stv0297.c.orig      2005-01-05 21:18:52.285854064 +0100
+++ stv0297.c   2005-01-05 21:21:52.046526288 +0100
@@ -507,7 +507,6 @@
        int delay;
        int sweeprate;
        int carrieroffset;
-       int freq_off;
        unsigned long starttime;
        unsigned long timeout;
        fe_spectral_inversion_t inversion;
@@ -695,11 +694,6 @@

        /* success!! */
        stv0297_writereg_mask(state, 0x5a, 0x40, 0x00);
-       freq_off = stv0297_get_carrieroffset(state);
-       if (freq_off < 0)
-               freq_off = -freq_off;
-       if (freq_off <= 1500)
-               state->freq_off = freq_off;
        state->base_freq = p->frequency;
        return 0;

I guess the code is there for a reason,  but it seems to be the cause of my 
problems.

Markus




Home | Main Index | Thread Index