[RFC] drivers/media/dvb/dvb-usb/pctv452e.c does not work in latest media_tree.git

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

 



On Tuesday 24 May 2011 15:59:57 André Weidemann wrote:
> Hi Peter,

> For the time being the S2-3200 and related cards do not seem to work.
>  From my understanding this patch should have been rolled back, but
> Mauro did not. Feel free to post a message to the linux-media mailing
> list. Maybe someone there knows a bit more...
> 
> Regards
>   André

Hi,

I did some more investigation and found what appears to be close to a fix:

media_tree/drivers/media/dvb/frontends/stb0899_algo.c

There is some automagic frequency guessing which does not work:

        /* timing loop computation & symbol rate optimisation   */
        derot_limit = (internal->sub_range / 2L) / internal->mclk;
        derot_step = (params->srate / 2L) / internal->mclk;
^^^^^ by changing this line to:
+        derot_step = (params->srate / 16L) / internal->mclk;

Things are starting to look better. I'm thinking about using a simple:

derot_freq = ((index * index) - index) * internal->direction;

This gives 127 steps before the maximum is reached.

        while ((stb0899_check_tmg(state) != TIMINGOK) && next_loop) {
                index++;
                derot_freq += index * internal->direction * derot_step; /* 
next derot zig zag position  */

                if (abs(derot_freq) > derot_limit)
                        next_loop--;

                if (next_loop) {
                        STB0899_SETFIELD_VAL(CFRM, cfr[0], MSB(state->config-
>inversion * derot_freq));
                        STB0899_SETFIELD_VAL(CFRL, cfr[1], LSB(state->config-
>inversion * derot_freq));
                        stb0899_write_regs(state, STB0899_CFRM, cfr, 2); /* 
derotator frequency         */
                }
                internal->direction = -internal->direction;     /* Change 
zigzag direction              */
        }

Any comments?

--HPS
--
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