6

I had mpd/mpc running on my Ubuntu 12.04.3 LTS headless, X-less server. I decided to switch out the songs; I moved the old songs out of the /Music directory, moved the new songs in, and ran mpc update, but it failed to resume playing.

Naturally, I started changing things, according to what I could find on Google, but nothing seems to work.

When I run mpc commands, like mpc status, I get the error message Failed to read mixer for 'My ALSA Device': no such mixer control: PCM.

I can play music when I use the command sudo aplay piano.wav, and similar commands.

Here's some diagnostic info: http://pastebin.com/1CzbeYBC. It contains

  • /etc/mpd.conf
  • aplay -L
  • aplay -l
  • mpd verbose from the command line
  • amixer & amixer contents

I would appreciate any pointers! Thank you.

3 Answers3

4

@CL was right; alsa was working but mpd was not.

I discovered that if I switched to the home folder of the mpd user (export HOME=/var/log/mpd), the aplay commands (e.g. sudo -u mpd aplay /usr/share/sounds/alsa/Front_Center.wav) would no longer work.

More Googling until I found http://ubuntuforums.org/showthread.php?t=1138454

The solution was sudo apt-get remove pulseaudio. Once that was done, everything was working again.

1

Since your using MPD with pulseaudio, you can change the audio_output accordingly:

sudo nano /etc/mpd.conf

Comment this section:

#audio_output {
#   type       "alsa"
#   name       "My ALSA Device"
#   device      "hw:0,0"    # optional
#   mixer_type      "hardware"      # optional
#   mixer_device    "default"   # optional
#   mixer_control   "PCM"       # optional
#   mixer_index "0"     # optional
#}

Uncomment this

audio_output {
    type        "pulse"
    name        "My Pulse Output"
#   server      "remote_server"     # optional
#   sink        "remote_server_sink"    # optional
}

You may have to add rights on the mpd user too:

sudo adduser mpd pulse
sudo adduser mpd pulse-access

Restart your MPD:

sudo systemctl restart mpd
1

For me the solution was to set mixer_control to "Headphones" as amixer output suggested.

audio_output {
   type          "alsa"
   name          "My ALSA Device"
   mixer_control "Headphones"
}

This is for the Raspberry Pi 1 B.

JPT
  • 369