MusicPlayerDaemon / MPD

Music Player Daemon
https://www.musicpd.org/
GNU General Public License v2.0
2.17k stars 350 forks source link

Please restore the DSD_NATIVE configuration parameter #911

Closed lgo51 closed 4 years ago

lgo51 commented 4 years ago

In previous versions of MPD [fedora 22], maybe v.0.19?, there was a configuration parameter to en/dis-able NativeDSD output. Yes, I know that an attached USB DAC is now auto-probed for NativeDSD support, which is all well and good and we love that.

However, there are semi-common situations where the USB-borne Digital Audio data stream has an intermediary processing stop - e.g. a USB-to-S/PDIF converter - which effectively shields the ALSA USB port from seeing the [next connected] DAC's capabilities. This raises the need to use ALSA Output's ALLOWED_FORMATS configuration parameter to map the 'real' DAC's capabilities for MPD's use.

Unfortunately, as it operates now, if the attached USB device signals the ability to decode NATIVE_DSD, that is fully dominant and overrides any of the ALLOWED_FORMATS specifications.

In-the-old-days this situation was easily handled by simply setting the NATIVE_DSD configuration parameter to False... effectively disabling NativeDSD, and if the DOP parameter was also False, then the DSD media was simply transcoded to PCM [not to be confused with packing into a DoP wrapper] and rendered accordingly -- the desired action!

Thanks in advance for restoring this necessary functionality.

Cheers

P.S. It seems that the Global Output Format configuration parameter will effectively disable DSD processing and force transcoding. However, that is highly depreciated due to the single-setting nature of the parameter, which effectively 'straps' the output audio stream to that singular setting, thereby requiring re-sampling [up or down] for any other media format... sigh.

MaxKellermann commented 4 years ago

Sorry, there never was such an option in MPD! You did not describe what this option does, and I don't understand your description of the problem. So you have a USB-to-SPDIF converter which indicates that it has native DSD support, when in fact it does not - right?

lgo51 commented 4 years ago

DSD_NATIVE and DSD_TYPE signaled that the attached DAC was NativeDSD capable and if it was 8-bit, type=0, or 32-bit, type=2

The particular v0.19.? MPD may have been tailored w/o my knowledge.

Nevertheless.... issue can be illustrated with an example: ALSA-USB >==USB==> USB:S/PDIF >==COAX==> DAC USB converter is XMOS based and supports both DoP and NativeDSD as well as 384k max sample-rate DAC supports neither DSD format and has a 192k/24b max SR/BD ability

With a DSD_NATIVE config option, one could simply negate that and disable DSD transport, thereby opting for DSD --> PCM transcoding for all DSD media

Sample-rate issues are then easily addressed with ALSA OUTPUT configuration options FORMAT and ALLOWED_FORMATS

Hope that's clearer! Cheers

MaxKellermann commented 4 years ago

So..... just use allowed_formats! It does what you want!

lgo51 commented 4 years ago

Thanks Max... would not have guessed that from the doc... glad to know there's a solution.