Post Reply 
Let's brainstorm..Setting up MinimServer to feed a USB DAC
26-11-2013, 22:41
Post: #41
RE: Let's brainstorm..Setting up MinimServer to feed a USB DAC
(26-11-2013 22:23)simoncn Wrote:  Thanks for these suggestions. The file appears to start playing for a fraction of a second and then stops immediately (no timer numbers). I'm attaching a debug log. I've left the player property as its default setting of player=mpd. Should it be OK to play a WAV file, or would some other format work better?

Update: I changed to mplayer instead of mpd and now the timer numbers are increasing as they should be. I looked at the MinimServer debug log from using mpd and it looked like mpd wasn't happy with the HTTP responses that MinimServer was sending to mpd's GET requests. Have you tried the combination of mpd and MinimServer?
Find all posts by this user
Quote this message in a reply
26-11-2013, 22:49
Post: #42
RE: Let's brainstorm..Setting up MinimServer to feed a USB DAC
(26-11-2013 22:23)simoncn Wrote:  Thanks for these suggestions. The file appears to start playing for a fraction of a second and then stops immediately (no timer numbers). I'm attaching a debug log. I've left the player property as its default setting of player=mpd. Should it be OK to play a WAV file, or would some other format work better?

Hi Simon,

Thanks for testing again.
It looks like mediaplayer is passing the file to mpd, but for some reason mpd is not playing the file.

Code:
2013-11-26 21:11:19,854 [Thread-5] DEBUG [org.rpi.radio.parsers.FileParser] WAV File: http://192.168.0.10:9790/minimserver/*/music/musicfiles/HMA1951727/01*20-*20Kyrie*20-*20Christe*20-*20Kyrie.flac/$!transcode-24.wav
2013-11-26 21:11:19,878 [Thread-5] DEBUG [org.rpi.mpdplayer.MPDPlayer] ADD TO PLAYLIST{Id=6}
2013-11-26 21:11:20,528 [Thread-0] DEBUG [org.rpi.mpdplayer.StatusMonitor] Song Changed From : 5 To: 6
2013-11-26 21:11:20,558 [Thread-0] DEBUG [org.rpi.mpdplayer.MPDPlayer] Status Changed: Stopped
2013-11-26 21:11:20,559 [Thread-0] DEBUG [org.rpi.player.PlayManager] Track Stopped, get Next Track
2013-11-26 21:11:20,560 [Thread-0] INFO  [org.rpi.player.PlayManager] We have Reached the End of the PlayList

I have tested wav files but not 24bit wav files.

If may be worth trying a different file format, or if using Kinsky try playing one of the radio sources.

Also another thing to look at would be the mpd log file
In the mpd config file the log level can be set, the config file is in the directory
Code:
/etc/mpd.conf
there is a setting for the log file
log_level
if you can set that to verbose and send me the log which can be found in the directory
/var/log/mpd

If you get time it might also be worth trying to install mplayer
Code:
sudo apt-get install mplayer

And then you can test the playback without using mediaplayer by using the command
Code:
mplayer <url>

for example

Code:
mplayer http://192.168.0.10:9790/minimserver/*/music/musicfiles/HMA1951727/01*20-*20Kyrie*20-*20Christe*20-*20Kyrie.flac/$!transcode-24.wav

Thanks again,

Pete.
Find all posts by this user
Quote this message in a reply
26-11-2013, 23:20
Post: #43
RE: Let's brainstorm..Setting up MinimServer to feed a USB DAC
The problem with MPD occurs with WAV files (16-bit and 24-bit) but not with FLAC files. Here's the relevant portion of the MPD verbose log:

Code:
Nov 26 22:12 : client: command_process_list: process command "clear"
Nov 26 22:12 : client: command_process_list: command returned 0
Nov 26 22:12 : client: command_process_list: process command "addid http://192.168.0.10:9790/minimserver/*/music/musicfiles/HMA1951727/01*20-*20Kyrie*20-*20Christe*20-*20K$
Nov 26 22:12 : add to playlist: http://192.168.0.10:9790/minimserver/*/music/musicfiles/HMA1951727/01*20-*20Kyrie*20-*20Christe*20-*20Kyrie.flac/$!transcode.wav
Nov 26 22:12 : database: get song: http://192.168.0.10:9790/minimserver/*/music/musicfiles/HMA1951727/01*20-*20Kyrie*20-*20Christe*20-*20Kyrie.flac/$!transcode.wav
Nov 26 22:12 : client: command_process_list: command returned 0
Nov 26 22:12 : client: command_process_list: process command "play 0"
Nov 26 22:12 : playlist: play 0:"http://192.168.0.10:9790/minimserver/*/music/musicfiles/HMA1951727/01*20-*20Kyrie*20-*20Christe*20-*20Kyrie.flac/$!transcode.wav"
Nov 26 22:12 : decoder_thread: clearing mixramp tags
Nov 26 22:12 : decoder_control: mixramp_start = NULL
Nov 26 22:12 : decoder_control: mixramp_prev_end = NULL
Nov 26 22:12 : client: command_process_list: command returned 0
Nov 26 22:12 : client: [0] process command list returned 0
Audio File Library: unrecognized audio file format [error 0]
Nov 26 22:12 : audiofile: failed to input stream
Nov 26 22:12 : playlist: stop

MinimServer is sending the WAV file with a MIME type of audio/x-wav. Does MPD recognise this value?
Find all posts by this user
Quote this message in a reply
27-11-2013, 00:28
Post: #44
RE: Let's brainstorm..Setting up MinimServer to feed a USB DAC
(23-11-2013 13:08)PeteManchester Wrote:  I have used it with a Sabre U2 Async DAC, Prodigy Cube DAC and also tested the new UD110 v2 DAC.

It's not as good as a Linn DS :-) but it seems to work ok.

I'm listening to this via the built-in audio output connected to a pair of decent speakers. The sound quality is better than I was expecting, with some occasional minor glitches. I'd like to try a USB DAC next. Of the ones you have listed, which would be your recommendation?
Find all posts by this user
Quote this message in a reply
27-11-2013, 12:34
Post: #45
RE: Let's brainstorm..Setting up MinimServer to feed a USB DAC
(26-11-2013 23:20)simoncn Wrote:  The problem with MPD occurs with WAV files (16-bit and 24-bit) but not with FLAC files. Here's the relevant portion of the MPD verbose log:

Code:
Nov 26 22:12 : client: command_process_list: process command "clear"
Nov 26 22:12 : client: command_process_list: command returned 0
Nov 26 22:12 : client: command_process_list: process command "addid http://192.168.0.10:9790/minimserver/*/music/musicfiles/HMA1951727/01*20-*20Kyrie*20-*20Christe*20-*20K$
Nov 26 22:12 : add to playlist: http://192.168.0.10:9790/minimserver/*/music/musicfiles/HMA1951727/01*20-*20Kyrie*20-*20Christe*20-*20Kyrie.flac/$!transcode.wav
Nov 26 22:12 : database: get song: http://192.168.0.10:9790/minimserver/*/music/musicfiles/HMA1951727/01*20-*20Kyrie*20-*20Christe*20-*20Kyrie.flac/$!transcode.wav
Nov 26 22:12 : client: command_process_list: command returned 0
Nov 26 22:12 : client: command_process_list: process command "play 0"
Nov 26 22:12 : playlist: play 0:"http://192.168.0.10:9790/minimserver/*/music/musicfiles/HMA1951727/01*20-*20Kyrie*20-*20Christe*20-*20Kyrie.flac/$!transcode.wav"
Nov 26 22:12 : decoder_thread: clearing mixramp tags
Nov 26 22:12 : decoder_control: mixramp_start = NULL
Nov 26 22:12 : decoder_control: mixramp_prev_end = NULL
Nov 26 22:12 : client: command_process_list: command returned 0
Nov 26 22:12 : client: [0] process command list returned 0
Audio File Library: unrecognized audio file format [error 0]
Nov 26 22:12 : audiofile: failed to input stream
Nov 26 22:12 : playlist: stop

MinimServer is sending the WAV file with a MIME type of audio/x-wav. Does MPD recognise this value?

Hi Simon,

I've tested with minimserver transcoding set to wav24 and for me it works

Code:
Nov 27 11:13 : database: get song: http://192.168.1.133:9790/minimserver/*/Music/New*20Order/(the*20best*20of)*20New*20Order/1-01-True*20Faith-94.flac/$!transcode-24.wav
Nov 27 11:13 : client: command_process_list: command returned 0
Nov 27 11:13 : client: command_process_list: process command "play 0"
Nov 27 11:13 : playlist: play 0:"http://192.168.1.133:9790/minimserver/*/Music/New*20Order/(the*20best*20of)*20New*20Order/1-01-True*20Faith-94.flac/$!transcode-24.wav"
Nov 27 11:13 : decoder_thread: clearing mixramp tags
Nov 27 11:13 : decoder_control: mixramp_start = NULL
Nov 27 11:13 : decoder_control: mixramp_prev_end = NULL
Nov 27 11:13 : client: command_process_list: command returned 0
Nov 27 11:13 : client: [0] process command list returned 0
Audio File Library: unrecognized audio file format [error 0]
Nov 27 11:13 : audiofile: failed to input stream
Nov 27 11:13 : ffmpeg: detected input format 'wav' (WAV format)
Nov 27 11:13 : ffmpeg/pcm_s24le: err{or,}_recognition separate: 1; 1
Nov 27 11:13 : ffmpeg/pcm_s24le: err{or,}_recognition combined: 1; 1
Nov 27 11:13 : ffmpeg/wav: max_analyze_duration reached
Nov 27 11:13 : ffmpeg/pcm_s24le: err{or,}_recognition separate: 1; 1
Nov 27 11:13 : ffmpeg/pcm_s24le: err{or,}_recognition combined: 1; 1
Nov 27 11:13 : decoder: audio_format=44100:32:2, seekable=true
Nov 27 11:13 : alsa: buffer: size=256..16384 time=5804..371520
Nov 27 11:13 : alsa: period: size=256..16384 time=5804..371520
Nov 27 11:13 : alsa: default period_time = buffer_time/4 = 371519/4 = 92879
Nov 27 11:13 : alsa: buffer_size=16384 period_size=4096
Nov 27 11:13 : output: opened plugin=alsa name="My ALSA Device" audio_format=44100:16:2
Nov 27 11:13 : output: converting from 44100:32:2

I think there is a small issue in that mpd detects the file as being 32bit, I have seen it do that before..

In my mpd.conf file I have the following setting for the AudioOutput

Code:
audio_output {
    type        "alsa"
    name        "My ALSA Device"
    device        "hw:0,0"    # optional
    format        "44100:32:2"    # optional
    mixer_device    "default"    # optional
    mixer_control    "PCM"        # optional
    mixer_index    "0"        # optional
}



In this case I am using the built in audio and so it converts back to 16bit
Code:
Nov 27 11:13 : output: opened plugin=alsa name="My ALSA Device" audio_format=44100:16:2
Nov 27 11:13 : output: converting from 44100:32:2

When I use my Sabre U2 Async DAC it outputs 24bit
Code:
Nov 27 11:26 : output: opened plugin=alsa name="My ALSA Device" audio_format=44100:24_3:2
Nov 27 11:26 : output: converting from 44100:32:2

When I use my Stoner Acoustics Ud110 v2 DAC it claims to output 32bit

Code:
Nov 27 11:30 : output: opened plugin=alsa name="My ALSA Device" audio_format=44100:32:2
Find all posts by this user
Quote this message in a reply
27-11-2013, 12:51
Post: #46
Shocked RE: Let's brainstorm..Setting up MinimServer to feed a USB DAC
(27-11-2013 00:28)simoncn Wrote:  
(23-11-2013 13:08)PeteManchester Wrote:  I have used it with a Sabre U2 Async DAC, Prodigy Cube DAC and also tested the new UD110 v2 DAC.

It's not as good as a Linn DS :-) but it seems to work ok.

I'm listening to this via the built-in audio output connected to a pair of decent speakers. The sound quality is better than I was expecting, with some occasional minor glitches. I'd like to try a USB DAC next. Of the ones you have listed, which would be your recommendation?

Hi Simon,

The Prodigy Cube is ok, actually it's better than ok, it's good but the other two are better and cheaper

The HifiMeDIY U2 Async DAC is very good, it supports upto 24bit and sounds very good. It comes in a nice case.

The Stoner Acoustics UD110 is my favorite at the moment, it supports 16 and 32bit, sounds very clear. The only issue is that it does not support hardware volume control like the U2 does, i have passed my comments back to the developer, but there are ways around this by configuring the mixer_type in mpd to be software controlled rather than hardware. the UD110 just comes as the PCB covered in heatshrink tubing.

Between the U2 and the UD110 there is not a big difference in sound or price.

If you were to chose the UD110 make sure you ask for a UD110 v2, the original version would not work on any of my raspis.

PS I've got some hearing loss and slight tinnitus, so I may not be the best judge :-)
Find all posts by this user
Quote this message in a reply
27-11-2013, 12:56
Post: #47
RE: Let's brainstorm..Setting up MinimServer to feed a USB DAC
(27-11-2013 12:34)PeteManchester Wrote:  I think there is a small issue in that mpd detects the file as being 32bit, I have seen it do that before..

In my mpd.conf file I have the following setting for the AudioOutput

Code:
audio_output {
    type        "alsa"
    name        "My ALSA Device"
    device        "hw:0,0"    # optional
    format        "44100:32:2"    # optional
    mixer_device    "default"    # optional
    mixer_control    "PCM"        # optional
    mixer_index    "0"        # optional
}

I made this change to my mpd.conf file and restarted mpd and mediaplayer, but I'm still unable to play any WAV files (16-bit or 24-bit). Are there any other configuration settings I might need to change?
Find all posts by this user
Quote this message in a reply
27-11-2013, 15:26 (This post was last modified: 27-11-2013 15:33 by PeteManchester.)
Post: #48
RE: Let's brainstorm..Setting up MinimServer to feed a USB DAC
(27-11-2013 12:56)simoncn Wrote:  I made this change to my mpd.conf file and restarted mpd and mediaplayer, but I'm still unable to play any WAV files (16-bit or 24-bit). Are there any other configuration settings I might need to change?

I have managed to recreate the issue, by editing my mpd.conf to disable the ffmpeg codec

Code:
decoder {
plugin "ffmpeg"
enabled "no"
}

With the codec disabled I cannot play wav files and also when playing flac files there are a lot of crackles and pops..

So it looks as though you either don't have the ffmpeg codec installed for some reason or the codec is not working.

I have googled to find out how the codec is installed with mpd but have not had much success yet.

I will carry on looking but in the meantime I have attached my mpd.conf file, although by default mpd works without making any changes, the changes I have made are just tweaks.

What version of rapsian do you have installed, from the logs it looks like the hard float version , is it an old version?

Thanks,

Pete.


Attached File(s)
.txt  mpd_conf.txt (Size: 14.17 KB / Downloads: 2)
Find all posts by this user
Quote this message in a reply
27-11-2013, 16:33
Post: #49
RE: Let's brainstorm..Setting up MinimServer to feed a USB DAC
(27-11-2013 15:26)PeteManchester Wrote:  I have managed to recreate the issue, by editing my mpd.conf to disable the ffmpeg codec

Code:
decoder {
plugin "ffmpeg"
enabled "no"
}

With the codec disabled I cannot play wav files and also when playing flac files there are a lot of crackles and pops..

So it looks as though you either don't have the ffmpeg codec installed for some reason or the codec is not working.

I have googled to find out how the codec is installed with mpd but have not had much success yet.

I will carry on looking but in the meantime I have attached my mpd.conf file, although by default mpd works without making any changes, the changes I have made are just tweaks.

What version of rapsian do you have installed, from the logs it looks like the hard float version , is it an old version?

Thanks,

Pete.

Thanks for this pointer to the probable cause of the problem.

I am using the hard-float version. I believe Raspbian (as opposed to Debian) is always hard-float. Are you using hard-float Raspbian as well?

I installed the full Raspbian image earlier this year (about March or April) and I have just done a full upgrade to the the latest levels of all packages using apt-get update and apt-get upgrade. However, this would not install any new packages that are now part of the latest image but weren't part of the image I originally installed (for example, Oracle Java).

I've done some customization of my image, so it would be extra work for me to start again from scratch with the latest image, especially as I didn't make complete notes on everything that I customized.

I have chosen to install libav/avconv on my Pi instead of FFmpeg. On Debian, libav is preferred to ffmpeg, and the Debian ffmpeg package is a deprecated wrapper that calls libav. I will investigate whether mpd can be configured to use libav/avconv instead of ffmpeg.
Find all posts by this user
Quote this message in a reply
27-11-2013, 16:57
Post: #50
RE: Let's brainstorm..Setting up MinimServer to feed a USB DAC
(27-11-2013 16:33)simoncn Wrote:  Thanks for this pointer to the probable cause of the problem.

I am using the hard-float version. I believe Raspbian (as opposed to Debian) is always hard-float. Are you using hard-float Raspbian as well?

I installed the full Raspbian image earlier this year (about March or April) and I have just done a full upgrade to the the latest levels of all packages using apt-get update and apt-get upgrade. However, this would not install any new packages that are now part of the latest image but weren't part of the image I originally installed (for example, Oracle Java).

I've done some customization of my image, so it would be extra work for me to start again from scratch with the latest image, especially as I didn't make complete notes on everything that I customized.

I have chosen to install libav/avconv on my Pi instead of FFmpeg. On Debian, libav is preferred to ffmpeg, and the Debian ffmpeg package is a deprecated wrapper that calls libav. I will investigate whether mpd can be configured to use libav/avconv instead of ffmpeg.

Hi Simon,

I've got it working on both hardfloat and softfloat, although I've not tested wav16 and 32 on the softfloat yet.

Sorry I'm on a steep learning curve with mpd at the moment, it looks like mpd does use libav as you suggest. I found these instructions on how to compile mpd and libav is part of the pre reqs.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)