No Sound coming from Mopidy on Raspberry Pi (NOT on MusicBox)

Hey all, been pulling my hair out on this issue I’ve been having. I’ve got it all setup, can go into a web client and queue stuff from soundcloud, but there’s no sound.

gst-launch-1.0 audiotestsrc ! autoaudiosink
and
aplay /usr/share/sounds/alsa/Front_Center.wav

both produce sound, but when queuing anything local or online there’s nothing. I am using analog output, gstreamer1.0-alsa is installed, and here is my config

[core]
cache_dir = /var/cache/mopidy
config_dir = /etc/mopidy
data_dir = /var/lib/mopidy
max_tracklist_length = 10000
restore_state = false

[logging]
color = true
console_format = %(levelname)-8s %(message)s
debug_format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n %(message)s
debug_file = /var/log/mopidy/mopidy-debug.log
config_file = /etc/mopidy/logging.conf

[audio]
mixer = alsamixer
mixer_volume = 100
output = alsasink
buffer_time =

[proxy]
scheme = http
hostname = kyles-pi
port = 6680
username =
password =

[musicbox_webclient]
enabled = true
musicbox = false
websocket_host =
websocket_port =
on_track_click = PLAY_ALL

[material-webclient]
enabled = true
config_file = /etc/mopidy/mopidy.conf

[alsamixer]
enabled = true
card = 0
control = PCM

[soundcloud]
enabled = true
explore_songs = 25
auth_token = ********

[mpd]
enabled = true
hostname = 127.0.0.1
port = 6600
password =
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname
command_blacklist =
listall
listallinfo
default_playlist_scheme = m3u

[http]
enabled = true
hostname = 0.0.0.0
port = 6680
static_dir =
zeroconf = Mopidy HTTP server on $hostname

[stream]
enabled = true
protocols =
http
https
mms
rtmp
rtmps
rtsp
metadata_blacklist =
timeout = 5000

[m3u]
enabled = true
base_dir =
default_encoding = latin-1
default_extension = .m3u8
playlists_dir = /var/lib/mopidy/playlists

[softwaremixer]
enabled = false ; Extension disabled by user config.

[file]
enabled = true
media_dirs =
$XDG_MUSIC_DIR|Music
~/|Home
excluded_file_extensions =
.jpg
.jpeg
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000

[local]
enabled = false ; Extension disabled by user config.

I have tried multiple webclients, autoaudiosink, alsasink, software mixer, alsamixer, all sorts of combinations, nothing seems to be producing any sound. aplay -l output just in case:

**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0

Quick edit: the log shows

2017-04-15 21:49:51,095 ERROR [2749:MainThread] mopidy.audio.gst: GStreamer error: gst-resource-error-quark: Method Not Allowed (5)

every time I queue a song

Never seen this one. Have you installed pulseaudio here also? Did you install mopidy from apt or pip?

Mopidy installed from apt, all extensions besides mopidy-pulseaudio installed from pip. I used to have pulseaudio installed, but I uninstalled it using
sudo apt-get remove pulseaudio

Are you running mopidy as a service as as your user? Is the mopidy user in the audio group? The error message does sound like some sort of pulseaudio thing and the fact that it used to be installed is a bit suspicious.

Sorry about the late response, it is running as a service using systemd.

Exactly the same issue here.
Raspberry Pi 3 Model B
Raspbian distro (not Pi MusicBox)
Mopidy 2.1.0; installed from APT source, running as a service

gst-launch-1.0 audiotestsrc ! autoaudiosink WORKS
aplay /usr/share/sounds/alsa/Front_Center.wav WORKS

Still no audio from Mopidy.

…some additional info:

mopidy.conf

[mpd]
enabled = true
hostname = 0.0.0.0
port = 6600
password =
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname

[http]
enabled = true
hostname = 0.0.0.0
port = 6680
static_dir =
zeroconf = Mopidy HTTP server on $hostname

[core]
cache_dir = /var/cache/mopidy
config_dir = /etc/mopidy
data_dir = /var/lib/mopidy

[audio]
mixer = alsamixer
mixer_volume = 100
output = alsasink
buffer_time = 10

[logging]
config_file = /etc/mopidy/logging.conf
debug_file = /var/log/mopidy/mopidy-debug.log

[local]
enabled = true
library = json
media_dir = /home/pi/Music
scan_timeout = 1000
scan_flush_threshold = 100
scan_follow_symlinks = false
excluded_file_extensions =
.directory
.html
.jpeg
.jpg
.log
.nfo
.png
.txt
.gz

[m3u]
playlists_dir = /var/lib/mopidy/playlists

[musicbox_webclient]
enabled = true
musicbox = false
websocket_host =
websocket_port =
on_track_click = PLAY_ALL

[alsamixer]
card = 0
control = PCM
min_volume = 0
max_volume = 100
volume_scale = cubic

Log file on boot

2017-05-15 12:24:51,262 INFO [26095:MainThread] mopidy.__main__: Starting Mopidy 2.1.0
2017-05-15 12:24:51,376 INFO [26095:MainThread] mopidy.config: Loading config from builtin defaults
2017-05-15 12:24:51,394 INFO [26095:MainThread] mopidy.config: Loading config from /etc/mopidy/mopidy.conf
2017-05-15 12:24:51,405 INFO [26095:MainThread] mopidy.config: Loading config from command line options
2017-05-15 12:24:51,586 INFO [26095:MainThread] mopidy.__main__: Enabled extensions: mpd, alsamixer, http, moped, stream, m3u, musicbox_webclient, softwaremixer, file, local-images, local, tunein
2017-05-15 12:24:51,588 INFO [26095:MainThread] mopidy.__main__: Disabled extensions: none
2017-05-15 12:24:52,066 INFO [26095:MainThread] mopidy.commands: Starting Mopidy mixer: AlsaMixer
2017-05-15 12:24:52,414 INFO [26095:MainThread] mopidy_alsamixer.mixer: Mixing using ALSA, card 0, mixer control "PCM".
2017-05-15 12:24:52,427 INFO [26095:MainThread] mopidy.commands: Mixer volume set to 100
2017-05-15 12:24:52,435 INFO [26095:MainThread] mopidy.commands: Starting Mopidy audio
2017-05-15 12:24:52,445 INFO [26095:MainThread] mopidy.commands: Starting Mopidy backends: StreamBackend, M3UBackend, FileBackend, LocalBackend, TuneInBackend
2017-05-15 12:24:52,499 INFO [26095:Audio-3] mopidy.audio.actor: Audio output set to "alsasink"
2017-05-15 12:24:52,548 INFO [26095:MainThread] mopidy.local.library: Loaded 1 local tracks using json
2017-05-15 12:24:52,588 INFO [26095:MainThread] mopidy.commands: Starting Mopidy core
2017-05-15 12:24:52,673 INFO [26095:MainThread] mopidy.commands: Starting Mopidy frontends: MpdFrontend, HttpFrontend
2017-05-15 12:24:52,680 INFO [26095:MainThread] mopidy.mpd.actor: MPD server running at [::ffff:0.0.0.0]:6600
2017-05-15 12:24:52,691 INFO [26095:HttpFrontend-12] mopidy.http.actor: HTTP server running at [::ffff:0.0.0.0]:6680
2017-05-15 12:24:52,692 INFO [26095:MainThread] mopidy.commands: Starting GLib mainloop

Log when I play a song

2017-05-15 12:25:30,328 WARNING [26095:MainThread] mopidy.audio.gst: GStreamer warning: gst-stream-error-quark: No volume control found (3)

and [quote=“voodoomatz, post:7, topic:1585”]
2017-05-15 12:25:30,328 WARNING [26095:MainThread] mopidy.audio.gst: GStreamer warning: gst-stream-error-quark: No volume control found (3)
[/quote]

Are not the same error. I suggest you remove your alsamixer settings and try to get the software mixer working first.

Thanks for the quick response!

I have change to software mixer and the issue and log file is exactly the same.

Regarding

2017-05-15 12:25:30,328 WARNING [26095:MainThread] mopidy.audio.gst: GStreamer warning: gst-stream-error-quark: No volume control found (3)

another post suggests this is no prob.

So the question is: Where is the problem then?

Why have you set this?

In general, it’s a really good idea to only set configuration values where you want a setting that is different from the default. This will make your configuration much smaller and simpler. It’ll also make upgrading to future versions easier.

Why have you set this?

voodoomatz:
[audio]

buffer_time = 10

Just trying to find a solution.

HI
I know this thread is old but a solution was never posted.
Was is solved for either of you?

Thanks

Did you follow the instructions at https://docs.mopidy.com/en/latest/installation/raspberrypi/#how-to-for-raspbian?
I redid that document not that long ago and it was all working.

HI
Yes I spent a lot of time in that Doc (my new “Bible”)

I am using the analog output and can hear sound during the Center.Wav audio test but not through Mopidy.

I have not played with the sound options yet and will try switching the output to “alsasink” as above.

Regards,

Pj

I

And are you running raspbian lite or the full desktop?

I am using the full desktop version.

Hey just to let you know I go the audio working with :
[audio]
mixer = none
#mixer_volume =
output = alsasink
#buffer_time =

Thanks for the Help, I will now attempt to setup streaming :slight_smile:

Thanks for the update. Sounds like a I actually need to try the desktop image myself and see what’s going wrong.

OK looks like on more recent versions of Raspbian Desktop, autoaudiosink defaults to use omxhdmi instead of alsasink. https://github.com/alexa/avs-device-sdk/issues/427

I will update our install documentation.