Could "Spotifyd" be available into DietPi software ?

Suggestions for features and software you would like to see in DietPi, goes here.
Post Reply
Facel
Posts: 17
Joined: Thu Jan 25, 2018 1:39 pm

Could "Spotifyd" be available into DietPi software ?

Post by Facel » Wed Mar 21, 2018 10:29 am

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.

Edward
Posts: 85
Joined: Sun Apr 09, 2017 5:24 am

Re: Could "Spotifyd" be available into DietPi software ?

Post by Edward » Sun Apr 07, 2019 4:55 am

seems to install clean, just can't seem to get sound out of it though

Edward
Posts: 85
Joined: Sun Apr 09, 2017 5:24 am

Re: Could "Spotifyd" be available into DietPi software ?

Post by Edward » Sun Apr 07, 2019 2:43 pm

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.

Edward
Posts: 85
Joined: Sun Apr 09, 2017 5:24 am

Re: Could "Spotifyd" be available into DietPi software ?

Post by Edward » Sun Apr 07, 2019 6:26 pm

Okay I think I got it.

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.


[global]
username = USER
password = PASS
#use-keyring = true
backend = alsa
device = alsa_audio_device # Given by `aplay -L`
mixer = PCM
volume-control = alsa # or alsa_linear, or softvol
#onevent = command_run_on_playback_event
device_name = name_in_spotify_connect # Cannot contain spaces
bitrate = 96|160|320
cache_path = cache_directory
volume-normalisation = true
normalisation-pregain = -10

From the Github page:
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.

[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

Very clean install on the RPi, nothing major. The github includes directions for making it a service etc.

Good luck and have fun!

8)
https://github.com/Spotifyd/spotifyd
Last edited by Edward on Mon Apr 08, 2019 10:12 pm, edited 1 time in total.

Edward
Posts: 85
Joined: Sun Apr 09, 2017 5:24 am

Re: Could "Spotifyd" be available into DietPi software ?

Post by Edward » Mon Apr 08, 2019 12:46 am

Update

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.

Edward
Posts: 85
Joined: Sun Apr 09, 2017 5:24 am

Re: Could "Spotifyd" be available into DietPi software ?

Post by Edward » Wed Apr 17, 2019 2:56 pm

Results

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:
1. download and unzip file.
2. place file in /usr/bin
3. create config file in ~/.config/spotifyd/
4. create service in /etc/systemd/system/
5. 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.

User avatar
MichaIng
Legend
Posts: 1146
Joined: Sat Nov 18, 2017 5:21 pm

Re: Could "Spotifyd" be available into DietPi software ?

Post by MichaIng » Fri Apr 19, 2019 7:06 pm

@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.

Edward
Posts: 85
Joined: Sun Apr 09, 2017 5:24 am

Re: Could "Spotifyd" be available into DietPi software ?

Post by Edward » Fri Apr 19, 2019 11:25 pm

HI MichaIng,

Thats a good question.

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.

[global]
username = "your_account_name"
password = "your_password"
device = alsa_audio_device # example sysdefault:CARD=Amanero
mixer = "Digital"
volume-control = "softvol"
device_name = "your_client_name"
bitrate = 320


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.

Post Reply