[alsa-devel] [RFC] AVB - network-based soundcards in ALSA

Clemens Ladisch clemens at ladisch.de
Tue May 27 15:47:40 CEST 2014

Henrik Austad wrote:
> [...]
> As to moving samples from the buffer onto the network, one approach would
> be to wrap a set of samples and place it into a ready frame with headers
> and bits set and leave it in a buffer for the network layer to pick up.
> The exact method here is not clear to me yet, I need to experiment, and
> probably send something off to the networking guys. But before I do that,
> I'd like to have a reasonable sane idea of how ALSA should handle this.

ALSA expects that the sound card hardware fetches samples whenever it
needs them.

For USB and FireWire, there is a short queue of packets; the driver
appends new packets whenever a bunch of older packets has been completed
(as reported by an interrupt).

(This queue is separate from the ALSA ring buffer, which is then never
accessed directly by hardware.)

> The process of evening out the rate of samples is what traffic shaping and
> stream reservation will help you do (or enforce, ymmv), to some extent at
> least. The credit based shaper algorithm is designed to force bursty
> traffic into a steady stream.

In the case of USB and FireWire, the hardware already knows to send
isochronous packets at a rate of 8 kHz.

A 'normal' NIC wouldn't be able to do this.  Are there NICs that have
a separate queue for isochronous packets?  Or how else can this be


More information about the Alsa-devel mailing list