Alexa and Max2Play on one RPI3

Max2Play Home 2016 (en) Forums Max2Play on Raspberry PI Alexa and Max2Play on one RPI3

This topic contains 2 replies, has 3 voices, and was last updated by  flysurfer Moderator 2 weeks, 4 days ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • 27. May 2017 at 14:16 #29083

    I managed to get Alex working simultaneously with Max2Play on one RPI3 with no soundcard through the headphone jack. I did this by installing Max2Play as a player on my existing multiroom set up and then following a number of instructions on adding Alexa to a standard Jessie install. It seemed to work ok – I could play via multiroom system and also ask Alexa. Due to limitations of Alexa on RPI3 that Amazon set/available skills, it does not interact with Squeeze and cannot play music so was limited to only questions but made my RPI3 a dual use device through one speaker. The key thing to make it work was using Pulseaudio system wide.

    I thought I would try to get it working with a Hifiberry DAC+ card so I could get better sound, but this does not give any sound. I went through the same process, but selecting card in Max2Play which gave sound output ok when just Max2Play in place. As soon as I had been through the Alexa install process, I had no sound. I tried the Pulseaudio solution again but still no sound and tried a few other changes but no success.

    Has anyone any ideas on what might cause this or if it can be made to work or is it asking for the impossible? I’m not sure what info to post – I added Audioplayer debug info at the bottom and the websites that show the process I followed – worked without card, but not with card.

    I aslo ran a debugging script: cd ~ && wget https://raw.githubusercontent.com/alexa-pi/AlexaPi-misc/master/alsa-info.sh && bash alsa-info.sh
    which gave the following output: –
    cat: /sys/module/snd_soc_hifiberry_dacplus/parameters/*: No such file or directory

    http://lifehacker.com/the-simplest-way-to-build-a-raspberry-pi-powered-amazon-1794218212
    https://github.com/alexa-pi/AlexaPi/wiki/Audio-setup-&-debugging#pulseaudio

    #### SQUEEZELITE VERSION ####
    Squeezelite Max2Play v1.0.1 based on v1.8.4-726, Copyright 2012-2015 Adrian Smith, 2015-2016 Ralph Irving.
     
    
    #### SQUEEZELITE BUILDOPTIONS ####
    Build options: LINUX ALSA EVENTFD RESAMPLE FFMPEG VISEXPORT IR GPIO DSD CONTROLSBS ALSASYNC BLUETOOTHSYNC
     
    
    #### AUDIOPLAYER CONFIG ####
    ### Configuration of Audioplayers
    SQUEEZELITE_PARAMETER=-o sysdefault:CARD=sndrpihifiberry -a 80:4::
    SQUEEZESLAVE_PARAMETER=-n plugequal
    SHAIRPORT_PARAMETER=-d plug:default
    USE_USB_DAC=0
    USE_EQUALIZER=0
    SYSTEM_USER=pi
    YMPD_PARAMETER=--webport 8081
     
    
    #### SQUEEZELITE -l ####
    Output devices:
      default                        - Playback/recording through the PulseAudio sound server
      null                           - Discard all samples (playback) or generate zero samples (capture)
      pulse                          - PulseAudio Sound Server
      equal                         
      plugequal                      - Equalizer for plughw:0,0
      sysdefault:CARD=sndrpihifiberry - snd_rpi_hifiberry_dacplus,  - Default Audio Device
      dmix:CARD=sndrpihifiberry,DEV=0 - snd_rpi_hifiberry_dacplus,  - Direct sample mixing device
      dsnoop:CARD=sndrpihifiberry,DEV=0 - snd_rpi_hifiberry_dacplus,  - Direct sample snooping device
      hw:CARD=sndrpihifiberry,DEV=0  - snd_rpi_hifiberry_dacplus,  - Direct hardware device without any conversions
      plughw:CARD=sndrpihifiberry,DEV=0 - snd_rpi_hifiberry_dacplus,  - Hardware device with all software conversions
      sysdefault:CARD=Device         - USB PnP Sound Device, USB Audio - Default Audio Device
      front:CARD=Device,DEV=0        - USB PnP Sound Device, USB Audio - Front speakers
      surround21:CARD=Device,DEV=0   - USB PnP Sound Device, USB Audio - 2.1 Surround output to Front and Subwoofer speakers
      surround40:CARD=Device,DEV=0   - USB PnP Sound Device, USB Audio - 4.0 Surround output to Front and Rear speakers
      surround41:CARD=Device,DEV=0   - USB PnP Sound Device, USB Audio - 4.1 Surround output to Front, Rear and Subwoofer speakers
      surround50:CARD=Device,DEV=0   - USB PnP Sound Device, USB Audio - 5.0 Surround output to Front, Center and Rear speakers
      surround51:CARD=Device,DEV=0   - USB PnP Sound Device, USB Audio - 5.1 Surround output to Front, Center, Rear and Subwoofer speakers
      surround71:CARD=Device,DEV=0   - USB PnP Sound Device, USB Audio - 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
      iec958:CARD=Device,DEV=0       - USB PnP Sound Device, USB Audio - IEC958 (S/PDIF) Digital Audio Output
      dmix:CARD=Device,DEV=0         - USB PnP Sound Device, USB Audio - Direct sample mixing device
      dsnoop:CARD=Device,DEV=0       - USB PnP Sound Device, USB Audio - Direct sample snooping device
      hw:CARD=Device,DEV=0           - USB PnP Sound Device, USB Audio - Direct hardware device without any conversions
      plughw:CARD=Device,DEV=0       - USB PnP Sound Device, USB Audio - Hardware device with all software conversions
    
     
    
    #### SHAIRPORT VERSION ####
    2.8.0-openssl-Avahi-ALSA-soxr
     
    
    #### OUTPUT SOUND DETAILS CARD 0 ####
    access: RW_INTERLEAVED
    format: S32_LE
    subformat: STD
    channels: 2
    rate: 44100 (44100/1)
    period_size: 882
    buffer_size: 3528
     
    
    #### OUTPUT SOUND DETAILS CARD 1 ####
    9. June 2017 at 14:23 #29461

    Hi Tony,

    Firstly, please deactivate the built-in audio in the Raspberry Settings.

    Also, check out the documentation on github for utilizing ALSA as should be more conveniently set up.

    Please add a little delay to Squeezelite to make sure it does not hog the ALSA: -C 10 should do it

    We will look into this ourselves and give you a more detailed response soon.

    • This reply was modified 2 weeks, 4 days ago by  Heiner.
    9. June 2017 at 15:28 #29478

    Hi Tony,

    I just setup AlexaPi for testing with an IQAudio-Digiamp and here is what you might try:
    – use Alsa instead Pulseaudio
    – try to deactivate all other audioplayers while testing (you might try to use the DMIX audiointerface later to let multiple players connect to the soundcard)
    – edit the file “nano /etc/opt/AlexaPi/config.yaml” and use

    output_device: "sysdefault:CARD=sndrpihifiberry"
    output: "alsa"
    

    – start in Debug mode with “/opt/AlexaPi/src/main.py -d” to see errors on startup

    If you want to use Squeezelite parallel afterwards, you need to setup both Squeezelite and AlexaPi to use the soundcard with DMIX (not tested yet).

    Hope this helps.

    Stefan

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Register here