Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Playback #161

Closed
ytzelf opened this issue Feb 22, 2018 · 10 comments
Closed

No Playback #161

ytzelf opened this issue Feb 22, 2018 · 10 comments

Comments

@ytzelf
Copy link

ytzelf commented Feb 22, 2018

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

@kingosticks
Copy link
Contributor

kingosticks commented 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.

@ytzelf
Copy link
Author

ytzelf commented 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...

@kingosticks
Copy link
Contributor

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?

@ytzelf
Copy link
Author

ytzelf commented 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.

@awiouy
Copy link
Collaborator

awiouy commented Feb 23, 2018

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

@ytzelf
Copy link
Author

ytzelf commented Feb 23, 2018

This actually works! thanks a lot 💃

@awiouy
Copy link
Collaborator

awiouy commented 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.

@ComlOnline
Copy link
Contributor

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

@sashahilton00
Copy link
Member

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

@ytzelf
Copy link
Author

ytzelf commented 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants