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

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

 



On Sun, Jan 01, 2006, Michael Krufky wrote:
> On 1/1/06, Andreas Oberritter <obi@xxxxxxxxxxx> 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.


Johannes


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

  Powered by Linux