On Mar 05 Takashi Sakamoto wrote:
This commit enables ALSA dice driver to handle whole available streams.
In Dice, certain registers represent the number of available streams at current sampling transfer frequency for both directions. The parameters of each stream are represented in a block of register. This block is aligned sequentially. These streams start simultaneously by writing enable bit to a register.
This commit operates these registers when starting/stopping streams. I note that this driver fails to handle dice units in which several streams are available while IEEE 1394 host controllers support fewer isochronous contexts.
Regarding support by host controllers:
OHCI-1394 mandates that host controllers implement at least 4 isochronous RX DMAs and at least 4 isochronous TX DMAs. None of the OHCI controllers that ever came to market violate this requirement as far as I know.
So if you have just a single audio device on the bus, or even two, the controller won't run out of DMA contexts.
Regarding non-audio FireWire applications: Most IEEE 1394 video cameras require one RX stream per camera; some industrial high-bandwidth cameras take two. Some DV camcorders offer bidirectional DV transfer over 1394, hence use 1 RX and/or 1 TX stream depending on the application software on the host. The IP-over-1394 protocol, implemented in Linux by the firewire-net driver, uses 1 isochronous RX DMA context for reception of asynchronous broadcast transmissions. The SBP-2 protocol, mainly used as SCSI-over-1394 encapsulation, does not use isochronous streams. The current SBP-3 protocol revision specifies optional isochronous I/O but I am not aware of any implementation of this protocol feature.
On the other hand, while all OHCIs offer at least 4+4 isoch RX+TX DMAs, practical experience with the FFADO userspace drivers indicate that most OHCIs quickly become unreliable when more contexts are being used simultaneously. Particularly, the FFADO drivers have a hard time to maintain synchronicity of the streams, or are flat out unable to establish synchronization. Though from what I understand, the ALSA firewire drivers do this differently, hence may not be affected in the same way as FFADO. In my and others experience, only LSI controllers (formerly Agere controllers) and Texas Instruments controllers do not suffer from these issues when multiple RX/TX streams are active in FFADO.