-
Notifications
You must be signed in to change notification settings - Fork 654
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
ALSA Mixer doesn't reflect changed volume from ALSA in librespot #1450
Comments
Do you mean volume in the Spotify UI? Or really that the volume level remains the same? For the former, as far as I know there is no way to report volume to Spotify. For the latter, are you sure that the same hardware mixer control is: Other way around; when you control ALSA volume through Spotify and have |
Yes, I'm referring to the volume display in the
Regarding the possibility of reporting volume to Spotify - this should be feasible, as hardware speakers with physical volume controls are able to report their volume changes back to the This issue becomes particularly problematic when running multiple audio applications that use the same ALSA mixer - when any of these apps change the volume through the mixer ( |
That's interesting. @photovoltex you know if the |
After some research, I found potentially relevant Spotify documentation that might help implement volume reporting:
I'm not sure if these commercial hardware APIs are directly applicable to librespot's implementation, but they indicate that Spotify's protocol does support receiving external volume updates. This could provide guidance on how to implement similar functionality in librespot. |
I also found this |
Spot on. The dealer has the option to send the volume update to the server. The whole logic can be found in the main loop of the So if we implement that communication, it could be easily communicated to the server :) |
Cool. Sketching that out, there'd be two parts to this:
Any takers for a PR please mention so here. |
Look for similar bugs
I have checked existing issues and found no similar reports about ALSA mixer volume synchronization problems.
Description
ALSA Mixer volume changes made through
alsamixer
or etc are not being reflected in librespot playback volume. When adjusting the volume usingalsamixer
, librespot maintains its previously set volume level instead of respecting the system's ALSA mixer volume settings.Version
How to reproduce
librespot --mixer alsa
alsamixer
Log
Host
Additional context
I am not a Rust developer but after a quick look into mixer code, it seems there is no API to notify
librespot
when mixer value changes apart from polling viafn volume(&self) -> u16
. It would be great to extend theMixer
trait and then use ALSA'ssnd_ctl_subscribe_events
to subscribe to events - when a volume event is received, we could notifylibrespot
about the change.The text was updated successfully, but these errors were encountered: