DSD256 strange behaviour

Discussions about USB Audio on XMOS devices
Audma_lm
Junior Member
Posts: 4
Joined: Thu Oct 05, 2023 3:14 pm

DSD256 strange behaviour

Post by Audma_lm »

Hi everyone,

I'm currently using app_usb_xk_216_mc with a custom board with MCLK = 22.5792MHz, PCM up to 384KHz works just fine, also DSD works fine up to DSD128 in both Native and DoP modes.
About DSD256, it works fine in Native mode but has a strange behaviour in DoP mode.
Even if DSD256 DoP is correctly recognized (see point 1 in attached image) the frequency on BICK remains 5.64MHz (as for DSD128).
I've brutally doubled the sample frequency:

Code: Select all

if(dsdMode == DSD_MODE_DOP && (curSamFreq == 705600)) //DSD256 DoP
	curSamFreq <<= 1; // (?)
With this modification (point 2 in attached image) the frequency on BICK is 11.28Mhz and DSD256 works fine in DoP mode.
Following AN00103 I've also changed:

Code: Select all

#ifndef MCLK_441
#define MCLK_441           (512*44100)   /* 44.1, 88.2 etc */
#endif

#ifndef MCLK_48
#define MCLK_48            (512*48000)   /* 48, 96 etc */
#endif

/* Maximum frequency device runs at */
#ifndef MAX_FREQ
#define MAX_FREQ           (768000)
#endif
Notes:
  • No other modifications outside AudioHwConfig
  • I'm testing it with TUSBAudio demo drivers using foobar2000 and JRiver Media Center 31
Am I missing something to fix to use correctly DSD256?
You do not have the required permissions to view the files attached to this post.


User avatar
fabriceo
XCore Addict
Posts: 186
Joined: Mon Jan 08, 2018 4:14 pm

Post by fabriceo »

Dsd256 in dop mode requires 705khz, not 384k, that is probably the reason, also you need a crystal 44/49 mhz
Audma_lm
Junior Member
Posts: 4
Joined: Thu Oct 05, 2023 3:14 pm

Post by Audma_lm »

Hi fabriceo,
you are probably right I've just double checked the AN00103 it's pretty clear that DSD256 DoP requires 44/49Mhz clock.
I'll do some modification at my hardware then test again.

Still not clear to me why this:

Code: Select all

if(dsdMode == DSD_MODE_DOP && (curSamFreq == 705600)) //DSD256 DoP
	curSamFreq <<= 1; // (?)
causes DSD256 DoP to work with 22MHz crystal.

NOTE:
Not an audio-expert here so maybe I'm testing this wrong but I've followed https://www.youtube.com/watch?v=xXvcgfiN8_0 to setup foobar2000 and used some demo .dsf files and all DSD up to DSD256 Native worked just fine at 1st shot.

Thanks for your support.