Mailing List archive

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

[linux-dvb] Re: Pinnacle PCTV



Hello Michael,

On Thu, Aug 29, 2002 at 11:09:11AM +0200, Michael Rickmann wrote:
> Hello Peter,
> I am new here, just subscribed. I came here because of difficulties with the 
> Pinnacle software under W2k on my early Athlon-700MHz. For linux and your 
> PCTV-Sat driver I am using a self-compiled 2.4.18 kernel and otherwise 
> SuSE-8.0.
The problem you describe next, does it give you problems while viewing DVB
video, or is this a question of general interest?

> For me the value in bt->writebuf as it is given to the tasklet appears not 
> very reliable. When I insert something like
Well, it is not intended to. The writebuf is updated asynchronously by the
ISR (interrupt service routine) when the DMA crosses over into the next
write buffer. The tasklet is scheduled. Until the time the tasklet actually
runs, another interrupt and hence another update of the buffer may have
happened. The tasklet is intended to handle as many DMA buffers at a time as
are available by the time it is invoked.
There are by default four buffers. Two of them are reserved for the DMA
engine (writebuf and writebuf+1), the other are available for reading.
Thus, the tasklet may have to handle 0, 1 or 2 buffers at a time (maybe 3
under very special circumstances, but never 4.)

> 
> --------------------------
>    static int next_writebuf = 0;
> ..
>    cp_writebuf = bt->writebuf;			// on the fly copy of bt->writebuf
>    if (cp_writebuf != next_writebuf)
>    {
>       printk("pctv debug: tasklet: writebuf %d, expected %d, read %d\n", 
> cp_writebuf, next_writebuf, bt->readbuf);
>       bt->readbuf = cp_writebuf;
>       bt->readptr = 0;
>       next_writebuf = (cp_writebuf + 1) % bt->nbuffers;
>       return;
>    }
>    next_writebuf = (cp_writebuf + 1) % bt->nbuffers;
> --------------------------
> 
> into the tasklet everything looks fine for the first 30 to 45 sec. But then 
> things become congested somehow and I get discontinuities in the writebuf, 
> mostly by 1. This is independent from the kind of spinlocks. I use dvbstream 
> to write to a file or to /dev/nul.
> Do you think that this is a feature of the driver or a peculiarity of my 
> system?
If it does not create a problem, it is a feature, decoupling the software
demuxer from the ISR. If it does, it is probably as bug.

> Regards
> Michael Rickmann

Regards,
Peter
-- 
"Only wimps use tape backup: _real_ men just upload their important stuff
on ftp, and let the rest of the world mirror it ;)"
(Linus Torvalds, about his failing hard drive on linux.cs.helsinki.fi)


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index