bttv-0.9.3: a bug in set_pll () or my mistake?

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



Hello!

I have experienced problems with setting TV norm with bttv-0.9.3

I'm trying to set V4L2_STD_PAL norm, and it cannot be set - and no
"PLL: xxxx -> yyyy" message arrived.

bttv-0.9.1 is ok.

The following snippet does nothing except printk-ing
"bttv0: PLL: no change required":

v4l2_std_id newstd;
newstd = V4L2_STD_PAL;
ioctl (grabberdev, VIDIOC_S_STD, &newstd);

I think, a problem is in the following:

-----------------------------------------------------
static int set_pll(struct bttv *btv)
{
  ...

  if (btv->pll.pll_ofreq == btv->pll.pll_current) {
          dprintk("bttv%d: PLL: no change required\n",btv->nr);
          return 0;
  }

  ...

  ...

  ...

                    btv->pll.pll_current = btv->pll.pll_ofreq;
  ...
-----------------------------------------------------

This "if" will always be true, because after the driver loading, 
pll_current initialized to 0, and pll_ofreq is 0 too (because we are not 
changed video standard yet). And because pll_current is not changed (it 
changes only at the bottom of set_pll ()).

Proposed fix: initialize pll_current to, say, (-1) at the driver loading 
time.


What I do wrong?
Is it really a bug, or it's my mistake in something?

-- 
Andrey Vasilyev

PS. Sorry for my bad english





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux