2017-03-28 06:16 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0004320MPDMPDpublic2016-11-24 10:07
Reporterrhoering 
Assigned To 
PrioritylowSeverityfeatureReproducibilityalways
StatusnewResolutionopen 
Product Versiongit 
Target VersionFixed in Version 
Summary0004320: DSD DOP Improvement: Have MPD play a short period of silence before it stops sending DoP markers.
DescriptionSymptom: During DSD playback there is a “pop/click” sound when changing tracks or location in within the track.

Reason: DSD only records the difference in level between each sample and during track changes (or a switch from PCM to DSD), the Player no longer sends DoP markers.

Requested Feature: Have MPD play a short period of silence before it stops sending DoP markers.
Steps To Reproduce1) Play a DSF or DFF file via DOP.
2) Change location in the track or change to another track.
Additional Informationhttp://ifi-audio.com/audio_blog/pop-goes-dsd-why-does-this-happen/

Question: Some iFi and non-iFi customers have asked – Why during DSD playback is there a “pop” sound?

Short (layman) answer: This is an inherent characteristic of DSD that is unavoidable.

Long (technical) answer: Please see below.


1. PCM can produce a true zero (silence) output in an instant. When the data stream stops, the DAC is then reset to “zero” for PCM.

2. As DSD only records the difference in level between each sample and during track changes (or a switch from PCM to DSD), the Player no longer sends DoP markers.

3. As a result, the DSD’s output levels (via DSD-DoP) of the DAC output can ‘stick’ at any possible level (almost anything but rarely zero) between the two extremes.

4. When the next song commences, the DAC suddenly receives a new DAC value (usually this new value is zero), which has no relevance to the previous sample- hence the ‘pop’.

5. The only way to reduce this ‘pop’ is to run a small period of silence during these changes. In other words, the playback software must handle this correctly and play a short silence before it stops sending DoP markers.

6. For example: JRiver v19 or higher has this under WASAPI hence no ‘pop’ between changes.

7. Another example: there is no pop when using DSD (native) under JRiver.

8. Onkyo HF Player doesn't have this feature and hence the pop sound.
TagsNo tags attached.
Attached Files

-Relationships
duplicate of 0004286closedcirrus Heavy click when playing a dsf-file over DOP 
+Relationships

-Notes

~0009405

cirrus (administrator)

How shall MPD synthesize "silence"?

~0009407

rhoering (reporter)

Cirrus,

I really understand your point. I was thinking about that myself.

I heard that JRiver had the 'same' issue and 'solved' it.

Here is where one of their engineers spoke to it:

http://yabb.jriver.com/interact/index.php?topic=77883.0

"DoP playback could fall out of DoP mode during a buffer shortfall (like between tracks)."

Just throwing out an idea so forgive its 'correctness' but can we extend the sending of DOP markers for a 'short while' [~100ms] after a DSD track ends.


Another player [Audirvana] has this setting:

http://www.exasound.com/Blog/tabid/74/articleType/ArticleView/articleId/85/Configuring-Audirvana-Plus-15-for-DSD-DXD-Playback-with-exaSound-DACs.aspx

"It is important to set Spl rate switching latency to 0.5 or 1 sec. This option helps with clicks and pops between tracks with different sampling rates."

~0009784

user2038

Last edited: 2016-02-03 08:23

View 2 revisions

Hi all!
I test in DoP many Dac`s, and at latest one i have pop/click!

Ustars Audio at usb-1c1c000.usb-1, high speed : USB Audio (BASED XMOS)

USB_ID(0x040d, 0x3410): /* Audio GD VIA USB-32 DAC */ (BASED VIA Vinyl USB-32)

These two DAC work successfully with the DoP, but rewinding and changing tracks - pop/click ! I tried a lot of settings buffer - did not help.
Version 0.19.12 is the latest

 uname -a
Linux 4.4.0 #1 SMP Fri Jan 15 17:19:44 CET 2016 armv7l GNU/Linux

~0009786

user2038

No ideas?(

~0009788

nevermind (reporter)

I also have a DAC-based XMOS and rewind Clicking this happens in DoP! Can we hope to eliminate the problem?

~0009803

user2038

May be MPD will synthesize not a "silence", instead - sent "MUTE" command in the intervals between switching tracks!!!??

~0009839

user2038

http://dsd-guide.com/dop-open-standard

The 8 most significant bits are used for the DSD marker and alternate with each sample between 0x05 and 0xFA. Each channel within a sample contains the same marker. This has been chosen to minimize the click that might be experienced when the receiving hardware misinterpretes the data as PCM when it really is DSD. If this should happen it would create a tone around 88kHz and roughly -34db, nothing harmful and something that most D/A converters would suppress to some degree before it even reaches the loudspeaker. It should be pointed out that hardware manufacturers and software developers alike can easily use common safeguards to prevent such cases of erroneous format switching and that they may only be limited to times during development of hardware and software. It is their responsibility to prevent misinterpreted cases and to test their products thoroughly before release. Misinterpreation of PCM data as DSD may create less predictable clicks.

Recommended implementation
While there is certainly more than one way to implement this solution on the receiver side, the authors found the following implementation to work reliably:

In order to switch from PCM to DSD mode the receiver has to detect 32 consecutive DSD marker bytes on all channels used.
In order to switch from DSD to PCM mode the receiver has to detect at least 1 single missing DSD marker byte in at least 1 channel.
This introduces an additional latency of around 180usec. If the USB buffers are accessible for reading while the USB microframe is still being received then no additional delay is necessary.

~0009858

user2038

Last edited: 2016-02-29 11:22

View 2 revisions

I think i found solution!
>https://community.roonlabs.com/t/dsd-playback-gives-loud-click-between->tracks/1620/20
>The downloaded DSF no longer have issues with pop, clicks, between, or at the >end of tracks.
>
>Ripped DSF files are hit and miss. Some have loud POP, some have none. I am >going to try out some other extractors to see if they fix the issue.
>
>POP playing first file after system start: Once I changed delay to 500ms, this >went away for DSF or FLAC - thanks for the info.

Can you add delay to 500ms in
a) When start dsd files!
b) When rewinding dsd files!
c) When switching dsd -> dsd or pcm and stop!
Or add this variable in the configuration file!
I will test git version and say result! Thank you!

~0009862

conta (reporter)

Last edited: 2016-03-01 13:55

View 2 revisions

I hear this DOP-click on my Shiit Loki too. It's definitively not good for speakers / headphones...
And also not good for the ears! ;-)

~0009863

user2038

Last edited: 2016-03-02 07:20

View 2 revisions

It took more than a year, and no one took to solve the problem?
I've created just here https://github.com/lintweaker/xmos-native-dsd/issues/11
Maybe you might be interested in something else to add.

~0009870

user2038

May be some help!
http://www.daphile.com/gpl-src/00-Daphile-patches/squeezelite/native-dsd-support.patch

 #if DSD
- " -D [delay]\t\tOutput device supports DSD over PCM (DoP), delay = optional delay switching between PCM and DoP in ms\n"
+#if ALSA
+ " -D [delay][:format]\tOutput device supports DSD, delay = optional delay switching between PCM and DSD in ms\n"
+ " \t\t\t format = dop (default if not specified), u8, u16le, u16be, u32le or u32be.\n"
+#else
+ " -D [delay]\t\tOutput device supports DSD over PCM (DoP), delay = optional delay switching between PCM and DoP in ms\n"
+#endif
 #endif
 #if VISEXPORT
            " -v \t\t\tVisualiser support\n"
@@ -215,8 +220,8 @@
     bool output_mixer_unmute = false;
 #endif
 #if DSD
- bool dop = false;
- unsigned dop_delay = 0;
+ unsigned dsd_delay = 0;
+ dsd_format dsd_outfmt = PCM;
 #endif
 #if VISEXPORT
     bool visexport = false;
@@ -443,9 +448,19 @@
 #endif
 #if DSD
         case 'D':
- dop = true;
+ dsd_outfmt = DOP;
             if (optind < argc && argv[optind] && argv[optind][0] != '-') {
- dop_delay = atoi(argv[optind++]);
+ char *dstr = next_param(argv[optind++], ':');
+ char *fstr = next_param(NULL, ':');
+ dsd_delay = dstr ? atoi(dstr) : 0;
+ if (fstr) {
+ if (!strcmp(fstr, "dop")) dsd_outfmt = DOP;
+ if (!strcmp(fstr, "u8")) dsd_outfmt = DSD_U8;
+ if (!strcmp(fstr, "u16le")) dsd_outfmt = DSD_U16_LE;
+ if (!strcmp(fstr, "u32le")) dsd_outfmt = DSD_U32_LE;
+ if (!strcmp(fstr, "u16be")) dsd_outfmt = DSD_U16_BE;
+ if (!strcmp(fstr, "u32be")) dsd_outfmt = DSD_U32_BE;
+ }
             }
             break;
 #endif
@@ -571,7 +586,7 @@
     }
 
 #if DSD
- dop_init(dop, dop_delay);
+ dsd_init(dsd_outfmt, dsd_delay);
 #endif

~0009871

user2038

+ if (output.outfmt != output.next_fmt) {
+ delay = output.dsd_delay;

~0010075

VAMP (reporter)

Hi!
Install new version of MPD
https://bugs.musicpd.org/view.php?id=4550
But nevermind ((
I so ckic`s wnen switch tracks (( .
cry

~0010176

archphile (reporter)

I did some tests with a freshly compiled MPD 0.19.19 using two dacs and DSD64 material:

TEST I

I used AUNE S16 (XMOS Based):

Card 1, ID `DAC', name `S16 USB DAC'
  Device 0, ID `USB Audio', name `USB Audio', 1 subdevices (1 available)
    2 channels, sampling rate 44100..384000 Hz
    Sample formats: S32_LE
      Subdevice 0, name `subdevice #0'


With DoP enabled, the output is:

closed
access: RW_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 176400 (176400/1)
period_size: 22050
buffer_size: 88200

and there's no improvement with regards to clicks when changing tracks/pause etc..

TEST II

Diy 9018k2m with DIYINHK xmos board:

Card 1, ID `D20', name `DIYINHK USB Audio 2.0'
  Device 0, ID `USB Audio', name `USB Audio', 1 subdevices (1 available)
    2 channels, sampling rate 44100..384000 Hz
    Sample formats: S16_LE, S32_LE, SPECIAL, DSD_U32_BE

The output is:

closed
access: RW_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 176400 (176400/1)
period_size: 22050
buffer_size: 88200

and the result is fine. No clicks, reproduction is just fine. In past MPD versions I had problems with clicks with this dac too.

I hope this feedback helps.

~0010181

VAMP (reporter)

archphile, thank you!
I see you're using two types of play!
01) Dop
02) Native
If for the second DAC-a (which has support Native DSD) include DoP
It is also good to play?

~0010183

VAMP (reporter)

9018k2m in Dop mode have clicks?

~0010184

VAMP (reporter)

I think the patch need to improve, and to Dop mode, too, was not clicks!
+Notes

-Issue History
Date Modified Username Field Change
2015-02-24 17:55 rhoering New Issue
2015-03-05 10:30 cirrus Note Added: 0009405
2015-03-05 16:26 rhoering Note Added: 0009407
2015-06-22 18:51 cirrus Relationship added duplicate of 0004286
2016-02-03 08:21 user2038 Note Added: 0009784
2016-02-03 08:23 user2038 Note Edited: 0009784 View Revisions
2016-02-09 10:54 user2038 Note Added: 0009786
2016-02-11 11:00 nevermind Note Added: 0009788
2016-02-23 10:49 user2038 Note Added: 0009803
2016-02-28 12:43 user2038 Note Added: 0009839
2016-02-29 11:20 user2038 Note Added: 0009858
2016-02-29 11:22 user2038 Note Edited: 0009858 View Revisions
2016-03-01 13:55 conta Note Added: 0009862
2016-03-01 13:55 conta Note Edited: 0009862 View Revisions
2016-03-01 18:28 user2038 Note Added: 0009863
2016-03-02 07:20 user2038 Note Edited: 0009863 View Revisions
2016-03-10 21:55 user2038 Note Added: 0009870
2016-03-10 22:02 user2038 Note Added: 0009871
2016-08-09 18:44 VAMP Note Added: 0010075
2016-11-07 11:35 archphile Note Added: 0010176
2016-11-22 22:20 VAMP Note Added: 0010181
2016-11-24 10:05 VAMP Note Added: 0010183
2016-11-24 10:07 VAMP Note Added: 0010184
+Issue History