RafaPolit / moode-spotify-connect-web

moOde OS - spotify-web-connect install instructions and required files.
MIT License
15 stars 4 forks source link

alsaaudio.ALSAAudioError: Unable to find mixer control #10

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hi, i can't understand what mixer should i specify, i tried in the sh script given my configuration below. i got the sound coming out of the speakers but i can't have the service running and stops with the error reported below. Any clue about what i am missing? thanks

pi@robbamusic:~/spotify/spotify-connect-web $ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
btaplay_dmix
alsaequal
plug_alsaequal
btstream
crossfeed
plug_bs2b
eqfa4p
plug_eqfa4p
default
sysdefault:CARD=sndrpihifiberry
    snd_rpi_hifiberry_digi, 
    Default Audio Device
iec958:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_digi, 
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_digi, 
    Direct sample mixing device
dsnoop:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_digi, 
    Direct sample snooping device
hw:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_digi, 
    Direct hardware device without any conversions
plughw:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_digi, 
    Hardware device with all software conversions

pi@robbamusic:~/spotify/spotify-connect-web $  amixer controls
numid=1,iface=MIXER,name='Tx Source'

~/spotify/spotify-connect-web $ sudo vim /etc/asound.conf 

pcm.!default  {
 type hw card 0
}
ctl.!default {
 type hw card 0
}

Jun 24 15:18:05 robbamusic spotify-connect.sh[21410]: Loading Spotify library...
Jun 24 15:18:05 robbamusic spotify-connect.sh[21410]: Last.fm: incomplete credentials, not launched
Jun 24 15:18:05 robbamusic spotify-connect.sh[21410]: Traceback (most recent call last):
Jun 24 15:18:05 robbamusic spotify-connect.sh[21410]:   File "main.py", line 16, in <module>
Jun 24 15:18:05 robbamusic spotify-connect.sh[21410]:     from connect import Connect
Jun 24 15:18:05 robbamusic spotify-connect.sh[21410]:   File "/home/pi/spotify/spotify-connect-web/connect.py", line 9, in <module>
Jun 24 15:18:05 robbamusic spotify-connect.sh[21410]:     from console_callbacks import audio_arg_parser, mixer, error_callback, connection_callbacks, debug_callbacks, playback_callbacks, playback_setup
Jun 24 15:18:05 robbamusic spotify-connect.sh[21410]:   File "/home/pi/spotify/spotify-connect-web/console_callbacks.py", line 105, in <module>
Jun 24 15:18:05 robbamusic spotify-connect.sh[21410]:     mixer = alsa.Mixer(args.mixer, **mixer_card_arg)
Jun 24 15:18:05 robbamusic spotify-connect.sh[21410]: alsaaudio.ALSAAudioError: Unable to find mixer control Master,0 [default]
ghost commented 6 years ago

hi,

i got it working finally. with hifiberry digi+ the /etc/asound.conf should be:

pcm.softvol {
  type softvol
  slave {
    pcm "hw:0"
  }
  control {
    name "Master"
    card 0
  }
}
RafaPolit commented 6 years ago

Thanks for sharing a solution that worked for your system!

Yes, going from hw:1 to hw:0 is the most common scenario, depending on what the OS sees as the card numbers.

Enjoy the music!