Score:0

Need help with MPD

cn flag

i'm running MPD (v0.21.20) on an Ubuntu box and using ncmpcpp client on the same machine. The machine has working sound as I am using it for other GUI applications.

Here is an extract of mpd.conf that seems problematic to me:

    audio_output {
    type        "alsa"
    name        "My ALSA Device"
#   device      "hw:0,0"    # optional
#   device "iec958:CARD=Intel,DEV=0"
    mixer_type      "software"      # optional
#   mixer_device    "default"   # optional
#   mixer_control   "PCM"       # optional
#   mixer_index "0"     # optional
}
#

#audio_output {
#   type        "pulse"
#   name        "My Pulse Output"
#   server      "127.0.0.1"     # optional
#   mixer_type      "software"
#   device "iec958:CARD=1,DEV=1"
#   mixer_control   "PCM"
#   sink        "remote_server_sink"    # optional
#} 

When I select ALSA, the WAV file starts playing in ncmpcpp but produces no sound.

Nov 10 17:51 : avahi: Service 'Music Player @ mServer' successfully established.
Nov 10 17:51 : client: [0] opened from 127.0.0.1:44676
Nov 10 17:52 : player: played "1.wav"

But when I select PULSE, the ncmpcpp just stay paused the whole time:

Nov 10 17:50 : client: [0] opened from 127.0.0.1:44670
Nov 10 17:50 : avahi: Service 'Music Player @ mServer' successfully established.
Nov 10 17:50 : exception: Failed to open "My Pulse Output" (pulse)
Nov 10 17:50 : exception: nested: failed to connect: Connection refused
Nov 10 17:50 : exception: Failed to open "My Pulse Output" (pulse)
Nov 10 17:50 : exception: nested: failed to connect: Connection refused

Here is the output of aplay -l command showing all playback hardware devices:

**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: AD1984A Analog [AD1984A Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 2: AD1984A Alt Analog [AD1984A Alt Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: AUDIO [USB  AUDIO], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

And here is the output of mpd --stderr --no-daemon --verbose command which does not seem to show any error that might explain lack of sound:

config_file: loading file /etc/mpd.conf
path: SetFSCharset: fs charset is:
libsamplerate: libsamplerate converter 'Fastest Sinc Interpolator'
vorbis: Xiph.Org libVorbis 1.3.6
opus: libopus 1.3.1
sndfile: libsndfile-1.0.28
adplug: adplug 2.3.1
simple_db: reading DB
curl: version 7.68.0
curl: with GnuTLS/3.6.13
avahi: Initializing interface
exception: RTIOThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permitted
avahi: Client changed to state 2
avahi: Client is RUNNING
avahi: Registering service _mpd._tcp/Music Player @ mServer
avahi: Service group changed to state 0
avahi: Service group is UNCOMMITED
state_file: Loading state file /var/lib/mpd/state
playlist: play 0:"1.wav"
decoder_thread: probing plugin sndfile
inotify: initializing inotify
decoder: audio_format=8000:16:2, seekable=true
inotify: watching music directory
exception: OutputThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permitted
avahi: Service group changed to state 1
avahi: Service group is REGISTERING
playlist: queue song 0:"1.wav"
decoder_thread: probing plugin sndfile
decoder: audio_format=8000:16:2, seekable=true
client: [0] opened from 127.0.0.1:44658
client: [0] process command "status"
client: [0] command returned 0
client: [0] process command "plchanges "0""
client: [0] command returned 0
client: [0] process command "outputs"
client: [0] command returned 0
client: [0] process command "decoders"
client: [0] command returned 0
client: [0] process command "outputs"
client: [0] command returned 0
client: [0] process command "outputs"
client: [0] command returned 0
client: [0] process command "idle"
client: [0] command returned 1
avahi: Service group changed to state 2
avahi: Service 'Music Player @ mServer' successfully established.

At this stage I am really clueless about where to look for further troubleshooting to get the sound working with MPD, so any pointers will be helpful!

Score:0
cn flag

Solved this one!

While looking at the output of aplay -l noticed that USB speakers are on card#1, so changed line

device "hw:0,0"

to device "hw:1,0"

And it started working!!!

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.