Fornoth / spotify-connect-web

MIT License
435 stars 64 forks source link

Volume control not working #84

Closed Arthur-min closed 8 years ago

Arthur-min commented 8 years ago

Hello,

I installed spotify connect web, it works, but I'm not able to use volume controls from my phone. When I use volume buttons, playback_volume and corected_playback_volume are well updated, but have no effect.

$ ./spotify-connect-web.sh --username woop --password woop --bitrate 320 --name Pi3 --device 1 --mixer PCM

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
# /etc/asound.conf

pcm.!default {
    type hw
    card 1
}
ctl.!default {
    type hw
    card 1
}
$ amixer
Simple mixer control 'PCM',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 151
  Mono:
  Front Left: Playback 16 [11%] [-25.38dB] [on]
  Front Right: Playback 16 [11%] [-25.38dB] [on]
Simple mixer control 'Mic',0
  Capabilities: cvolume cvolume-joined cswitch cswitch-joined
  Capture channels: Mono
  Limits: Capture 0 - 16
  Mono: Capture 0 [0%] [0.00dB] [on]
Simple mixer control 'Auto Gain Control',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]

Now I'm able to use $ amixer sset PCM -- 50%, but when I use my volume control buttons it doesn't work.

What can I do ? Thanks !

EDIT : Added --playback_device hw:1 and it works now !

binderth commented 8 years ago

Hi @Arthur-min,

I've got the same issue, my USB-soundcard won't react to volume changes from the spotify client. Where do you set the "--Playback_device hw:1" part?

Thanks for your help, Thomas.

Fornoth commented 8 years ago

@binderth the --playback_device hw:1 is set the same place as --username. Use amixer to find the correct device

binderth commented 8 years ago

oh. I think, I don't have the latest nightly build on my pi. The --Playback_device argument isn't supported by my version. I'll try to git-pull the latest Version then.

Thanks for the help, @Arthur-min!