[GH-ISSUE #161] No Playback #112

Closed
opened 2026-02-27 19:28:54 +03:00 by kerem · 10 comments
Owner

Originally created by @ytzelf on GitHub (Feb 22, 2018).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/161

I'm running librespot on a raspberry 3 w/ raspbian stretch lite.
The raspberry is connected to an Allo Boss DAC :

pi@raspberrypi2:~$ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=BossDAC
BossDAC,
Default Audio Device
sysdefault:CARD=BossDAC
BossDAC,
Default Audio Device
dmix:CARD=BossDAC,DEV=0
BossDAC,
Direct sample mixing device
dsnoop:CARD=BossDAC,DEV=0
BossDAC,
Direct sample snooping device
hw:CARD=BossDAC,DEV=0
BossDAC,
Direct hardware device without any conversions
plughw:CARD=BossDAC,DEV=0
BossDAC,
Hardware device with all software conversions`

I'm issuing the command

sudo ./librespot --cache /tmp --name test --device-type speaker --bitrate 320 --verbose --username XXX --password XXX --backend alsa --device hw

My raspberry appears correctly in the Spotify Android app, logs react to skipping / seeking / volume BUT song stays at 0:00 and total duration shows 0:00 as well... I can paste detailed debug ouput if needed but standard log pretty much stops after

14:24:38 [INFO] Loading track "Run to You"
14:24:40 [INFO] Track "Run to You" loaded

Originally created by @ytzelf on GitHub (Feb 22, 2018). Original GitHub issue: https://github.com/librespot-org/librespot/issues/161 I'm running librespot on a raspberry 3 w/ raspbian stretch lite. The raspberry is connected to an Allo Boss DAC : > pi@raspberrypi2:~$ aplay -L null Discard all samples (playback) or generate zero samples (capture) default:CARD=BossDAC BossDAC, Default Audio Device sysdefault:CARD=BossDAC BossDAC, Default Audio Device dmix:CARD=BossDAC,DEV=0 BossDAC, Direct sample mixing device dsnoop:CARD=BossDAC,DEV=0 BossDAC, Direct sample snooping device hw:CARD=BossDAC,DEV=0 BossDAC, Direct hardware device without any conversions plughw:CARD=BossDAC,DEV=0 BossDAC, Hardware device with all software conversions` I'm issuing the command > sudo ./librespot --cache /tmp --name test --device-type speaker --bitrate 320 --verbose --username XXX --password XXX --backend alsa --device hw My raspberry appears correctly in the Spotify Android app, logs react to skipping / seeking / volume BUT song stays at 0:00 and total duration shows 0:00 as well... I can paste detailed debug ouput if needed but standard log pretty much stops after > 14:24:38 [INFO] Loading track "Run to You" 14:24:40 [INFO] Track "Run to You" loaded
kerem 2026-02-27 19:28:54 +03:00
Author
Owner

@kingosticks commented on GitHub (Feb 22, 2018):

Shouldn't it be hw:0,0 ?

EDIT: This was in response to the original unedited post

Or just don't specify the device, since the 'BOSSDAC' appears to be your default anyway.

<!-- gh-comment-id:367695294 --> @kingosticks commented on GitHub (Feb 22, 2018): Shouldn't it be `hw:0,0` ? EDIT: This was in response to the original unedited post Or just don't specify the device, since the 'BOSSDAC' appears to be your default anyway.
Author
Owner

@ytzelf commented on GitHub (Feb 22, 2018):

Nope

ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM hw0,0

I've tried a billion combination of different device but since I have only one and its default --backend alsa should suffice...

<!-- gh-comment-id:367696225 --> @ytzelf commented on GitHub (Feb 22, 2018): Nope > ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM hw0,0 I've tried a billion combination of different device but since I have only one and its default --backend alsa should suffice...
Author
Owner

@kingosticks commented on GitHub (Feb 22, 2018):

Note I said hw : 0 , 0, not hw 0 , 0. But yes, you don't need it anyway. So, for clarity, your command is now actually:

sudo ./librespot --cache /tmp --name test --device-type speaker --bitrate 320 --verbose --username XXX --password XXX --backend alsa

Right? And depending on how it was compiled you might not need --backend alsa either.

But regardless of all of this, since spotifyd is not librespot and has it's own config handling, isn't this question better directed at that project rather than here?

<!-- gh-comment-id:367713870 --> @kingosticks commented on GitHub (Feb 22, 2018): Note I said `hw : 0 , 0`, not ` hw 0 , 0`. But yes, you don't need it anyway. So, for clarity, your command is now actually: ``` sudo ./librespot --cache /tmp --name test --device-type speaker --bitrate 320 --verbose --username XXX --password XXX --backend alsa ``` Right? And depending on how it was compiled you might not need `--backend alsa` either. But regardless of all of this, since spotifyd is not librespot and has it's own config handling, isn't this question better directed at that project rather than here?
Author
Owner

@ytzelf commented on GitHub (Feb 22, 2018):

That's correct for the command.
I actually have the exact same issue w/ spotifyd so I've posted in their Github as well but that's just a wrong copy paste - edited 1st post.

<!-- gh-comment-id:367715036 --> @ytzelf commented on GitHub (Feb 22, 2018): That's correct for the command. I actually have the exact same issue w/ spotifyd so I've posted in their Github as well but that's just a wrong copy paste - edited 1st post.
Author
Owner

@awiouy commented on GitHub (Feb 23, 2018):

Have you tried --device "default:CARD=BossDAC"?

<!-- gh-comment-id:368122539 --> @awiouy commented on GitHub (Feb 23, 2018): Have you tried `--device "default:CARD=BossDAC"`?
Author
Owner

@ytzelf commented on GitHub (Feb 23, 2018):

This actually works! thanks a lot 💃

<!-- gh-comment-id:368123788 --> @ytzelf commented on GitHub (Feb 23, 2018): This actually works! thanks a lot 💃
Author
Owner

@awiouy commented on GitHub (Feb 23, 2018):

@sashahilton00
This could be added to the wiki.
I tried to have --device ? list alsa devices but librespot only opens the alsa sink when a track starts playing. Moreover, rust-alsa does not appear to provide a call to list devices.

<!-- gh-comment-id:368130133 --> @awiouy commented on GitHub (Feb 23, 2018): @sashahilton00 This could be added to the wiki. I tried to have `--device ?` list alsa devices but librespot only opens the alsa sink when a track starts playing. Moreover, rust-alsa does not appear to provide a call to list devices.
Author
Owner

@ComlOnline commented on GitHub (Feb 24, 2018):

As noted in #107 it works for the portaudio backend but not others.

<!-- gh-comment-id:368244917 --> @ComlOnline commented on GitHub (Feb 24, 2018): As noted in #107 it works for the portaudio backend but not others.
Author
Owner

@sashahilton00 commented on GitHub (Feb 24, 2018):

@awiouy only portaudio implements list devices, I believe it's noted briefly in the CLI usage instructions. It's one of the things that needs to be added at some point, but it's a long way down the list of things to do.

<!-- gh-comment-id:368246266 --> @sashahilton00 commented on GitHub (Feb 24, 2018): @awiouy only portaudio implements list devices, I believe it's noted briefly in the CLI usage instructions. It's one of the things that needs to be added at some point, but it's a long way down the list of things to do.
Author
Owner

@ytzelf commented on GitHub (Jul 5, 2018):

I've implemented a wiki page specifying syntax for alsa backend devices : https://github.com/librespot-org/librespot/wiki/Devices

Don't know if that's relevant and appropriate but might as well start helping somewhere.

<!-- gh-comment-id:402666192 --> @ytzelf commented on GitHub (Jul 5, 2018): I've implemented a wiki page specifying syntax for alsa backend devices : [https://github.com/librespot-org/librespot/wiki/Devices](https://github.com/librespot-org/librespot/wiki/Devices) Don't know if that's relevant and appropriate but might as well start helping somewhere.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#112
No description provided.