AG logo
ALSA 0.9 driver for Rat
ALSA logo
penguin logo

Overview

The default audio tool in the access grid is rat. One of the requirements to successfully run rat in the access grid environment is the presence of an audio card & driver capable of full duplex operation. In Australia we mostly install the free ALSA drivers, which are already full duplex.

The ALSA driver, lib & utils have undergone a major change in their development between the 0.5 series (lets call that the "old" API) and the "new" 0.9 series. Rat's ALSA related code (written by Bob Olson of ANL) is targeted to the old API and, while it has worked well for us for over two years, a version of rat which targets ALSA's new API is now needed. The reasons are twofold:

  1. the old drivers are no longer maintained, so new audio chips are not supported. Provided that cards with older chips are used, e.g. the Vibra PCI-128, this isn't an issue. However, many new motherboards now have onboard audio chips which it seems a shame not to be able to use.
  2. the new drivers will be the default audio drivers in the forthcoming Linux 2.6 kernel; they have already been in the 2.5 development kernel for some time. This is good in terms of supporting new audio chips. It also means that a separate installation of the ALSA drivers will no longer be required. However, it also means the current version of rat will not work!

Patching and Compiling

There are two patches released here for testing. The first is for the UCL version of Rat, the other for the ANL version of Rat which is distributed as part of AG2 toolkit. Comments and reports of testing are sought and should be sent to Steve Smith (ssmith -at- vislab.usyd.edu.au).

First download and untar the version of Rat you wish to use. Select the appropriate patch and do the following:

	bzcat <patch-file> | patch -p0
Once patched you should do 'configure' and 'make' in the common, tcl, tk and rat directories in turn.

The ANL patch has been tested with gcc-3.3.1. Some problems (unrelated to this patch) may be experienced when UCL Rat compiled with gcc3; if in doubt use gcc-2.95, which is known to work.

Mixers

Please note that by default ALSA starts up with all inputs and outputs muted, and you should set these up using 'alsamixer' or similar before starting Rat.

Unlike most other Rat audio drivers the ALSA 0.9 driver scans the hardware mixer for all useful input ports. This means that you may mix together multiple inputs (CD, Line, Aux, etc.) if your card supports it by selecting 'Mix' or 'Mix Mono' as your input. The driver does not attempt to vary the relative levels of these inputs however; use alsamixer to control these. We have attempted to set the default input to the same as other drivers.

Driver Compatibility

The ALSA 0.9 driver has been tested with both the add-on ALSA distribution with the Linux 2.4 kernel and with the builtin support in the 2.6.0-test1 kernel, both modular and statically compiled.

There is a known problem with the Intel8x0 driver that causes rat to consume 100% CPU when running in mono. The workaround if you see this effect is to put Rat into stereo mode.