I recently got a RasPi and wanted to feed audio via HDMI to my Onkyo AV-receiver. So far most of it worked out of the box or with some setup respectively. But I encountered a rather anoying problem. Everytime I switch to the next song or substitute elements in the playlist with some others the mpd server as well the used client (ncmpcpp and mpdroid) hang and nothing helps except a hard reboot. I really want to use pulseaudio since I soon will be adding XBMC to the mix and MPD and XBMC won't have to fight over the hdmi sink. the following log-excerpt is a common case how everything gets borked.
$this->bbcode_second_pass_code('', '[pan@hermes ~]$ /usr/bin/mpd --stdout --no-daemon --verbose
config_file: loading file /etc/mpd.conf
path: SetFSCharset: fs charset is: UTF-8
libsamplerate: libsamplerate converter 'Fastest Sinc Interpolator'
opus: libopus 1.1
db: reading DB
curl: version 7.37.1
curl: with OpenSSL/1.0.1i
soundcloud: disabling the soundcloud playlist plugin because API key is not set
daemon: opening pid file
daemon: writing pid file
avahi: Initializing interface
avahi: Client changed to state 2
avahi: Client is RUNNING
avahi: Registering service _mpd._tcp/Music Player
avahi: Service group changed to state 0
avahi: Service group is UNCOMMITED
state_file: Loading state file /home/pan/.mpd/state
playlist: queue song 1:"Coldplay/Viva La Vida or Death and All His Friends/02 Cemeteries of London.mp3"
avahi: Service group changed to state 1
avahi: Service group is REGISTERING
decoder_thread: probing plugin mad
mad: detected LAME version 3.99 ("LAME3.99r")
mad: LAME peak found: 0.000000
mad: LAME track gain found: -6.200000
mad: encoder delay is 576, encoder padding is 948
decoder: audio_format=44100:24:2, seekable=true
avahi: Service group changed to state 2
avahi: Service 'Music Player' successfully established.
client: [0] opened from 192.168.178.180:42595
client: [1] opened from 192.168.178.180:42596
client: [2] opened from 192.168.178.180:42597
client: [3] opened from 192.168.178.180:42598
client: [2] process command "status"
client: [2] command returned 0
client: [2] process command "status"
client: [2] command returned 0
client: [2] process command "status"
client: [2] command returned 0
client: [0] closed
client: [1] closed
client: [2] process command "stats"
client: [2] command returned 0
client: [2] process command "status"
client: [2] command returned 0
client: [2] process command "status"
client: [2] command returned 0
client: [2] process command "plchanges "-1""
client: [2] command returned 0
client: [2] process command "status"
client: [2] command returned 0
client: [2] process command "status"
client: [2] command returned 0
client: [3] process command "idle"
client: [3] command returned 1
client: [2] process command "status"
client: [2] command returned 0
client: [2] process command "pause"
output: opened plugin=pulse name="Local Pulse" audio_format=44100:16:2
output: converting from 44100:24:2
client: [2] command returned 0
client: [2] process command "status"
client: [2] command returned 0
client: [3] process command "idle"
client: [3] command returned 1
client: [2] process command "status"
client: [2] command returned 0
client: [3] process command "idle"
client: [3] command returned 1
client: [2] process command "close"
client: [2] command returned 3
client: [2] closed
client: [3] closed
client: [4] opened from 192.168.178.180:42599
client: [5] opened from 192.168.178.180:42600
client: [4] process command "status"
client: [4] command returned 0
client: [6] opened from 192.168.178.180:42601
client: [7] opened from 192.168.178.180:42602
client: [6] process command "status"
client: [6] command returned 0
client: [6] process command "status"
client: [6] command returned 0
client: [6] process command "status"
client: [6] command returned 0
client: [4] closed
client: [5] closed
client: [6] process command "stats"
client: [6] command returned 0
client: [6] process command "status"
client: [6] command returned 0
client: [6] process command "status"
client: [6] command returned 0
client: [6] process command "plchanges "-1""
client: [6] command returned 0
client: [6] process command "status"
client: [6] command returned 0
client: [6] process command "status"
client: [6] command returned 0
client: [7] process command "idle"
client: [7] command returned 1
client: [6] closed
client: [7] closed
client: [8] opened from 192.168.178.180:42603
client: [9] opened from 192.168.178.180:42604
client: [10] opened from 192.168.178.180:42605
client: [11] opened from 192.168.178.180:42606
client: [10] process command "status"
client: [10] command returned 0
client: [10] process command "status"
client: [10] command returned 0
client: [10] process command "status"
client: [10] command returned 0
client: [10] process command "stats"
client: [10] command returned 0
client: [10] process command "status"
client: [10] command returned 0
client: [10] process command "status"
client: [10] command returned 0
client: [10] process command "plchanges "-1""
client: [10] command returned 0
client: [10] process command "status"
client: [10] command returned 0
client: [10] process command "status"
client: [10] command returned 0
client: [8] closed
client: [9] closed
client: [11] process command "idle"
client: [11] command returned 1
state_file: Saving state file /home/pan/.mpd/state
client: [10] process command "list "artist""
client: [10] command returned 0
client: [10] process command "list "album""
client: [10] command returned 0
client: [10] process command "list "album" "36 Crazyfists""
client: [10] command returned 0
client: [10] process command list
client: process command "list "albumartist" "album" "A Snow Capped Romance""
client: command returned 0
client: process command "list "albumartist" "album" "Collisions And Castaways""
client: command returned 0
client: process command "list "albumartist" "album" "Rest Inside the Flames""
client: command returned 0
client: process command "list "albumartist" "album" "The Tide And It's Takers""
client: command returned 0
client: [10] process command list returned 0
client: [10] process command "find "albumartist" "36 Crazyfists" "album" "A Snow Capped Romance""
client: [10] command returned 0
client: [10] process command "listplaylists"
client: [10] command returned 0
decoder_thread: probing plugin mad
mad: detected LAME version 3.99 ("LAME3.99r")
mad: LAME peak found: 0.000000
mad: LAME track gain found: -7.900000
mad: encoder delay is 576, encoder padding is 1020
decoder: audio_format=44100:24:2, seekable=true
player: played "Coldplay/Viva La Vida or Death and All His Friends/01 Life in Technicolor.mp3"
playlist: queue song 2:"Coldplay/Viva La Vida or Death and All His Friends/03 Lost!.mp3"
client: [10] process command "status"
client: [10] command returned 0
client: [10] process command "status"
client: [10] command returned 0
client: [10] process command "stop"
playlist: stop
player: played "Coldplay/Viva La Vida or Death and All His Friends/02 Cemeteries of London.mp3"
output: closed plugin=pulse name="Local Pulse"
client: [10] command returned 0
client: [11] process command "idle"
client: [11] command returned 1
client: [10] process command "clear"
client: [10] command returned 0
client: [10] process command "add "36_Crazyfists/A Snow Capped Romance/36 Crazyfists - At The End Of August.flac""
client: [10] command returned 0
client: [10] process command "status"
client: [10] command returned 0
client: [10] process command "status"
client: [10] command returned 0
client: [10] process command "playlistid"
client: [10] command returned 0
client: [10] process command "status"
client: [10] command returned 0
client: [10] process command "play"
playlist: play 0:"36_Crazyfists/A Snow Capped Romance/36 Crazyfists - At The End Of August.flac"
client: [10] command returned 0
playlist: queue song 0:"36_Crazyfists/A Snow Capped Romance/36 Crazyfists - At The End Of August.flac"
client: [10] process command "plchanges "2""
client: [10] command returned 0
client: [10] process command "status"
client: [10] command returned 0
client: [10] process command "status"
client: [10] command returned 0
decoder_thread: probing plugin flac
decoder: audio_format=44100:16:2, seekable=true
output: opened plugin=pulse name="Local Pulse" audio_format=44100:16:2
client: [11] process command "idle"
client: [11] command returned 1
client: [10] process command "status"
client: [10] command returned 0
client: [11] process command "idle"
client: [11] command returned 1
client: [10] process command "next"
playlist: play 0:"36_Crazyfists/A Snow Capped Romance/36 Crazyfists - At The End Of August.flac"')
the log produced by pulseaudio
$this->bbcode_second_pass_code('', '
( 126.943| 68.215) D: [alsa-sink-bcm2835 ALSA] protocol-native.c: Implicit underrun of 'Local Pulse'
( 126.944| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33552 bytes ago (3492 bytes ahead in playback buffer)
( 126.956| 0.012) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33552 bytes ago (1732 bytes ahead in playback buffer)
( 126.957| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33552 bytes ago (1732 bytes ahead in playback buffer)
( 126.999| 0.042) D: [alsa-sink-bcm2835 ALSA] protocol-native.c: Requesting rewind due to end of underrun.
( 127.000| 0.000) D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Requested to rewind 33552 bytes.
( 127.000| 0.000) D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Limited to 26212 bytes.
( 127.000| 0.000) D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: before: 6553
( 127.000| 0.000) D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: after: 6553
( 127.000| 0.000) D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Rewound 26212 bytes.
( 127.001| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Processing rewind...
( 127.001| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: latency = 3103
( 127.001| 0.000) D: [alsa-sink-bcm2835 ALSA] sink-input.c: Have to rewind 26212 bytes on render memblockq.
( 127.002| 0.000) D: [alsa-sink-bcm2835 ALSA] source.c: Processing rewind...
( 154.406| 27.404) D: [alsa-sink-bcm2835 ALSA] protocol-native.c: Implicit underrun of 'Local Pulse'
( 154.407| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33552 bytes ago (3492 bytes ahead in playback buffer)
( 154.424| 0.017) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33552 bytes ago (1732 bytes ahead in playback buffer)
( 154.425| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33552 bytes ago (1732 bytes ahead in playback buffer)
( 154.462| 0.036) D: [alsa-sink-bcm2835 ALSA] protocol-native.c: Requesting rewind due to end of underrun.
( 154.462| 0.000) D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Requested to rewind 33552 bytes.
( 154.462| 0.000) D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Limited to 27972 bytes.
( 154.463| 0.000) D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: before: 6993
( 154.463| 0.000) D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: after: 6993
( 154.463| 0.000) D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Rewound 27972 bytes.
( 154.463| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Processing rewind...
( 154.463| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: latency = 0
( 154.464| 0.000) D: [alsa-sink-bcm2835 ALSA] sink-input.c: Have to rewind 27972 bytes on render memblockq.
( 154.464| 0.000) D: [alsa-sink-bcm2835 ALSA] source.c: Processing rewind...
( 157.124| 2.659) D: [alsa-sink-bcm2835 ALSA] protocol-native.c: Implicit underrun of 'Local Pulse'
( 157.124| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33520 bytes ago (3524 bytes ahead in playback buffer)
( 157.127| 0.002) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33520 bytes ago (3524 bytes ahead in playback buffer)
( 157.127| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33520 bytes ago (3524 bytes ahead in playback buffer)
( 157.131| 0.003) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33520 bytes ago (3524 bytes ahead in playback buffer)
( 157.131| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33520 bytes ago (3524 bytes ahead in playback buffer)
( 157.134| 0.003) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33520 bytes ago (3524 bytes ahead in playback buffer)
( 157.135| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33520 bytes ago (3524 bytes ahead in playback buffer)
( 157.139| 0.004) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33520 bytes ago (4 bytes ahead in playback buffer)
( 157.140| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33520 bytes ago (4 bytes ahead in playback buffer)
( 157.140| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33520 bytes ago (4 bytes ahead in playback buffer)
( 157.141| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33520 bytes ago (4 bytes ahead in playback buffer)
( 157.141| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33520 bytes ago (4 bytes ahead in playback buffer)
( 157.142| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33520 bytes ago (4 bytes ahead in playback buffer)
( 157.142| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33520 bytes ago (4 bytes ahead in playback buffer)
( 157.142| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33520 bytes ago (4 bytes ahead in playback buffer)
( 157.143| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33520 bytes ago (4 bytes ahead in playback buffer)
( 157.143| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33520 bytes ago (4 bytes ahead in playback buffer)
( 157.144| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33520 bytes ago (4 bytes ahead in playback buffer)
( 157.144| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33520 bytes ago (4 bytes ahead in playback buffer)
( 157.144| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33520 bytes ago (4 bytes ahead in playback buffer)
( 157.145| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33520 bytes ago (4 bytes ahead in playback buffer)
( 157.145| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33520 bytes ago (4 bytes ahead in playback buffer)
( 157.146| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33520 bytes ago (4 bytes ahead in playback buffer)
( 157.146| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33520 bytes ago (4 bytes ahead in playback buffer)
( 157.147| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Found underrun 33520 bytes ago (4 bytes ahead in playback buffer)
( 157.180| 0.033) D: [alsa-sink-bcm2835 ALSA] protocol-native.c: Requesting rewind due to end of underrun.
( 157.180| 0.000) D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Requested to rewind 33520 bytes.
( 157.181| 0.000) D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Limited to 26212 bytes.
( 157.181| 0.000) D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: before: 6553
( 157.181| 0.000) D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: after: 6553
( 157.182| 0.000) D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Rewound 26212 bytes.
( 157.182| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: Processing rewind...
( 157.182| 0.000) D: [alsa-sink-bcm2835 ALSA] sink.c: latency = 0
( 157.182| 0.000) D: [alsa-sink-bcm2835 ALSA] sink-input.c: Have to rewind 26212 bytes on render memblockq.
( 157.182| 0.000) D: [alsa-sink-bcm2835 ALSA] source.c: Processing rewind...
')
my mpd version:
$this->bbcode_second_pass_code('', '[pan@hermes ~]$ mpd --version
Music Player Daemon 0.18.12
Copyright (C) 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright (C) 2008-2013 Max Kellermann <max@duempel.org>
This is free software; see the source for copying conditions. There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Decoders plugins:
[mad] mp3 mp2
[vorbis] ogg oga
[oggflac] ogg oga
[flac] flac
[opus] opus ogg oga
[sndfile] wav aiff aif au snd paf iff svx sf voc w64 pvf xi htk caf sd2
[audiofile] wav au aiff aif
[dsdiff] dff
[dsf] dsf
[faad] aac
[wavpack] wv
[modplug] 669 amf ams dbm dfm dsm far it med mdl mod mtm mt2 okt s3m stm ult umx xm
[ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav webm wma wmv wsaud wsvga wv wve
[pcm]
Output plugins:
shout null fifo pipe alsa ao oss pulse jack httpd recorder
Encoder plugins:
null vorbis opus lame wave flac
Archive plugins:
[bz2] bz2
Input plugins:
file archive curl ffmpeg mms
Playlist plugins:
extm3u m3u xspf pls asx rss soundcloud cue cue
Protocols:
file:// http:// https:// mms:// mmsh:// mmst:// mmsu:// gopher:// rtp:// rtsp:// rtmp:// rtmpt:// rtmps://')
and here my /etc/mpd.conf
$this->bbcode_second_pass_code('', 'user "pan"
music_directory "/home/pan/Musik"
pid_file "/home/pan/.mpd/pid"
db_file "/home/pan/.mpd/db"
state_file "/home/pan/.mpd/state"
playlist_directory "/home/pan/.mpd/playlists"
bind_to_address "192.168.178.24"
audio_output {
type "pulse"
name "Local Pulse"
server "127.0.0.1"
}')
any help would be gladly appreciated since I am starting to run out of options
