DSPs: What they are and how they are used

amirm

Banned
Apr 2, 2010
15,813
37
0
Seattle, WA
Fancy version with a couple of pictures here: Digital Signal Processing (DSP) in audio and video products.
-----

DSPs: What They Are and Why They Are Used
By, Amir Majidimehr

Let’s take a look at the typical spec sheet for an Audio/Video processor, in this case an Anthem D2v:

“Two dual-core digital signal processing (DSP) engines, our own DSP design, offer a total of 800 MIPS to allow decoding of the new HD audio standards: Dolby Digital Plus, Dolby TrueHD, DTS-HD High-Resolution Audio and DTS-HD Master Audio. More than enough processing power to handle even the most complex program material with matchless precision.”

Some terms in there should make sense to you such as the compressed audio standards used in DVD and Blu-ray disc (DTS, Dolby, etc). But what on earth is a DSP?

DSP stands for Digital Signal Processor. As the last word implies, this is a device that is akin to the processor in your computer. Its job is to read instructions, work on data, and generate results. An engineer with knowledge of the above tasks creates a program for it that it loads and runs as instructed. In the case of above examples, it will decode a Dolby TrueHD compressed stream into PCM audio samples ready to be output to the DAC (Digital to Audio Converter).

The above may sound like what is also going on in your computer but DSP’s function and design are optimized for a different task. To understand that we need to step back and talk about what type of processing we need to perform in audio domain.

Take the functions of the Anthem AV processor. In addition to the above decoders it also performs functions such as room equalization and bass management. How these “algorithms” (methods) work is beyond the scope of this article. What is important to understand about them is that we can reduce them into a sequence of math operations. For example there is math function where we multiple one number by another and keep accumulating the result. Such a function can then be used to implement a filter to for example route high frequencies to your speakers and low ones to the subwoofer. This operation is so common that it has its own name called “MAC” which stands for multiply-accumulates.

Now imagine having to figure out the above sum for every audio sample. If you are playing most movie soundtracks, the sampling rate is 48,000/sec meaning there are 48,000 samples per second. For every audio sample we may be performing hundreds of arithmetic operations. Since our system is “real time” we need to keep up with the incoming audio rate and compute our operations in the same allotted time. So in my hypothetic example of 100 operations per audio sample, we need to perform nearly five million operations per second (48,000 100). This is per channel! And the number scales up with sampling rate. If we have 7 channels of audio and at 192 KHz sampling rate, the number of operations climbs to 33 million/second. If this doesn’t impress you, remember, this is just for one function the processor is performing. In real life, it would be performing cascaded functions of many, decoding audio, performing room EQ, bass management, etc.

DSPs are purpose built devices that are optimized to perform repeated mathematical operations. In the above example, the same bit of math is applied to every audio sample repeatedly millions of times. Having this knowledge allows one to build a processor that is a) faster, b) cheaper, c) lower power or all of these. Why? Well, we know certain things about how the processor will ultimately be used. For example, the values used to multiply the audio samples are a small set that are used over and over again. So what we can do is to have very high-speed memory inside the processor that keeps this data. This memory would be instantly accessible to use as opposed to traditional computer systems where data is normally kept in slower main memory. Similarly a single instruction can tell the DSP to perform a sequence of math functions so the overhead of telling it what to do relative to the work it has to do is very low.

Traditionally DSPs had a major leg up over processors in your computers when it came to arithmetic operations. They could use all of their silicon real estate for math functions allowing them to have what we call very high “peak” computational power. Indeed the “super computers” of the past were built the same way. You don’t hear much about those super computers any more (at least not the traditional ones). For the same reasoning, this advantage of DSPs in sheer power is mostly lost as compared to modern CPUs.

How did that happen? Well, CPU designers stole the DSP technique and ran with it! It used to be that CPUs only knew how to fetch and execute one math operation at a time. That created a loss of efficiency as instruction after instruction had to be executed to perform the same math operation (on different data). Some 20 years ago Intel started a trend of adding so called “SIMD” extensions to mainstream computer processors. SIMD stands for Single Instruction, Multiple Data. As the name implies, one instruction can tell the CPU to perform multiple ones which is precisely the type we need to match what the DSP does. While the solution is not quite as optimized as it is with DSPs, it comes awfully close. And with it, your mainstream CPU now can perform these specialized math functions with very high peak speed.

So why do we do we not use a computer CPU in our AV processor? One answer is the cost. The CPU and its associated circuitry cost considerably more than a DSP since they have to be good at many things and not just arithmetic.

Another reason is power consumption. All else being equal, a simpler circuit uses less power. DSPs are streamlined to perform a set of mathematical functions. This translates into less digital circuits “toggling” and with it, less power consumed. The Anthem processor is not battery operated so you might think it shouldn’t care about power but it does. With so much functionality in today’s AV processors, we need to manage the total amount of heat generated and avoid having fans and such that many of our computers sport. High power can also translate into more cost in the form of heat sinks and larger power supply.

Is there a down side to DSPs? Technically yes. They “hate” doing work that is not repetitive. Telling it to do something if a number is less than another but something else if not, sharply reduces its performance. For this reason, they make lousy general purpose computers and hence the reason your computer doesn’t use them.

By the way, there is even a more optimized way to perform these functions and that is through purpose built “hardware.” That is a circuit that is designed to do one and only one thing. It goes by the names “FPGA” or “ASIC.” Video decoding for example is done using these techniques as using DSPs or CPUs to do the same would be much more expensive. The advantage DSPs have is that they are flexible. As you see implied in the Anthem spec, we can load up the DSP with different audio decoder programs and have it perform that function. If we had done the same with FPGA/ASIC, we would have needed to have a chip with all of those functions simultaneously implemented since there is no program to load and tell it to run. Since we never need to decode Dolby and DTS at the same time this approach would have been a waste. This is why you always see a DSP in an AV processor dedicated to audio tasks.

So another way to think of DSPs is as programmable hardware. It is good for semi-fixed function tasks that typify audio processing.

I should mention that programming DSPs is a difficult thing. It is specialized skill that requires knowledge of the task needing to be done and the best way to get it to be a long sequence of math operations as anything else would run too slow. For this reason, I personally have a lot of respect for those who can do it well!

----

More articles here: Madrona Digital Audio, Video, and Home Electronics Technical Library
 

Vincent Kars

WBF Technical Expert: Computer Audio
Jul 1, 2010
860
1
0
Nice write up.
Explains the essence very clearly.

What I’m missing is some words about the precision.
Our conventional CPUs can do 128 bit float.
The precision of DSP is often far more limited and as a consequence might yield a higher quantization error.
 

Ronm1

Member Sponsor
Feb 21, 2011
1,745
4
0
wtOMitMutb NH
Very well done again, Amir. Concise and to the point.
 

Phelonious Ponk

New Member
Jun 30, 2010
8,677
23
0
Hang around here long enough and I might actually understand some of this stuff in my house.

Tim
 

NorthStar

Member
Feb 8, 2011
24,305
1,323
435
Vancouver Island, B.C. Canada
Amir, what are those two dual-core DSP engine chips in that Anthem D2v pre/pro?
...Make and model number please?
And are they 32-bit floating point design?

TY
 

amirm

Banned
Apr 2, 2010
15,813
37
0
Seattle, WA
Amir, what are those two dual-core DSP engine chips in that Anthem D2v pre/pro?
...Make and model number please?
And are they 32-bit floating point design?
I have never asked them but from what I recall, it is Freescale (Old Motorola) DSPs. I suspect it is DSP56720 as each core has 200 "MIPS". Dual cores would make it 400. Put two of them in the same box and you get the 800 MIPS they spec above. This DSP has 24-bit words. Answering what you are getting at and Vincent's post, this does not automatically limit the resolution that the DSP code can maintain. This DSP for example when multiplying two numbers can generate and maintain 48 bits. It can even do 48x48 bit math. The drawback is that it will run slower when you run it that way. Some programmers therefore take shortcuts and use lower precision and run into quantization issue that Vincent mentioned. Good programmers know how to maintain speed while living within the short "word length" (data size) of the DSP. This is why I mentioned that I have a lot of respect for DSP programmers. What would be trivial to do in a PC program and its wide word length, may require a sequence of operations coded in low level language (assembly language) and tediously debugged.

In other words, DSPs make the R&D harder but reduce manufacturing cost. In case of standard decoders like Dolby and DTS, one guy does it and it is done. But in others such as room EQ where there are no standards, it becomes an interesting trade off how much engineering expense you put in, relative to how much money you save in manufacturing. It may entirely be possible that putting a whole PC in there will be cheaper, if your volumes are low!
 

fas42

Addicted To Best
Jan 8, 2011
3,973
3
0
NSW Australia
The "next big thing" SHOULD be, now that people have vast libraries of music on servers, to work out an ideal, highly complex digital filter configuration for their speakers, speaker location and rooms at this particular point of time, as at right now, and shovel their whole collection of music through that filter one time only, offline so to speak, and create a second library of customised recordings which then require no filtering whatsoever for replay: minimal digital interference with playback, perfect frequency and phase response forever, or at least until you change something about the speakers, etc ...

Frank
 
Last edited:

fas42

Addicted To Best
Jan 8, 2011
3,973
3
0
NSW Australia
The industry is rocketing away with this technology, and making it cheap as dirt: new out of the blocks is Quickfilter's QF3DFX Audio Filtering and Effects Processor, try this for size:

A powerful 3-channel audio filter and effects system-on-a-chip designed for seamless insertion in an audio serial digital data path. The QF3DFX is easily configured using the Quickfilter?s QFProTM Design Software (QFPro) with royalty free user tunable advanced audio algorithms for psychoacoustic effects.

The QF3DFX can be configured to interface with I2S or TDM based audio systems. The QF3DFX can operate over a broad range of data rates up to 48ksps and can support data resolutions of 16 or 24 bits.

Input
... o I2S, 2-channels
... o TDM, up to 8-channels
o Output
... o 2.2.1 (2.1 + crossover) or any subset
... o I2S x 3; 6-channels
... o TDM x 1; up to 8-channel frame
o DC Blocking
o AGC supports special modes
... o Night, Commercial, Dynamic Loudness
o Psychoacoustics
... o High Frequency Restoration (uses psychoacoustic techniques to help restore high frequency content that may have been lost due to audio compression or other processing. Many audio compression algorithms, such as that used with MP3 encoding, limit the high frequency content in order to reduce file size and transmission overhead. For reduced bit rate compressed audio, frequencies as low as 10 kHz may be removed. The HFR block restores this lost data. The HFR block can also be used on full-band audio to emphasize high frequency content, to compensate for speaker performance, as a system designer preference or to satisfy market requirements.)
... o Spatialization
... o Virtual Bass
o Dynamic Bass and Treble
o Parametric Equalization (ten 2nd-order IIR (biquad) filters in series.)
o User Controlled Graphic Equalization (5-band graphic equalizer that can be controlled by the product?s end user. Each of the 5 parallel bands is composed of a 2nd order IIR filter whose gain can be independently varied from +15 dB to –15 dB. Each profile consists of a set of gains (five per profile) for 1 to 8 profiles as established by the developer.)
o Profiles: Single-pin control with tone feedback
o Digital volume control with Mute
o Compression: Soft Clipper
o Advanced noise-shaping Bi-quad structure
o Self-booting
o Optional microcontroller can dynamically reconfigure system via I2C or SPI


Cost of this little pocket rocket beauty: $0.95 in quantities!!

Frank
 
Last edited:

fas42

Addicted To Best
Jan 8, 2011
3,973
3
0
NSW Australia
The key point, Bob, is that the sort of processing power that cost you thousands a few years ago is now available for hardware guys to slot into into products for peanuts. Every DAC could have a module added for very, very little to control bass issues, and do some significant scuplting of sound: allow very intelligent EQ'ng selectable per recording. A sort of a DEQX at Wal-Mart pricing sort of thing ...

Frank
 

NorthStar

Member
Feb 8, 2011
24,305
1,323
435
Vancouver Island, B.C. Canada
Thanks, I was simply making conversation.

By the way Frank, my Onkyo PR-SC886P Pro has three (3) DSP chips in it. From Texas Instruments;
the Aureus TMS320DAC710, TMS320D708, & TMS320D707, I think. All 32-bit floating point design.

That is a lot of power processing for Audyssey (MultEQ XT), Audyssey Dynamic EQ and Volume, THX Ultra2 Plus post-processing, THX Loudness Plus, Onkyo's own DSP audio modes, Digital Bass Management, DTS-HD MA and Dolby TrueHD audio decoding, and all that Jazz...
And those pre/pros were selling for 900 bucks (street)!
- His predecessor, the PR-SC885P pre/pro was selling for only $450 at one point! And $800 max!

I know other pre/pros that have only two DSP chips, and they cost in excess of $5,000!
Some less (Marantz AV7005) and others much more...

________________________

Kal (Rubinson) reviewed the Integra DHC-80.2 pre/pro ($2,300 MSRP), which is the 99 percent equivalent of the Onkyo PR-SC5508 pre/pro ($1,500 street), and it also has three DSP chips inside (but higher model numbers, more advanced, more perfectioned) for Audyssey MultEQ XT32 (Audyssey MultEQ Pro Ready by the way), Audyssey DSX (Front Height & Wide channels), and the rest of the gang...

-> The DHC-80.2 pre/pro is rated Class A in Stereophile, among others in the same very class like the Anthem Statement D2v2 pre/pro ($8,999), and the Classe CT-SSP ($9,500), and the Meridian Reference 861 ($18,995), and the Krell Evolution 707 ($30,000).

Kal said on the DHC-80.2: "The Integra DHC-80.2 redefines value in a multichannel preamplifier-processor for the serious music lover or home-theater fan."

And Kal commented regarding the Anthem Statement D2v2 pre/pro with Anthem Room Correction kit (ARC), as compared to Audyssey MultEQ Pro room correction software: The "honest immediacy" of ARC's v1.2.5 upgrade benefited movies and video, but for music Kal preferred the Audyssey's "silky smoothness and harmonic integration."

________________________

Now, what are you making out of all of that Frank?

And by the way, the DHC-80.2 pre/pro uses six Texas Instruments Burr-Brown PCM-1795 (32-bit /192kHz) DACS. ...Below the famous BB PCM-1704K Stereo DAC (K is the highest grade, 24-bit/96kHz) , and just below the BB PCM-1792 Stereo DAC (24-bit/192kHz). But these PCM-1795 Dual DACs (Stereo) are not implemented in dual-differential balanced configuration, of course not; only one single DAC per channel for 9.2-channel (11 channels total), or that would have added considerably to the MSRP or total final cost.
{The previous Onkyo PR-SC886P and PR-SC885P as well their Integra model equivalents were using five TI BB PCM-1796 Stereo DACs; 24-bit/192kHz.}
[But the closest predecessors, the Onkyo PR-SC5507 as well the Integra DHC-80.1 were using the 32-bit DACS, the same as in the DHC-80.2 and PR-SC5508 pre/pros, the PCM-1795 DACs.]

But here we're talking about DSP chips, so let's get not lost just yet.
 
Last edited:

fas42

Addicted To Best
Jan 8, 2011
3,973
3
0
NSW Australia
It's all good, Bob, but you've gotta remember that all this fiddling in the "digital domain", as they say, goes for nought if the final conversion to analogue goes sour. THAT's where the "silky smoothness and harmonic integration." happens, and if that gets mucked by by poor implementation, or interference, then no matter how much money has been thrown at the DSP side of things, the sound will still be lousy; it will be irritating, suffer digital harshness, be flat, dreary, all the usual suspects ...

On a side note, I've been going around in circles for days now sorting out a cable in the little guy, the HT beast. Now this is only the copper path linking the main unit to the separate, proper subwoofer, but: get it wrong, the sound is terrible, turn the system off!; get it right, lovely, all nicely on song. In digital this, again, is how critical it is for that last detail to be right ...

Cheers,
Frank
 

NorthStar

Member
Feb 8, 2011
24,305
1,323
435
Vancouver Island, B.C. Canada
Hmmm, you guys are kind of quick; while I'm still editing my above post, you guys already have posted!

Frank, you are absolutely right; it's all about implementation, not just quality parts (Digital/Analog stages).

Amir, thanks.
 

fas42

Addicted To Best
Jan 8, 2011
3,973
3
0
NSW Australia
Frank, you are absolutely right; it's all about implementation, not just quality parts (Digital/Analog stages).
Yes, my humble Philips HT unit uses a bargain basement Cirrus Logic unit but if you feed it properly, give it a good warm up, and all the crystals align :), then it does as good a job as anything I've heard out there.

Heeelp, I've lost my advanced editing buttons, hence no emoticons or anything else -- I hate blasted browsers, Firefox in my case; no, make that all software, says the man who played with the stuff for 30+ years ...

Frank
 

amirm

Banned
Apr 2, 2010
15,813
37
0
Seattle, WA
Hi guys. I am playing around with a new feature where you can leave comments on my company web site for these articles using facebook. Love to see someone post a comment there if you are a facebook user. Please be nice :). You should see the comment box there ready for you if you click on the link now and are on facebook. Scroll to the end: http://www.madronadigital.com/Library/DigitalSignalProcessors.html

If you don't want to leave a comment, you can also just hit the "Like" button.

Thanks in advance.
 

About us

  • What’s Best Forum is THE forum for high end audio, product reviews, advice and sharing experiences on the best of everything else. This is THE place where audiophiles and audio companies discuss vintage, contemporary and new audio products, music servers, music streamers, computer audio, digital-to-analog converters, turntables, phono stages, cartridges, reel-to-reel tape machines, speakers, headphones and tube and solid-state amplification. Founded in 2010 What’s Best Forum invites intelligent and courteous people of all interests and backgrounds to describe and discuss the best of everything. From beginners to life-long hobbyists to industry professionals, we enjoy learning about new things and meeting new people, and participating in spirited debates.

Quick Navigation

User Menu

Steve Williams
Site Founder | Site Owner | Administrator
Ron Resnick
Site Co-Owner | Administrator
Julian (The Fixer)
Website Build | Marketing Managersing