Raspotify

Hi, apologies if this is not the correct forum, but I am very new to DietPi and can’t seem to find another forum for my question:

I am using DietPi and have installed Raspotify. However, when I go to my Windows Spotify Application, while I can see my Echo’s as output devices, I don’t see my Pi3 as an option. Both HQPlayer NAA and RAAT are working on this Pi3 and so I don’t think there is a network issue.

Any ideas on how I can troubleshoot this?

Thank you!

Hi, I am now able to see Raspotify as output device on Spotify, but when I play to it, no sound comes out. My Pi3 is connected to a USB DAC, and both Roon RAAT and HQPlayer NAA works fine. When I try to stream via Raspotify, I get this error:

ERROR:librespot_playback::audio_backend::alsa: Alsa error PCM open -22
ERROR:librespot_playback::player: Could not start audio: Alsa error: PCM open failed

Just in case RAAT and NAA is not releasing the hardware, I have also tried rebooting the pi3 and use Raspotify first, but I still get the same error…

Has anyone else experienced this or know of a fix?

Thank you!

I have just installed raspotify client on my Allo Sparky USBridge and having the same issue. DietPi device shows up in the Devices list on my phone and can be selected but USBridge does not play any sound through my USB DAC. I can see the same ALSA errors in the DietPi logs:

Feb 09 02:18:07 DietPi librespot[4186]: INFO:librespot_core::session: Connecting to AP “guc3-accesspoint-b-g881.ap.spotify.com:4070
Feb 09 02:18:07 DietPi librespot[4186]: INFO:librespot_core::session: Authenticated as “xxxxxxxxxxxxxxxxxxxxxxxx” !
Feb 09 02:18:07 DietPi librespot[4186]: INFO:librespot_playback::audio_backend::alsa: Using alsa sink
Feb 09 02:18:07 DietPi librespot[4186]: INFO:librespot_core::session: Country: “US”
Feb 09 02:18:08 DietPi librespot[4186]: INFO:librespot_playback::player: Loading track “Forgotten Notes” with Spotify URI “spotify:track:7isDQHcdjMajZ2fBeuHMDp”
Feb 09 02:18:09 DietPi librespot[4186]: INFO:librespot_playback::player: Track “Forgotten Notes” loaded
Feb 09 02:18:09 DietPi librespot[4186]: ALSA lib pcm.c:8382:(snd_pcm_set_params) Sample format not available for PLAYBACK: Invalid argument
Feb 09 02:18:09 DietPi librespot[4186]: ERROR:librespot_playback::audio_backend::alsa: Alsa error PCM open -22
Feb 09 02:18:09 DietPi librespot[4186]: ERROR:librespot_playback::player: Could not start audio: Alsa error: PCM open failed
Feb 09 02:18:09 DietPi librespot[4186]: ALSA lib pcm.c:8382:(snd_pcm_set_params) Sample format not available for PLAYBACK: Invalid argument
Feb 09 02:18:09 DietPi librespot[4186]: ERROR:librespot_playback::audio_backend::alsa: Alsa error PCM open -22
Feb 09 02:18:09 DietPi librespot[4186]: ERROR:librespot_playback::player: Could not start audio: Alsa error: PCM open failed
Feb 09 02:18:14 DietPi librespot[4186]: ALSA lib pcm.c:8382:(snd_pcm_set_params) Sample format not available for PLAYBACK: Invalid argument
Feb 09 02:18:14 DietPi librespot[4186]: ERROR:librespot_playback::audio_backend::alsa: Alsa error PCM open -22
Feb 09 02:18:14 DietPi librespot[4186]: ERROR:librespot_playback::player: Could not start audio: Alsa error: PCM open failed

After some googling I found a solution that worked for me. Try adding “–device=plughw:1” option to the OPTIONS variable in /etc/default/raspotify config file and restart raspotrify service. See link below for details:

https://github.com/plietar/librespot/issues/162

SU