Re: audio/PCI/mmap oddity (again)

Paul Barton-Davis (pbd@Op.Net)
Sun, 25 Jul 1999 15:55:16 -0400


>PCI cards usually use busmaster DMA, and do transfers in bursts. (es1370
>for example: always 32 bytes/burst. Cards with real DSPs like the TB
>MultiSound "Hurricane architecture" series, are usually fully
>programmable from the driver.)
>
>If the distance between the patterns is less than the buffer size; this
>will happen every now and then:
>
>1. You read pattern n. Not overwritten.
>2. DMA burst overwrites pattern n AND pattern (n + 1).
>3. You read pattern (n + 1), which has now been overwritten...
>

this sounds close, but not quite.

first, it doesn't matter what the distance between the patterns is -
8, 16, 32, 128, 512, 2048 byte distances all suffer from the same
problem.

second, the *odd* part is that your point (2) is exactly what is *not*
happening (i had coded for that situation). that is, we end up with
pattern n *NOT* overwritten and pattern (n+1) overwritten.

finally, the fact that using an 8bit sample size eliminates the
problem seems to suggest that the DMA burst size is not it.

did i get something wrong ?

--p

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/