| Introduction | |
| Limitations of the Current PC Audio Model | |
| The Digital Audio Initiative | |
| Quality and Control Benefits of Digital Audio | |
| Adding Digital Audio to a System |
PC audio is becoming more sophisticated every year. The first sound card had a single, monaural audio output. Today, a typical sound system handles over ten audio paths. Another significant trend is the increasing popularity of high-bandwidth buses that can easily transport multiple streams of audio between PCs and other devices. This shift makes advanced audio accelerators and processors possible. When considered with an eye toward the future, it becomes clear that a new audio architecture is necessary.
The digital audio initiative (described later in this article) at Microsoft strives to address the concerns of simplicity, flexibility, and portability of audio. The initial motivation is to solve the current problems with complicated configuration and use--both to improve the quality of user experience and to lower support costs for hardware and software. The initiative also seeks to enable higher quality performance for both internal and external audio devices.
Under the current model for PC audio, the majority of audio-related support costs are the result of improper hardware configuration. Applications designed to run under the MS-DOS operating system suffer the most, because users are sometimes required to inform the software of the current hardware configuration. Users are then thrust into the murky depths of I/O addressing, IRQs, and direct memory access (DMA). Although Plug and Play has solved numerous resource conflicts for Windows-based applications, there are unfortunate side effects for MS-DOS-based programs. Specifically, the configuration of the audio hardware can change and get out of sync with what the MS-DOS-based application expects.
The current model for audio also faces a considerable challenge in supporting the growing number of audio channels. Typical PCs contain several audio sources in hardware (microphone, line input, CD audio, FM synthesizer, wavetable synthesizer, phone) and a few more sources in software (wave playback, Microsoft DirectSound, software synthesis, and so on). Additional audio sources are growing in popularity, including television tuners, USB, and IEEE 1394. With so many inputs and outputs, it becomes very difficult to manage this system from the perspective of both users and hardware developers. To make matters worse, the number and form of applications that use audio has expanded.
The current model has a third significant shortcoming: You can only hear one application at a time. If you happen to be playing a Microsoft DirectX-based game in Windows 95 when an incoming phone call occurs or new e-mail arrives, you won't hear an alert sound. The system will either omit sounds or present a dialog box indicating the audio hardware is busy. This situation can be particularly annoying if there is an audio application running in the background that silently holds a monopoly on the audio functions.
The concept behind the digital audio initiative is to facilitate a model where all audio mixing and routing is done in the digital domain. This does not mean that all audio processing must be done in host software; in some cases, dedicated hardware should share the workload. Rather, the initiative seeks to eliminate point-to-point connections carrying analog audio signals inside the PC.
The enabling technology for the digital audio initiative is the Windows Driver Model (WDM), which Microsoft is providing in the Microsoft Windows family of operating systems. (For more information, see the WDM home page at http://www.microsoft.com/whdc/archive/wdmoverview.mspx.) One of the primary benefits of WDM is the ability to accommodate numerous streams of real-time audio. Under the new system architecture, it is possible to perform audio management using a software-controlled model. Instead of mixing and routing audio using conventional analog hardware, a kernel-mode process performs the same task. Instead of disjointed parts of the system independently modifying the audio streams, the operating system can effectively manage the complete system. Volume sliders will work uniformly on all inputs. There will not be huge discrepancies in levels between one channel and another. Additionally, the audio can be redirected to any available output on the PC, including USB and IEEE 1394 devices.
One of the key components of the digital audio initiative is the software emulation of the Sound Blaster interface, which offers several advantages:
| • | Audio is no longer confined to the ISA bus or any form of emulated ISA, so the configuration hassles of this obsolete architecture will be eliminated. |
| • | Chances of resource conflicts are greatly reduced, because hardware emulation is actually a software component. |
| • | Because Plug and Play does not govern the emulator's resources, there is no chance that the emulator will be unintentionally reconfigured. |
| • | The output of the emulator is another audio stream that the architecture will mix with other sources generated at the same time. As a result, the system avoids situations where an application holds complete control of the audio hardware, as can occur under the legacy model. |
Two operating system components perform the work of combining audio streams. The "System Audio Device" is responsible for selecting the path for the successful formatting, sample rate conversion, and mixing necessary to combine digital streams. The "Kernel Mixer" (or KMixer) performs the actual operations.
These two components permit multiple audio applications to play sound simultaneously. For example, you can hear everything while simultaneously playing a DVD movie, a DirectX-based game, and an MS-DOS-based game. When e-mail arrives, you will hear the alert sound. Of course, this is an extreme example, but the point is that an "audio hardware in use" error message will never appear again.
WDM Audio Architecture
When a system uses digital audio, several new possibilities present themselves. The most powerful of these is the ability to use an external digital bus to transfer audio, which offers two advantages: the ability to simplify the design of high-fidelity solutions, and the real possibility of Plug and Play audio modules.
It is difficult to consistently design high-quality audio solutions inside a PC. Given the extensive amount of radio-frequency noise that exists, preserving high signal fidelity is quite challenging. Moving the digital-to-analog conversion to an external device greatly simplifies audio design. The end-user benefit is higher fidelity than previously possible. For highly demanding situations, a digital audio stream can travel directly from the PC to a dedicated device such as a home stereo without any signal degradation.
The current conventional audio solutions rely on Plug and Play to manage the system resources. However, once the audio is converted to the analog domain, there is no way to ensure that the audio is being delivered properly--the speakers might be disconnected, turned down all the way, not plugged into the AC adapter, and so on. The host cannot detect any of these scenarios.
On the other hand, a pair of USB speakers can give the PC complete visibility into the configuration. The host can guide the user to correct problems when needed. It can even merge the function of the on-screen volume control with the movements of the physical knob on the external device. In doing so, both controls will act as one, eliminating the user confusion of cascading volume controls.
Much of the effort involved in designing a completely digital audio system is handled in the operating system. To take full advantage of this capability, there are a few system considerations:
| • | Use a WDM driver for the primary audio device in Windows. |
| • | Use a WDM driver for any secondary audio devices, such as television tuners or television inputs. |
| • | For MS-DOS-based applications, use an MS-DOS box with the Sound Blaster emulation supplied with the operating system. |
| • | Use a CD-ROM drive that supports direct-read capability. For more information, see Windows and Red Book Audio. |
For more information about WDM and streaming support under Windows, see http://www.microsoft.com/whdc/default.mspx.
For information about developing WDM drivers, see the Windows DDK.