return to first page linux journal archive
keywordscontents

Product Review

OSS/Linux Sound Driver

Open Sound System (OSS) is a kernel-level sound card driver offered for a number of Unix-compatible operating systems by 4Front Technologies. OSS/Linux is the version for Linux systems. It's not surprising that Linux is supported, as the code was based on, and is compatible with, the sound driver included in the Linux kernel. The code is written by the same author, Hannu Savolainen, who continues to maintain the free version (OSS/Free).

Installation

I took advantage of 4Front Technologies' free trial offer to download and run the product for five days. If you decide to purchase it you receive a software license key that allows the software to run permanently.

I also downloaded the latest release of OSS/Linux (3.8-beta1-961205). I installed the software on a 166 MHz Pentium system with 32 megabytes of RAM running Red Hat Linux 4.0 and the 2.0.28 kernel. The sound card was a Creative Labs SoundBlaster 16 (Plug-and-Play version).

The package comes as a compressed tar file containing installation instructions and an install program. To install the software you have to run the install program as root. This invokes a curses-based user interface that helps you install and configure the driver for the sound card. I found it straightforward to use; my sound card and settings were all automatically detected. The install program noticed that I had the standard Linux kernel sound driver module installed and informed me that I needed to disable it. Deleting the kernel-loadable module for sound did the trick.

Once installed, the sound driver is loaded using the supplied soundon script. The driver is implemented as several loadable kernel modules. A soundoff script unloads the driver, if desired. Once loaded you can then run any of the existing Linux sound applications.

Testing

I tried a number of sound applications to play and record sound samples, play MIDI and MOD files and operate the mixer. In general, everything operated identically to the standard sound driver included with the Linux kernel. It provides control of the DSP device, FM synthesizer, mixer and MIDI bus interface.

I did find one bug. Apparently the MIDI driver didn't clean up resources it used. If it was unloaded, loading again would report that the I/O port was in use. I reported this to Tech Support by e-mail and received a response back within a few hours.

SoftOSS

I downloaded the beta release of OSS/Linux in order to try a new feature, SoftOSS. To understand it, you need some background on how computers synthesize sound.

The first generation of computer sound cards used a technique called FM synthesis to generate computer music. This method is low in cost and requires little CPU power, but the music generated sounds like it was created by a computer and not a musical instrument.

Sampling techniques use a digital-to-analog converter to generate sound. This method can be very effective, as the sound of actual musical instruments can be digitized and used as samples. The disadvantage is that the digital-to-analog converters are expensive, so sound cards typically provide only one or two. Typical low end sound cards today provide both sampling and FM synthesis capability.

Wavetable synthesis cards combine the best of both techniques. They offer a number of channels (32 being typical). Each channel has its own digital-to-analog converter and dedicated memory on the sound card for storing sound samples. Hardware on the sound card does much of the work of mixing and playing the samples. The only disadvantage of wavetable cards is that the additional hardware makes them considerably more expensive. One such card, the Gravis UltraSound, is supported by the standard Linux kernel sound driver.

SoftOSS provides software emulation of wavetable synthesis using only a low cost (non-wavetable) sound card. It does so by using the spare memory and processing power of the host computer. By implementing at the kernel level the same application programming interface as the Gravis Ultrasound card, it allows existing applications written for this card to work with low end sound cards. The only catch is that you need adequate memory and CPU power, but most systems today can meet this requirement (a 40MHz 486 with 16MB of RAM was the minimum needed for the pre-release software I reviewed).

I configured the SoftOSS driver using the setting for Pentium 100+ machines and tried using some Linux applications that previously required a Gravis Ultrasound wavetable sound card.

The gmod program is a player for music files in MOD format. It operated quite well. This was not particularly impressive, because there are a number of MOD players for non-wavetable cards (e.g., tracker) that work just as well with the standard kernel sound driver.

Playing MIDI files was more interesting. MIDI is a very popular music file format among musicians, but MIDI file players I've come across before used the FM synthesizer on my sound card. Using SoftOSS, the playmidi program, and sound sample ``patch'' files downloaded from the Internet, there was a dramatic improvement in sound quality as compared to using FM synthesis. It actually sounded like real musical instruments.

Note that at the time of writing, SoftOSS was still in a pre-release beta state, and may be an extra cost option when purchasing OSS/Linux. For a beta release it looked quite stable, the only problem being some minor glitches in the sound produced.

Evaluation

So for $20 you get a single machine license for a sound driver that is compatible with the one in the Linux kernel, a play command for playing sound files and the soundon and soundoff scripts for loading and unloading the driver. Included are two years of technical support and five years of software upgrades. Documentation is essentially some README files covering installation, but more information, including the sound application programming interface, is available on the vendor's web site.

What advantages does OSS/Linux have over the free sound driver in the kernel? Technical support is one advantage which may be important to you if you are using the Linux sound driver in a commercial setting. The package does appear to be easier to install and configure, automatically detecting the card settings in most cases. It also offers support for a few more sound cards (e.g., the SoundBlaster AWE32) and has better Plug-and-Play support than the free driver. It seems to be fully compatible with any applications written for OSS/Free.

On the negative side, there is a cost involved, albeit a small one compared to most commercial software. Of more concern is the fact that you don't get the source code. This means that you can't fix bugs or modify or enhance the code yourself. It also makes the software more sensitive to different kernel versions. You may have to periodically download a new sound driver from the vendor's web site when you upgrade your kernel, although a ``wrapper'' program called sndshield that you can compile is provided to help get around these problems most of the time.

Improvements

When using the free kernel driver, I like the fact that it can be automatically loaded and unloaded on demand using kerneld. The OSS/Linux driver, while it uses modules, unfortunately doesn't seem to support this. Having to log in as root and run a command to load the driver is cumbersome, although most users would probably know enough to put it in a system startup script like rc.local.

The package doesn't come with any value-added sound applications (except a simple ``play'' program). The sound driver on its own isn't very useful. If it was to come bundled with some of the existing Linux sound applications, less experienced users could make better use of the driver right away. The way to package the product, in my opinion, would be as a CD-ROM that came with a number of sound applications, sound files, and programming documents, precompiled for Linux systems. This would turn it into a more useful product, especially for beginners.

Conclusions

If your sound card works fine with the free driver in the kernel and you aren't interested in SoftOSS, then you probably won't see this product as adding much value.

If you've fought unsuccessfully to get your sound card to work under Linux, particularly if it's a Plug-and-Play model, then you should give this product a try. You can get a free trial copy and it's well worth the cost. If you have a non-wavetable sound card and are intrigued by SoftOSS, then you may also be interested in this product.

Finally, the OSS product is also offered for a number of other Unix-compatible systems. For years Unix systems have had no clear standard for sound programming. 4Front Technologies is hoping that the OSS API will become a de facto standard for Unix systems. If successful, this will be an ironic example of the tail wagging the dog--Unix systems striving to be compatible with Linux. It also means that sound applications written for Linux will have the opportunity to run on a wider variety of Unix platforms, expanding their scope.

Resources

Jeff Tranter has been using and writing about Linux for about four and a half years. He's the author of the Linux Sound and CD-ROM HOWTO documents, and the book ``Linux Multimedia Guide'' published by O'Reilly and Associates. When not playing with computers, he enjoys ham radio, playing guitar and cross-country skiing. He can be reached via e-mail at jeff_tranter@pobox.com

  Previous    Next