[linux-dvb] DVICO FusionHDTV DVB-T1

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

 



I posted previously to this mailing list about the problems with the 
definition of "struct dvb_pll_desc dvb_pll_lg_z201" in dvb-pll.c, but 
got no response. What do I need to do to get this fix included in cvs? 
It appears the the DVICO Fusion HDTV DVB-T1 is the only card that uses
this tuner definition, and the definition is wrong, so I can't see any
problem in just fixing it.

Can someone with cvs update access please patch the file and commit it
to CVS. I have attached the patch.

Thanks (hopefully) in advance,

Greg Frost

> There have been a number of people reporting success with the DVICO cards and
> the 2.6.12 kernel. Unfortunately, these are people with the Plus card and I
> have the T1 card. The differences are highlighted on this page:
> http://www.fusionhdtv.co.kr/eng/Products/DVBT.aspx in the table at the bottom.
> The principal difference is the tuner. T1=LG-Z201 Plus=Thomson 7579.
> 
> So I went hunting in the kernel code to try to see what was different in the
> tuner area for my patched 2.6.11.7 (using Chris Pascoes patches from
> www.itee.uq.edu.au/~chrisp/Linux-DVB/DVICO/) which works and 2.6.12 which
> doesnt.
> 
> This was a lot harder than I thought it would be because the structure of the
> code has been completely changed, but here's what I found:
> 
> This is the bit of code that controls the lg-z201 tuner in my patched 2.6.11.7
> kernel:
> Code:
> static int lg_z201_pll_set(struct dvb_frontend* fe,
>             struct dvb_frontend_parameters* params, u8* pllbuf)
> {
>    u32 div;
>    unsigned char cp = 0;
>    unsigned char bs = 0;
> 
>    printk ("lg_z201_pll_set %dn", params->frequency);
> 
>    div = (((params->frequency + 83333) * 3) / 500000) + IF_FREQUENCYx6;
> 
>    if (params->frequency < 542000000) cp = 0xbc;
>    else if (params->frequency < 830000000) cp = 0xf4;
>    else cp = 0xfc;
> 
>    if (params->frequency == 0) bs = 0x03;
>    else if (params->frequency < 157500000) bs = 0x01;
>    else if (params->frequency < 443250000) bs = 0x02;
>    else bs = 0x04;
> 
>    pllbuf[0] = 0xC2; /* Note: non-linux standard PLL I2C address */
>    pllbuf[1] = div >> 8;
>    pllbuf[2] = div & 0xff;
>    pllbuf[3] = cp;
>    pllbuf[4] = bs;
> 
>    return 0;
> }
> Notice in particular the cp and bs values and how they vary with frequency.
> 
> I then looked in the 2.6.12 code and found the following in
> drivers/media/dvb/fontends/dvb-pll.c:
> Code:
> struct dvb_pll_desc dvb_pll_lg_z201 = {
>    .name  = "LG z201",
>    .min   = 174000000,
>    .max   = 862000000,
>    .count = 5,
>    .entries = {
>       {          0, 36166667, 166666, 0xbc, 0x03 },
>       {  443250000, 36166667, 166666, 0xbc, 0x01 },
>       {  542000000, 36166667, 166666, 0xbc, 0x02 },
>       {  830000000, 36166667, 166666, 0xf4, 0x02 },
>       {  999999999, 36166667, 166666, 0xfc, 0x02 },
>    },
> };
> EXPORT_SYMBOL(dvb_pll_lg_z201);
> 
> 
> So it looks like the same stuff is represented in a table and there must be
> some
> generic bit of code that uses the info in the table to tune the card. It looks
> like the last two fields are the cp and bs values. Looking at some of the 
> other
> tuners, I established that the values are to be used for frequencies below the
> frequency in the first field.
> 
> Now compare this with the code for the lg_z201 from my working kernel and you
> will see that the numbers don't match. The bs value should only be 0x01 below
> 157500000 and 0x02 below 443250000 and then 0x04 for all other frequencies. I
> modified the 2.6.12 (which I have check is the same as cvs at the moment) code
> as shown below:
> Code:
> struct dvb_pll_desc dvb_pll_lg_z201 = {
>    .name  = "LG z201",
>    .min   = 174000000,
>    .max   = 862000000,
>    .count = 6,
>    .entries = {
>       {          0, 36166667, 166666, 0xbc, 0x03 },
>       {  157500000, 36166667, 166666, 0xbc, 0x01 },
>       {  443250000, 36166667, 166666, 0xbc, 0x02 },
>       {  542000000, 36166667, 166666, 0xbc, 0x04 },
>       {  830000000, 36166667, 166666, 0xf4, 0x04 },
>       {  999999999, 36166667, 166666, 0xfc, 0x04 },
>    },
> };
> EXPORT_SYMBOL(dvb_pll_lg_z201);
> Rebuilt the kernel and everything worked!
> 
> Was this just an oversight from the person who re-structured the code, or is
> there a card using an LG ZX201 that needs to be controlled this way. If it is
> the former, it would be nice to have the change incorporated.
> 
> Greg Frost
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-linux-2.6.12-dvico-dvb-t1.diff
Type: application/x-unknown-application-octet-stream
Size: 966 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20050705/0cc9cf63/patch-linux-2.6.12-dvico-dvb-t1.bin

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

  Powered by Linux