Thanks to Nick I have managed to get mopidy to work with spotify… but I have no sound ! My installation is a raspberry pi which had an existing mpd server. The pi has a sound card wired on top of it. I think there may be a problem between my old mpd installation and mopidy. I would like to tell mopidy to use the conf in mpd.conf, especially the part telling
name "My ALSA Device"
device "hw:0,0" # optional
mixer_type "software" # optional
mixer_device "default" # optional
mixer_control "Master" # optional
# mixer_index "0" # optional
I tried to install mopidy-alsamixer but it didn’t worked. Is it the way to look at ? Or should I completely remove my previous mpd installation ?
oh big misunderstanding from me, I had understood that mopidy used mpd to stream. My mpd is on 6600 and mopidy on 6680 therefore there shouldn’t be problem. I tried to disable the analogue output but I think it’s already done, here is what I have in config.txt :
Mopidy includes multiple optional “Frontends” (interfaces):
An MPD interface on the port configured in the mpd section of your Mopidy config file. The default is 6600. If this interface is enabled and you are running both Mopidy and mpd, you must change the port to something else. Otherwise, whichever program starts first will take port 6600 and the second program will not be able to use it.
A HTTP interface on the port configured in the http section of your Mopidy config file. The default is 6680.
The mpd section of your Mopidy config file is used to configure Mopidy’s MPD interface.
There’s not normally a reason to run both Mopidy and mpd but it explains your other thread where you were unable to search Spotify using your MPD client. You were sending your search query to mpd, not Mopidy.
That should work as the default value is off. Personally I’d have the following instead and it’s clearer what you want.
If you run aplay -l on your Raspberry Pi you should only see the hifiberry-dac listed and all audio should come through that.
when I type aplay -l I got only one device, so the problem probably don’t come frome here. I have looked more thoroughly at my web clients (iris and mopify) : I can browse spotify, I can see my playlists, but the “play” function doesn’t seem to work : when I right clic/play on iris, nothing happen, and if I clic on the |> button, no noise, but the song timer start, for four seconds, then restart at zero, and so on. On mopify, I can see playlists (mine or featured playlists) but I can’t see the song into. When I click on play on a playlist, nothing happen.
no problem on this side of system understanding :). What I do want is to play music on the speakers connected to my raspberry pi.
I tried to launch mopidy with -v, and I got an error when I try to play :
WARNING 2019-07-03 16:28:31,066 [12970:Audio-2] mopidy.audio.actor
Setting GStreamer state to GST_STATE_PLAYING failed
ERROR 2019-07-03 16:28:31,068 [12970:MainThread] mopidy.audio.gst
GStreamer error: gst-resource-error-quark: Could not open audio device for playback. (6)
WARNING 2019-07-03 16:28:31,071 [12970:Core-10] mopidy.core.tracklist
Track is not playable: spotify:track:773xZHHSHJvC1z3AAtWgH6
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
WARNING: from element /GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0: Failed to connect: Access denied
Additional debug info:
pulsesink.c(615): gst_pulseringbuffer_open_device (): /GstPulseSink:autoaudiosink0-actual-sink-pulse
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
and nothing more.
I know the sound system is working because with my previous mpd install, I can have music. But not from mopidy for now.
I’m sorry I don’t remember installing pulseaudio, I thought I used only Alsa from my previous installation. Do you think it would be simpler to just get rid of pulseaudio ? Why could I have need it ? I will try making it work anyway.
It’s possible it comes installed on the latest Raspbian, I’ve got a vague memory that it might be needed for Bluetooth support these days. But it never used to be required and it does add a bit of complexity. But if you follow the link you should be able to get it to work with Pulse. I would personally uninstall it if you don’t think you need it.