[linux-dvb] Mantis driver: making cu1216.ko work for me

Marko Ristola marko.ristola at kolumbus.fi
Sat Feb 24 19:51:02 CET 2007

Hi Manu,

I attached a minimal patch against mantis.tar.bz2.
It contains changes into cu1216.c.
Those changes enable dvb_core.c heuristics
so that both inversion=0 and inversion=1 work.

I didn't have to insert the get_tune_settings() function
that informs dvb_core.c about the 50ms delay.
cu1216.c works for me without that now.
I didn't have to fix the negative return value issue either:
no function seems to check the return value
of cu1216_set_parameters() anymore.

File cu1216_no_inversion_heuristics.patch
contains changes without fixing indentation.

File cu1216_no_inversion_heuristics_final.patch
contains same changes, but with fixing the indentation.

Without the patch, cu1216.c is stuck with inversion=0 :
it never tries inversion=1.

With me the fixed version works nicely:
Initially dvb_core.c tries with automatic mode inversion=0.
That fails for me and then dvb_core.c tries inversion=1.
That's successful for me.

When I switch into another frequency, dvb_core.c tries first inversion=1.
Thus it remembered the previous successfull inversion.

Thus I'd like to have Kaffeine inform dvb_core.c about using inversion=1 
That way I would save over two seconds for the first channel.


Manu Abraham kirjoitti:
> On 2/22/07, Marko Ristola <marko.ristola at kolumbus.fi> wrote:
>> Manu Abraham wrote:
>> > Can you check whether this one exists in there ? I do remember pulling
>> > in a 50mS delay for the CU1216 after your comment, but the others i
>> > would appreciate if you can take a look as to whether it needs
>> > changes.
>> >
>> Unfortunately cu1216.c doesn't yet have a get_tune_settings() function.
>> I noticed, that the function has been implemented on many other
>> dvb/frontend/?.c files though.
>> I noticed that li_oldIq and li_Iq heuristics is still in cu1216.c.
>> It didn't work for me. My fix was to remove the inversion heuristics
>> completely from cu1216_set_parameters().
>> Instead it used the value from fepriv->inversion.
> Ok.
>> That's the way to use dvb_core.c's own inversion heuristics.
>> The "set gain" heuristics works mostly in cu1216_set_parameters().
>> I moved uc_Gain and uc_oldGain as local parameters for
>> cu1216_set_parameters().
>> I think that global parameters aren't needed for them.
> Ok
> Thanks.
> Manu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cu1216_no_inversion_heuristics.patch
Type: text/x-patch
Size: 2145 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20070224/f05d1036/cu1216_no_inversion_heuristics.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cu1216_no_inversion_heuristics_final.patch
Type: text/x-patch
Size: 2477 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20070224/f05d1036/cu1216_no_inversion_heuristics_final.bin

More information about the linux-dvb mailing list