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

Volume control not working #49

Closed
rickbrandt opened this Issue Apr 24, 2017 · 10 comments

Comments

Projects
None yet
4 participants
@rickbrandt

rickbrandt commented Apr 24, 2017

Hi!
First of all a lot of compliments and gratitude for this project, I got it to work on my Pi yesterday and am very happy with it. I have four questions though.

(1) When pressing the volume buttons on my phone while in the Spotify app, the app shows the volume of Spotify go up and down, but the volume of my music stays the same. Is this a known issue? Is there a way to fix it?

(2) The volume coming from the Pi seems to be remarkably lower than from for instance my phone. The alsamixer is set to 100% already. (Maybe the spotify volume is set to something low and I cannot get it to max because of above issue (1)?).

(3) The audio quality from the Pi seems quite a bit worse than from my phone. My speakers are able to project very clear high pitched drums and stuff like that and when playing a song from my phone, I can notably hear the details more than when playing from the pi. I did set the bitrate to 320 in the config already. Is this just the RPi soundcard being poor compared to my phone (OnePlus One)? I know this is a highly subjective question but maybe someone knows...

(4) When skipping through numbers and disconnecting and reconnecting (don't know what I did exactly) the daemon crashed. Logs are saying this:

Apr 24 16:48:32 raspberrypi Spotifyd[1062]: Caught panic with message: called Option::unwrap() on a None value
Apr 24 16:49:44 raspberrypi Spotifyd[1062]: Caught panic with message: called Result::unwrap() on an Err value: "SendError(..)"

I am running the precompiled ARMv7 binary on a RPi 2B Jessie.

Thanks in advance!
Cheers Rick

@SimonPersson

This comment has been minimized.

Member

SimonPersson commented Apr 24, 2017

Hi!

(1) - Yes, I'm aware of this. I don't use the feature so I haven't bothered. One day :)

(2) and (3) - Yeah, the inbuilt audio is not great. I use a cheap USB DAC which really helps. You could test if the issue is with Spotifyd or not by playing some audio with another application, such as:

aplay /usr/share/sounds/alsa/Front_Center.wav

(4) - No idea, sorry! I think the underlying library might be a little bit unstable. Perhaps set up some solution to restart the daemon when it crashes for now.

Cheers,

Simon

@rickbrandt

This comment has been minimized.

rickbrandt commented Apr 28, 2017

  1. Fair enough, thanks for letting me know (so I dont spend more time on it).
    2 and 3. Playing an mp3 seems to have similar volume and sound quality. So indeed seems nothing to do with spotify.
  2. Will do, thanks!
@wedi

This comment has been minimized.

wedi commented May 28, 2017

Volume control was working for me in an earlier version. After upgrading to the current release this went away.

I extracted the version this was working in from a file called spotifyd-2017-03-27-armv7.zip but the date does not correspond to a release… I can provide this file if you are interested.

@rickbrandt

This comment has been minimized.

rickbrandt commented May 30, 2017

Since some time now I get this error:

19:29:10 [ERROR] Caught panic with message: subscription terminated

My Spotify subscription is still valid though. I tried logging out and in again. Any idea?

@rickbrandt

This comment has been minimized.

rickbrandt commented May 30, 2017

@wedi Thanks! For now I dont have anything working anymore so Ill focus on that first ;)

@rickbrandt rickbrandt closed this Jun 11, 2017

@rickbrandt

This comment has been minimized.

rickbrandt commented Jun 11, 2017

For future reference, the
Caught panic with message: subscription terminated
error was resolved by getting the latest compiled version. also see

#57

@SebastianJarsve

This comment has been minimized.

SebastianJarsve commented Jun 15, 2017

+1 for the volume control. I've made an amplifier with a built in Raspberry Pi and wanted to use Spotify Connect to control the music. Everything works great, except for the volume control. Of course, I could just ssh into the Raspberry and adjust the volume with alsamixer, but that doesn't make my amplifier so user friendly.

@SimonPersson

This comment has been minimized.

Member

SimonPersson commented Jun 15, 2017

Yeah, this issue shouldn't have been closed. I will look into it.

I've made an amplifier with a built in Raspberry Pi and wanted to use Spotify Connect to control the music. Everything works great, except for the volume control.

Sounds cool! Does the RPi control the amplification via alsamixer? I'm thinking that for good audio quality, one would want to output line level to the amplifier, and then change the volume on the amplifier, rather than outputting less than line level from the RPi, no? In any case, I'm looking into it :)

@SimonPersson SimonPersson reopened this Jun 15, 2017

SimonPersson added a commit that referenced this issue Jun 15, 2017

Mixer and audio filter should share volume.
This fixes the broken volume control, issue #49.
@SimonPersson

This comment has been minimized.

Member

SimonPersson commented Jun 16, 2017

This should be solved on master, binaries will be available in a bit.

The solution is really hackish, but should work. There is an open PR to add an alsa volume controller to Librespot, which will implement a more proper solution. Essentially, the issue is that Librespot defaults the mixer to full volume. Until Librespot merges a more proper solution, I just make sure to never raise the volume by more than 20%, hence blocking the initial setting unless you already had the sound really loud.

@SebastianJarsve

This comment has been minimized.

SebastianJarsve commented Jun 16, 2017

Yeah, I control the amplification through alsamixer, which works great.
Now spotifyd works flawlessly, thanks man!

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