Budgie
Posts: 36
Joined: Mon Jan 19, 2015 3:30 pm

Help please Setting upmpdcli on Pi 3

Sun Jul 24, 2016 7:00 pm

I have RPi 3 with Raspbian installed and a Pi-DAC+ on board. I have it playing as an audio renderer using upmpdcli with data served by minimserver from Qnap NAS and BubbleUPnP on Samsung S6 as control point. I have been running from cli while learning but when setup complete this will run headless and behind an amplifier. I am seeking help for a couple of issues:-

1. What is the correct way to have upmpdcli start up at boot time?
2. upmpdcli I understand works as front end for MPD. Is there any need to start MPD or is this done by upnpdcli in 1.?

Have read wiki to get this far but need help to polish it up please.
Budgie

User avatar
dasmanul
Posts: 502
Joined: Wed Sep 30, 2015 10:20 am
Location: Frankfurt, Germany

Re: Help please Setting upmpdcli on Pi 3

Sun Jul 24, 2016 9:53 pm

How did you install upmpdcli? Did you use the Raspbian packages provided by the author? If I remember correctly, these include the necessary scripts to start upmpdcli at boot.

I think the same is also true for the mpd packages. I have the described setup running on both a Pi 1 and a Pi 2 and I don't remember any additional steps to get both daemons to start at boot.

Budgie
Posts: 36
Joined: Mon Jan 19, 2015 3:30 pm

Re: Help please Setting upmpdcli on Pi 3

Sun Jul 24, 2016 10:34 pm

Hi and thanks for the reply. I did use the author's packages. It took me a while to sort out the gpg stuff but it all worked in the end but not with the issues I raise. I wonder is it because I am on RPi 3?

User avatar
dasmanul
Posts: 502
Joined: Wed Sep 30, 2015 10:20 am
Location: Frankfurt, Germany

Re: Help please Setting upmpdcli on Pi 3

Mon Jul 25, 2016 1:34 pm

Strange, I think the packages should come with BSD-Style init scripts which apparently also work with systemd. Can you please post the output of

Code: Select all

apt-cache policy mpd
apt-cache policy upmpdcli
ls -l /etc/init.d/mpd
ls -l /etc/init.d/upmpdcli
ls -l /etc/rc?.d/S*mpd*
sudo systemctl status mpd
sudo systemctl status upmpdcli
?

Budgie
Posts: 36
Joined: Mon Jan 19, 2015 3:30 pm

Re: Help please Setting upmpdcli on Pi 3

Mon Jul 25, 2016 10:30 pm

Hi and thanks for the continued help. Here are the result of your command:-

Code: Select all

pi@raspberrypi:~ $     apt-cache policy mpd
mpd:
  Installed: 0.19.1-1.1
  Candidate: 0.19.1-1.1
  Version table:
 *** 0.19.1-1.1 0
        500 http://mirrordirector.raspbian.org/raspbian/ jessie/main armhf Packages
        100 /var/lib/dpkg/status
pi@raspberrypi:~ $     apt-cache policy upmpdcli
upmpdcli:
  Installed: 1.1.3-1
  Candidate: 1.1.3-1
  Version table:
 *** 1.1.3-1 0
        500 http://www.lesbonscomptes.com/upmpdcli/downloads/debian/ unstable/main armhf Packages
        100 /var/lib/dpkg/status
pi@raspberrypi:~ $     ls -l /etc/init.d/mpd
-rwxr-xr-x 1 root root 2901 Dec  6  2014 /etc/init.d/mpd
pi@raspberrypi:~ $     ls -l /etc/init.d/upmpdcli
-rwxr-xr-x 1 root root 4159 Oct 11  2014 /etc/init.d/upmpdcli
pi@raspberrypi:~ $     ls -l /etc/rc?.d/S*mpd*
lrwxrwxrwx 1 root root 18 Jul 21 19:11 /etc/rc2.d/S01upmpdcli -> ../init.d/upmpdcli
lrwxrwxrwx 1 root root 13 Jul 21 19:32 /etc/rc2.d/S04mpd -> ../init.d/mpd
lrwxrwxrwx 1 root root 18 Jul 21 19:11 /etc/rc3.d/S01upmpdcli -> ../init.d/upmpdcli
lrwxrwxrwx 1 root root 13 Jul 21 19:32 /etc/rc3.d/S04mpd -> ../init.d/mpd
lrwxrwxrwx 1 root root 18 Jul 21 19:11 /etc/rc4.d/S01upmpdcli -> ../init.d/upmpdcli
lrwxrwxrwx 1 root root 13 Jul 21 19:32 /etc/rc4.d/S04mpd -> ../init.d/mpd
lrwxrwxrwx 1 root root 18 Jul 21 19:11 /etc/rc5.d/S01upmpdcli -> ../init.d/upmpdcli
lrwxrwxrwx 1 root root 13 Jul 21 19:32 /etc/rc5.d/S04mpd -> ../init.d/mpd                                    
pi@raspberrypi:~ $     sudo systemctl status mpd                                                             
● mpd.service - Music Player Daemon                                                                          
   Loaded: loaded (/lib/systemd/system/mpd.service; enabled)                                                 
   Active: active (running) since Sun 2016-07-24 08:17:05 BST; 1 day 15h ago
 Main PID: 574 (mpd)
   CGroup: /system.slice/mpd.service
           └─574 /usr/bin/mpd --no-daemon

Jul 24 08:17:05 raspberrypi systemd[1]: Started Music Player Daemon.
Jul 24 08:17:09 raspberrypi pulseaudio[686]: [pulseaudio] server-lookup.c: Unable to contact D-Bus: or... X11
Jul 24 08:17:09 raspberrypi pulseaudio[686]: [pulseaudio] main.c: Unable to contact D-Bus: org.freedes... X11
Jul 24 08:17:09 raspberrypi pulseaudio[686]: [pulseaudio] bluez4-util.c: org.bluez.Manager.GetProperti...xist
Jul 24 08:17:10 raspberrypi pulseaudio[686]: [alsa-sink-IQaudIO DAC HiFi pcm512x-hifi-0] alsa-sink.c: ...ite!
Jul 24 08:17:10 raspberrypi pulseaudio[686]: [alsa-sink-IQaudIO DAC HiFi pcm512x-hifi-0] alsa-sink.c: ...ers.
Jul 24 08:17:10 raspberrypi pulseaudio[686]: [alsa-sink-IQaudIO DAC HiFi pcm512x-hifi-0] alsa-sink.c: ...ail.
Hint: Some lines were ellipsized, use -l to show in full.
pi@raspberrypi:~ $     sudo systemctl status upmpdcli
● upmpdcli.service - LSB: UPnP Renderer front-end to MPD
   Loaded: loaded (/etc/init.d/upmpdcli)
   Active: active (running) since Sun 2016-07-24 08:17:05 BST; 1 day 15h ago
  Process: 570 ExecStart=/etc/init.d/upmpdcli start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/upmpdcli.service
           └─637 /usr/bin/upmpdcli -D -c /etc/upmpdcli.conf

Jul 24 08:17:05 raspberrypi systemd[1]: Started LSB: UPnP Renderer front-end to MPD.
pi@raspberrypi:~ $ 
Looks like you are right. Will check again and report back.
Budgie

Budgie
Posts: 36
Joined: Mon Jan 19, 2015 3:30 pm

Re: Help please Setting upmpdcli on Pi 3

Mon Jul 25, 2016 10:43 pm

Hi, further to my post above, yes I can play (so you are correct) but using BubbleUPnP control point the volume is fixed and does not respond to control. I guess there are settings for umpmdcli missing but when I read through the upmpdcli.conf file I didn't understand the terminology of the section on volume control.

I can't get the logging to work either. A permissions issue I suspect but has me beat as whichever directory I set for receiving logs they are not written. Any light you can shine would be much appreciated.
Regards,
Budgie

User avatar
dasmanul
Posts: 502
Joined: Wed Sep 30, 2015 10:20 am
Location: Frankfurt, Germany

Re: Help please Setting upmpdcli on Pi 3

Tue Jul 26, 2016 7:41 am

Interesting. I had volume control via BubbleUPnP working at some point but it's not working currently either. I just noticed that recently and didn't have the time yet to look into it. I seem to remember it was an mpd setting though. Can you provide your mpd config file?

As for the logging, where are you trying to log to? What is the output of "ps -Ouser $(pidof mpd)" and "ps -Ouser $(pidof upmpdcli)"? Maybe you have to create empty log files (as root) with the appropriate ownership and permissions first.

Did I understand it correctly that your autostart issue is fixed?

Budgie
Posts: 36
Joined: Mon Jan 19, 2015 3:30 pm

Re: Help please Setting upmpdcli on Pi 3

Tue Jul 26, 2016 9:23 am

Hi and many thanks once more. I believe the autostart is working as it should without me adding anything.

Will get on to your questions soon but meanwhile I have now found a log file where I set it to be in upmpdcli.conf. It gives a clue to the volume issue but not enough for me to solve without your help!

Code: Select all

pi@raspberrypi:~/.upmpdcli/logs $ cat upmpdcli.log
libupnpp/upnpplib.cxx:131::LibUPnP::LibUPnP: failed retrieving addr
libupnpp/upnpplib.cxx:278::LibUPnP::~LibUPnP: UpnpFinish :-116: UPNP_E_FINISH
src/httpfs.cxx:205::Failed reading /usr/share/upmpdcli/icon.png : open/stat: errno: 2 : 
src/mpdcli.cxx:137::mpd_run_set_volume(M_CONN, volume) failed: problems setting volume
src/mpdcli.cxx:140::mpd_run_set_volume(M_CONN, volume) server error: 52
src/mpdcli.cxx:137::mpd_run_set_volume(M_CONN, volume) failed: problems setting volume
src/mpdcli.cxx:140::mpd_run_set_volume(M_CONN, volume) server error: 52
src/mpdcli.cxx:137::mpd_run_set_volume(M_CONN, volume) failed: problems setting volume
src/mpdcli.cxx:140::mpd_run_set_volume(M_CONN, volume) server error: 52
src/mpdcli.cxx:137::mpd_run_set_volume(M_CONN, volume) failed: problems setting volume
src/mpdcli.cxx:140::mpd_run_set_volume(M_CONN, volume) server error: 52
src/mpdcli.cxx:137::mpd_run_set_volume(M_CONN, volume) failed: problems setting volume
src/mpdcli.cxx:140::mpd_run_set_volume(M_CONN, volume) server error: 52
src/mpdcli.cxx:137::mpd_run_set_volume(M_CONN, volume) failed: problems setting volume
src/mpdcli.cxx:140::mpd_run_set_volume(M_CONN, volume) server error: 52
src/mpdcli.cxx:137::mpd_run_set_volume(M_CONN, volume) failed: problems setting volume
src/mpdcli.cxx:140::mpd_run_set_volume(M_CONN, volume) server error: 52
src/mpdcli.cxx:137::mpd_run_set_volume(M_CONN, volume) failed: problems setting volume
src/mpdcli.cxx:140::mpd_run_set_volume(M_CONN, volume) server error: 52
src/mpdcli.cxx:137::mpd_run_set_volume(M_CONN, volume) failed: problems setting volume
src/mpdcli.cxx:140::mpd_run_set_volume(M_CONN, volume) server error: 52
src/mpdcli.cxx:137::mpd_run_set_volume(M_CONN, volume) failed: problems setting volume
src/mpdcli.cxx:140::mpd_run_set_volume(M_CONN, volume) server error: 52
pi@raspberrypi:~/.upmpdcli/logs $ 

Now here is the mpd.conf file, untouched by me:-

Code: Select all

pi@raspberrypi:/etc $ cat mpd.conf
# An example configuration file for MPD.
# Read the user manual for documentation: http://www.musicpd.org/doc/user/
# or /usr/share/doc/mpd/user-manual.html


# Files and directories #######################################################
#
# This setting controls the top directory which MPD will search to discover the
# available audio files and add them to the daemon's online database. This 
# setting defaults to the XDG directory, otherwise the music directory will be
# be disabled and audio files will only be accepted over ipc socket (using
# file:// protocol) or streaming files over an accepted protocol.
#
music_directory         "/var/lib/mpd/music"
#
# This setting sets the MPD internal playlist directory. The purpose of this
# directory is storage for playlists created by MPD. The server will use 
# playlist files not created by the server but only if they are in the MPD
# format. This setting defaults to playlist saving being disabled.
#
playlist_directory              "/var/lib/mpd/playlists"
#
# This setting sets the location of the MPD database. This file is used to
# load the database at server start up and store the database while the 
# server is not up. This setting defaults to disabled which will allow
# MPD to accept files over ipc socket (using file:// protocol) or streaming
# files over an accepted protocol.
#
db_file                 "/var/lib/mpd/tag_cache"
# 
# These settings are the locations for the daemon log files for the daemon.
# These logs are great for troubleshooting, depending on your log_level
# settings.
#
# The special value "syslog" makes MPD use the local syslog daemon. This
# setting defaults to logging to syslog, otherwise logging is disabled.
#
log_file                        "/var/log/mpd/mpd.log"
#
# This setting sets the location of the file which stores the process ID
# for use of mpd --kill and some init scripts. This setting is disabled by
# default and the pid file will not be stored.
#
pid_file                        "/run/mpd/pid"
#
# This setting sets the location of the file which contains information about
# most variables to get MPD back into the same general shape it was in before
# it was brought down. This setting is disabled by default and the server 
# state will be reset on server start up.
#
state_file                      "/var/lib/mpd/state"
#
# The location of the sticker database.  This is a database which
# manages dynamic information attached to songs.
#
sticker_file                   "/var/lib/mpd/sticker.sql"
#
###############################################################################


# General music daemon options ################################################
#
# This setting specifies the user that MPD will run as. MPD should never run as
# root and you may use this setting to make MPD change its user ID after
# initialization. This setting is disabled by default and MPD is run as the
# current user.
#
user                            "mpd"
#
# This setting specifies the group that MPD will run as. If not specified
# primary group of user specified with "user" setting will be used (if set).
# This is useful if MPD needs to be a member of group such as "audio" to
# have permission to use sound card.
#
#group                          "nogroup"
#
# This setting sets the address for the daemon to listen on. Careful attention
# should be paid if this is assigned to anything other then the default, any.
# This setting can deny access to control of the daemon. Choose any if you want
# to have mpd listen on every address
#
# For network
bind_to_address         "localhost"
#
# And for Unix Socket
#bind_to_address                "/run/mpd/socket"
#
# This setting is the TCP port that is desired for the daemon to get assigned
# to.
#
#port                           "6600"
#
# This setting controls the type of information which is logged. Available 
# setting arguments are "default", "secure" or "verbose". The "verbose" setting
# argument is recommended for troubleshooting, though can quickly stretch
# available resources on limited hardware storage.
#
#log_level                      "default"
#
# If you have a problem with your MP3s ending abruptly it is recommended that 
# you set this argument to "no" to attempt to fix the problem. If this solves
# the problem, it is highly recommended to fix the MP3 files with vbrfix
# (available as vbrfix in the debian archive), at which
# point gapless MP3 playback can be enabled.
#
#gapless_mp3_playback                   "yes"
#
# Setting "restore_paused" to "yes" puts MPD into pause mode instead
# of starting playback after startup.
#
#restore_paused "no"
#
# This setting enables MPD to create playlists in a format usable by other
# music players.
#
#save_absolute_paths_in_playlists       "no"
#
# This setting defines a list of tag types that will be extracted during the 
# audio file discovery process. The complete list of possible values can be
# found in the mpd.conf man page.
#metadata_to_use        "artist,album,title,track,name,genre,date,composer,performer,disc"
#
# This setting enables automatic update of MPD's database when files in 
# music_directory are changed.
#
#auto_update    "yes"
#
# Limit the depth of the directories being watched, 0 means only watch
# the music directory itself.  There is no limit by default.
#
#auto_update_depth "3"
#
###############################################################################


# Symbolic link behavior ######################################################
#
# If this setting is set to "yes", MPD will discover audio files by following 
# symbolic links outside of the configured music_directory.
#
#follow_outside_symlinks        "yes"
#
# If this setting is set to "yes", MPD will discover audio files by following
# symbolic links inside of the configured music_directory.
#
#follow_inside_symlinks         "yes"
#
###############################################################################


# Zeroconf / Avahi Service Discovery ##########################################
#
# If this setting is set to "yes", service information will be published with
# Zeroconf / Avahi.
#
#zeroconf_enabled               "yes"
#
# The argument to this setting will be the Zeroconf / Avahi unique name for
# this MPD server on the network.
#
#zeroconf_name                  "Music Player"
#
###############################################################################


# Permissions #################################################################
#
# If this setting is set, MPD will require password authorization. The password
# can setting can be specified multiple times for different password profiles.
#
#password                        "password@read,add,control,admin"
#
# This setting specifies the permissions a user has who has not yet logged in. 
#
#default_permissions             "read,add,control,admin"
#
###############################################################################


# Database #######################################################################
#

#database {
#       plugin "proxy"
#       host "other.mpd.host"
#       port "6600"
#}

# Input #######################################################################
#

input {
        plugin "curl"
#       proxy "proxy.isp.com:8080"
#       proxy_user "user"
#       proxy_password "password"
}

#
###############################################################################

# Audio Output ################################################################
#
# MPD supports various audio output types, as well as playing through multiple 
# audio outputs at the same time, through multiple audio_output settings 
# blocks. Setting this block is optional, though the server will only attempt
# autodetection for one sound card.
#
# An example of an ALSA output:
#
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
}
#
# An example of an OSS output:
#
#audio_output {
#       type            "oss"
#       name            "My OSS Device"
#       device          "/dev/dsp"      # optional
#       mixer_type      "hardware"      # optional
#       mixer_device    "/dev/mixer"    # optional
#       mixer_control   "PCM"           # optional
#}
#
# An example of a shout output (for streaming to Icecast):
#
#audio_output {
#       type            "shout"
#       encoding        "ogg"                   # optional
#       name            "My Shout Stream"
#       host            "localhost"
#       port            "8000"
#       mount           "/mpd.ogg"
#       password        "hackme"
#       quality         "5.0"
#       bitrate         "128"
#       format          "44100:16:1"
#       protocol        "icecast2"              # optional
#       user            "source"                # optional
#       description     "My Stream Description" # optional
#       url             "http://example.com"    # optional
#       genre           "jazz"                  # optional
#       public          "no"                    # optional
#       timeout         "2"                     # optional
#       mixer_type      "software"              # optional
#}
#
# An example of a recorder output:
#
#audio_output {
#       type            "recorder"
#       name            "My recorder"
#       encoder         "vorbis"                # optional, vorbis or lame
#       path            "/var/lib/mpd/recorder/mpd.ogg"
##      quality         "5.0"                   # do not define if bitrate is defined
#       bitrate         "128"                   # do not define if quality is defined
#       format          "44100:16:1"
#}
#
# An example of a httpd output (built-in HTTP streaming server):
#
#audio_output {
#       type            "httpd"
#       name            "My HTTP Stream"
#       encoder         "vorbis"                # optional, vorbis or lame
#       port            "8000"
#       bind_to_address "0.0.0.0"               # optional, IPv4 or IPv6
#       quality         "5.0"                   # do not define if bitrate is defined
#       bitrate         "128"                   # do not define if quality is defined
#       format          "44100:16:1"
#       max_clients     "0"                     # optional 0=no limit
#}
#
# An example of a pulseaudio output (streaming to a remote pulseaudio server)
# Please see README.Debian if you want mpd to play through the pulseaudio
# daemon started as part of your graphical desktop session!
#
#audio_output {
#       type            "pulse"
#       name            "My Pulse Output"
#       server          "remote_server"         # optional
#       sink            "remote_server_sink"    # optional
#}
#
# An example of a winmm output (Windows multimedia API).
#
#audio_output {
#       type            "winmm"
#       name            "My WinMM output"
#       device          "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
#               or
#       device          "0"             # optional
#       mixer_type      "hardware"      # optional
#}
#
# An example of an openal output.
#
#audio_output {
#       type            "openal"
#       name            "My OpenAL output"
#       device          "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
#}
#
## Example "pipe" output:
#
#audio_output {
#       type            "pipe"
#       name            "my pipe"
#       command         "aplay -f cd 2>/dev/null"
## Or if you're want to use AudioCompress
#       command         "AudioCompress -m | aplay -f cd 2>/dev/null"
## Or to send raw PCM stream through PCM:
#       command         "nc example.org 8765"
#       format          "44100:16:2"
#}
#
## An example of a null output (for no audio output):
#
#audio_output {
#       type            "null"
#       name            "My Null Output"
#       mixer_type      "none"                  # optional
#}
#
# If MPD has been compiled with libsamplerate support, this setting specifies 
# the sample rate converter to use.  Possible values can be found in the 
# mpd.conf man page or the libsamplerate documentation. By default, this is
# setting is disabled.
#
#samplerate_converter           "Fastest Sinc Interpolator"
#
###############################################################################


# Normalization automatic volume adjustments ##################################
#
# This setting specifies the type of ReplayGain to use. This setting can have
# the argument "off", "album", "track" or "auto". "auto" is a special mode that
# chooses between "track" and "album" depending on the current state of
# random playback. If random playback is enabled then "track" mode is used.
# See <http://www.replaygain.org> for more details about ReplayGain.
# This setting is off by default.
#
#replaygain                     "album"
#
# This setting sets the pre-amp used for files that have ReplayGain tags. By
# default this setting is disabled.
#
#replaygain_preamp              "0"
#
# This setting sets the pre-amp used for files that do NOT have ReplayGain tags.
# By default this setting is disabled.
#
#replaygain_missing_preamp      "0"
#
# This setting enables or disables ReplayGain limiting.
# MPD calculates actual amplification based on the ReplayGain tags
# and replaygain_preamp / replaygain_missing_preamp setting.
# If replaygain_limit is enabled MPD will never amplify audio signal
# above its original level. If replaygain_limit is disabled such amplification
# might occur. By default this setting is enabled.
#
#replaygain_limit               "yes"
#
# This setting enables on-the-fly normalization volume adjustment. This will
# result in the volume of all playing audio to be adjusted so the output has 
# equal "loudness". This setting is disabled by default.
#
#volume_normalization           "no"
#
###############################################################################


# Character Encoding ##########################################################
#
# If file or directory names do not display correctly for your locale then you 
# may need to modify this setting.
#
filesystem_charset              "UTF-8"
#
# This setting controls the encoding that ID3v1 tags should be converted from.
#
id3v1_encoding                  "UTF-8"
#
###############################################################################


# SIDPlay decoder #############################################################
#
# songlength_database:
#  Location of your songlengths file, as distributed with the HVSC.
#  The sidplay plugin checks this for matching MD5 fingerprints.
#  See http://www.c64.org/HVSC/DOCUMENTS/Songlengths.faq
#
# default_songlength:
#  This is the default playing time in seconds for songs not in the
#  songlength database, or in case you're not using a database.
#  A value of 0 means play indefinitely.
#
# filter:
#  Turns the SID filter emulation on or off.
#
#decoder {
#       plugin                  "sidplay"
#       songlength_database     "/media/C64Music/DOCUMENTS/Songlengths.txt"
#       default_songlength      "120"
#       filter "true"
#}
#
###############################################################################

pi@raspberrypi:/etc $ 
Here are the other two results:-

Code: Select all

pi@raspberrypi:/etc $ ps -Ouser $(pidof mpd)
  PID USER     S TTY          TIME COMMAND
  574 mpd      S ?        00:00:29 /usr/bin/mpd --no-daemon
pi@raspberrypi:/etc $ 
and

Code: Select all

pi@raspberrypi:/etc $ ps -Ouser $(pidof upmpdcli)
  PID USER     S TTY          TIME COMMAND
  637 upmpdcli S ?        00:01:04 /usr/bin/upmpdcli -D -c /etc/upmpdcli.conf
pi@raspberrypi:/etc $ 
I wonder why mpd has "no-daemon" as I understood this should be running but I am out of my depth as you can tell. Hope the above will help you solve problem.
Regards,

User avatar
dasmanul
Posts: 502
Joined: Wed Sep 30, 2015 10:20 am
Location: Frankfurt, Germany

Re: Help please Setting upmpdcli on Pi 3

Tue Jul 26, 2016 10:23 am

Do you also have a log file for mpd? As per your configuration, it should be in /var/log/mpd/mpd.log. Does this file exist? If not, does the directory exist? What are the permissions on both ("ls -la /var/log/mpd")?

Could you also post the output of "amixer"?

Budgie
Posts: 36
Joined: Mon Jan 19, 2015 3:30 pm

Re: Help please Setting upmpdcli on Pi 3

Tue Jul 26, 2016 11:05 am

Hi, here is the mpd.log file:-

Code: Select all

pi@raspberrypi:/var/log/mpd $ cat mpd.log
Jul 24 08:17 : zeroconf: No global port, disabling zeroconf
Jul 24 08:17 : client: [0] opened from [::1]:43596
Jul 24 08:17 : alsa_mixer: Failed to read mixer for 'My ALSA Device': no such mixer control: PCM
Jul 25 23:33 : output: Failed to open mixer for 'My ALSA Device'
Jul 25 23:33 : client: [0] closed
Jul 25 23:33 : client: [1] opened from [::1]:43760
Jul 25 23:33 : client: [1] closed
Jul 25 23:33 : client: [2] opened from [::1]:43764
Jul 25 23:33 : client: [2] closed
Jul 25 23:33 : client: [3] opened from [::1]:43766
Jul 25 23:33 : player: played "http://192.168.169.130:9790/minimserver/*/Music/Liturgical/Bach,*20Johann*20Sebastian*20(1685-1750)/St.*20Matthew*20Passion,*20BWV*20244*20(John*20Butt)/096*20-*20Aria_*20Mache*20dich,*20mein*20Herze,*20rein.flac"
pi@raspberrypi:/var/log/mpd $ 
The ownership etc:-

Code: Select all

pi@raspberrypi:/var/log/mpd $ ls -la
total 16
drwxr-xr-x 2 mpd  audio 4096 Jul 24 06:25 .
drwxr-xr-x 8 root root  4096 Jul 26 06:25 ..                                                                 
-rw-r--r-- 1 root root   773 Jul 25 23:33 mpd.log                                                            
-rw-r--r-- 1 root root  1418 Jul 22 01:03 mpd.log.1.gz                                                       
pi@raspberrypi:/var/log/mpd $                  
and for upmpdcli.log

Code: Select all

-rw-r--r--  1 upmpdcli root    1950 Jul 22 00:45 upmpdcli.log
I shall create a subdirectory for upmpdcli logs to keep it correct later.

Here is the output from running amixer:-

Code: Select all

pi@raspberrypi:/ $ amixer
Simple mixer control 'DSP Program',0
  Capabilities: enum
  Items: 'FIR interpolation with de-emphasis' 'Low latency IIR with de-emphasis' 'High attenuation with de-emphasis' 'Fixed process flow' 'Ringing-less low latency FIR'
  Item0: 'FIR interpolation with de-emphasis'
Simple mixer control 'Analogue',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 1
  Mono:
  Front Left: Playback 1 [100%] [0.00dB]
  Front Right: Playback 1 [100%] [0.00dB]
Simple mixer control 'Analogue Playback Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 1
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Auto Mute',0
  Capabilities: pswitch
  Playback channels: Front Left - Front Right
  Mono:
  Front Left: Playback [on]
  Front Right: Playback [on]
Simple mixer control 'Auto Mute Mono',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Auto Mute Time Left',0
  Capabilities: enum
  Items: '21ms' '106ms' '213ms' '533ms' '1.07s' '2.13s' '5.33s' '10.66s'
  Item0: '21ms'
Simple mixer control 'Auto Mute Time Right',0
  Capabilities: enum
  Items: '21ms' '106ms' '213ms' '533ms' '1.07s' '2.13s' '5.33s' '10.66s'
  Item0: '21ms'
Simple mixer control 'Clock Missing Period',0
  Capabilities: enum
  Items: '1s' '2s' '3s' '4s' '5s' '6s' '7s' '8s'
  Item0: '1s'
Simple mixer control 'Deemphasis',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Digital',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 207
  Mono:
  Front Left: Playback 192 [93%] [-7.50dB] [on]
  Front Right: Playback 192 [93%] [-7.50dB] [on]
Simple mixer control 'Max Overclock DAC',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 40
  Mono: 0 [0%]
Simple mixer control 'Max Overclock DSP',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 40
  Mono: 0 [0%]
Simple mixer control 'Max Overclock PLL',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 20
  Mono: 0 [0%]
Simple mixer control 'Volume Ramp Down Emergency Rate',0
  Capabilities: enum
  Items: '1 sample/update' '2 samples/update' '4 samples/update' 'Immediate'
  Item0: '1 sample/update'
Simple mixer control 'Volume Ramp Down Emergency Step',0
  Capabilities: enum
  Items: '4dB/step' '2dB/step' '1dB/step' '0.5dB/step'
  Item0: '4dB/step'
Simple mixer control 'Volume Ramp Down Rate',0
  Capabilities: enum
  Items: '1 sample/update' '2 samples/update' '4 samples/update' 'Immediate'
  Item0: '1 sample/update'
Simple mixer control 'Volume Ramp Down Step',0
  Capabilities: enum
  Items: '4dB/step' '2dB/step' '1dB/step' '0.5dB/step'
  Item0: '1dB/step'
Simple mixer control 'Volume Ramp Up Rate',0
  Capabilities: enum
  Items: '1 sample/update' '2 samples/update' '4 samples/update' 'Immediate'
  Item0: '1 sample/update'
Simple mixer control 'Volume Ramp Up Step',0
  Capabilities: enum
  Items: '4dB/step' '2dB/step' '1dB/step' '0.5dB/step'
  Item0: '1dB/step'
pi@raspberrypi:/ $ 

User avatar
dasmanul
Posts: 502
Joined: Wed Sep 30, 2015 10:20 am
Location: Frankfurt, Germany

Re: Help please Setting upmpdcli on Pi 3

Tue Jul 26, 2016 11:14 am

Try adding a line 'mixer_control "Digital"' to the audio output section of your mpd.conf, so that the section looks like this:

Code: Select all

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_control   "Digital"           # optional
#       mixer_index     "0"             # optional
}
If that doesn't work, experiment with the other "Simple mixer control" names from the amixer output. Try those that offer "pvolume" or "volume" under capabilities first. Don't forget to restart mpd ("sudo systemctl restart mpd") every time after you make a change.

Could you also post the output of "aplay -l"?

Budgie
Posts: 36
Joined: Mon Jan 19, 2015 3:30 pm

Re: Help please Setting upmpdcli on Pi 3

Tue Jul 26, 2016 1:53 pm

Hi, sadly no joy yet. Here is the output of aplay -l

Code: Select all

pi@raspberrypi:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: IQaudIODAC [IQaudIODAC], device 0: IQaudIO DAC HiFi pcm512x-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
pi@raspberrypi:~ $ 
I tried IQaudioIODAC in place of "My Alsa Device" but is not working. It does seem to me that I should have something more specific than "My Alsa Device" but am not sure of syntax and format.

User avatar
dasmanul
Posts: 502
Joined: Wed Sep 30, 2015 10:20 am
Location: Frankfurt, Germany

Re: Help please Setting upmpdcli on Pi 3

Tue Jul 26, 2016 2:17 pm

I think "My Alsa Device" is just an internal name for mpd which doesn't matter at all. With only one ALSA device present, you should be good without specifying the device anyway.

What values did you try for mixer_control? Did these values reflect in the log files, i.e. did the "no such mixer control: PCM" in mpd.log change to whatever you specified? If not, you probably didn't properly restart mpd.

Try the following: Start some music, then call "alsamixer" from the command line. You should be presented with one or more mixer controls in the text console. You can move between these with cursor left and right and adjust the level with + and - or up and down. Experiment and find out which controls actually change your volume. Then try the name of these controls (written underneath them) for mixer_control.

Budgie
Posts: 36
Joined: Mon Jan 19, 2015 3:30 pm

Re: Help please Setting upmpdcli on Pi 3

Tue Jul 26, 2016 2:47 pm

Hi and thanks for being so long suffering.

The mixer control changes are reflected in the mpd.log file. The volume is altered by "Digital."
I shall try a few more later.
Could it be the upmpdcli.conf is wrong?

User avatar
dasmanul
Posts: 502
Joined: Wed Sep 30, 2015 10:20 am
Location: Frankfurt, Germany

Re: Help please Setting upmpdcli on Pi 3

Tue Jul 26, 2016 3:03 pm

If "Digital" actually changes your volume, I think that's what you should use. Could you try setting this again, restarting mpd and then trying to change the volume from BubbleUPnP? Do you then get more "error 52" entries in upmpdcli.log?

I doubt upmpdcli.conf has much to do with it, but there's no harm in posting it. Maybe you could again post your complete mpd.conf (including the changed mixer_control), upmpdcli.conf and both logfiles after the experiment above - just to make sure no errors have crept in on the way?

Budgie
Posts: 36
Joined: Mon Jan 19, 2015 3:30 pm

Re: Help please Setting upmpdcli on Pi 3

Tue Jul 26, 2016 8:42 pm

OK I have restored mixer_control to "Digital" but not changed the card back.
Here is the mpd.log from my reboot and starting to play:-

Code: Select all

Jul 26 21:26 : player: played "http://192.168.169.130:9790/minimserver/*/Music/Liturgical/Bach,*20Johann*20Sebastian*20(1685-1750)/St.*20Matthew*20Passion,*20BWV*20244*20(John*20Butt)/101*20-*20Chorus_*20Wir*20setzen*20uns*20mit*20Tranen*20nieder.flac"
Jul 26 21:26 : zeroconf: No global port, disabling zeroconf
Jul 26 21:26 : client: [0] opened from [::1]:38104
Jul 26 21:26 : alsa_mixer: Failed to read mixer for 'IQaudIODAC': no such mixer control: Digital
Jul 26 21:30 : player: played "http://192.168.169.130:9790/minimserver/*/Music/Liturgical/Bach,*20Johann*20Sebastian*20(1685-1750)/St.*20Matthew*20Passion,*20BWV*20244*20(John*20Butt)/101*20-*20Chorus_*20Wir*20setzen*20uns*20mit*20Tranen*20nieder.flac"
Jul 26 21:30 : zeroconf: No global port, disabling zeroconf
Jul 26 21:30 : client: [0] opened from [::1]:41764
Jul 26 21:30 : curl: curl failed:
Jul 26 21:30 : player: played "http://192.168.169.130:9790/minimserver/*/Music/Liturgical/Bach,*20Johann*20Sebastian*20(1685-1750)/St.*20Matthew*20Passion,*20BWV*20244*20(John*20Butt)/101*20-*20Chorus_*20Wir*20setzen*20uns*20mit*20Tranen*20nieder.flac"
Jul 26 21:30 : alsa_mixer: Failed to read mixer for 'IQaudIODAC': no such mixer control: Digital
Jul 26 21:31 : output: Failed to open mixer for 'IQaudIODAC'
Jul 26 21:31 : client: [0] closed
Jul 26 21:31 : client: [1] opened from [::1]:41830
Jul 26 21:31 : client: [1] closed
Jul 26 21:31 : client: [2] opened from [::1]:41832
Jul 26 21:31 : client: [2] closed
Jul 26 21:31 : client: [3] opened from [::1]:41834
Jul 26 21:31 : client: [3] closed
Jul 26 21:31 : client: [4] opened from [::1]:41838
Jul 26 21:31 : client: [4] closed
Jul 26 21:31 : client: [5] opened from [::1]:41840
Jul 26 21:31 : client: [5] closed
Jul 26 21:31 : client: [6] opened from [::1]:41842
Jul 26 21:31 : player: played "http://192.168.169.130:9790/minimserver/*/Music/Liturgical/Bach,*20Johann*20Sebastian*20(1685-1750)/St.*20Matthew*20Passion,*20BWV*20244*20(John*20Butt)/096*20-*20Aria_*20Mache*20dich,*20mein*20Herze,*20rein.flac"
Jul 26 21:32 : output: Failed to open mixer for 'IQaudIODAC'
Jul 26 21:32 : player: played "http://192.168.169.130:9790/minimserver/*/Music/Liturgical/Bach,*20Johann*20Sebastian*20(1685-1750)/St.*20Matthew*20Passion,*20BWV*20244*20(John*20Butt)/096*20-*20Aria_*20Mache*20dich,*20mein*20Herze,*20rein.flac"
pi@raspberrypi:/var/log/mpd $ 
and here is upmpdcli.log:-

Code: Select all

pi@raspberrypi:/var/log/upmpdcli $ cat upmpdcli.log
libupnpp/upnpplib.cxx:131::LibUPnP::LibUPnP: failed retrieving addr
libupnpp/upnpplib.cxx:278::LibUPnP::~LibUPnP: UpnpFinish :-116: UPNP_E_FINISH
src/httpfs.cxx:205::Failed reading /usr/share/upmpdcli/icon.png : open/stat: errno: 2 : 
src/mpdcli.cxx:137::mpd_run_set_volume(M_CONN, volume) failed: problems setting volume
src/mpdcli.cxx:140::mpd_run_set_volume(M_CONN, volume) server error: 52
src/mpdcli.cxx:137::mpd_run_set_volume(M_CONN, volume) failed: problems setting volume
src/mpdcli.cxx:140::mpd_run_set_volume(M_CONN, volume) server error: 52
src/mpdcli.cxx:137::mpd_run_set_volume(M_CONN, volume) failed: problems setting volume
src/mpdcli.cxx:140::mpd_run_set_volume(M_CONN, volume) server error: 52
src/mpdcli.cxx:137::mpd_run_set_volume(M_CONN, volume) failed: problems setting volume
src/mpdcli.cxx:140::mpd_run_set_volume(M_CONN, volume) server error: 52
src/mpdcli.cxx:137::mpd_run_set_volume(M_CONN, volume) failed: problems setting volume
src/mpdcli.cxx:140::mpd_run_set_volume(M_CONN, volume) server error: 52
src/mpdcli.cxx:137::mpd_run_set_volume(M_CONN, volume) failed: problems setting volume
src/mpdcli.cxx:140::mpd_run_set_volume(M_CONN, volume) server error: 52
src/mpdcli.cxx:137::mpd_run_set_volume(M_CONN, volume) failed: problems setting volume
src/mpdcli.cxx:140::mpd_run_set_volume(M_CONN, volume) server error: 52
src/mpdcli.cxx:137::mpd_run_set_volume(M_CONN, volume) failed: problems setting volume
src/mpdcli.cxx:140::mpd_run_set_volume(M_CONN, volume) server error: 52
pi@raspberrypi:/var/log/upmpdcli $ 
The BubbleUPnP control is now worse as the pause no longer works. I guess I will get rid of the card name and try again.

FYI here is the upmpdcli.conf file:-

Code: Select all

pi@raspberrypi:/etc $ cat upmpdcli.conf
# Configuration file for upmpdcli, the UPnP Media Renderer front-end to MPD

# Note: the command line options have higher priorities than the values in
# this file.

# Host MPD runs on. Defaults to localhost. This can also be specified as -h host
mpdhost = localhost

# Port for MPD. Can also be specified as -p port
mpdport = 6600

# MPD password

# mpdpassword =  

# Displayed "Friendly Name" for the UPnP Media Renderer


friendlyname = RPiplayer

# Log file name. Defaults to stderr. This can also be specified as
# -d logfilename

logfilename = /var/log/upmpdcli/upmpdcli.log 

# Log level. 0-4. Can also be specified as -l loglevel.
loglevel = 3

# You can set a path to an icon here. The icon will be displayed by a control
# point. The icon will only be read once, when upmpdcli starts up.
iconpath = /usr/share/upmpdcli/icon.png

# You can set a path to an html file here, to replace the default
# presentation page. The page will only be read once, when upmpdcli starts
# up.
presentationhtml = /usr/share/upmpdcli/presentation.html

# Network interface to use for UPnP.
#upnpiface = 
# IP address to use for UPnP. Alternative to using an interface name
#upnpip = 
# Port number used for UPnP.
#upnpport = 

# Enable UPnP AV services. This is set by default, but it may useful to
# disable it with some pure OpenHome Control Points.
# upnpav = 1

# Decide if we offer the OpenHome services. 0 or 1. 
# The default is 'yes' as OpenHome queuing is superior for most usages.
openhome = 1

# Save queue metadata to disk to allow persistence across restart, like
# MPD.
ohmetapersist = 1

# Directory used to store cached data (only the queue metadata for now). 
# Default is ~/.cache/upmpdcli for normal users or /var/cache/upmpdcli when
# started as root
# cachedir = /var/cache/upmpdcli

# Name of lock file used to store the current process pid. Only used if the
# process is launched by user root. Used by the init system, and to avoid
# multiple instances. The only reason to change the value is if you
# actually want to have several instances running (also change cachedir in
# this case).
# pidfile = /var/run/upmpdcli.pid

# Mimimum interval (Seconds) between 2 saves of the cache. Setting this may
# improve playlist load speed on a slow device. The default is to start a
# new save as soon as the previous one is done (if the list changed again
# inbetween).
# ohmetasleep = 0

# Run a command when playback is about to begin. Specify the full path to the
# program, e.g. /usr/bin/logger. Executable scripts work, but must have a
# #!/bin/sh (or whatever) in the headline.
# onstart =

# Run a command when playback is about to begin. Specify the full path to the
# program, e.g. /usr/bin/logger. Executable scripts work, but must have a
# #!/bin/sh (or whatever) in the headline.
# onplay =

# Run a command when playback is about to end. Specify the full path to the
# program, e.g. /usr/bin/logger. Executable scripts work, but must have a
# #!/bin/sh (or whatever) in the headline.
# onstop =

# volume control can be done via mpd using alsa mixer controls. If you have an external amp
# and it is capable of setting and reading volume via a script you can activate
# externalvolumecontrol. No volumes will be set via mpd anylonger. It will call
# scripts onvolumechange for setting and getexternalvolume for reading recent volume.
# externalvolumecontrol = 

# Run a command for reading volume from external device. upmpdcli will read 
# volume from stdout of the script given.
# getexternalvolume =

# Run a command when volume is changed. Specify the full path to the program,
# e.g. /usr/bin/logger. Executable scripts work, but must have a #!/bin/sh (or
# whatever) in the headline.
# The command is called with the volume as the first argument, e.g.
# <command> 85.
# onvolumechange =

### Parameters for the OpenHome Product service
# Manufacturer name. Does not vary at run-time.
#ohmanufacturername = UpMPDCli heavy industries Co.
# Manufacturer information. Does not vary at run-time.
#ohmanufacturerinfo = Such nice guys and gals
# URL for manufacturer web site. Does not vary at run-time.
#ohmanufacturerurl = http://www.lesbonscomptes.com/upmpdcli
# Uri for manufacturer’s logo. Does not vary at run-time.
#ohmanufacturerimageuri =
# Model name. Does not vary at run-time.
#ohmodelname = UpMPDCli UPnP-MPD gateway
# Model information. Does not vary at run-time.
#ohmodelinfo =
# URL for model web site. Does not vary at run-time.
#ohmodelurl = http://www.lesbonscomptes.com/upmpdcli
# Uri for model’s icon. Does not vary at run-time.
#ohmodelimageuri =
# User-visible product name. By default this is set to ModelName.
#ohproductname = Upmpdcli
# The name of the room where the Product is located. Set to “Main Room” by
# default.
# ProductRoom is used to group the Product with other related Products in the
# same physical room (e.g. a source with a pre-amp). Products which are
# physically linked must always share the same ProductRoom name.
#ohproductroom = Main Room
# Product information. Does not vary at run-time.
#ohproductinfo =
# URL for product web site. This may be the UPnP presentation page.
#ohproducturl =
# Uri for product image. Does not vary at run-time.
#ohproductimageuri =

### Parameters for the Songcast modes. These are read by either/both the
### songcast and upmpdcli.

#  Log file name for sc2mpd (default stderr), and level. The file must
#  *not* be the same as the one used for upmpdcli
#sclogfilename = /tmp/scmpdcli.log
#scloglevel = 6

# Play method. This can be either mpd or alsa. alsa is the only way to
# really avoid skips (and control the synchronization in multi-room setups). 
#scplaymethod = mpd

# For the mpd play method only: port for connections from MPD to
# sc2mpd. The latter only accepts connections from localhost.
#schttpport = 8768

# For the alsa play method only: Alsa device to use
#scalsadevice = default

# Resampling method. The default is SRC_SINC_FASTEST and works on a
# Rasberry Pi.
# Possible values: SRC_SINC_BEST_QUALITY SRC_SINC_MEDIUM_QUALITY
# SRC_SINC_FASTEST SRC_ZERO_ORDER_HOLD SRC_LINEAR
# See libsamplerate doc for descriptions. Anything above SRC_SINC_FASTEST
# needs a serious CPU
# BEST_QUALITY uses approx 25% cpu on a core i7 4770T. Obviously too much,
# actually might not be sustainable (it's almost 100% of 1 cpu)
# MEDIUM_QUALITY is around 10% on the same machine, FASTEST is 4-5%. Given
# that this measured for the full process, probably a couple % for the
# conversion in fact. 
# Raspberry Pi: FASTEST is 30% CPU on a Pi2 with USB audio. It's
# 25-30% on a Pi 1 with i2s audio. 
# sccvttype = SRC_SINC_FASTEST.

# Path to sc2mpd if it is not in /usr/bin and the location is not in the
# PATH for the init scripts.
#sc2mpd = /usr/bin/sc2mpd

## Parameters tor the Sender/Receiver mode. Only does anything if
## scplaymethod is alsa 

# Path to the script which starts the auxiliary mpd and the sender process
#scsenderpath = /usr/bin/scmakempdsender

# Decide if we scale the songcast stream (apply software volume control to
# it). True by default, the volume set from a control point on the upmpdcli
# instance which started the sender affects the volume for all receivers.
#scstreamscaled = 1

# localhost port to use by the auxiliary mpd
#scsendermpdport = 6700

# Scripts_dir holds scripts to set up additional external sources. See the
# documentation. 
#scripts_dir = /usr/share/upmpdcli/src_scripts


# Initial / default List of radios borrowed from misc sources. Edit to taste
#
# Maybe this should be XML, but it's not. The section markers are the radio
# names, and then there are two possible entries:
#  url (mandatory) points to the radio playlist or stream
#  artUrl (optional) points to the radio icon

[radio FIP autour du rock]
url = http://webradiofip1.scdn.arkena.com/webradiofip1.mp3
artUrl = http://www.fipradio.fr/sites/all/themes/custom/fip/img/logo_fip_header.png

[radio Radio Eins]
url = http://opml.radiotime.com/Tune.ashx?id=s25111
artUrl = http://cdn-radiotime-logos.tunein.com/s25111q.png

[radio InfoRadio]
url = http://opml.radiotime.com/Tune.ashx?id=s9176
artUrl = http://cdn-radiotime-logos.tunein.com/s9176q.png

[radio Radio Teddy]
url = http://opml.radiotime.com/Tune.ashx?id=s80044
artUrl = http://cdn-radiotime-logos.tunein.com/s80044q.png

[radio Deutschlandfunk]
url = http://opml.radiotime.com/Tune.ashx?id=s55698
artUrl = http://cdn-radiotime-logos.tunein.com/s42828q.png

[clip]

User avatar
dasmanul
Posts: 502
Joined: Wed Sep 30, 2015 10:20 am
Location: Frankfurt, Germany

Re: Help please Setting upmpdcli on Pi 3

Tue Jul 26, 2016 10:02 pm

Thanks. Just to be sure, could you also post the current version of your mpd.conf? I'm experimenting with my own setup right now and will get back to you.

Budgie
Posts: 36
Joined: Mon Jan 19, 2015 3:30 pm

Re: Help please Setting upmpdcli on Pi 3

Wed Jul 27, 2016 7:01 am

Hi, here it is:-

Code: Select all

pi@raspberrypi:/etc $ cat mpd.conf
# An example configuration file for MPD.
# Read the user manual for documentation: http://www.musicpd.org/doc/user/
# or /usr/share/doc/mpd/user-manual.html


# Files and directories #######################################################
#
# This setting controls the top directory which MPD will search to discover the
# available audio files and add them to the daemon's online database. This 
# setting defaults to the XDG directory, otherwise the music directory will be
# be disabled and audio files will only be accepted over ipc socket (using
# file:// protocol) or streaming files over an accepted protocol.
#
music_directory         "/var/lib/mpd/music"
#
# This setting sets the MPD internal playlist directory. The purpose of this
# directory is storage for playlists created by MPD. The server will use 
# playlist files not created by the server but only if they are in the MPD
# format. This setting defaults to playlist saving being disabled.
#
playlist_directory              "/var/lib/mpd/playlists"
#
# This setting sets the location of the MPD database. This file is used to
# load the database at server start up and store the database while the 
# server is not up. This setting defaults to disabled which will allow
# MPD to accept files over ipc socket (using file:// protocol) or streaming
# files over an accepted protocol.
#
db_file                 "/var/lib/mpd/tag_cache"                                                             
#                                                                                                            
# These settings are the locations for the daemon log files for the daemon.                                  
# These logs are great for troubleshooting, depending on your log_level                                      
# settings.
#
# The special value "syslog" makes MPD use the local syslog daemon. This
# setting defaults to logging to syslog, otherwise logging is disabled.
#
log_file                        "/var/log/mpd/mpd.log"
#
# This setting sets the location of the file which stores the process ID
# for use of mpd --kill and some init scripts. This setting is disabled by
# default and the pid file will not be stored.
#
pid_file                        "/run/mpd/pid"
#
# This setting sets the location of the file which contains information about
# most variables to get MPD back into the same general shape it was in before
# it was brought down. This setting is disabled by default and the server 
# state will be reset on server start up.
#
state_file                      "/var/lib/mpd/state"
#
# The location of the sticker database.  This is a database which
# manages dynamic information attached to songs.
#
sticker_file                   "/var/lib/mpd/sticker.sql"
#
###############################################################################


# General music daemon options ################################################
#
# This setting specifies the user that MPD will run as. MPD should never run as
# root and you may use this setting to make MPD change its user ID after
# initialization. This setting is disabled by default and MPD is run as the
# current user.
#
user                            "mpd"
#
# This setting specifies the group that MPD will run as. If not specified
# primary group of user specified with "user" setting will be used (if set).
# This is useful if MPD needs to be a member of group such as "audio" to
# have permission to use sound card.
#
#group                          "nogroup"
#
# This setting sets the address for the daemon to listen on. Careful attention
# should be paid if this is assigned to anything other then the default, any.
# This setting can deny access to control of the daemon. Choose any if you want
# to have mpd listen on every address
#
# For network
bind_to_address         "localhost"
#
# And for Unix Socket
#bind_to_address                "/run/mpd/socket"
#
# This setting is the TCP port that is desired for the daemon to get assigned
# to.
#
#port                           "6600"
#
# This setting controls the type of information which is logged. Available 
# setting arguments are "default", "secure" or "verbose". The "verbose" setting
# argument is recommended for troubleshooting, though can quickly stretch
# available resources on limited hardware storage.
#
#log_level                      "default"
#
# If you have a problem with your MP3s ending abruptly it is recommended that 
# you set this argument to "no" to attempt to fix the problem. If this solves
# the problem, it is highly recommended to fix the MP3 files with vbrfix
# (available as vbrfix in the debian archive), at which
# point gapless MP3 playback can be enabled.
#
#gapless_mp3_playback                   "yes"
#
# Setting "restore_paused" to "yes" puts MPD into pause mode instead
# of starting playback after startup.
#
#restore_paused "no"
#
# This setting enables MPD to create playlists in a format usable by other
# music players.
#
#save_absolute_paths_in_playlists       "no"
#
# This setting defines a list of tag types that will be extracted during the 
# audio file discovery process. The complete list of possible values can be
# found in the mpd.conf man page.
#metadata_to_use        "artist,album,title,track,name,genre,date,composer,performer,disc"
#
# This setting enables automatic update of MPD's database when files in 
# music_directory are changed.
#
#auto_update    "yes"
#
# Limit the depth of the directories being watched, 0 means only watch
# the music directory itself.  There is no limit by default.
#
#auto_update_depth "3"
#
###############################################################################


# Symbolic link behavior ######################################################
#
# If this setting is set to "yes", MPD will discover audio files by following 
# symbolic links outside of the configured music_directory.
#
#follow_outside_symlinks        "yes"
#
# If this setting is set to "yes", MPD will discover audio files by following
# symbolic links inside of the configured music_directory.
#
#follow_inside_symlinks         "yes"
#
###############################################################################


# Zeroconf / Avahi Service Discovery ##########################################
#
# If this setting is set to "yes", service information will be published with
# Zeroconf / Avahi.
#
#zeroconf_enabled               "yes"
#
# The argument to this setting will be the Zeroconf / Avahi unique name for
# this MPD server on the network.
#
#zeroconf_name                  "Music Player"
#
###############################################################################


# Permissions #################################################################
#
# If this setting is set, MPD will require password authorization. The password
# can setting can be specified multiple times for different password profiles.
#
#password                        "password@read,add,control,admin"
#
# This setting specifies the permissions a user has who has not yet logged in. 
#
#default_permissions             "read,add,control,admin"
#
###############################################################################


# Database #######################################################################
#

#database {
#       plugin "proxy"
#       host "other.mpd.host"
#       port "6600"
#}

# Input #######################################################################
#

input {
        plugin "curl"
#       proxy "proxy.isp.com:8080"
#       proxy_user "user"
#       proxy_password "password"
}

#
###############################################################################

# Audio Output ################################################################
#
# MPD supports various audio output types, as well as playing through multiple 
# audio outputs at the same time, through multiple audio_output settings 
# blocks. Setting this block is optional, though the server will only attempt
# autodetection for one sound card.
#
# An example of an ALSA output:
#
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_control   "Digital"
#       mixer_index     "0"             # optional
}
#
# An example of an OSS output:
#
#audio_output {
#       type            "oss"
#       name            "My OSS Device"
#       device          "/dev/dsp"      # optional
#       mixer_type      "hardware"      # optional
#       mixer_device    "/dev/mixer"    # optional
#       mixer_control   "PCM"           # optional
#}
#
# An example of a shout output (for streaming to Icecast):
#
#audio_output {
#       type            "shout"
#       encoding        "ogg"                   # optional
#       name            "My Shout Stream"
#       host            "localhost"
#       port            "8000"
#       mount           "/mpd.ogg"
#       password        "hackme"
#       quality         "5.0"
#       bitrate         "128"
#       format          "44100:16:1"
#       protocol        "icecast2"              # optional
#       user            "source"                # optional
#       description     "My Stream Description" # optional
#       url             "http://example.com"    # optional
#       genre           "jazz"                  # optional
#       public          "no"                    # optional
#       timeout         "2"                     # optional
#       mixer_type      "software"              # optional
#}
#
# An example of a recorder output:
#
#audio_output {
#       type            "recorder"
#       name            "My recorder"
#       encoder         "vorbis"                # optional, vorbis or lame
#       path            "/var/lib/mpd/recorder/mpd.ogg"
##      quality         "5.0"                   # do not define if bitrate is defined
#       bitrate         "128"                   # do not define if quality is defined
#       format          "44100:16:1"
#}
#
# An example of a httpd output (built-in HTTP streaming server):
#
#audio_output {
#       type            "httpd"
#       name            "My HTTP Stream"
#       encoder         "vorbis"                # optional, vorbis or lame
#       port            "8000"
#       bind_to_address "0.0.0.0"               # optional, IPv4 or IPv6
#       quality         "5.0"                   # do not define if bitrate is defined
#       bitrate         "128"                   # do not define if quality is defined
#       format          "44100:16:1"
#       max_clients     "0"                     # optional 0=no limit
#}
#
# An example of a pulseaudio output (streaming to a remote pulseaudio server)
# Please see README.Debian if you want mpd to play through the pulseaudio
# daemon started as part of your graphical desktop session!
#
#audio_output {
#       type            "pulse"
#       name            "My Pulse Output"
#       server          "remote_server"         # optional
#       sink            "remote_server_sink"    # optional
#}
#
# An example of a winmm output (Windows multimedia API).
#
#audio_output {
#       type            "winmm"
#       name            "My WinMM output"
#       device          "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
#               or
#       device          "0"             # optional
#       mixer_type      "hardware"      # optional
#}
#
# An example of an openal output.
#
#audio_output {
#       type            "openal"
#       name            "My OpenAL output"
#       device          "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
#}
#
## Example "pipe" output:
#
#audio_output {
#       type            "pipe"
#       name            "my pipe"
#       command         "aplay -f cd 2>/dev/null"
## Or if you're want to use AudioCompress
#       command         "AudioCompress -m | aplay -f cd 2>/dev/null"
## Or to send raw PCM stream through PCM:
#       command         "nc example.org 8765"
#       format          "44100:16:2"
#}
#
## An example of a null output (for no audio output):
#
#audio_output {
#       type            "null"
#       name            "My Null Output"
#       mixer_type      "none"                  # optional
#}
#
# If MPD has been compiled with libsamplerate support, this setting specifies 
# the sample rate converter to use.  Possible values can be found in the 
# mpd.conf man page or the libsamplerate documentation. By default, this is
# setting is disabled.
#
#samplerate_converter           "Fastest Sinc Interpolator"
#
###############################################################################


# Normalization automatic volume adjustments ##################################
#
# This setting specifies the type of ReplayGain to use. This setting can have
# the argument "off", "album", "track" or "auto". "auto" is a special mode that
# chooses between "track" and "album" depending on the current state of
# random playback. If random playback is enabled then "track" mode is used.
# See <http://www.replaygain.org> for more details about ReplayGain.
# This setting is off by default.
#
#replaygain                     "album"
#
# This setting sets the pre-amp used for files that have ReplayGain tags. By
# default this setting is disabled.
#
#replaygain_preamp              "0"
#
# This setting sets the pre-amp used for files that do NOT have ReplayGain tags.
# By default this setting is disabled.
#
#replaygain_missing_preamp      "0"
#
# This setting enables or disables ReplayGain limiting.
# MPD calculates actual amplification based on the ReplayGain tags
# and replaygain_preamp / replaygain_missing_preamp setting.
# If replaygain_limit is enabled MPD will never amplify audio signal
# above its original level. If replaygain_limit is disabled such amplification
# might occur. By default this setting is enabled.
#
#replaygain_limit               "yes"
#
# This setting enables on-the-fly normalization volume adjustment. This will
# result in the volume of all playing audio to be adjusted so the output has 
# equal "loudness". This setting is disabled by default.
#
#volume_normalization           "no"
#
###############################################################################


# Character Encoding ##########################################################
#
# If file or directory names do not display correctly for your locale then you 
# may need to modify this setting.
#
filesystem_charset              "UTF-8"
#
# This setting controls the encoding that ID3v1 tags should be converted from.
#
id3v1_encoding                  "UTF-8"
#
###############################################################################


# SIDPlay decoder #############################################################
#
# songlength_database:
#  Location of your songlengths file, as distributed with the HVSC.
#  The sidplay plugin checks this for matching MD5 fingerprints.
#  See http://www.c64.org/HVSC/DOCUMENTS/Songlengths.faq
#
# default_songlength:
#  This is the default playing time in seconds for songs not in the
#  songlength database, or in case you're not using a database.
#  A value of 0 means play indefinitely.
#
# filter:
#  Turns the SID filter emulation on or off.
#
#decoder {
#       plugin                  "sidplay"
#       songlength_database     "/media/C64Music/DOCUMENTS/Songlengths.txt"
#       default_songlength      "120"
#       filter "true"
#}
#
###############################################################################

pi@raspberrypi:/etc $ 

Budgie
Posts: 36
Joined: Mon Jan 19, 2015 3:30 pm

Re: Help please Setting upmpdcli on Pi 3

Wed Jul 27, 2016 10:52 am

I have it now. mpd.conf should have:-

Code: Select all

audio_output

{
	type			“alsa"

	name			“Output"

	device			"hw:0,0”

	mixer_control	“Digital"

	mixer_device	"hw:0”

	mixer_index	"0"

}


This seems to work OK. Am now testing.
Will report any further issues later.

User avatar
dasmanul
Posts: 502
Joined: Wed Sep 30, 2015 10:20 am
Location: Frankfurt, Germany

Re: Help please Setting upmpdcli on Pi 3

Wed Jul 27, 2016 7:07 pm

Good to hear that it's working for you! How did you find these settings?

While experimenting myself, I managed to break sound playback completely yesterday but I got it working again - I'm still not quite sure how I achieved either. ;)

The good news: Your config works for my setup (Hifiberry DAC+) as well, and I have volume control via BubbleUPnP again! So it's my turn to thank you for your help!

Budgie
Posts: 36
Joined: Mon Jan 19, 2015 3:30 pm

Re: Help please Setting upmpdcli on Pi 3

Thu Jul 28, 2016 1:28 pm

Glad to have been assistance after taking so much of your time. I cannot take the credit however. In the end I asked the Pi-DAC+ people if they had come across the issue as they have a fairly comprehensive installation guide but this issue was not in it. Apparently they were aware of the issue and it should have been in the guide. My thanks and credit to them.

All I want to do now is get bluetooth working so I can use bluetooth headphones when working late. Probably will not be using the Pi-DAC+ output but just from the RPi chips.

Regards and thanks again,
Budgie

dony71
Posts: 21
Joined: Wed Feb 05, 2014 8:39 pm

Re: Help please Setting upmpdcli on Pi 3

Tue Oct 18, 2016 7:41 pm

i'm scratching my head to get upmpdcli works
no error shown in log file, but no upmpdcli process running
anybody please help~~~~

pi@RetrOrangePi:~$ sudo service upmpdcli status
● upmpdcli.service - LSB: UPnP Renderer front-end to MPD
Loaded: loaded (/etc/init.d/upmpdcli)
Active: active (exited) since Tue 2016-10-18 12:26:14 PDT; 10min ago
Process: 3660 ExecStop=/etc/init.d/upmpdcli stop (code=exited, status=0/SUCCESS)
Process: 3720 ExecStart=/etc/init.d/upmpdcli start (code=exited, status=0/SUCCESS)
Oct 18 12:26:14 RetrOrangePi systemd[1]: Started LSB: UPnP Renderer front-end to MPD.

pi@RetrOrangePi:~$ sudo service mpd status
● mpd.service - Music Player Daemon
Loaded: loaded (/lib/systemd/system/mpd.service; enabled)
Active: active (running) since Tue 2016-10-18 12:00:04 PDT; 39min ago
Main PID: 24796 (mpd)
CGroup: /system.slice/mpd.service
└─24796 /usr/bin/mpd --no-daemon
Oct 18 12:00:04 RetrOrangePi systemd[1]: Started Music Player Daemon.

pi@RetrOrangePi:~$ ps -Ouser $(pidof upmpdcli)
PID USER S TTY TIME COMMAND
8477 pi S pts/1 00:00:02 -bash
8544 pi R pts/1 00:00:00 ps -Ouser

pi@RetrOrangePi:~$ ps -Ouser $(pidof mpd)
PID USER S TTY TIME COMMAND
24796 mpd S ? 00:00:03 /usr/bin/mpd --no-daemon

pi@RetrOrangePi:~$ apt-cache policy mpd
mpd:
Installed: 0.19.1-1.1
Candidate: 0.19.1-1.1
Version table:
0.19.12-1~bpo8+1 0
100 http://httpredir.debian.org/debian/ jessie-backports/main armhf Packages
*** 0.19.1-1.1 0
990 http://httpredir.debian.org/debian/ jessie/main armhf Packages
100 /var/lib/dpkg/status
0.18.7-1 0
500 http://ports.ubuntu.com/ubuntu-ports/ trusty/universe armhf Packages

pi@RetrOrangePi:~$ apt-cache policy upmpdcli
upmpdcli:
Installed: 1.2.9-1
Candidate: 1.2.9-1
Version table:
*** 1.2.9-1 0
500 http://www.lesbonscomptes.com/upmpdcli/ ... ds/debian/ unstable/main armhf Packages
100 /var/lib/dpkg/status

pi@RetrOrangePi:~$ cat /var/log/upmpdcli.log
:4:src/mpdcli.cxx:128::MPDCLi::openconn: mpd protocol version: 0.19.0
:4:libupnpp/upnpplib.cxx:155::LibUPnP: Using IP 128.168.1.40 port 49152
:5:src/httpfs.cxx:246::read_protocolinfo data: [http-get:*:audio/dsf:*,http-get:*:audio/x-dsf:*,http-get:*:audio/dsd:*,http-get:*:audio/x-dsd:*,http-get:*:audio/dff:*,http-get:*:audio/x-dff:*,http-get:*:audio/wav:*,http-get:*:audio/wave:*,http-get:*:audio/x-wav:*,http-get:*:audio/x-aiff:*,http-get:*:audio/mpeg:*,http-get:*:audio/x-mpeg:*,http-get:*:audio/mp1:*,http-get:*:audio/aac:*,http-get:*:application/flac:*,http-get:*:audio/flac:*,http-get:*:audio/x-flac:*,http-get:*:audio/m4a:*,http-get:*:audio/mp4:*,http-get:*:audio/x-m4a:*,http-get:*:audio/vorbis:*,http-get:*:audio/x-vorbis:*,http-get:*:audio/x-vorbis+ogg:*,http-get:*:audio/ogg:*,http-get:*:audio/x-ogg:*,http-get:*:audio/x-scpls:*,http-get:*:video/mp4:*]
:4:libupnpp/device/device.cxx:423::UpnpDevice::addService: [urn:upnp-org:serviceId:AVTransport]
:4:libupnpp/device/device.cxx:423::UpnpDevice::addService: [urn:upnp-org:serviceId:RenderingControl]
:4:libupnpp/device/device.cxx:423::UpnpDevice::addService: [urn:upnp-org:serviceId:ConnectionManager]
:4:libupnpp/device/device.cxx:423::UpnpDevice::addService: [urn:av-openhome-org:serviceId:Info]
:4:libupnpp/device/device.cxx:423::UpnpDevice::addService: [urn:av-openhome-org:serviceId:Time]
:4:libupnpp/device/device.cxx:423::UpnpDevice::addService: [urn:av-openhome-org:serviceId:Volume]
:4:libupnpp/device/device.cxx:423::UpnpDevice::addService: [urn:av-openhome-org:serviceId:Playlist]

Return to “Graphics, sound and multimedia”