Posts by Luddi

    Hello and thank you awiouy for this plugin.
    I had similiar problems to HelpMeSpotify getting it to work with a USB soundcard. I'm on LE8, milhouse build from 10.02.2017 on a raspi 2 with a miniDSP 2x4HD.
    'amixer' showed "amixer: Mixer attach default error: No such file or directory". The problem was that the soundcard was recognized as card 1 not card 0 and executing amixer without the specification of the device with the '-c 1' flag resulted in this error. I fixed this by making the USB device the default in /storage/.config/asound.conf :

    Code
    pcm.!default {
        type hw
        card m2x4HD
    }
    ctl.!default {
        type hw
        card m2x4HD
    }


    The name of the card is found out with 'aplay -L'. For me the output containes lines like this: "sysdefault:CARD=m2x4HD". So the card name is 'm2x4HD'.

    Now I tested the connect server and worked out the correct parameters by starting it from the command line. The working command for me was

    Code
    ./spotify-connect-web --key /storage/.kodi/userdata/addon_data/service.spotify-connect-web/spotify_appkey.key --playback_device sys
    default:CARD=m2x4HD --mixer_device_index 0 --mixer 'miniDSP 2x4HD ' -u myusername -p mypassword

    The name of the mixer is obtained by the output of 'amixer'. The other parameters were chosen like descriped in the projects repo.
    By inspecting 'journalctl -u service.spotify-connect-web' I noticed that the passed name of the mixer 'miniDSP 2x4HD ' was truncated to 'miniDSP'. Also notice the trailing space in the name. Thanks miniDSP.... Spaces in names never bring any luck.
    I followed the passing of the argument through the sources. The truncation happens at the calling of spotify-connect-web in bin/spotify-connect-web.start. Changing it in the following way made it work correctly:

    I guess there is a more clever way to do this which preserves your check if $scw_m is specified. I don't need it for now. Maybe this is something for the next update.
    Also the integration of the "--dbrange " option in the gui would be nice. Thanks.

    I hope this helps people with the same issues.