Home > DIY HiFi > Digital Filters for Soekris R-2R DAC

Digital Filters for Soekris R-2R DAC

(Update 5/9/15)

Great news from Soekris on enhancing the filter capabilities of the DAC [link]:

Original coefficient resolution:

The format used in the FPGA of the dam1021 it’s 2.30 fixed point format for the FIR filters and 3.29 fixed point format for IIR filters. (2 bits for the integer part, 30 bit for the fractional part =32 bits). The mkrom utility (part of the filter tools) reads and process the input .txt parameter files as 64 bit floats, including the multiplier, then convert to the 2.30/3.29 fixed formats in the final step, which are pretty good.

Using full 35bit for coefficient resolution in next version or firmware:

Numeric format will probably change to 1.34, and instead have the mkrom tool check for overflow, maybe even look into auto scaling…

Number of filter taps in next version of firmware: 2032 taps (Original, 1016 taps)

I’m also looking into double the number of coefficients, that would require to assign double the MAC blocks to the first FIR filter, should be possible as the last MAC block is just doing volume control, that can be done using a multiplier built with a lot of LUT’s instead, not an issue as that don’t need to be fast and there are plenty of LUT’s left in the FPGA, the FPGA was choosen more for number of MAC blocks than number of LUT’s…


Upload it yourself

Up to now there has been some attempt in allowing custom digital filters to be uploaded or programmed into a DAC. As an example, the ESS DACs allow the user to program filter coefficients into the internal registers of the DAC through its I2C interface.

I had attempted to do so by carefully following the specification and instructions in the ESS data sheet, but was unable to succeed and after many tries I eventually gave up. Some have claimed success, but no one has shared any information to the audio diy community as to how to make loadable custom filters work. Perhaps there is some information that is not public; perhaps I am not smart enough to do so.

With the Soekris R-2R DAC, custom loadable filters has finally become a practical reality. Practical in the sense that finally “any one” can do this.

Filters that you can distinctly hear

User selectable filters has been available for quite some in DAC boards and CD players. With the Wolfson 8741 a user could choose among five filters, including an “Apodizing” and “Minimum Phase” filters what were all the rage a few years back. The ESS DACs allows the user to select among 3 filters and the better DACs have a collection of filters to select from.

If one peruse the forums for listening experiences involving the Wolfson or ESS DACs, there is not much to say about these filters. At most user reports show very subtle differences between the filters and most of the listening impression reports omit specifying the filter that is being used. When I put together a WM8741 (Twistedpear Audio) a few years back, I spent some time listening to the 5 different filters without detecting much differences.

The listening experiences shared at the diyaudio filter brewing threat shows for the first time (at least to me) clearly discernible digital filters. There could be several explanation for this:

  • Manufacturers attempt to maximize measured performance with their filters whereas the Soekris filters are the result of experimentation and evaluation-by-ear. In some cases, the “best sounding -or most likable” filters are NOS or near NOS which measure the worse.
  • Manufacturers filters are “short” vs longer filters in the Soekris DAC. This allows more experimentation and fine-tuning. As an example, the Soekris DAC filters can have up 1016 coefficients in FIR1 and up to 120 coefficients in FIR2. In contrast the ESS 9018 DAC allows programming 64 coefficients in FIR1 and 16 coefficients in FIR2.
  • There could be some placebo effect too. Now that everyone can manipulate filter coefficients, everyone can hear big differences between the filters

There could be more reasons, but users are having a lot of fun with the diy filters for the Soekris DAC.

[“Disclaimer”: I am still using the factory filters. I am afraid of filter overload and want to wait for the “ultimate” filter :-)]

The filter brewing thread at diyadio [link] is pretty extensive and documents the learning experience of a few individuals. It is a “conversation” among these few individuals and a few brave early experimenters sharing their listening impression.

In an attempt to capture the knowledge from that thread, I have summarized the collection of filters by our friend Paul [link]. A few filters are developed by other users, but the overwhelming majority are from Paul. Instrumental to diy filters is also the free tool “rePhase” [link]. I can’t capture all the knowledge that has been shared (due to my own lack of knowledge) but I think it is a pretty good summary.

Up to today, there seem to have been 3 stages of filter development arriving at a (temporal) benchmark filter.

FIRST STAGE: NOS sounds good…

The first state is mostly imitating the response curves from filters available in commercial DACs. For example the filters from Ayre and the filters from Cambridge DACMagic. This was the stage to get comfortable with the creation tools, the curve plotting tools, the specifications and format of the filters and acquiring general knowledge on digital reconstruction filters. Looking at the different filters created, it seems that the experimentation was kind of random.

Out of this stage, the most notable filter is the NOS filter: 1021filtNewNOS and the filter modeled after the DacMagic: CRaPMagic_LP 

Filter File Name
1021filt [link] Linear Phase, “Standard” Sharp roll-off This is the original dam1021 factory filter. Actually it is rather “medium sharp”: around -17dB down at 22kHz, and doesn’t fully attenuate until 24kHz [link]
1021filt_FIR2_MP [link] Same as factory filter above but with different FIR2 The FIR2 filter has been replaced with minimum phase slow roll-0ff [link]
1021MinPhase-Slowrev1 [link] Minimum Phase, slow roll-off Inspired by Ayre’s “Minimum Phase Listen” filter. No pre-ringing, small post-ringing. Ayre’s white paper here [link]
1021LPSRO441 [link] Linear Phase, slow roll-off Inspired by Ayre’s “Linear Phase Listen” filter. Minimized pre and post ringing
1021SA1 [link] Linear Phase Apodizing (slow roll-off starting at 10KHz, -100db at 21KHz) Inspired by Craven’s Apodizing filter but in linear phase. Minimum pre, post ringing and minimum aliasing, but soft on the top-end because of the much earlier roll-off. Apodizing filters were the rave a few years back
1021SA2F2v1 [link] Linear Phase Apodizing (slow roll-off starting at ~12KHz, -100db at 22.5KHz) Same as above but starting roll-off at a higher frequency but still way before 20KHz. Maybe good for old people🙂
1021filtPOS [link] Minimum Phase, sharp roll-off. No pre-ringing, but lots of post-ringing By POS (creator of rePhase) [link]. “Standard” minimum phase filter.
MB2b [link] Linear Phase, sharp roll-off, using Taylor windowing algorithm, 2x oversampling MB2b is the same as MB2 [link] but with 2x oversampling [link]. It was used in a shootout with other high-end DACs [link] -very interesting read and well written. dam1021 came out second.
DAC 44,1kHz-brickwall [link] Linear Phase, sharp roll-off. Lots and lots of ringing, pre and post. “Standard” filter. By POS. Possibly equal to the original filters. But this is in rePhase format. Use this as a learning tool to create the filter coefficients and then use Soren’s tool to convert to binary formal for uploading to DAC.
1021filtNewNOS [link] NOS (Since there can only be one NOS filter, this is the only one to use) Latest iteration of the NOS filter which includes POS’s improved de-emphasis filter.”The NOS filter does not actually filter at all – all the coefficients are set to 1 so the audio is passed unaltered and is only up-sampled. The side effect is none of the mirror images of the original signal that appear in the up sampled signal are removed…””Listened to NQtb65, NQtb70 (see Nyquist filters below) and NewNOS today. All three are pretty nice. But NewNOS feels distinctively more dynamic, direct and more full-bodied…”
1021filt_35HR_LP [link] Linear Phase, sharp roll-off, FIR2 has 3.8 dB attenuation (this is totalcrap v1) Another brick-wall filter with lots of pre and post ringing, with a 3.8 dB attenuation in FIR2 to prevent clipping and benefit those not using digital volume control
totalCRaP_rev2 [link] Same as V1 above, but FIR2 is (linear?) slow roll-off Experimenting with changing FIR2 filters. The TC filters are actually sharper than the original factory filters. More ringing than factory. [link]
CRaPMagic_LP [link] Linear Phase, Slow roll-off (-8dB at 22KHz) Modeled after DacMagic Linear setting. Check user manual for filter behavior: [link]. I think this has similar behavior as Ayre’s Linear Phase “listen” filter. This filter also has a MP slow roll-off FIR2 [link]
1021filt_Mix-Phase1 [link] Mixed phase. Near minimum phase, slow roll-off, minimum ringing Inspired by Ayre’s MP filter
A_CRaP_take on_BH [link] Intermediate Phase, 80 dB Stop Band Attenuation (tradeoff between ringing and aliasing) Inspired by John Swenson/Bottlehead:“The intermediate phase splits the difference and has a small amount of pre ringing and post ringing that is a little bit longer than linear phase but much less than minimum phase. This is also deliberately a short filter”.[link]

SECOND STAGE: Intermediate Phase is good too…

During the second stage of filter brewing, our friend Paul focused (I think) in reducing ringing and in particular pre-ringing by using slow roll-off response and intermediate phase (a combination of liner and minimum phase). The realization at the end of the experiments is that the length of the transition band (the rolling off part) and the amount of phase mixing has a lot to do with how we perceive sound. Small changes in the size of the transition band and small changes in the amount of phase mixing can result in substantial improvements.

Based on the results, there seem to be a lot of experimenting left since there are 3 variables that can be changed: start of roll-off, size of transition band, and amount of phase mixing.

Out of this stage, the most notable filters are the 1021filtIPv4_p30 and 1021filtIPv4_p35 filters.

Filter File Name
1021filt_DTYWS [link] Linear, “medium sharp” roll-off. (For old people) DTYWS (“Damn Those Young WhipperSnappers”). Is a filter that has been customized to “old people” that can’t hear past 16KHz. It starts to roll-off at just under 16kHz, is down a comparatively restrained 22dB at 20kHz, is -130dB at 22kHz and bottoms out at -180dB at 22.4kHz. It’s only -0.02dB at 17kHz, then -0.8dB at 18kHz, -6dB at 19kHz, and -21.5dB at 20kHz. Measurements here [link]
1021filtIPv1 1021filtIPv2 1021filtIPv3 [link] 3 Intermediate Phase filters slow roll off, with different size transition bands and -6dB point. Stop band starts around 25-26kHz so there will be some imaging. (Also for old people) V1: roll-off starts at 16KHz and has a transition band of 10,000 Hz. -6dB is at 20.0KHz. “Sounds a little bit too soft in the top end. Cotton wool wrapped, and lacking in detail”.
V2: roll-off starts at 17KHz, transition band is 9,500 Hz. -6dB is at 20.5KHz. “Increasing the -6dB point by 500hz, and narrowing the transition band by 500hz removes most of the cotton wool effect”.V3: roll-off starts at 17KHz, transition band is 9,000 Hz, -6dB is at 20.75KHz.
1021filtIPv4_p25 [link] 1021filtIPv4_p30 and 1021filtIPv4_p35 [link] Intermediate Phase with p=25 (p=0 is minimum phase, p=100 is linear phase). Starts rolling off much later than above filters V4: -0.1dB at 19kHz, -10dB at 22050hz. fully attenuated at just over 26kHz. Has new linear FIR2 which is now flat out past 40kHz and attenuates below 300kHz.. .txt files here: [link](These filters are a favorite among users)


During the third stage of filter brewing, there seem to be a drastic turn to what is called “Nyquist Filters”. Nyquist filters  “keeps all the original samples”. Meaning it starts attenuating “late”. The Nyquist filters have the -6dB point fixed at 22050Hz. What can be experimented with is the size of the transition band and the type of windowing used.

Our friend Paul is gaining knowledge and realizes:

What I’m finding with the latest filters is that the transition band width is a critical parameter for determining the tonal balance of a filter (changes of 250hz and that makes audible differences). Until I learn more about what works and what doesn’t I’m not especially concerned about filter length or the amount of ringing. I firmly believe we have been barking up the wrong tree by focusing on cutoff frequency and pre-post ringing.

With the knowledge gained from the experimentation to this point, a benchmark filter has arisen: the 1021filtNQ_C128x110 filter

Filter File Name
1021filtN3_corr [link] Linear phase Nyquist filter The Nyquist filter is one that “keeps all the original samples”. With the -6dB point fixed at 22050Hz. “Using a kaiser window the filter is -0.035dB @ 19kHz, -76dB @ 26kHz, and -162 at 27.05kHz. Not exactly what you’d call rolled off in the audio band.”
1021filtNqF2 [link] Same as Nyquist filter above but with Nyquist FIR2 The gain on the FIR2 filters has been returned to x8 so that the peak coefficient is scaled to 1.000 (0.125 * 8) to preserve the original samples.
1021filtNQv3UG_qnt [link]1021filtNQv4RG_qnt [link] (reduced gain) Unity gain version with FIR1 and FIR2 set to x8 and a version with reduced gain to match the IPV filters This version further noise “optimized” with MATLAB (the original in post 631). “Compared with IPv4_p30 there is a very distinct loss of high end detail with the Nyquist filters.””v4RG considered to be rolled off in the high end and female vocals behind a “curtain”.”
1021filtNQtb65 [link] Tuned version based on the Pflaumer patent Has a bit more HF emphasis than the CRaPMagic filter.”Vastly improved high-end response and no obvious curtain effect on female vocals. The main change to the filter is that the width of the transition band was decreased to 6.5kHz making the filter slightly steeper.”
1021filtNQtb75 [link] Same as above with transition band increased 1KHz “NQtb75 is a little too polite”. (“soft”); the “70” filter can be found here [link]“I feel that the NQtb65 is an improvement over theIPv4_pxx.skr, “less curtain” and noticeable better spatial resolution. The NQtb75 also has perhaps some “less curtain” effect, but not that spatial resolution.
1021filtNQ_C128x110 [link] and with a minor adjustment c128_100 [link]

Same but with FIR2 at 8x:

1021filtNQ_C128_100v8 [link] and 1021filtNQ_C128x110v8 [link]

Nyquist filter “approaching NOS” Short filter – only 128 coefficients long and has very little ringing. Very slow roll-off having -2dB at 19kHz and only fully attenuates at 33.5kHz. Main change is the use of Chebyshev window to control the level of side lobe attenuation, instead of sticking with Kaiser windowing.”A big step forward in SQ over the other Nyquist filters”. Comparison of this filter with NOS: [link] “For the time being I think this is probably a benchmark filter”


Soekris dam 1021 R-2R DAC ILLUSTRATED GUIDE Users Manual [link] Users manual for the Soekris DAC.
Soekris dam1021 Build Build Guide [link] Details of my initial build of the Soekris DAC.
dam1021 R-2R DAC MODs Mods [link] Mods I have performed on the DAC build.
dam1021 R2R More Mods Mods [link] Later mods on the DAC build.
Digital Filters for Soekris R2R DAC Digital Filters [link] Extensive list of DIY filters from the diyaudio filter brewing forum thread.
R2R Benchmark Filters (for now) Digital Filters [link] Latest set of filters developed and shared in the diyaudio filter brewing forum thread. The best filters of the bunch.
R-2R DAC For The REST of US Technical Details [link] Introductory post describing the innovations and capabilities implemented in this DAC.
The Soekris R-2R DAC: Technical Details Technical Details [link] Additional technical details of the Soekris DAC that were not covered in the post above and collected after I had the DAC on my hands.
  1. Anonymous
    April 20, 2015 at 00:16

    Thank you very much for creating this helpful page. It helps a lot especially to consolidate all the information to a single area

  2. brane
    May 23, 2015 at 01:32

    Thanks a lot, this page helped me to play with filters, I lost track on diy audio filter thread,

  3. September 14, 2016 at 14:54

    Computer Support

  4. September 14, 2016 at 16:55

    capitulos de novela

  5. September 14, 2016 at 18:10

    health supplements

  6. September 14, 2016 at 19:01

    alkaline water

  1. May 1, 2015 at 14:22

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s