How's does MPD 'know' it can output DSD natively?

General Discussion about MPD – anything that doesn't fit in the other MPD forums.
Post Reply
rhoering
Posts: 68
Joined: August 11th, 2014, 2:12 pm

How's does MPD 'know' it can output DSD natively?

Post by rhoering » October 21st, 2014, 1:31 am

Max or Rasi,

In 0.19.x how does MPD determine it can output DSD natively instead of falling back to converting DSD to PCM?

"Native DSD playback is used automatically if available. ... DSD to PCM conversion is the fallback if DSD cannot be used directly."

I created a feature request in Mantas to manually set the DSD output to native so that MPD would not fallback to converting DSD to PCM.

BTW The feature request was closed because I probably added too much commentary. I do think the has feature request has merit as I think my native DSD compatible dac seems to cause MPD to fallback to PCM.

Thanks,

Ron

rhoering
Posts: 68
Joined: August 11th, 2014, 2:12 pm

Re: How's does MPD 'know' it can output DSD natively?

Post by rhoering » October 22nd, 2014, 2:41 pm

Rasi replied in irc that they thought it was alsa that made the determination.

tuxx
Posts: 14
Joined: March 21st, 2015, 5:21 pm

Re: How's does MPD 'know' it can output DSD natively?

Post by tuxx » April 18th, 2015, 11:15 am

My USB interface (DIYINHK) supports native dsd. I am doing my tests on ArchlinuxARM/Udoo Quad with kernel 4, alsa 1.0.29 and vanilla mpd 0.19.9. I have removed the dop "yes" option from mpd.conf and I can't reproduce in native dsd mode:

when dop is enabled, the output is:

Code: Select all

cat /proc/asound/card0/pcm0p/sub0/hw_params 
access: RW_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 176400 (176400/1)
period_size: 22050
buffer_size: 88200
when dop dop is not enabled, the output is:

cat /proc/asound/card0/pcm0p/sub0/hw_params
access: RW_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 352800 (352800/1)
period_size: 32768
buffer_size: 131072

As far as I have understood, I should see DSD_U32_BE in format section instead of S32_LE.
Last edited by tuxx on April 22nd, 2015, 2:38 pm, edited 1 time in total.

max
Forum team
Posts: 608
Joined: January 15th, 2013, 3:43 pm

Re: How's does MPD 'know' it can output DSD natively?

Post by max » April 22nd, 2015, 11:19 am

Wrong. DoP is not "native DSD". It tunnels DSD inside fake S32 samples. It's a horrible kludge, but it appears to work. But it is not "native"!

tuxx
Posts: 14
Joined: March 21st, 2015, 5:21 pm

Re: How's does MPD 'know' it can output DSD natively?

Post by tuxx » April 22nd, 2015, 12:06 pm

We agree max.

the first output is with dop enabled (SR 176400).

The second is with dop disabled. What I see here is that when dop is disabled the output is not native dsd as I expected with mpd 0.19.9.

Latest alsa supports DSD_U32_BE and if I have understood correctly, that should be the correct format for native. (I tested with an mpd fork (mpd-dsd patch for 0.19.9) and the format was DSD_U32_BE).

max
Forum team
Posts: 608
Joined: January 15th, 2013, 3:43 pm

Re: How's does MPD 'know' it can output DSD natively?

Post by max » April 22nd, 2015, 1:00 pm

tuxx wrote:I tested with an mpd fork (mpd-dsd patch for 0.19.9) and the format was DSD_U32_BE).
Sorry, I don't support MPD forks.

tuxx
Posts: 14
Joined: March 21st, 2015, 5:21 pm

Re: How's does MPD 'know' it can output DSD natively?

Post by tuxx » April 22nd, 2015, 2:24 pm

Of course I did not ask for support of mpd forks. All the outputs I have posted here are from vanilla mpd 0.19.9.

This is how i built it:

https://github.com/archphile/packages/b ... e/PKGBUILD

I just mentioned mpd-dsd patch for 0.19.9 because by testing it I was able to see DSD_U32_BE in format section of hw_params.

aplay command also shows DSD_U32_BE as a supported format.

I would really appreciate it if you give us the instructions needed in order to get native dsd support. Alsa is "native" ready, latest kernel is "native" ready for my usb interface, so my mistake must be in mpd configuration.

What else is needed apart from removing/disabling dop option?

Thank you in advance,

Michael

max
Forum team
Posts: 608
Joined: January 15th, 2013, 3:43 pm

Re: How's does MPD 'know' it can output DSD natively?

Post by max » April 22nd, 2015, 7:56 pm

MPD supports only DSD_U8.

Post Reply