Re: audio/PCI/mmap oddity (again)

David Olofson (audiality@swipnet.se)
Sun, 25 Jul 1999 20:53:15 +0200


Paul Barton-Davis wrote:
>
> one other interesting note about this problem. it only occurs when the
> PCI soundcard is writing 16-bit samples to the ADC buffer, never when
> its writing 8-bit samples.
>
> i have no idea what this could mean. oh, and the frequency is much
> larger than i said last time - more like 10-20 times in 512 patterns.
>
> --p

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...

Pretty much the same kind of phenomena as video tearing, or interprocess
communication sync problems.

//David

-
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/