Saturday, 22 October 2016

MEASUREMENTS: HiFiBerry DAC+ Pro, PCM5122 digital filters & further thoughts on filtering...

A summary slide from this presentation slide set. Just a reminder of the general desirability of digital filters providing higher accuracy compared to analogue...
Thanks to Jim Ambras in the discussion of the measurements for the Raspberry Pi 3 & HiFiBerry DAC+ Pro for pointing me to some settings available! So in the "Wait! There's more..." department, there are some "advanced" settings available in Alsamixer for the DAC+ Pro I2S HAT board you might wish to experiment with. Let us have a look at the different digital filters built into this very affordable DAC and how it changes the sound objectively...

The settings are easy to get at and changes can be made "on the fly" so you can quickly hear the difference (or not) that the digital filter makes. A great way to explore for yourself what your preferences are... So, if you have Volumio installed, all you do is get into an SSH session (for example, use PuTTY in Windows) into the command line of the Pi (remember for Volumio, login and password are both "volumio"), then issue the "alsamixer" command. You should see this:

Then press the F6 key to select the DAC (DAC+ Pro selected in this case of course):

After pressing enter, you'll see the digital filter setting (aka "DSP Program") as the first item which you can change with the UP/DOWN arrow key on your keyboard:

As you can see, I have the "Low latency IIR with de-emphasis" selected as the "DSP Program". There are 5 selections you can make:
- FIR interpolation with de-emphasis [DEFAULT] ("Normal" 8x oversampling)
- Low latency IIR with de-emphasis
- High attenuation with de-emphasis
- Fixed process flow [no sound output when I choose this one]
- Ringing-less low latency FIR (I believe this is called "Asymmetric FIR (8x)" in datasheet)

Since I could not get any sound output with the "Fixed process flow" setting (I wonder if it's a programmable setting which is unused in this case), there are 4 settings to have a look at here. Let's plot out the characteristics of these digital filters which might help you think about what you're listening to and maybe even decide how much of a difference you think this all makes!

I. Impulse Response

As you can see, we have a variety of impulse responses characteristic of the filters to choose from. These are easily differentiated on these time-domain plots... By looking at the morphology, we can predict the effect. The default "FIR interpolation" filter is the standard linear phase moderately steep setting previously measured. "Low latency IIR" is a minimum phase, steep filter. "High attenuation" is linear phase, but with more taps for a sharper/steeper filter but more pre- and post-ringing. Finally, we have the "Ringing-less" setting which is a combination minimum phase with early roll-off, similar to the PonoPlayer but less extreme early roll-off of high frequencies and concomitantly a little more of the post-ringing.

II. Digital Filter Composite

As I have done over the last year, these are the "digital filter composite" graphs I've been using to demonstrate the accuracy/strength of the digital filters to suppress aliasing distortions and intermodulation distortion. Again, see this Stereophile discussion with Juergen Reis for original ideas around this type of testing.

These first two graphs actually look very similar despite the obvious time domain differences above in the impulse response plots. As filters in the frequency domain, these are essentially equivalent, both moderately steep in nature with generally good suppression of aliasing, intermodulation and harmonic products. There's at least 60dB suppression of distortion above Nyquist.

As the name implies, this is a stronger attenuation filter compared to the above two. It's steeper, has more potent suppression of harmonics overall. No surprise then that the time domain impulse response consists of stronger "ringing" as well.

Finally, we have the "ringing-less" filter:

Yup. There is a price to pay for minimizing pre- and post-ringing! As you can see, with a weak antialiasing filter, a lot more aliasing products are allowed to pass through beyond the Nyquist frequency. As predicted with the reduction of ringing, the white noise (yellow) tracing shows an earlier and more gradual roll-off.

III. RightMark results

Realize that the digital filter effect is most significant with the CD-resolution 44kHz sampling rate since Nyquist is closest to the range of human hearing. I was curious to see if the different settings changed the distortion characteristics, noise, and dynamic range measurements. Here's the summary:

Remember that RightMark is calculating the overall results from 20-20kHz. Overall, we see no evidence of the filters being able to cause big effects. Remember that the effect of the digital filters are essentially in the high frequencies. Since hearing perception is logarithmic, these digital filter effects should be minimal and consistent with limitations on human auditory acuity.

As for specific graphs:
Frequency Response (zoomed in from 4kHz to highlight differences)
Noise level
IMD+N sweep
You can see that I zoomed into the frequency response graph in order to better appreciate the earlier roll-off from the "Ringing-less" filter setting. About -1.3dB down in frequency response by 20kHz compared to -0.5dB for the others. Not a big deal nor easily audible (compared to the PonoPlayer which is closer to -4dB at 20kHz) unless one is young with truly superb hearing (sorry gentlemen over the early 20's, we generally will have to concede in this regard).

Noise floor is the same with all settings - not unexpected.

The IMD+N sweep results basically shows the earlier roll-off of the "Ringing-less" filter as appearing like higher distortion.

IV. Concluding Remarks...

I'm not going to spill too many characters on this other than to say that now you have knowledge of what the PCM5122's filters are doing, go listen for yourself to contextualize the subjective perception. When it comes to truly understanding, this synthesis of objectivity and subjectivity is I believe what should happen, not just as audiophiles but in other domains of life as well where applicable. As I posted previously about antialiasing digital filters, my personal sense is that the effect is subtle. It's great in situations like this to have the ability to switch the setting quite easily, literally "on the fly" for quick A/B comparison listening.

One interesting comment Jim Ambras made in his response was this: "The few people who have played around (with) this seem to prefer the Ringing-less low latency FIR as do I." As you can see from the results, this is the weakest of the antialiasing settings and with strong high frequency signals, will allow quite a bit of ultrasonic distortion to pass through. Notice there is some euphemism in the wording of the filter name here biasing the time domain characteristics as if less ringing is a good thing when in fact, as we've discussed before, this will have a negative influence on the frequency domain. So "Ringing-less" in this case is also the same as "Phase-shift-more" (minimum phase effect) and "Aliasing-distortion-more" (weak filter). No free lunch...

I think it would be very interesting to see the results of a blind test between having no antialiasing filter (ie. NOS DAC sound) vs. weak antialiasing filter (like this "Ringing-less" setting or PonoPlayer) vs. something reasonably strong like the default ("FIR interpolation"). Technically, having at least a moderately strong antialiasing filter is good for fidelity since it removes the ultrasonic products that should not be there in the analogue output. However, people will have preferences and I can appreciate companies like Ayre who provide both "measure" (stronger) and "listen" (weaker) filters to accommodate both technical accuracy/fidelity as well as personal preference when listening.

Realize that even in the audiophile community, products will vary and there will be companies that actually vouche for a stronger antialiasing filter with more ringing. For example, check out Chord and the hype around their FPGA filtering; often making a point of telling us how many taps their FIR filter utilizes (26,368 for the ~US$4-5k Hugo TT for example). Just have a look at the impulse response measurements and the length of that linear pre/post-ringing with a very steep "brick wall" filter. Although I haven't seen measurements for the Chord DAVE, it is said to use 164,000 taps with an asking price of US$13k without a stand... Impressed by big numbers anyone?! Anyhow, this is all to say that in reality, one could go both ways with these filters in the audiophile world and still charge lots of cash and nobody consistently says one is clearly better than another... In other words... Subtle at best.


Well everyone, hope you're all enjoying October. I'll actually be out of the country again for some work-related duties for a few weeks...

But before I go, let me show you what I just borrowed for a spin:

Well, well, well, what have we got here??? Might or might not be interesting depending on your perspective! :-)

Enjoyed a few albums this week including Rachel Barton Pine's Joachim, Brahms: Violin Concertos (2CD's, 2003, ~DR16) and Empire of the Sun's Ice On The Dune (2013, DR5 - boo). Musical surprise of the week while relaxing on some pop - enjoyed the new Lady Gaga album Joanne (2016, cheapo $3.99 Amazon MP3 here - I'm assuming they're doing this as a virtual loss leader, back in 2011, the deal was better at $0.99 with Gaga). The songs "Sinner's Prayer" and "Just Another Day" were catchy. Some of the songs have an '80s vibe (eg. "Come To Mama" even has a sax part, and parts of "Hey Girl" sounds like pop funk from the late 70's). Modern "shouty" dynamic compression of DR7 not unexpectedly.

Until next time... Enjoy the music everyone.


  1. While I thought I preferred the sound of the ringing-less low latency FIR filter, in reality, I'm sure it was expectation bias after reading others had thought it had the best sound. That said, it's just fun to play around with changing the filters in real-time.

    Should have a visual interface to do this in an upcoming Volumio release!

    1. Hi Jim,
      Thanks again for the comments and it will be cool to see this available in the Volumio interface ahead.

      Who knows, if we sit you in front of a few filter settings, you might at the end of the day prefer the "ringing-less" one. But I think ultimately as you suggest, in all my experiments with filter settings on the TEAC UD-501, Light Harmonic Geek Out V2, Logitech Transporter, and in software upsampling, I must say that I have not been that impressed with a significant difference; expectation and mood state that day likely having more of an effect... Well, maybe in an instantaneous A/B test between say a NOS DAC or PonoPlayer vs. standard steep linear filter (same volume of course), I could pick up a difference; these would essentially represent the two poles of the "extremes".

      Like jitter in the decades before, I think in the last number of years, an impulse response plot is easy to "show" for differentiation of DAC's... A way to create curiosity and another talking point to bring up. Well, again, I will leave it to readers/listeners to decide for themselves. Intellectually it is interesting I suppose, but practically once one sees these impulse response plots and listens for oneself at the subtlety, I think the mystique disappears rather quickly!

  2. Digital Filter Overload

    Hi Archimago. Good and nice, that you have taken a deeper look into that DAC chip and the possible filterings within that chip.

    Don't forget to mention, that this TI/BB Dac chip does have intersample overload distortion, meaning and saying that, all TI/BB Dac chips that I have measured in the last years, do not have any headroom in the digital filter to prevent overload at the output, when driving with high level mastered music.

    Sure, it would be good, if the music files that are on CD or on download would not have mastered so loud, that they would not generate intersample overload distortion in the oversampling filters of DAC chips, but they do.

    As being also a Apple certified Mastered for iTunes engineer, the files that caring that logo, must be checked to have no sample overloads and also must not produce intersample overloads with typical digital 8-times linear phase oversampling filters. With those files (Mastered for iTunes), even the TI/BB Dac chip would not clip at the output of the digital filter.

    But this is more a dream. Nearly most modern pop music are mastered like "hell" and they do not only produce intersample overloads (with "typical" DAC chips), they even cary sample overloads as part of the mastering to produce "crisp clear sound".

    So with "modern pop music" it would be good to have DAC chip, that would not produce intersample overloads.


    1. Thanks Juergen.
      You have confirmed my suspicion about the TI/BB chips and intersample overloads. I saw this effect with my TEAC UD-501 TI/BB PCM1795 as well. The best DAC I have seen handling this is the more recent ESS Sabre32's (in the last couple years). Is this your experience as well?

    2. Hi Archimago

      If you use the ESS Sabre 32Series DAC of the shelve, then they have also Zero = 0 dB headroom in the oversampling filter, so if you play back "modern" mastered tracks, then you will have intersample overloads.

      But you can “tweak” the digital oversampling filter in the ESS DAC chip, to prevent possible intersample overloads. Some High End manufacturers do know this and take care of that, some don't.


      PS: Some DAC chips from Crystal or AKM do not show intersample overloads, even when used off the shelve, but are weaker in some other areas, compared to ESS or TI/BB.

  3. Using Moode which has the option to change these filter settings is nice, and will be cool when Volumio does.

    Anyhow, I do like the Ringing-less Filter the best.

    BTW, that for doing these tests. Very interesting!

    1. Thanks Dave. Cool! Didn't know Moode already has the feature...


  4. Intersample Overload Test on Files

    When signed for Apple Mastered for iTunes, you get tools to test and verify, that your mastered files will not force any DAC without any headroom for intersample overloads to run into clip. But I can report, that nearly all modern mixes do create intersample overloads or even do have also sample overloads.

    Just one small example of a regular pop song Hello from Adele, that is a sort of ballad, and so is by far not so hot mixed and mastered as nearly all hip hop songs that are mastered loud like hell. Ok, when I check this song I will see, that it does not cary any sample overloads. So far so good. But even it is "only" a ballad, it will create nearly 8000 intersample overloads. So with 8000 samples, you will get into clipping at the output of this above mentioned TI DAC, no matter what filter settings you are using.

    And what is nice with this tools from Apple, when analyzing the wave file, they do not only create a text protocol with the outcome of the analyzing, they do also create a wave file where you can see at one channel the original wave data, in order to see and recognize where you are in the song, but in the second channel they show you all the intersample overload distortion. And this is great.

    The sad thing is, that nearly all modern mastering program do have level meters that show you not only the digital value of the sample, they show you also the "real peak" (or oversample peak, or intersample peak, or what name this program uses for that). Meaning it is in the hand of the mastering engineer to be able to deliver masters, that are not containing any sample clipping and also not intersampling clipping.

    But his is (sadly) just a dream. And because of that, it is important, that the out in the field DACs are immune against intersample clipping (but this is also more of a dream).


    1. Wow. Thanks for showing us the test results Juergen!

      Indeed, unfortunate that it's like this with essentially all modern pop/rock recordings. Amazing that even a slow song like "Hello" has this kind of behaviour.

      I seriously do wish that mainstream audiophile media would focus more attention on issues like this... After all, what's the point of getting ever better hardware like DACs but ignoring the literal "elephant in the room"?!

      I also hope the recording industry still holds on to unclipped and "unmastered" originals so that perhaps one day we will truly see worthy "remasters" that can restore the music that should/could be appreciated in a more natural, high fidelity state.

  5. In case of non-clipping, but possible intersample errors it would be sufficient for a software AudioPlayer to decrease the digital volume before sending it ti the DAC right?
    Cheers, August

  6. Thanks for this great information, turns out information on these filters is hard to come by, and this gives a great description and data on the settings. In my case (Volumio 2 with DAC+ Pro, separate linear supply for DAC) setting the filter to Ringingless Low Latency FIR took out the last bit of harshness in the highs (I'm using SET amps with vintage Klipsch La Scalas, and they are very unforgiving of harsh sources). It also seemed to help with soundstage and depth a bit. Thanks again!