What hardware setup is commonly used for low-latency audio stimulation? I need to carefully control the latency and timing of auditory stimulation in an upcoming experiment.  Some of this depends on software, but my question is specifically relating to hardware, drivers and OS kernel.  In other words, I'm not looking for advice on programming languages; I have that part covered.
Driver &amp; OS
I'm somewhat familiar with the ASIO4ALL driver suite in Windows, but I was weighing this against the option of using a Linux distribution (e.g. Ubuntu) with a real-time kernel installed.  My concern is that sound is notoriously problematic in Linux.  I seem to recall real-time audio being all but impossible if you're working with ALSA.  Is the same true of Pulseaudio?  Has anybody successfully set up low-latency audio output in Linux?
Hardware
What sound cards are commonly used?  Can anybody suggest some specialized hardware?  Ideally, I'd like to stick with a PCI card of some sort and not have to resort to bulky external sound cards, but I could be swayed if these cards offer significant advantages.
Thanks!
It generally helps to provide some sort of specification as to how well you want to control the timing. There are 4 orders of magnitude difference between the 100 ms timing accuracy required for auditory and visual stimuli to be judged simultaneous (Zampini et al. 2005) and the 0.1 ms timing accuracy required for binaural stimuli to be judged simultaneous (Hershkowitz and Durlach 1969). There are two types of latency when it comes to audio stimulation, what I will refer to as the ongoing and onset latencies.

Ongoing Latency

Imagine a study on virtual reality where the subjects head orientation is being tracked in real time presented sound depends on the orientation. In this type of study it is not possible to load the sound in advance onto the sound device. If the audio device requires 1000 ms of sound in advance so as to not drop samples, there will be a noticeable lag between moving the head and the sound position updating. Scarpaci et al. (2005) found that an for these types of studies an overall latency of under 32 ms is desirable. This overall latency needs to include the time required to read the current position as well as generate the sound and then buffer the sound. Depending on the speed of other devices and the amount of required processing time, this may only leave 5-10 ms for sound buffering. Head movements are relatively slow and our sensitivity to the location of a sound is relatively poor, and other experiments may require much lower latencies.

A perfect sound device would have an ongoing latency less than a sample. With a sample rate of 10 kHz, the sound hardware has 0.1 ms per sample, but at 100 kHz it only has 0.01 ms per sample so when choosing a sound device it is important to consider the sample rate. Off the shelf systems with PortAudio can provide ongoing latencies on the order of 10 ms. The PsychToolbox patches PortAudio and can achieve lower ongoing latencies. Scarpaci et al. (2005) achieved subsample ongoing latency with a 44.1 kHz sample rate by using a real time Linux kernel and a dedicated DA board. Custom systems by TDT can provide subsample ongoing latency with a 200 kHz sample rate.

Onset Latency

Imagine an EEG study in which one wants to start recording from the EEG electrodes at the same time as the sound starts playing. Unlike ongoing latency, it is possible to load the stimulus onto the sound device in advance. The goal is then to have the sound device start as quickly as possible. In my opinion, it is more important to minimize the variability in this latency rather than minimize the latency itself. If it takes between 99 and 101 ms (high latency, low variability) to start the sound, then if the EEG recordings are delayed by 100 ms, the onset of the sound and recordings will be within +/-1 ms. If however, it takes between 0 and 20 ms (low latency, high variability) and the EEG recordings are delayed by 10 ms, then the onset asynchrony can be as large as 10 ms. The case where the onset latency really matters is when the start of the sound is externally triggered. For example if a subject presses a button to start the sound, having a "long" delay would be problematic.

Similar to ongoing latencies off the shelf systems can provide onset latencies on the order of 10 ms and PsychToolbox can get down to about 5 ms (maybe less). Scarpaci et al. (2005) did not measure onset latency and performance is likely poor since the system was not optimized for that aspect of sound delivery. The TDT systems provide an external trigger and can provide onset latencies down to levels that make it difficult to measure (sub microsecond). CRS provides custom hardware that can be externally triggered so should provide extremely low onset latencies, but the system requires the stimulus to be loaded in advanced so it essentially has an infinite ongoing latency.