Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: DSD1024 support
#11
Could be the dsdiff codec plugin does not support dsd1024.

Here's the ref in MPD docs
https://github.com/MusicPlayerDaemon/MPD...rst#dsdiff

I'm not sure where the sources are for this codec, GitHub, SourceForge ?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#12
If the same file is played not in DSD mode, but enable SoX resampling, everything works and there is a sound. On the mobile phone, the same file is played perfectly with the help of Aimp player.
Reply
#13
So, it should normally decode
Reply
#14
Doing SoX or Aimp on you phone converts to PCM and thats probably a different codec chain than is used for decoding and outputting the DFF file in native format for output over USB.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#15
@Tim Curtis

So, digging through the MPD gitbuh repo I came across this snippet in MPD/src/decoder/plugins/DsdLib.cxx

Code:
dsdlib_valid_freq(uint32_t samplefreq) noexcept
{
       switch (samplefreq) {
       case 2822400: /* DSD64, 64xFs, Fs = 44.100kHz */
       case 3072000: /* DSD64 with Fs = 48.000 kHz */
       case 5644800:
       case 6144000:
       case 11289600:
       case 12288000:
       case 22579200:/* DSD512 */
       case 24576000:
               return true;

       default:
               return false;
       }

The last case entry in the switch statement corresponds to DSD512/48kHz. No entry that corresponds to DSD1024, either 44.1kHz or 48kHz. This function is called from MPD/src/decoder/plugins/DsdDecoderPlugin.cxx.

Not conclusive but suggestive that the DSDIFF plugin tops out at DSD512.

I'll ask the MPD folk to confirm.

This still leaves unanswered why mediainfo doesn't return "Commercial name: DSD1024" as part of its output for our sample file. I note that DSD/DSF/DFF are not even mentioned on the https://mediaarea.net/en/MediaInfo/Support/Formats page. I haven't looked for/a their source code.

Regards,
Kent
Reply
#16
Remember, a little more than a year ago you found a problem in formatRate() in playerlib? Elements for dsd256 and dsd512 were absent, you added them. And dsd1024 you added too? )
Reply
#17
@Igorf11, yes thats correct there is code block for DSD1024 in Audio Info but it's only meant to print what ALSA and MPD report for the audio file and playback params.

@TheOldPresbyope, Looking at the lib code it does suggest that there is no support for 1024 DSD. 

I ran a few tests with the file using my Revolution DAC which claims support up to DSD512. The highest I've ever tested is DSD256 though.

First I had to switch ALSA output mode to "Direct (hw)" in Audio Config to get the file to play and then what happens is MPD and ALSA negotiate an output format based on the file and what the audio device reports its capabilities are and I end up with heavily glitched audio due to decoder DSD -> PCM conversion XRUNS.

I think if OP wants to pursue further he could post an issue in the MPD Git repo with a generic test case using stock Bullseye 64 bit Lite and latest version of MPD.

pi@sig:~ $ moodeutl -F
*** Scanning for playback devices ***
Card 0, ID `b1', name `bcm2835 HDMI 1'
Card 1, ID `Headphones', name `bcm2835 Headphones'
Card 2, ID `Revolution', name `Revolution'
 Device 0, ID `USB Audio', name `USB Audio', 1 subdevices (1 available)
   2 channels, sampling rate 44100..705600 Hz
   Sample formats: S16_LE, S32_LE, SPECIAL, DSD_U32_BE
   Buffer size range from 16 to 262144
   Period size range from 8 to 131072

     Subdevice 0, name `subdevice #0'
pi@sig:~ $

MPD verbose log

Jul 11 14:36 : client: [139] process command "play"
Jul 11 14:36 : alsa_output: opened _audioout type=COPY
Jul 11 14:36 : alsa_output: buffer: size=178..131072 time=252..185760
Jul 11 14:36 : alsa_output: period: size=89..65536 time=126..92880
Jul 11 14:36 : alsa_output: default period_time = buffer_time/4 = 185759/4 = 46439
Jul 11 14:36 : alsa_output: format=DSD_U32_BE (Direct Stream Digital, 4-byte (x32), big endian, oldest bits in MSB)
Jul 11 14:36 : alsa_output: buffer_size=131072 period_size=32768
Jul 11 14:36 : output: opened "ALSA Default" (alsa) audio_format=dsd512:2
Jul 11 14:36 : soxr: soxr engine 'cr32'
Jul 11 14:36 : soxr: soxr precision=20, phase_response=50.00, passband_end=0.91, stopband_begin=1.00
Jul 11 14:36 : soxr: samplerate conversion ratio to 0.46
Jul 11 14:36 : exception: Failed to convert for "ALSA Default" (alsa); PCM conversion from f to dsd is not implemented
Jul 11 14:36 : output: Retrying without DSD
Jul 11 14:36 : alsa_output: opened _audioout type=COPY
Jul 11 14:36 : alsa_output: buffer: size=178..131072 time=252..185760
Jul 11 14:36 : alsa_output: period: size=89..65536 time=126..92880
Jul 11 14:36 : alsa_output: default period_time = buffer_time/4 = 185759/4 = 46439
Jul 11 14:36 : alsa_output: format=S32_LE (Signed 32 bit Little Endian)
Jul 11 14:36 : alsa_output: buffer_size=131072 period_size=32768
Jul 11 14:36 : output: opened "ALSA Default" (alsa) audio_format=705600:32:2
Jul 11 14:36 : soxr: soxr engine 'cr32'
Jul 11 14:36 : soxr: soxr precision=20, phase_response=50.00, passband_end=0.91, stopband_begin=1.00
Jul 11 14:36 : soxr: samplerate conversion ratio to 0.11
Jul 11 14:36 : output: converting in=6144000:dsd:2 -> f=6144000:dsd:2 -> out=705600:32:2
Jul 11 14:36 : alsa_output: Decoder is too slow; playing silence to avoid xrun
.
.
.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Forum Jump: