Musiland USB Interface: Bandwidth Optimization
The USB transfer mode of the Musiland USB interface is bulk mode. It is the only audio device I am aware of that uses bulk transfer mode.
Almost all USB audio interfaces are designed to operate in isochronous transfer mode, with the majority operating in isochronous-adaptive mode and some operating in isochronous-asynchronous mode. The main difference between adaptive and asynchronous mode is that in asynchronous mode the USB device tells the device driver to speed-up or slow-down the data transfer so that it conforms with the data throughput of the USB device. The data throughput of the device (the data that is fed to the DAC) is controlled by a local clock that is independent of data transfer frequency which is controlled by the clock in the PC.
With adaptive mode, the USB device has to track the data rate of the source and derive the clock from the data stream. The USB device has to adjust its derived clock in order to prevent overflowing or under running its data buffer. The net result is that with adaptive mode you may introduce data-induced jitter and with asynchronous mode you avoid data-induced jitter and only have to worry about the jitter of the local clock. With bulk transfer mode, you also avoid data-induced jitter plus you have the advantage of higher maximum data throughput as compared with isochronous transfer mode. [In reality, I think it doesn’t matter whether it is asynchronous or bulk until you saturate the bus. At that point, asynchronous wins because it guarantees timely data delivery]
According to a Cypress EZ-USB application note:
Isochronous endpoints have a guaranteed bandwidth but not guaranteed data delivery. The timely delivery of isochronous data is ensured at the expense of potential transient losses in the data stream. No retries of data transfer are ever done for isochronous data.
Bulk endpoints, on the other hand, cannot be configured for high-bandwidth transfers. However, bulk endpoints can provide a greater maximum throughput than isochronous endpoints can with a trade off that the bandwidth is not guaranteed. [There is also no data loss because the protocol while not guaranteeing bandwidth, it guarantees data delivery through acknowledge and retry]
Thus it is important to ensure that the Musiland device can take full advantage of the bandwidth available in the USB bus which means that it is best NOT to share the bandwidth with other devices.
In order to determine if the Musiland device was sharing bandwidth with other devices in the USB bus, I moved the USB connector to different ports and looked at the USB device tree.
The following screenshot shows the USB device tree with the Musiland connected to one of the available USB ports. This port happens to be on the same side (of a laptop) where I also plugged the external HD where the music is stored. Noticed that there are three devices in that hub. The three devices are sharing the bandwidth available through that hub.
Then I moved the Musiland device to another available port. This port happens to be in the opposite side of the laptop. Notice that the Musiland device is alone in that hub, without having to share bandwidth with other devices. Therefore, this is the optimal port for the Musiland device.
Having a usb device not sharing bandwidth with other devices is beneficial to all USB audio interfaces, not just bulk transfer mode interfaces; but it is more important to bulk devices because these have the lowest priority when it comes to bandwidth sharing. According to the USB specification, “bulk transfers will use spare un-allocated bandwidth on the bus after all other transactions have been allocated. If the bus is busy with isochronous and/or interrupt then bulk data may slowly trickle over the bus. As a result Bulk transfers should only be used for time insensitive communication as there is no guarantee of latency.”