[linux-audio-user] [OT?] Sound card hardware buffers and other questions

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

 



John Anderson wrote:
> First question: I'm trying to get my head around how sound cards work.
> My Terratec, for instance, has several IO ports. Are there buffers on
> the card itself "behind" those IO ports?

Yes.

> If so, how big would they be?

So big that the card can get the following samples from the computer while the
samples in the buffer are being played.

USB devices use buffers that are bigger than one millisecond because data
packets are sent once per millisecond.  PCI devices usually use about 32 or 64
bytes because the following samples are only a memory access away (though PCI
bus master memory reads are slower than those from the processor).  The AD1848
in PIO mode has a buffer of one sample.

> Second question: I've noticed that with jackd, the lower the period
> size, the more interrupts per second there are from the sound card. This
> is because smaller buffers need to be cleared out more often, right?

Yes.

> So how many interrupts per second would be "too many"?

When the computer uses up too much time handling all those interrupts.
"Too much" is, of course, rather subjective.

> Obviously this isn't a fixed number but would depend on CPU speed, system
> load etc etc. How does one go about finding a good balance between interrupts
> / second and throughput?

Test various settings.


HTH
Clemens

[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux