Because I recently
investigated budget DMA issues with the SAA7146A and found that it tends to
not properly fulfill DMA requests - depending on configuration, it can
randomly not transfer Dwords within the data stream (but will advance the
pointer).
The resulting stream can actually look perfectly ok according to the MPEG-2
headers (no continuity count errors), but the actual packet contents will
be corrupted.
Yes, as you probably know this is called "graceful recovery" and makes
perfect sense for video data: if the data cannot be delivered (for
example because the PCI bus is hogged by something else and the FIFOs
overflow) then the saa7146 throws away the data and advances the pointer
until the bus becomes free again.If this is indeed an SAA7146A/budet issue and you're willing to invest some
time into this, you should start by modifying the budget DMA code so that
it pre-initializes each buffer before it is DMA'd to with a certain DWORD
pattern, and after the DMA checks whether the pattern is still found
anywhere in the buffer (of course, any pattern can always appear in the
real data, but a wisely chosen pattern would only show up once in a blue
moon, and you can tell by the frequency whether it is real data or DMA
corruption)..
Good idea. This will show if the system suffers from PCI hogging issues
or not.