Simple DSD modulator for DSC2

An update on the Simple DSD Converter. Ollo 7th order modulator received some criticism from one listening panel member who liked the soundstage, but said something about the voices is off. Still looking into that issue, will update later.

In the meantime wanted to see if I could spoof the DSD converter into passing PCM if I asserted DSD_ON manually. Seems like that should in principle pass through the USB board output, but it doesn't quite work as I had hoped. A couple of scope shots attached below show the DSD converter in normal operation, and then with DSD_ON asserted. In the latter case it can be seen that BCLK duty cycle is not close enough to 50%. Not sure if the other two PCM signals are also distorted since that would require a different measurement. For now its enough to know BCLK has a problem.

Normal conversion to DSD:
1672062958714.png



PCM Pass through not working as hoped:
1672062988497.png


Note:
Yellow trace is BCLK
Light blue is DATA
Violet is LRCK
Dark Blue is analog audio, which should look pretty much flat at this scope sweep frequency
 
In the meantime wanted to see if I could spoof the DSD converter into passing PCM if I asserted DSD_ON manually. Seems like that should in principle pass through the USB board output, but it doesn't quite work as I had hoped.
Passthru works fine for me. Although the passthru was made to pass external DSD, you can pass PCM, it's just a switch.
I did this for PCM:
pic_101_1.jpg

Note:
Yellow trace is BCLK
Light blue is LRCK


pic_101_2.jpg


Note:
Yellow trace is BCLK
Light blue is DATA


But note that the fpga needs a clock to work, in our case this clock it is the input mclk. So remember to always connect mclk. In addition, it is good to keep the order of switching on: first as the first device that provides mclk, e.g. USB_to_i2s.
 
Reporting in again with recent progress. One issue found is that Ollo FPGA code swaps L/R channels such that even in DSD bypass mode L/R is still swapped. Therefore if trying to pass through PCM, LRCK and DATA signals are swapped. Don't know yet if xx3stksm version works the same way.

Also, in a carefully clocked and reclocked system, and with special care and feeding of dual AK4137 PCM to DSC conversion, IMHO Simple DSD Converter wins over AK4137. Not surprising given that it uses synchronous conversion rather than asynchronous. There is always some kind of PPLL in an ASRC chip, and IMHO there is always a little bit of noise, even just a little internal noise, to jitter it somewhat. Again IMHO, Simple DSD Converter is cleaner, reveals more low level detail, and produces noticeably better imaging.

That said, not yet clear how the FPGA converter competes with the best of software PCM->DSD converters. Also not settled yet is as to whether ollo or xx3stksm versions will be preferred by most listening panel members. The two versions do appear to sound different.
 
Member
Joined 2017
Paid Member
Hi, happy new year. As far as I can remember, there is no swapping of LRCK in my previous code. But the last source code version I have is 6th order 1 local feedback 1 bit DSM. 5th and 4th versions have the same arrangement because I usually don't change unrelated sections(changed only DSM module). I don't know why my latest version is 6th order(24.9.2021):rolleyes:.

One of the disadvantages of 1 bit DSM is small-level performance. Quantization error caused by 1bit is too large to control that subtle amplitude. From -30dBFS to -60dBFS is usually fragile, IMO. Even in the digital domain, you can find some degradation in THD, which appears in the analog domain, something like ESS hump. How much of the amount hump seems to depend on the architecture of modulation you use. Multibit DSM(more than 2-bit) usually doesn't have such an issue. Some measures could be possible but drastic effect is unachievable in my experience. I think AK4137(up to 7 bits?) is dedicated to something other than 1 bit DSM. There is a chance 1 bit isn't their strong area.
 

Attachments

  • DSDtoPCM_SW.jpg
    DSDtoPCM_SW.jpg
    50 KB · Views: 94
Hi, happy new year, as well. Just to be clear AKM has a couple of parts I know of that are named AK41xx. AK4137 is an ASRC chip that also supports conversion to and from up to DSD256. AK4191 is an up to 7th order multi-bit DSM for use with AK4499EX. https://www.akm.com/us/en/products/audio/ak4137eq/ ... https://www.akm.com/us/en/products/audio/audio-dac/ak4191eq/

A quirk with AK4137 is that although it can convert from 16/44 to, say, 24/192 and it can convert PCM to DSD, it can't do a good job of upsampling from 16/44 to 24/192 and converting it to DSD256 at the same time. It can do it, just not well. Therefore, to get the best out of it requires using two chips, one for upsampling, and the other for conversion to DSD256. Because it is an ASRC it is always hunting in real time for the optimal upsampling filter coefficients. That hunting (or susceptibility to noise, if you prefer) is its main shortcoming if high quality PCM->DSD256 is desired.

Regarding PCM versus DSD, there are many practical problems with IC dac chip design. Often it seems as a practical matter that some dac chips sound better operating in DSD mode than they do in PCM mode. In terms of measurements PCM tends to look better. Why does one sound better and the other measure better? IMHO its because the way we measure (typically using steady state FFT test signals) versus the way the ear/brain system actually perceives things like dynamics, transients, and the illusion of a soundstage, are two different categories of things. Sort of like comparing apples and oranges.
 
Last edited:
Regarding PCM versus DSD, there are many practical problems with IC dac chip design. Often it seems as a practical matter that some dac chips sound better operating in DSD mode than they do in PCM mode. In terms of measurements PCM tends to look better. Why does one sound better and the other measure better? IMHO its because the way we measure (typically using steady state FFT test signals) versus the way the ear/brain system actually perceives things like dynamics, transients, and the illusion of a soundstage, are two different categories of things. Sort of like comparing apples and oranges.
Many people prefer PCM over DSD. The claimed sound differences may well be due to additional intermodulation products caused by the ultrasonic noise of DSD.
As Archimago puts it (http://archimago.blogspot.com/2013/09/measurements-pcm-to-dsd-upsampling.html):
"Even though the noise is ultrasonic in nature as measured off the DAC, nonlinearities in the playback system like your headphones and speakers (perhaps certain amps as well) could create audible intermodulation. Maybe for certain music, this could be especially beneficial."
 
There can be quite a bit of difference in noise in different PCM->DSD conversion scenarios. Some example plots from PCMDSD.com (google chrome translation recommended):
1672575005078.png


1672575071618.png


Personally, DSD256 is a minimum sample rate for acceptable sound. IMHO at that point getting a good quality modulator also matters.

Also as xx3stksm pointed out, DSD noise/distortion varies with signal level (particularly in an undithered modulator such as is the case with 1-bit DSM). Thus, the plots above don't tell the whole story.
 
Last edited:
Member
Joined 2017
Paid Member
Hi, happy new year, as well. Just to be clear AKM has a couple of parts I know of that are named AK41xx. AK4137 is an ASRC chip that also supports conversion to and from up to DSD256. AK4191 is an up to 7th order multi-bit DSM for use with AK4499EX. https://www.akm.com/us/en/products/audio/ak4137eq/ ... https://www.akm.com/us/en/products/audio/audio-dac/ak4191eq/

Thank you for the information. I confused AK4137 and AK4191 which was recently released with AK4499EX. AK4191 is designed to output 5bit,6bit, or 7bit DSM. So, unfortunately, 1 bit DSM isn't available with AK4191. The only available option for 1bit DSM is AK4137 except for the FPGA solution. The datasheet has no claim about how many orders DSM is used. OSR is 128 or 256. But I guess some restrictions exist depending on the input frequency because 1536kHz input with 256OSR doesn't make sense. The output SCK is probably 24.576MHz at max, which means 96kHz input with 256OSR or 192kHz input with 128OSR. What happens if the input frequency is 384kHz?

It takes work to change the order of DSM. But bit resolution is easy to change as AK4191 has three resolutions. Bit resolution usually depends on only feedback data though I don't know the internal architecture of AK4191 in detail. So is FPGA. Changing feedback data from 1 bit to 2 bits results in 2 bit DSM. Up to 5 bit DSM is possible with xc6slx9.
 
There can be quite a bit of difference in noise in different PCM->DSD conversion scenarios. Some example plots from PCMDSD.com (google chrome translation recommended):
View attachment 1125227

View attachment 1125228

Personally, DSD256 is a minimum sample rate for acceptable sound. IMHO at that point getting a good quality modulator also matters.

Also as xx3stksm pointed out, DSD noise/distortion varies with signal level (particularly in an undithered modulator such as is the case with 1-bit DSM). Thus, the plots above don't tell the whole story.
I'm surprised by the orange plot for ASDM7. It's a quasi-multibit modulator as far as I know, but still, you see an FM-like spectrum on the right hand side of the graph. That makes me wonder if it has a big idle tone there at low volumes.

Edit: mystery solved, I mixed it up with AMSDM7 https://www.diyaudio.com/community/threads/the-best-dac-is-no-dac.273474/post-5778931
 
Last edited:
Moving along then, between the time I first tried the DSD Converter and when I was looking into why PCM pass through wasn't working as expected, I realized I should check setup and hold times for the reclocker. It turned out that there is about a 10ns offset delay in the FPGA output relative to the input MCLK. That reduced the setup time margin for the reclocker, so at at some point I offset the USB board and FPGA MCLK timing by about 10ns to compensate. Seems like it might have cleaned up the sound a little, so the setup time margin might have been sort of on the edge of reliability.

That change occurred while ollo code was running in the FPGA. Afterwards, reloaded xx3stksm code to see if the sound changed at all. IMHO it sounded a bit different from what I remembered. By then listening panel members were involved in the listening tests so we compared listening impressions. We listened for realism, and for soundstage and imaging. We also listened for anything else we might happen to notice, and for preference.

Three of the four DSD conversion methods used produced consistent impressions among listeners. The conversion methods were the two versions of FPGA code, dual AK4137 conversion, and the software converter from PCMDSD.com. The one odd listening result was with xx3stksm code. On the one hand, it won on most counts. OTOH I can't stand to listen to it for very long, but one listener wasn't bothered by what bothered me so much. He could hear it though and knew it didn't sound right, but he liked everything else about it so much that he overall preferred it. What is the thing we noticed? Perceptually it is a lot like bright, high-order sounding IMD/HD, but we think it is more likely a peculiar signal correlated noise effect.

As a side note, we are using a custom AK449 dac, dual mono block class AB power amps, and large panel electrostatic speakers (which use a very thin Mylar membrane as the diaphragm). The system is very revealing of small differences. Can't speak at this point as to how the converters might sound on other systems.
 
Last edited:
Tried to figure that out yesterday. I used a hi-res audio file at 24/192. If I set HQ Player to output DSD256/48 then no sample rate conversion should be needed for that particular file. Thus the only variable that should be affecting the sound should be the choice of HQ Player modulator. Of the ones I tried, thought ADMS7 sounded the best.
If sample rate conversion is also needed then choice of filter also affects the sound. According to the HQ Player manual the author of the program prefers the poly-sinc filters. Presumably they would be various windowed sinc filters, which might be a good place to start.
 
Member
Joined 2017
Paid Member
My 5th order 1bit DSM(#182) is 160OSR or 80OSR. 5th order 1bit DSM with 64OSR has a bit large RF noise though it's less than SACDs(probably 7th order 64OSR). You can have more than 120dB SNR(20kHz bandwidth) with 80OSR. There is much difference between 64OSR and 80OSR. That's why an odd OSR is used for 5th order 1bit DSM. D90(Topping) doesn't accept an odd OSR, even 48kHz family. But I'm sure AK4499 or DIYed 1bit DAC has no problem with that.

The best combination between the order of DSM and OSR depends on how much RF noise is acceptable, IMO. If your criteria are the less, the better, you want the 4th order with 256OSR. 4th with 256OSR is the cleanest because the higher the order of DSM, the larger the RF noise. The attached pics are various combinations measured with D90(ak4499 version), analog waveforms, and RF spectrum. High-order DSM can decrease the audio band noise in the digital domain, but you can't make the most of it in the analog domain. In the real world, with high-order(8th) DSM, you can have considerable RF noise and the same performance as low-order(4th) DSM. That's why I prefer 4th with 256OSR. But 256OSR is a bit difficult for a DIYed DAC. I usually end up 6th and 128OSR.
 

Attachments

  • 4th_256_D90.jpg
    4th_256_D90.jpg
    77 KB · Views: 63
  • 4th_256dsd.jpg
    4th_256dsd.jpg
    89.3 KB · Views: 69
  • 6th_256.jpg
    6th_256.jpg
    78.3 KB · Views: 64
  • 6th_256dsd.jpg
    6th_256dsd.jpg
    91.8 KB · Views: 59
  • 6th_128.jpg
    6th_128.jpg
    78.9 KB · Views: 57
  • 6th_128dsd.jpg
    6th_128dsd.jpg
    90.8 KB · Views: 54
  • 8th_128D.png
    8th_128D.png
    18.2 KB · Views: 55
  • 8th_128dsd.jpg
    8th_128dsd.jpg
    91.2 KB · Views: 58