<<

1540digital_pg32_48.qxd 9/4/08 9:36 PM Page 36

SPECIAL SECTION | ADVANCED AUDIO

Mistake #3: Digitally controlled analog processing PC AUDIO SUBSYSTEMS In 1976 I was asked to design a machine to do digitally controlled analog synthe- sis. This was a retrofit of a DEC PDP-8E Evolution and to run a large analog music synthesizer. In hindsight it’s obvious this was a really design silly idea. If the processing exists in ana- log or digital and you choose to use digi- By Rob Maher tally controlled analog, you’re probably going to regret it twice—once when you l http://www.youtube.com/ build it, because it is difficult, and then watch?v=LSd4MLVOqFM again soon afterward, when somebody TWENTY YEARS AGO, when some- makes the all-digital solution and puts Six world-renowned pioneers of one wanted real-time audio on a per- your machine in the junk heap. computer and electronic music, sonal computer, it typically meant LESSON LEARNED: Design the including John Chowning, gather at toggling bit 1 in I/O port 97 to gener- processor and its programming envi- Tulane University in New Orleans to ate a pulse waveform through the PC’s ronment together. discuss the future of the form—as small built-in annunciator speaker. they saw it in 1967 and as they see Ten years ago, real-time audio on a PC Mistake #4: Creating an overly it 40 years later typically meant buying a PCI-bus complex user interface plug-in . In the past decade, To allow for manual adjustment of gain however, the vast majority of PCs have and offset, each of the above machine’s Mistake #6: Designing the hard- emerged from the shipping box ready 24 ADCs and 24 DACs originally had a ware before the software to play with motherboard audio solu- pair of front-panel potentiometers. They In 1981 I began making a large, experi- tions based on the Audio Codec (AC) were thrown out of the design for cost mental ECL processor intended as the ’97 specification and its successor, the reasons and I wrote a software calibra- engine inside a digital audio mixing Intel High Definition Audio (HDA) tion routine instead. The mind boggles console. I planned that the software multichannel spec. at a panel covered with the 96 user- environment to program this would adjustable controls I’d have created with- be graphical and quite advanced for PC audio: out the intervention of the accountants. the time. The transition to AC’97 LESSON LEARNED: Make sure Unfortunately, however, the software When introduced by Intel in 1997, the there’s enough processing power for the people weren’t available when the AC’97 specification stunned the PC job at hand, with an ample margin. processor was designed, and several audio business by encouraging moth- seemingly trivial decisions in the erboard manufacturers to place rela- Mistake #5: Assuming the instruction set made the compiler tively inexpensive mixed-signal processing is fast enough design unnecessarily complex. Every “codec” chips right on the mother- The above software calibration idea processor I’ve designed since has been board itself. The digital controller por- should work fine, but it added 96,000 designed together with its program- tion of the AC’97 spec resided right in additions and 96,000 multiplies to the ming environment. the “southbridge” silicon of the I/O real-time software. On the processor we When we did the second, TTL version Controller Hub (ICH), while the ana- were using, an addition took 2.6 µs and of the processor, which did go into the log-to-digital and digital-to-analog a multiply took 8.6 µs, so to process product, we designed the processor and functionality needed for audio and one second of data took 1.0752 seconds! compiler together, to much greater suc- modem features was placed in the Unfortunately software calibration cess. We also made a simulator so we audio codec chip. AC’97 was geared only works if the processor is fast could “run” code on the design before toward supporting monophonic enough. Just pushing a problem into we made any hardware. input and two-channel software, or into an FPGA, doesn’t guar- LESSON LEARNED: Keep the user (stereo) audio I/O features, 16- to 20-bit antee that the resources will be suffi- interface simple. resolution, and 48-kHz sampling rate cient to solve it. per channel. LESSON LEARNED: Don’t mess But despite those lessons learned, I Motherboard audio provided the big with hybrid solutions if a digital solu- still make mistakes—and I still learn advantage of ubiquity: essentially any tion is on the horizon. from them—every day. p PC could have low-cost audio I/O with standardized hardware features and Peter Eastty has been working in professional digital audio since the ’60s. Stints software device drivers. Operating sys- with Electronic Music Studios, IRCAM, Systems Concepts, Solid State Logic and tem software could also be standard- Sony Pro-Audio have led to his position as CTO of Oxford Digital. Among his inter- ized to use the audio codec as an easy ests are the design and programming of fast signal processing, numerical algo- plug-and-play device. rithms and testing the rev limiter on his Mazda RX8. However, not all end users were

36 Electronic Engineering Times September 8, 2008 1540digital_pg32_48.qxd 9/4/08 9:20 PM Page 38

SPECIAL SECTION | ADVANCED AUDIO

completely satisfied. Audio quality was not always up to the standards of CPU hi-fi enthusiasts and serious gamers, because the PC motherboard is an THE INTEL High Definition inherently hostile electrical environ- Host bus Audio block diagram for ment for low-noise audio. AC’97 sys- a PC tems could also exhibit annoying Memory Memory System audio glitches, clicks and dropouts controller bus storage when the host processor was heavily loaded—during a graphics-intensive System game or screen update, for instance. bus That’s not good when you’re trying to enjoy a DVD with 5.1 High definition audio (HDA) system control unit and sound. peripheral I/O bus master

What’s new? Multichannel DMA engine audio, of course DMA engine Since 2004, Intel has promulgated the High Definition Audio (HDA) standard DMA engine (see figure) to address expanding end- Entertainment user expectations. Intel HDA shares audio functions the AC’97 heritage of motherboard sound solutions, but adds higher-per- HDA DACs formance flair for home entertain- Codec unit ADCs ment support. The HDA spec allows for eight channels of 192-kHz/32-bit HDA Modem audio output. link audio functions The HDA link is a five-wire digital serial interface between the HDA HDA DACs Codec controller, typically part of the ICH unit ADCs core logic chip, and the HDA codec chip. The HDA link employs a con- troller synchronous bit stream locked to a 24-MHz bit clock (BCLK) provided by the HDA controller. All of the audio input and output data the audio subsystem has greater simultaneously—through the user’s streams are isochronous with a sophistication, lowering the likeli- lightweight headset. defined 48-kHz frame rate SYNC hood of performance-related glitches signal. and dropouts. PC audio subsystem design Typical HDA systems deployed in Besides raw multichannel audio challenges PCs provide five to eight analog audio support, contemporary PC audio sys- Clearly, the challenge for audio sub- channels (7.1 support) onboard, with tems must also provide multiprogram system designers and programmers is selectable 48- to 192-kHz/24-bit analog features for concurrent playback. For to ensure that the multiple concur- audio outputs. Some HDA codec chips example, a home entertainment com- rent audio channels get where they and motherboards provide S/PDIF dig- puter might be used to play multi- need to go—and to make it easy to set ital audio input/output via coaxial channel surround sound for a DVD up, debug and maintain. Hardware (copper) connectors, optical connec- movie in the family room while a user designers must practice impeccable tors or both. What’s more, the design in the kitchen or study enjoys the analog engineering to maintain of the hardware and software layers of sound from an Internet video-sharing signal integrity in the harsh PC Web site. Similarly, serious online environment. gamers will choose to experience the Beyond selecting the audio codec Hardware design game’s 5.1 audio soundtrack over chip, the designer must also choose demands impeccable while the live Internet the suitable routing, location and analog engineering audio chats flow separately—but style of the analog audio connectors to maintain signal Rob Maher, Ph.D., is head of the Montana State University Department of Electri- integrity in the harsh cal and Computer Engineering, where he teaches and conducts research in audio DSP. He was formerly engineering manager for audio products with 3Com-U.S. PC environment Robotics and vice president of Engineering at EuPhonics.

38 Electronic Engineering Times September 8, 2008 1540digital_pg32_48.qxd 9/4/08 9:20 PM Page 40

SPECIAL SECTION | ADVANCED AUDIO

and digital I/O if S/PDIF is required. Codec manufacturer layout recommenda- tions generally suggest physically separating the digital interface portion of the codec chip—such as the HDA link and S/PDIF con- nections—and the sensitive analog audio input/output pins in order to minimize induc- tive crosstalk of the high-frequency digital signals into the analog circuitry. Similarly, choosing the proper input and output audio DC-blocking capacitors can have a substantial positive effect on low-frequency performance. Most codec manufacturers speci- fy using MLCC caps with X5R dielectric (very l VIDEO http://www.intel.com/design/chipsets/audio/nav.swf low-effective series resistance and inductance) on the audio input side, and relatively high- This animation from Intel demonstrates how HD Audio provides capacitance electrolytic devices (>10µF) on the surround sound and advanced audio functions for the home and office outputs. With care, the hardware designer can environments truly deliver on the promise of high-definition audio in the PC environment. p

MPEG SURROUND A new standard for surround sound By Matthias Rose

MPEG surround Encoder Decoder Artistic UNTIL RECENTLY, the implementation downmix of surround sound for radio broadcast has faced considerable challenges. Com- x (n) 1 x1(n) patibility issues, poor surround quality x2(n) Downmix Spatial and the high bit rates required for sur- Σ synthesis x (n) x (n) round transmission, among other fac- C Sum 2 tors, have conspired to put the brakes signal on the multichannel juggernaut, leav- Spatial s(n) ing analysts and professionals to won- parameter der exactly when 5.1 radio might finally estimation Spatial x (n) cues C become a practical proposition. That moment has now arrived, thanks to a new MPEG technology sub- stantially developed by Dolby Laborato- round.com) has been developed specifical- WORKING PRINCIPLE OF MPEG SURROUND: ries, Fraunhofer IIS, LSI and Philips. ly to enable high-quality surround On the encoder side a mono or stereo sound at stereo bit rates, designed for a downmix is created or, alternatively, an MPEG Surround arrives straightforward implementation with externally created downmix signal may The result of several years of painstaking existing stereo or mono infrastructures. be used. Spatial parameters describing work, MPEG Surround (www.mpegsur- The fully backward-compatible technol- the sound stage are estimated. The downmix is then transmitted together with the side information. On the decoder Matthias Rose heads the Marketing Communications group of the Audio and side, the spatial parameters are used to Multimedia division of Fraunhofer IIS, a Germany-based research institute credit- recreate the original sound source. ed with the development of the MP3 coding algorithms and co-development of Legacy receivers ignore the parameters AAC () as well as MPEG Surround technology standards. and play back a stereo signal

40 Electronic Engineering Times September 8, 2008