[linux-dvb] [PATCH] Add support for DViCO FusionHDTV5 USB Gold

Michael Krufky mkrufky at m1k.net
Sun Jan 1 19:30:34 CET 2006


Johannes Stezenbach wrote:

>On Sun, Jan 01, 2006, Michael Krufky wrote:
>  
>
>>On 1/1/06, Andreas Oberritter <obi at linuxtv.org> wrote:
>>    
>>
>>>On Sat, 2005-12-31 at 18:24 -0500, Michael Krufky wrote:
>>>      
>>>
>>>>+static int cxusb_lgh064f_tuner_attach(struct dvb_usb_device *d)
>>>>+{
>>>>+       u8 bpll[4];
>>>>+       bpll[2] &= ~0x20;
>>>>+       bpll[2] |= 0x18;
>>>>+       bpll[3] = 0x50; /* 0x50 - digital, 0x20 - analog */
>>>>+       d->pll_addr = 0x61;
>>>>+       memcpy(d->pll_init,bpll,4);
>>>>        
>>>>
>>>I don't know what this code shall do, but bpll contains uninitialized
>>>(i.e. random) values.
>>>      
>>>
>>You are correct about that.....   The uninitialized values, in this
>>case, are irrelevant.  The point is that bit 3 must be unset, and bits
>>4 and 5 must be set.  This exact thing is also being done in
>>tuner-core.c, ~ line 214.
>>
>>I COULD just set bpll = { 0x00, 0x00, 0x18, 0x50 } , but I didn't
>>think it was actually necessary, and I wanted the code to look the
>>same as the other code for this tuner.
>>
>>Do I have to make this change?  ...or is it okay as-is?
>>    
>>
>The code _looks_ buggy. Either:
>- u8 bpll[4] = { 0x00, 0x00, 0x18, 0x50 } or
>- u8 bpll[4] = { 0 } plus your code plus /* see tuner-core.c */
>
>And add a space after , in the memcpy(), please.
>
Patrick Boettcher wrote:

> Please do at least
>
> u8 bpll[4] = { 0 };
>
> so that bpll is initialized or
> use d->pll_init directly without bpll. 

Johannes,

Is it okay to use Patrick's second suggestion (use d->pll_init directly 
without bpll), as illustrated in the patch attached?

I like this method best, as it does exactly as what I had originally 
intended.

-Mike

Signed-off-by:  Michael Krufky <mkrufky at m1k.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bpll.patch
Type: text/x-patch
Size: 723 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20060101/5f4e88e4/bpll.bin


More information about the linux-dvb mailing list