A Driverless Ethernet Sound Card

External USB and Firewire sound cards suffer from several problems. One problem is limited support for high sampling-rates and for 24-bit samples. Release 1.0 of the USB Audio standard did not support high-end cards, which forces high-end cards to use card-specific drivers. This problem may disappear over time, since release 2.0 of the standard allows higher sampling rates and 24-bit samples, but operating system support for this version is still patchy. A second problem is that the USB driver transfers the samples to/from the operating system’s audio subsystem. The software interfaces (APIs) that the audio subsystem presents to applications vary widely between different operating systems. Some operating systems have multiple audio interfaces with different capabilities (e.g., DirectSound and ASIO in Windows). This makes it difficult to write portable audio applications, and in particular software-radio applications that rely on audio baseband sampling. (There is a good reason for this complexity: multimedia applications like games and video editing need low latency control of audio streams, but this is less important for SDR applications.)

Portable abstraction layers like portaudio are one way to address this problem, but this method does not address all the issues. Cards with obsolete drivers remain obsolete, and software installation and configuration remains difficult (actually, it tends to get more difficult, because of the need to deal with yet one more software component).

An Ethernet connection to the sound card is a more complete way to solve these problems. If the sound card sends and receives samples using UDP or TCP, it communicates directly with the audio (or software-radio) application without passing through the operating system’s audio subsystem. The data still passes through device drivers on the PC, but now these are the networking drivers, which are built into all operating systems. Furthermore, the software interfaces to networking functions are essentially the same across all operating systems, unlike the interfaces to the audio subsystem. This makes it easy to write portable audio applications.

The prototype. The green board is the EK-LM3S9B96 evaluation board. The CODEC is on the lower left. The board in the plastic enclosure is the programming and debugging dongle.

To test this approach, I built an Ethernet sound card using a simple microcontroller evaluation kit called EK-LM3S9B96. The board contains a Texas Instruments LM3S9B96 with a 100Mb/s Ethernet controller (both MAC and PHY; all you need to add is the isolation transformer and Ethernet jack). This microcontroller also has an interface to audio DACs, ADCs and CODECs.  I mounted the evaluation-kit board on a large prototyping board that also had space for the CODEC, a Texas Instruments TLV320AIC23B. The line-in port and headphones output ports of the CODEC are connected to standard ¼” stereo jacks.

Getting the firmware to support 24-bit stereo 192kHz sampling in both directions was a real challenge. I ended up using TCP rather than UDP, which I originally thought would work well. But at the end the card works very well.

An article in QEX tells the full story. It is also available on my university web site.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: