Free adjusting of the samplingrate

Hi,
I had some jitter on my CM106-USB-Sound-Card connect via SPDIF. Best samplingrate in that environment is 48kHz.
This option isn’t offered volumios webinterface. Directly editing of /etc/mpd.conf won’t help, because it will by overwritten.
So here is my solution that works well:
Edit /var/www/mpd-config.php
search for “// audio_output_format”
there you find php-code that sets the sampling rate:

$_mpd_select['audio_output_format'] .= "<option value=\"disabled\" ".(($_mpd['audio_output_format'] == 'disabled' OR $_mpd['audio_output_format'] == '') ? "selected" : "").">disabled</option>\n"; $_mpd_select['audio_output_format'] .= "<option value=\"44100:16:2\" ".(($_mpd['audio_output_format'] == '44100:16:2') ? "selected" : "").">16 bit / 44.1 khz</option>\n";
copy/paste one line and modify it:

$_mpd_select['audio_output_format'] .= "<option value=\"disabled\" ".(($_mpd['audio_output_format'] == 'disabled' OR $_mpd['audio_output_format'] == '') ? "selected" : "").">disabled</option>\n"; $_mpd_select['audio_output_format'] .= "<option value=\"44100:16:2\" ".(($_mpd['audio_output_format'] == '44100:16:2') ? "selected" : "").">16 bit / 44.1 khz</option>\n"; $_mpd_select['audio_output_format'] .= "<option value=\"48000:16:2\" ".(($_mpd['audio_output_format'] == '48000:16:2') ? "selected" : "").">16 bit / 48.0 khz</option>\n";
after that php5 has to reread the source. For that do a restart of that demon:

/etc/init.d/php5-fpm restart

Now you can select your sampling in the webinterface. If there are problems with these settings look at /var/log/mpd/mpd.log

Enjoy your new sampling-rate.

Yours
Arne