Mailing List archive

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

[linux-dvb] Re: PCI latency for Aver761 / dvb-bt8xx / FDSR overflows



On Mon, Sep 20, 2004 at 03:37:14PM +0100, Greg Matthews wrote:
> On Mon, 2004-09-20 at 15:01, Hamish Moffatt wrote:
> > I've been increasing the PCI bus latency timer on the bt878 (audio and
> > video sections) gradually to try to kick this problem. I've been running
> > with 166 (= ~5478us) for a while and this still happens. I've just
> > increased it to 192 (~6336us) to see if that helps. 
> 
> Can you explain exactly how you tweak the latency - is this in the BIOS?
> If I can play with this then I can hopefully add some more data to the
> problem.

You can set the latency timer using the setpci command. You want

setpci <device> latency_timer=<value>

<device> is either -d pci_id or -s bus.device.function, whichever way
you want to do it. lspci shows both values.

The latency timer value must be specified in hex to setpci. The value is
in multiples of 30 ns (for a 33 MHz PCI bus). If you run lspci -vv, it
will tell you what the current value is and what the device advertises as
its minimum and maximum.

The BIOS and/or kernel initialises all the devices to 32 initially
regardless of the minimum/maximum. Sometimes the advertised min/max
values are wrong (eg max < min).

The BT878 advertises 4000ns minimum, which is 4000 / 30 = 133.33 or
rounded up, 0x85. So you would use

setpci -d 109e:036e latency_timer=85
setpci -d 109e:0878 latency_timer=85

The BT878 has both audio and video as separate functions, so I set the
latency on both. I don't know for sure which one is being used for DVB
data, but I think I read that it was the audio path.

Those device numbers will be the same on any Aver761 so you can just use
those commands. If you use -s a.b.c notation for setpci, be aware that
the numbers can change if you add other PCI cards or move the card
between slots.

I'm now up to 0xC0 and it's still dying sometimes. I think the high
value I'm using on my other DVB card (non-Aver) might be the problem. I
may try reducing all the values quite a bit to see if that helps.

Also, the BT878 advertises 4000 ns minimum for video and 1000 ns for
audio. However, the DVB data stream doesn't match either of those
categories so I'm not really sure what a minimum workable value is.

Let me know how you go.

Hamish
-- 
Hamish Moffatt VK3SB <hamish@debian.org> <hamish@cloud.net.au>




Home | Main Index | Thread Index