Logo for Pc-Mus Near Silent DAWs ( Digital Audio Workstations )
Search
Logo for Pc-Mus Professional Quiet Music Computers.
     
VGA kills Audio
(by Greg Hanssen of Zefiro Acoustics)
written - 1996

A good number of VGA card manufacturers are squeezing out a few extra points on their winbench scores by locking up the PCI bus. This is fine for graphics and most systems on the PC (hard disks and such) don't even notice the problem.... Unfortunately this can hurt the audio system in a big way.

Most audio cards use ISA/DMA to trickle samples over the bus one word at a time. Even PCI cards such as the AMIII can be hurt by this problem because they trickle the data over the bus in tiny PCI transfers. When another device illegally locks up the bus for more than 1/88200th of a second, there's a good chance you will lose audio samples resulting an a glitch in the recording or playback.

How do you know if you're having this problem? Try opening up your favorite wave editing program, loading a wave file and hitting the play button. While the audio is playing, grab the top of the window (assuming it is not maximized) and repeatedly pick it up and drag it to another location on the desktop. On a soundblaster compatible card, the audio will glitch and pop while you drag the window. On a ZA2 card, there is a 50/50 chance the audio will swap L/R channels after such a glitch. On an adb card, not only can the right and left channels swap, but there is also a good chance the audio will be left in a glitchy mode that makes the audio repeatedly jump channels resulting in a high pitch scratchy noise.

At this point in the discussion, I would like to stress that this is NOT (I repeat NOT) the fault of the soundcard! This is not even the fault of the VGA card... it is in fact the fault of the VGA driver. If you do not experience any glitching or distortion then you can probably ignore the rest of this post! I've heard that the VGA drivers supplied by Microsoft (verses the drivers supplied by the VGA manufacturer) do not suffer from this problem.



I think Matrox was the first to play with this, but it doesn't really matter because most high performance VGA accelerator cards for the PCI bus are doing the same thing now. When a number of graphics acceleration operations need to be performed, these commands are sent from the VGA driver to the VGA card over the PCI bus. The VGA chipset has a built in queue that is capable of holding several accelerator commands. Normally the driver checks a status bit on the VGA card to tell if this queue is full or not. If the queue is full, the driver waits for the queue to have a free space before sending the next command. Matrox discovered (and everyone soon followed) that you could increase VGA performance by NOT CHECKING THIS STATUS BIT!!!!! What happens when you write blindly to a full queue of commands on the VGA card? The bus hangs... The bus master has started a PCI transaction, but the target (the VGA card) can't accept the data yet because it has no place to put it. As soon as the VGA card has room for the data, then the transaction can complete... but until that time the PCI bus is completely locked up. No PCI or ISA transactions can happen. This can take a long time (40 or more audio cycles) if the current VGA operation is a huge BITBLT on a 24bit screen... A 256 or 512 bit FIFO just ain't gonna cut it.

The only acceptable solution to this problem is to put the queue check BACK into the VGA driver.