MPD icon indicating copy to clipboard operation
MPD copied to clipboard

Max audio format

Open vbabiy opened this issue 4 years ago • 10 comments

Question

If I have a DAC that supports up to 96k/24bit is there a way to configure MPD to resample anything over this?

vbabiy avatar Mar 27 '20 16:03 vbabiy

MPD will automatically stay within the limits given by your ALSA driver, and will downsample if the sample rate is too high. Does that answer your question or do you have problems with that?

MaxKellermann avatar Mar 28 '20 10:03 MaxKellermann

MPD will automatically stay within the limits given by your ALSA driver, and will downsample if the sample rate is too high. Does that answer your question or do you have problems with that?

I also have same problem like vbabiy. But I dont know how to config the limitation in ALSA. Could you support me? Thank you in advance.

maitrang1217 avatar Mar 29 '20 05:03 maitrang1217

vbabiy did not describe a problem. Describe your problem, @maitrang1217!

MaxKellermann avatar Mar 29 '20 08:03 MaxKellermann

vbabiy did not describe a problem. Describe your problem, @maitrang1217!

I used M2TECH hifaceTWO to plug into my PI3B+ with Moode installed. The hifaceTWO supports sample rate up to 192Khz. The ouput of hifaceTWO is connected to my DAC. The DAC only support 96Khz.

When I play file that <= 96 Khz, everything is OK. But when I play file that > 96Khz, no sound output on my system.

Because I prefer bit-perfect so I need an option that keeps everything <= 96Khz, and resample anything over 96Khz.

As you said above that need some config in ALSA, but I am not family with it. Could you guide me to do that ?

maitrang1217 avatar Mar 29 '20 15:03 maitrang1217

So the problem is that your ALSA kernel driver (for the hifaceTWO) supports 192kHz, but the DAC connected to it does not, and the ALSA kernel driver doesn't know about it. And as a workaround for this flaw, you want MPD to work around it by imposing an additional limit, right?

MaxKellermann avatar Mar 29 '20 15:03 MaxKellermann

So the problem is that your ALSA kernel driver (for the hifaceTWO) supports 192kHz, but the DAC connected to it does not, and the ALSA kernel driver doesn't know about it. And as a workaround for this flaw, you want MPD to work around it by imposing an additional limit, right?

Yes, if you could impose an additional limit, it is great. Or simpler, pls show me how to config alsa for that. Thank you so much.

maitrang1217 avatar Mar 29 '20 16:03 maitrang1217

@MaxKellerman I have a few use cases. In one setup I use pulse and I can't play all DSF files, some playback at what seems like 1/2 speed. The other use case is I have a DAC that can play DSD256 but not DSD512 and just outputs scrambled audio. I would like to be able to set up Max outputs to make sure that doesn't happen.

vbabiy avatar Mar 30 '20 17:03 vbabiy

@vbabiy then why does your kernel driver not limit the sample rate? MPD obeys the limitations given to it by ALSA. And these kernel-side limitations should be enough.

MaxKellermann avatar Mar 30 '20 17:03 MaxKellermann

@MaxKellermann how can I compare what the kernel is report compared to alsa?

vbabiy avatar Apr 27 '20 00:04 vbabiy

Just add this line to your alsa output in mpd.conf to resample anything over 96khz.

allowed_formats "96000:32:2 88200:32:2 48000:32:2 44100:32:2 96000:24:2 88200:24:2 48000:24:2 44100:24:2 96000:16:2 88200:16:2 48000:16:2 44100:16:2 96000:32:1 88200:32:1 48000:32:1 44100:32:1 96000:24:1 88200:24:1 48000:24:1 44100:24:1 96000:16:1 88200:16:1 48000:16:1 44100:16:1" 

}

snake3ca avatar May 23 '20 22:05 snake3ca