I know that Raspotify is already available in DietPi … But it is using librespot that is not supported anymore meaning that Raspotify could stop working at anytime depending on new Spotify released.
Spotifyd beeing based ont the Official Spotify connect protocol, it would be nice to have it installed within dietPi just like raspotify is.
Finally got the spotifyd.conf fill configured right on one Dac, which includes use of the volume control.
It seems its not a one size fits all situation though as the same settings won’t work on another Dac. I’m guessing the file is too specific to work across the board…just a guess. Anyway I have about 5 different interfaces to play with, I’ll try to get them all to work and see if I can come up with a generic solution.
Installing just download the zip, unzip it to /usr/bin, run it with ./, make a service, enable the service to run on boot, create and update the .conf file. Everything required for the files are at the github site.
According to the Spotifyd github this is the stock spotifyd.conf file contents when can be adjusted to meet users needs.
Every field is optional; Spotifyd can even run without a configuration file. Options can also be placed in a [spotifyd] section which takes priority over the [global] section. This is useful when you run applications related to Spotifyd which shares some, but not all, options with Spotifyd.
Because I normally have more than one client running I used [spotifyd] instead of [global]. And these are the basic settings that seem to work across all of the USB interfaces I have, which include the Amanero and the XMOS. Be aware that no spaces are allowed in device name.
Amanero USB interfaces seem to be difficult to control the volume. Its not completely stable, sometimes it works sometimes not. Kinda figures because alsamixer does not show any volume controls.
But it worked for a while so I don’t know what gives.
Spotifyd seems to be totally fine with all USB chips I have except Amanero. This also includes HATS like the DigiOne and DigiOne SIg. Volume control etc works fine, every time without a hitch. Installed from scratch multiple times, results very consistent.
Install process:
download and unzip file.
place file in /usr/bin
create config file in ~/.config/spotifyd/
create service in /etc/systemd/system/
start and enable the service
Parameters for spotifyd.conf
[spotifyd]
username = “your_account_name”
password = “your_password”
device = alsa_audio_device # Given by aplay -L
volume-control = “softvol”
device_name = “your_client_name”
bitrate = 320
Note: [global] call and other parameters exist to try.
Edward
Many thanks for testing. Is it possible to have Spotifyd using the audio device that is configured with ALSA, or, generally using ALSA? I remember this being an issue with Raspotify (or was it Spotify Connect Web?) already, that ALSA is bypassed, thus equalizer and sound card selection being bypassed and also the audio device then being blocked for other output and all such.
So if possible we would like all audio sources using ALSA, so you can configure the audio device + equalizer in one central place.
Thats exactly the case, it bypasses ALSA but ‘is’ able to control the volume on everything [I’ ve tried] except the Amanero USB device.
To remedy this I found that if I use this in the spotifyd.conf file it will control the volume of everything, even the Amanero USB device. However it does stream at 48Hz not 44.1…working on sample rate next.
must be set for ‘global’ and ‘Digital’ for mixer device, otherwise it will by bypass ALSA.
Rebooted a few times, Amanero continues to work, flashed a new SD and did the whole install over from scratch and everything is good. I need to go back and see if the ‘digital’ setting works for everything ie XMOS, Allo Digi etc. If it does then this could be a generic file setting.
Continued testing-
Just for kicks I changed my settlings back to [what didnt work] ie [spotifyd] and nothing for mixer. The Amanero volume controls still worked..
So something fishy is going on here, I wouldn't run with my proposed solution just yet. I need to break it ie make it not work then fix it so it works before I would be confident.
Facel
As far as I know spotifyd is just a endpoint for the spotify app. I don’t think it can do anything else but stream from the app.
Glad to know it worked out for you. For me its only at 100% for the initial connection, after that it stays at what ever volume I adjust it too for any music I listen too after that.
Strange, now even the Amanero USB interface works. I guess its rare to be pissed that something works but in this case I don’t want it to work. I want it to either be broke so I can fix it or at the very least allow me to break it so I can fix it.
The only difference in procedure is I powered the RPi off and once powered on I connected by my primary Spotify device ie my phone. Volume control worked, the only thing I can do is kill the output by commenting out the device line, other than that volume control always works.
Tested on Amanero and XMOS…HATS never had a problem.
I’ll keep testing and if something pops up or I catch that elusive Gremlin I’ll let you know.
Okay I tested it three more times, all on boards that 100% did not work before ie Amanero USB.
After install, starting and enabling the service I used my primary Spotify device [my phone] to connect to Spotifyd. Each time it worked without a hitch.
Note: These were all fresh brand new OS and Spotifyd installs on three different micro SD cards using three different Rpi’s, all using WiFi.
I’m pretty sure its sovled but I still would like to have someone verify.