Inside DSP on Audio: Digital Audio Technology Guide

Submitted by BDTI on Sun, 09/12/2004 - 16:00

The digital audio product
Digital audio products are complex systems, comprised of numerous software and hardware subsystems. If you've already read "Anatomy of a Modern Digital Audio Product" you've seen many of these subsystems and how they work together. At the heart of the digital audio system is a microprocessor tasked with rendering audio.

In this article we'll take a look at key processor options and processor selection criteria for consumer audio products. We'll examine the various types of processors available for digital audio processing, and explore the advantages and disadvantages of each type. We'll also investigate how considerations related to other parts of the system may make one type of processor more attractive than another.

What's the right processor then?
Which processor is best for a given digital audio product depends on a broad mix of factors. Key selection criteria typically include speed, price, energy efficiency, on-chip integration, development tools, and the availability of application software modules.

Speed
Processor speed is a key factor affecting product performance. The processor must be fast enough to implement all of the required algorithms, operating in their most demanding modes, in real-time. Additional performance beyond this level may not be helpful, though.

Although clock rate has an impact on processor speed, it is not a reliable indicator of processor speed. Processors that are highly specialized for audio signal processing can generally achieve real-time performance on audio tasks at lower clock speeds than can general-purpose processors. A lower processor clock rate is desirable, as it may help reduce system complexity and external component costs. For example, lower clock speeds can result in less costly board design and a reduction in EMI effects.

Price
The audio processor is often one of the most costly components on the bill of materials, and thus its cost is closely scrutinized. But bear in mind that the choice of processor can affect the total system cost in complex ways. For example, a specialized processor may be expensive compared to a general-purpose processor, but the specialized processor may include a number of required peripherals, reducing system chip count and resulting in a lower total bill of materials cost.

Energy Efficiency
Processor energy efficiency is a key concern for portable audio products, since it directly affects battery life. Increasingly, processors that target portable applications are incorporating sophisticated power management features, such as software controlled on-the-fly frequency and voltage scaling. Lowering the operating frequency alone, or in combination with lowering the supply voltage, can result in reduced power consumption. System designers can optimize power consumption by tailoring the processing power available (via frequency and voltage scaling) to the demands of current workload. Line-powered devices are not immune from energy efficiency considerations: higher energy dissipation may require heat sinks, larger power supplies, or costly (and noisy!) cooling fans—which are unlikely to be acceptable in an audio product.

Software and Development Tools Availability
A digital audio device will require a number of software components, or sub-systems. Commonplace components include communications protocol stacks like TCP/IP, device drivers for USB ports and other peripherals, file system managers, the user interface, audio compression/decompression algorithms, and audio post-processing algorithms such as reverb, echo, room correction, and 3D surround sound. Developing highly optimized implementations of audio processing algorithms, such as audio compression/decompression and post-processing, is difficult and time consuming. (Read the accompanying article "Building Good Audio Software" for details). In some cases, the processor vendor or third party supplier offers audio software modules optimized for a particular processor. If the available off-the-shelf modules correspond to the key functions needed in the product, their availability can dramatically reduce development time and the specialized know-how required.

When evaluating off-the-shelf software modules, it is important to consider not only the functionality provided, but also the degree of optimization, level of quality, and whether the modules are provided in source or object code form. Some modules are distributed only in object code form, making it difficult to understand their operation and fix programming errors. Other modules may be hindered by inadequate documentation; for example, they may lack accurate data on the processor resources used. Even when most of the required software modules are available off-the-shelf, inevitably some new software will be required. Solid software development tools are critical for efficient software development and integration. For testing audio software, tool support for streaming test data to and from the processor can be extremely helpful. Signal-processing-oriented tools features, such as data visualization, can be important for audio application development, but aren't found in most tools.  

Processor Roadmap
The system developer is typically very focused on the current product design, but it's prudent to think ahead to the next design, too. The system designer would like to have confidence that the processor vendor will continue to support, improve, and expand the processor family. Ideally this means that the chip selected for the current design gets cheaper over time, and that the processor vendor regularly releases successor chips that are fully compatible with the original, but that integrate new features, run at higher speeds, and use less energy.

Maintaining software compatibility at the assembly code or object code level across processor generations is a challenge for silicon vendors, and their success varies. Code compatibility helps keep development costs down by facilitating re-use of existing code from earlier audio system products, and eases the addition of new functionality as processor performance improves.

Assessing Processor Performance
Processor performance is very dependent on the nature of the workload. This means that it is often not obvious whether a processor has sufficient performance to meet the needs of a new audio product. Obtaining an accurate and independent assessment of the processor's performance on your application can help save trouble later in development.

Appropriately selected and implemented benchmarks can be a very valuable tool for processor selection. But be careful: the benchmarks must be relevant to the application of interest. If optimized software modules corresponding to the major resource-hungry portions of the software are already available, the performance characteristics of the processor on these modules is key information. If such information is available, this makes it relatively easy to get a solid initial idea of the processor's performance. 

In cases where application module performance data is not directly available, smaller "kernel" benchmarks, which evaluate processor performance on key algorithm inner loops, can be used to provide estimates of application performance.

Processors used for digital audio
Many types of processors are used in today's digital audio applications, from general-purpose microcontrollers to custom fixed-function processors. Understanding the trade-offs involved in using one processor vs. another is critical, since the choice of a processor affects both the end product and the product development effort in many important ways. For example, the degree to which the end product is field upgradeable, if at all, and the complexity, duration, and expense of the development effort are all greatly influenced by the choice of processor.

Processor Categories: Key Strengths and Weaknesses
There are many types of processors to choose from, including ASICs, ASSPs, DSPs, media processors, embedded general-purpose processors, PC CPUs, and FPGAs (Table 1 shows several of these processors types associated with representative vendors). These processor types differ in many respects, including programmability, processing power, integration, cost, power consumption, and ease of use, to name a few. Let's take a look at some of the most common processor types used today for audio applications:

table1

Off-the-shelf general-purpose processors
Many commonplace 32-bit embedded general-purpose processors have plenty of power for the most common audio signal processing tasks. However, demanding algorithms, such as real-time audio compression, can still be a challenge. Of course, the typical PC CPU is an order of magnitude faster than the typical embedded general-purpose processors, making the PC CPU an obvious candidate for computationally intensive audio signal processing tasks. In many cases, system designers looking to add audio functionality to an existing product will naturally look first to see whether the embedded general-purpose processors already present in the system can handle this added load.

32-bit embedded general-purpose processors are very common in higher-end consumer products like set-top boxes. If the existing embedded general-purpose processor can handle the additional load of the new digital audio features, it may be relatively straightforward to retrofit these features without adding much new hardware. And embedded general-purpose processors often have compelling advantages even for all-new products: they're typically backed by a sophisticated software development infrastructure and legions of programmers.

On the other hand, some off-the-shelf general-purpose processors have significant shortcomings when it comes to signal processing tasks like digital audio. For example, higher performance off-the-shelf general-purpose processors typically incorporate dynamic features like instruction and data caches, dynamic branch prediction, and superscalar instruction scheduling. These dynamic features can dramatically lower average execution times. But real-time systems, like digital audio products, don't rely on average execution times; real-time systems require that execution-time limits be met 100% of the time. Of course, a very fast general-purpose processor will be able to meet the timing requirements, despite its many dynamic features. But faster general-purpose processors tend to be more expensive, have high clock rates, and consume more power. 

Unlike off-the-shelf general-purpose processors, off-the-shelf DSPs are designed with real-time signal processing applications in mind. As a result, they can often ease the design and development of digital audio products. The greatest asset of off-the-shelf DSPs, though, is their blazing speed on many digital audio algorithms. DSPs have specialized features like fast multiply-accumulate hardware and high memory bandwidth that greatly accelerate many digital audio algorithms (without necessarily requiring high clock rates).

But DSPs have drawbacks, too. High quality audio processing is generally performed using 32-bit floating-point data, but floating-point support among DSPs is rare. When using fixed-point math, a 24- or 32-bit data type is preferred for typical audio applications, but most DSPs support 16-bit fixed-point data. In addition, DSPs typically offer only a very limited selection of operating systems, which can make them less attractive for products where software complexity demands a full-featured OS. (Of course, it's always possible to use two separate processors—a general-purpose processor running an OS, and a DSP handling audio processing—but this may be unattractive due to cost and hardware-complexity considerations.) Finally, many high-performance DSPs have rather complex architectures that make it difficult to optimize software.

ASICs, processor cores
Developing a custom chip offers system developers the greatest flexibility to tailor the processing, memory, and I/O resources of the chip to match the system requirements. For example, an ASIC can contain a CPU core to run the user interface and control the mass storage peripheral, a DSP core and/or custom accelerators for the digital audio algorithms, and application-specific peripherals like a flash memory controller, a USB interface, or WiFi transceiver. By employing highly customized and targeted hardware, ASICs can provide significant per chip cost (excluding initial development costs) and power savings compared to off-the-shelf CPUs and DSPs, and can dramatically reduce system chip counts compared to off-the-shelf processors.

As attractive as these strengths are, though, ASICs have some major drawbacks that make them poor choices for most digital audio applications. First, ASICs require a lengthy development process—and time-to-market is typically critical in consumer digital audio products. Also, the costs of developing ASICs are very high, and rising fast; today's ASIC development costs typically run into several million dollars. Thus ASICs are a realistic option for very few products where very high volumes are expected. Finally, ASICs that feature highly customized and targeted hardware often lack the flexibility to adapt to evolving standards and product needs; in the fast-changing world of consumer electronics, this inflexibility can be fatal.

ASSPs
Some audio signal processing applications, particularly portable MP3 players, have sufficiently stable requirements and sufficiently broad acceptance that a number of companies have developed fixed-function "application-specific standard product" chips (ASSPs). These ASSPs provide a "black box" solution for one or more of the major subsystems of the product, such as audio processing. In some cases, these chips are sufficiently complete that little else is needed to create a complete MP3 player: just add a battery, LCD display, and some buttons, and you're done.

Fixed-function ASSPs are very similar to ASICs, except that instead of being designed by the system developer, they are designed by the chip vendor and sold to multiple system developers. Hence, fixed-function ASSPs tend to share many characteristics with ASICs, such as low power consumption and a highly tuned complement of application-specific on-chip peripherals. But unlike ASICs, fixed-function ASSPs can be a cost-effective solution for both low- and high-volume products, since a single ASSP can be used in multiple products by multiple manufacturers.

Unfortunately, fixed-function ASSPs suffer from the same inflexibility inherent in highly targeted ASICs: products based on fixed-function ASSPs will themselves be fixed-function! Also, their fixed-function nature offers few opportunities for system developers to gain a competitive advantage by including differentiating features. Finally, there is a heightened risk of roadmap divergence: since ASSPs are so specialized, you may find that the ASSP vendor's product roadmap isn't a good match for the way you want to evolve your digital audio product in the future. For example, your digital audio product may support MP3 audio compression today, and you may plan to support mp3PRO in the next generation of your product. But your ASSP vendor may have no plans to support mp3PRO; perhaps it has decided to support MPEG AAC instead. These drawbacks often push system developers towards more flexible (albeit more expensive and less energy efficient) solutions like DSPs.

Besides fixed-function ASSPs, there is a second type of ASSP that does provide flexibility by allowing the system developer to provide some of the software that runs on the processor cores incorporated into the ASSP. DSP processor vendors often create such ASSPs by making application-specific tweaks to their more general DSPs. Such modifications typically include the addition of application-specific on-chip peripherals, healthy allocations of ROM memory preloaded with commonly used application software components, and tools (such as development boards) that target the application and ease the integration of user software. The flexibility provided by this type of ASSP is a powerful advantage over fixed-function solutions, but a programmable ASSP may be more expensive than a fixed-function ASSP or ASIC. Table 2 shows a few of the currently available MP3 ASSPs.

Audio Technology Table 2

FPGAs, ASICs' second cousin
FPGAs offer design flexibility on par with ASICs, but without the long and expensive development cycle typical of ASICs. Unfortunately, FPGAs also lack the power savings benefits and ultimate cost-effectiveness of ASICs. Nonetheless, FPGAs are often an appropriate vehicle for fast prototyping of audio products, and may be used for initial production runs.

Table 3, provided courtesy of market research firm iSuppli, summarizes the processor choices historically made in one digital audio market—portable players—and forecasts future choices.

table 3

Conclusion
As new types of consumer digital audio products rapidly gain popularity, the growing market is attracting increased attention from chip vendors. As a result, system developers will have an expanding range of processor choices. ASSPs and DSPs are forecast to be the most popular choices for audio products going forward; given the trade-offs we've seen among processors types, it is easy to see why this is the case. Fixed-function ASSPs will continue to be an attractive option for extremely cost constrained products, where the limitations of this class of processor--and by extension the end product--are acceptable. Processor-based ASSPs will drive more sophisticated products, providing system developers with the flexibility to integrate novel features and to track evolving standards. By virtue of their high levels of integration and accompanying off-the-shelf software, processor-based ASSPs enjoy a level of cost efficiency and ease-of-use that generic processors just can't match. Still, off-the-shelf DSPs, and the custom systems built around them, will offer the greatest flexibility for the most demanding, least cost-sensitive applications.

Of course, the choice of a processor depends heavily on the details of the particular product being designed and the constraints facing its developers. For example, independent of cost considerations some companies, strapped for engineering resources, will be attracted to processors that provide a complete, "turn-key" solution. Others, looking to differentiate based on product features and performance, will focus on processors that provide flexibility and performance headroom.

Consumer digital audio products represent a growing market for system developers and chip vendors alike. For system developers, making a wise choice of processor can mean the difference between a competitive product and one that never makes it to market. For silicon vendors, offering the right combination of price, performance, integration, energy efficiency, flexibility, and ease of use will remain a difficult challenge as consumers' expectations continue to increase. 

Add new comment

Log in to post comments