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

Device specification in spotifyd.conf not working #1151

Open
ethanalker opened this issue Dec 27, 2022 · 3 comments
Open

Device specification in spotifyd.conf not working #1151

ethanalker opened this issue Dec 27, 2022 · 3 comments

Comments

@ethanalker
Copy link

ethanalker commented Dec 27, 2022

Description

I'm having issues with spotifyd playing when I specify devices in the config. Setting devices to any output found in aplay -L, including "default", gives the following log from systemctl --user status spotifyd:

Dec 27 08:19:05 arcus systemd[797]: Started A spotify playing daemon.
Dec 27 08:19:05 arcus spotifyd[545245]: Loading config from "/home/$USER/.config/spotifyd/spotifyd.conf"
Dec 27 08:19:05 arcus spotifyd[545245]: No proxy specified
Dec 27 08:19:05 arcus spotifyd[545245]: Using alsa volume controller.
Dec 27 08:19:05 arcus spotifyd[545245]: Connecting to AP "ap.spotify.com:443"
Dec 27 08:19:06 arcus spotifyd[545245]: Authenticated as "<username>" !
Dec 27 08:19:06 arcus spotifyd[545245]: Country: "US"
Dec 27 08:19:06 arcus spotifyd[545245]: Using PulseAudio sink with format: S16
Dec 27 08:19:52 arcus spotifyd[545245]: Could not start audio: No such entity
Dec 27 08:19:52 arcus spotifyd[545245]: Could not write audio: Not connected to PulseAudio
Dec 27 08:19:52 arcus spotifyd[545245]: Could not start audio: No such entity
Dec 27 08:19:52 arcus spotifyd[545245]: Could not write audio: Not connected to PulseAudio
Dec 27 08:19:52 arcus spotifyd[545245]: Could not start audio: No such entity
Dec 27 08:19:52 arcus spotifyd[545245]: Could not write audio: Not connected to PulseAudio
Dec 27 08:19:52 arcus spotifyd[545245]: Could not start audio: No such entity
Dec 27 08:19:52 arcus spotifyd[545245]: Could not write audio: Not connected to PulseAudio
Dec 27 08:19:52 arcus spotifyd[545245]: Could not start audio: No such entity
Dec 27 08:19:52 arcus spotifyd[545245]: Could not write audio: Not connected to PulseAudio

The player will successfully detect spotifyd and show as if it is playing, but no sound is produced. When devices is not set it works. Some relevant config is shown below:

backend = "pulseaudio"
volume_controller = "alsa"
device_name = "arcus"
bitrate = "320"
zeroconf_port = 4444
device_type = "computer"

To reproduce

Set value for devices in spotifyd.conf. Value I've tested include default, hw:2,1, and iec958:CARD=S7,DEV=1.

Version

spotifyd 0.3.4

Additional Context

I'm running arch linux and use wayland. I'm not super familiar with pulseaudio and configuring output devices as everything has just worked in the past, so it's possible the issue could lie with a misconfiguration there.

I'm not sure if this is a bug with spotifyd, a misconfiguration with pulseaudio, or if I'm configuring spotifyd incorrectly, and I haven't found anything online about it. Let me know if there's any other logs I can provide.

Edit: After looking into pulseaudio, it seems the device output can be specified by setting the PULSE_SINK environment variable, which works for my purposes. However, I'm still curious on how to properly set it within spotifyd.

@eladyn
Copy link
Member

eladyn commented Feb 27, 2023

Sorry for not replying earlier. I'm not super familiar with PulseAudio either. As far as I can tell, pulseaudio sinks are different from alsa devices, so I'm not sure, if looking at the output of aplay -L gives correct names.

Do you remember what value PULSE_SINK made it work for you?

@ethanalker
Copy link
Author

IIRC I set PULSE_SINK to one of the devices in aplay -L.

@eladyn
Copy link
Member

eladyn commented Mar 6, 2023

So, I played a bit with the setting when using PulseAudio backend, and it seems that the value for device has to be something from pactl list short sinks. (e.g. bluez_output.38_27_A9_C3_13_DC.1 for a bluetooth device connected to my computer) When using PULSE_SINK, PulseAudio might be converting the names from ALSA names to PulseAudio ones.

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

No branches or pull requests

2 participants